Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Agent
- type AgentClient
- func (c *AgentClient) Create() *AgentCreate
- func (c *AgentClient) CreateBulk(builders ...*AgentCreate) *AgentCreateBulk
- func (c *AgentClient) Delete() *AgentDelete
- func (c *AgentClient) DeleteOne(_m *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) MapCreateBulk(slice any, setFunc func(*AgentCreate, int)) *AgentCreateBulk
- func (c *AgentClient) Query() *AgentQuery
- func (c *AgentClient) Update() *AgentUpdate
- func (c *AgentClient) UpdateOne(_m *Agent) *AgentUpdateOne
- func (c *AgentClient) UpdateOneID(id uuid.UUID) *AgentUpdateOne
- func (c *AgentClient) Use(hooks ...Hook)
- type AgentCreate
- func (_c *AgentCreate) Exec(ctx context.Context) error
- func (_c *AgentCreate) ExecX(ctx context.Context)
- func (_c *AgentCreate) Mutation() *AgentMutation
- func (_c *AgentCreate) Save(ctx context.Context) (*Agent, error)
- func (_c *AgentCreate) SaveX(ctx context.Context) *Agent
- func (_c *AgentCreate) SetActive(v bool) *AgentCreate
- func (_c *AgentCreate) SetArch(v string) *AgentCreate
- func (_c *AgentCreate) SetHostname(v string) *AgentCreate
- func (_c *AgentCreate) SetID(v uuid.UUID) *AgentCreate
- func (_c *AgentCreate) SetIP(v string) *AgentCreate
- func (_c *AgentCreate) SetLastUpdateTime(v time.Time) *AgentCreate
- func (_c *AgentCreate) SetMAC(v string) *AgentCreate
- func (_c *AgentCreate) SetNillableActive(v *bool) *AgentCreate
- func (_c *AgentCreate) SetNillableID(v *uuid.UUID) *AgentCreate
- func (_c *AgentCreate) SetNillableLastUpdateTime(v *time.Time) *AgentCreate
- func (_c *AgentCreate) SetOccupiedCPU(v int32) *AgentCreate
- func (_c *AgentCreate) SetOccupiedMemory(v int32) *AgentCreate
- func (_c *AgentCreate) SetTotalCPU(v int32) *AgentCreate
- func (_c *AgentCreate) SetTotalMemory(v int32) *AgentCreate
- type AgentCreateBulk
- type AgentDelete
- type AgentDeleteOne
- type AgentGroupBy
- func (_g *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 (_g *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) Active() (r bool, exists bool)
- func (m *AgentMutation) AddField(name string, value ent.Value) error
- func (m *AgentMutation) AddOccupiedCPU(i int32)
- func (m *AgentMutation) AddOccupiedMemory(i int32)
- func (m *AgentMutation) AddTotalCPU(i int32)
- func (m *AgentMutation) AddTotalMemory(i int32)
- 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) AddedOccupiedCPU() (r int32, exists bool)
- func (m *AgentMutation) AddedOccupiedMemory() (r int32, exists bool)
- func (m *AgentMutation) AddedTotalCPU() (r int32, exists bool)
- func (m *AgentMutation) AddedTotalMemory() (r int32, exists bool)
- func (m *AgentMutation) Arch() (r string, exists bool)
- 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) Hostname() (r string, exists bool)
- func (m *AgentMutation) ID() (id uuid.UUID, exists bool)
- func (m *AgentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AgentMutation) IP() (r string, exists bool)
- func (m *AgentMutation) LastUpdateTime() (r time.Time, exists bool)
- func (m *AgentMutation) MAC() (r string, exists bool)
- func (m *AgentMutation) OccupiedCPU() (r int32, exists bool)
- func (m *AgentMutation) OccupiedMemory() (r int32, exists bool)
- func (m *AgentMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *AgentMutation) OldArch(ctx context.Context) (v string, err error)
- func (m *AgentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AgentMutation) OldHostname(ctx context.Context) (v string, err error)
- func (m *AgentMutation) OldIP(ctx context.Context) (v string, err error)
- func (m *AgentMutation) OldLastUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *AgentMutation) OldMAC(ctx context.Context) (v string, err error)
- func (m *AgentMutation) OldOccupiedCPU(ctx context.Context) (v int32, err error)
- func (m *AgentMutation) OldOccupiedMemory(ctx context.Context) (v int32, err error)
- func (m *AgentMutation) OldTotalCPU(ctx context.Context) (v int32, err error)
- func (m *AgentMutation) OldTotalMemory(ctx context.Context) (v int32, err error)
- func (m *AgentMutation) Op() Op
- func (m *AgentMutation) RemovedEdges() []string
- func (m *AgentMutation) RemovedIDs(name string) []ent.Value
- func (m *AgentMutation) ResetActive()
- func (m *AgentMutation) ResetArch()
- func (m *AgentMutation) ResetEdge(name string) error
- func (m *AgentMutation) ResetField(name string) error
- func (m *AgentMutation) ResetHostname()
- func (m *AgentMutation) ResetIP()
- func (m *AgentMutation) ResetLastUpdateTime()
- func (m *AgentMutation) ResetMAC()
- func (m *AgentMutation) ResetOccupiedCPU()
- func (m *AgentMutation) ResetOccupiedMemory()
- func (m *AgentMutation) ResetTotalCPU()
- func (m *AgentMutation) ResetTotalMemory()
- func (m *AgentMutation) SetActive(b bool)
- func (m *AgentMutation) SetArch(s string)
- func (m *AgentMutation) SetField(name string, value ent.Value) error
- func (m *AgentMutation) SetHostname(s string)
- func (m *AgentMutation) SetID(id uuid.UUID)
- func (m *AgentMutation) SetIP(s string)
- func (m *AgentMutation) SetLastUpdateTime(t time.Time)
- func (m *AgentMutation) SetMAC(s string)
- func (m *AgentMutation) SetOccupiedCPU(i int32)
- func (m *AgentMutation) SetOccupiedMemory(i int32)
- func (m *AgentMutation) SetOp(op Op)
- func (m *AgentMutation) SetTotalCPU(i int32)
- func (m *AgentMutation) SetTotalMemory(i int32)
- func (m *AgentMutation) TotalCPU() (r int32, exists bool)
- func (m *AgentMutation) TotalMemory() (r int32, exists bool)
- 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 (_q *AgentQuery) Aggregate(fns ...AggregateFunc) *AgentSelect
- func (_q *AgentQuery) All(ctx context.Context) ([]*Agent, error)
- func (_q *AgentQuery) AllX(ctx context.Context) []*Agent
- func (_q *AgentQuery) Clone() *AgentQuery
- func (_q *AgentQuery) Count(ctx context.Context) (int, error)
- func (_q *AgentQuery) CountX(ctx context.Context) int
- func (_q *AgentQuery) Exist(ctx context.Context) (bool, error)
- func (_q *AgentQuery) ExistX(ctx context.Context) bool
- func (_q *AgentQuery) First(ctx context.Context) (*Agent, error)
- func (_q *AgentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *AgentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *AgentQuery) FirstX(ctx context.Context) *Agent
- func (_q *AgentQuery) GroupBy(field string, fields ...string) *AgentGroupBy
- func (_q *AgentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *AgentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *AgentQuery) Limit(limit int) *AgentQuery
- func (_q *AgentQuery) Offset(offset int) *AgentQuery
- func (_q *AgentQuery) Only(ctx context.Context) (*Agent, error)
- func (_q *AgentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *AgentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *AgentQuery) OnlyX(ctx context.Context) *Agent
- func (_q *AgentQuery) Order(o ...agent.OrderOption) *AgentQuery
- func (_q *AgentQuery) Select(fields ...string) *AgentSelect
- func (_q *AgentQuery) Unique(unique bool) *AgentQuery
- func (_q *AgentQuery) Where(ps ...predicate.Agent) *AgentQuery
- type AgentSelect
- func (_s *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 (_s *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 (_u *AgentUpdate) AddOccupiedCPU(v int32) *AgentUpdate
- func (_u *AgentUpdate) AddOccupiedMemory(v int32) *AgentUpdate
- func (_u *AgentUpdate) AddTotalCPU(v int32) *AgentUpdate
- func (_u *AgentUpdate) AddTotalMemory(v int32) *AgentUpdate
- func (_u *AgentUpdate) Exec(ctx context.Context) error
- func (_u *AgentUpdate) ExecX(ctx context.Context)
- func (_u *AgentUpdate) Mutation() *AgentMutation
- func (_u *AgentUpdate) Save(ctx context.Context) (int, error)
- func (_u *AgentUpdate) SaveX(ctx context.Context) int
- func (_u *AgentUpdate) SetActive(v bool) *AgentUpdate
- func (_u *AgentUpdate) SetArch(v string) *AgentUpdate
- func (_u *AgentUpdate) SetHostname(v string) *AgentUpdate
- func (_u *AgentUpdate) SetIP(v string) *AgentUpdate
- func (_u *AgentUpdate) SetLastUpdateTime(v time.Time) *AgentUpdate
- func (_u *AgentUpdate) SetMAC(v string) *AgentUpdate
- func (_u *AgentUpdate) SetNillableActive(v *bool) *AgentUpdate
- func (_u *AgentUpdate) SetNillableArch(v *string) *AgentUpdate
- func (_u *AgentUpdate) SetNillableHostname(v *string) *AgentUpdate
- func (_u *AgentUpdate) SetNillableIP(v *string) *AgentUpdate
- func (_u *AgentUpdate) SetNillableMAC(v *string) *AgentUpdate
- func (_u *AgentUpdate) SetNillableOccupiedCPU(v *int32) *AgentUpdate
- func (_u *AgentUpdate) SetNillableOccupiedMemory(v *int32) *AgentUpdate
- func (_u *AgentUpdate) SetNillableTotalCPU(v *int32) *AgentUpdate
- func (_u *AgentUpdate) SetNillableTotalMemory(v *int32) *AgentUpdate
- func (_u *AgentUpdate) SetOccupiedCPU(v int32) *AgentUpdate
- func (_u *AgentUpdate) SetOccupiedMemory(v int32) *AgentUpdate
- func (_u *AgentUpdate) SetTotalCPU(v int32) *AgentUpdate
- func (_u *AgentUpdate) SetTotalMemory(v int32) *AgentUpdate
- func (_u *AgentUpdate) Where(ps ...predicate.Agent) *AgentUpdate
- type AgentUpdateOne
- func (_u *AgentUpdateOne) AddOccupiedCPU(v int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) AddOccupiedMemory(v int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) AddTotalCPU(v int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) AddTotalMemory(v int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) Exec(ctx context.Context) error
- func (_u *AgentUpdateOne) ExecX(ctx context.Context)
- func (_u *AgentUpdateOne) Mutation() *AgentMutation
- func (_u *AgentUpdateOne) Save(ctx context.Context) (*Agent, error)
- func (_u *AgentUpdateOne) SaveX(ctx context.Context) *Agent
- func (_u *AgentUpdateOne) Select(field string, fields ...string) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetActive(v bool) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetArch(v string) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetHostname(v string) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetIP(v string) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetLastUpdateTime(v time.Time) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetMAC(v string) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetNillableActive(v *bool) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetNillableArch(v *string) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetNillableHostname(v *string) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetNillableIP(v *string) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetNillableMAC(v *string) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetNillableOccupiedCPU(v *int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetNillableOccupiedMemory(v *int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetNillableTotalCPU(v *int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetNillableTotalMemory(v *int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetOccupiedCPU(v int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetOccupiedMemory(v int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetTotalCPU(v int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) SetTotalMemory(v int32) *AgentUpdateOne
- func (_u *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne
- type Agents
- type AggregateFunc
- type AlipayOrderRollback
- type AlipayOrderRollbackClient
- func (c *AlipayOrderRollbackClient) Create() *AlipayOrderRollbackCreate
- func (c *AlipayOrderRollbackClient) CreateBulk(builders ...*AlipayOrderRollbackCreate) *AlipayOrderRollbackCreateBulk
- func (c *AlipayOrderRollbackClient) Delete() *AlipayOrderRollbackDelete
- func (c *AlipayOrderRollbackClient) DeleteOne(_m *AlipayOrderRollback) *AlipayOrderRollbackDeleteOne
- func (c *AlipayOrderRollbackClient) DeleteOneID(id int) *AlipayOrderRollbackDeleteOne
- func (c *AlipayOrderRollbackClient) Get(ctx context.Context, id int) (*AlipayOrderRollback, error)
- func (c *AlipayOrderRollbackClient) GetX(ctx context.Context, id int) *AlipayOrderRollback
- func (c *AlipayOrderRollbackClient) Hooks() []Hook
- func (c *AlipayOrderRollbackClient) Intercept(interceptors ...Interceptor)
- func (c *AlipayOrderRollbackClient) Interceptors() []Interceptor
- func (c *AlipayOrderRollbackClient) MapCreateBulk(slice any, setFunc func(*AlipayOrderRollbackCreate, int)) *AlipayOrderRollbackCreateBulk
- func (c *AlipayOrderRollbackClient) Query() *AlipayOrderRollbackQuery
- func (c *AlipayOrderRollbackClient) Update() *AlipayOrderRollbackUpdate
- func (c *AlipayOrderRollbackClient) UpdateOne(_m *AlipayOrderRollback) *AlipayOrderRollbackUpdateOne
- func (c *AlipayOrderRollbackClient) UpdateOneID(id int) *AlipayOrderRollbackUpdateOne
- func (c *AlipayOrderRollbackClient) Use(hooks ...Hook)
- type AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) Exec(ctx context.Context) error
- func (_c *AlipayOrderRollbackCreate) ExecX(ctx context.Context)
- func (_c *AlipayOrderRollbackCreate) Mutation() *AlipayOrderRollbackMutation
- func (_c *AlipayOrderRollbackCreate) Save(ctx context.Context) (*AlipayOrderRollback, error)
- func (_c *AlipayOrderRollbackCreate) SaveX(ctx context.Context) *AlipayOrderRollback
- func (_c *AlipayOrderRollbackCreate) SetAppID(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetBody(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetBuyerID(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetBuyerPayAmount(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetCharset(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetCreateTime(v time.Time) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetFundBillList(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetGmtClose(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetGmtCreate(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetGmtPayment(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetInvoiceAmount(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetNotifyID(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetNotifyTime(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetNotifyType(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetOutBizNo(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetOutTradeNo(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetPassbackParams(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetPointAmount(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetReceiptAmount(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetRefundFee(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetSellerID(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetSign(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetSignType(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetSubject(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetTotalAmount(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetTradeNo(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetTradeStatus(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetUpdateTime(v time.Time) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetVersion(v string) *AlipayOrderRollbackCreate
- func (_c *AlipayOrderRollbackCreate) SetVoucherDetailList(v string) *AlipayOrderRollbackCreate
- type AlipayOrderRollbackCreateBulk
- func (_c *AlipayOrderRollbackCreateBulk) Exec(ctx context.Context) error
- func (_c *AlipayOrderRollbackCreateBulk) ExecX(ctx context.Context)
- func (_c *AlipayOrderRollbackCreateBulk) Save(ctx context.Context) ([]*AlipayOrderRollback, error)
- func (_c *AlipayOrderRollbackCreateBulk) SaveX(ctx context.Context) []*AlipayOrderRollback
- type AlipayOrderRollbackDelete
- type AlipayOrderRollbackDeleteOne
- type AlipayOrderRollbackGroupBy
- func (_g *AlipayOrderRollbackGroupBy) Aggregate(fns ...AggregateFunc) *AlipayOrderRollbackGroupBy
- func (s *AlipayOrderRollbackGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AlipayOrderRollbackGroupBy) BoolX(ctx context.Context) bool
- func (s *AlipayOrderRollbackGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AlipayOrderRollbackGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AlipayOrderRollbackGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AlipayOrderRollbackGroupBy) Float64X(ctx context.Context) float64
- func (s *AlipayOrderRollbackGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AlipayOrderRollbackGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AlipayOrderRollbackGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AlipayOrderRollbackGroupBy) IntX(ctx context.Context) int
- func (s *AlipayOrderRollbackGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AlipayOrderRollbackGroupBy) IntsX(ctx context.Context) []int
- func (_g *AlipayOrderRollbackGroupBy) Scan(ctx context.Context, v any) error
- func (s *AlipayOrderRollbackGroupBy) ScanX(ctx context.Context, v any)
- func (s *AlipayOrderRollbackGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AlipayOrderRollbackGroupBy) StringX(ctx context.Context) string
- func (s *AlipayOrderRollbackGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AlipayOrderRollbackGroupBy) StringsX(ctx context.Context) []string
- type AlipayOrderRollbackMutation
- func (m *AlipayOrderRollbackMutation) AddField(name string, value ent.Value) error
- func (m *AlipayOrderRollbackMutation) AddedEdges() []string
- func (m *AlipayOrderRollbackMutation) AddedField(name string) (ent.Value, bool)
- func (m *AlipayOrderRollbackMutation) AddedFields() []string
- func (m *AlipayOrderRollbackMutation) AddedIDs(name string) []ent.Value
- func (m *AlipayOrderRollbackMutation) AppID() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) Body() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) BuyerID() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) BuyerPayAmount() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) Charset() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) ClearEdge(name string) error
- func (m *AlipayOrderRollbackMutation) ClearField(name string) error
- func (m *AlipayOrderRollbackMutation) ClearedEdges() []string
- func (m *AlipayOrderRollbackMutation) ClearedFields() []string
- func (m AlipayOrderRollbackMutation) Client() *Client
- func (m *AlipayOrderRollbackMutation) CreateTime() (r time.Time, exists bool)
- func (m *AlipayOrderRollbackMutation) EdgeCleared(name string) bool
- func (m *AlipayOrderRollbackMutation) Field(name string) (ent.Value, bool)
- func (m *AlipayOrderRollbackMutation) FieldCleared(name string) bool
- func (m *AlipayOrderRollbackMutation) Fields() []string
- func (m *AlipayOrderRollbackMutation) FundBillList() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) GmtClose() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) GmtCreate() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) GmtPayment() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) ID() (id int, exists bool)
- func (m *AlipayOrderRollbackMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AlipayOrderRollbackMutation) InvoiceAmount() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) NotifyID() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) NotifyTime() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) NotifyType() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) OldAppID(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldBody(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldBuyerID(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldBuyerPayAmount(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldCharset(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *AlipayOrderRollbackMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AlipayOrderRollbackMutation) OldFundBillList(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldGmtClose(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldGmtCreate(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldGmtPayment(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldInvoiceAmount(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldNotifyID(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldNotifyTime(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldNotifyType(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldOutBizNo(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldOutTradeNo(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldPassbackParams(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldPointAmount(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldReceiptAmount(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldRefundFee(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldSellerID(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldSign(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldSignType(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldSubject(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldTotalAmount(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldTradeNo(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldTradeStatus(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *AlipayOrderRollbackMutation) OldVersion(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) OldVoucherDetailList(ctx context.Context) (v string, err error)
- func (m *AlipayOrderRollbackMutation) Op() Op
- func (m *AlipayOrderRollbackMutation) OutBizNo() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) OutTradeNo() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) PassbackParams() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) PointAmount() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) ReceiptAmount() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) RefundFee() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) RemovedEdges() []string
- func (m *AlipayOrderRollbackMutation) RemovedIDs(name string) []ent.Value
- func (m *AlipayOrderRollbackMutation) ResetAppID()
- func (m *AlipayOrderRollbackMutation) ResetBody()
- func (m *AlipayOrderRollbackMutation) ResetBuyerID()
- func (m *AlipayOrderRollbackMutation) ResetBuyerPayAmount()
- func (m *AlipayOrderRollbackMutation) ResetCharset()
- func (m *AlipayOrderRollbackMutation) ResetCreateTime()
- func (m *AlipayOrderRollbackMutation) ResetEdge(name string) error
- func (m *AlipayOrderRollbackMutation) ResetField(name string) error
- func (m *AlipayOrderRollbackMutation) ResetFundBillList()
- func (m *AlipayOrderRollbackMutation) ResetGmtClose()
- func (m *AlipayOrderRollbackMutation) ResetGmtCreate()
- func (m *AlipayOrderRollbackMutation) ResetGmtPayment()
- func (m *AlipayOrderRollbackMutation) ResetInvoiceAmount()
- func (m *AlipayOrderRollbackMutation) ResetNotifyID()
- func (m *AlipayOrderRollbackMutation) ResetNotifyTime()
- func (m *AlipayOrderRollbackMutation) ResetNotifyType()
- func (m *AlipayOrderRollbackMutation) ResetOutBizNo()
- func (m *AlipayOrderRollbackMutation) ResetOutTradeNo()
- func (m *AlipayOrderRollbackMutation) ResetPassbackParams()
- func (m *AlipayOrderRollbackMutation) ResetPointAmount()
- func (m *AlipayOrderRollbackMutation) ResetReceiptAmount()
- func (m *AlipayOrderRollbackMutation) ResetRefundFee()
- func (m *AlipayOrderRollbackMutation) ResetSellerID()
- func (m *AlipayOrderRollbackMutation) ResetSign()
- func (m *AlipayOrderRollbackMutation) ResetSignType()
- func (m *AlipayOrderRollbackMutation) ResetSubject()
- func (m *AlipayOrderRollbackMutation) ResetTotalAmount()
- func (m *AlipayOrderRollbackMutation) ResetTradeNo()
- func (m *AlipayOrderRollbackMutation) ResetTradeStatus()
- func (m *AlipayOrderRollbackMutation) ResetUpdateTime()
- func (m *AlipayOrderRollbackMutation) ResetVersion()
- func (m *AlipayOrderRollbackMutation) ResetVoucherDetailList()
- func (m *AlipayOrderRollbackMutation) SellerID() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) SetAppID(s string)
- func (m *AlipayOrderRollbackMutation) SetBody(s string)
- func (m *AlipayOrderRollbackMutation) SetBuyerID(s string)
- func (m *AlipayOrderRollbackMutation) SetBuyerPayAmount(s string)
- func (m *AlipayOrderRollbackMutation) SetCharset(s string)
- func (m *AlipayOrderRollbackMutation) SetCreateTime(t time.Time)
- func (m *AlipayOrderRollbackMutation) SetField(name string, value ent.Value) error
- func (m *AlipayOrderRollbackMutation) SetFundBillList(s string)
- func (m *AlipayOrderRollbackMutation) SetGmtClose(s string)
- func (m *AlipayOrderRollbackMutation) SetGmtCreate(s string)
- func (m *AlipayOrderRollbackMutation) SetGmtPayment(s string)
- func (m *AlipayOrderRollbackMutation) SetInvoiceAmount(s string)
- func (m *AlipayOrderRollbackMutation) SetNotifyID(s string)
- func (m *AlipayOrderRollbackMutation) SetNotifyTime(s string)
- func (m *AlipayOrderRollbackMutation) SetNotifyType(s string)
- func (m *AlipayOrderRollbackMutation) SetOp(op Op)
- func (m *AlipayOrderRollbackMutation) SetOutBizNo(s string)
- func (m *AlipayOrderRollbackMutation) SetOutTradeNo(s string)
- func (m *AlipayOrderRollbackMutation) SetPassbackParams(s string)
- func (m *AlipayOrderRollbackMutation) SetPointAmount(s string)
- func (m *AlipayOrderRollbackMutation) SetReceiptAmount(s string)
- func (m *AlipayOrderRollbackMutation) SetRefundFee(s string)
- func (m *AlipayOrderRollbackMutation) SetSellerID(s string)
- func (m *AlipayOrderRollbackMutation) SetSign(s string)
- func (m *AlipayOrderRollbackMutation) SetSignType(s string)
- func (m *AlipayOrderRollbackMutation) SetSubject(s string)
- func (m *AlipayOrderRollbackMutation) SetTotalAmount(s string)
- func (m *AlipayOrderRollbackMutation) SetTradeNo(s string)
- func (m *AlipayOrderRollbackMutation) SetTradeStatus(s string)
- func (m *AlipayOrderRollbackMutation) SetUpdateTime(t time.Time)
- func (m *AlipayOrderRollbackMutation) SetVersion(s string)
- func (m *AlipayOrderRollbackMutation) SetVoucherDetailList(s string)
- func (m *AlipayOrderRollbackMutation) Sign() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) SignType() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) Subject() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) TotalAmount() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) TradeNo() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) TradeStatus() (r string, exists bool)
- func (m AlipayOrderRollbackMutation) Tx() (*Tx, error)
- func (m *AlipayOrderRollbackMutation) Type() string
- func (m *AlipayOrderRollbackMutation) UpdateTime() (r time.Time, exists bool)
- func (m *AlipayOrderRollbackMutation) Version() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) VoucherDetailList() (r string, exists bool)
- func (m *AlipayOrderRollbackMutation) Where(ps ...predicate.AlipayOrderRollback)
- func (m *AlipayOrderRollbackMutation) WhereP(ps ...func(*sql.Selector))
- type AlipayOrderRollbackQuery
- func (_q *AlipayOrderRollbackQuery) Aggregate(fns ...AggregateFunc) *AlipayOrderRollbackSelect
- func (_q *AlipayOrderRollbackQuery) All(ctx context.Context) ([]*AlipayOrderRollback, error)
- func (_q *AlipayOrderRollbackQuery) AllX(ctx context.Context) []*AlipayOrderRollback
- func (_q *AlipayOrderRollbackQuery) Clone() *AlipayOrderRollbackQuery
- func (_q *AlipayOrderRollbackQuery) Count(ctx context.Context) (int, error)
- func (_q *AlipayOrderRollbackQuery) CountX(ctx context.Context) int
- func (_q *AlipayOrderRollbackQuery) Exist(ctx context.Context) (bool, error)
- func (_q *AlipayOrderRollbackQuery) ExistX(ctx context.Context) bool
- func (_q *AlipayOrderRollbackQuery) First(ctx context.Context) (*AlipayOrderRollback, error)
- func (_q *AlipayOrderRollbackQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *AlipayOrderRollbackQuery) FirstIDX(ctx context.Context) int
- func (_q *AlipayOrderRollbackQuery) FirstX(ctx context.Context) *AlipayOrderRollback
- func (_q *AlipayOrderRollbackQuery) GroupBy(field string, fields ...string) *AlipayOrderRollbackGroupBy
- func (_q *AlipayOrderRollbackQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *AlipayOrderRollbackQuery) IDsX(ctx context.Context) []int
- func (_q *AlipayOrderRollbackQuery) Limit(limit int) *AlipayOrderRollbackQuery
- func (_q *AlipayOrderRollbackQuery) Offset(offset int) *AlipayOrderRollbackQuery
- func (_q *AlipayOrderRollbackQuery) Only(ctx context.Context) (*AlipayOrderRollback, error)
- func (_q *AlipayOrderRollbackQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *AlipayOrderRollbackQuery) OnlyIDX(ctx context.Context) int
- func (_q *AlipayOrderRollbackQuery) OnlyX(ctx context.Context) *AlipayOrderRollback
- func (_q *AlipayOrderRollbackQuery) Order(o ...alipayorderrollback.OrderOption) *AlipayOrderRollbackQuery
- func (_q *AlipayOrderRollbackQuery) Select(fields ...string) *AlipayOrderRollbackSelect
- func (_q *AlipayOrderRollbackQuery) Unique(unique bool) *AlipayOrderRollbackQuery
- func (_q *AlipayOrderRollbackQuery) Where(ps ...predicate.AlipayOrderRollback) *AlipayOrderRollbackQuery
- type AlipayOrderRollbackSelect
- func (_s *AlipayOrderRollbackSelect) Aggregate(fns ...AggregateFunc) *AlipayOrderRollbackSelect
- func (s *AlipayOrderRollbackSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AlipayOrderRollbackSelect) BoolX(ctx context.Context) bool
- func (s *AlipayOrderRollbackSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AlipayOrderRollbackSelect) BoolsX(ctx context.Context) []bool
- func (s *AlipayOrderRollbackSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AlipayOrderRollbackSelect) Float64X(ctx context.Context) float64
- func (s *AlipayOrderRollbackSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AlipayOrderRollbackSelect) Float64sX(ctx context.Context) []float64
- func (s *AlipayOrderRollbackSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AlipayOrderRollbackSelect) IntX(ctx context.Context) int
- func (s *AlipayOrderRollbackSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AlipayOrderRollbackSelect) IntsX(ctx context.Context) []int
- func (_s *AlipayOrderRollbackSelect) Scan(ctx context.Context, v any) error
- func (s *AlipayOrderRollbackSelect) ScanX(ctx context.Context, v any)
- func (s *AlipayOrderRollbackSelect) String(ctx context.Context) (_ string, err error)
- func (s *AlipayOrderRollbackSelect) StringX(ctx context.Context) string
- func (s *AlipayOrderRollbackSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AlipayOrderRollbackSelect) StringsX(ctx context.Context) []string
- type AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) Exec(ctx context.Context) error
- func (_u *AlipayOrderRollbackUpdate) ExecX(ctx context.Context)
- func (_u *AlipayOrderRollbackUpdate) Mutation() *AlipayOrderRollbackMutation
- func (_u *AlipayOrderRollbackUpdate) Save(ctx context.Context) (int, error)
- func (_u *AlipayOrderRollbackUpdate) SaveX(ctx context.Context) int
- func (_u *AlipayOrderRollbackUpdate) SetAppID(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetBody(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetBuyerID(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetBuyerPayAmount(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetCharset(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetCreateTime(v time.Time) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetFundBillList(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetGmtClose(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetGmtCreate(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetGmtPayment(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetInvoiceAmount(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableAppID(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableBody(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableBuyerID(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableBuyerPayAmount(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableCharset(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableCreateTime(v *time.Time) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableFundBillList(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableGmtClose(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableGmtCreate(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableGmtPayment(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableInvoiceAmount(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableNotifyID(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableNotifyTime(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableNotifyType(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableOutBizNo(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableOutTradeNo(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillablePassbackParams(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillablePointAmount(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableReceiptAmount(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableRefundFee(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableSellerID(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableSign(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableSignType(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableSubject(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableTotalAmount(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableTradeNo(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableTradeStatus(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableUpdateTime(v *time.Time) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableVersion(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNillableVoucherDetailList(v *string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNotifyID(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNotifyTime(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetNotifyType(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetOutBizNo(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetOutTradeNo(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetPassbackParams(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetPointAmount(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetReceiptAmount(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetRefundFee(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetSellerID(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetSign(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetSignType(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetSubject(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetTotalAmount(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetTradeNo(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetTradeStatus(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetUpdateTime(v time.Time) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetVersion(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) SetVoucherDetailList(v string) *AlipayOrderRollbackUpdate
- func (_u *AlipayOrderRollbackUpdate) Where(ps ...predicate.AlipayOrderRollback) *AlipayOrderRollbackUpdate
- type AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) Exec(ctx context.Context) error
- func (_u *AlipayOrderRollbackUpdateOne) ExecX(ctx context.Context)
- func (_u *AlipayOrderRollbackUpdateOne) Mutation() *AlipayOrderRollbackMutation
- func (_u *AlipayOrderRollbackUpdateOne) Save(ctx context.Context) (*AlipayOrderRollback, error)
- func (_u *AlipayOrderRollbackUpdateOne) SaveX(ctx context.Context) *AlipayOrderRollback
- func (_u *AlipayOrderRollbackUpdateOne) Select(field string, fields ...string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetAppID(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetBody(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetBuyerID(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetBuyerPayAmount(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetCharset(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetCreateTime(v time.Time) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetFundBillList(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetGmtClose(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetGmtCreate(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetGmtPayment(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetInvoiceAmount(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableAppID(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableBody(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableBuyerID(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableBuyerPayAmount(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableCharset(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableCreateTime(v *time.Time) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableFundBillList(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableGmtClose(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableGmtCreate(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableGmtPayment(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableInvoiceAmount(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableNotifyID(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableNotifyTime(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableNotifyType(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableOutBizNo(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableOutTradeNo(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillablePassbackParams(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillablePointAmount(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableReceiptAmount(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableRefundFee(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableSellerID(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableSign(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableSignType(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableSubject(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableTotalAmount(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableTradeNo(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableTradeStatus(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableUpdateTime(v *time.Time) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableVersion(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNillableVoucherDetailList(v *string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNotifyID(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNotifyTime(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetNotifyType(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetOutBizNo(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetOutTradeNo(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetPassbackParams(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetPointAmount(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetReceiptAmount(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetRefundFee(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetSellerID(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetSign(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetSignType(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetSubject(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetTotalAmount(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetTradeNo(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetTradeStatus(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetUpdateTime(v time.Time) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetVersion(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) SetVoucherDetailList(v string) *AlipayOrderRollbackUpdateOne
- func (_u *AlipayOrderRollbackUpdateOne) Where(ps ...predicate.AlipayOrderRollback) *AlipayOrderRollbackUpdateOne
- type AlipayOrderRollbacks
- 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(_m *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) MapCreateBulk(slice any, setFunc func(*ComputeImageCreate, int)) *ComputeImageCreateBulk
- func (c *ComputeImageClient) Query() *ComputeImageQuery
- func (c *ComputeImageClient) Update() *ComputeImageUpdate
- func (c *ComputeImageClient) UpdateOne(_m *ComputeImage) *ComputeImageUpdateOne
- func (c *ComputeImageClient) UpdateOneID(id int32) *ComputeImageUpdateOne
- func (c *ComputeImageClient) Use(hooks ...Hook)
- type ComputeImageCreate
- func (_c *ComputeImageCreate) Exec(ctx context.Context) error
- func (_c *ComputeImageCreate) ExecX(ctx context.Context)
- func (_c *ComputeImageCreate) Mutation() *ComputeImageMutation
- func (_c *ComputeImageCreate) Save(ctx context.Context) (*ComputeImage, error)
- func (_c *ComputeImageCreate) SaveX(ctx context.Context) *ComputeImage
- func (_c *ComputeImageCreate) SetArch(v string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetBootType(v string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetDownloadURL(v string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetFilename(v string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetID(v int32) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetImage(v string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetMd5(v string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetName(v string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetNillableBootType(v *string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetOsType(v string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetOsVariant(v string) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetSort(v uint) *ComputeImageCreate
- func (_c *ComputeImageCreate) SetTag(v string) *ComputeImageCreate
- type ComputeImageCreateBulk
- type ComputeImageDelete
- type ComputeImageDeleteOne
- type ComputeImageGroupBy
- func (_g *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 (_g *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) AddSort(u int)
- 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) AddedSort() (r int, exists bool)
- func (m *ComputeImageMutation) Arch() (r string, exists bool)
- func (m *ComputeImageMutation) BootType() (r string, 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) DownloadURL() (r string, exists bool)
- 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) Filename() (r string, exists bool)
- 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) Md5() (r string, exists bool)
- func (m *ComputeImageMutation) Name() (r string, exists bool)
- func (m *ComputeImageMutation) OldArch(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldBootType(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldDownloadURL(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ComputeImageMutation) OldFilename(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldImage(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldMd5(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldOsType(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldOsVariant(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldSort(ctx context.Context) (v uint, err error)
- func (m *ComputeImageMutation) OldTag(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) Op() Op
- func (m *ComputeImageMutation) OsType() (r string, exists bool)
- func (m *ComputeImageMutation) OsVariant() (r string, exists bool)
- func (m *ComputeImageMutation) RemovedEdges() []string
- func (m *ComputeImageMutation) RemovedIDs(name string) []ent.Value
- func (m *ComputeImageMutation) ResetArch()
- func (m *ComputeImageMutation) ResetBootType()
- func (m *ComputeImageMutation) ResetDownloadURL()
- func (m *ComputeImageMutation) ResetEdge(name string) error
- func (m *ComputeImageMutation) ResetField(name string) error
- func (m *ComputeImageMutation) ResetFilename()
- func (m *ComputeImageMutation) ResetImage()
- func (m *ComputeImageMutation) ResetMd5()
- func (m *ComputeImageMutation) ResetName()
- func (m *ComputeImageMutation) ResetOsType()
- func (m *ComputeImageMutation) ResetOsVariant()
- func (m *ComputeImageMutation) ResetSort()
- func (m *ComputeImageMutation) ResetTag()
- func (m *ComputeImageMutation) SetArch(s string)
- func (m *ComputeImageMutation) SetBootType(s string)
- func (m *ComputeImageMutation) SetDownloadURL(s string)
- func (m *ComputeImageMutation) SetField(name string, value ent.Value) error
- func (m *ComputeImageMutation) SetFilename(s string)
- func (m *ComputeImageMutation) SetID(id int32)
- func (m *ComputeImageMutation) SetImage(s string)
- func (m *ComputeImageMutation) SetMd5(s string)
- func (m *ComputeImageMutation) SetName(s string)
- func (m *ComputeImageMutation) SetOp(op Op)
- func (m *ComputeImageMutation) SetOsType(s string)
- func (m *ComputeImageMutation) SetOsVariant(s string)
- func (m *ComputeImageMutation) SetSort(u uint)
- func (m *ComputeImageMutation) SetTag(s string)
- func (m *ComputeImageMutation) Sort() (r uint, exists bool)
- 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 (_q *ComputeImageQuery) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
- func (_q *ComputeImageQuery) All(ctx context.Context) ([]*ComputeImage, error)
- func (_q *ComputeImageQuery) AllX(ctx context.Context) []*ComputeImage
- func (_q *ComputeImageQuery) Clone() *ComputeImageQuery
- func (_q *ComputeImageQuery) Count(ctx context.Context) (int, error)
- func (_q *ComputeImageQuery) CountX(ctx context.Context) int
- func (_q *ComputeImageQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ComputeImageQuery) ExistX(ctx context.Context) bool
- func (_q *ComputeImageQuery) First(ctx context.Context) (*ComputeImage, error)
- func (_q *ComputeImageQuery) FirstID(ctx context.Context) (id int32, err error)
- func (_q *ComputeImageQuery) FirstIDX(ctx context.Context) int32
- func (_q *ComputeImageQuery) FirstX(ctx context.Context) *ComputeImage
- func (_q *ComputeImageQuery) GroupBy(field string, fields ...string) *ComputeImageGroupBy
- func (_q *ComputeImageQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (_q *ComputeImageQuery) IDsX(ctx context.Context) []int32
- func (_q *ComputeImageQuery) Limit(limit int) *ComputeImageQuery
- func (_q *ComputeImageQuery) Offset(offset int) *ComputeImageQuery
- func (_q *ComputeImageQuery) Only(ctx context.Context) (*ComputeImage, error)
- func (_q *ComputeImageQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (_q *ComputeImageQuery) OnlyIDX(ctx context.Context) int32
- func (_q *ComputeImageQuery) OnlyX(ctx context.Context) *ComputeImage
- func (_q *ComputeImageQuery) Order(o ...computeimage.OrderOption) *ComputeImageQuery
- func (_q *ComputeImageQuery) Select(fields ...string) *ComputeImageSelect
- func (_q *ComputeImageQuery) Unique(unique bool) *ComputeImageQuery
- func (_q *ComputeImageQuery) Where(ps ...predicate.ComputeImage) *ComputeImageQuery
- type ComputeImageSelect
- func (_s *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 (_s *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 (_u *ComputeImageUpdate) AddSort(v int) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) Exec(ctx context.Context) error
- func (_u *ComputeImageUpdate) ExecX(ctx context.Context)
- func (_u *ComputeImageUpdate) Mutation() *ComputeImageMutation
- func (_u *ComputeImageUpdate) Save(ctx context.Context) (int, error)
- func (_u *ComputeImageUpdate) SaveX(ctx context.Context) int
- func (_u *ComputeImageUpdate) SetArch(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetBootType(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetDownloadURL(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetFilename(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetImage(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetMd5(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetName(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableArch(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableBootType(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableDownloadURL(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableFilename(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableImage(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableMd5(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableName(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableOsType(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableOsVariant(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableSort(v *uint) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetNillableTag(v *string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetOsType(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetOsVariant(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetSort(v uint) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) SetTag(v string) *ComputeImageUpdate
- func (_u *ComputeImageUpdate) Where(ps ...predicate.ComputeImage) *ComputeImageUpdate
- type ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) AddSort(v int) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) Exec(ctx context.Context) error
- func (_u *ComputeImageUpdateOne) ExecX(ctx context.Context)
- func (_u *ComputeImageUpdateOne) Mutation() *ComputeImageMutation
- func (_u *ComputeImageUpdateOne) Save(ctx context.Context) (*ComputeImage, error)
- func (_u *ComputeImageUpdateOne) SaveX(ctx context.Context) *ComputeImage
- func (_u *ComputeImageUpdateOne) Select(field string, fields ...string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetArch(v string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetBootType(v string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetDownloadURL(v string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetFilename(v string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetImage(v string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetMd5(v string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetName(v string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableArch(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableBootType(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableDownloadURL(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableFilename(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableImage(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableMd5(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableName(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableOsType(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableOsVariant(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableSort(v *uint) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetNillableTag(v *string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetOsType(v string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetOsVariant(v string) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetSort(v uint) *ComputeImageUpdateOne
- func (_u *ComputeImageUpdateOne) SetTag(v string) *ComputeImageUpdateOne
- func (_u *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(_m *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) MapCreateBulk(slice any, setFunc func(*ComputeInstanceCreate, int)) *ComputeInstanceCreateBulk
- func (c *ComputeInstanceClient) Query() *ComputeInstanceQuery
- func (c *ComputeInstanceClient) Update() *ComputeInstanceUpdate
- func (c *ComputeInstanceClient) UpdateOne(_m *ComputeInstance) *ComputeInstanceUpdateOne
- func (c *ComputeInstanceClient) UpdateOneID(id uuid.UUID) *ComputeInstanceUpdateOne
- func (c *ComputeInstanceClient) Use(hooks ...Hook)
- type ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) Exec(ctx context.Context) error
- func (_c *ComputeInstanceCreate) ExecX(ctx context.Context)
- func (_c *ComputeInstanceCreate) Mutation() *ComputeInstanceMutation
- func (_c *ComputeInstanceCreate) Save(ctx context.Context) (*ComputeInstance, error)
- func (_c *ComputeInstanceCreate) SaveX(ctx context.Context) *ComputeInstance
- func (_c *ComputeInstanceCreate) SetAgentID(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetArch(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetBootType(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetContainerID(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetCore(v int) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetCreateTime(v time.Time) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetDockerCompose(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetExpirationTime(v time.Time) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetID(v uuid.UUID) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetImage(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetImageID(v int32) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetMemory(v int) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetName(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetNillableAgentID(v *string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetNillableBootType(v *string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetNillableContainerID(v *string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetNillableCreateTime(v *time.Time) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetNillableID(v *uuid.UUID) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetNillablePort(v *string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetOwner(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetPort(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetStatus(v compute.InstanceStatus) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetVncIP(v string) *ComputeInstanceCreate
- func (_c *ComputeInstanceCreate) SetVncPort(v int32) *ComputeInstanceCreate
- type ComputeInstanceCreateBulk
- func (_c *ComputeInstanceCreateBulk) Exec(ctx context.Context) error
- func (_c *ComputeInstanceCreateBulk) ExecX(ctx context.Context)
- func (_c *ComputeInstanceCreateBulk) Save(ctx context.Context) ([]*ComputeInstance, error)
- func (_c *ComputeInstanceCreateBulk) SaveX(ctx context.Context) []*ComputeInstance
- type ComputeInstanceDelete
- type ComputeInstanceDeleteOne
- type ComputeInstanceGroupBy
- func (_g *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 (_g *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) AddCore(i int)
- func (m *ComputeInstanceMutation) AddField(name string, value ent.Value) error
- func (m *ComputeInstanceMutation) AddImageID(i int32)
- func (m *ComputeInstanceMutation) AddMemory(i int)
- func (m *ComputeInstanceMutation) AddStatus(cs compute.InstanceStatus)
- func (m *ComputeInstanceMutation) AddVncPort(i int32)
- func (m *ComputeInstanceMutation) AddedCore() (r int, exists bool)
- 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) AddedImageID() (r int32, exists bool)
- func (m *ComputeInstanceMutation) AddedMemory() (r int, exists bool)
- func (m *ComputeInstanceMutation) AddedStatus() (r compute.InstanceStatus, exists bool)
- func (m *ComputeInstanceMutation) AddedVncPort() (r int32, exists bool)
- func (m *ComputeInstanceMutation) AgentID() (r string, exists bool)
- func (m *ComputeInstanceMutation) AgentIDCleared() bool
- func (m *ComputeInstanceMutation) Arch() (r string, exists bool)
- func (m *ComputeInstanceMutation) BootType() (r string, exists bool)
- func (m *ComputeInstanceMutation) ClearAgentID()
- func (m *ComputeInstanceMutation) ClearContainerID()
- func (m *ComputeInstanceMutation) ClearEdge(name string) error
- func (m *ComputeInstanceMutation) ClearField(name string) error
- func (m *ComputeInstanceMutation) ClearPort()
- 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 int, exists bool)
- func (m *ComputeInstanceMutation) CreateTime() (r time.Time, exists bool)
- func (m *ComputeInstanceMutation) DockerCompose() (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) ImageID() (r int32, exists bool)
- func (m *ComputeInstanceMutation) Memory() (r int, exists bool)
- func (m *ComputeInstanceMutation) Name() (r string, exists bool)
- func (m *ComputeInstanceMutation) OldAgentID(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldArch(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldBootType(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldContainerID(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldCore(ctx context.Context) (v int, err error)
- func (m *ComputeInstanceMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ComputeInstanceMutation) OldDockerCompose(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) OldImageID(ctx context.Context) (v int32, err error)
- func (m *ComputeInstanceMutation) OldMemory(ctx context.Context) (v int, 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) OldPort(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldStatus(ctx context.Context) (v compute.InstanceStatus, err error)
- func (m *ComputeInstanceMutation) OldVncIP(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldVncPort(ctx context.Context) (v int32, err error)
- func (m *ComputeInstanceMutation) Op() Op
- func (m *ComputeInstanceMutation) Owner() (r string, exists bool)
- func (m *ComputeInstanceMutation) Port() (r string, exists bool)
- func (m *ComputeInstanceMutation) PortCleared() bool
- func (m *ComputeInstanceMutation) RemovedEdges() []string
- func (m *ComputeInstanceMutation) RemovedIDs(name string) []ent.Value
- func (m *ComputeInstanceMutation) ResetAgentID()
- func (m *ComputeInstanceMutation) ResetArch()
- func (m *ComputeInstanceMutation) ResetBootType()
- func (m *ComputeInstanceMutation) ResetContainerID()
- func (m *ComputeInstanceMutation) ResetCore()
- func (m *ComputeInstanceMutation) ResetCreateTime()
- func (m *ComputeInstanceMutation) ResetDockerCompose()
- 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) ResetImageID()
- func (m *ComputeInstanceMutation) ResetMemory()
- func (m *ComputeInstanceMutation) ResetName()
- func (m *ComputeInstanceMutation) ResetOwner()
- func (m *ComputeInstanceMutation) ResetPort()
- func (m *ComputeInstanceMutation) ResetStatus()
- func (m *ComputeInstanceMutation) ResetVncIP()
- func (m *ComputeInstanceMutation) ResetVncPort()
- func (m *ComputeInstanceMutation) SetAgentID(s string)
- func (m *ComputeInstanceMutation) SetArch(s string)
- func (m *ComputeInstanceMutation) SetBootType(s string)
- func (m *ComputeInstanceMutation) SetContainerID(s string)
- func (m *ComputeInstanceMutation) SetCore(i int)
- func (m *ComputeInstanceMutation) SetCreateTime(t time.Time)
- func (m *ComputeInstanceMutation) SetDockerCompose(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) SetImageID(i int32)
- func (m *ComputeInstanceMutation) SetMemory(i int)
- func (m *ComputeInstanceMutation) SetName(s string)
- func (m *ComputeInstanceMutation) SetOp(op Op)
- func (m *ComputeInstanceMutation) SetOwner(s string)
- func (m *ComputeInstanceMutation) SetPort(s string)
- func (m *ComputeInstanceMutation) SetStatus(cs compute.InstanceStatus)
- func (m *ComputeInstanceMutation) SetVncIP(s string)
- func (m *ComputeInstanceMutation) SetVncPort(i int32)
- func (m *ComputeInstanceMutation) Status() (r compute.InstanceStatus, exists bool)
- func (m ComputeInstanceMutation) Tx() (*Tx, error)
- func (m *ComputeInstanceMutation) Type() string
- func (m *ComputeInstanceMutation) VncIP() (r string, exists bool)
- func (m *ComputeInstanceMutation) VncPort() (r int32, exists bool)
- func (m *ComputeInstanceMutation) Where(ps ...predicate.ComputeInstance)
- func (m *ComputeInstanceMutation) WhereP(ps ...func(*sql.Selector))
- type ComputeInstanceQuery
- func (_q *ComputeInstanceQuery) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
- func (_q *ComputeInstanceQuery) All(ctx context.Context) ([]*ComputeInstance, error)
- func (_q *ComputeInstanceQuery) AllX(ctx context.Context) []*ComputeInstance
- func (_q *ComputeInstanceQuery) Clone() *ComputeInstanceQuery
- func (_q *ComputeInstanceQuery) Count(ctx context.Context) (int, error)
- func (_q *ComputeInstanceQuery) CountX(ctx context.Context) int
- func (_q *ComputeInstanceQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ComputeInstanceQuery) ExistX(ctx context.Context) bool
- func (_q *ComputeInstanceQuery) First(ctx context.Context) (*ComputeInstance, error)
- func (_q *ComputeInstanceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ComputeInstanceQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *ComputeInstanceQuery) FirstX(ctx context.Context) *ComputeInstance
- func (_q *ComputeInstanceQuery) GroupBy(field string, fields ...string) *ComputeInstanceGroupBy
- func (_q *ComputeInstanceQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *ComputeInstanceQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *ComputeInstanceQuery) Limit(limit int) *ComputeInstanceQuery
- func (_q *ComputeInstanceQuery) Offset(offset int) *ComputeInstanceQuery
- func (_q *ComputeInstanceQuery) Only(ctx context.Context) (*ComputeInstance, error)
- func (_q *ComputeInstanceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ComputeInstanceQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *ComputeInstanceQuery) OnlyX(ctx context.Context) *ComputeInstance
- func (_q *ComputeInstanceQuery) Order(o ...computeinstance.OrderOption) *ComputeInstanceQuery
- func (_q *ComputeInstanceQuery) Select(fields ...string) *ComputeInstanceSelect
- func (_q *ComputeInstanceQuery) Unique(unique bool) *ComputeInstanceQuery
- func (_q *ComputeInstanceQuery) Where(ps ...predicate.ComputeInstance) *ComputeInstanceQuery
- type ComputeInstanceSelect
- func (_s *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 (_s *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 (_u *ComputeInstanceUpdate) AddCore(v int) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) AddImageID(v int32) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) AddMemory(v int) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) AddStatus(v compute.InstanceStatus) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) AddVncPort(v int32) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) ClearAgentID() *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) ClearContainerID() *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) ClearPort() *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) Exec(ctx context.Context) error
- func (_u *ComputeInstanceUpdate) ExecX(ctx context.Context)
- func (_u *ComputeInstanceUpdate) Mutation() *ComputeInstanceMutation
- func (_u *ComputeInstanceUpdate) Save(ctx context.Context) (int, error)
- func (_u *ComputeInstanceUpdate) SaveX(ctx context.Context) int
- func (_u *ComputeInstanceUpdate) SetAgentID(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetArch(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetBootType(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetContainerID(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetCore(v int) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetCreateTime(v time.Time) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetDockerCompose(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetExpirationTime(v time.Time) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetImage(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetImageID(v int32) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetMemory(v int) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetName(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableAgentID(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableArch(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableBootType(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableContainerID(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableCore(v *int) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableCreateTime(v *time.Time) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableDockerCompose(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableExpirationTime(v *time.Time) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableImage(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableImageID(v *int32) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableMemory(v *int) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableName(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableOwner(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillablePort(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableStatus(v *compute.InstanceStatus) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableVncIP(v *string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetNillableVncPort(v *int32) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetOwner(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetPort(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetStatus(v compute.InstanceStatus) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetVncIP(v string) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) SetVncPort(v int32) *ComputeInstanceUpdate
- func (_u *ComputeInstanceUpdate) Where(ps ...predicate.ComputeInstance) *ComputeInstanceUpdate
- type ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) AddCore(v int) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) AddImageID(v int32) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) AddMemory(v int) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) AddStatus(v compute.InstanceStatus) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) AddVncPort(v int32) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) ClearAgentID() *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) ClearContainerID() *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) ClearPort() *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) Exec(ctx context.Context) error
- func (_u *ComputeInstanceUpdateOne) ExecX(ctx context.Context)
- func (_u *ComputeInstanceUpdateOne) Mutation() *ComputeInstanceMutation
- func (_u *ComputeInstanceUpdateOne) Save(ctx context.Context) (*ComputeInstance, error)
- func (_u *ComputeInstanceUpdateOne) SaveX(ctx context.Context) *ComputeInstance
- func (_u *ComputeInstanceUpdateOne) Select(field string, fields ...string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetAgentID(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetArch(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetBootType(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetContainerID(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetCore(v int) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetCreateTime(v time.Time) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetDockerCompose(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetExpirationTime(v time.Time) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetImage(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetImageID(v int32) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetMemory(v int) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetName(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableAgentID(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableArch(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableBootType(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableContainerID(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableCore(v *int) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableCreateTime(v *time.Time) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableDockerCompose(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableExpirationTime(v *time.Time) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableImage(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableImageID(v *int32) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableMemory(v *int) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableName(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableOwner(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillablePort(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableStatus(v *compute.InstanceStatus) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableVncIP(v *string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetNillableVncPort(v *int32) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetOwner(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetPort(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetStatus(v compute.InstanceStatus) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetVncIP(v string) *ComputeInstanceUpdateOne
- func (_u *ComputeInstanceUpdateOne) SetVncPort(v int32) *ComputeInstanceUpdateOne
- func (_u *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(_m *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) MapCreateBulk(slice any, setFunc func(*ComputeSpecCreate, int)) *ComputeSpecCreateBulk
- func (c *ComputeSpecClient) Query() *ComputeSpecQuery
- func (c *ComputeSpecClient) Update() *ComputeSpecUpdate
- func (c *ComputeSpecClient) UpdateOne(_m *ComputeSpec) *ComputeSpecUpdateOne
- func (c *ComputeSpecClient) UpdateOneID(id int32) *ComputeSpecUpdateOne
- func (c *ComputeSpecClient) Use(hooks ...Hook)
- type ComputeSpecCreate
- func (_c *ComputeSpecCreate) Exec(ctx context.Context) error
- func (_c *ComputeSpecCreate) ExecX(ctx context.Context)
- func (_c *ComputeSpecCreate) Mutation() *ComputeSpecMutation
- func (_c *ComputeSpecCreate) Save(ctx context.Context) (*ComputeSpec, error)
- func (_c *ComputeSpecCreate) SaveX(ctx context.Context) *ComputeSpec
- func (_c *ComputeSpecCreate) SetCore(v int) *ComputeSpecCreate
- func (_c *ComputeSpecCreate) SetID(v int32) *ComputeSpecCreate
- func (_c *ComputeSpecCreate) SetMemory(v int) *ComputeSpecCreate
- type ComputeSpecCreateBulk
- type ComputeSpecDelete
- type ComputeSpecDeleteOne
- type ComputeSpecGroupBy
- func (_g *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 (_g *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) AddCore(i int)
- func (m *ComputeSpecMutation) AddField(name string, value ent.Value) error
- func (m *ComputeSpecMutation) AddMemory(i int)
- func (m *ComputeSpecMutation) AddedCore() (r int, exists bool)
- 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) AddedMemory() (r int, exists bool)
- 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 int, 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 int, exists bool)
- func (m *ComputeSpecMutation) OldCore(ctx context.Context) (v int, err error)
- func (m *ComputeSpecMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ComputeSpecMutation) OldMemory(ctx context.Context) (v int, 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(i int)
- func (m *ComputeSpecMutation) SetField(name string, value ent.Value) error
- func (m *ComputeSpecMutation) SetID(id int32)
- func (m *ComputeSpecMutation) SetMemory(i int)
- 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 ComputeSpecPrice
- type ComputeSpecPriceClient
- func (c *ComputeSpecPriceClient) Create() *ComputeSpecPriceCreate
- func (c *ComputeSpecPriceClient) CreateBulk(builders ...*ComputeSpecPriceCreate) *ComputeSpecPriceCreateBulk
- func (c *ComputeSpecPriceClient) Delete() *ComputeSpecPriceDelete
- func (c *ComputeSpecPriceClient) DeleteOne(_m *ComputeSpecPrice) *ComputeSpecPriceDeleteOne
- func (c *ComputeSpecPriceClient) DeleteOneID(id int32) *ComputeSpecPriceDeleteOne
- func (c *ComputeSpecPriceClient) Get(ctx context.Context, id int32) (*ComputeSpecPrice, error)
- func (c *ComputeSpecPriceClient) GetX(ctx context.Context, id int32) *ComputeSpecPrice
- func (c *ComputeSpecPriceClient) Hooks() []Hook
- func (c *ComputeSpecPriceClient) Intercept(interceptors ...Interceptor)
- func (c *ComputeSpecPriceClient) Interceptors() []Interceptor
- func (c *ComputeSpecPriceClient) MapCreateBulk(slice any, setFunc func(*ComputeSpecPriceCreate, int)) *ComputeSpecPriceCreateBulk
- func (c *ComputeSpecPriceClient) Query() *ComputeSpecPriceQuery
- func (c *ComputeSpecPriceClient) Update() *ComputeSpecPriceUpdate
- func (c *ComputeSpecPriceClient) UpdateOne(_m *ComputeSpecPrice) *ComputeSpecPriceUpdateOne
- func (c *ComputeSpecPriceClient) UpdateOneID(id int32) *ComputeSpecPriceUpdateOne
- func (c *ComputeSpecPriceClient) Use(hooks ...Hook)
- type ComputeSpecPriceCreate
- func (_c *ComputeSpecPriceCreate) Exec(ctx context.Context) error
- func (_c *ComputeSpecPriceCreate) ExecX(ctx context.Context)
- func (_c *ComputeSpecPriceCreate) Mutation() *ComputeSpecPriceMutation
- func (_c *ComputeSpecPriceCreate) Save(ctx context.Context) (*ComputeSpecPrice, error)
- func (_c *ComputeSpecPriceCreate) SaveX(ctx context.Context) *ComputeSpecPrice
- func (_c *ComputeSpecPriceCreate) SetDay(v int32) *ComputeSpecPriceCreate
- func (_c *ComputeSpecPriceCreate) SetFkComputeSpecID(v int32) *ComputeSpecPriceCreate
- func (_c *ComputeSpecPriceCreate) SetID(v int32) *ComputeSpecPriceCreate
- func (_c *ComputeSpecPriceCreate) SetNillableDay(v *int32) *ComputeSpecPriceCreate
- func (_c *ComputeSpecPriceCreate) SetNillablePrice(v *float32) *ComputeSpecPriceCreate
- func (_c *ComputeSpecPriceCreate) SetPrice(v float32) *ComputeSpecPriceCreate
- type ComputeSpecPriceCreateBulk
- func (_c *ComputeSpecPriceCreateBulk) Exec(ctx context.Context) error
- func (_c *ComputeSpecPriceCreateBulk) ExecX(ctx context.Context)
- func (_c *ComputeSpecPriceCreateBulk) Save(ctx context.Context) ([]*ComputeSpecPrice, error)
- func (_c *ComputeSpecPriceCreateBulk) SaveX(ctx context.Context) []*ComputeSpecPrice
- type ComputeSpecPriceDelete
- type ComputeSpecPriceDeleteOne
- type ComputeSpecPriceGroupBy
- func (_g *ComputeSpecPriceGroupBy) Aggregate(fns ...AggregateFunc) *ComputeSpecPriceGroupBy
- func (s *ComputeSpecPriceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeSpecPriceGroupBy) BoolX(ctx context.Context) bool
- func (s *ComputeSpecPriceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeSpecPriceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ComputeSpecPriceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeSpecPriceGroupBy) Float64X(ctx context.Context) float64
- func (s *ComputeSpecPriceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeSpecPriceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ComputeSpecPriceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeSpecPriceGroupBy) IntX(ctx context.Context) int
- func (s *ComputeSpecPriceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeSpecPriceGroupBy) IntsX(ctx context.Context) []int
- func (_g *ComputeSpecPriceGroupBy) Scan(ctx context.Context, v any) error
- func (s *ComputeSpecPriceGroupBy) ScanX(ctx context.Context, v any)
- func (s *ComputeSpecPriceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ComputeSpecPriceGroupBy) StringX(ctx context.Context) string
- func (s *ComputeSpecPriceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeSpecPriceGroupBy) StringsX(ctx context.Context) []string
- type ComputeSpecPriceMutation
- func (m *ComputeSpecPriceMutation) AddDay(i int32)
- func (m *ComputeSpecPriceMutation) AddField(name string, value ent.Value) error
- func (m *ComputeSpecPriceMutation) AddFkComputeSpecID(i int32)
- func (m *ComputeSpecPriceMutation) AddPrice(f float32)
- func (m *ComputeSpecPriceMutation) AddedDay() (r int32, exists bool)
- func (m *ComputeSpecPriceMutation) AddedEdges() []string
- func (m *ComputeSpecPriceMutation) AddedField(name string) (ent.Value, bool)
- func (m *ComputeSpecPriceMutation) AddedFields() []string
- func (m *ComputeSpecPriceMutation) AddedFkComputeSpecID() (r int32, exists bool)
- func (m *ComputeSpecPriceMutation) AddedIDs(name string) []ent.Value
- func (m *ComputeSpecPriceMutation) AddedPrice() (r float32, exists bool)
- func (m *ComputeSpecPriceMutation) ClearEdge(name string) error
- func (m *ComputeSpecPriceMutation) ClearField(name string) error
- func (m *ComputeSpecPriceMutation) ClearedEdges() []string
- func (m *ComputeSpecPriceMutation) ClearedFields() []string
- func (m ComputeSpecPriceMutation) Client() *Client
- func (m *ComputeSpecPriceMutation) Day() (r int32, exists bool)
- func (m *ComputeSpecPriceMutation) EdgeCleared(name string) bool
- func (m *ComputeSpecPriceMutation) Field(name string) (ent.Value, bool)
- func (m *ComputeSpecPriceMutation) FieldCleared(name string) bool
- func (m *ComputeSpecPriceMutation) Fields() []string
- func (m *ComputeSpecPriceMutation) FkComputeSpecID() (r int32, exists bool)
- func (m *ComputeSpecPriceMutation) ID() (id int32, exists bool)
- func (m *ComputeSpecPriceMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *ComputeSpecPriceMutation) OldDay(ctx context.Context) (v int32, err error)
- func (m *ComputeSpecPriceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ComputeSpecPriceMutation) OldFkComputeSpecID(ctx context.Context) (v int32, err error)
- func (m *ComputeSpecPriceMutation) OldPrice(ctx context.Context) (v float32, err error)
- func (m *ComputeSpecPriceMutation) Op() Op
- func (m *ComputeSpecPriceMutation) Price() (r float32, exists bool)
- func (m *ComputeSpecPriceMutation) RemovedEdges() []string
- func (m *ComputeSpecPriceMutation) RemovedIDs(name string) []ent.Value
- func (m *ComputeSpecPriceMutation) ResetDay()
- func (m *ComputeSpecPriceMutation) ResetEdge(name string) error
- func (m *ComputeSpecPriceMutation) ResetField(name string) error
- func (m *ComputeSpecPriceMutation) ResetFkComputeSpecID()
- func (m *ComputeSpecPriceMutation) ResetPrice()
- func (m *ComputeSpecPriceMutation) SetDay(i int32)
- func (m *ComputeSpecPriceMutation) SetField(name string, value ent.Value) error
- func (m *ComputeSpecPriceMutation) SetFkComputeSpecID(i int32)
- func (m *ComputeSpecPriceMutation) SetID(id int32)
- func (m *ComputeSpecPriceMutation) SetOp(op Op)
- func (m *ComputeSpecPriceMutation) SetPrice(f float32)
- func (m ComputeSpecPriceMutation) Tx() (*Tx, error)
- func (m *ComputeSpecPriceMutation) Type() string
- func (m *ComputeSpecPriceMutation) Where(ps ...predicate.ComputeSpecPrice)
- func (m *ComputeSpecPriceMutation) WhereP(ps ...func(*sql.Selector))
- type ComputeSpecPriceQuery
- func (_q *ComputeSpecPriceQuery) Aggregate(fns ...AggregateFunc) *ComputeSpecPriceSelect
- func (_q *ComputeSpecPriceQuery) All(ctx context.Context) ([]*ComputeSpecPrice, error)
- func (_q *ComputeSpecPriceQuery) AllX(ctx context.Context) []*ComputeSpecPrice
- func (_q *ComputeSpecPriceQuery) Clone() *ComputeSpecPriceQuery
- func (_q *ComputeSpecPriceQuery) Count(ctx context.Context) (int, error)
- func (_q *ComputeSpecPriceQuery) CountX(ctx context.Context) int
- func (_q *ComputeSpecPriceQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ComputeSpecPriceQuery) ExistX(ctx context.Context) bool
- func (_q *ComputeSpecPriceQuery) First(ctx context.Context) (*ComputeSpecPrice, error)
- func (_q *ComputeSpecPriceQuery) FirstID(ctx context.Context) (id int32, err error)
- func (_q *ComputeSpecPriceQuery) FirstIDX(ctx context.Context) int32
- func (_q *ComputeSpecPriceQuery) FirstX(ctx context.Context) *ComputeSpecPrice
- func (_q *ComputeSpecPriceQuery) GroupBy(field string, fields ...string) *ComputeSpecPriceGroupBy
- func (_q *ComputeSpecPriceQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (_q *ComputeSpecPriceQuery) IDsX(ctx context.Context) []int32
- func (_q *ComputeSpecPriceQuery) Limit(limit int) *ComputeSpecPriceQuery
- func (_q *ComputeSpecPriceQuery) Offset(offset int) *ComputeSpecPriceQuery
- func (_q *ComputeSpecPriceQuery) Only(ctx context.Context) (*ComputeSpecPrice, error)
- func (_q *ComputeSpecPriceQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (_q *ComputeSpecPriceQuery) OnlyIDX(ctx context.Context) int32
- func (_q *ComputeSpecPriceQuery) OnlyX(ctx context.Context) *ComputeSpecPrice
- func (_q *ComputeSpecPriceQuery) Order(o ...computespecprice.OrderOption) *ComputeSpecPriceQuery
- func (_q *ComputeSpecPriceQuery) Select(fields ...string) *ComputeSpecPriceSelect
- func (_q *ComputeSpecPriceQuery) Unique(unique bool) *ComputeSpecPriceQuery
- func (_q *ComputeSpecPriceQuery) Where(ps ...predicate.ComputeSpecPrice) *ComputeSpecPriceQuery
- type ComputeSpecPriceSelect
- func (_s *ComputeSpecPriceSelect) Aggregate(fns ...AggregateFunc) *ComputeSpecPriceSelect
- func (s *ComputeSpecPriceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeSpecPriceSelect) BoolX(ctx context.Context) bool
- func (s *ComputeSpecPriceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeSpecPriceSelect) BoolsX(ctx context.Context) []bool
- func (s *ComputeSpecPriceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeSpecPriceSelect) Float64X(ctx context.Context) float64
- func (s *ComputeSpecPriceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeSpecPriceSelect) Float64sX(ctx context.Context) []float64
- func (s *ComputeSpecPriceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeSpecPriceSelect) IntX(ctx context.Context) int
- func (s *ComputeSpecPriceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeSpecPriceSelect) IntsX(ctx context.Context) []int
- func (_s *ComputeSpecPriceSelect) Scan(ctx context.Context, v any) error
- func (s *ComputeSpecPriceSelect) ScanX(ctx context.Context, v any)
- func (s *ComputeSpecPriceSelect) String(ctx context.Context) (_ string, err error)
- func (s *ComputeSpecPriceSelect) StringX(ctx context.Context) string
- func (s *ComputeSpecPriceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeSpecPriceSelect) StringsX(ctx context.Context) []string
- type ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) AddDay(v int32) *ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) AddFkComputeSpecID(v int32) *ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) AddPrice(v float32) *ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) Exec(ctx context.Context) error
- func (_u *ComputeSpecPriceUpdate) ExecX(ctx context.Context)
- func (_u *ComputeSpecPriceUpdate) Mutation() *ComputeSpecPriceMutation
- func (_u *ComputeSpecPriceUpdate) Save(ctx context.Context) (int, error)
- func (_u *ComputeSpecPriceUpdate) SaveX(ctx context.Context) int
- func (_u *ComputeSpecPriceUpdate) SetDay(v int32) *ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) SetFkComputeSpecID(v int32) *ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) SetNillableDay(v *int32) *ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) SetNillableFkComputeSpecID(v *int32) *ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) SetNillablePrice(v *float32) *ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) SetPrice(v float32) *ComputeSpecPriceUpdate
- func (_u *ComputeSpecPriceUpdate) Where(ps ...predicate.ComputeSpecPrice) *ComputeSpecPriceUpdate
- type ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) AddDay(v int32) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) AddFkComputeSpecID(v int32) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) AddPrice(v float32) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) Exec(ctx context.Context) error
- func (_u *ComputeSpecPriceUpdateOne) ExecX(ctx context.Context)
- func (_u *ComputeSpecPriceUpdateOne) Mutation() *ComputeSpecPriceMutation
- func (_u *ComputeSpecPriceUpdateOne) Save(ctx context.Context) (*ComputeSpecPrice, error)
- func (_u *ComputeSpecPriceUpdateOne) SaveX(ctx context.Context) *ComputeSpecPrice
- func (_u *ComputeSpecPriceUpdateOne) Select(field string, fields ...string) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) SetDay(v int32) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) SetFkComputeSpecID(v int32) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) SetNillableDay(v *int32) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) SetNillableFkComputeSpecID(v *int32) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) SetNillablePrice(v *float32) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) SetPrice(v float32) *ComputeSpecPriceUpdateOne
- func (_u *ComputeSpecPriceUpdateOne) Where(ps ...predicate.ComputeSpecPrice) *ComputeSpecPriceUpdateOne
- type ComputeSpecPrices
- type ComputeSpecQuery
- func (_q *ComputeSpecQuery) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
- func (_q *ComputeSpecQuery) All(ctx context.Context) ([]*ComputeSpec, error)
- func (_q *ComputeSpecQuery) AllX(ctx context.Context) []*ComputeSpec
- func (_q *ComputeSpecQuery) Clone() *ComputeSpecQuery
- func (_q *ComputeSpecQuery) Count(ctx context.Context) (int, error)
- func (_q *ComputeSpecQuery) CountX(ctx context.Context) int
- func (_q *ComputeSpecQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ComputeSpecQuery) ExistX(ctx context.Context) bool
- func (_q *ComputeSpecQuery) First(ctx context.Context) (*ComputeSpec, error)
- func (_q *ComputeSpecQuery) FirstID(ctx context.Context) (id int32, err error)
- func (_q *ComputeSpecQuery) FirstIDX(ctx context.Context) int32
- func (_q *ComputeSpecQuery) FirstX(ctx context.Context) *ComputeSpec
- func (_q *ComputeSpecQuery) GroupBy(field string, fields ...string) *ComputeSpecGroupBy
- func (_q *ComputeSpecQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (_q *ComputeSpecQuery) IDsX(ctx context.Context) []int32
- func (_q *ComputeSpecQuery) Limit(limit int) *ComputeSpecQuery
- func (_q *ComputeSpecQuery) Offset(offset int) *ComputeSpecQuery
- func (_q *ComputeSpecQuery) Only(ctx context.Context) (*ComputeSpec, error)
- func (_q *ComputeSpecQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (_q *ComputeSpecQuery) OnlyIDX(ctx context.Context) int32
- func (_q *ComputeSpecQuery) OnlyX(ctx context.Context) *ComputeSpec
- func (_q *ComputeSpecQuery) Order(o ...computespec.OrderOption) *ComputeSpecQuery
- func (_q *ComputeSpecQuery) Select(fields ...string) *ComputeSpecSelect
- func (_q *ComputeSpecQuery) Unique(unique bool) *ComputeSpecQuery
- func (_q *ComputeSpecQuery) Where(ps ...predicate.ComputeSpec) *ComputeSpecQuery
- type ComputeSpecSelect
- func (_s *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 (_s *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 (_u *ComputeSpecUpdate) AddCore(v int) *ComputeSpecUpdate
- func (_u *ComputeSpecUpdate) AddMemory(v int) *ComputeSpecUpdate
- func (_u *ComputeSpecUpdate) Exec(ctx context.Context) error
- func (_u *ComputeSpecUpdate) ExecX(ctx context.Context)
- func (_u *ComputeSpecUpdate) Mutation() *ComputeSpecMutation
- func (_u *ComputeSpecUpdate) Save(ctx context.Context) (int, error)
- func (_u *ComputeSpecUpdate) SaveX(ctx context.Context) int
- func (_u *ComputeSpecUpdate) SetCore(v int) *ComputeSpecUpdate
- func (_u *ComputeSpecUpdate) SetMemory(v int) *ComputeSpecUpdate
- func (_u *ComputeSpecUpdate) SetNillableCore(v *int) *ComputeSpecUpdate
- func (_u *ComputeSpecUpdate) SetNillableMemory(v *int) *ComputeSpecUpdate
- func (_u *ComputeSpecUpdate) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdate
- type ComputeSpecUpdateOne
- func (_u *ComputeSpecUpdateOne) AddCore(v int) *ComputeSpecUpdateOne
- func (_u *ComputeSpecUpdateOne) AddMemory(v int) *ComputeSpecUpdateOne
- func (_u *ComputeSpecUpdateOne) Exec(ctx context.Context) error
- func (_u *ComputeSpecUpdateOne) ExecX(ctx context.Context)
- func (_u *ComputeSpecUpdateOne) Mutation() *ComputeSpecMutation
- func (_u *ComputeSpecUpdateOne) Save(ctx context.Context) (*ComputeSpec, error)
- func (_u *ComputeSpecUpdateOne) SaveX(ctx context.Context) *ComputeSpec
- func (_u *ComputeSpecUpdateOne) Select(field string, fields ...string) *ComputeSpecUpdateOne
- func (_u *ComputeSpecUpdateOne) SetCore(v int) *ComputeSpecUpdateOne
- func (_u *ComputeSpecUpdateOne) SetMemory(v int) *ComputeSpecUpdateOne
- func (_u *ComputeSpecUpdateOne) SetNillableCore(v *int) *ComputeSpecUpdateOne
- func (_u *ComputeSpecUpdateOne) SetNillableMemory(v *int) *ComputeSpecUpdateOne
- func (_u *ComputeSpecUpdateOne) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdateOne
- type ComputeSpecs
- type ConstraintError
- type Cycle
- type CycleClient
- func (c *CycleClient) Create() *CycleCreate
- func (c *CycleClient) CreateBulk(builders ...*CycleCreate) *CycleCreateBulk
- func (c *CycleClient) Delete() *CycleDelete
- func (c *CycleClient) DeleteOne(_m *Cycle) *CycleDeleteOne
- func (c *CycleClient) DeleteOneID(id uuid.UUID) *CycleDeleteOne
- func (c *CycleClient) Get(ctx context.Context, id uuid.UUID) (*Cycle, error)
- func (c *CycleClient) GetX(ctx context.Context, id uuid.UUID) *Cycle
- func (c *CycleClient) Hooks() []Hook
- func (c *CycleClient) Intercept(interceptors ...Interceptor)
- func (c *CycleClient) Interceptors() []Interceptor
- func (c *CycleClient) MapCreateBulk(slice any, setFunc func(*CycleCreate, int)) *CycleCreateBulk
- func (c *CycleClient) Query() *CycleQuery
- func (c *CycleClient) Update() *CycleUpdate
- func (c *CycleClient) UpdateOne(_m *Cycle) *CycleUpdateOne
- func (c *CycleClient) UpdateOneID(id uuid.UUID) *CycleUpdateOne
- func (c *CycleClient) Use(hooks ...Hook)
- type CycleCreate
- func (_c *CycleCreate) Exec(ctx context.Context) error
- func (_c *CycleCreate) ExecX(ctx context.Context)
- func (_c *CycleCreate) Mutation() *CycleMutation
- func (_c *CycleCreate) Save(ctx context.Context) (*Cycle, error)
- func (_c *CycleCreate) SaveX(ctx context.Context) *Cycle
- func (_c *CycleCreate) SetCreateTime(v time.Time) *CycleCreate
- func (_c *CycleCreate) SetCycle(v float64) *CycleCreate
- func (_c *CycleCreate) SetFkUserID(v uuid.UUID) *CycleCreate
- func (_c *CycleCreate) SetID(v uuid.UUID) *CycleCreate
- func (_c *CycleCreate) SetNillableID(v *uuid.UUID) *CycleCreate
- func (_c *CycleCreate) SetUpdateTime(v time.Time) *CycleCreate
- type CycleCreateBulk
- type CycleDelete
- type CycleDeleteOne
- type CycleGroupBy
- func (_g *CycleGroupBy) Aggregate(fns ...AggregateFunc) *CycleGroupBy
- func (s *CycleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleGroupBy) BoolX(ctx context.Context) bool
- func (s *CycleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CycleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleGroupBy) Float64X(ctx context.Context) float64
- func (s *CycleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CycleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CycleGroupBy) IntX(ctx context.Context) int
- func (s *CycleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CycleGroupBy) IntsX(ctx context.Context) []int
- func (_g *CycleGroupBy) Scan(ctx context.Context, v any) error
- func (s *CycleGroupBy) ScanX(ctx context.Context, v any)
- func (s *CycleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CycleGroupBy) StringX(ctx context.Context) string
- func (s *CycleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CycleGroupBy) StringsX(ctx context.Context) []string
- type CycleMutation
- func (m *CycleMutation) AddCycle(f float64)
- func (m *CycleMutation) AddField(name string, value ent.Value) error
- func (m *CycleMutation) AddedCycle() (r float64, exists bool)
- func (m *CycleMutation) AddedEdges() []string
- func (m *CycleMutation) AddedField(name string) (ent.Value, bool)
- func (m *CycleMutation) AddedFields() []string
- func (m *CycleMutation) AddedIDs(name string) []ent.Value
- func (m *CycleMutation) ClearEdge(name string) error
- func (m *CycleMutation) ClearField(name string) error
- func (m *CycleMutation) ClearedEdges() []string
- func (m *CycleMutation) ClearedFields() []string
- func (m CycleMutation) Client() *Client
- func (m *CycleMutation) CreateTime() (r time.Time, exists bool)
- func (m *CycleMutation) Cycle() (r float64, exists bool)
- func (m *CycleMutation) EdgeCleared(name string) bool
- func (m *CycleMutation) Field(name string) (ent.Value, bool)
- func (m *CycleMutation) FieldCleared(name string) bool
- func (m *CycleMutation) Fields() []string
- func (m *CycleMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *CycleMutation) ID() (id uuid.UUID, exists bool)
- func (m *CycleMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CycleMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *CycleMutation) OldCycle(ctx context.Context) (v float64, err error)
- func (m *CycleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CycleMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *CycleMutation) Op() Op
- func (m *CycleMutation) RemovedEdges() []string
- func (m *CycleMutation) RemovedIDs(name string) []ent.Value
- func (m *CycleMutation) ResetCreateTime()
- func (m *CycleMutation) ResetCycle()
- func (m *CycleMutation) ResetEdge(name string) error
- func (m *CycleMutation) ResetField(name string) error
- func (m *CycleMutation) ResetFkUserID()
- func (m *CycleMutation) ResetUpdateTime()
- func (m *CycleMutation) SetCreateTime(t time.Time)
- func (m *CycleMutation) SetCycle(f float64)
- func (m *CycleMutation) SetField(name string, value ent.Value) error
- func (m *CycleMutation) SetFkUserID(u uuid.UUID)
- func (m *CycleMutation) SetID(id uuid.UUID)
- func (m *CycleMutation) SetOp(op Op)
- func (m *CycleMutation) SetUpdateTime(t time.Time)
- func (m CycleMutation) Tx() (*Tx, error)
- func (m *CycleMutation) Type() string
- func (m *CycleMutation) UpdateTime() (r time.Time, exists bool)
- func (m *CycleMutation) Where(ps ...predicate.Cycle)
- func (m *CycleMutation) WhereP(ps ...func(*sql.Selector))
- type CycleOrder
- type CycleOrderClient
- func (c *CycleOrderClient) Create() *CycleOrderCreate
- func (c *CycleOrderClient) CreateBulk(builders ...*CycleOrderCreate) *CycleOrderCreateBulk
- func (c *CycleOrderClient) Delete() *CycleOrderDelete
- func (c *CycleOrderClient) DeleteOne(_m *CycleOrder) *CycleOrderDeleteOne
- func (c *CycleOrderClient) DeleteOneID(id uuid.UUID) *CycleOrderDeleteOne
- func (c *CycleOrderClient) Get(ctx context.Context, id uuid.UUID) (*CycleOrder, error)
- func (c *CycleOrderClient) GetX(ctx context.Context, id uuid.UUID) *CycleOrder
- func (c *CycleOrderClient) Hooks() []Hook
- func (c *CycleOrderClient) Intercept(interceptors ...Interceptor)
- func (c *CycleOrderClient) Interceptors() []Interceptor
- func (c *CycleOrderClient) MapCreateBulk(slice any, setFunc func(*CycleOrderCreate, int)) *CycleOrderCreateBulk
- func (c *CycleOrderClient) Query() *CycleOrderQuery
- func (c *CycleOrderClient) Update() *CycleOrderUpdate
- func (c *CycleOrderClient) UpdateOne(_m *CycleOrder) *CycleOrderUpdateOne
- func (c *CycleOrderClient) UpdateOneID(id uuid.UUID) *CycleOrderUpdateOne
- func (c *CycleOrderClient) Use(hooks ...Hook)
- type CycleOrderCreate
- func (_c *CycleOrderCreate) Exec(ctx context.Context) error
- func (_c *CycleOrderCreate) ExecX(ctx context.Context)
- func (_c *CycleOrderCreate) Mutation() *CycleOrderMutation
- func (_c *CycleOrderCreate) Save(ctx context.Context) (*CycleOrder, error)
- func (_c *CycleOrderCreate) SaveX(ctx context.Context) *CycleOrder
- func (_c *CycleOrderCreate) SetCreateTime(v time.Time) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetCycle(v float64) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetFkUserID(v uuid.UUID) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetID(v uuid.UUID) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetNillableID(v *uuid.UUID) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetNillableResourceID(v *string) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetOrderNo(v string) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetProductDesc(v string) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetProductName(v string) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetResourceID(v string) *CycleOrderCreate
- func (_c *CycleOrderCreate) SetSymbol(v string) *CycleOrderCreate
- type CycleOrderCreateBulk
- type CycleOrderDelete
- type CycleOrderDeleteOne
- type CycleOrderGroupBy
- func (_g *CycleOrderGroupBy) Aggregate(fns ...AggregateFunc) *CycleOrderGroupBy
- func (s *CycleOrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleOrderGroupBy) BoolX(ctx context.Context) bool
- func (s *CycleOrderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleOrderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CycleOrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleOrderGroupBy) Float64X(ctx context.Context) float64
- func (s *CycleOrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleOrderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CycleOrderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CycleOrderGroupBy) IntX(ctx context.Context) int
- func (s *CycleOrderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CycleOrderGroupBy) IntsX(ctx context.Context) []int
- func (_g *CycleOrderGroupBy) Scan(ctx context.Context, v any) error
- func (s *CycleOrderGroupBy) ScanX(ctx context.Context, v any)
- func (s *CycleOrderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CycleOrderGroupBy) StringX(ctx context.Context) string
- func (s *CycleOrderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CycleOrderGroupBy) StringsX(ctx context.Context) []string
- type CycleOrderMutation
- func (m *CycleOrderMutation) AddCycle(f float64)
- func (m *CycleOrderMutation) AddField(name string, value ent.Value) error
- func (m *CycleOrderMutation) AddedCycle() (r float64, exists bool)
- func (m *CycleOrderMutation) AddedEdges() []string
- func (m *CycleOrderMutation) AddedField(name string) (ent.Value, bool)
- func (m *CycleOrderMutation) AddedFields() []string
- func (m *CycleOrderMutation) AddedIDs(name string) []ent.Value
- func (m *CycleOrderMutation) ClearEdge(name string) error
- func (m *CycleOrderMutation) ClearField(name string) error
- func (m *CycleOrderMutation) ClearResourceID()
- func (m *CycleOrderMutation) ClearedEdges() []string
- func (m *CycleOrderMutation) ClearedFields() []string
- func (m CycleOrderMutation) Client() *Client
- func (m *CycleOrderMutation) CreateTime() (r time.Time, exists bool)
- func (m *CycleOrderMutation) Cycle() (r float64, exists bool)
- func (m *CycleOrderMutation) EdgeCleared(name string) bool
- func (m *CycleOrderMutation) Field(name string) (ent.Value, bool)
- func (m *CycleOrderMutation) FieldCleared(name string) bool
- func (m *CycleOrderMutation) Fields() []string
- func (m *CycleOrderMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *CycleOrderMutation) ID() (id uuid.UUID, exists bool)
- func (m *CycleOrderMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CycleOrderMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *CycleOrderMutation) OldCycle(ctx context.Context) (v float64, err error)
- func (m *CycleOrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CycleOrderMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleOrderMutation) OldOrderNo(ctx context.Context) (v string, err error)
- func (m *CycleOrderMutation) OldProductDesc(ctx context.Context) (v string, err error)
- func (m *CycleOrderMutation) OldProductName(ctx context.Context) (v string, err error)
- func (m *CycleOrderMutation) OldResourceID(ctx context.Context) (v *string, err error)
- func (m *CycleOrderMutation) OldSymbol(ctx context.Context) (v string, err error)
- func (m *CycleOrderMutation) Op() Op
- func (m *CycleOrderMutation) OrderNo() (r string, exists bool)
- func (m *CycleOrderMutation) ProductDesc() (r string, exists bool)
- func (m *CycleOrderMutation) ProductName() (r string, exists bool)
- func (m *CycleOrderMutation) RemovedEdges() []string
- func (m *CycleOrderMutation) RemovedIDs(name string) []ent.Value
- func (m *CycleOrderMutation) ResetCreateTime()
- func (m *CycleOrderMutation) ResetCycle()
- func (m *CycleOrderMutation) ResetEdge(name string) error
- func (m *CycleOrderMutation) ResetField(name string) error
- func (m *CycleOrderMutation) ResetFkUserID()
- func (m *CycleOrderMutation) ResetOrderNo()
- func (m *CycleOrderMutation) ResetProductDesc()
- func (m *CycleOrderMutation) ResetProductName()
- func (m *CycleOrderMutation) ResetResourceID()
- func (m *CycleOrderMutation) ResetSymbol()
- func (m *CycleOrderMutation) ResourceID() (r string, exists bool)
- func (m *CycleOrderMutation) ResourceIDCleared() bool
- func (m *CycleOrderMutation) SetCreateTime(t time.Time)
- func (m *CycleOrderMutation) SetCycle(f float64)
- func (m *CycleOrderMutation) SetField(name string, value ent.Value) error
- func (m *CycleOrderMutation) SetFkUserID(u uuid.UUID)
- func (m *CycleOrderMutation) SetID(id uuid.UUID)
- func (m *CycleOrderMutation) SetOp(op Op)
- func (m *CycleOrderMutation) SetOrderNo(s string)
- func (m *CycleOrderMutation) SetProductDesc(s string)
- func (m *CycleOrderMutation) SetProductName(s string)
- func (m *CycleOrderMutation) SetResourceID(s string)
- func (m *CycleOrderMutation) SetSymbol(s string)
- func (m *CycleOrderMutation) Symbol() (r string, exists bool)
- func (m CycleOrderMutation) Tx() (*Tx, error)
- func (m *CycleOrderMutation) Type() string
- func (m *CycleOrderMutation) Where(ps ...predicate.CycleOrder)
- func (m *CycleOrderMutation) WhereP(ps ...func(*sql.Selector))
- type CycleOrderQuery
- func (_q *CycleOrderQuery) Aggregate(fns ...AggregateFunc) *CycleOrderSelect
- func (_q *CycleOrderQuery) All(ctx context.Context) ([]*CycleOrder, error)
- func (_q *CycleOrderQuery) AllX(ctx context.Context) []*CycleOrder
- func (_q *CycleOrderQuery) Clone() *CycleOrderQuery
- func (_q *CycleOrderQuery) Count(ctx context.Context) (int, error)
- func (_q *CycleOrderQuery) CountX(ctx context.Context) int
- func (_q *CycleOrderQuery) Exist(ctx context.Context) (bool, error)
- func (_q *CycleOrderQuery) ExistX(ctx context.Context) bool
- func (_q *CycleOrderQuery) First(ctx context.Context) (*CycleOrder, error)
- func (_q *CycleOrderQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleOrderQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *CycleOrderQuery) FirstX(ctx context.Context) *CycleOrder
- func (_q *CycleOrderQuery) GroupBy(field string, fields ...string) *CycleOrderGroupBy
- func (_q *CycleOrderQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *CycleOrderQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *CycleOrderQuery) Limit(limit int) *CycleOrderQuery
- func (_q *CycleOrderQuery) Offset(offset int) *CycleOrderQuery
- func (_q *CycleOrderQuery) Only(ctx context.Context) (*CycleOrder, error)
- func (_q *CycleOrderQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleOrderQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *CycleOrderQuery) OnlyX(ctx context.Context) *CycleOrder
- func (_q *CycleOrderQuery) Order(o ...cycleorder.OrderOption) *CycleOrderQuery
- func (_q *CycleOrderQuery) Select(fields ...string) *CycleOrderSelect
- func (_q *CycleOrderQuery) Unique(unique bool) *CycleOrderQuery
- func (_q *CycleOrderQuery) Where(ps ...predicate.CycleOrder) *CycleOrderQuery
- type CycleOrderSelect
- func (_s *CycleOrderSelect) Aggregate(fns ...AggregateFunc) *CycleOrderSelect
- func (s *CycleOrderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleOrderSelect) BoolX(ctx context.Context) bool
- func (s *CycleOrderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleOrderSelect) BoolsX(ctx context.Context) []bool
- func (s *CycleOrderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleOrderSelect) Float64X(ctx context.Context) float64
- func (s *CycleOrderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleOrderSelect) Float64sX(ctx context.Context) []float64
- func (s *CycleOrderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CycleOrderSelect) IntX(ctx context.Context) int
- func (s *CycleOrderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CycleOrderSelect) IntsX(ctx context.Context) []int
- func (_s *CycleOrderSelect) Scan(ctx context.Context, v any) error
- func (s *CycleOrderSelect) ScanX(ctx context.Context, v any)
- func (s *CycleOrderSelect) String(ctx context.Context) (_ string, err error)
- func (s *CycleOrderSelect) StringX(ctx context.Context) string
- func (s *CycleOrderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CycleOrderSelect) StringsX(ctx context.Context) []string
- type CycleOrderUpdate
- func (_u *CycleOrderUpdate) AddCycle(v float64) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) ClearResourceID() *CycleOrderUpdate
- func (_u *CycleOrderUpdate) Exec(ctx context.Context) error
- func (_u *CycleOrderUpdate) ExecX(ctx context.Context)
- func (_u *CycleOrderUpdate) Mutation() *CycleOrderMutation
- func (_u *CycleOrderUpdate) Save(ctx context.Context) (int, error)
- func (_u *CycleOrderUpdate) SaveX(ctx context.Context) int
- func (_u *CycleOrderUpdate) SetCreateTime(v time.Time) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetCycle(v float64) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetFkUserID(v uuid.UUID) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetNillableCreateTime(v *time.Time) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetNillableCycle(v *float64) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetNillableOrderNo(v *string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetNillableProductDesc(v *string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetNillableProductName(v *string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetNillableResourceID(v *string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetNillableSymbol(v *string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetOrderNo(v string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetProductDesc(v string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetProductName(v string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetResourceID(v string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) SetSymbol(v string) *CycleOrderUpdate
- func (_u *CycleOrderUpdate) Where(ps ...predicate.CycleOrder) *CycleOrderUpdate
- type CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) AddCycle(v float64) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) ClearResourceID() *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) Exec(ctx context.Context) error
- func (_u *CycleOrderUpdateOne) ExecX(ctx context.Context)
- func (_u *CycleOrderUpdateOne) Mutation() *CycleOrderMutation
- func (_u *CycleOrderUpdateOne) Save(ctx context.Context) (*CycleOrder, error)
- func (_u *CycleOrderUpdateOne) SaveX(ctx context.Context) *CycleOrder
- func (_u *CycleOrderUpdateOne) Select(field string, fields ...string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetCreateTime(v time.Time) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetCycle(v float64) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetFkUserID(v uuid.UUID) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetNillableCreateTime(v *time.Time) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetNillableCycle(v *float64) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetNillableOrderNo(v *string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetNillableProductDesc(v *string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetNillableProductName(v *string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetNillableResourceID(v *string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetNillableSymbol(v *string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetOrderNo(v string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetProductDesc(v string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetProductName(v string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetResourceID(v string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) SetSymbol(v string) *CycleOrderUpdateOne
- func (_u *CycleOrderUpdateOne) Where(ps ...predicate.CycleOrder) *CycleOrderUpdateOne
- type CycleOrders
- type CycleQuery
- func (_q *CycleQuery) Aggregate(fns ...AggregateFunc) *CycleSelect
- func (_q *CycleQuery) All(ctx context.Context) ([]*Cycle, error)
- func (_q *CycleQuery) AllX(ctx context.Context) []*Cycle
- func (_q *CycleQuery) Clone() *CycleQuery
- func (_q *CycleQuery) Count(ctx context.Context) (int, error)
- func (_q *CycleQuery) CountX(ctx context.Context) int
- func (_q *CycleQuery) Exist(ctx context.Context) (bool, error)
- func (_q *CycleQuery) ExistX(ctx context.Context) bool
- func (_q *CycleQuery) First(ctx context.Context) (*Cycle, error)
- func (_q *CycleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *CycleQuery) FirstX(ctx context.Context) *Cycle
- func (_q *CycleQuery) GroupBy(field string, fields ...string) *CycleGroupBy
- func (_q *CycleQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *CycleQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *CycleQuery) Limit(limit int) *CycleQuery
- func (_q *CycleQuery) Offset(offset int) *CycleQuery
- func (_q *CycleQuery) Only(ctx context.Context) (*Cycle, error)
- func (_q *CycleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *CycleQuery) OnlyX(ctx context.Context) *Cycle
- func (_q *CycleQuery) Order(o ...cycle.OrderOption) *CycleQuery
- func (_q *CycleQuery) Select(fields ...string) *CycleSelect
- func (_q *CycleQuery) Unique(unique bool) *CycleQuery
- func (_q *CycleQuery) Where(ps ...predicate.Cycle) *CycleQuery
- type CycleRecharge
- type CycleRechargeClient
- func (c *CycleRechargeClient) Create() *CycleRechargeCreate
- func (c *CycleRechargeClient) CreateBulk(builders ...*CycleRechargeCreate) *CycleRechargeCreateBulk
- func (c *CycleRechargeClient) Delete() *CycleRechargeDelete
- func (c *CycleRechargeClient) DeleteOne(_m *CycleRecharge) *CycleRechargeDeleteOne
- func (c *CycleRechargeClient) DeleteOneID(id uuid.UUID) *CycleRechargeDeleteOne
- func (c *CycleRechargeClient) Get(ctx context.Context, id uuid.UUID) (*CycleRecharge, error)
- func (c *CycleRechargeClient) GetX(ctx context.Context, id uuid.UUID) *CycleRecharge
- func (c *CycleRechargeClient) Hooks() []Hook
- func (c *CycleRechargeClient) Intercept(interceptors ...Interceptor)
- func (c *CycleRechargeClient) Interceptors() []Interceptor
- func (c *CycleRechargeClient) MapCreateBulk(slice any, setFunc func(*CycleRechargeCreate, int)) *CycleRechargeCreateBulk
- func (c *CycleRechargeClient) Query() *CycleRechargeQuery
- func (c *CycleRechargeClient) Update() *CycleRechargeUpdate
- func (c *CycleRechargeClient) UpdateOne(_m *CycleRecharge) *CycleRechargeUpdateOne
- func (c *CycleRechargeClient) UpdateOneID(id uuid.UUID) *CycleRechargeUpdateOne
- func (c *CycleRechargeClient) Use(hooks ...Hook)
- type CycleRechargeCreate
- func (_c *CycleRechargeCreate) Exec(ctx context.Context) error
- func (_c *CycleRechargeCreate) ExecX(ctx context.Context)
- func (_c *CycleRechargeCreate) Mutation() *CycleRechargeMutation
- func (_c *CycleRechargeCreate) Save(ctx context.Context) (*CycleRecharge, error)
- func (_c *CycleRechargeCreate) SaveX(ctx context.Context) *CycleRecharge
- func (_c *CycleRechargeCreate) SetAlipayTradeNo(v string) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetBuyCycle(v float64) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetCreateTime(v time.Time) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetFkUserID(v uuid.UUID) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetID(v uuid.UUID) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetNillableID(v *uuid.UUID) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetOutTradeNo(v string) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetPayAmount(v float64) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetRechargeChannel(v int) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetRedeemCode(v string) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetState(v string) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetTotalAmount(v float64) *CycleRechargeCreate
- func (_c *CycleRechargeCreate) SetUpdateTime(v time.Time) *CycleRechargeCreate
- type CycleRechargeCreateBulk
- type CycleRechargeDelete
- type CycleRechargeDeleteOne
- type CycleRechargeGroupBy
- func (_g *CycleRechargeGroupBy) Aggregate(fns ...AggregateFunc) *CycleRechargeGroupBy
- func (s *CycleRechargeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleRechargeGroupBy) BoolX(ctx context.Context) bool
- func (s *CycleRechargeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleRechargeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CycleRechargeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleRechargeGroupBy) Float64X(ctx context.Context) float64
- func (s *CycleRechargeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleRechargeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CycleRechargeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CycleRechargeGroupBy) IntX(ctx context.Context) int
- func (s *CycleRechargeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CycleRechargeGroupBy) IntsX(ctx context.Context) []int
- func (_g *CycleRechargeGroupBy) Scan(ctx context.Context, v any) error
- func (s *CycleRechargeGroupBy) ScanX(ctx context.Context, v any)
- func (s *CycleRechargeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CycleRechargeGroupBy) StringX(ctx context.Context) string
- func (s *CycleRechargeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CycleRechargeGroupBy) StringsX(ctx context.Context) []string
- type CycleRechargeMutation
- func (m *CycleRechargeMutation) AddBuyCycle(f float64)
- func (m *CycleRechargeMutation) AddField(name string, value ent.Value) error
- func (m *CycleRechargeMutation) AddPayAmount(f float64)
- func (m *CycleRechargeMutation) AddRechargeChannel(i int)
- func (m *CycleRechargeMutation) AddTotalAmount(f float64)
- func (m *CycleRechargeMutation) AddedBuyCycle() (r float64, exists bool)
- func (m *CycleRechargeMutation) AddedEdges() []string
- func (m *CycleRechargeMutation) AddedField(name string) (ent.Value, bool)
- func (m *CycleRechargeMutation) AddedFields() []string
- func (m *CycleRechargeMutation) AddedIDs(name string) []ent.Value
- func (m *CycleRechargeMutation) AddedPayAmount() (r float64, exists bool)
- func (m *CycleRechargeMutation) AddedRechargeChannel() (r int, exists bool)
- func (m *CycleRechargeMutation) AddedTotalAmount() (r float64, exists bool)
- func (m *CycleRechargeMutation) AlipayTradeNo() (r string, exists bool)
- func (m *CycleRechargeMutation) BuyCycle() (r float64, exists bool)
- func (m *CycleRechargeMutation) ClearEdge(name string) error
- func (m *CycleRechargeMutation) ClearField(name string) error
- func (m *CycleRechargeMutation) ClearedEdges() []string
- func (m *CycleRechargeMutation) ClearedFields() []string
- func (m CycleRechargeMutation) Client() *Client
- func (m *CycleRechargeMutation) CreateTime() (r time.Time, exists bool)
- func (m *CycleRechargeMutation) EdgeCleared(name string) bool
- func (m *CycleRechargeMutation) Field(name string) (ent.Value, bool)
- func (m *CycleRechargeMutation) FieldCleared(name string) bool
- func (m *CycleRechargeMutation) Fields() []string
- func (m *CycleRechargeMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *CycleRechargeMutation) ID() (id uuid.UUID, exists bool)
- func (m *CycleRechargeMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CycleRechargeMutation) OldAlipayTradeNo(ctx context.Context) (v string, err error)
- func (m *CycleRechargeMutation) OldBuyCycle(ctx context.Context) (v float64, err error)
- func (m *CycleRechargeMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *CycleRechargeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CycleRechargeMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleRechargeMutation) OldOutTradeNo(ctx context.Context) (v string, err error)
- func (m *CycleRechargeMutation) OldPayAmount(ctx context.Context) (v float64, err error)
- func (m *CycleRechargeMutation) OldRechargeChannel(ctx context.Context) (v int, err error)
- func (m *CycleRechargeMutation) OldRedeemCode(ctx context.Context) (v string, err error)
- func (m *CycleRechargeMutation) OldState(ctx context.Context) (v string, err error)
- func (m *CycleRechargeMutation) OldTotalAmount(ctx context.Context) (v float64, err error)
- func (m *CycleRechargeMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *CycleRechargeMutation) Op() Op
- func (m *CycleRechargeMutation) OutTradeNo() (r string, exists bool)
- func (m *CycleRechargeMutation) PayAmount() (r float64, exists bool)
- func (m *CycleRechargeMutation) RechargeChannel() (r int, exists bool)
- func (m *CycleRechargeMutation) RedeemCode() (r string, exists bool)
- func (m *CycleRechargeMutation) RemovedEdges() []string
- func (m *CycleRechargeMutation) RemovedIDs(name string) []ent.Value
- func (m *CycleRechargeMutation) ResetAlipayTradeNo()
- func (m *CycleRechargeMutation) ResetBuyCycle()
- func (m *CycleRechargeMutation) ResetCreateTime()
- func (m *CycleRechargeMutation) ResetEdge(name string) error
- func (m *CycleRechargeMutation) ResetField(name string) error
- func (m *CycleRechargeMutation) ResetFkUserID()
- func (m *CycleRechargeMutation) ResetOutTradeNo()
- func (m *CycleRechargeMutation) ResetPayAmount()
- func (m *CycleRechargeMutation) ResetRechargeChannel()
- func (m *CycleRechargeMutation) ResetRedeemCode()
- func (m *CycleRechargeMutation) ResetState()
- func (m *CycleRechargeMutation) ResetTotalAmount()
- func (m *CycleRechargeMutation) ResetUpdateTime()
- func (m *CycleRechargeMutation) SetAlipayTradeNo(s string)
- func (m *CycleRechargeMutation) SetBuyCycle(f float64)
- func (m *CycleRechargeMutation) SetCreateTime(t time.Time)
- func (m *CycleRechargeMutation) SetField(name string, value ent.Value) error
- func (m *CycleRechargeMutation) SetFkUserID(u uuid.UUID)
- func (m *CycleRechargeMutation) SetID(id uuid.UUID)
- func (m *CycleRechargeMutation) SetOp(op Op)
- func (m *CycleRechargeMutation) SetOutTradeNo(s string)
- func (m *CycleRechargeMutation) SetPayAmount(f float64)
- func (m *CycleRechargeMutation) SetRechargeChannel(i int)
- func (m *CycleRechargeMutation) SetRedeemCode(s string)
- func (m *CycleRechargeMutation) SetState(s string)
- func (m *CycleRechargeMutation) SetTotalAmount(f float64)
- func (m *CycleRechargeMutation) SetUpdateTime(t time.Time)
- func (m *CycleRechargeMutation) State() (r string, exists bool)
- func (m *CycleRechargeMutation) TotalAmount() (r float64, exists bool)
- func (m CycleRechargeMutation) Tx() (*Tx, error)
- func (m *CycleRechargeMutation) Type() string
- func (m *CycleRechargeMutation) UpdateTime() (r time.Time, exists bool)
- func (m *CycleRechargeMutation) Where(ps ...predicate.CycleRecharge)
- func (m *CycleRechargeMutation) WhereP(ps ...func(*sql.Selector))
- type CycleRechargeQuery
- func (_q *CycleRechargeQuery) Aggregate(fns ...AggregateFunc) *CycleRechargeSelect
- func (_q *CycleRechargeQuery) All(ctx context.Context) ([]*CycleRecharge, error)
- func (_q *CycleRechargeQuery) AllX(ctx context.Context) []*CycleRecharge
- func (_q *CycleRechargeQuery) Clone() *CycleRechargeQuery
- func (_q *CycleRechargeQuery) Count(ctx context.Context) (int, error)
- func (_q *CycleRechargeQuery) CountX(ctx context.Context) int
- func (_q *CycleRechargeQuery) Exist(ctx context.Context) (bool, error)
- func (_q *CycleRechargeQuery) ExistX(ctx context.Context) bool
- func (_q *CycleRechargeQuery) First(ctx context.Context) (*CycleRecharge, error)
- func (_q *CycleRechargeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleRechargeQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *CycleRechargeQuery) FirstX(ctx context.Context) *CycleRecharge
- func (_q *CycleRechargeQuery) GroupBy(field string, fields ...string) *CycleRechargeGroupBy
- func (_q *CycleRechargeQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *CycleRechargeQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *CycleRechargeQuery) Limit(limit int) *CycleRechargeQuery
- func (_q *CycleRechargeQuery) Offset(offset int) *CycleRechargeQuery
- func (_q *CycleRechargeQuery) Only(ctx context.Context) (*CycleRecharge, error)
- func (_q *CycleRechargeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleRechargeQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *CycleRechargeQuery) OnlyX(ctx context.Context) *CycleRecharge
- func (_q *CycleRechargeQuery) Order(o ...cyclerecharge.OrderOption) *CycleRechargeQuery
- func (_q *CycleRechargeQuery) Select(fields ...string) *CycleRechargeSelect
- func (_q *CycleRechargeQuery) Unique(unique bool) *CycleRechargeQuery
- func (_q *CycleRechargeQuery) Where(ps ...predicate.CycleRecharge) *CycleRechargeQuery
- type CycleRechargeSelect
- func (_s *CycleRechargeSelect) Aggregate(fns ...AggregateFunc) *CycleRechargeSelect
- func (s *CycleRechargeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleRechargeSelect) BoolX(ctx context.Context) bool
- func (s *CycleRechargeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleRechargeSelect) BoolsX(ctx context.Context) []bool
- func (s *CycleRechargeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleRechargeSelect) Float64X(ctx context.Context) float64
- func (s *CycleRechargeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleRechargeSelect) Float64sX(ctx context.Context) []float64
- func (s *CycleRechargeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CycleRechargeSelect) IntX(ctx context.Context) int
- func (s *CycleRechargeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CycleRechargeSelect) IntsX(ctx context.Context) []int
- func (_s *CycleRechargeSelect) Scan(ctx context.Context, v any) error
- func (s *CycleRechargeSelect) ScanX(ctx context.Context, v any)
- func (s *CycleRechargeSelect) String(ctx context.Context) (_ string, err error)
- func (s *CycleRechargeSelect) StringX(ctx context.Context) string
- func (s *CycleRechargeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CycleRechargeSelect) StringsX(ctx context.Context) []string
- type CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) AddBuyCycle(v float64) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) AddPayAmount(v float64) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) AddRechargeChannel(v int) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) AddTotalAmount(v float64) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) Exec(ctx context.Context) error
- func (_u *CycleRechargeUpdate) ExecX(ctx context.Context)
- func (_u *CycleRechargeUpdate) Mutation() *CycleRechargeMutation
- func (_u *CycleRechargeUpdate) Save(ctx context.Context) (int, error)
- func (_u *CycleRechargeUpdate) SaveX(ctx context.Context) int
- func (_u *CycleRechargeUpdate) SetAlipayTradeNo(v string) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetBuyCycle(v float64) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetCreateTime(v time.Time) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetFkUserID(v uuid.UUID) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableAlipayTradeNo(v *string) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableBuyCycle(v *float64) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableCreateTime(v *time.Time) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableOutTradeNo(v *string) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillablePayAmount(v *float64) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableRechargeChannel(v *int) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableRedeemCode(v *string) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableState(v *string) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableTotalAmount(v *float64) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetNillableUpdateTime(v *time.Time) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetOutTradeNo(v string) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetPayAmount(v float64) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetRechargeChannel(v int) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetRedeemCode(v string) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetState(v string) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetTotalAmount(v float64) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) SetUpdateTime(v time.Time) *CycleRechargeUpdate
- func (_u *CycleRechargeUpdate) Where(ps ...predicate.CycleRecharge) *CycleRechargeUpdate
- type CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) AddBuyCycle(v float64) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) AddPayAmount(v float64) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) AddRechargeChannel(v int) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) AddTotalAmount(v float64) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) Exec(ctx context.Context) error
- func (_u *CycleRechargeUpdateOne) ExecX(ctx context.Context)
- func (_u *CycleRechargeUpdateOne) Mutation() *CycleRechargeMutation
- func (_u *CycleRechargeUpdateOne) Save(ctx context.Context) (*CycleRecharge, error)
- func (_u *CycleRechargeUpdateOne) SaveX(ctx context.Context) *CycleRecharge
- func (_u *CycleRechargeUpdateOne) Select(field string, fields ...string) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetAlipayTradeNo(v string) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetBuyCycle(v float64) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetCreateTime(v time.Time) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetFkUserID(v uuid.UUID) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableAlipayTradeNo(v *string) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableBuyCycle(v *float64) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableCreateTime(v *time.Time) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableOutTradeNo(v *string) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillablePayAmount(v *float64) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableRechargeChannel(v *int) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableRedeemCode(v *string) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableState(v *string) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableTotalAmount(v *float64) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetNillableUpdateTime(v *time.Time) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetOutTradeNo(v string) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetPayAmount(v float64) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetRechargeChannel(v int) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetRedeemCode(v string) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetState(v string) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetTotalAmount(v float64) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) SetUpdateTime(v time.Time) *CycleRechargeUpdateOne
- func (_u *CycleRechargeUpdateOne) Where(ps ...predicate.CycleRecharge) *CycleRechargeUpdateOne
- type CycleRecharges
- type CycleRedeemCode
- type CycleRedeemCodeClient
- func (c *CycleRedeemCodeClient) Create() *CycleRedeemCodeCreate
- func (c *CycleRedeemCodeClient) CreateBulk(builders ...*CycleRedeemCodeCreate) *CycleRedeemCodeCreateBulk
- func (c *CycleRedeemCodeClient) Delete() *CycleRedeemCodeDelete
- func (c *CycleRedeemCodeClient) DeleteOne(_m *CycleRedeemCode) *CycleRedeemCodeDeleteOne
- func (c *CycleRedeemCodeClient) DeleteOneID(id uuid.UUID) *CycleRedeemCodeDeleteOne
- func (c *CycleRedeemCodeClient) Get(ctx context.Context, id uuid.UUID) (*CycleRedeemCode, error)
- func (c *CycleRedeemCodeClient) GetX(ctx context.Context, id uuid.UUID) *CycleRedeemCode
- func (c *CycleRedeemCodeClient) Hooks() []Hook
- func (c *CycleRedeemCodeClient) Intercept(interceptors ...Interceptor)
- func (c *CycleRedeemCodeClient) Interceptors() []Interceptor
- func (c *CycleRedeemCodeClient) MapCreateBulk(slice any, setFunc func(*CycleRedeemCodeCreate, int)) *CycleRedeemCodeCreateBulk
- func (c *CycleRedeemCodeClient) Query() *CycleRedeemCodeQuery
- func (c *CycleRedeemCodeClient) Update() *CycleRedeemCodeUpdate
- func (c *CycleRedeemCodeClient) UpdateOne(_m *CycleRedeemCode) *CycleRedeemCodeUpdateOne
- func (c *CycleRedeemCodeClient) UpdateOneID(id uuid.UUID) *CycleRedeemCodeUpdateOne
- func (c *CycleRedeemCodeClient) Use(hooks ...Hook)
- type CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) Exec(ctx context.Context) error
- func (_c *CycleRedeemCodeCreate) ExecX(ctx context.Context)
- func (_c *CycleRedeemCodeCreate) Mutation() *CycleRedeemCodeMutation
- func (_c *CycleRedeemCodeCreate) Save(ctx context.Context) (*CycleRedeemCode, error)
- func (_c *CycleRedeemCodeCreate) SaveX(ctx context.Context) *CycleRedeemCode
- func (_c *CycleRedeemCodeCreate) SetCreateTime(v time.Time) *CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) SetCycle(v float64) *CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) SetFkUserID(v uuid.UUID) *CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) SetID(v uuid.UUID) *CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) SetNillableFkUserID(v *uuid.UUID) *CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) SetNillableID(v *uuid.UUID) *CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) SetNillableUseTime(v *time.Time) *CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) SetRedeemCode(v string) *CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) SetState(v bool) *CycleRedeemCodeCreate
- func (_c *CycleRedeemCodeCreate) SetUseTime(v time.Time) *CycleRedeemCodeCreate
- type CycleRedeemCodeCreateBulk
- func (_c *CycleRedeemCodeCreateBulk) Exec(ctx context.Context) error
- func (_c *CycleRedeemCodeCreateBulk) ExecX(ctx context.Context)
- func (_c *CycleRedeemCodeCreateBulk) Save(ctx context.Context) ([]*CycleRedeemCode, error)
- func (_c *CycleRedeemCodeCreateBulk) SaveX(ctx context.Context) []*CycleRedeemCode
- type CycleRedeemCodeDelete
- type CycleRedeemCodeDeleteOne
- type CycleRedeemCodeGroupBy
- func (_g *CycleRedeemCodeGroupBy) Aggregate(fns ...AggregateFunc) *CycleRedeemCodeGroupBy
- func (s *CycleRedeemCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleRedeemCodeGroupBy) BoolX(ctx context.Context) bool
- func (s *CycleRedeemCodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleRedeemCodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CycleRedeemCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleRedeemCodeGroupBy) Float64X(ctx context.Context) float64
- func (s *CycleRedeemCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleRedeemCodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CycleRedeemCodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CycleRedeemCodeGroupBy) IntX(ctx context.Context) int
- func (s *CycleRedeemCodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CycleRedeemCodeGroupBy) IntsX(ctx context.Context) []int
- func (_g *CycleRedeemCodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *CycleRedeemCodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *CycleRedeemCodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CycleRedeemCodeGroupBy) StringX(ctx context.Context) string
- func (s *CycleRedeemCodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CycleRedeemCodeGroupBy) StringsX(ctx context.Context) []string
- type CycleRedeemCodeMutation
- func (m *CycleRedeemCodeMutation) AddCycle(f float64)
- func (m *CycleRedeemCodeMutation) AddField(name string, value ent.Value) error
- func (m *CycleRedeemCodeMutation) AddedCycle() (r float64, exists bool)
- func (m *CycleRedeemCodeMutation) AddedEdges() []string
- func (m *CycleRedeemCodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *CycleRedeemCodeMutation) AddedFields() []string
- func (m *CycleRedeemCodeMutation) AddedIDs(name string) []ent.Value
- func (m *CycleRedeemCodeMutation) ClearEdge(name string) error
- func (m *CycleRedeemCodeMutation) ClearField(name string) error
- func (m *CycleRedeemCodeMutation) ClearFkUserID()
- func (m *CycleRedeemCodeMutation) ClearUseTime()
- func (m *CycleRedeemCodeMutation) ClearedEdges() []string
- func (m *CycleRedeemCodeMutation) ClearedFields() []string
- func (m CycleRedeemCodeMutation) Client() *Client
- func (m *CycleRedeemCodeMutation) CreateTime() (r time.Time, exists bool)
- func (m *CycleRedeemCodeMutation) Cycle() (r float64, exists bool)
- func (m *CycleRedeemCodeMutation) EdgeCleared(name string) bool
- func (m *CycleRedeemCodeMutation) Field(name string) (ent.Value, bool)
- func (m *CycleRedeemCodeMutation) FieldCleared(name string) bool
- func (m *CycleRedeemCodeMutation) Fields() []string
- func (m *CycleRedeemCodeMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *CycleRedeemCodeMutation) FkUserIDCleared() bool
- func (m *CycleRedeemCodeMutation) ID() (id uuid.UUID, exists bool)
- func (m *CycleRedeemCodeMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CycleRedeemCodeMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *CycleRedeemCodeMutation) OldCycle(ctx context.Context) (v float64, err error)
- func (m *CycleRedeemCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CycleRedeemCodeMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleRedeemCodeMutation) OldRedeemCode(ctx context.Context) (v string, err error)
- func (m *CycleRedeemCodeMutation) OldState(ctx context.Context) (v bool, err error)
- func (m *CycleRedeemCodeMutation) OldUseTime(ctx context.Context) (v time.Time, err error)
- func (m *CycleRedeemCodeMutation) Op() Op
- func (m *CycleRedeemCodeMutation) RedeemCode() (r string, exists bool)
- func (m *CycleRedeemCodeMutation) RemovedEdges() []string
- func (m *CycleRedeemCodeMutation) RemovedIDs(name string) []ent.Value
- func (m *CycleRedeemCodeMutation) ResetCreateTime()
- func (m *CycleRedeemCodeMutation) ResetCycle()
- func (m *CycleRedeemCodeMutation) ResetEdge(name string) error
- func (m *CycleRedeemCodeMutation) ResetField(name string) error
- func (m *CycleRedeemCodeMutation) ResetFkUserID()
- func (m *CycleRedeemCodeMutation) ResetRedeemCode()
- func (m *CycleRedeemCodeMutation) ResetState()
- func (m *CycleRedeemCodeMutation) ResetUseTime()
- func (m *CycleRedeemCodeMutation) SetCreateTime(t time.Time)
- func (m *CycleRedeemCodeMutation) SetCycle(f float64)
- func (m *CycleRedeemCodeMutation) SetField(name string, value ent.Value) error
- func (m *CycleRedeemCodeMutation) SetFkUserID(u uuid.UUID)
- func (m *CycleRedeemCodeMutation) SetID(id uuid.UUID)
- func (m *CycleRedeemCodeMutation) SetOp(op Op)
- func (m *CycleRedeemCodeMutation) SetRedeemCode(s string)
- func (m *CycleRedeemCodeMutation) SetState(b bool)
- func (m *CycleRedeemCodeMutation) SetUseTime(t time.Time)
- func (m *CycleRedeemCodeMutation) State() (r bool, exists bool)
- func (m CycleRedeemCodeMutation) Tx() (*Tx, error)
- func (m *CycleRedeemCodeMutation) Type() string
- func (m *CycleRedeemCodeMutation) UseTime() (r time.Time, exists bool)
- func (m *CycleRedeemCodeMutation) UseTimeCleared() bool
- func (m *CycleRedeemCodeMutation) Where(ps ...predicate.CycleRedeemCode)
- func (m *CycleRedeemCodeMutation) WhereP(ps ...func(*sql.Selector))
- type CycleRedeemCodeQuery
- func (_q *CycleRedeemCodeQuery) Aggregate(fns ...AggregateFunc) *CycleRedeemCodeSelect
- func (_q *CycleRedeemCodeQuery) All(ctx context.Context) ([]*CycleRedeemCode, error)
- func (_q *CycleRedeemCodeQuery) AllX(ctx context.Context) []*CycleRedeemCode
- func (_q *CycleRedeemCodeQuery) Clone() *CycleRedeemCodeQuery
- func (_q *CycleRedeemCodeQuery) Count(ctx context.Context) (int, error)
- func (_q *CycleRedeemCodeQuery) CountX(ctx context.Context) int
- func (_q *CycleRedeemCodeQuery) Exist(ctx context.Context) (bool, error)
- func (_q *CycleRedeemCodeQuery) ExistX(ctx context.Context) bool
- func (_q *CycleRedeemCodeQuery) First(ctx context.Context) (*CycleRedeemCode, error)
- func (_q *CycleRedeemCodeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleRedeemCodeQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *CycleRedeemCodeQuery) FirstX(ctx context.Context) *CycleRedeemCode
- func (_q *CycleRedeemCodeQuery) GroupBy(field string, fields ...string) *CycleRedeemCodeGroupBy
- func (_q *CycleRedeemCodeQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *CycleRedeemCodeQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *CycleRedeemCodeQuery) Limit(limit int) *CycleRedeemCodeQuery
- func (_q *CycleRedeemCodeQuery) Offset(offset int) *CycleRedeemCodeQuery
- func (_q *CycleRedeemCodeQuery) Only(ctx context.Context) (*CycleRedeemCode, error)
- func (_q *CycleRedeemCodeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleRedeemCodeQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *CycleRedeemCodeQuery) OnlyX(ctx context.Context) *CycleRedeemCode
- func (_q *CycleRedeemCodeQuery) Order(o ...cycleredeemcode.OrderOption) *CycleRedeemCodeQuery
- func (_q *CycleRedeemCodeQuery) Select(fields ...string) *CycleRedeemCodeSelect
- func (_q *CycleRedeemCodeQuery) Unique(unique bool) *CycleRedeemCodeQuery
- func (_q *CycleRedeemCodeQuery) Where(ps ...predicate.CycleRedeemCode) *CycleRedeemCodeQuery
- type CycleRedeemCodeSelect
- func (_s *CycleRedeemCodeSelect) Aggregate(fns ...AggregateFunc) *CycleRedeemCodeSelect
- func (s *CycleRedeemCodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleRedeemCodeSelect) BoolX(ctx context.Context) bool
- func (s *CycleRedeemCodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleRedeemCodeSelect) BoolsX(ctx context.Context) []bool
- func (s *CycleRedeemCodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleRedeemCodeSelect) Float64X(ctx context.Context) float64
- func (s *CycleRedeemCodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleRedeemCodeSelect) Float64sX(ctx context.Context) []float64
- func (s *CycleRedeemCodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CycleRedeemCodeSelect) IntX(ctx context.Context) int
- func (s *CycleRedeemCodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CycleRedeemCodeSelect) IntsX(ctx context.Context) []int
- func (_s *CycleRedeemCodeSelect) Scan(ctx context.Context, v any) error
- func (s *CycleRedeemCodeSelect) ScanX(ctx context.Context, v any)
- func (s *CycleRedeemCodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *CycleRedeemCodeSelect) StringX(ctx context.Context) string
- func (s *CycleRedeemCodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CycleRedeemCodeSelect) StringsX(ctx context.Context) []string
- type CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) AddCycle(v float64) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) ClearFkUserID() *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) ClearUseTime() *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) Exec(ctx context.Context) error
- func (_u *CycleRedeemCodeUpdate) ExecX(ctx context.Context)
- func (_u *CycleRedeemCodeUpdate) Mutation() *CycleRedeemCodeMutation
- func (_u *CycleRedeemCodeUpdate) Save(ctx context.Context) (int, error)
- func (_u *CycleRedeemCodeUpdate) SaveX(ctx context.Context) int
- func (_u *CycleRedeemCodeUpdate) SetCreateTime(v time.Time) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetCycle(v float64) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetFkUserID(v uuid.UUID) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetNillableCreateTime(v *time.Time) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetNillableCycle(v *float64) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetNillableRedeemCode(v *string) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetNillableState(v *bool) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetNillableUseTime(v *time.Time) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetRedeemCode(v string) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetState(v bool) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) SetUseTime(v time.Time) *CycleRedeemCodeUpdate
- func (_u *CycleRedeemCodeUpdate) Where(ps ...predicate.CycleRedeemCode) *CycleRedeemCodeUpdate
- type CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) AddCycle(v float64) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) ClearFkUserID() *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) ClearUseTime() *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) Exec(ctx context.Context) error
- func (_u *CycleRedeemCodeUpdateOne) ExecX(ctx context.Context)
- func (_u *CycleRedeemCodeUpdateOne) Mutation() *CycleRedeemCodeMutation
- func (_u *CycleRedeemCodeUpdateOne) Save(ctx context.Context) (*CycleRedeemCode, error)
- func (_u *CycleRedeemCodeUpdateOne) SaveX(ctx context.Context) *CycleRedeemCode
- func (_u *CycleRedeemCodeUpdateOne) Select(field string, fields ...string) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetCreateTime(v time.Time) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetCycle(v float64) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetFkUserID(v uuid.UUID) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetNillableCreateTime(v *time.Time) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetNillableCycle(v *float64) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetNillableRedeemCode(v *string) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetNillableState(v *bool) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetNillableUseTime(v *time.Time) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetRedeemCode(v string) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetState(v bool) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) SetUseTime(v time.Time) *CycleRedeemCodeUpdateOne
- func (_u *CycleRedeemCodeUpdateOne) Where(ps ...predicate.CycleRedeemCode) *CycleRedeemCodeUpdateOne
- type CycleRedeemCodes
- type CycleRenewal
- type CycleRenewalClient
- func (c *CycleRenewalClient) Create() *CycleRenewalCreate
- func (c *CycleRenewalClient) CreateBulk(builders ...*CycleRenewalCreate) *CycleRenewalCreateBulk
- func (c *CycleRenewalClient) Delete() *CycleRenewalDelete
- func (c *CycleRenewalClient) DeleteOne(_m *CycleRenewal) *CycleRenewalDeleteOne
- func (c *CycleRenewalClient) DeleteOneID(id uuid.UUID) *CycleRenewalDeleteOne
- func (c *CycleRenewalClient) Get(ctx context.Context, id uuid.UUID) (*CycleRenewal, error)
- func (c *CycleRenewalClient) GetX(ctx context.Context, id uuid.UUID) *CycleRenewal
- func (c *CycleRenewalClient) Hooks() []Hook
- func (c *CycleRenewalClient) Intercept(interceptors ...Interceptor)
- func (c *CycleRenewalClient) Interceptors() []Interceptor
- func (c *CycleRenewalClient) MapCreateBulk(slice any, setFunc func(*CycleRenewalCreate, int)) *CycleRenewalCreateBulk
- func (c *CycleRenewalClient) Query() *CycleRenewalQuery
- func (c *CycleRenewalClient) Update() *CycleRenewalUpdate
- func (c *CycleRenewalClient) UpdateOne(_m *CycleRenewal) *CycleRenewalUpdateOne
- func (c *CycleRenewalClient) UpdateOneID(id uuid.UUID) *CycleRenewalUpdateOne
- func (c *CycleRenewalClient) Use(hooks ...Hook)
- type CycleRenewalCreate
- func (_c *CycleRenewalCreate) Exec(ctx context.Context) error
- func (_c *CycleRenewalCreate) ExecX(ctx context.Context)
- func (_c *CycleRenewalCreate) Mutation() *CycleRenewalMutation
- func (_c *CycleRenewalCreate) Save(ctx context.Context) (*CycleRenewal, error)
- func (_c *CycleRenewalCreate) SaveX(ctx context.Context) *CycleRenewal
- func (_c *CycleRenewalCreate) SetAutoRenewal(v bool) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetDueTime(v time.Time) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetExtendDay(v int8) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetExtendPrice(v float64) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetFkUserID(v uuid.UUID) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetID(v uuid.UUID) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetNillableDueTime(v *time.Time) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetNillableID(v *uuid.UUID) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetNillableRenewalTime(v *time.Time) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetProductDesc(v string) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetProductName(v string) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetRenewalTime(v time.Time) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetResourceID(v uuid.UUID) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetResourceType(v int) *CycleRenewalCreate
- func (_c *CycleRenewalCreate) SetState(v int8) *CycleRenewalCreate
- type CycleRenewalCreateBulk
- type CycleRenewalDelete
- type CycleRenewalDeleteOne
- type CycleRenewalGroupBy
- func (_g *CycleRenewalGroupBy) Aggregate(fns ...AggregateFunc) *CycleRenewalGroupBy
- func (s *CycleRenewalGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleRenewalGroupBy) BoolX(ctx context.Context) bool
- func (s *CycleRenewalGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleRenewalGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CycleRenewalGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleRenewalGroupBy) Float64X(ctx context.Context) float64
- func (s *CycleRenewalGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleRenewalGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CycleRenewalGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CycleRenewalGroupBy) IntX(ctx context.Context) int
- func (s *CycleRenewalGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CycleRenewalGroupBy) IntsX(ctx context.Context) []int
- func (_g *CycleRenewalGroupBy) Scan(ctx context.Context, v any) error
- func (s *CycleRenewalGroupBy) ScanX(ctx context.Context, v any)
- func (s *CycleRenewalGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CycleRenewalGroupBy) StringX(ctx context.Context) string
- func (s *CycleRenewalGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CycleRenewalGroupBy) StringsX(ctx context.Context) []string
- type CycleRenewalMutation
- func (m *CycleRenewalMutation) AddExtendDay(i int8)
- func (m *CycleRenewalMutation) AddExtendPrice(f float64)
- func (m *CycleRenewalMutation) AddField(name string, value ent.Value) error
- func (m *CycleRenewalMutation) AddResourceType(i int)
- func (m *CycleRenewalMutation) AddState(i int8)
- func (m *CycleRenewalMutation) AddedEdges() []string
- func (m *CycleRenewalMutation) AddedExtendDay() (r int8, exists bool)
- func (m *CycleRenewalMutation) AddedExtendPrice() (r float64, exists bool)
- func (m *CycleRenewalMutation) AddedField(name string) (ent.Value, bool)
- func (m *CycleRenewalMutation) AddedFields() []string
- func (m *CycleRenewalMutation) AddedIDs(name string) []ent.Value
- func (m *CycleRenewalMutation) AddedResourceType() (r int, exists bool)
- func (m *CycleRenewalMutation) AddedState() (r int8, exists bool)
- func (m *CycleRenewalMutation) AutoRenewal() (r bool, exists bool)
- func (m *CycleRenewalMutation) ClearDueTime()
- func (m *CycleRenewalMutation) ClearEdge(name string) error
- func (m *CycleRenewalMutation) ClearField(name string) error
- func (m *CycleRenewalMutation) ClearRenewalTime()
- func (m *CycleRenewalMutation) ClearedEdges() []string
- func (m *CycleRenewalMutation) ClearedFields() []string
- func (m CycleRenewalMutation) Client() *Client
- func (m *CycleRenewalMutation) DueTime() (r time.Time, exists bool)
- func (m *CycleRenewalMutation) DueTimeCleared() bool
- func (m *CycleRenewalMutation) EdgeCleared(name string) bool
- func (m *CycleRenewalMutation) ExtendDay() (r int8, exists bool)
- func (m *CycleRenewalMutation) ExtendPrice() (r float64, exists bool)
- func (m *CycleRenewalMutation) Field(name string) (ent.Value, bool)
- func (m *CycleRenewalMutation) FieldCleared(name string) bool
- func (m *CycleRenewalMutation) Fields() []string
- func (m *CycleRenewalMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *CycleRenewalMutation) ID() (id uuid.UUID, exists bool)
- func (m *CycleRenewalMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CycleRenewalMutation) OldAutoRenewal(ctx context.Context) (v bool, err error)
- func (m *CycleRenewalMutation) OldDueTime(ctx context.Context) (v *time.Time, err error)
- func (m *CycleRenewalMutation) OldExtendDay(ctx context.Context) (v int8, err error)
- func (m *CycleRenewalMutation) OldExtendPrice(ctx context.Context) (v float64, err error)
- func (m *CycleRenewalMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CycleRenewalMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleRenewalMutation) OldProductDesc(ctx context.Context) (v string, err error)
- func (m *CycleRenewalMutation) OldProductName(ctx context.Context) (v string, err error)
- func (m *CycleRenewalMutation) OldRenewalTime(ctx context.Context) (v *time.Time, err error)
- func (m *CycleRenewalMutation) OldResourceID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleRenewalMutation) OldResourceType(ctx context.Context) (v int, err error)
- func (m *CycleRenewalMutation) OldState(ctx context.Context) (v int8, err error)
- func (m *CycleRenewalMutation) Op() Op
- func (m *CycleRenewalMutation) ProductDesc() (r string, exists bool)
- func (m *CycleRenewalMutation) ProductName() (r string, exists bool)
- func (m *CycleRenewalMutation) RemovedEdges() []string
- func (m *CycleRenewalMutation) RemovedIDs(name string) []ent.Value
- func (m *CycleRenewalMutation) RenewalTime() (r time.Time, exists bool)
- func (m *CycleRenewalMutation) RenewalTimeCleared() bool
- func (m *CycleRenewalMutation) ResetAutoRenewal()
- func (m *CycleRenewalMutation) ResetDueTime()
- func (m *CycleRenewalMutation) ResetEdge(name string) error
- func (m *CycleRenewalMutation) ResetExtendDay()
- func (m *CycleRenewalMutation) ResetExtendPrice()
- func (m *CycleRenewalMutation) ResetField(name string) error
- func (m *CycleRenewalMutation) ResetFkUserID()
- func (m *CycleRenewalMutation) ResetProductDesc()
- func (m *CycleRenewalMutation) ResetProductName()
- func (m *CycleRenewalMutation) ResetRenewalTime()
- func (m *CycleRenewalMutation) ResetResourceID()
- func (m *CycleRenewalMutation) ResetResourceType()
- func (m *CycleRenewalMutation) ResetState()
- func (m *CycleRenewalMutation) ResourceID() (r uuid.UUID, exists bool)
- func (m *CycleRenewalMutation) ResourceType() (r int, exists bool)
- func (m *CycleRenewalMutation) SetAutoRenewal(b bool)
- func (m *CycleRenewalMutation) SetDueTime(t time.Time)
- func (m *CycleRenewalMutation) SetExtendDay(i int8)
- func (m *CycleRenewalMutation) SetExtendPrice(f float64)
- func (m *CycleRenewalMutation) SetField(name string, value ent.Value) error
- func (m *CycleRenewalMutation) SetFkUserID(u uuid.UUID)
- func (m *CycleRenewalMutation) SetID(id uuid.UUID)
- func (m *CycleRenewalMutation) SetOp(op Op)
- func (m *CycleRenewalMutation) SetProductDesc(s string)
- func (m *CycleRenewalMutation) SetProductName(s string)
- func (m *CycleRenewalMutation) SetRenewalTime(t time.Time)
- func (m *CycleRenewalMutation) SetResourceID(u uuid.UUID)
- func (m *CycleRenewalMutation) SetResourceType(i int)
- func (m *CycleRenewalMutation) SetState(i int8)
- func (m *CycleRenewalMutation) State() (r int8, exists bool)
- func (m CycleRenewalMutation) Tx() (*Tx, error)
- func (m *CycleRenewalMutation) Type() string
- func (m *CycleRenewalMutation) Where(ps ...predicate.CycleRenewal)
- func (m *CycleRenewalMutation) WhereP(ps ...func(*sql.Selector))
- type CycleRenewalQuery
- func (_q *CycleRenewalQuery) Aggregate(fns ...AggregateFunc) *CycleRenewalSelect
- func (_q *CycleRenewalQuery) All(ctx context.Context) ([]*CycleRenewal, error)
- func (_q *CycleRenewalQuery) AllX(ctx context.Context) []*CycleRenewal
- func (_q *CycleRenewalQuery) Clone() *CycleRenewalQuery
- func (_q *CycleRenewalQuery) Count(ctx context.Context) (int, error)
- func (_q *CycleRenewalQuery) CountX(ctx context.Context) int
- func (_q *CycleRenewalQuery) Exist(ctx context.Context) (bool, error)
- func (_q *CycleRenewalQuery) ExistX(ctx context.Context) bool
- func (_q *CycleRenewalQuery) First(ctx context.Context) (*CycleRenewal, error)
- func (_q *CycleRenewalQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleRenewalQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *CycleRenewalQuery) FirstX(ctx context.Context) *CycleRenewal
- func (_q *CycleRenewalQuery) GroupBy(field string, fields ...string) *CycleRenewalGroupBy
- func (_q *CycleRenewalQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *CycleRenewalQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *CycleRenewalQuery) Limit(limit int) *CycleRenewalQuery
- func (_q *CycleRenewalQuery) Offset(offset int) *CycleRenewalQuery
- func (_q *CycleRenewalQuery) Only(ctx context.Context) (*CycleRenewal, error)
- func (_q *CycleRenewalQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleRenewalQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *CycleRenewalQuery) OnlyX(ctx context.Context) *CycleRenewal
- func (_q *CycleRenewalQuery) Order(o ...cyclerenewal.OrderOption) *CycleRenewalQuery
- func (_q *CycleRenewalQuery) Select(fields ...string) *CycleRenewalSelect
- func (_q *CycleRenewalQuery) Unique(unique bool) *CycleRenewalQuery
- func (_q *CycleRenewalQuery) Where(ps ...predicate.CycleRenewal) *CycleRenewalQuery
- type CycleRenewalSelect
- func (_s *CycleRenewalSelect) Aggregate(fns ...AggregateFunc) *CycleRenewalSelect
- func (s *CycleRenewalSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleRenewalSelect) BoolX(ctx context.Context) bool
- func (s *CycleRenewalSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleRenewalSelect) BoolsX(ctx context.Context) []bool
- func (s *CycleRenewalSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleRenewalSelect) Float64X(ctx context.Context) float64
- func (s *CycleRenewalSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleRenewalSelect) Float64sX(ctx context.Context) []float64
- func (s *CycleRenewalSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CycleRenewalSelect) IntX(ctx context.Context) int
- func (s *CycleRenewalSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CycleRenewalSelect) IntsX(ctx context.Context) []int
- func (_s *CycleRenewalSelect) Scan(ctx context.Context, v any) error
- func (s *CycleRenewalSelect) ScanX(ctx context.Context, v any)
- func (s *CycleRenewalSelect) String(ctx context.Context) (_ string, err error)
- func (s *CycleRenewalSelect) StringX(ctx context.Context) string
- func (s *CycleRenewalSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CycleRenewalSelect) StringsX(ctx context.Context) []string
- type CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) AddExtendDay(v int8) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) AddExtendPrice(v float64) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) AddResourceType(v int) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) AddState(v int8) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) ClearDueTime() *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) ClearRenewalTime() *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) Exec(ctx context.Context) error
- func (_u *CycleRenewalUpdate) ExecX(ctx context.Context)
- func (_u *CycleRenewalUpdate) Mutation() *CycleRenewalMutation
- func (_u *CycleRenewalUpdate) Save(ctx context.Context) (int, error)
- func (_u *CycleRenewalUpdate) SaveX(ctx context.Context) int
- func (_u *CycleRenewalUpdate) SetAutoRenewal(v bool) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetDueTime(v time.Time) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetExtendDay(v int8) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetExtendPrice(v float64) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetFkUserID(v uuid.UUID) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableAutoRenewal(v *bool) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableDueTime(v *time.Time) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableExtendDay(v *int8) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableExtendPrice(v *float64) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableProductDesc(v *string) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableProductName(v *string) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableRenewalTime(v *time.Time) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableResourceID(v *uuid.UUID) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableResourceType(v *int) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetNillableState(v *int8) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetProductDesc(v string) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetProductName(v string) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetRenewalTime(v time.Time) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetResourceID(v uuid.UUID) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetResourceType(v int) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) SetState(v int8) *CycleRenewalUpdate
- func (_u *CycleRenewalUpdate) Where(ps ...predicate.CycleRenewal) *CycleRenewalUpdate
- type CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) AddExtendDay(v int8) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) AddExtendPrice(v float64) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) AddResourceType(v int) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) AddState(v int8) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) ClearDueTime() *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) ClearRenewalTime() *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) Exec(ctx context.Context) error
- func (_u *CycleRenewalUpdateOne) ExecX(ctx context.Context)
- func (_u *CycleRenewalUpdateOne) Mutation() *CycleRenewalMutation
- func (_u *CycleRenewalUpdateOne) Save(ctx context.Context) (*CycleRenewal, error)
- func (_u *CycleRenewalUpdateOne) SaveX(ctx context.Context) *CycleRenewal
- func (_u *CycleRenewalUpdateOne) Select(field string, fields ...string) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetAutoRenewal(v bool) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetDueTime(v time.Time) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetExtendDay(v int8) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetExtendPrice(v float64) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetFkUserID(v uuid.UUID) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableAutoRenewal(v *bool) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableDueTime(v *time.Time) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableExtendDay(v *int8) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableExtendPrice(v *float64) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableProductDesc(v *string) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableProductName(v *string) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableRenewalTime(v *time.Time) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableResourceID(v *uuid.UUID) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableResourceType(v *int) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetNillableState(v *int8) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetProductDesc(v string) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetProductName(v string) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetRenewalTime(v time.Time) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetResourceID(v uuid.UUID) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetResourceType(v int) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) SetState(v int8) *CycleRenewalUpdateOne
- func (_u *CycleRenewalUpdateOne) Where(ps ...predicate.CycleRenewal) *CycleRenewalUpdateOne
- type CycleRenewals
- type CycleSelect
- func (_s *CycleSelect) Aggregate(fns ...AggregateFunc) *CycleSelect
- func (s *CycleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleSelect) BoolX(ctx context.Context) bool
- func (s *CycleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleSelect) BoolsX(ctx context.Context) []bool
- func (s *CycleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleSelect) Float64X(ctx context.Context) float64
- func (s *CycleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleSelect) Float64sX(ctx context.Context) []float64
- func (s *CycleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CycleSelect) IntX(ctx context.Context) int
- func (s *CycleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CycleSelect) IntsX(ctx context.Context) []int
- func (_s *CycleSelect) Scan(ctx context.Context, v any) error
- func (s *CycleSelect) ScanX(ctx context.Context, v any)
- func (s *CycleSelect) String(ctx context.Context) (_ string, err error)
- func (s *CycleSelect) StringX(ctx context.Context) string
- func (s *CycleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CycleSelect) StringsX(ctx context.Context) []string
- type CycleTransaction
- type CycleTransactionClient
- func (c *CycleTransactionClient) Create() *CycleTransactionCreate
- func (c *CycleTransactionClient) CreateBulk(builders ...*CycleTransactionCreate) *CycleTransactionCreateBulk
- func (c *CycleTransactionClient) Delete() *CycleTransactionDelete
- func (c *CycleTransactionClient) DeleteOne(_m *CycleTransaction) *CycleTransactionDeleteOne
- func (c *CycleTransactionClient) DeleteOneID(id uuid.UUID) *CycleTransactionDeleteOne
- func (c *CycleTransactionClient) Get(ctx context.Context, id uuid.UUID) (*CycleTransaction, error)
- func (c *CycleTransactionClient) GetX(ctx context.Context, id uuid.UUID) *CycleTransaction
- func (c *CycleTransactionClient) Hooks() []Hook
- func (c *CycleTransactionClient) Intercept(interceptors ...Interceptor)
- func (c *CycleTransactionClient) Interceptors() []Interceptor
- func (c *CycleTransactionClient) MapCreateBulk(slice any, setFunc func(*CycleTransactionCreate, int)) *CycleTransactionCreateBulk
- func (c *CycleTransactionClient) Query() *CycleTransactionQuery
- func (c *CycleTransactionClient) Update() *CycleTransactionUpdate
- func (c *CycleTransactionClient) UpdateOne(_m *CycleTransaction) *CycleTransactionUpdateOne
- func (c *CycleTransactionClient) UpdateOneID(id uuid.UUID) *CycleTransactionUpdateOne
- func (c *CycleTransactionClient) Use(hooks ...Hook)
- type CycleTransactionCreate
- func (_c *CycleTransactionCreate) Exec(ctx context.Context) error
- func (_c *CycleTransactionCreate) ExecX(ctx context.Context)
- func (_c *CycleTransactionCreate) Mutation() *CycleTransactionMutation
- func (_c *CycleTransactionCreate) Save(ctx context.Context) (*CycleTransaction, error)
- func (_c *CycleTransactionCreate) SaveX(ctx context.Context) *CycleTransaction
- func (_c *CycleTransactionCreate) SetBalance(v float64) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetCycle(v float64) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetFkCycleID(v uuid.UUID) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetFkCycleOrderID(v uuid.UUID) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetFkCycleRechargeID(v uuid.UUID) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetFkUserID(v uuid.UUID) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetID(v uuid.UUID) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetNillableID(v *uuid.UUID) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetOperation(v string) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetOperationTime(v time.Time) *CycleTransactionCreate
- func (_c *CycleTransactionCreate) SetSymbol(v string) *CycleTransactionCreate
- type CycleTransactionCreateBulk
- func (_c *CycleTransactionCreateBulk) Exec(ctx context.Context) error
- func (_c *CycleTransactionCreateBulk) ExecX(ctx context.Context)
- func (_c *CycleTransactionCreateBulk) Save(ctx context.Context) ([]*CycleTransaction, error)
- func (_c *CycleTransactionCreateBulk) SaveX(ctx context.Context) []*CycleTransaction
- type CycleTransactionDelete
- type CycleTransactionDeleteOne
- type CycleTransactionGroupBy
- func (_g *CycleTransactionGroupBy) Aggregate(fns ...AggregateFunc) *CycleTransactionGroupBy
- func (s *CycleTransactionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleTransactionGroupBy) BoolX(ctx context.Context) bool
- func (s *CycleTransactionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleTransactionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CycleTransactionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleTransactionGroupBy) Float64X(ctx context.Context) float64
- func (s *CycleTransactionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleTransactionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CycleTransactionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CycleTransactionGroupBy) IntX(ctx context.Context) int
- func (s *CycleTransactionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CycleTransactionGroupBy) IntsX(ctx context.Context) []int
- func (_g *CycleTransactionGroupBy) Scan(ctx context.Context, v any) error
- func (s *CycleTransactionGroupBy) ScanX(ctx context.Context, v any)
- func (s *CycleTransactionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CycleTransactionGroupBy) StringX(ctx context.Context) string
- func (s *CycleTransactionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CycleTransactionGroupBy) StringsX(ctx context.Context) []string
- type CycleTransactionMutation
- func (m *CycleTransactionMutation) AddBalance(f float64)
- func (m *CycleTransactionMutation) AddCycle(f float64)
- func (m *CycleTransactionMutation) AddField(name string, value ent.Value) error
- func (m *CycleTransactionMutation) AddedBalance() (r float64, exists bool)
- func (m *CycleTransactionMutation) AddedCycle() (r float64, exists bool)
- func (m *CycleTransactionMutation) AddedEdges() []string
- func (m *CycleTransactionMutation) AddedField(name string) (ent.Value, bool)
- func (m *CycleTransactionMutation) AddedFields() []string
- func (m *CycleTransactionMutation) AddedIDs(name string) []ent.Value
- func (m *CycleTransactionMutation) Balance() (r float64, exists bool)
- func (m *CycleTransactionMutation) ClearEdge(name string) error
- func (m *CycleTransactionMutation) ClearField(name string) error
- func (m *CycleTransactionMutation) ClearedEdges() []string
- func (m *CycleTransactionMutation) ClearedFields() []string
- func (m CycleTransactionMutation) Client() *Client
- func (m *CycleTransactionMutation) Cycle() (r float64, exists bool)
- func (m *CycleTransactionMutation) EdgeCleared(name string) bool
- func (m *CycleTransactionMutation) Field(name string) (ent.Value, bool)
- func (m *CycleTransactionMutation) FieldCleared(name string) bool
- func (m *CycleTransactionMutation) Fields() []string
- func (m *CycleTransactionMutation) FkCycleID() (r uuid.UUID, exists bool)
- func (m *CycleTransactionMutation) FkCycleOrderID() (r uuid.UUID, exists bool)
- func (m *CycleTransactionMutation) FkCycleRechargeID() (r uuid.UUID, exists bool)
- func (m *CycleTransactionMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *CycleTransactionMutation) ID() (id uuid.UUID, exists bool)
- func (m *CycleTransactionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CycleTransactionMutation) OldBalance(ctx context.Context) (v float64, err error)
- func (m *CycleTransactionMutation) OldCycle(ctx context.Context) (v float64, err error)
- func (m *CycleTransactionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CycleTransactionMutation) OldFkCycleID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleTransactionMutation) OldFkCycleOrderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleTransactionMutation) OldFkCycleRechargeID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleTransactionMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CycleTransactionMutation) OldOperation(ctx context.Context) (v string, err error)
- func (m *CycleTransactionMutation) OldOperationTime(ctx context.Context) (v time.Time, err error)
- func (m *CycleTransactionMutation) OldSymbol(ctx context.Context) (v string, err error)
- func (m *CycleTransactionMutation) Op() Op
- func (m *CycleTransactionMutation) Operation() (r string, exists bool)
- func (m *CycleTransactionMutation) OperationTime() (r time.Time, exists bool)
- func (m *CycleTransactionMutation) RemovedEdges() []string
- func (m *CycleTransactionMutation) RemovedIDs(name string) []ent.Value
- func (m *CycleTransactionMutation) ResetBalance()
- func (m *CycleTransactionMutation) ResetCycle()
- func (m *CycleTransactionMutation) ResetEdge(name string) error
- func (m *CycleTransactionMutation) ResetField(name string) error
- func (m *CycleTransactionMutation) ResetFkCycleID()
- func (m *CycleTransactionMutation) ResetFkCycleOrderID()
- func (m *CycleTransactionMutation) ResetFkCycleRechargeID()
- func (m *CycleTransactionMutation) ResetFkUserID()
- func (m *CycleTransactionMutation) ResetOperation()
- func (m *CycleTransactionMutation) ResetOperationTime()
- func (m *CycleTransactionMutation) ResetSymbol()
- func (m *CycleTransactionMutation) SetBalance(f float64)
- func (m *CycleTransactionMutation) SetCycle(f float64)
- func (m *CycleTransactionMutation) SetField(name string, value ent.Value) error
- func (m *CycleTransactionMutation) SetFkCycleID(u uuid.UUID)
- func (m *CycleTransactionMutation) SetFkCycleOrderID(u uuid.UUID)
- func (m *CycleTransactionMutation) SetFkCycleRechargeID(u uuid.UUID)
- func (m *CycleTransactionMutation) SetFkUserID(u uuid.UUID)
- func (m *CycleTransactionMutation) SetID(id uuid.UUID)
- func (m *CycleTransactionMutation) SetOp(op Op)
- func (m *CycleTransactionMutation) SetOperation(s string)
- func (m *CycleTransactionMutation) SetOperationTime(t time.Time)
- func (m *CycleTransactionMutation) SetSymbol(s string)
- func (m *CycleTransactionMutation) Symbol() (r string, exists bool)
- func (m CycleTransactionMutation) Tx() (*Tx, error)
- func (m *CycleTransactionMutation) Type() string
- func (m *CycleTransactionMutation) Where(ps ...predicate.CycleTransaction)
- func (m *CycleTransactionMutation) WhereP(ps ...func(*sql.Selector))
- type CycleTransactionQuery
- func (_q *CycleTransactionQuery) Aggregate(fns ...AggregateFunc) *CycleTransactionSelect
- func (_q *CycleTransactionQuery) All(ctx context.Context) ([]*CycleTransaction, error)
- func (_q *CycleTransactionQuery) AllX(ctx context.Context) []*CycleTransaction
- func (_q *CycleTransactionQuery) Clone() *CycleTransactionQuery
- func (_q *CycleTransactionQuery) Count(ctx context.Context) (int, error)
- func (_q *CycleTransactionQuery) CountX(ctx context.Context) int
- func (_q *CycleTransactionQuery) Exist(ctx context.Context) (bool, error)
- func (_q *CycleTransactionQuery) ExistX(ctx context.Context) bool
- func (_q *CycleTransactionQuery) First(ctx context.Context) (*CycleTransaction, error)
- func (_q *CycleTransactionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleTransactionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *CycleTransactionQuery) FirstX(ctx context.Context) *CycleTransaction
- func (_q *CycleTransactionQuery) GroupBy(field string, fields ...string) *CycleTransactionGroupBy
- func (_q *CycleTransactionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *CycleTransactionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *CycleTransactionQuery) Limit(limit int) *CycleTransactionQuery
- func (_q *CycleTransactionQuery) Offset(offset int) *CycleTransactionQuery
- func (_q *CycleTransactionQuery) Only(ctx context.Context) (*CycleTransaction, error)
- func (_q *CycleTransactionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CycleTransactionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *CycleTransactionQuery) OnlyX(ctx context.Context) *CycleTransaction
- func (_q *CycleTransactionQuery) Order(o ...cycletransaction.OrderOption) *CycleTransactionQuery
- func (_q *CycleTransactionQuery) Select(fields ...string) *CycleTransactionSelect
- func (_q *CycleTransactionQuery) Unique(unique bool) *CycleTransactionQuery
- func (_q *CycleTransactionQuery) Where(ps ...predicate.CycleTransaction) *CycleTransactionQuery
- type CycleTransactionSelect
- func (_s *CycleTransactionSelect) Aggregate(fns ...AggregateFunc) *CycleTransactionSelect
- func (s *CycleTransactionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CycleTransactionSelect) BoolX(ctx context.Context) bool
- func (s *CycleTransactionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CycleTransactionSelect) BoolsX(ctx context.Context) []bool
- func (s *CycleTransactionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CycleTransactionSelect) Float64X(ctx context.Context) float64
- func (s *CycleTransactionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CycleTransactionSelect) Float64sX(ctx context.Context) []float64
- func (s *CycleTransactionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CycleTransactionSelect) IntX(ctx context.Context) int
- func (s *CycleTransactionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CycleTransactionSelect) IntsX(ctx context.Context) []int
- func (_s *CycleTransactionSelect) Scan(ctx context.Context, v any) error
- func (s *CycleTransactionSelect) ScanX(ctx context.Context, v any)
- func (s *CycleTransactionSelect) String(ctx context.Context) (_ string, err error)
- func (s *CycleTransactionSelect) StringX(ctx context.Context) string
- func (s *CycleTransactionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CycleTransactionSelect) StringsX(ctx context.Context) []string
- type CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) AddBalance(v float64) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) AddCycle(v float64) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) Exec(ctx context.Context) error
- func (_u *CycleTransactionUpdate) ExecX(ctx context.Context)
- func (_u *CycleTransactionUpdate) Mutation() *CycleTransactionMutation
- func (_u *CycleTransactionUpdate) Save(ctx context.Context) (int, error)
- func (_u *CycleTransactionUpdate) SaveX(ctx context.Context) int
- func (_u *CycleTransactionUpdate) SetBalance(v float64) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetCycle(v float64) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetFkCycleID(v uuid.UUID) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetFkCycleOrderID(v uuid.UUID) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetFkCycleRechargeID(v uuid.UUID) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetFkUserID(v uuid.UUID) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetNillableBalance(v *float64) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetNillableCycle(v *float64) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetNillableFkCycleID(v *uuid.UUID) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetNillableFkCycleOrderID(v *uuid.UUID) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetNillableFkCycleRechargeID(v *uuid.UUID) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetNillableOperation(v *string) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetNillableOperationTime(v *time.Time) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetNillableSymbol(v *string) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetOperation(v string) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetOperationTime(v time.Time) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) SetSymbol(v string) *CycleTransactionUpdate
- func (_u *CycleTransactionUpdate) Where(ps ...predicate.CycleTransaction) *CycleTransactionUpdate
- type CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) AddBalance(v float64) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) AddCycle(v float64) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) Exec(ctx context.Context) error
- func (_u *CycleTransactionUpdateOne) ExecX(ctx context.Context)
- func (_u *CycleTransactionUpdateOne) Mutation() *CycleTransactionMutation
- func (_u *CycleTransactionUpdateOne) Save(ctx context.Context) (*CycleTransaction, error)
- func (_u *CycleTransactionUpdateOne) SaveX(ctx context.Context) *CycleTransaction
- func (_u *CycleTransactionUpdateOne) Select(field string, fields ...string) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetBalance(v float64) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetCycle(v float64) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetFkCycleID(v uuid.UUID) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetFkCycleOrderID(v uuid.UUID) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetFkCycleRechargeID(v uuid.UUID) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetFkUserID(v uuid.UUID) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetNillableBalance(v *float64) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetNillableCycle(v *float64) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetNillableFkCycleID(v *uuid.UUID) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetNillableFkCycleOrderID(v *uuid.UUID) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetNillableFkCycleRechargeID(v *uuid.UUID) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetNillableOperation(v *string) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetNillableOperationTime(v *time.Time) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetNillableSymbol(v *string) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetOperation(v string) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetOperationTime(v time.Time) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) SetSymbol(v string) *CycleTransactionUpdateOne
- func (_u *CycleTransactionUpdateOne) Where(ps ...predicate.CycleTransaction) *CycleTransactionUpdateOne
- type CycleTransactions
- type CycleUpdate
- func (_u *CycleUpdate) AddCycle(v float64) *CycleUpdate
- func (_u *CycleUpdate) Exec(ctx context.Context) error
- func (_u *CycleUpdate) ExecX(ctx context.Context)
- func (_u *CycleUpdate) Mutation() *CycleMutation
- func (_u *CycleUpdate) Save(ctx context.Context) (int, error)
- func (_u *CycleUpdate) SaveX(ctx context.Context) int
- func (_u *CycleUpdate) SetCreateTime(v time.Time) *CycleUpdate
- func (_u *CycleUpdate) SetCycle(v float64) *CycleUpdate
- func (_u *CycleUpdate) SetFkUserID(v uuid.UUID) *CycleUpdate
- func (_u *CycleUpdate) SetNillableCreateTime(v *time.Time) *CycleUpdate
- func (_u *CycleUpdate) SetNillableCycle(v *float64) *CycleUpdate
- func (_u *CycleUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleUpdate
- func (_u *CycleUpdate) SetNillableUpdateTime(v *time.Time) *CycleUpdate
- func (_u *CycleUpdate) SetUpdateTime(v time.Time) *CycleUpdate
- func (_u *CycleUpdate) Where(ps ...predicate.Cycle) *CycleUpdate
- type CycleUpdateOne
- func (_u *CycleUpdateOne) AddCycle(v float64) *CycleUpdateOne
- func (_u *CycleUpdateOne) Exec(ctx context.Context) error
- func (_u *CycleUpdateOne) ExecX(ctx context.Context)
- func (_u *CycleUpdateOne) Mutation() *CycleMutation
- func (_u *CycleUpdateOne) Save(ctx context.Context) (*Cycle, error)
- func (_u *CycleUpdateOne) SaveX(ctx context.Context) *Cycle
- func (_u *CycleUpdateOne) Select(field string, fields ...string) *CycleUpdateOne
- func (_u *CycleUpdateOne) SetCreateTime(v time.Time) *CycleUpdateOne
- func (_u *CycleUpdateOne) SetCycle(v float64) *CycleUpdateOne
- func (_u *CycleUpdateOne) SetFkUserID(v uuid.UUID) *CycleUpdateOne
- func (_u *CycleUpdateOne) SetNillableCreateTime(v *time.Time) *CycleUpdateOne
- func (_u *CycleUpdateOne) SetNillableCycle(v *float64) *CycleUpdateOne
- func (_u *CycleUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleUpdateOne
- func (_u *CycleUpdateOne) SetNillableUpdateTime(v *time.Time) *CycleUpdateOne
- func (_u *CycleUpdateOne) SetUpdateTime(v time.Time) *CycleUpdateOne
- func (_u *CycleUpdateOne) Where(ps ...predicate.Cycle) *CycleUpdateOne
- type Cycles
- type DomainBinding
- type DomainBindingClient
- func (c *DomainBindingClient) Create() *DomainBindingCreate
- func (c *DomainBindingClient) CreateBulk(builders ...*DomainBindingCreate) *DomainBindingCreateBulk
- func (c *DomainBindingClient) Delete() *DomainBindingDelete
- func (c *DomainBindingClient) DeleteOne(_m *DomainBinding) *DomainBindingDeleteOne
- func (c *DomainBindingClient) DeleteOneID(id uuid.UUID) *DomainBindingDeleteOne
- func (c *DomainBindingClient) Get(ctx context.Context, id uuid.UUID) (*DomainBinding, error)
- func (c *DomainBindingClient) GetX(ctx context.Context, id uuid.UUID) *DomainBinding
- func (c *DomainBindingClient) Hooks() []Hook
- func (c *DomainBindingClient) Intercept(interceptors ...Interceptor)
- func (c *DomainBindingClient) Interceptors() []Interceptor
- func (c *DomainBindingClient) MapCreateBulk(slice any, setFunc func(*DomainBindingCreate, int)) *DomainBindingCreateBulk
- func (c *DomainBindingClient) Query() *DomainBindingQuery
- func (c *DomainBindingClient) Update() *DomainBindingUpdate
- func (c *DomainBindingClient) UpdateOne(_m *DomainBinding) *DomainBindingUpdateOne
- func (c *DomainBindingClient) UpdateOneID(id uuid.UUID) *DomainBindingUpdateOne
- func (c *DomainBindingClient) Use(hooks ...Hook)
- type DomainBindingCreate
- func (_c *DomainBindingCreate) Exec(ctx context.Context) error
- func (_c *DomainBindingCreate) ExecX(ctx context.Context)
- func (_c *DomainBindingCreate) Mutation() *DomainBindingMutation
- func (_c *DomainBindingCreate) Save(ctx context.Context) (*DomainBinding, error)
- func (_c *DomainBindingCreate) SaveX(ctx context.Context) *DomainBinding
- func (_c *DomainBindingCreate) SetCreateTime(v time.Time) *DomainBindingCreate
- func (_c *DomainBindingCreate) SetDomain(v string) *DomainBindingCreate
- func (_c *DomainBindingCreate) SetFkComputeInstanceID(v uuid.UUID) *DomainBindingCreate
- func (_c *DomainBindingCreate) SetFkNetworkMappingID(v uuid.UUID) *DomainBindingCreate
- func (_c *DomainBindingCreate) SetGatewayPort(v int32) *DomainBindingCreate
- func (_c *DomainBindingCreate) SetID(v uuid.UUID) *DomainBindingCreate
- func (_c *DomainBindingCreate) SetName(v string) *DomainBindingCreate
- func (_c *DomainBindingCreate) SetNillableID(v *uuid.UUID) *DomainBindingCreate
- func (_c *DomainBindingCreate) SetUserID(v uuid.UUID) *DomainBindingCreate
- type DomainBindingCreateBulk
- type DomainBindingDelete
- type DomainBindingDeleteOne
- type DomainBindingGroupBy
- func (_g *DomainBindingGroupBy) Aggregate(fns ...AggregateFunc) *DomainBindingGroupBy
- func (s *DomainBindingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DomainBindingGroupBy) BoolX(ctx context.Context) bool
- func (s *DomainBindingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DomainBindingGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DomainBindingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DomainBindingGroupBy) Float64X(ctx context.Context) float64
- func (s *DomainBindingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DomainBindingGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DomainBindingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DomainBindingGroupBy) IntX(ctx context.Context) int
- func (s *DomainBindingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DomainBindingGroupBy) IntsX(ctx context.Context) []int
- func (_g *DomainBindingGroupBy) Scan(ctx context.Context, v any) error
- func (s *DomainBindingGroupBy) ScanX(ctx context.Context, v any)
- func (s *DomainBindingGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DomainBindingGroupBy) StringX(ctx context.Context) string
- func (s *DomainBindingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DomainBindingGroupBy) StringsX(ctx context.Context) []string
- type DomainBindingMutation
- func (m *DomainBindingMutation) AddField(name string, value ent.Value) error
- func (m *DomainBindingMutation) AddGatewayPort(i int32)
- func (m *DomainBindingMutation) AddedEdges() []string
- func (m *DomainBindingMutation) AddedField(name string) (ent.Value, bool)
- func (m *DomainBindingMutation) AddedFields() []string
- func (m *DomainBindingMutation) AddedGatewayPort() (r int32, exists bool)
- func (m *DomainBindingMutation) AddedIDs(name string) []ent.Value
- func (m *DomainBindingMutation) ClearEdge(name string) error
- func (m *DomainBindingMutation) ClearField(name string) error
- func (m *DomainBindingMutation) ClearedEdges() []string
- func (m *DomainBindingMutation) ClearedFields() []string
- func (m DomainBindingMutation) Client() *Client
- func (m *DomainBindingMutation) CreateTime() (r time.Time, exists bool)
- func (m *DomainBindingMutation) Domain() (r string, exists bool)
- func (m *DomainBindingMutation) EdgeCleared(name string) bool
- func (m *DomainBindingMutation) Field(name string) (ent.Value, bool)
- func (m *DomainBindingMutation) FieldCleared(name string) bool
- func (m *DomainBindingMutation) Fields() []string
- func (m *DomainBindingMutation) FkComputeInstanceID() (r uuid.UUID, exists bool)
- func (m *DomainBindingMutation) FkNetworkMappingID() (r uuid.UUID, exists bool)
- func (m *DomainBindingMutation) GatewayPort() (r int32, exists bool)
- func (m *DomainBindingMutation) ID() (id uuid.UUID, exists bool)
- func (m *DomainBindingMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *DomainBindingMutation) Name() (r string, exists bool)
- func (m *DomainBindingMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *DomainBindingMutation) OldDomain(ctx context.Context) (v string, err error)
- func (m *DomainBindingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DomainBindingMutation) OldFkComputeInstanceID(ctx context.Context) (v uuid.UUID, err error)
- func (m *DomainBindingMutation) OldFkNetworkMappingID(ctx context.Context) (v uuid.UUID, err error)
- func (m *DomainBindingMutation) OldGatewayPort(ctx context.Context) (v int32, err error)
- func (m *DomainBindingMutation) OldName(ctx context.Context) (v string, err error)
- func (m *DomainBindingMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *DomainBindingMutation) Op() Op
- func (m *DomainBindingMutation) RemovedEdges() []string
- func (m *DomainBindingMutation) RemovedIDs(name string) []ent.Value
- func (m *DomainBindingMutation) ResetCreateTime()
- func (m *DomainBindingMutation) ResetDomain()
- func (m *DomainBindingMutation) ResetEdge(name string) error
- func (m *DomainBindingMutation) ResetField(name string) error
- func (m *DomainBindingMutation) ResetFkComputeInstanceID()
- func (m *DomainBindingMutation) ResetFkNetworkMappingID()
- func (m *DomainBindingMutation) ResetGatewayPort()
- func (m *DomainBindingMutation) ResetName()
- func (m *DomainBindingMutation) ResetUserID()
- func (m *DomainBindingMutation) SetCreateTime(t time.Time)
- func (m *DomainBindingMutation) SetDomain(s string)
- func (m *DomainBindingMutation) SetField(name string, value ent.Value) error
- func (m *DomainBindingMutation) SetFkComputeInstanceID(u uuid.UUID)
- func (m *DomainBindingMutation) SetFkNetworkMappingID(u uuid.UUID)
- func (m *DomainBindingMutation) SetGatewayPort(i int32)
- func (m *DomainBindingMutation) SetID(id uuid.UUID)
- func (m *DomainBindingMutation) SetName(s string)
- func (m *DomainBindingMutation) SetOp(op Op)
- func (m *DomainBindingMutation) SetUserID(u uuid.UUID)
- func (m DomainBindingMutation) Tx() (*Tx, error)
- func (m *DomainBindingMutation) Type() string
- func (m *DomainBindingMutation) UserID() (r uuid.UUID, exists bool)
- func (m *DomainBindingMutation) Where(ps ...predicate.DomainBinding)
- func (m *DomainBindingMutation) WhereP(ps ...func(*sql.Selector))
- type DomainBindingQuery
- func (_q *DomainBindingQuery) Aggregate(fns ...AggregateFunc) *DomainBindingSelect
- func (_q *DomainBindingQuery) All(ctx context.Context) ([]*DomainBinding, error)
- func (_q *DomainBindingQuery) AllX(ctx context.Context) []*DomainBinding
- func (_q *DomainBindingQuery) Clone() *DomainBindingQuery
- func (_q *DomainBindingQuery) Count(ctx context.Context) (int, error)
- func (_q *DomainBindingQuery) CountX(ctx context.Context) int
- func (_q *DomainBindingQuery) Exist(ctx context.Context) (bool, error)
- func (_q *DomainBindingQuery) ExistX(ctx context.Context) bool
- func (_q *DomainBindingQuery) First(ctx context.Context) (*DomainBinding, error)
- func (_q *DomainBindingQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *DomainBindingQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *DomainBindingQuery) FirstX(ctx context.Context) *DomainBinding
- func (_q *DomainBindingQuery) GroupBy(field string, fields ...string) *DomainBindingGroupBy
- func (_q *DomainBindingQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *DomainBindingQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *DomainBindingQuery) Limit(limit int) *DomainBindingQuery
- func (_q *DomainBindingQuery) Offset(offset int) *DomainBindingQuery
- func (_q *DomainBindingQuery) Only(ctx context.Context) (*DomainBinding, error)
- func (_q *DomainBindingQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *DomainBindingQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *DomainBindingQuery) OnlyX(ctx context.Context) *DomainBinding
- func (_q *DomainBindingQuery) Order(o ...domainbinding.OrderOption) *DomainBindingQuery
- func (_q *DomainBindingQuery) Select(fields ...string) *DomainBindingSelect
- func (_q *DomainBindingQuery) Unique(unique bool) *DomainBindingQuery
- func (_q *DomainBindingQuery) Where(ps ...predicate.DomainBinding) *DomainBindingQuery
- type DomainBindingSelect
- func (_s *DomainBindingSelect) Aggregate(fns ...AggregateFunc) *DomainBindingSelect
- func (s *DomainBindingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DomainBindingSelect) BoolX(ctx context.Context) bool
- func (s *DomainBindingSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DomainBindingSelect) BoolsX(ctx context.Context) []bool
- func (s *DomainBindingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DomainBindingSelect) Float64X(ctx context.Context) float64
- func (s *DomainBindingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DomainBindingSelect) Float64sX(ctx context.Context) []float64
- func (s *DomainBindingSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DomainBindingSelect) IntX(ctx context.Context) int
- func (s *DomainBindingSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DomainBindingSelect) IntsX(ctx context.Context) []int
- func (_s *DomainBindingSelect) Scan(ctx context.Context, v any) error
- func (s *DomainBindingSelect) ScanX(ctx context.Context, v any)
- func (s *DomainBindingSelect) String(ctx context.Context) (_ string, err error)
- func (s *DomainBindingSelect) StringX(ctx context.Context) string
- func (s *DomainBindingSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DomainBindingSelect) StringsX(ctx context.Context) []string
- type DomainBindingUpdate
- func (_u *DomainBindingUpdate) AddGatewayPort(v int32) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) Exec(ctx context.Context) error
- func (_u *DomainBindingUpdate) ExecX(ctx context.Context)
- func (_u *DomainBindingUpdate) Mutation() *DomainBindingMutation
- func (_u *DomainBindingUpdate) Save(ctx context.Context) (int, error)
- func (_u *DomainBindingUpdate) SaveX(ctx context.Context) int
- func (_u *DomainBindingUpdate) SetCreateTime(v time.Time) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetDomain(v string) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetFkComputeInstanceID(v uuid.UUID) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetFkNetworkMappingID(v uuid.UUID) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetGatewayPort(v int32) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetName(v string) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetNillableCreateTime(v *time.Time) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetNillableDomain(v *string) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetNillableFkComputeInstanceID(v *uuid.UUID) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetNillableFkNetworkMappingID(v *uuid.UUID) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetNillableGatewayPort(v *int32) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetNillableName(v *string) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetNillableUserID(v *uuid.UUID) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) SetUserID(v uuid.UUID) *DomainBindingUpdate
- func (_u *DomainBindingUpdate) Where(ps ...predicate.DomainBinding) *DomainBindingUpdate
- type DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) AddGatewayPort(v int32) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) Exec(ctx context.Context) error
- func (_u *DomainBindingUpdateOne) ExecX(ctx context.Context)
- func (_u *DomainBindingUpdateOne) Mutation() *DomainBindingMutation
- func (_u *DomainBindingUpdateOne) Save(ctx context.Context) (*DomainBinding, error)
- func (_u *DomainBindingUpdateOne) SaveX(ctx context.Context) *DomainBinding
- func (_u *DomainBindingUpdateOne) Select(field string, fields ...string) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetCreateTime(v time.Time) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetDomain(v string) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetFkComputeInstanceID(v uuid.UUID) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetFkNetworkMappingID(v uuid.UUID) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetGatewayPort(v int32) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetName(v string) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetNillableCreateTime(v *time.Time) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetNillableDomain(v *string) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetNillableFkComputeInstanceID(v *uuid.UUID) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetNillableFkNetworkMappingID(v *uuid.UUID) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetNillableGatewayPort(v *int32) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetNillableName(v *string) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetNillableUserID(v *uuid.UUID) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) SetUserID(v uuid.UUID) *DomainBindingUpdateOne
- func (_u *DomainBindingUpdateOne) Where(ps ...predicate.DomainBinding) *DomainBindingUpdateOne
- type DomainBindings
- 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(_m *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) MapCreateBulk(slice any, setFunc func(*EmployeeCreate, int)) *EmployeeCreateBulk
- func (c *EmployeeClient) Query() *EmployeeQuery
- func (c *EmployeeClient) Update() *EmployeeUpdate
- func (c *EmployeeClient) UpdateOne(_m *Employee) *EmployeeUpdateOne
- func (c *EmployeeClient) UpdateOneID(id int) *EmployeeUpdateOne
- func (c *EmployeeClient) Use(hooks ...Hook)
- type EmployeeCreate
- func (_c *EmployeeCreate) Exec(ctx context.Context) error
- func (_c *EmployeeCreate) ExecX(ctx context.Context)
- func (_c *EmployeeCreate) Mutation() *EmployeeMutation
- func (_c *EmployeeCreate) Save(ctx context.Context) (*Employee, error)
- func (_c *EmployeeCreate) SaveX(ctx context.Context) *Employee
- func (_c *EmployeeCreate) SetAge(v int32) *EmployeeCreate
- func (_c *EmployeeCreate) SetName(v string) *EmployeeCreate
- func (_c *EmployeeCreate) SetNillableAge(v *int32) *EmployeeCreate
- type EmployeeCreateBulk
- type EmployeeDelete
- type EmployeeDeleteOne
- type EmployeeGroupBy
- func (_g *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 (_g *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 (_q *EmployeeQuery) Aggregate(fns ...AggregateFunc) *EmployeeSelect
- func (_q *EmployeeQuery) All(ctx context.Context) ([]*Employee, error)
- func (_q *EmployeeQuery) AllX(ctx context.Context) []*Employee
- func (_q *EmployeeQuery) Clone() *EmployeeQuery
- func (_q *EmployeeQuery) Count(ctx context.Context) (int, error)
- func (_q *EmployeeQuery) CountX(ctx context.Context) int
- func (_q *EmployeeQuery) Exist(ctx context.Context) (bool, error)
- func (_q *EmployeeQuery) ExistX(ctx context.Context) bool
- func (_q *EmployeeQuery) First(ctx context.Context) (*Employee, error)
- func (_q *EmployeeQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *EmployeeQuery) FirstIDX(ctx context.Context) int
- func (_q *EmployeeQuery) FirstX(ctx context.Context) *Employee
- func (_q *EmployeeQuery) GroupBy(field string, fields ...string) *EmployeeGroupBy
- func (_q *EmployeeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *EmployeeQuery) IDsX(ctx context.Context) []int
- func (_q *EmployeeQuery) Limit(limit int) *EmployeeQuery
- func (_q *EmployeeQuery) Offset(offset int) *EmployeeQuery
- func (_q *EmployeeQuery) Only(ctx context.Context) (*Employee, error)
- func (_q *EmployeeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *EmployeeQuery) OnlyIDX(ctx context.Context) int
- func (_q *EmployeeQuery) OnlyX(ctx context.Context) *Employee
- func (_q *EmployeeQuery) Order(o ...employee.OrderOption) *EmployeeQuery
- func (_q *EmployeeQuery) Select(fields ...string) *EmployeeSelect
- func (_q *EmployeeQuery) Unique(unique bool) *EmployeeQuery
- func (_q *EmployeeQuery) Where(ps ...predicate.Employee) *EmployeeQuery
- type EmployeeSelect
- func (_s *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 (_s *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 (_u *EmployeeUpdate) AddAge(v int32) *EmployeeUpdate
- func (_u *EmployeeUpdate) ClearAge() *EmployeeUpdate
- func (_u *EmployeeUpdate) Exec(ctx context.Context) error
- func (_u *EmployeeUpdate) ExecX(ctx context.Context)
- func (_u *EmployeeUpdate) Mutation() *EmployeeMutation
- func (_u *EmployeeUpdate) Save(ctx context.Context) (int, error)
- func (_u *EmployeeUpdate) SaveX(ctx context.Context) int
- func (_u *EmployeeUpdate) SetAge(v int32) *EmployeeUpdate
- func (_u *EmployeeUpdate) SetName(v string) *EmployeeUpdate
- func (_u *EmployeeUpdate) SetNillableAge(v *int32) *EmployeeUpdate
- func (_u *EmployeeUpdate) SetNillableName(v *string) *EmployeeUpdate
- func (_u *EmployeeUpdate) Where(ps ...predicate.Employee) *EmployeeUpdate
- type EmployeeUpdateOne
- func (_u *EmployeeUpdateOne) AddAge(v int32) *EmployeeUpdateOne
- func (_u *EmployeeUpdateOne) ClearAge() *EmployeeUpdateOne
- func (_u *EmployeeUpdateOne) Exec(ctx context.Context) error
- func (_u *EmployeeUpdateOne) ExecX(ctx context.Context)
- func (_u *EmployeeUpdateOne) Mutation() *EmployeeMutation
- func (_u *EmployeeUpdateOne) Save(ctx context.Context) (*Employee, error)
- func (_u *EmployeeUpdateOne) SaveX(ctx context.Context) *Employee
- func (_u *EmployeeUpdateOne) Select(field string, fields ...string) *EmployeeUpdateOne
- func (_u *EmployeeUpdateOne) SetAge(v int32) *EmployeeUpdateOne
- func (_u *EmployeeUpdateOne) SetName(v string) *EmployeeUpdateOne
- func (_u *EmployeeUpdateOne) SetNillableAge(v *int32) *EmployeeUpdateOne
- func (_u *EmployeeUpdateOne) SetNillableName(v *string) *EmployeeUpdateOne
- func (_u *EmployeeUpdateOne) Where(ps ...predicate.Employee) *EmployeeUpdateOne
- type Employees
- type Gateway
- type GatewayClient
- func (c *GatewayClient) Create() *GatewayCreate
- func (c *GatewayClient) CreateBulk(builders ...*GatewayCreate) *GatewayCreateBulk
- func (c *GatewayClient) Delete() *GatewayDelete
- func (c *GatewayClient) DeleteOne(_m *Gateway) *GatewayDeleteOne
- func (c *GatewayClient) DeleteOneID(id uuid.UUID) *GatewayDeleteOne
- func (c *GatewayClient) Get(ctx context.Context, id uuid.UUID) (*Gateway, error)
- func (c *GatewayClient) GetX(ctx context.Context, id uuid.UUID) *Gateway
- func (c *GatewayClient) Hooks() []Hook
- func (c *GatewayClient) Intercept(interceptors ...Interceptor)
- func (c *GatewayClient) Interceptors() []Interceptor
- func (c *GatewayClient) MapCreateBulk(slice any, setFunc func(*GatewayCreate, int)) *GatewayCreateBulk
- func (c *GatewayClient) Query() *GatewayQuery
- func (c *GatewayClient) Update() *GatewayUpdate
- func (c *GatewayClient) UpdateOne(_m *Gateway) *GatewayUpdateOne
- func (c *GatewayClient) UpdateOneID(id uuid.UUID) *GatewayUpdateOne
- func (c *GatewayClient) Use(hooks ...Hook)
- type GatewayCreate
- func (_c *GatewayCreate) Exec(ctx context.Context) error
- func (_c *GatewayCreate) ExecX(ctx context.Context)
- func (_c *GatewayCreate) Mutation() *GatewayMutation
- func (_c *GatewayCreate) Save(ctx context.Context) (*Gateway, error)
- func (_c *GatewayCreate) SaveX(ctx context.Context) *Gateway
- func (_c *GatewayCreate) SetAuthToken(v string) *GatewayCreate
- func (_c *GatewayCreate) SetID(v uuid.UUID) *GatewayCreate
- func (_c *GatewayCreate) SetIP(v string) *GatewayCreate
- func (_c *GatewayCreate) SetInternalIP(v string) *GatewayCreate
- func (_c *GatewayCreate) SetName(v string) *GatewayCreate
- func (_c *GatewayCreate) SetNillableID(v *uuid.UUID) *GatewayCreate
- func (_c *GatewayCreate) SetPort(v int32) *GatewayCreate
- type GatewayCreateBulk
- type GatewayDelete
- type GatewayDeleteOne
- type GatewayGroupBy
- func (_g *GatewayGroupBy) Aggregate(fns ...AggregateFunc) *GatewayGroupBy
- func (s *GatewayGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GatewayGroupBy) BoolX(ctx context.Context) bool
- func (s *GatewayGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GatewayGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GatewayGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GatewayGroupBy) Float64X(ctx context.Context) float64
- func (s *GatewayGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GatewayGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GatewayGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GatewayGroupBy) IntX(ctx context.Context) int
- func (s *GatewayGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GatewayGroupBy) IntsX(ctx context.Context) []int
- func (_g *GatewayGroupBy) Scan(ctx context.Context, v any) error
- func (s *GatewayGroupBy) ScanX(ctx context.Context, v any)
- func (s *GatewayGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GatewayGroupBy) StringX(ctx context.Context) string
- func (s *GatewayGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GatewayGroupBy) StringsX(ctx context.Context) []string
- type GatewayMutation
- func (m *GatewayMutation) AddField(name string, value ent.Value) error
- func (m *GatewayMutation) AddPort(i int32)
- func (m *GatewayMutation) AddedEdges() []string
- func (m *GatewayMutation) AddedField(name string) (ent.Value, bool)
- func (m *GatewayMutation) AddedFields() []string
- func (m *GatewayMutation) AddedIDs(name string) []ent.Value
- func (m *GatewayMutation) AddedPort() (r int32, exists bool)
- func (m *GatewayMutation) AuthToken() (r string, exists bool)
- func (m *GatewayMutation) ClearEdge(name string) error
- func (m *GatewayMutation) ClearField(name string) error
- func (m *GatewayMutation) ClearedEdges() []string
- func (m *GatewayMutation) ClearedFields() []string
- func (m GatewayMutation) Client() *Client
- func (m *GatewayMutation) EdgeCleared(name string) bool
- func (m *GatewayMutation) Field(name string) (ent.Value, bool)
- func (m *GatewayMutation) FieldCleared(name string) bool
- func (m *GatewayMutation) Fields() []string
- func (m *GatewayMutation) ID() (id uuid.UUID, exists bool)
- func (m *GatewayMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *GatewayMutation) IP() (r string, exists bool)
- func (m *GatewayMutation) InternalIP() (r string, exists bool)
- func (m *GatewayMutation) Name() (r string, exists bool)
- func (m *GatewayMutation) OldAuthToken(ctx context.Context) (v string, err error)
- func (m *GatewayMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GatewayMutation) OldIP(ctx context.Context) (v string, err error)
- func (m *GatewayMutation) OldInternalIP(ctx context.Context) (v string, err error)
- func (m *GatewayMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GatewayMutation) OldPort(ctx context.Context) (v int32, err error)
- func (m *GatewayMutation) Op() Op
- func (m *GatewayMutation) Port() (r int32, exists bool)
- func (m *GatewayMutation) RemovedEdges() []string
- func (m *GatewayMutation) RemovedIDs(name string) []ent.Value
- func (m *GatewayMutation) ResetAuthToken()
- func (m *GatewayMutation) ResetEdge(name string) error
- func (m *GatewayMutation) ResetField(name string) error
- func (m *GatewayMutation) ResetIP()
- func (m *GatewayMutation) ResetInternalIP()
- func (m *GatewayMutation) ResetName()
- func (m *GatewayMutation) ResetPort()
- func (m *GatewayMutation) SetAuthToken(s string)
- func (m *GatewayMutation) SetField(name string, value ent.Value) error
- func (m *GatewayMutation) SetID(id uuid.UUID)
- func (m *GatewayMutation) SetIP(s string)
- func (m *GatewayMutation) SetInternalIP(s string)
- func (m *GatewayMutation) SetName(s string)
- func (m *GatewayMutation) SetOp(op Op)
- func (m *GatewayMutation) SetPort(i int32)
- func (m GatewayMutation) Tx() (*Tx, error)
- func (m *GatewayMutation) Type() string
- func (m *GatewayMutation) Where(ps ...predicate.Gateway)
- func (m *GatewayMutation) WhereP(ps ...func(*sql.Selector))
- type GatewayPort
- type GatewayPortClient
- func (c *GatewayPortClient) Create() *GatewayPortCreate
- func (c *GatewayPortClient) CreateBulk(builders ...*GatewayPortCreate) *GatewayPortCreateBulk
- func (c *GatewayPortClient) Delete() *GatewayPortDelete
- func (c *GatewayPortClient) DeleteOne(_m *GatewayPort) *GatewayPortDeleteOne
- func (c *GatewayPortClient) DeleteOneID(id uuid.UUID) *GatewayPortDeleteOne
- func (c *GatewayPortClient) Get(ctx context.Context, id uuid.UUID) (*GatewayPort, error)
- func (c *GatewayPortClient) GetX(ctx context.Context, id uuid.UUID) *GatewayPort
- func (c *GatewayPortClient) Hooks() []Hook
- func (c *GatewayPortClient) Intercept(interceptors ...Interceptor)
- func (c *GatewayPortClient) Interceptors() []Interceptor
- func (c *GatewayPortClient) MapCreateBulk(slice any, setFunc func(*GatewayPortCreate, int)) *GatewayPortCreateBulk
- func (c *GatewayPortClient) Query() *GatewayPortQuery
- func (c *GatewayPortClient) Update() *GatewayPortUpdate
- func (c *GatewayPortClient) UpdateOne(_m *GatewayPort) *GatewayPortUpdateOne
- func (c *GatewayPortClient) UpdateOneID(id uuid.UUID) *GatewayPortUpdateOne
- func (c *GatewayPortClient) Use(hooks ...Hook)
- type GatewayPortCreate
- func (_c *GatewayPortCreate) Exec(ctx context.Context) error
- func (_c *GatewayPortCreate) ExecX(ctx context.Context)
- func (_c *GatewayPortCreate) Mutation() *GatewayPortMutation
- func (_c *GatewayPortCreate) Save(ctx context.Context) (*GatewayPort, error)
- func (_c *GatewayPortCreate) SaveX(ctx context.Context) *GatewayPort
- func (_c *GatewayPortCreate) SetFkGatewayID(v uuid.UUID) *GatewayPortCreate
- func (_c *GatewayPortCreate) SetID(v uuid.UUID) *GatewayPortCreate
- func (_c *GatewayPortCreate) SetIsPublic(v bool) *GatewayPortCreate
- func (_c *GatewayPortCreate) SetIsUse(v bool) *GatewayPortCreate
- func (_c *GatewayPortCreate) SetNillableID(v *uuid.UUID) *GatewayPortCreate
- func (_c *GatewayPortCreate) SetNillableIsPublic(v *bool) *GatewayPortCreate
- func (_c *GatewayPortCreate) SetNillableIsUse(v *bool) *GatewayPortCreate
- func (_c *GatewayPortCreate) SetPort(v int32) *GatewayPortCreate
- type GatewayPortCreateBulk
- type GatewayPortDelete
- type GatewayPortDeleteOne
- type GatewayPortGroupBy
- func (_g *GatewayPortGroupBy) Aggregate(fns ...AggregateFunc) *GatewayPortGroupBy
- func (s *GatewayPortGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GatewayPortGroupBy) BoolX(ctx context.Context) bool
- func (s *GatewayPortGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GatewayPortGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GatewayPortGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GatewayPortGroupBy) Float64X(ctx context.Context) float64
- func (s *GatewayPortGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GatewayPortGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GatewayPortGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GatewayPortGroupBy) IntX(ctx context.Context) int
- func (s *GatewayPortGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GatewayPortGroupBy) IntsX(ctx context.Context) []int
- func (_g *GatewayPortGroupBy) Scan(ctx context.Context, v any) error
- func (s *GatewayPortGroupBy) ScanX(ctx context.Context, v any)
- func (s *GatewayPortGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GatewayPortGroupBy) StringX(ctx context.Context) string
- func (s *GatewayPortGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GatewayPortGroupBy) StringsX(ctx context.Context) []string
- type GatewayPortMutation
- func (m *GatewayPortMutation) AddField(name string, value ent.Value) error
- func (m *GatewayPortMutation) AddPort(i int32)
- func (m *GatewayPortMutation) AddedEdges() []string
- func (m *GatewayPortMutation) AddedField(name string) (ent.Value, bool)
- func (m *GatewayPortMutation) AddedFields() []string
- func (m *GatewayPortMutation) AddedIDs(name string) []ent.Value
- func (m *GatewayPortMutation) AddedPort() (r int32, exists bool)
- func (m *GatewayPortMutation) ClearEdge(name string) error
- func (m *GatewayPortMutation) ClearField(name string) error
- func (m *GatewayPortMutation) ClearedEdges() []string
- func (m *GatewayPortMutation) ClearedFields() []string
- func (m GatewayPortMutation) Client() *Client
- func (m *GatewayPortMutation) EdgeCleared(name string) bool
- func (m *GatewayPortMutation) Field(name string) (ent.Value, bool)
- func (m *GatewayPortMutation) FieldCleared(name string) bool
- func (m *GatewayPortMutation) Fields() []string
- func (m *GatewayPortMutation) FkGatewayID() (r uuid.UUID, exists bool)
- func (m *GatewayPortMutation) ID() (id uuid.UUID, exists bool)
- func (m *GatewayPortMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *GatewayPortMutation) IsPublic() (r bool, exists bool)
- func (m *GatewayPortMutation) IsUse() (r bool, exists bool)
- func (m *GatewayPortMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GatewayPortMutation) OldFkGatewayID(ctx context.Context) (v uuid.UUID, err error)
- func (m *GatewayPortMutation) OldIsPublic(ctx context.Context) (v bool, err error)
- func (m *GatewayPortMutation) OldIsUse(ctx context.Context) (v bool, err error)
- func (m *GatewayPortMutation) OldPort(ctx context.Context) (v int32, err error)
- func (m *GatewayPortMutation) Op() Op
- func (m *GatewayPortMutation) Port() (r int32, exists bool)
- func (m *GatewayPortMutation) RemovedEdges() []string
- func (m *GatewayPortMutation) RemovedIDs(name string) []ent.Value
- func (m *GatewayPortMutation) ResetEdge(name string) error
- func (m *GatewayPortMutation) ResetField(name string) error
- func (m *GatewayPortMutation) ResetFkGatewayID()
- func (m *GatewayPortMutation) ResetIsPublic()
- func (m *GatewayPortMutation) ResetIsUse()
- func (m *GatewayPortMutation) ResetPort()
- func (m *GatewayPortMutation) SetField(name string, value ent.Value) error
- func (m *GatewayPortMutation) SetFkGatewayID(u uuid.UUID)
- func (m *GatewayPortMutation) SetID(id uuid.UUID)
- func (m *GatewayPortMutation) SetIsPublic(b bool)
- func (m *GatewayPortMutation) SetIsUse(b bool)
- func (m *GatewayPortMutation) SetOp(op Op)
- func (m *GatewayPortMutation) SetPort(i int32)
- func (m GatewayPortMutation) Tx() (*Tx, error)
- func (m *GatewayPortMutation) Type() string
- func (m *GatewayPortMutation) Where(ps ...predicate.GatewayPort)
- func (m *GatewayPortMutation) WhereP(ps ...func(*sql.Selector))
- type GatewayPortQuery
- func (_q *GatewayPortQuery) Aggregate(fns ...AggregateFunc) *GatewayPortSelect
- func (_q *GatewayPortQuery) All(ctx context.Context) ([]*GatewayPort, error)
- func (_q *GatewayPortQuery) AllX(ctx context.Context) []*GatewayPort
- func (_q *GatewayPortQuery) Clone() *GatewayPortQuery
- func (_q *GatewayPortQuery) Count(ctx context.Context) (int, error)
- func (_q *GatewayPortQuery) CountX(ctx context.Context) int
- func (_q *GatewayPortQuery) Exist(ctx context.Context) (bool, error)
- func (_q *GatewayPortQuery) ExistX(ctx context.Context) bool
- func (_q *GatewayPortQuery) First(ctx context.Context) (*GatewayPort, error)
- func (_q *GatewayPortQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *GatewayPortQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *GatewayPortQuery) FirstX(ctx context.Context) *GatewayPort
- func (_q *GatewayPortQuery) GroupBy(field string, fields ...string) *GatewayPortGroupBy
- func (_q *GatewayPortQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *GatewayPortQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *GatewayPortQuery) Limit(limit int) *GatewayPortQuery
- func (_q *GatewayPortQuery) Offset(offset int) *GatewayPortQuery
- func (_q *GatewayPortQuery) Only(ctx context.Context) (*GatewayPort, error)
- func (_q *GatewayPortQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *GatewayPortQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *GatewayPortQuery) OnlyX(ctx context.Context) *GatewayPort
- func (_q *GatewayPortQuery) Order(o ...gatewayport.OrderOption) *GatewayPortQuery
- func (_q *GatewayPortQuery) Select(fields ...string) *GatewayPortSelect
- func (_q *GatewayPortQuery) Unique(unique bool) *GatewayPortQuery
- func (_q *GatewayPortQuery) Where(ps ...predicate.GatewayPort) *GatewayPortQuery
- type GatewayPortSelect
- func (_s *GatewayPortSelect) Aggregate(fns ...AggregateFunc) *GatewayPortSelect
- func (s *GatewayPortSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GatewayPortSelect) BoolX(ctx context.Context) bool
- func (s *GatewayPortSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GatewayPortSelect) BoolsX(ctx context.Context) []bool
- func (s *GatewayPortSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GatewayPortSelect) Float64X(ctx context.Context) float64
- func (s *GatewayPortSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GatewayPortSelect) Float64sX(ctx context.Context) []float64
- func (s *GatewayPortSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GatewayPortSelect) IntX(ctx context.Context) int
- func (s *GatewayPortSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GatewayPortSelect) IntsX(ctx context.Context) []int
- func (_s *GatewayPortSelect) Scan(ctx context.Context, v any) error
- func (s *GatewayPortSelect) ScanX(ctx context.Context, v any)
- func (s *GatewayPortSelect) String(ctx context.Context) (_ string, err error)
- func (s *GatewayPortSelect) StringX(ctx context.Context) string
- func (s *GatewayPortSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GatewayPortSelect) StringsX(ctx context.Context) []string
- type GatewayPortUpdate
- func (_u *GatewayPortUpdate) AddPort(v int32) *GatewayPortUpdate
- func (_u *GatewayPortUpdate) Exec(ctx context.Context) error
- func (_u *GatewayPortUpdate) ExecX(ctx context.Context)
- func (_u *GatewayPortUpdate) Mutation() *GatewayPortMutation
- func (_u *GatewayPortUpdate) Save(ctx context.Context) (int, error)
- func (_u *GatewayPortUpdate) SaveX(ctx context.Context) int
- func (_u *GatewayPortUpdate) SetFkGatewayID(v uuid.UUID) *GatewayPortUpdate
- func (_u *GatewayPortUpdate) SetIsPublic(v bool) *GatewayPortUpdate
- func (_u *GatewayPortUpdate) SetIsUse(v bool) *GatewayPortUpdate
- func (_u *GatewayPortUpdate) SetNillableFkGatewayID(v *uuid.UUID) *GatewayPortUpdate
- func (_u *GatewayPortUpdate) SetNillableIsPublic(v *bool) *GatewayPortUpdate
- func (_u *GatewayPortUpdate) SetNillableIsUse(v *bool) *GatewayPortUpdate
- func (_u *GatewayPortUpdate) SetNillablePort(v *int32) *GatewayPortUpdate
- func (_u *GatewayPortUpdate) SetPort(v int32) *GatewayPortUpdate
- func (_u *GatewayPortUpdate) Where(ps ...predicate.GatewayPort) *GatewayPortUpdate
- type GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) AddPort(v int32) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) Exec(ctx context.Context) error
- func (_u *GatewayPortUpdateOne) ExecX(ctx context.Context)
- func (_u *GatewayPortUpdateOne) Mutation() *GatewayPortMutation
- func (_u *GatewayPortUpdateOne) Save(ctx context.Context) (*GatewayPort, error)
- func (_u *GatewayPortUpdateOne) SaveX(ctx context.Context) *GatewayPort
- func (_u *GatewayPortUpdateOne) Select(field string, fields ...string) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) SetFkGatewayID(v uuid.UUID) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) SetIsPublic(v bool) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) SetIsUse(v bool) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) SetNillableFkGatewayID(v *uuid.UUID) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) SetNillableIsPublic(v *bool) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) SetNillableIsUse(v *bool) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) SetNillablePort(v *int32) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) SetPort(v int32) *GatewayPortUpdateOne
- func (_u *GatewayPortUpdateOne) Where(ps ...predicate.GatewayPort) *GatewayPortUpdateOne
- type GatewayPorts
- type GatewayQuery
- func (_q *GatewayQuery) Aggregate(fns ...AggregateFunc) *GatewaySelect
- func (_q *GatewayQuery) All(ctx context.Context) ([]*Gateway, error)
- func (_q *GatewayQuery) AllX(ctx context.Context) []*Gateway
- func (_q *GatewayQuery) Clone() *GatewayQuery
- func (_q *GatewayQuery) Count(ctx context.Context) (int, error)
- func (_q *GatewayQuery) CountX(ctx context.Context) int
- func (_q *GatewayQuery) Exist(ctx context.Context) (bool, error)
- func (_q *GatewayQuery) ExistX(ctx context.Context) bool
- func (_q *GatewayQuery) First(ctx context.Context) (*Gateway, error)
- func (_q *GatewayQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *GatewayQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *GatewayQuery) FirstX(ctx context.Context) *Gateway
- func (_q *GatewayQuery) GroupBy(field string, fields ...string) *GatewayGroupBy
- func (_q *GatewayQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *GatewayQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *GatewayQuery) Limit(limit int) *GatewayQuery
- func (_q *GatewayQuery) Offset(offset int) *GatewayQuery
- func (_q *GatewayQuery) Only(ctx context.Context) (*Gateway, error)
- func (_q *GatewayQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *GatewayQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *GatewayQuery) OnlyX(ctx context.Context) *Gateway
- func (_q *GatewayQuery) Order(o ...gateway.OrderOption) *GatewayQuery
- func (_q *GatewayQuery) Select(fields ...string) *GatewaySelect
- func (_q *GatewayQuery) Unique(unique bool) *GatewayQuery
- func (_q *GatewayQuery) Where(ps ...predicate.Gateway) *GatewayQuery
- type GatewaySelect
- func (_s *GatewaySelect) Aggregate(fns ...AggregateFunc) *GatewaySelect
- func (s *GatewaySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GatewaySelect) BoolX(ctx context.Context) bool
- func (s *GatewaySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GatewaySelect) BoolsX(ctx context.Context) []bool
- func (s *GatewaySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GatewaySelect) Float64X(ctx context.Context) float64
- func (s *GatewaySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GatewaySelect) Float64sX(ctx context.Context) []float64
- func (s *GatewaySelect) Int(ctx context.Context) (_ int, err error)
- func (s *GatewaySelect) IntX(ctx context.Context) int
- func (s *GatewaySelect) Ints(ctx context.Context) ([]int, error)
- func (s *GatewaySelect) IntsX(ctx context.Context) []int
- func (_s *GatewaySelect) Scan(ctx context.Context, v any) error
- func (s *GatewaySelect) ScanX(ctx context.Context, v any)
- func (s *GatewaySelect) String(ctx context.Context) (_ string, err error)
- func (s *GatewaySelect) StringX(ctx context.Context) string
- func (s *GatewaySelect) Strings(ctx context.Context) ([]string, error)
- func (s *GatewaySelect) StringsX(ctx context.Context) []string
- type GatewayUpdate
- func (_u *GatewayUpdate) AddPort(v int32) *GatewayUpdate
- func (_u *GatewayUpdate) Exec(ctx context.Context) error
- func (_u *GatewayUpdate) ExecX(ctx context.Context)
- func (_u *GatewayUpdate) Mutation() *GatewayMutation
- func (_u *GatewayUpdate) Save(ctx context.Context) (int, error)
- func (_u *GatewayUpdate) SaveX(ctx context.Context) int
- func (_u *GatewayUpdate) SetAuthToken(v string) *GatewayUpdate
- func (_u *GatewayUpdate) SetIP(v string) *GatewayUpdate
- func (_u *GatewayUpdate) SetInternalIP(v string) *GatewayUpdate
- func (_u *GatewayUpdate) SetName(v string) *GatewayUpdate
- func (_u *GatewayUpdate) SetNillableAuthToken(v *string) *GatewayUpdate
- func (_u *GatewayUpdate) SetNillableIP(v *string) *GatewayUpdate
- func (_u *GatewayUpdate) SetNillableInternalIP(v *string) *GatewayUpdate
- func (_u *GatewayUpdate) SetNillableName(v *string) *GatewayUpdate
- func (_u *GatewayUpdate) SetNillablePort(v *int32) *GatewayUpdate
- func (_u *GatewayUpdate) SetPort(v int32) *GatewayUpdate
- func (_u *GatewayUpdate) Where(ps ...predicate.Gateway) *GatewayUpdate
- type GatewayUpdateOne
- func (_u *GatewayUpdateOne) AddPort(v int32) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) Exec(ctx context.Context) error
- func (_u *GatewayUpdateOne) ExecX(ctx context.Context)
- func (_u *GatewayUpdateOne) Mutation() *GatewayMutation
- func (_u *GatewayUpdateOne) Save(ctx context.Context) (*Gateway, error)
- func (_u *GatewayUpdateOne) SaveX(ctx context.Context) *Gateway
- func (_u *GatewayUpdateOne) Select(field string, fields ...string) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetAuthToken(v string) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetIP(v string) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetInternalIP(v string) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetName(v string) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetNillableAuthToken(v *string) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetNillableIP(v *string) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetNillableInternalIP(v *string) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetNillableName(v *string) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetNillablePort(v *int32) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) SetPort(v int32) *GatewayUpdateOne
- func (_u *GatewayUpdateOne) Where(ps ...predicate.Gateway) *GatewayUpdateOne
- type Gateways
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NetworkMapping
- type NetworkMappingClient
- func (c *NetworkMappingClient) Create() *NetworkMappingCreate
- func (c *NetworkMappingClient) CreateBulk(builders ...*NetworkMappingCreate) *NetworkMappingCreateBulk
- func (c *NetworkMappingClient) Delete() *NetworkMappingDelete
- func (c *NetworkMappingClient) DeleteOne(_m *NetworkMapping) *NetworkMappingDeleteOne
- func (c *NetworkMappingClient) DeleteOneID(id uuid.UUID) *NetworkMappingDeleteOne
- func (c *NetworkMappingClient) Get(ctx context.Context, id uuid.UUID) (*NetworkMapping, error)
- func (c *NetworkMappingClient) GetX(ctx context.Context, id uuid.UUID) *NetworkMapping
- func (c *NetworkMappingClient) Hooks() []Hook
- func (c *NetworkMappingClient) Intercept(interceptors ...Interceptor)
- func (c *NetworkMappingClient) Interceptors() []Interceptor
- func (c *NetworkMappingClient) MapCreateBulk(slice any, setFunc func(*NetworkMappingCreate, int)) *NetworkMappingCreateBulk
- func (c *NetworkMappingClient) Query() *NetworkMappingQuery
- func (c *NetworkMappingClient) Update() *NetworkMappingUpdate
- func (c *NetworkMappingClient) UpdateOne(_m *NetworkMapping) *NetworkMappingUpdateOne
- func (c *NetworkMappingClient) UpdateOneID(id uuid.UUID) *NetworkMappingUpdateOne
- func (c *NetworkMappingClient) Use(hooks ...Hook)
- type NetworkMappingCreate
- func (_c *NetworkMappingCreate) Exec(ctx context.Context) error
- func (_c *NetworkMappingCreate) ExecX(ctx context.Context)
- func (_c *NetworkMappingCreate) Mutation() *NetworkMappingMutation
- func (_c *NetworkMappingCreate) Save(ctx context.Context) (*NetworkMapping, error)
- func (_c *NetworkMappingCreate) SaveX(ctx context.Context) *NetworkMapping
- func (_c *NetworkMappingCreate) SetComputerPort(v int32) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetCreateTime(v time.Time) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetDeleteState(v bool) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetFkComputerID(v uuid.UUID) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetFkGatewayID(v uuid.UUID) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetFkUserID(v uuid.UUID) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetGatewayIP(v string) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetGatewayPort(v int32) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetID(v uuid.UUID) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetName(v string) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetNillableCreateTime(v *time.Time) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetNillableDeleteState(v *bool) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetNillableID(v *uuid.UUID) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetNillableProtocol(v *string) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetNillableStatus(v *int) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetProtocol(v string) *NetworkMappingCreate
- func (_c *NetworkMappingCreate) SetStatus(v int) *NetworkMappingCreate
- type NetworkMappingCreateBulk
- func (_c *NetworkMappingCreateBulk) Exec(ctx context.Context) error
- func (_c *NetworkMappingCreateBulk) ExecX(ctx context.Context)
- func (_c *NetworkMappingCreateBulk) Save(ctx context.Context) ([]*NetworkMapping, error)
- func (_c *NetworkMappingCreateBulk) SaveX(ctx context.Context) []*NetworkMapping
- type NetworkMappingDelete
- type NetworkMappingDeleteOne
- type NetworkMappingGroupBy
- func (_g *NetworkMappingGroupBy) Aggregate(fns ...AggregateFunc) *NetworkMappingGroupBy
- func (s *NetworkMappingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NetworkMappingGroupBy) BoolX(ctx context.Context) bool
- func (s *NetworkMappingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NetworkMappingGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NetworkMappingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NetworkMappingGroupBy) Float64X(ctx context.Context) float64
- func (s *NetworkMappingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NetworkMappingGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NetworkMappingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NetworkMappingGroupBy) IntX(ctx context.Context) int
- func (s *NetworkMappingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NetworkMappingGroupBy) IntsX(ctx context.Context) []int
- func (_g *NetworkMappingGroupBy) Scan(ctx context.Context, v any) error
- func (s *NetworkMappingGroupBy) ScanX(ctx context.Context, v any)
- func (s *NetworkMappingGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NetworkMappingGroupBy) StringX(ctx context.Context) string
- func (s *NetworkMappingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NetworkMappingGroupBy) StringsX(ctx context.Context) []string
- type NetworkMappingMutation
- func (m *NetworkMappingMutation) AddComputerPort(i int32)
- func (m *NetworkMappingMutation) AddField(name string, value ent.Value) error
- func (m *NetworkMappingMutation) AddGatewayPort(i int32)
- func (m *NetworkMappingMutation) AddStatus(i int)
- func (m *NetworkMappingMutation) AddedComputerPort() (r int32, exists bool)
- func (m *NetworkMappingMutation) AddedEdges() []string
- func (m *NetworkMappingMutation) AddedField(name string) (ent.Value, bool)
- func (m *NetworkMappingMutation) AddedFields() []string
- func (m *NetworkMappingMutation) AddedGatewayPort() (r int32, exists bool)
- func (m *NetworkMappingMutation) AddedIDs(name string) []ent.Value
- func (m *NetworkMappingMutation) AddedStatus() (r int, exists bool)
- func (m *NetworkMappingMutation) ClearEdge(name string) error
- func (m *NetworkMappingMutation) ClearField(name string) error
- func (m *NetworkMappingMutation) ClearedEdges() []string
- func (m *NetworkMappingMutation) ClearedFields() []string
- func (m NetworkMappingMutation) Client() *Client
- func (m *NetworkMappingMutation) ComputerPort() (r int32, exists bool)
- func (m *NetworkMappingMutation) CreateTime() (r time.Time, exists bool)
- func (m *NetworkMappingMutation) DeleteState() (r bool, exists bool)
- func (m *NetworkMappingMutation) EdgeCleared(name string) bool
- func (m *NetworkMappingMutation) Field(name string) (ent.Value, bool)
- func (m *NetworkMappingMutation) FieldCleared(name string) bool
- func (m *NetworkMappingMutation) Fields() []string
- func (m *NetworkMappingMutation) FkComputerID() (r uuid.UUID, exists bool)
- func (m *NetworkMappingMutation) FkGatewayID() (r uuid.UUID, exists bool)
- func (m *NetworkMappingMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *NetworkMappingMutation) GatewayIP() (r string, exists bool)
- func (m *NetworkMappingMutation) GatewayPort() (r int32, exists bool)
- func (m *NetworkMappingMutation) ID() (id uuid.UUID, exists bool)
- func (m *NetworkMappingMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *NetworkMappingMutation) Name() (r string, exists bool)
- func (m *NetworkMappingMutation) OldComputerPort(ctx context.Context) (v int32, err error)
- func (m *NetworkMappingMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *NetworkMappingMutation) OldDeleteState(ctx context.Context) (v bool, err error)
- func (m *NetworkMappingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NetworkMappingMutation) OldFkComputerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *NetworkMappingMutation) OldFkGatewayID(ctx context.Context) (v uuid.UUID, err error)
- func (m *NetworkMappingMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *NetworkMappingMutation) OldGatewayIP(ctx context.Context) (v string, err error)
- func (m *NetworkMappingMutation) OldGatewayPort(ctx context.Context) (v int32, err error)
- func (m *NetworkMappingMutation) OldName(ctx context.Context) (v string, err error)
- func (m *NetworkMappingMutation) OldProtocol(ctx context.Context) (v string, err error)
- func (m *NetworkMappingMutation) OldStatus(ctx context.Context) (v int, err error)
- func (m *NetworkMappingMutation) Op() Op
- func (m *NetworkMappingMutation) Protocol() (r string, exists bool)
- func (m *NetworkMappingMutation) RemovedEdges() []string
- func (m *NetworkMappingMutation) RemovedIDs(name string) []ent.Value
- func (m *NetworkMappingMutation) ResetComputerPort()
- func (m *NetworkMappingMutation) ResetCreateTime()
- func (m *NetworkMappingMutation) ResetDeleteState()
- func (m *NetworkMappingMutation) ResetEdge(name string) error
- func (m *NetworkMappingMutation) ResetField(name string) error
- func (m *NetworkMappingMutation) ResetFkComputerID()
- func (m *NetworkMappingMutation) ResetFkGatewayID()
- func (m *NetworkMappingMutation) ResetFkUserID()
- func (m *NetworkMappingMutation) ResetGatewayIP()
- func (m *NetworkMappingMutation) ResetGatewayPort()
- func (m *NetworkMappingMutation) ResetName()
- func (m *NetworkMappingMutation) ResetProtocol()
- func (m *NetworkMappingMutation) ResetStatus()
- func (m *NetworkMappingMutation) SetComputerPort(i int32)
- func (m *NetworkMappingMutation) SetCreateTime(t time.Time)
- func (m *NetworkMappingMutation) SetDeleteState(b bool)
- func (m *NetworkMappingMutation) SetField(name string, value ent.Value) error
- func (m *NetworkMappingMutation) SetFkComputerID(u uuid.UUID)
- func (m *NetworkMappingMutation) SetFkGatewayID(u uuid.UUID)
- func (m *NetworkMappingMutation) SetFkUserID(u uuid.UUID)
- func (m *NetworkMappingMutation) SetGatewayIP(s string)
- func (m *NetworkMappingMutation) SetGatewayPort(i int32)
- func (m *NetworkMappingMutation) SetID(id uuid.UUID)
- func (m *NetworkMappingMutation) SetName(s string)
- func (m *NetworkMappingMutation) SetOp(op Op)
- func (m *NetworkMappingMutation) SetProtocol(s string)
- func (m *NetworkMappingMutation) SetStatus(i int)
- func (m *NetworkMappingMutation) Status() (r int, exists bool)
- func (m NetworkMappingMutation) Tx() (*Tx, error)
- func (m *NetworkMappingMutation) Type() string
- func (m *NetworkMappingMutation) Where(ps ...predicate.NetworkMapping)
- func (m *NetworkMappingMutation) WhereP(ps ...func(*sql.Selector))
- type NetworkMappingQuery
- func (_q *NetworkMappingQuery) Aggregate(fns ...AggregateFunc) *NetworkMappingSelect
- func (_q *NetworkMappingQuery) All(ctx context.Context) ([]*NetworkMapping, error)
- func (_q *NetworkMappingQuery) AllX(ctx context.Context) []*NetworkMapping
- func (_q *NetworkMappingQuery) Clone() *NetworkMappingQuery
- func (_q *NetworkMappingQuery) Count(ctx context.Context) (int, error)
- func (_q *NetworkMappingQuery) CountX(ctx context.Context) int
- func (_q *NetworkMappingQuery) Exist(ctx context.Context) (bool, error)
- func (_q *NetworkMappingQuery) ExistX(ctx context.Context) bool
- func (_q *NetworkMappingQuery) First(ctx context.Context) (*NetworkMapping, error)
- func (_q *NetworkMappingQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *NetworkMappingQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *NetworkMappingQuery) FirstX(ctx context.Context) *NetworkMapping
- func (_q *NetworkMappingQuery) GroupBy(field string, fields ...string) *NetworkMappingGroupBy
- func (_q *NetworkMappingQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *NetworkMappingQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *NetworkMappingQuery) Limit(limit int) *NetworkMappingQuery
- func (_q *NetworkMappingQuery) Offset(offset int) *NetworkMappingQuery
- func (_q *NetworkMappingQuery) Only(ctx context.Context) (*NetworkMapping, error)
- func (_q *NetworkMappingQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *NetworkMappingQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *NetworkMappingQuery) OnlyX(ctx context.Context) *NetworkMapping
- func (_q *NetworkMappingQuery) Order(o ...networkmapping.OrderOption) *NetworkMappingQuery
- func (_q *NetworkMappingQuery) Select(fields ...string) *NetworkMappingSelect
- func (_q *NetworkMappingQuery) Unique(unique bool) *NetworkMappingQuery
- func (_q *NetworkMappingQuery) Where(ps ...predicate.NetworkMapping) *NetworkMappingQuery
- type NetworkMappingSelect
- func (_s *NetworkMappingSelect) Aggregate(fns ...AggregateFunc) *NetworkMappingSelect
- func (s *NetworkMappingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NetworkMappingSelect) BoolX(ctx context.Context) bool
- func (s *NetworkMappingSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NetworkMappingSelect) BoolsX(ctx context.Context) []bool
- func (s *NetworkMappingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NetworkMappingSelect) Float64X(ctx context.Context) float64
- func (s *NetworkMappingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NetworkMappingSelect) Float64sX(ctx context.Context) []float64
- func (s *NetworkMappingSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NetworkMappingSelect) IntX(ctx context.Context) int
- func (s *NetworkMappingSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NetworkMappingSelect) IntsX(ctx context.Context) []int
- func (_s *NetworkMappingSelect) Scan(ctx context.Context, v any) error
- func (s *NetworkMappingSelect) ScanX(ctx context.Context, v any)
- func (s *NetworkMappingSelect) String(ctx context.Context) (_ string, err error)
- func (s *NetworkMappingSelect) StringX(ctx context.Context) string
- func (s *NetworkMappingSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NetworkMappingSelect) StringsX(ctx context.Context) []string
- type NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) AddComputerPort(v int32) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) AddGatewayPort(v int32) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) AddStatus(v int) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) Exec(ctx context.Context) error
- func (_u *NetworkMappingUpdate) ExecX(ctx context.Context)
- func (_u *NetworkMappingUpdate) Mutation() *NetworkMappingMutation
- func (_u *NetworkMappingUpdate) Save(ctx context.Context) (int, error)
- func (_u *NetworkMappingUpdate) SaveX(ctx context.Context) int
- func (_u *NetworkMappingUpdate) SetComputerPort(v int32) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetCreateTime(v time.Time) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetDeleteState(v bool) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetFkComputerID(v uuid.UUID) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetFkGatewayID(v uuid.UUID) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetFkUserID(v uuid.UUID) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetGatewayIP(v string) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetGatewayPort(v int32) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetName(v string) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableComputerPort(v *int32) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableCreateTime(v *time.Time) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableDeleteState(v *bool) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableFkComputerID(v *uuid.UUID) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableFkGatewayID(v *uuid.UUID) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableFkUserID(v *uuid.UUID) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableGatewayIP(v *string) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableGatewayPort(v *int32) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableName(v *string) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableProtocol(v *string) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetNillableStatus(v *int) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetProtocol(v string) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) SetStatus(v int) *NetworkMappingUpdate
- func (_u *NetworkMappingUpdate) Where(ps ...predicate.NetworkMapping) *NetworkMappingUpdate
- type NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) AddComputerPort(v int32) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) AddGatewayPort(v int32) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) AddStatus(v int) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) Exec(ctx context.Context) error
- func (_u *NetworkMappingUpdateOne) ExecX(ctx context.Context)
- func (_u *NetworkMappingUpdateOne) Mutation() *NetworkMappingMutation
- func (_u *NetworkMappingUpdateOne) Save(ctx context.Context) (*NetworkMapping, error)
- func (_u *NetworkMappingUpdateOne) SaveX(ctx context.Context) *NetworkMapping
- func (_u *NetworkMappingUpdateOne) Select(field string, fields ...string) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetComputerPort(v int32) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetCreateTime(v time.Time) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetDeleteState(v bool) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetFkComputerID(v uuid.UUID) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetFkGatewayID(v uuid.UUID) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetFkUserID(v uuid.UUID) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetGatewayIP(v string) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetGatewayPort(v int32) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetName(v string) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableComputerPort(v *int32) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableCreateTime(v *time.Time) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableDeleteState(v *bool) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableFkComputerID(v *uuid.UUID) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableFkGatewayID(v *uuid.UUID) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableFkUserID(v *uuid.UUID) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableGatewayIP(v *string) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableGatewayPort(v *int32) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableName(v *string) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableProtocol(v *string) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetNillableStatus(v *int) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetProtocol(v string) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) SetStatus(v int) *NetworkMappingUpdateOne
- func (_u *NetworkMappingUpdateOne) Where(ps ...predicate.NetworkMapping) *NetworkMappingUpdateOne
- type NetworkMappings
- 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 S3Bucket
- type S3BucketClient
- func (c *S3BucketClient) Create() *S3BucketCreate
- func (c *S3BucketClient) CreateBulk(builders ...*S3BucketCreate) *S3BucketCreateBulk
- func (c *S3BucketClient) Delete() *S3BucketDelete
- func (c *S3BucketClient) DeleteOne(_m *S3Bucket) *S3BucketDeleteOne
- func (c *S3BucketClient) DeleteOneID(id uuid.UUID) *S3BucketDeleteOne
- func (c *S3BucketClient) Get(ctx context.Context, id uuid.UUID) (*S3Bucket, error)
- func (c *S3BucketClient) GetX(ctx context.Context, id uuid.UUID) *S3Bucket
- func (c *S3BucketClient) Hooks() []Hook
- func (c *S3BucketClient) Intercept(interceptors ...Interceptor)
- func (c *S3BucketClient) Interceptors() []Interceptor
- func (c *S3BucketClient) MapCreateBulk(slice any, setFunc func(*S3BucketCreate, int)) *S3BucketCreateBulk
- func (c *S3BucketClient) Query() *S3BucketQuery
- func (c *S3BucketClient) Update() *S3BucketUpdate
- func (c *S3BucketClient) UpdateOne(_m *S3Bucket) *S3BucketUpdateOne
- func (c *S3BucketClient) UpdateOneID(id uuid.UUID) *S3BucketUpdateOne
- func (c *S3BucketClient) Use(hooks ...Hook)
- type S3BucketCreate
- func (_c *S3BucketCreate) Exec(ctx context.Context) error
- func (_c *S3BucketCreate) ExecX(ctx context.Context)
- func (_c *S3BucketCreate) Mutation() *S3BucketMutation
- func (_c *S3BucketCreate) Save(ctx context.Context) (*S3Bucket, error)
- func (_c *S3BucketCreate) SaveX(ctx context.Context) *S3Bucket
- func (_c *S3BucketCreate) SetBucketName(v string) *S3BucketCreate
- func (_c *S3BucketCreate) SetCreatedTime(v time.Time) *S3BucketCreate
- func (_c *S3BucketCreate) SetFkUserID(v uuid.UUID) *S3BucketCreate
- func (_c *S3BucketCreate) SetID(v uuid.UUID) *S3BucketCreate
- func (_c *S3BucketCreate) SetNillableID(v *uuid.UUID) *S3BucketCreate
- type S3BucketCreateBulk
- type S3BucketDelete
- type S3BucketDeleteOne
- type S3BucketGroupBy
- func (_g *S3BucketGroupBy) Aggregate(fns ...AggregateFunc) *S3BucketGroupBy
- func (s *S3BucketGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *S3BucketGroupBy) BoolX(ctx context.Context) bool
- func (s *S3BucketGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *S3BucketGroupBy) BoolsX(ctx context.Context) []bool
- func (s *S3BucketGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *S3BucketGroupBy) Float64X(ctx context.Context) float64
- func (s *S3BucketGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *S3BucketGroupBy) Float64sX(ctx context.Context) []float64
- func (s *S3BucketGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *S3BucketGroupBy) IntX(ctx context.Context) int
- func (s *S3BucketGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *S3BucketGroupBy) IntsX(ctx context.Context) []int
- func (_g *S3BucketGroupBy) Scan(ctx context.Context, v any) error
- func (s *S3BucketGroupBy) ScanX(ctx context.Context, v any)
- func (s *S3BucketGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *S3BucketGroupBy) StringX(ctx context.Context) string
- func (s *S3BucketGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *S3BucketGroupBy) StringsX(ctx context.Context) []string
- type S3BucketMutation
- func (m *S3BucketMutation) AddField(name string, value ent.Value) error
- func (m *S3BucketMutation) AddedEdges() []string
- func (m *S3BucketMutation) AddedField(name string) (ent.Value, bool)
- func (m *S3BucketMutation) AddedFields() []string
- func (m *S3BucketMutation) AddedIDs(name string) []ent.Value
- func (m *S3BucketMutation) BucketName() (r string, exists bool)
- func (m *S3BucketMutation) ClearEdge(name string) error
- func (m *S3BucketMutation) ClearField(name string) error
- func (m *S3BucketMutation) ClearedEdges() []string
- func (m *S3BucketMutation) ClearedFields() []string
- func (m S3BucketMutation) Client() *Client
- func (m *S3BucketMutation) CreatedTime() (r time.Time, exists bool)
- func (m *S3BucketMutation) EdgeCleared(name string) bool
- func (m *S3BucketMutation) Field(name string) (ent.Value, bool)
- func (m *S3BucketMutation) FieldCleared(name string) bool
- func (m *S3BucketMutation) Fields() []string
- func (m *S3BucketMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *S3BucketMutation) ID() (id uuid.UUID, exists bool)
- func (m *S3BucketMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *S3BucketMutation) OldBucketName(ctx context.Context) (v string, err error)
- func (m *S3BucketMutation) OldCreatedTime(ctx context.Context) (v time.Time, err error)
- func (m *S3BucketMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *S3BucketMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *S3BucketMutation) Op() Op
- func (m *S3BucketMutation) RemovedEdges() []string
- func (m *S3BucketMutation) RemovedIDs(name string) []ent.Value
- func (m *S3BucketMutation) ResetBucketName()
- func (m *S3BucketMutation) ResetCreatedTime()
- func (m *S3BucketMutation) ResetEdge(name string) error
- func (m *S3BucketMutation) ResetField(name string) error
- func (m *S3BucketMutation) ResetFkUserID()
- func (m *S3BucketMutation) SetBucketName(s string)
- func (m *S3BucketMutation) SetCreatedTime(t time.Time)
- func (m *S3BucketMutation) SetField(name string, value ent.Value) error
- func (m *S3BucketMutation) SetFkUserID(u uuid.UUID)
- func (m *S3BucketMutation) SetID(id uuid.UUID)
- func (m *S3BucketMutation) SetOp(op Op)
- func (m S3BucketMutation) Tx() (*Tx, error)
- func (m *S3BucketMutation) Type() string
- func (m *S3BucketMutation) Where(ps ...predicate.S3Bucket)
- func (m *S3BucketMutation) WhereP(ps ...func(*sql.Selector))
- type S3BucketQuery
- func (_q *S3BucketQuery) Aggregate(fns ...AggregateFunc) *S3BucketSelect
- func (_q *S3BucketQuery) All(ctx context.Context) ([]*S3Bucket, error)
- func (_q *S3BucketQuery) AllX(ctx context.Context) []*S3Bucket
- func (_q *S3BucketQuery) Clone() *S3BucketQuery
- func (_q *S3BucketQuery) Count(ctx context.Context) (int, error)
- func (_q *S3BucketQuery) CountX(ctx context.Context) int
- func (_q *S3BucketQuery) Exist(ctx context.Context) (bool, error)
- func (_q *S3BucketQuery) ExistX(ctx context.Context) bool
- func (_q *S3BucketQuery) First(ctx context.Context) (*S3Bucket, error)
- func (_q *S3BucketQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *S3BucketQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *S3BucketQuery) FirstX(ctx context.Context) *S3Bucket
- func (_q *S3BucketQuery) GroupBy(field string, fields ...string) *S3BucketGroupBy
- func (_q *S3BucketQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *S3BucketQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *S3BucketQuery) Limit(limit int) *S3BucketQuery
- func (_q *S3BucketQuery) Offset(offset int) *S3BucketQuery
- func (_q *S3BucketQuery) Only(ctx context.Context) (*S3Bucket, error)
- func (_q *S3BucketQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *S3BucketQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *S3BucketQuery) OnlyX(ctx context.Context) *S3Bucket
- func (_q *S3BucketQuery) Order(o ...s3bucket.OrderOption) *S3BucketQuery
- func (_q *S3BucketQuery) Select(fields ...string) *S3BucketSelect
- func (_q *S3BucketQuery) Unique(unique bool) *S3BucketQuery
- func (_q *S3BucketQuery) Where(ps ...predicate.S3Bucket) *S3BucketQuery
- type S3BucketSelect
- func (_s *S3BucketSelect) Aggregate(fns ...AggregateFunc) *S3BucketSelect
- func (s *S3BucketSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *S3BucketSelect) BoolX(ctx context.Context) bool
- func (s *S3BucketSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *S3BucketSelect) BoolsX(ctx context.Context) []bool
- func (s *S3BucketSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *S3BucketSelect) Float64X(ctx context.Context) float64
- func (s *S3BucketSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *S3BucketSelect) Float64sX(ctx context.Context) []float64
- func (s *S3BucketSelect) Int(ctx context.Context) (_ int, err error)
- func (s *S3BucketSelect) IntX(ctx context.Context) int
- func (s *S3BucketSelect) Ints(ctx context.Context) ([]int, error)
- func (s *S3BucketSelect) IntsX(ctx context.Context) []int
- func (_s *S3BucketSelect) Scan(ctx context.Context, v any) error
- func (s *S3BucketSelect) ScanX(ctx context.Context, v any)
- func (s *S3BucketSelect) String(ctx context.Context) (_ string, err error)
- func (s *S3BucketSelect) StringX(ctx context.Context) string
- func (s *S3BucketSelect) Strings(ctx context.Context) ([]string, error)
- func (s *S3BucketSelect) StringsX(ctx context.Context) []string
- type S3BucketUpdate
- func (_u *S3BucketUpdate) Exec(ctx context.Context) error
- func (_u *S3BucketUpdate) ExecX(ctx context.Context)
- func (_u *S3BucketUpdate) Mutation() *S3BucketMutation
- func (_u *S3BucketUpdate) Save(ctx context.Context) (int, error)
- func (_u *S3BucketUpdate) SaveX(ctx context.Context) int
- func (_u *S3BucketUpdate) SetBucketName(v string) *S3BucketUpdate
- func (_u *S3BucketUpdate) SetCreatedTime(v time.Time) *S3BucketUpdate
- func (_u *S3BucketUpdate) SetFkUserID(v uuid.UUID) *S3BucketUpdate
- func (_u *S3BucketUpdate) SetNillableBucketName(v *string) *S3BucketUpdate
- func (_u *S3BucketUpdate) SetNillableCreatedTime(v *time.Time) *S3BucketUpdate
- func (_u *S3BucketUpdate) SetNillableFkUserID(v *uuid.UUID) *S3BucketUpdate
- func (_u *S3BucketUpdate) Where(ps ...predicate.S3Bucket) *S3BucketUpdate
- type S3BucketUpdateOne
- func (_u *S3BucketUpdateOne) Exec(ctx context.Context) error
- func (_u *S3BucketUpdateOne) ExecX(ctx context.Context)
- func (_u *S3BucketUpdateOne) Mutation() *S3BucketMutation
- func (_u *S3BucketUpdateOne) Save(ctx context.Context) (*S3Bucket, error)
- func (_u *S3BucketUpdateOne) SaveX(ctx context.Context) *S3Bucket
- func (_u *S3BucketUpdateOne) Select(field string, fields ...string) *S3BucketUpdateOne
- func (_u *S3BucketUpdateOne) SetBucketName(v string) *S3BucketUpdateOne
- func (_u *S3BucketUpdateOne) SetCreatedTime(v time.Time) *S3BucketUpdateOne
- func (_u *S3BucketUpdateOne) SetFkUserID(v uuid.UUID) *S3BucketUpdateOne
- func (_u *S3BucketUpdateOne) SetNillableBucketName(v *string) *S3BucketUpdateOne
- func (_u *S3BucketUpdateOne) SetNillableCreatedTime(v *time.Time) *S3BucketUpdateOne
- func (_u *S3BucketUpdateOne) SetNillableFkUserID(v *uuid.UUID) *S3BucketUpdateOne
- func (_u *S3BucketUpdateOne) Where(ps ...predicate.S3Bucket) *S3BucketUpdateOne
- type S3Buckets
- type S3User
- type S3UserClient
- func (c *S3UserClient) Create() *S3UserCreate
- func (c *S3UserClient) CreateBulk(builders ...*S3UserCreate) *S3UserCreateBulk
- func (c *S3UserClient) Delete() *S3UserDelete
- func (c *S3UserClient) DeleteOne(_m *S3User) *S3UserDeleteOne
- func (c *S3UserClient) DeleteOneID(id uuid.UUID) *S3UserDeleteOne
- func (c *S3UserClient) Get(ctx context.Context, id uuid.UUID) (*S3User, error)
- func (c *S3UserClient) GetX(ctx context.Context, id uuid.UUID) *S3User
- func (c *S3UserClient) Hooks() []Hook
- func (c *S3UserClient) Intercept(interceptors ...Interceptor)
- func (c *S3UserClient) Interceptors() []Interceptor
- func (c *S3UserClient) MapCreateBulk(slice any, setFunc func(*S3UserCreate, int)) *S3UserCreateBulk
- func (c *S3UserClient) Query() *S3UserQuery
- func (c *S3UserClient) Update() *S3UserUpdate
- func (c *S3UserClient) UpdateOne(_m *S3User) *S3UserUpdateOne
- func (c *S3UserClient) UpdateOneID(id uuid.UUID) *S3UserUpdateOne
- func (c *S3UserClient) Use(hooks ...Hook)
- type S3UserCreate
- func (_c *S3UserCreate) Exec(ctx context.Context) error
- func (_c *S3UserCreate) ExecX(ctx context.Context)
- func (_c *S3UserCreate) Mutation() *S3UserMutation
- func (_c *S3UserCreate) Save(ctx context.Context) (*S3User, error)
- func (_c *S3UserCreate) SaveX(ctx context.Context) *S3User
- func (_c *S3UserCreate) SetAccessKey(v string) *S3UserCreate
- func (_c *S3UserCreate) SetCreateTime(v time.Time) *S3UserCreate
- func (_c *S3UserCreate) SetFkUserID(v uuid.UUID) *S3UserCreate
- func (_c *S3UserCreate) SetID(v uuid.UUID) *S3UserCreate
- func (_c *S3UserCreate) SetNillableCreateTime(v *time.Time) *S3UserCreate
- func (_c *S3UserCreate) SetNillableID(v *uuid.UUID) *S3UserCreate
- func (_c *S3UserCreate) SetNillableUpdateTime(v *time.Time) *S3UserCreate
- func (_c *S3UserCreate) SetSecretKey(v string) *S3UserCreate
- func (_c *S3UserCreate) SetType(v int8) *S3UserCreate
- func (_c *S3UserCreate) SetUpdateTime(v time.Time) *S3UserCreate
- type S3UserCreateBulk
- type S3UserDelete
- type S3UserDeleteOne
- type S3UserGroupBy
- func (_g *S3UserGroupBy) Aggregate(fns ...AggregateFunc) *S3UserGroupBy
- func (s *S3UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *S3UserGroupBy) BoolX(ctx context.Context) bool
- func (s *S3UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *S3UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *S3UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *S3UserGroupBy) Float64X(ctx context.Context) float64
- func (s *S3UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *S3UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *S3UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *S3UserGroupBy) IntX(ctx context.Context) int
- func (s *S3UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *S3UserGroupBy) IntsX(ctx context.Context) []int
- func (_g *S3UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *S3UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *S3UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *S3UserGroupBy) StringX(ctx context.Context) string
- func (s *S3UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *S3UserGroupBy) StringsX(ctx context.Context) []string
- type S3UserMutation
- func (m *S3UserMutation) AccessKey() (r string, exists bool)
- func (m *S3UserMutation) AddField(name string, value ent.Value) error
- func (m *S3UserMutation) AddType(i int8)
- func (m *S3UserMutation) AddedEdges() []string
- func (m *S3UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *S3UserMutation) AddedFields() []string
- func (m *S3UserMutation) AddedIDs(name string) []ent.Value
- func (m *S3UserMutation) AddedType() (r int8, exists bool)
- func (m *S3UserMutation) ClearEdge(name string) error
- func (m *S3UserMutation) ClearField(name string) error
- func (m *S3UserMutation) ClearedEdges() []string
- func (m *S3UserMutation) ClearedFields() []string
- func (m S3UserMutation) Client() *Client
- func (m *S3UserMutation) CreateTime() (r time.Time, exists bool)
- func (m *S3UserMutation) EdgeCleared(name string) bool
- func (m *S3UserMutation) Field(name string) (ent.Value, bool)
- func (m *S3UserMutation) FieldCleared(name string) bool
- func (m *S3UserMutation) Fields() []string
- func (m *S3UserMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *S3UserMutation) GetType() (r int8, exists bool)
- func (m *S3UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *S3UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *S3UserMutation) OldAccessKey(ctx context.Context) (v string, err error)
- func (m *S3UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *S3UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *S3UserMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *S3UserMutation) OldSecretKey(ctx context.Context) (v string, err error)
- func (m *S3UserMutation) OldType(ctx context.Context) (v int8, err error)
- func (m *S3UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *S3UserMutation) Op() Op
- func (m *S3UserMutation) RemovedEdges() []string
- func (m *S3UserMutation) RemovedIDs(name string) []ent.Value
- func (m *S3UserMutation) ResetAccessKey()
- func (m *S3UserMutation) ResetCreateTime()
- func (m *S3UserMutation) ResetEdge(name string) error
- func (m *S3UserMutation) ResetField(name string) error
- func (m *S3UserMutation) ResetFkUserID()
- func (m *S3UserMutation) ResetSecretKey()
- func (m *S3UserMutation) ResetType()
- func (m *S3UserMutation) ResetUpdateTime()
- func (m *S3UserMutation) SecretKey() (r string, exists bool)
- func (m *S3UserMutation) SetAccessKey(s string)
- func (m *S3UserMutation) SetCreateTime(t time.Time)
- func (m *S3UserMutation) SetField(name string, value ent.Value) error
- func (m *S3UserMutation) SetFkUserID(u uuid.UUID)
- func (m *S3UserMutation) SetID(id uuid.UUID)
- func (m *S3UserMutation) SetOp(op Op)
- func (m *S3UserMutation) SetSecretKey(s string)
- func (m *S3UserMutation) SetType(i int8)
- func (m *S3UserMutation) SetUpdateTime(t time.Time)
- func (m S3UserMutation) Tx() (*Tx, error)
- func (m *S3UserMutation) Type() string
- func (m *S3UserMutation) UpdateTime() (r time.Time, exists bool)
- func (m *S3UserMutation) Where(ps ...predicate.S3User)
- func (m *S3UserMutation) WhereP(ps ...func(*sql.Selector))
- type S3UserQuery
- func (_q *S3UserQuery) Aggregate(fns ...AggregateFunc) *S3UserSelect
- func (_q *S3UserQuery) All(ctx context.Context) ([]*S3User, error)
- func (_q *S3UserQuery) AllX(ctx context.Context) []*S3User
- func (_q *S3UserQuery) Clone() *S3UserQuery
- func (_q *S3UserQuery) Count(ctx context.Context) (int, error)
- func (_q *S3UserQuery) CountX(ctx context.Context) int
- func (_q *S3UserQuery) Exist(ctx context.Context) (bool, error)
- func (_q *S3UserQuery) ExistX(ctx context.Context) bool
- func (_q *S3UserQuery) First(ctx context.Context) (*S3User, error)
- func (_q *S3UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *S3UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *S3UserQuery) FirstX(ctx context.Context) *S3User
- func (_q *S3UserQuery) GroupBy(field string, fields ...string) *S3UserGroupBy
- func (_q *S3UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *S3UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *S3UserQuery) Limit(limit int) *S3UserQuery
- func (_q *S3UserQuery) Offset(offset int) *S3UserQuery
- func (_q *S3UserQuery) Only(ctx context.Context) (*S3User, error)
- func (_q *S3UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *S3UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *S3UserQuery) OnlyX(ctx context.Context) *S3User
- func (_q *S3UserQuery) Order(o ...s3user.OrderOption) *S3UserQuery
- func (_q *S3UserQuery) Select(fields ...string) *S3UserSelect
- func (_q *S3UserQuery) Unique(unique bool) *S3UserQuery
- func (_q *S3UserQuery) Where(ps ...predicate.S3User) *S3UserQuery
- type S3UserSelect
- func (_s *S3UserSelect) Aggregate(fns ...AggregateFunc) *S3UserSelect
- func (s *S3UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *S3UserSelect) BoolX(ctx context.Context) bool
- func (s *S3UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *S3UserSelect) BoolsX(ctx context.Context) []bool
- func (s *S3UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *S3UserSelect) Float64X(ctx context.Context) float64
- func (s *S3UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *S3UserSelect) Float64sX(ctx context.Context) []float64
- func (s *S3UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *S3UserSelect) IntX(ctx context.Context) int
- func (s *S3UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *S3UserSelect) IntsX(ctx context.Context) []int
- func (_s *S3UserSelect) Scan(ctx context.Context, v any) error
- func (s *S3UserSelect) ScanX(ctx context.Context, v any)
- func (s *S3UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *S3UserSelect) StringX(ctx context.Context) string
- func (s *S3UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *S3UserSelect) StringsX(ctx context.Context) []string
- type S3UserUpdate
- func (_u *S3UserUpdate) AddType(v int8) *S3UserUpdate
- func (_u *S3UserUpdate) Exec(ctx context.Context) error
- func (_u *S3UserUpdate) ExecX(ctx context.Context)
- func (_u *S3UserUpdate) Mutation() *S3UserMutation
- func (_u *S3UserUpdate) Save(ctx context.Context) (int, error)
- func (_u *S3UserUpdate) SaveX(ctx context.Context) int
- func (_u *S3UserUpdate) SetAccessKey(v string) *S3UserUpdate
- func (_u *S3UserUpdate) SetCreateTime(v time.Time) *S3UserUpdate
- func (_u *S3UserUpdate) SetFkUserID(v uuid.UUID) *S3UserUpdate
- func (_u *S3UserUpdate) SetNillableAccessKey(v *string) *S3UserUpdate
- func (_u *S3UserUpdate) SetNillableCreateTime(v *time.Time) *S3UserUpdate
- func (_u *S3UserUpdate) SetNillableFkUserID(v *uuid.UUID) *S3UserUpdate
- func (_u *S3UserUpdate) SetNillableSecretKey(v *string) *S3UserUpdate
- func (_u *S3UserUpdate) SetNillableType(v *int8) *S3UserUpdate
- func (_u *S3UserUpdate) SetNillableUpdateTime(v *time.Time) *S3UserUpdate
- func (_u *S3UserUpdate) SetSecretKey(v string) *S3UserUpdate
- func (_u *S3UserUpdate) SetType(v int8) *S3UserUpdate
- func (_u *S3UserUpdate) SetUpdateTime(v time.Time) *S3UserUpdate
- func (_u *S3UserUpdate) Where(ps ...predicate.S3User) *S3UserUpdate
- type S3UserUpdateOne
- func (_u *S3UserUpdateOne) AddType(v int8) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) Exec(ctx context.Context) error
- func (_u *S3UserUpdateOne) ExecX(ctx context.Context)
- func (_u *S3UserUpdateOne) Mutation() *S3UserMutation
- func (_u *S3UserUpdateOne) Save(ctx context.Context) (*S3User, error)
- func (_u *S3UserUpdateOne) SaveX(ctx context.Context) *S3User
- func (_u *S3UserUpdateOne) Select(field string, fields ...string) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetAccessKey(v string) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetCreateTime(v time.Time) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetFkUserID(v uuid.UUID) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetNillableAccessKey(v *string) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetNillableCreateTime(v *time.Time) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetNillableFkUserID(v *uuid.UUID) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetNillableSecretKey(v *string) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetNillableType(v *int8) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetNillableUpdateTime(v *time.Time) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetSecretKey(v string) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetType(v int8) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) SetUpdateTime(v time.Time) *S3UserUpdateOne
- func (_u *S3UserUpdateOne) Where(ps ...predicate.S3User) *S3UserUpdateOne
- type S3Users
- type Script
- type ScriptClient
- func (c *ScriptClient) Create() *ScriptCreate
- func (c *ScriptClient) CreateBulk(builders ...*ScriptCreate) *ScriptCreateBulk
- func (c *ScriptClient) Delete() *ScriptDelete
- func (c *ScriptClient) DeleteOne(_m *Script) *ScriptDeleteOne
- func (c *ScriptClient) DeleteOneID(id int32) *ScriptDeleteOne
- func (c *ScriptClient) Get(ctx context.Context, id int32) (*Script, error)
- func (c *ScriptClient) GetX(ctx context.Context, id int32) *Script
- func (c *ScriptClient) Hooks() []Hook
- func (c *ScriptClient) Intercept(interceptors ...Interceptor)
- func (c *ScriptClient) Interceptors() []Interceptor
- func (c *ScriptClient) MapCreateBulk(slice any, setFunc func(*ScriptCreate, int)) *ScriptCreateBulk
- func (c *ScriptClient) Query() *ScriptQuery
- func (c *ScriptClient) QueryScriptExecutionRecords(_m *Script) *ScriptExecutionRecordQuery
- func (c *ScriptClient) Update() *ScriptUpdate
- func (c *ScriptClient) UpdateOne(_m *Script) *ScriptUpdateOne
- func (c *ScriptClient) UpdateOneID(id int32) *ScriptUpdateOne
- func (c *ScriptClient) Use(hooks ...Hook)
- type ScriptCreate
- func (_c *ScriptCreate) AddScriptExecutionRecordIDs(ids ...int32) *ScriptCreate
- func (_c *ScriptCreate) AddScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptCreate
- func (_c *ScriptCreate) Exec(ctx context.Context) error
- func (_c *ScriptCreate) ExecX(ctx context.Context)
- func (_c *ScriptCreate) Mutation() *ScriptMutation
- func (_c *ScriptCreate) Save(ctx context.Context) (*Script, error)
- func (_c *ScriptCreate) SaveX(ctx context.Context) *Script
- func (_c *ScriptCreate) SetCreateTime(v time.Time) *ScriptCreate
- func (_c *ScriptCreate) SetFileAddress(v string) *ScriptCreate
- func (_c *ScriptCreate) SetID(v int32) *ScriptCreate
- func (_c *ScriptCreate) SetNillableCreateTime(v *time.Time) *ScriptCreate
- func (_c *ScriptCreate) SetNillableUpdateTime(v *time.Time) *ScriptCreate
- func (_c *ScriptCreate) SetScriptContent(v string) *ScriptCreate
- func (_c *ScriptCreate) SetScriptName(v string) *ScriptCreate
- func (_c *ScriptCreate) SetTaskNumber(v int32) *ScriptCreate
- func (_c *ScriptCreate) SetUpdateTime(v time.Time) *ScriptCreate
- func (_c *ScriptCreate) SetUserID(v string) *ScriptCreate
- type ScriptCreateBulk
- type ScriptDelete
- type ScriptDeleteOne
- type ScriptEdges
- type ScriptExecutionRecord
- func (_m *ScriptExecutionRecord) QueryScript() *ScriptQuery
- func (_m *ScriptExecutionRecord) String() string
- func (_m *ScriptExecutionRecord) Unwrap() *ScriptExecutionRecord
- func (_m *ScriptExecutionRecord) Update() *ScriptExecutionRecordUpdateOne
- func (_m *ScriptExecutionRecord) Value(name string) (ent.Value, error)
- type ScriptExecutionRecordClient
- func (c *ScriptExecutionRecordClient) Create() *ScriptExecutionRecordCreate
- func (c *ScriptExecutionRecordClient) CreateBulk(builders ...*ScriptExecutionRecordCreate) *ScriptExecutionRecordCreateBulk
- func (c *ScriptExecutionRecordClient) Delete() *ScriptExecutionRecordDelete
- func (c *ScriptExecutionRecordClient) DeleteOne(_m *ScriptExecutionRecord) *ScriptExecutionRecordDeleteOne
- func (c *ScriptExecutionRecordClient) DeleteOneID(id int32) *ScriptExecutionRecordDeleteOne
- func (c *ScriptExecutionRecordClient) Get(ctx context.Context, id int32) (*ScriptExecutionRecord, error)
- func (c *ScriptExecutionRecordClient) GetX(ctx context.Context, id int32) *ScriptExecutionRecord
- func (c *ScriptExecutionRecordClient) Hooks() []Hook
- func (c *ScriptExecutionRecordClient) Intercept(interceptors ...Interceptor)
- func (c *ScriptExecutionRecordClient) Interceptors() []Interceptor
- func (c *ScriptExecutionRecordClient) MapCreateBulk(slice any, setFunc func(*ScriptExecutionRecordCreate, int)) *ScriptExecutionRecordCreateBulk
- func (c *ScriptExecutionRecordClient) Query() *ScriptExecutionRecordQuery
- func (c *ScriptExecutionRecordClient) QueryScript(_m *ScriptExecutionRecord) *ScriptQuery
- func (c *ScriptExecutionRecordClient) Update() *ScriptExecutionRecordUpdate
- func (c *ScriptExecutionRecordClient) UpdateOne(_m *ScriptExecutionRecord) *ScriptExecutionRecordUpdateOne
- func (c *ScriptExecutionRecordClient) UpdateOneID(id int32) *ScriptExecutionRecordUpdateOne
- func (c *ScriptExecutionRecordClient) Use(hooks ...Hook)
- type ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) Exec(ctx context.Context) error
- func (_c *ScriptExecutionRecordCreate) ExecX(ctx context.Context)
- func (_c *ScriptExecutionRecordCreate) Mutation() *ScriptExecutionRecordMutation
- func (_c *ScriptExecutionRecordCreate) Save(ctx context.Context) (*ScriptExecutionRecord, error)
- func (_c *ScriptExecutionRecordCreate) SaveX(ctx context.Context) *ScriptExecutionRecord
- func (_c *ScriptExecutionRecordCreate) SetCreateTime(v time.Time) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetExecuteResult(v string) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetExecuteState(v int32) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetFileAddress(v string) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetFkScriptID(v int32) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetID(v int32) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetNillableCreateTime(v *time.Time) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetNillableScriptID(id *int32) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetNillableUpdateTime(v *time.Time) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetScript(v *Script) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetScriptContent(v string) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetScriptID(id int32) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetScriptName(v string) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetTaskNumber(v int32) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetUpdateTime(v time.Time) *ScriptExecutionRecordCreate
- func (_c *ScriptExecutionRecordCreate) SetUserID(v string) *ScriptExecutionRecordCreate
- type ScriptExecutionRecordCreateBulk
- func (_c *ScriptExecutionRecordCreateBulk) Exec(ctx context.Context) error
- func (_c *ScriptExecutionRecordCreateBulk) ExecX(ctx context.Context)
- func (_c *ScriptExecutionRecordCreateBulk) Save(ctx context.Context) ([]*ScriptExecutionRecord, error)
- func (_c *ScriptExecutionRecordCreateBulk) SaveX(ctx context.Context) []*ScriptExecutionRecord
- type ScriptExecutionRecordDelete
- type ScriptExecutionRecordDeleteOne
- type ScriptExecutionRecordEdges
- type ScriptExecutionRecordGroupBy
- func (_g *ScriptExecutionRecordGroupBy) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordGroupBy
- func (s *ScriptExecutionRecordGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptExecutionRecordGroupBy) BoolX(ctx context.Context) bool
- func (s *ScriptExecutionRecordGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptExecutionRecordGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScriptExecutionRecordGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptExecutionRecordGroupBy) Float64X(ctx context.Context) float64
- func (s *ScriptExecutionRecordGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptExecutionRecordGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScriptExecutionRecordGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptExecutionRecordGroupBy) IntX(ctx context.Context) int
- func (s *ScriptExecutionRecordGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptExecutionRecordGroupBy) IntsX(ctx context.Context) []int
- func (_g *ScriptExecutionRecordGroupBy) Scan(ctx context.Context, v any) error
- func (s *ScriptExecutionRecordGroupBy) ScanX(ctx context.Context, v any)
- func (s *ScriptExecutionRecordGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScriptExecutionRecordGroupBy) StringX(ctx context.Context) string
- func (s *ScriptExecutionRecordGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptExecutionRecordGroupBy) StringsX(ctx context.Context) []string
- type ScriptExecutionRecordMutation
- func (m *ScriptExecutionRecordMutation) AddExecuteState(i int32)
- func (m *ScriptExecutionRecordMutation) AddField(name string, value ent.Value) error
- func (m *ScriptExecutionRecordMutation) AddFkScriptID(i int32)
- func (m *ScriptExecutionRecordMutation) AddTaskNumber(i int32)
- func (m *ScriptExecutionRecordMutation) AddedEdges() []string
- func (m *ScriptExecutionRecordMutation) AddedExecuteState() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScriptExecutionRecordMutation) AddedFields() []string
- func (m *ScriptExecutionRecordMutation) AddedFkScriptID() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) AddedIDs(name string) []ent.Value
- func (m *ScriptExecutionRecordMutation) AddedTaskNumber() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) ClearEdge(name string) error
- func (m *ScriptExecutionRecordMutation) ClearField(name string) error
- func (m *ScriptExecutionRecordMutation) ClearScript()
- func (m *ScriptExecutionRecordMutation) ClearedEdges() []string
- func (m *ScriptExecutionRecordMutation) ClearedFields() []string
- func (m ScriptExecutionRecordMutation) Client() *Client
- func (m *ScriptExecutionRecordMutation) CreateTime() (r time.Time, exists bool)
- func (m *ScriptExecutionRecordMutation) EdgeCleared(name string) bool
- func (m *ScriptExecutionRecordMutation) ExecuteResult() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) ExecuteState() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) Field(name string) (ent.Value, bool)
- func (m *ScriptExecutionRecordMutation) FieldCleared(name string) bool
- func (m *ScriptExecutionRecordMutation) Fields() []string
- func (m *ScriptExecutionRecordMutation) FileAddress() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) FkScriptID() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) ID() (id int32, exists bool)
- func (m *ScriptExecutionRecordMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *ScriptExecutionRecordMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScriptExecutionRecordMutation) OldExecuteResult(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) OldExecuteState(ctx context.Context) (v int32, err error)
- func (m *ScriptExecutionRecordMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScriptExecutionRecordMutation) OldFileAddress(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) OldFkScriptID(ctx context.Context) (v int32, err error)
- func (m *ScriptExecutionRecordMutation) OldScriptContent(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) OldScriptName(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) OldTaskNumber(ctx context.Context) (v int32, err error)
- func (m *ScriptExecutionRecordMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScriptExecutionRecordMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) Op() Op
- func (m *ScriptExecutionRecordMutation) RemovedEdges() []string
- func (m *ScriptExecutionRecordMutation) RemovedIDs(name string) []ent.Value
- func (m *ScriptExecutionRecordMutation) ResetCreateTime()
- func (m *ScriptExecutionRecordMutation) ResetEdge(name string) error
- func (m *ScriptExecutionRecordMutation) ResetExecuteResult()
- func (m *ScriptExecutionRecordMutation) ResetExecuteState()
- func (m *ScriptExecutionRecordMutation) ResetField(name string) error
- func (m *ScriptExecutionRecordMutation) ResetFileAddress()
- func (m *ScriptExecutionRecordMutation) ResetFkScriptID()
- func (m *ScriptExecutionRecordMutation) ResetScript()
- func (m *ScriptExecutionRecordMutation) ResetScriptContent()
- func (m *ScriptExecutionRecordMutation) ResetScriptName()
- func (m *ScriptExecutionRecordMutation) ResetTaskNumber()
- func (m *ScriptExecutionRecordMutation) ResetUpdateTime()
- func (m *ScriptExecutionRecordMutation) ResetUserID()
- func (m *ScriptExecutionRecordMutation) ScriptCleared() bool
- func (m *ScriptExecutionRecordMutation) ScriptContent() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) ScriptID() (id int32, exists bool)
- func (m *ScriptExecutionRecordMutation) ScriptIDs() (ids []int32)
- func (m *ScriptExecutionRecordMutation) ScriptName() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) SetCreateTime(t time.Time)
- func (m *ScriptExecutionRecordMutation) SetExecuteResult(s string)
- func (m *ScriptExecutionRecordMutation) SetExecuteState(i int32)
- func (m *ScriptExecutionRecordMutation) SetField(name string, value ent.Value) error
- func (m *ScriptExecutionRecordMutation) SetFileAddress(s string)
- func (m *ScriptExecutionRecordMutation) SetFkScriptID(i int32)
- func (m *ScriptExecutionRecordMutation) SetID(id int32)
- func (m *ScriptExecutionRecordMutation) SetOp(op Op)
- func (m *ScriptExecutionRecordMutation) SetScriptContent(s string)
- func (m *ScriptExecutionRecordMutation) SetScriptID(id int32)
- func (m *ScriptExecutionRecordMutation) SetScriptName(s string)
- func (m *ScriptExecutionRecordMutation) SetTaskNumber(i int32)
- func (m *ScriptExecutionRecordMutation) SetUpdateTime(t time.Time)
- func (m *ScriptExecutionRecordMutation) SetUserID(s string)
- func (m *ScriptExecutionRecordMutation) TaskNumber() (r int32, exists bool)
- func (m ScriptExecutionRecordMutation) Tx() (*Tx, error)
- func (m *ScriptExecutionRecordMutation) Type() string
- func (m *ScriptExecutionRecordMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ScriptExecutionRecordMutation) UserID() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) Where(ps ...predicate.ScriptExecutionRecord)
- func (m *ScriptExecutionRecordMutation) WhereP(ps ...func(*sql.Selector))
- type ScriptExecutionRecordQuery
- func (_q *ScriptExecutionRecordQuery) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordSelect
- func (_q *ScriptExecutionRecordQuery) All(ctx context.Context) ([]*ScriptExecutionRecord, error)
- func (_q *ScriptExecutionRecordQuery) AllX(ctx context.Context) []*ScriptExecutionRecord
- func (_q *ScriptExecutionRecordQuery) Clone() *ScriptExecutionRecordQuery
- func (_q *ScriptExecutionRecordQuery) Count(ctx context.Context) (int, error)
- func (_q *ScriptExecutionRecordQuery) CountX(ctx context.Context) int
- func (_q *ScriptExecutionRecordQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ScriptExecutionRecordQuery) ExistX(ctx context.Context) bool
- func (_q *ScriptExecutionRecordQuery) First(ctx context.Context) (*ScriptExecutionRecord, error)
- func (_q *ScriptExecutionRecordQuery) FirstID(ctx context.Context) (id int32, err error)
- func (_q *ScriptExecutionRecordQuery) FirstIDX(ctx context.Context) int32
- func (_q *ScriptExecutionRecordQuery) FirstX(ctx context.Context) *ScriptExecutionRecord
- func (_q *ScriptExecutionRecordQuery) GroupBy(field string, fields ...string) *ScriptExecutionRecordGroupBy
- func (_q *ScriptExecutionRecordQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (_q *ScriptExecutionRecordQuery) IDsX(ctx context.Context) []int32
- func (_q *ScriptExecutionRecordQuery) Limit(limit int) *ScriptExecutionRecordQuery
- func (_q *ScriptExecutionRecordQuery) Offset(offset int) *ScriptExecutionRecordQuery
- func (_q *ScriptExecutionRecordQuery) Only(ctx context.Context) (*ScriptExecutionRecord, error)
- func (_q *ScriptExecutionRecordQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (_q *ScriptExecutionRecordQuery) OnlyIDX(ctx context.Context) int32
- func (_q *ScriptExecutionRecordQuery) OnlyX(ctx context.Context) *ScriptExecutionRecord
- func (_q *ScriptExecutionRecordQuery) Order(o ...scriptexecutionrecord.OrderOption) *ScriptExecutionRecordQuery
- func (_q *ScriptExecutionRecordQuery) QueryScript() *ScriptQuery
- func (_q *ScriptExecutionRecordQuery) Select(fields ...string) *ScriptExecutionRecordSelect
- func (_q *ScriptExecutionRecordQuery) Unique(unique bool) *ScriptExecutionRecordQuery
- func (_q *ScriptExecutionRecordQuery) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordQuery
- func (_q *ScriptExecutionRecordQuery) WithScript(opts ...func(*ScriptQuery)) *ScriptExecutionRecordQuery
- type ScriptExecutionRecordSelect
- func (_s *ScriptExecutionRecordSelect) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordSelect
- func (s *ScriptExecutionRecordSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptExecutionRecordSelect) BoolX(ctx context.Context) bool
- func (s *ScriptExecutionRecordSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptExecutionRecordSelect) BoolsX(ctx context.Context) []bool
- func (s *ScriptExecutionRecordSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptExecutionRecordSelect) Float64X(ctx context.Context) float64
- func (s *ScriptExecutionRecordSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptExecutionRecordSelect) Float64sX(ctx context.Context) []float64
- func (s *ScriptExecutionRecordSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptExecutionRecordSelect) IntX(ctx context.Context) int
- func (s *ScriptExecutionRecordSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptExecutionRecordSelect) IntsX(ctx context.Context) []int
- func (_s *ScriptExecutionRecordSelect) Scan(ctx context.Context, v any) error
- func (s *ScriptExecutionRecordSelect) ScanX(ctx context.Context, v any)
- func (s *ScriptExecutionRecordSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScriptExecutionRecordSelect) StringX(ctx context.Context) string
- func (s *ScriptExecutionRecordSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptExecutionRecordSelect) StringsX(ctx context.Context) []string
- type ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) AddExecuteState(v int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) AddFkScriptID(v int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) AddTaskNumber(v int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) ClearScript() *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) Exec(ctx context.Context) error
- func (_u *ScriptExecutionRecordUpdate) ExecX(ctx context.Context)
- func (_u *ScriptExecutionRecordUpdate) Mutation() *ScriptExecutionRecordMutation
- func (_u *ScriptExecutionRecordUpdate) Save(ctx context.Context) (int, error)
- func (_u *ScriptExecutionRecordUpdate) SaveX(ctx context.Context) int
- func (_u *ScriptExecutionRecordUpdate) SetCreateTime(v time.Time) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetExecuteResult(v string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetExecuteState(v int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetFileAddress(v string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetFkScriptID(v int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableCreateTime(v *time.Time) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableExecuteResult(v *string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableExecuteState(v *int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableFileAddress(v *string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableFkScriptID(v *int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableScriptContent(v *string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableScriptID(id *int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableScriptName(v *string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableTaskNumber(v *int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableUpdateTime(v *time.Time) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetNillableUserID(v *string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetScript(v *Script) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetScriptContent(v string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetScriptID(id int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetScriptName(v string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetTaskNumber(v int32) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetUpdateTime(v time.Time) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) SetUserID(v string) *ScriptExecutionRecordUpdate
- func (_u *ScriptExecutionRecordUpdate) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordUpdate
- type ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) AddExecuteState(v int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) AddFkScriptID(v int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) AddTaskNumber(v int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) ClearScript() *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) Exec(ctx context.Context) error
- func (_u *ScriptExecutionRecordUpdateOne) ExecX(ctx context.Context)
- func (_u *ScriptExecutionRecordUpdateOne) Mutation() *ScriptExecutionRecordMutation
- func (_u *ScriptExecutionRecordUpdateOne) Save(ctx context.Context) (*ScriptExecutionRecord, error)
- func (_u *ScriptExecutionRecordUpdateOne) SaveX(ctx context.Context) *ScriptExecutionRecord
- func (_u *ScriptExecutionRecordUpdateOne) Select(field string, fields ...string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetCreateTime(v time.Time) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetExecuteResult(v string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetExecuteState(v int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetFileAddress(v string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetFkScriptID(v int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableCreateTime(v *time.Time) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableExecuteResult(v *string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableExecuteState(v *int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableFileAddress(v *string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableFkScriptID(v *int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableScriptContent(v *string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableScriptID(id *int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableScriptName(v *string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableTaskNumber(v *int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableUpdateTime(v *time.Time) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetNillableUserID(v *string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetScript(v *Script) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetScriptContent(v string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetScriptID(id int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetScriptName(v string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetTaskNumber(v int32) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetUpdateTime(v time.Time) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) SetUserID(v string) *ScriptExecutionRecordUpdateOne
- func (_u *ScriptExecutionRecordUpdateOne) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordUpdateOne
- type ScriptExecutionRecords
- type ScriptGroupBy
- func (_g *ScriptGroupBy) Aggregate(fns ...AggregateFunc) *ScriptGroupBy
- func (s *ScriptGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptGroupBy) BoolX(ctx context.Context) bool
- func (s *ScriptGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScriptGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptGroupBy) Float64X(ctx context.Context) float64
- func (s *ScriptGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScriptGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptGroupBy) IntX(ctx context.Context) int
- func (s *ScriptGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptGroupBy) IntsX(ctx context.Context) []int
- func (_g *ScriptGroupBy) Scan(ctx context.Context, v any) error
- func (s *ScriptGroupBy) ScanX(ctx context.Context, v any)
- func (s *ScriptGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScriptGroupBy) StringX(ctx context.Context) string
- func (s *ScriptGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptGroupBy) StringsX(ctx context.Context) []string
- type ScriptMutation
- func (m *ScriptMutation) AddField(name string, value ent.Value) error
- func (m *ScriptMutation) AddScriptExecutionRecordIDs(ids ...int32)
- func (m *ScriptMutation) AddTaskNumber(i int32)
- func (m *ScriptMutation) AddedEdges() []string
- func (m *ScriptMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScriptMutation) AddedFields() []string
- func (m *ScriptMutation) AddedIDs(name string) []ent.Value
- func (m *ScriptMutation) AddedTaskNumber() (r int32, exists bool)
- func (m *ScriptMutation) ClearEdge(name string) error
- func (m *ScriptMutation) ClearField(name string) error
- func (m *ScriptMutation) ClearScriptExecutionRecords()
- func (m *ScriptMutation) ClearedEdges() []string
- func (m *ScriptMutation) ClearedFields() []string
- func (m ScriptMutation) Client() *Client
- func (m *ScriptMutation) CreateTime() (r time.Time, exists bool)
- func (m *ScriptMutation) EdgeCleared(name string) bool
- func (m *ScriptMutation) Field(name string) (ent.Value, bool)
- func (m *ScriptMutation) FieldCleared(name string) bool
- func (m *ScriptMutation) Fields() []string
- func (m *ScriptMutation) FileAddress() (r string, exists bool)
- func (m *ScriptMutation) ID() (id int32, exists bool)
- func (m *ScriptMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *ScriptMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScriptMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScriptMutation) OldFileAddress(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldScriptContent(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldScriptName(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldTaskNumber(ctx context.Context) (v int32, err error)
- func (m *ScriptMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScriptMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) Op() Op
- func (m *ScriptMutation) RemoveScriptExecutionRecordIDs(ids ...int32)
- func (m *ScriptMutation) RemovedEdges() []string
- func (m *ScriptMutation) RemovedIDs(name string) []ent.Value
- func (m *ScriptMutation) RemovedScriptExecutionRecordsIDs() (ids []int32)
- func (m *ScriptMutation) ResetCreateTime()
- func (m *ScriptMutation) ResetEdge(name string) error
- func (m *ScriptMutation) ResetField(name string) error
- func (m *ScriptMutation) ResetFileAddress()
- func (m *ScriptMutation) ResetScriptContent()
- func (m *ScriptMutation) ResetScriptExecutionRecords()
- func (m *ScriptMutation) ResetScriptName()
- func (m *ScriptMutation) ResetTaskNumber()
- func (m *ScriptMutation) ResetUpdateTime()
- func (m *ScriptMutation) ResetUserID()
- func (m *ScriptMutation) ScriptContent() (r string, exists bool)
- func (m *ScriptMutation) ScriptExecutionRecordsCleared() bool
- func (m *ScriptMutation) ScriptExecutionRecordsIDs() (ids []int32)
- func (m *ScriptMutation) ScriptName() (r string, exists bool)
- func (m *ScriptMutation) SetCreateTime(t time.Time)
- func (m *ScriptMutation) SetField(name string, value ent.Value) error
- func (m *ScriptMutation) SetFileAddress(s string)
- func (m *ScriptMutation) SetID(id int32)
- func (m *ScriptMutation) SetOp(op Op)
- func (m *ScriptMutation) SetScriptContent(s string)
- func (m *ScriptMutation) SetScriptName(s string)
- func (m *ScriptMutation) SetTaskNumber(i int32)
- func (m *ScriptMutation) SetUpdateTime(t time.Time)
- func (m *ScriptMutation) SetUserID(s string)
- func (m *ScriptMutation) TaskNumber() (r int32, exists bool)
- func (m ScriptMutation) Tx() (*Tx, error)
- func (m *ScriptMutation) Type() string
- func (m *ScriptMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ScriptMutation) UserID() (r string, exists bool)
- func (m *ScriptMutation) Where(ps ...predicate.Script)
- func (m *ScriptMutation) WhereP(ps ...func(*sql.Selector))
- type ScriptQuery
- func (_q *ScriptQuery) Aggregate(fns ...AggregateFunc) *ScriptSelect
- func (_q *ScriptQuery) All(ctx context.Context) ([]*Script, error)
- func (_q *ScriptQuery) AllX(ctx context.Context) []*Script
- func (_q *ScriptQuery) Clone() *ScriptQuery
- func (_q *ScriptQuery) Count(ctx context.Context) (int, error)
- func (_q *ScriptQuery) CountX(ctx context.Context) int
- func (_q *ScriptQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ScriptQuery) ExistX(ctx context.Context) bool
- func (_q *ScriptQuery) First(ctx context.Context) (*Script, error)
- func (_q *ScriptQuery) FirstID(ctx context.Context) (id int32, err error)
- func (_q *ScriptQuery) FirstIDX(ctx context.Context) int32
- func (_q *ScriptQuery) FirstX(ctx context.Context) *Script
- func (_q *ScriptQuery) GroupBy(field string, fields ...string) *ScriptGroupBy
- func (_q *ScriptQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (_q *ScriptQuery) IDsX(ctx context.Context) []int32
- func (_q *ScriptQuery) Limit(limit int) *ScriptQuery
- func (_q *ScriptQuery) Offset(offset int) *ScriptQuery
- func (_q *ScriptQuery) Only(ctx context.Context) (*Script, error)
- func (_q *ScriptQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (_q *ScriptQuery) OnlyIDX(ctx context.Context) int32
- func (_q *ScriptQuery) OnlyX(ctx context.Context) *Script
- func (_q *ScriptQuery) Order(o ...script.OrderOption) *ScriptQuery
- func (_q *ScriptQuery) QueryScriptExecutionRecords() *ScriptExecutionRecordQuery
- func (_q *ScriptQuery) Select(fields ...string) *ScriptSelect
- func (_q *ScriptQuery) Unique(unique bool) *ScriptQuery
- func (_q *ScriptQuery) Where(ps ...predicate.Script) *ScriptQuery
- func (_q *ScriptQuery) WithScriptExecutionRecords(opts ...func(*ScriptExecutionRecordQuery)) *ScriptQuery
- type ScriptSelect
- func (_s *ScriptSelect) Aggregate(fns ...AggregateFunc) *ScriptSelect
- func (s *ScriptSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptSelect) BoolX(ctx context.Context) bool
- func (s *ScriptSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptSelect) BoolsX(ctx context.Context) []bool
- func (s *ScriptSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptSelect) Float64X(ctx context.Context) float64
- func (s *ScriptSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptSelect) Float64sX(ctx context.Context) []float64
- func (s *ScriptSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptSelect) IntX(ctx context.Context) int
- func (s *ScriptSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptSelect) IntsX(ctx context.Context) []int
- func (_s *ScriptSelect) Scan(ctx context.Context, v any) error
- func (s *ScriptSelect) ScanX(ctx context.Context, v any)
- func (s *ScriptSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScriptSelect) StringX(ctx context.Context) string
- func (s *ScriptSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptSelect) StringsX(ctx context.Context) []string
- type ScriptUpdate
- func (_u *ScriptUpdate) AddScriptExecutionRecordIDs(ids ...int32) *ScriptUpdate
- func (_u *ScriptUpdate) AddScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptUpdate
- func (_u *ScriptUpdate) AddTaskNumber(v int32) *ScriptUpdate
- func (_u *ScriptUpdate) ClearScriptExecutionRecords() *ScriptUpdate
- func (_u *ScriptUpdate) Exec(ctx context.Context) error
- func (_u *ScriptUpdate) ExecX(ctx context.Context)
- func (_u *ScriptUpdate) Mutation() *ScriptMutation
- func (_u *ScriptUpdate) RemoveScriptExecutionRecordIDs(ids ...int32) *ScriptUpdate
- func (_u *ScriptUpdate) RemoveScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptUpdate
- func (_u *ScriptUpdate) Save(ctx context.Context) (int, error)
- func (_u *ScriptUpdate) SaveX(ctx context.Context) int
- func (_u *ScriptUpdate) SetCreateTime(v time.Time) *ScriptUpdate
- func (_u *ScriptUpdate) SetFileAddress(v string) *ScriptUpdate
- func (_u *ScriptUpdate) SetNillableCreateTime(v *time.Time) *ScriptUpdate
- func (_u *ScriptUpdate) SetNillableFileAddress(v *string) *ScriptUpdate
- func (_u *ScriptUpdate) SetNillableScriptContent(v *string) *ScriptUpdate
- func (_u *ScriptUpdate) SetNillableScriptName(v *string) *ScriptUpdate
- func (_u *ScriptUpdate) SetNillableTaskNumber(v *int32) *ScriptUpdate
- func (_u *ScriptUpdate) SetNillableUpdateTime(v *time.Time) *ScriptUpdate
- func (_u *ScriptUpdate) SetNillableUserID(v *string) *ScriptUpdate
- func (_u *ScriptUpdate) SetScriptContent(v string) *ScriptUpdate
- func (_u *ScriptUpdate) SetScriptName(v string) *ScriptUpdate
- func (_u *ScriptUpdate) SetTaskNumber(v int32) *ScriptUpdate
- func (_u *ScriptUpdate) SetUpdateTime(v time.Time) *ScriptUpdate
- func (_u *ScriptUpdate) SetUserID(v string) *ScriptUpdate
- func (_u *ScriptUpdate) Where(ps ...predicate.Script) *ScriptUpdate
- type ScriptUpdateOne
- func (_u *ScriptUpdateOne) AddScriptExecutionRecordIDs(ids ...int32) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) AddScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) AddTaskNumber(v int32) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) ClearScriptExecutionRecords() *ScriptUpdateOne
- func (_u *ScriptUpdateOne) Exec(ctx context.Context) error
- func (_u *ScriptUpdateOne) ExecX(ctx context.Context)
- func (_u *ScriptUpdateOne) Mutation() *ScriptMutation
- func (_u *ScriptUpdateOne) RemoveScriptExecutionRecordIDs(ids ...int32) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) RemoveScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) Save(ctx context.Context) (*Script, error)
- func (_u *ScriptUpdateOne) SaveX(ctx context.Context) *Script
- func (_u *ScriptUpdateOne) Select(field string, fields ...string) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetCreateTime(v time.Time) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetFileAddress(v string) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetNillableCreateTime(v *time.Time) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetNillableFileAddress(v *string) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetNillableScriptContent(v *string) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetNillableScriptName(v *string) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetNillableTaskNumber(v *int32) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetNillableUpdateTime(v *time.Time) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetNillableUserID(v *string) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetScriptContent(v string) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetScriptName(v string) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetTaskNumber(v int32) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetUpdateTime(v time.Time) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) SetUserID(v string) *ScriptUpdateOne
- func (_u *ScriptUpdateOne) Where(ps ...predicate.Script) *ScriptUpdateOne
- type Scripts
- 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(_m *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) MapCreateBulk(slice any, setFunc func(*StorageCreate, int)) *StorageCreateBulk
- func (c *StorageClient) Query() *StorageQuery
- func (c *StorageClient) Update() *StorageUpdate
- func (c *StorageClient) UpdateOne(_m *Storage) *StorageUpdateOne
- func (c *StorageClient) UpdateOneID(id uuid.UUID) *StorageUpdateOne
- func (c *StorageClient) Use(hooks ...Hook)
- type StorageCreate
- func (_c *StorageCreate) Exec(ctx context.Context) error
- func (_c *StorageCreate) ExecX(ctx context.Context)
- func (_c *StorageCreate) Mutation() *StorageMutation
- func (_c *StorageCreate) Save(ctx context.Context) (*Storage, error)
- func (_c *StorageCreate) SaveX(ctx context.Context) *Storage
- func (_c *StorageCreate) SetCid(v string) *StorageCreate
- func (_c *StorageCreate) SetID(v uuid.UUID) *StorageCreate
- func (_c *StorageCreate) SetLastModify(v time.Time) *StorageCreate
- func (_c *StorageCreate) SetName(v string) *StorageCreate
- func (_c *StorageCreate) SetNillableID(v *uuid.UUID) *StorageCreate
- func (_c *StorageCreate) SetNillableLastModify(v *time.Time) *StorageCreate
- func (_c *StorageCreate) SetNillableType(v *int32) *StorageCreate
- func (_c *StorageCreate) SetOwner(v string) *StorageCreate
- func (_c *StorageCreate) SetParentID(v string) *StorageCreate
- func (_c *StorageCreate) SetSize(v int32) *StorageCreate
- func (_c *StorageCreate) SetType(v int32) *StorageCreate
- type StorageCreateBulk
- type StorageDelete
- type StorageDeleteOne
- type StorageGroupBy
- func (_g *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 (_g *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 StorageProvider
- type StorageProviderClient
- func (c *StorageProviderClient) Create() *StorageProviderCreate
- func (c *StorageProviderClient) CreateBulk(builders ...*StorageProviderCreate) *StorageProviderCreateBulk
- func (c *StorageProviderClient) Delete() *StorageProviderDelete
- func (c *StorageProviderClient) DeleteOne(_m *StorageProvider) *StorageProviderDeleteOne
- func (c *StorageProviderClient) DeleteOneID(id uuid.UUID) *StorageProviderDeleteOne
- func (c *StorageProviderClient) Get(ctx context.Context, id uuid.UUID) (*StorageProvider, error)
- func (c *StorageProviderClient) GetX(ctx context.Context, id uuid.UUID) *StorageProvider
- func (c *StorageProviderClient) Hooks() []Hook
- func (c *StorageProviderClient) Intercept(interceptors ...Interceptor)
- func (c *StorageProviderClient) Interceptors() []Interceptor
- func (c *StorageProviderClient) MapCreateBulk(slice any, setFunc func(*StorageProviderCreate, int)) *StorageProviderCreateBulk
- func (c *StorageProviderClient) Query() *StorageProviderQuery
- func (c *StorageProviderClient) Update() *StorageProviderUpdate
- func (c *StorageProviderClient) UpdateOne(_m *StorageProvider) *StorageProviderUpdateOne
- func (c *StorageProviderClient) UpdateOneID(id uuid.UUID) *StorageProviderUpdateOne
- func (c *StorageProviderClient) Use(hooks ...Hook)
- type StorageProviderCreate
- func (_c *StorageProviderCreate) Exec(ctx context.Context) error
- func (_c *StorageProviderCreate) ExecX(ctx context.Context)
- func (_c *StorageProviderCreate) Mutation() *StorageProviderMutation
- func (_c *StorageProviderCreate) Save(ctx context.Context) (*StorageProvider, error)
- func (_c *StorageProviderCreate) SaveX(ctx context.Context) *StorageProvider
- func (_c *StorageProviderCreate) SetAgentID(v uuid.UUID) *StorageProviderCreate
- func (_c *StorageProviderCreate) SetCreatedTime(v time.Time) *StorageProviderCreate
- func (_c *StorageProviderCreate) SetGrpcPort(v int32) *StorageProviderCreate
- func (_c *StorageProviderCreate) SetID(v uuid.UUID) *StorageProviderCreate
- func (_c *StorageProviderCreate) SetMasterServer(v string) *StorageProviderCreate
- func (_c *StorageProviderCreate) SetNillableID(v *uuid.UUID) *StorageProviderCreate
- func (_c *StorageProviderCreate) SetNillableStatus(v *consts.StorageProviderStatus) *StorageProviderCreate
- func (_c *StorageProviderCreate) SetPublicIP(v string) *StorageProviderCreate
- func (_c *StorageProviderCreate) SetPublicPort(v int32) *StorageProviderCreate
- func (_c *StorageProviderCreate) SetStatus(v consts.StorageProviderStatus) *StorageProviderCreate
- type StorageProviderCreateBulk
- func (_c *StorageProviderCreateBulk) Exec(ctx context.Context) error
- func (_c *StorageProviderCreateBulk) ExecX(ctx context.Context)
- func (_c *StorageProviderCreateBulk) Save(ctx context.Context) ([]*StorageProvider, error)
- func (_c *StorageProviderCreateBulk) SaveX(ctx context.Context) []*StorageProvider
- type StorageProviderDelete
- type StorageProviderDeleteOne
- type StorageProviderGroupBy
- func (_g *StorageProviderGroupBy) Aggregate(fns ...AggregateFunc) *StorageProviderGroupBy
- func (s *StorageProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StorageProviderGroupBy) BoolX(ctx context.Context) bool
- func (s *StorageProviderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StorageProviderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StorageProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StorageProviderGroupBy) Float64X(ctx context.Context) float64
- func (s *StorageProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StorageProviderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StorageProviderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StorageProviderGroupBy) IntX(ctx context.Context) int
- func (s *StorageProviderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StorageProviderGroupBy) IntsX(ctx context.Context) []int
- func (_g *StorageProviderGroupBy) Scan(ctx context.Context, v any) error
- func (s *StorageProviderGroupBy) ScanX(ctx context.Context, v any)
- func (s *StorageProviderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StorageProviderGroupBy) StringX(ctx context.Context) string
- func (s *StorageProviderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StorageProviderGroupBy) StringsX(ctx context.Context) []string
- type StorageProviderMutation
- func (m *StorageProviderMutation) AddField(name string, value ent.Value) error
- func (m *StorageProviderMutation) AddGrpcPort(i int32)
- func (m *StorageProviderMutation) AddPublicPort(i int32)
- func (m *StorageProviderMutation) AddStatus(cps consts.StorageProviderStatus)
- func (m *StorageProviderMutation) AddedEdges() []string
- func (m *StorageProviderMutation) AddedField(name string) (ent.Value, bool)
- func (m *StorageProviderMutation) AddedFields() []string
- func (m *StorageProviderMutation) AddedGrpcPort() (r int32, exists bool)
- func (m *StorageProviderMutation) AddedIDs(name string) []ent.Value
- func (m *StorageProviderMutation) AddedPublicPort() (r int32, exists bool)
- func (m *StorageProviderMutation) AddedStatus() (r consts.StorageProviderStatus, exists bool)
- func (m *StorageProviderMutation) AgentID() (r uuid.UUID, exists bool)
- func (m *StorageProviderMutation) ClearEdge(name string) error
- func (m *StorageProviderMutation) ClearField(name string) error
- func (m *StorageProviderMutation) ClearedEdges() []string
- func (m *StorageProviderMutation) ClearedFields() []string
- func (m StorageProviderMutation) Client() *Client
- func (m *StorageProviderMutation) CreatedTime() (r time.Time, exists bool)
- func (m *StorageProviderMutation) EdgeCleared(name string) bool
- func (m *StorageProviderMutation) Field(name string) (ent.Value, bool)
- func (m *StorageProviderMutation) FieldCleared(name string) bool
- func (m *StorageProviderMutation) Fields() []string
- func (m *StorageProviderMutation) GrpcPort() (r int32, exists bool)
- func (m *StorageProviderMutation) ID() (id uuid.UUID, exists bool)
- func (m *StorageProviderMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *StorageProviderMutation) MasterServer() (r string, exists bool)
- func (m *StorageProviderMutation) OldAgentID(ctx context.Context) (v uuid.UUID, err error)
- func (m *StorageProviderMutation) OldCreatedTime(ctx context.Context) (v time.Time, err error)
- func (m *StorageProviderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StorageProviderMutation) OldGrpcPort(ctx context.Context) (v int32, err error)
- func (m *StorageProviderMutation) OldMasterServer(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldPublicIP(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldPublicPort(ctx context.Context) (v int32, err error)
- func (m *StorageProviderMutation) OldStatus(ctx context.Context) (v consts.StorageProviderStatus, err error)
- func (m *StorageProviderMutation) Op() Op
- func (m *StorageProviderMutation) PublicIP() (r string, exists bool)
- func (m *StorageProviderMutation) PublicPort() (r int32, exists bool)
- func (m *StorageProviderMutation) RemovedEdges() []string
- func (m *StorageProviderMutation) RemovedIDs(name string) []ent.Value
- func (m *StorageProviderMutation) ResetAgentID()
- func (m *StorageProviderMutation) ResetCreatedTime()
- func (m *StorageProviderMutation) ResetEdge(name string) error
- func (m *StorageProviderMutation) ResetField(name string) error
- func (m *StorageProviderMutation) ResetGrpcPort()
- func (m *StorageProviderMutation) ResetMasterServer()
- func (m *StorageProviderMutation) ResetPublicIP()
- func (m *StorageProviderMutation) ResetPublicPort()
- func (m *StorageProviderMutation) ResetStatus()
- func (m *StorageProviderMutation) SetAgentID(u uuid.UUID)
- func (m *StorageProviderMutation) SetCreatedTime(t time.Time)
- func (m *StorageProviderMutation) SetField(name string, value ent.Value) error
- func (m *StorageProviderMutation) SetGrpcPort(i int32)
- func (m *StorageProviderMutation) SetID(id uuid.UUID)
- func (m *StorageProviderMutation) SetMasterServer(s string)
- func (m *StorageProviderMutation) SetOp(op Op)
- func (m *StorageProviderMutation) SetPublicIP(s string)
- func (m *StorageProviderMutation) SetPublicPort(i int32)
- func (m *StorageProviderMutation) SetStatus(cps consts.StorageProviderStatus)
- func (m *StorageProviderMutation) Status() (r consts.StorageProviderStatus, exists bool)
- func (m StorageProviderMutation) Tx() (*Tx, error)
- func (m *StorageProviderMutation) Type() string
- func (m *StorageProviderMutation) Where(ps ...predicate.StorageProvider)
- func (m *StorageProviderMutation) WhereP(ps ...func(*sql.Selector))
- type StorageProviderQuery
- func (_q *StorageProviderQuery) Aggregate(fns ...AggregateFunc) *StorageProviderSelect
- func (_q *StorageProviderQuery) All(ctx context.Context) ([]*StorageProvider, error)
- func (_q *StorageProviderQuery) AllX(ctx context.Context) []*StorageProvider
- func (_q *StorageProviderQuery) Clone() *StorageProviderQuery
- func (_q *StorageProviderQuery) Count(ctx context.Context) (int, error)
- func (_q *StorageProviderQuery) CountX(ctx context.Context) int
- func (_q *StorageProviderQuery) Exist(ctx context.Context) (bool, error)
- func (_q *StorageProviderQuery) ExistX(ctx context.Context) bool
- func (_q *StorageProviderQuery) First(ctx context.Context) (*StorageProvider, error)
- func (_q *StorageProviderQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *StorageProviderQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *StorageProviderQuery) FirstX(ctx context.Context) *StorageProvider
- func (_q *StorageProviderQuery) GroupBy(field string, fields ...string) *StorageProviderGroupBy
- func (_q *StorageProviderQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *StorageProviderQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *StorageProviderQuery) Limit(limit int) *StorageProviderQuery
- func (_q *StorageProviderQuery) Offset(offset int) *StorageProviderQuery
- func (_q *StorageProviderQuery) Only(ctx context.Context) (*StorageProvider, error)
- func (_q *StorageProviderQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *StorageProviderQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *StorageProviderQuery) OnlyX(ctx context.Context) *StorageProvider
- func (_q *StorageProviderQuery) Order(o ...storageprovider.OrderOption) *StorageProviderQuery
- func (_q *StorageProviderQuery) Select(fields ...string) *StorageProviderSelect
- func (_q *StorageProviderQuery) Unique(unique bool) *StorageProviderQuery
- func (_q *StorageProviderQuery) Where(ps ...predicate.StorageProvider) *StorageProviderQuery
- type StorageProviderSelect
- func (_s *StorageProviderSelect) Aggregate(fns ...AggregateFunc) *StorageProviderSelect
- func (s *StorageProviderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StorageProviderSelect) BoolX(ctx context.Context) bool
- func (s *StorageProviderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StorageProviderSelect) BoolsX(ctx context.Context) []bool
- func (s *StorageProviderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StorageProviderSelect) Float64X(ctx context.Context) float64
- func (s *StorageProviderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StorageProviderSelect) Float64sX(ctx context.Context) []float64
- func (s *StorageProviderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *StorageProviderSelect) IntX(ctx context.Context) int
- func (s *StorageProviderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *StorageProviderSelect) IntsX(ctx context.Context) []int
- func (_s *StorageProviderSelect) Scan(ctx context.Context, v any) error
- func (s *StorageProviderSelect) ScanX(ctx context.Context, v any)
- func (s *StorageProviderSelect) String(ctx context.Context) (_ string, err error)
- func (s *StorageProviderSelect) StringX(ctx context.Context) string
- func (s *StorageProviderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *StorageProviderSelect) StringsX(ctx context.Context) []string
- type StorageProviderUpdate
- func (_u *StorageProviderUpdate) AddGrpcPort(v int32) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) AddPublicPort(v int32) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) AddStatus(v consts.StorageProviderStatus) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) Exec(ctx context.Context) error
- func (_u *StorageProviderUpdate) ExecX(ctx context.Context)
- func (_u *StorageProviderUpdate) Mutation() *StorageProviderMutation
- func (_u *StorageProviderUpdate) Save(ctx context.Context) (int, error)
- func (_u *StorageProviderUpdate) SaveX(ctx context.Context) int
- func (_u *StorageProviderUpdate) SetAgentID(v uuid.UUID) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetCreatedTime(v time.Time) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetGrpcPort(v int32) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetMasterServer(v string) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetNillableAgentID(v *uuid.UUID) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetNillableCreatedTime(v *time.Time) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetNillableGrpcPort(v *int32) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetNillableMasterServer(v *string) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetNillablePublicIP(v *string) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetNillablePublicPort(v *int32) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetNillableStatus(v *consts.StorageProviderStatus) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetPublicIP(v string) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetPublicPort(v int32) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) SetStatus(v consts.StorageProviderStatus) *StorageProviderUpdate
- func (_u *StorageProviderUpdate) Where(ps ...predicate.StorageProvider) *StorageProviderUpdate
- type StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) AddGrpcPort(v int32) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) AddPublicPort(v int32) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) AddStatus(v consts.StorageProviderStatus) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) Exec(ctx context.Context) error
- func (_u *StorageProviderUpdateOne) ExecX(ctx context.Context)
- func (_u *StorageProviderUpdateOne) Mutation() *StorageProviderMutation
- func (_u *StorageProviderUpdateOne) Save(ctx context.Context) (*StorageProvider, error)
- func (_u *StorageProviderUpdateOne) SaveX(ctx context.Context) *StorageProvider
- func (_u *StorageProviderUpdateOne) Select(field string, fields ...string) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetAgentID(v uuid.UUID) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetCreatedTime(v time.Time) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetGrpcPort(v int32) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetMasterServer(v string) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetNillableAgentID(v *uuid.UUID) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetNillableCreatedTime(v *time.Time) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetNillableGrpcPort(v *int32) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetNillableMasterServer(v *string) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetNillablePublicIP(v *string) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetNillablePublicPort(v *int32) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetNillableStatus(v *consts.StorageProviderStatus) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetPublicIP(v string) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetPublicPort(v int32) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) SetStatus(v consts.StorageProviderStatus) *StorageProviderUpdateOne
- func (_u *StorageProviderUpdateOne) Where(ps ...predicate.StorageProvider) *StorageProviderUpdateOne
- type StorageProviders
- type StorageQuery
- func (_q *StorageQuery) Aggregate(fns ...AggregateFunc) *StorageSelect
- func (_q *StorageQuery) All(ctx context.Context) ([]*Storage, error)
- func (_q *StorageQuery) AllX(ctx context.Context) []*Storage
- func (_q *StorageQuery) Clone() *StorageQuery
- func (_q *StorageQuery) Count(ctx context.Context) (int, error)
- func (_q *StorageQuery) CountX(ctx context.Context) int
- func (_q *StorageQuery) Exist(ctx context.Context) (bool, error)
- func (_q *StorageQuery) ExistX(ctx context.Context) bool
- func (_q *StorageQuery) First(ctx context.Context) (*Storage, error)
- func (_q *StorageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *StorageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *StorageQuery) FirstX(ctx context.Context) *Storage
- func (_q *StorageQuery) GroupBy(field string, fields ...string) *StorageGroupBy
- func (_q *StorageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *StorageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *StorageQuery) Limit(limit int) *StorageQuery
- func (_q *StorageQuery) Offset(offset int) *StorageQuery
- func (_q *StorageQuery) Only(ctx context.Context) (*Storage, error)
- func (_q *StorageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *StorageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *StorageQuery) OnlyX(ctx context.Context) *Storage
- func (_q *StorageQuery) Order(o ...storage.OrderOption) *StorageQuery
- func (_q *StorageQuery) Select(fields ...string) *StorageSelect
- func (_q *StorageQuery) Unique(unique bool) *StorageQuery
- func (_q *StorageQuery) Where(ps ...predicate.Storage) *StorageQuery
- type StorageSelect
- func (_s *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 (_s *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 (_u *StorageUpdate) AddSize(v int32) *StorageUpdate
- func (_u *StorageUpdate) AddType(v int32) *StorageUpdate
- func (_u *StorageUpdate) Exec(ctx context.Context) error
- func (_u *StorageUpdate) ExecX(ctx context.Context)
- func (_u *StorageUpdate) Mutation() *StorageMutation
- func (_u *StorageUpdate) Save(ctx context.Context) (int, error)
- func (_u *StorageUpdate) SaveX(ctx context.Context) int
- func (_u *StorageUpdate) SetCid(v string) *StorageUpdate
- func (_u *StorageUpdate) SetLastModify(v time.Time) *StorageUpdate
- func (_u *StorageUpdate) SetName(v string) *StorageUpdate
- func (_u *StorageUpdate) SetNillableCid(v *string) *StorageUpdate
- func (_u *StorageUpdate) SetNillableLastModify(v *time.Time) *StorageUpdate
- func (_u *StorageUpdate) SetNillableName(v *string) *StorageUpdate
- func (_u *StorageUpdate) SetNillableOwner(v *string) *StorageUpdate
- func (_u *StorageUpdate) SetNillableParentID(v *string) *StorageUpdate
- func (_u *StorageUpdate) SetNillableSize(v *int32) *StorageUpdate
- func (_u *StorageUpdate) SetNillableType(v *int32) *StorageUpdate
- func (_u *StorageUpdate) SetOwner(v string) *StorageUpdate
- func (_u *StorageUpdate) SetParentID(v string) *StorageUpdate
- func (_u *StorageUpdate) SetSize(v int32) *StorageUpdate
- func (_u *StorageUpdate) SetType(v int32) *StorageUpdate
- func (_u *StorageUpdate) Where(ps ...predicate.Storage) *StorageUpdate
- type StorageUpdateOne
- func (_u *StorageUpdateOne) AddSize(v int32) *StorageUpdateOne
- func (_u *StorageUpdateOne) AddType(v int32) *StorageUpdateOne
- func (_u *StorageUpdateOne) Exec(ctx context.Context) error
- func (_u *StorageUpdateOne) ExecX(ctx context.Context)
- func (_u *StorageUpdateOne) Mutation() *StorageMutation
- func (_u *StorageUpdateOne) Save(ctx context.Context) (*Storage, error)
- func (_u *StorageUpdateOne) SaveX(ctx context.Context) *Storage
- func (_u *StorageUpdateOne) Select(field string, fields ...string) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetCid(v string) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetLastModify(v time.Time) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetName(v string) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetNillableCid(v *string) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetNillableLastModify(v *time.Time) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetNillableName(v *string) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetNillableOwner(v *string) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetNillableParentID(v *string) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetNillableSize(v *int32) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetNillableType(v *int32) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetOwner(v string) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetParentID(v string) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetSize(v int32) *StorageUpdateOne
- func (_u *StorageUpdateOne) SetType(v int32) *StorageUpdateOne
- func (_u *StorageUpdateOne) Where(ps ...predicate.Storage) *StorageUpdateOne
- type Storages
- type Task
- type TaskClient
- func (c *TaskClient) Create() *TaskCreate
- func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
- func (c *TaskClient) Delete() *TaskDelete
- func (c *TaskClient) DeleteOne(_m *Task) *TaskDeleteOne
- func (c *TaskClient) DeleteOneID(id uuid.UUID) *TaskDeleteOne
- func (c *TaskClient) Get(ctx context.Context, id uuid.UUID) (*Task, error)
- func (c *TaskClient) GetX(ctx context.Context, id uuid.UUID) *Task
- func (c *TaskClient) Hooks() []Hook
- func (c *TaskClient) Intercept(interceptors ...Interceptor)
- func (c *TaskClient) Interceptors() []Interceptor
- func (c *TaskClient) MapCreateBulk(slice any, setFunc func(*TaskCreate, int)) *TaskCreateBulk
- func (c *TaskClient) Query() *TaskQuery
- func (c *TaskClient) Update() *TaskUpdate
- func (c *TaskClient) UpdateOne(_m *Task) *TaskUpdateOne
- func (c *TaskClient) UpdateOneID(id uuid.UUID) *TaskUpdateOne
- func (c *TaskClient) Use(hooks ...Hook)
- type TaskCreate
- func (_c *TaskCreate) Exec(ctx context.Context) error
- func (_c *TaskCreate) ExecX(ctx context.Context)
- func (_c *TaskCreate) Mutation() *TaskMutation
- func (_c *TaskCreate) Save(ctx context.Context) (*Task, error)
- func (_c *TaskCreate) SaveX(ctx context.Context) *Task
- func (_c *TaskCreate) SetAgentID(v string) *TaskCreate
- func (_c *TaskCreate) SetCmd(v int32) *TaskCreate
- func (_c *TaskCreate) SetCreateTime(v time.Time) *TaskCreate
- func (_c *TaskCreate) SetID(v uuid.UUID) *TaskCreate
- func (_c *TaskCreate) SetNillableCmd(v *int32) *TaskCreate
- func (_c *TaskCreate) SetNillableCreateTime(v *time.Time) *TaskCreate
- func (_c *TaskCreate) SetNillableID(v *uuid.UUID) *TaskCreate
- func (_c *TaskCreate) SetParams(v string) *TaskCreate
- func (_c *TaskCreate) SetStatus(v int) *TaskCreate
- type TaskCreateBulk
- type TaskDelete
- type TaskDeleteOne
- type TaskGroupBy
- func (_g *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
- func (s *TaskGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TaskGroupBy) BoolX(ctx context.Context) bool
- func (s *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TaskGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TaskGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TaskGroupBy) Float64X(ctx context.Context) float64
- func (s *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TaskGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TaskGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TaskGroupBy) IntX(ctx context.Context) int
- func (s *TaskGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TaskGroupBy) IntsX(ctx context.Context) []int
- func (_g *TaskGroupBy) Scan(ctx context.Context, v any) error
- func (s *TaskGroupBy) ScanX(ctx context.Context, v any)
- func (s *TaskGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TaskGroupBy) StringX(ctx context.Context) string
- func (s *TaskGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TaskGroupBy) StringsX(ctx context.Context) []string
- type TaskMutation
- func (m *TaskMutation) AddCmd(i int32)
- func (m *TaskMutation) AddField(name string, value ent.Value) error
- func (m *TaskMutation) AddStatus(i int)
- func (m *TaskMutation) AddedCmd() (r int32, exists bool)
- func (m *TaskMutation) AddedEdges() []string
- func (m *TaskMutation) AddedField(name string) (ent.Value, bool)
- func (m *TaskMutation) AddedFields() []string
- func (m *TaskMutation) AddedIDs(name string) []ent.Value
- func (m *TaskMutation) AddedStatus() (r int, exists bool)
- func (m *TaskMutation) AgentID() (r string, exists bool)
- func (m *TaskMutation) ClearEdge(name string) error
- func (m *TaskMutation) ClearField(name string) error
- func (m *TaskMutation) ClearedEdges() []string
- func (m *TaskMutation) ClearedFields() []string
- func (m TaskMutation) Client() *Client
- func (m *TaskMutation) Cmd() (r int32, exists bool)
- func (m *TaskMutation) CreateTime() (r time.Time, exists bool)
- func (m *TaskMutation) EdgeCleared(name string) bool
- func (m *TaskMutation) Field(name string) (ent.Value, bool)
- func (m *TaskMutation) FieldCleared(name string) bool
- func (m *TaskMutation) Fields() []string
- func (m *TaskMutation) ID() (id uuid.UUID, exists bool)
- func (m *TaskMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TaskMutation) OldAgentID(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldCmd(ctx context.Context) (v int32, err error)
- func (m *TaskMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TaskMutation) OldParams(ctx context.Context) (v *string, err error)
- func (m *TaskMutation) OldStatus(ctx context.Context) (v int, err error)
- func (m *TaskMutation) Op() Op
- func (m *TaskMutation) Params() (r string, exists bool)
- func (m *TaskMutation) RemovedEdges() []string
- func (m *TaskMutation) RemovedIDs(name string) []ent.Value
- func (m *TaskMutation) ResetAgentID()
- func (m *TaskMutation) ResetCmd()
- func (m *TaskMutation) ResetCreateTime()
- func (m *TaskMutation) ResetEdge(name string) error
- func (m *TaskMutation) ResetField(name string) error
- func (m *TaskMutation) ResetParams()
- func (m *TaskMutation) ResetStatus()
- func (m *TaskMutation) SetAgentID(s string)
- func (m *TaskMutation) SetCmd(i int32)
- func (m *TaskMutation) SetCreateTime(t time.Time)
- func (m *TaskMutation) SetField(name string, value ent.Value) error
- func (m *TaskMutation) SetID(id uuid.UUID)
- func (m *TaskMutation) SetOp(op Op)
- func (m *TaskMutation) SetParams(s string)
- func (m *TaskMutation) SetStatus(i int)
- func (m *TaskMutation) Status() (r int, exists bool)
- func (m TaskMutation) Tx() (*Tx, error)
- func (m *TaskMutation) Type() string
- func (m *TaskMutation) Where(ps ...predicate.Task)
- func (m *TaskMutation) WhereP(ps ...func(*sql.Selector))
- type TaskQuery
- func (_q *TaskQuery) Aggregate(fns ...AggregateFunc) *TaskSelect
- func (_q *TaskQuery) All(ctx context.Context) ([]*Task, error)
- func (_q *TaskQuery) AllX(ctx context.Context) []*Task
- func (_q *TaskQuery) Clone() *TaskQuery
- func (_q *TaskQuery) Count(ctx context.Context) (int, error)
- func (_q *TaskQuery) CountX(ctx context.Context) int
- func (_q *TaskQuery) Exist(ctx context.Context) (bool, error)
- func (_q *TaskQuery) ExistX(ctx context.Context) bool
- func (_q *TaskQuery) First(ctx context.Context) (*Task, error)
- func (_q *TaskQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *TaskQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *TaskQuery) FirstX(ctx context.Context) *Task
- func (_q *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
- func (_q *TaskQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *TaskQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *TaskQuery) Limit(limit int) *TaskQuery
- func (_q *TaskQuery) Offset(offset int) *TaskQuery
- func (_q *TaskQuery) Only(ctx context.Context) (*Task, error)
- func (_q *TaskQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *TaskQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *TaskQuery) OnlyX(ctx context.Context) *Task
- func (_q *TaskQuery) Order(o ...task.OrderOption) *TaskQuery
- func (_q *TaskQuery) Select(fields ...string) *TaskSelect
- func (_q *TaskQuery) Unique(unique bool) *TaskQuery
- func (_q *TaskQuery) Where(ps ...predicate.Task) *TaskQuery
- type TaskSelect
- func (_s *TaskSelect) Aggregate(fns ...AggregateFunc) *TaskSelect
- func (s *TaskSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TaskSelect) BoolX(ctx context.Context) bool
- func (s *TaskSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TaskSelect) BoolsX(ctx context.Context) []bool
- func (s *TaskSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TaskSelect) Float64X(ctx context.Context) float64
- func (s *TaskSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TaskSelect) Float64sX(ctx context.Context) []float64
- func (s *TaskSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TaskSelect) IntX(ctx context.Context) int
- func (s *TaskSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TaskSelect) IntsX(ctx context.Context) []int
- func (_s *TaskSelect) Scan(ctx context.Context, v any) error
- func (s *TaskSelect) ScanX(ctx context.Context, v any)
- func (s *TaskSelect) String(ctx context.Context) (_ string, err error)
- func (s *TaskSelect) StringX(ctx context.Context) string
- func (s *TaskSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TaskSelect) StringsX(ctx context.Context) []string
- type TaskUpdate
- func (_u *TaskUpdate) AddCmd(v int32) *TaskUpdate
- func (_u *TaskUpdate) AddStatus(v int) *TaskUpdate
- func (_u *TaskUpdate) Exec(ctx context.Context) error
- func (_u *TaskUpdate) ExecX(ctx context.Context)
- func (_u *TaskUpdate) Mutation() *TaskMutation
- func (_u *TaskUpdate) Save(ctx context.Context) (int, error)
- func (_u *TaskUpdate) SaveX(ctx context.Context) int
- func (_u *TaskUpdate) SetAgentID(v string) *TaskUpdate
- func (_u *TaskUpdate) SetCmd(v int32) *TaskUpdate
- func (_u *TaskUpdate) SetCreateTime(v time.Time) *TaskUpdate
- func (_u *TaskUpdate) SetNillableAgentID(v *string) *TaskUpdate
- func (_u *TaskUpdate) SetNillableCmd(v *int32) *TaskUpdate
- func (_u *TaskUpdate) SetNillableCreateTime(v *time.Time) *TaskUpdate
- func (_u *TaskUpdate) SetNillableParams(v *string) *TaskUpdate
- func (_u *TaskUpdate) SetNillableStatus(v *int) *TaskUpdate
- func (_u *TaskUpdate) SetParams(v string) *TaskUpdate
- func (_u *TaskUpdate) SetStatus(v int) *TaskUpdate
- func (_u *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
- type TaskUpdateOne
- func (_u *TaskUpdateOne) AddCmd(v int32) *TaskUpdateOne
- func (_u *TaskUpdateOne) AddStatus(v int) *TaskUpdateOne
- func (_u *TaskUpdateOne) Exec(ctx context.Context) error
- func (_u *TaskUpdateOne) ExecX(ctx context.Context)
- func (_u *TaskUpdateOne) Mutation() *TaskMutation
- func (_u *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
- func (_u *TaskUpdateOne) SaveX(ctx context.Context) *Task
- func (_u *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetAgentID(v string) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetCmd(v int32) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetCreateTime(v time.Time) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetNillableAgentID(v *string) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetNillableCmd(v *int32) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetNillableCreateTime(v *time.Time) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetNillableParams(v *string) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetNillableStatus(v *int) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetParams(v string) *TaskUpdateOne
- func (_u *TaskUpdateOne) SetStatus(v int) *TaskUpdateOne
- func (_u *TaskUpdateOne) Where(ps ...predicate.Task) *TaskUpdateOne
- type Tasks
- 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(_m *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) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(_m *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (_c *UserCreate) Exec(ctx context.Context) error
- func (_c *UserCreate) ExecX(ctx context.Context)
- func (_c *UserCreate) Mutation() *UserMutation
- func (_c *UserCreate) Save(ctx context.Context) (*User, error)
- func (_c *UserCreate) SaveX(ctx context.Context) *User
- func (_c *UserCreate) SetCountryCallCoding(v string) *UserCreate
- func (_c *UserCreate) SetCreateDate(v time.Time) *UserCreate
- func (_c *UserCreate) SetID(v uuid.UUID) *UserCreate
- func (_c *UserCreate) SetIcon(v string) *UserCreate
- func (_c *UserCreate) SetLastLoginDate(v time.Time) *UserCreate
- func (_c *UserCreate) SetName(v string) *UserCreate
- func (_c *UserCreate) SetNillableCreateDate(v *time.Time) *UserCreate
- func (_c *UserCreate) SetNillableID(v *uuid.UUID) *UserCreate
- func (_c *UserCreate) SetNillableLastLoginDate(v *time.Time) *UserCreate
- func (_c *UserCreate) SetNillablePwdConfig(v *bool) *UserCreate
- func (_c *UserCreate) SetPassword(v string) *UserCreate
- func (_c *UserCreate) SetPwdConfig(v bool) *UserCreate
- func (_c *UserCreate) SetTelephoneNumber(v string) *UserCreate
- func (_c *UserCreate) SetUsername(v string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (_g *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 (_g *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) OldPwdConfig(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldTelephoneNumber(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PwdConfig() (r bool, 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) ResetPwdConfig()
- func (m *UserMutation) ResetTelephoneNumber()
- func (m *UserMutation) ResetUsername()
- 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) SetPwdConfig(b bool)
- func (m *UserMutation) SetTelephoneNumber(s string)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) TelephoneNumber() (r string, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (_q *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (_q *UserQuery) All(ctx context.Context) ([]*User, error)
- func (_q *UserQuery) AllX(ctx context.Context) []*User
- func (_q *UserQuery) Clone() *UserQuery
- func (_q *UserQuery) Count(ctx context.Context) (int, error)
- func (_q *UserQuery) CountX(ctx context.Context) int
- func (_q *UserQuery) Exist(ctx context.Context) (bool, error)
- func (_q *UserQuery) ExistX(ctx context.Context) bool
- func (_q *UserQuery) First(ctx context.Context) (*User, error)
- func (_q *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *UserQuery) FirstX(ctx context.Context) *User
- func (_q *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (_q *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *UserQuery) Limit(limit int) *UserQuery
- func (_q *UserQuery) Offset(offset int) *UserQuery
- func (_q *UserQuery) Only(ctx context.Context) (*User, error)
- func (_q *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *UserQuery) OnlyX(ctx context.Context) *User
- func (_q *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (_q *UserQuery) Select(fields ...string) *UserSelect
- func (_q *UserQuery) Unique(unique bool) *UserQuery
- func (_q *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserResourceLimit
- type UserResourceLimitClient
- func (c *UserResourceLimitClient) Create() *UserResourceLimitCreate
- func (c *UserResourceLimitClient) CreateBulk(builders ...*UserResourceLimitCreate) *UserResourceLimitCreateBulk
- func (c *UserResourceLimitClient) Delete() *UserResourceLimitDelete
- func (c *UserResourceLimitClient) DeleteOne(_m *UserResourceLimit) *UserResourceLimitDeleteOne
- func (c *UserResourceLimitClient) DeleteOneID(id uuid.UUID) *UserResourceLimitDeleteOne
- func (c *UserResourceLimitClient) Get(ctx context.Context, id uuid.UUID) (*UserResourceLimit, error)
- func (c *UserResourceLimitClient) GetX(ctx context.Context, id uuid.UUID) *UserResourceLimit
- func (c *UserResourceLimitClient) Hooks() []Hook
- func (c *UserResourceLimitClient) Intercept(interceptors ...Interceptor)
- func (c *UserResourceLimitClient) Interceptors() []Interceptor
- func (c *UserResourceLimitClient) MapCreateBulk(slice any, setFunc func(*UserResourceLimitCreate, int)) *UserResourceLimitCreateBulk
- func (c *UserResourceLimitClient) Query() *UserResourceLimitQuery
- func (c *UserResourceLimitClient) Update() *UserResourceLimitUpdate
- func (c *UserResourceLimitClient) UpdateOne(_m *UserResourceLimit) *UserResourceLimitUpdateOne
- func (c *UserResourceLimitClient) UpdateOneID(id uuid.UUID) *UserResourceLimitUpdateOne
- func (c *UserResourceLimitClient) Use(hooks ...Hook)
- type UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) Exec(ctx context.Context) error
- func (_c *UserResourceLimitCreate) ExecX(ctx context.Context)
- func (_c *UserResourceLimitCreate) Mutation() *UserResourceLimitMutation
- func (_c *UserResourceLimitCreate) Save(ctx context.Context) (*UserResourceLimit, error)
- func (_c *UserResourceLimitCreate) SaveX(ctx context.Context) *UserResourceLimit
- func (_c *UserResourceLimitCreate) SetFkUserID(v uuid.UUID) *UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) SetID(v uuid.UUID) *UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) SetMaxCPU(v int32) *UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) SetMaxMemory(v int32) *UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) SetMaxNetworkMapping(v int32) *UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) SetNillableFkUserID(v *uuid.UUID) *UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) SetNillableID(v *uuid.UUID) *UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) SetNillableMaxCPU(v *int32) *UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) SetNillableMaxMemory(v *int32) *UserResourceLimitCreate
- func (_c *UserResourceLimitCreate) SetNillableMaxNetworkMapping(v *int32) *UserResourceLimitCreate
- type UserResourceLimitCreateBulk
- func (_c *UserResourceLimitCreateBulk) Exec(ctx context.Context) error
- func (_c *UserResourceLimitCreateBulk) ExecX(ctx context.Context)
- func (_c *UserResourceLimitCreateBulk) Save(ctx context.Context) ([]*UserResourceLimit, error)
- func (_c *UserResourceLimitCreateBulk) SaveX(ctx context.Context) []*UserResourceLimit
- type UserResourceLimitDelete
- type UserResourceLimitDeleteOne
- type UserResourceLimitGroupBy
- func (_g *UserResourceLimitGroupBy) Aggregate(fns ...AggregateFunc) *UserResourceLimitGroupBy
- func (s *UserResourceLimitGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserResourceLimitGroupBy) BoolX(ctx context.Context) bool
- func (s *UserResourceLimitGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserResourceLimitGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserResourceLimitGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserResourceLimitGroupBy) Float64X(ctx context.Context) float64
- func (s *UserResourceLimitGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserResourceLimitGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserResourceLimitGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserResourceLimitGroupBy) IntX(ctx context.Context) int
- func (s *UserResourceLimitGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserResourceLimitGroupBy) IntsX(ctx context.Context) []int
- func (_g *UserResourceLimitGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserResourceLimitGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserResourceLimitGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserResourceLimitGroupBy) StringX(ctx context.Context) string
- func (s *UserResourceLimitGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserResourceLimitGroupBy) StringsX(ctx context.Context) []string
- type UserResourceLimitMutation
- func (m *UserResourceLimitMutation) AddField(name string, value ent.Value) error
- func (m *UserResourceLimitMutation) AddMaxCPU(i int32)
- func (m *UserResourceLimitMutation) AddMaxMemory(i int32)
- func (m *UserResourceLimitMutation) AddMaxNetworkMapping(i int32)
- func (m *UserResourceLimitMutation) AddedEdges() []string
- func (m *UserResourceLimitMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserResourceLimitMutation) AddedFields() []string
- func (m *UserResourceLimitMutation) AddedIDs(name string) []ent.Value
- func (m *UserResourceLimitMutation) AddedMaxCPU() (r int32, exists bool)
- func (m *UserResourceLimitMutation) AddedMaxMemory() (r int32, exists bool)
- func (m *UserResourceLimitMutation) AddedMaxNetworkMapping() (r int32, exists bool)
- func (m *UserResourceLimitMutation) ClearEdge(name string) error
- func (m *UserResourceLimitMutation) ClearField(name string) error
- func (m *UserResourceLimitMutation) ClearedEdges() []string
- func (m *UserResourceLimitMutation) ClearedFields() []string
- func (m UserResourceLimitMutation) Client() *Client
- func (m *UserResourceLimitMutation) EdgeCleared(name string) bool
- func (m *UserResourceLimitMutation) Field(name string) (ent.Value, bool)
- func (m *UserResourceLimitMutation) FieldCleared(name string) bool
- func (m *UserResourceLimitMutation) Fields() []string
- func (m *UserResourceLimitMutation) FkUserID() (r uuid.UUID, exists bool)
- func (m *UserResourceLimitMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserResourceLimitMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserResourceLimitMutation) MaxCPU() (r int32, exists bool)
- func (m *UserResourceLimitMutation) MaxMemory() (r int32, exists bool)
- func (m *UserResourceLimitMutation) MaxNetworkMapping() (r int32, exists bool)
- func (m *UserResourceLimitMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserResourceLimitMutation) OldFkUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserResourceLimitMutation) OldMaxCPU(ctx context.Context) (v int32, err error)
- func (m *UserResourceLimitMutation) OldMaxMemory(ctx context.Context) (v int32, err error)
- func (m *UserResourceLimitMutation) OldMaxNetworkMapping(ctx context.Context) (v int32, err error)
- func (m *UserResourceLimitMutation) Op() Op
- func (m *UserResourceLimitMutation) RemovedEdges() []string
- func (m *UserResourceLimitMutation) RemovedIDs(name string) []ent.Value
- func (m *UserResourceLimitMutation) ResetEdge(name string) error
- func (m *UserResourceLimitMutation) ResetField(name string) error
- func (m *UserResourceLimitMutation) ResetFkUserID()
- func (m *UserResourceLimitMutation) ResetMaxCPU()
- func (m *UserResourceLimitMutation) ResetMaxMemory()
- func (m *UserResourceLimitMutation) ResetMaxNetworkMapping()
- func (m *UserResourceLimitMutation) SetField(name string, value ent.Value) error
- func (m *UserResourceLimitMutation) SetFkUserID(u uuid.UUID)
- func (m *UserResourceLimitMutation) SetID(id uuid.UUID)
- func (m *UserResourceLimitMutation) SetMaxCPU(i int32)
- func (m *UserResourceLimitMutation) SetMaxMemory(i int32)
- func (m *UserResourceLimitMutation) SetMaxNetworkMapping(i int32)
- func (m *UserResourceLimitMutation) SetOp(op Op)
- func (m UserResourceLimitMutation) Tx() (*Tx, error)
- func (m *UserResourceLimitMutation) Type() string
- func (m *UserResourceLimitMutation) Where(ps ...predicate.UserResourceLimit)
- func (m *UserResourceLimitMutation) WhereP(ps ...func(*sql.Selector))
- type UserResourceLimitQuery
- func (_q *UserResourceLimitQuery) Aggregate(fns ...AggregateFunc) *UserResourceLimitSelect
- func (_q *UserResourceLimitQuery) All(ctx context.Context) ([]*UserResourceLimit, error)
- func (_q *UserResourceLimitQuery) AllX(ctx context.Context) []*UserResourceLimit
- func (_q *UserResourceLimitQuery) Clone() *UserResourceLimitQuery
- func (_q *UserResourceLimitQuery) Count(ctx context.Context) (int, error)
- func (_q *UserResourceLimitQuery) CountX(ctx context.Context) int
- func (_q *UserResourceLimitQuery) Exist(ctx context.Context) (bool, error)
- func (_q *UserResourceLimitQuery) ExistX(ctx context.Context) bool
- func (_q *UserResourceLimitQuery) First(ctx context.Context) (*UserResourceLimit, error)
- func (_q *UserResourceLimitQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *UserResourceLimitQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *UserResourceLimitQuery) FirstX(ctx context.Context) *UserResourceLimit
- func (_q *UserResourceLimitQuery) GroupBy(field string, fields ...string) *UserResourceLimitGroupBy
- func (_q *UserResourceLimitQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *UserResourceLimitQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *UserResourceLimitQuery) Limit(limit int) *UserResourceLimitQuery
- func (_q *UserResourceLimitQuery) Offset(offset int) *UserResourceLimitQuery
- func (_q *UserResourceLimitQuery) Only(ctx context.Context) (*UserResourceLimit, error)
- func (_q *UserResourceLimitQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *UserResourceLimitQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *UserResourceLimitQuery) OnlyX(ctx context.Context) *UserResourceLimit
- func (_q *UserResourceLimitQuery) Order(o ...userresourcelimit.OrderOption) *UserResourceLimitQuery
- func (_q *UserResourceLimitQuery) Select(fields ...string) *UserResourceLimitSelect
- func (_q *UserResourceLimitQuery) Unique(unique bool) *UserResourceLimitQuery
- func (_q *UserResourceLimitQuery) Where(ps ...predicate.UserResourceLimit) *UserResourceLimitQuery
- type UserResourceLimitSelect
- func (_s *UserResourceLimitSelect) Aggregate(fns ...AggregateFunc) *UserResourceLimitSelect
- func (s *UserResourceLimitSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserResourceLimitSelect) BoolX(ctx context.Context) bool
- func (s *UserResourceLimitSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserResourceLimitSelect) BoolsX(ctx context.Context) []bool
- func (s *UserResourceLimitSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserResourceLimitSelect) Float64X(ctx context.Context) float64
- func (s *UserResourceLimitSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserResourceLimitSelect) Float64sX(ctx context.Context) []float64
- func (s *UserResourceLimitSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserResourceLimitSelect) IntX(ctx context.Context) int
- func (s *UserResourceLimitSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserResourceLimitSelect) IntsX(ctx context.Context) []int
- func (_s *UserResourceLimitSelect) Scan(ctx context.Context, v any) error
- func (s *UserResourceLimitSelect) ScanX(ctx context.Context, v any)
- func (s *UserResourceLimitSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserResourceLimitSelect) StringX(ctx context.Context) string
- func (s *UserResourceLimitSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserResourceLimitSelect) StringsX(ctx context.Context) []string
- type UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) AddMaxCPU(v int32) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) AddMaxMemory(v int32) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) AddMaxNetworkMapping(v int32) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) Exec(ctx context.Context) error
- func (_u *UserResourceLimitUpdate) ExecX(ctx context.Context)
- func (_u *UserResourceLimitUpdate) Mutation() *UserResourceLimitMutation
- func (_u *UserResourceLimitUpdate) Save(ctx context.Context) (int, error)
- func (_u *UserResourceLimitUpdate) SaveX(ctx context.Context) int
- func (_u *UserResourceLimitUpdate) SetFkUserID(v uuid.UUID) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) SetMaxCPU(v int32) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) SetMaxMemory(v int32) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) SetMaxNetworkMapping(v int32) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) SetNillableFkUserID(v *uuid.UUID) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) SetNillableMaxCPU(v *int32) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) SetNillableMaxMemory(v *int32) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) SetNillableMaxNetworkMapping(v *int32) *UserResourceLimitUpdate
- func (_u *UserResourceLimitUpdate) Where(ps ...predicate.UserResourceLimit) *UserResourceLimitUpdate
- type UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) AddMaxCPU(v int32) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) AddMaxMemory(v int32) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) AddMaxNetworkMapping(v int32) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) Exec(ctx context.Context) error
- func (_u *UserResourceLimitUpdateOne) ExecX(ctx context.Context)
- func (_u *UserResourceLimitUpdateOne) Mutation() *UserResourceLimitMutation
- func (_u *UserResourceLimitUpdateOne) Save(ctx context.Context) (*UserResourceLimit, error)
- func (_u *UserResourceLimitUpdateOne) SaveX(ctx context.Context) *UserResourceLimit
- func (_u *UserResourceLimitUpdateOne) Select(field string, fields ...string) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) SetFkUserID(v uuid.UUID) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) SetMaxCPU(v int32) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) SetMaxMemory(v int32) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) SetMaxNetworkMapping(v int32) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) SetNillableFkUserID(v *uuid.UUID) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) SetNillableMaxCPU(v *int32) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) SetNillableMaxMemory(v *int32) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) SetNillableMaxNetworkMapping(v *int32) *UserResourceLimitUpdateOne
- func (_u *UserResourceLimitUpdateOne) Where(ps ...predicate.UserResourceLimit) *UserResourceLimitUpdateOne
- type UserResourceLimits
- type UserSelect
- func (_s *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 (_s *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 (_u *UserUpdate) Exec(ctx context.Context) error
- func (_u *UserUpdate) ExecX(ctx context.Context)
- func (_u *UserUpdate) Mutation() *UserMutation
- func (_u *UserUpdate) Save(ctx context.Context) (int, error)
- func (_u *UserUpdate) SaveX(ctx context.Context) int
- func (_u *UserUpdate) SetCountryCallCoding(v string) *UserUpdate
- func (_u *UserUpdate) SetCreateDate(v time.Time) *UserUpdate
- func (_u *UserUpdate) SetIcon(v string) *UserUpdate
- func (_u *UserUpdate) SetLastLoginDate(v time.Time) *UserUpdate
- func (_u *UserUpdate) SetName(v string) *UserUpdate
- func (_u *UserUpdate) SetNillableCountryCallCoding(v *string) *UserUpdate
- func (_u *UserUpdate) SetNillableCreateDate(v *time.Time) *UserUpdate
- func (_u *UserUpdate) SetNillableIcon(v *string) *UserUpdate
- func (_u *UserUpdate) SetNillableLastLoginDate(v *time.Time) *UserUpdate
- func (_u *UserUpdate) SetNillableName(v *string) *UserUpdate
- func (_u *UserUpdate) SetNillablePassword(v *string) *UserUpdate
- func (_u *UserUpdate) SetNillablePwdConfig(v *bool) *UserUpdate
- func (_u *UserUpdate) SetNillableTelephoneNumber(v *string) *UserUpdate
- func (_u *UserUpdate) SetNillableUsername(v *string) *UserUpdate
- func (_u *UserUpdate) SetPassword(v string) *UserUpdate
- func (_u *UserUpdate) SetPwdConfig(v bool) *UserUpdate
- func (_u *UserUpdate) SetTelephoneNumber(v string) *UserUpdate
- func (_u *UserUpdate) SetUsername(v string) *UserUpdate
- func (_u *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (_u *UserUpdateOne) Exec(ctx context.Context) error
- func (_u *UserUpdateOne) ExecX(ctx context.Context)
- func (_u *UserUpdateOne) Mutation() *UserMutation
- func (_u *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (_u *UserUpdateOne) SaveX(ctx context.Context) *User
- func (_u *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (_u *UserUpdateOne) SetCountryCallCoding(v string) *UserUpdateOne
- func (_u *UserUpdateOne) SetCreateDate(v time.Time) *UserUpdateOne
- func (_u *UserUpdateOne) SetIcon(v string) *UserUpdateOne
- func (_u *UserUpdateOne) SetLastLoginDate(v time.Time) *UserUpdateOne
- func (_u *UserUpdateOne) SetName(v string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableCountryCallCoding(v *string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableCreateDate(v *time.Time) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableIcon(v *string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableLastLoginDate(v *time.Time) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableName(v *string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillablePassword(v *string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillablePwdConfig(v *bool) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableTelephoneNumber(v *string) *UserUpdateOne
- func (_u *UserUpdateOne) SetNillableUsername(v *string) *UserUpdateOne
- func (_u *UserUpdateOne) SetPassword(v string) *UserUpdateOne
- func (_u *UserUpdateOne) SetPwdConfig(v bool) *UserUpdateOne
- func (_u *UserUpdateOne) SetTelephoneNumber(v string) *UserUpdateOne
- func (_u *UserUpdateOne) SetUsername(v string) *UserUpdateOne
- func (_u *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" TypeAlipayOrderRollback = "AlipayOrderRollback" TypeComputeImage = "ComputeImage" TypeComputeInstance = "ComputeInstance" TypeComputeSpec = "ComputeSpec" TypeComputeSpecPrice = "ComputeSpecPrice" TypeCycle = "Cycle" TypeCycleOrder = "CycleOrder" TypeCycleRecharge = "CycleRecharge" TypeCycleRedeemCode = "CycleRedeemCode" TypeCycleRenewal = "CycleRenewal" TypeCycleTransaction = "CycleTransaction" TypeDomainBinding = "DomainBinding" TypeEmployee = "Employee" TypeGateway = "Gateway" TypeGatewayPort = "GatewayPort" TypeNetworkMapping = "NetworkMapping" TypeS3Bucket = "S3Bucket" TypeS3User = "S3User" TypeScript = "Script" TypeScriptExecutionRecord = "ScriptExecutionRecord" TypeStorage = "Storage" TypeStorageProvider = "StorageProvider" TypeTask = "Task" TypeUser = "User" TypeUserResourceLimit = "UserResourceLimit" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Agent ¶
type Agent struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// mac 网卡地址
MAC string `json:"mac,omitempty"`
// 是否活动
Active bool `json:"active,omitempty"`
// 最后更新时间
LastUpdateTime time.Time `json:"last_update_time,omitempty"`
// 主机名
Hostname string `json:"hostname,omitempty"`
// 计算机架构
Arch string `json:"arch,omitempty"`
// 总cpu数
TotalCPU int32 `json:"total_cpu,omitempty"`
// 总内存数
TotalMemory int32 `json:"total_memory,omitempty"`
// 占用的cpu
OccupiedCPU int32 `json:"occupied_cpu,omitempty"`
// 占用的内存
OccupiedMemory int32 `json:"occupied_memory,omitempty"`
// ip地址
IP string `json:"ip,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 (_m *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(_m *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) MapCreateBulk ¶
func (c *AgentClient) MapCreateBulk(slice any, setFunc func(*AgentCreate, int)) *AgentCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*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(_m *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 (_c *AgentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentCreate) ExecX ¶
func (_c *AgentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentCreate) Mutation ¶
func (_c *AgentCreate) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentCreate) Save ¶
func (_c *AgentCreate) Save(ctx context.Context) (*Agent, error)
Save creates the Agent in the database.
func (*AgentCreate) SaveX ¶
func (_c *AgentCreate) SaveX(ctx context.Context) *Agent
SaveX calls Save and panics if Save returns an error.
func (*AgentCreate) SetActive ¶
func (_c *AgentCreate) SetActive(v bool) *AgentCreate
SetActive sets the "active" field.
func (*AgentCreate) SetArch ¶
func (_c *AgentCreate) SetArch(v string) *AgentCreate
SetArch sets the "arch" field.
func (*AgentCreate) SetHostname ¶
func (_c *AgentCreate) SetHostname(v string) *AgentCreate
SetHostname sets the "hostname" field.
func (*AgentCreate) SetID ¶
func (_c *AgentCreate) SetID(v uuid.UUID) *AgentCreate
SetID sets the "id" field.
func (*AgentCreate) SetIP ¶
func (_c *AgentCreate) SetIP(v string) *AgentCreate
SetIP sets the "ip" field.
func (*AgentCreate) SetLastUpdateTime ¶
func (_c *AgentCreate) SetLastUpdateTime(v time.Time) *AgentCreate
SetLastUpdateTime sets the "last_update_time" field.
func (*AgentCreate) SetMAC ¶
func (_c *AgentCreate) SetMAC(v string) *AgentCreate
SetMAC sets the "mac" field.
func (*AgentCreate) SetNillableActive ¶
func (_c *AgentCreate) SetNillableActive(v *bool) *AgentCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*AgentCreate) SetNillableID ¶
func (_c *AgentCreate) SetNillableID(v *uuid.UUID) *AgentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AgentCreate) SetNillableLastUpdateTime ¶
func (_c *AgentCreate) SetNillableLastUpdateTime(v *time.Time) *AgentCreate
SetNillableLastUpdateTime sets the "last_update_time" field if the given value is not nil.
func (*AgentCreate) SetOccupiedCPU ¶
func (_c *AgentCreate) SetOccupiedCPU(v int32) *AgentCreate
SetOccupiedCPU sets the "occupied_cpu" field.
func (*AgentCreate) SetOccupiedMemory ¶
func (_c *AgentCreate) SetOccupiedMemory(v int32) *AgentCreate
SetOccupiedMemory sets the "occupied_memory" field.
func (*AgentCreate) SetTotalCPU ¶
func (_c *AgentCreate) SetTotalCPU(v int32) *AgentCreate
SetTotalCPU sets the "total_cpu" field.
func (*AgentCreate) SetTotalMemory ¶
func (_c *AgentCreate) SetTotalMemory(v int32) *AgentCreate
SetTotalMemory sets the "total_memory" field.
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 (_c *AgentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentCreateBulk) ExecX ¶
func (_c *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 (_d *AgentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AgentDelete) ExecX ¶
func (_d *AgentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AgentDelete) Where ¶
func (_d *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 (_d *AgentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AgentDeleteOne) ExecX ¶
func (_d *AgentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentDeleteOne) Where ¶
func (_d *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 (_g *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 (_g *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) Active ¶
func (m *AgentMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
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) AddOccupiedCPU ¶
func (m *AgentMutation) AddOccupiedCPU(i int32)
AddOccupiedCPU adds i to the "occupied_cpu" field.
func (*AgentMutation) AddOccupiedMemory ¶
func (m *AgentMutation) AddOccupiedMemory(i int32)
AddOccupiedMemory adds i to the "occupied_memory" field.
func (*AgentMutation) AddTotalCPU ¶
func (m *AgentMutation) AddTotalCPU(i int32)
AddTotalCPU adds i to the "total_cpu" field.
func (*AgentMutation) AddTotalMemory ¶
func (m *AgentMutation) AddTotalMemory(i int32)
AddTotalMemory adds i to the "total_memory" field.
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) AddedOccupiedCPU ¶
func (m *AgentMutation) AddedOccupiedCPU() (r int32, exists bool)
AddedOccupiedCPU returns the value that was added to the "occupied_cpu" field in this mutation.
func (*AgentMutation) AddedOccupiedMemory ¶
func (m *AgentMutation) AddedOccupiedMemory() (r int32, exists bool)
AddedOccupiedMemory returns the value that was added to the "occupied_memory" field in this mutation.
func (*AgentMutation) AddedTotalCPU ¶
func (m *AgentMutation) AddedTotalCPU() (r int32, exists bool)
AddedTotalCPU returns the value that was added to the "total_cpu" field in this mutation.
func (*AgentMutation) AddedTotalMemory ¶
func (m *AgentMutation) AddedTotalMemory() (r int32, exists bool)
AddedTotalMemory returns the value that was added to the "total_memory" field in this mutation.
func (*AgentMutation) Arch ¶
func (m *AgentMutation) Arch() (r string, exists bool)
Arch returns the value of the "arch" field in the 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) Hostname ¶
func (m *AgentMutation) Hostname() (r string, exists bool)
Hostname returns the value of the "hostname" field in the mutation.
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) IP ¶
func (m *AgentMutation) IP() (r string, exists bool)
IP returns the value of the "ip" field in the mutation.
func (*AgentMutation) LastUpdateTime ¶
func (m *AgentMutation) LastUpdateTime() (r time.Time, exists bool)
LastUpdateTime returns the value of the "last_update_time" field in the mutation.
func (*AgentMutation) MAC ¶
func (m *AgentMutation) MAC() (r string, exists bool)
MAC returns the value of the "mac" field in the mutation.
func (*AgentMutation) OccupiedCPU ¶
func (m *AgentMutation) OccupiedCPU() (r int32, exists bool)
OccupiedCPU returns the value of the "occupied_cpu" field in the mutation.
func (*AgentMutation) OccupiedMemory ¶
func (m *AgentMutation) OccupiedMemory() (r int32, exists bool)
OccupiedMemory returns the value of the "occupied_memory" field in the mutation.
func (*AgentMutation) OldActive ¶
func (m *AgentMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" 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) OldArch ¶
func (m *AgentMutation) OldArch(ctx context.Context) (v string, err error)
OldArch returns the old "arch" 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) 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) OldHostname ¶
func (m *AgentMutation) OldHostname(ctx context.Context) (v string, err error)
OldHostname returns the old "hostname" 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) OldIP ¶
func (m *AgentMutation) OldIP(ctx context.Context) (v string, err error)
OldIP returns the old "ip" 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) OldLastUpdateTime ¶
OldLastUpdateTime returns the old "last_update_time" 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) OldMAC ¶
func (m *AgentMutation) OldMAC(ctx context.Context) (v string, err error)
OldMAC returns the old "mac" 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) OldOccupiedCPU ¶
func (m *AgentMutation) OldOccupiedCPU(ctx context.Context) (v int32, err error)
OldOccupiedCPU returns the old "occupied_cpu" 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) OldOccupiedMemory ¶
func (m *AgentMutation) OldOccupiedMemory(ctx context.Context) (v int32, err error)
OldOccupiedMemory returns the old "occupied_memory" 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) OldTotalCPU ¶
func (m *AgentMutation) OldTotalCPU(ctx context.Context) (v int32, err error)
OldTotalCPU returns the old "total_cpu" 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) OldTotalMemory ¶
func (m *AgentMutation) OldTotalMemory(ctx context.Context) (v int32, err error)
OldTotalMemory returns the old "total_memory" 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) ResetActive ¶
func (m *AgentMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*AgentMutation) ResetArch ¶
func (m *AgentMutation) ResetArch()
ResetArch resets all changes to the "arch" field.
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) ResetHostname ¶
func (m *AgentMutation) ResetHostname()
ResetHostname resets all changes to the "hostname" field.
func (*AgentMutation) ResetIP ¶
func (m *AgentMutation) ResetIP()
ResetIP resets all changes to the "ip" field.
func (*AgentMutation) ResetLastUpdateTime ¶
func (m *AgentMutation) ResetLastUpdateTime()
ResetLastUpdateTime resets all changes to the "last_update_time" field.
func (*AgentMutation) ResetMAC ¶
func (m *AgentMutation) ResetMAC()
ResetMAC resets all changes to the "mac" field.
func (*AgentMutation) ResetOccupiedCPU ¶
func (m *AgentMutation) ResetOccupiedCPU()
ResetOccupiedCPU resets all changes to the "occupied_cpu" field.
func (*AgentMutation) ResetOccupiedMemory ¶
func (m *AgentMutation) ResetOccupiedMemory()
ResetOccupiedMemory resets all changes to the "occupied_memory" field.
func (*AgentMutation) ResetTotalCPU ¶
func (m *AgentMutation) ResetTotalCPU()
ResetTotalCPU resets all changes to the "total_cpu" field.
func (*AgentMutation) ResetTotalMemory ¶
func (m *AgentMutation) ResetTotalMemory()
ResetTotalMemory resets all changes to the "total_memory" field.
func (*AgentMutation) SetActive ¶
func (m *AgentMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*AgentMutation) SetArch ¶
func (m *AgentMutation) SetArch(s string)
SetArch sets the "arch" 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) SetHostname ¶
func (m *AgentMutation) SetHostname(s string)
SetHostname sets the "hostname" field.
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) SetLastUpdateTime ¶
func (m *AgentMutation) SetLastUpdateTime(t time.Time)
SetLastUpdateTime sets the "last_update_time" field.
func (*AgentMutation) SetMAC ¶
func (m *AgentMutation) SetMAC(s string)
SetMAC sets the "mac" field.
func (*AgentMutation) SetOccupiedCPU ¶
func (m *AgentMutation) SetOccupiedCPU(i int32)
SetOccupiedCPU sets the "occupied_cpu" field.
func (*AgentMutation) SetOccupiedMemory ¶
func (m *AgentMutation) SetOccupiedMemory(i int32)
SetOccupiedMemory sets the "occupied_memory" field.
func (*AgentMutation) SetOp ¶
func (m *AgentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AgentMutation) SetTotalCPU ¶
func (m *AgentMutation) SetTotalCPU(i int32)
SetTotalCPU sets the "total_cpu" field.
func (*AgentMutation) SetTotalMemory ¶
func (m *AgentMutation) SetTotalMemory(i int32)
SetTotalMemory sets the "total_memory" field.
func (*AgentMutation) TotalCPU ¶
func (m *AgentMutation) TotalCPU() (r int32, exists bool)
TotalCPU returns the value of the "total_cpu" field in the mutation.
func (*AgentMutation) TotalMemory ¶
func (m *AgentMutation) TotalMemory() (r int32, exists bool)
TotalMemory returns the value of the "total_memory" field in the mutation.
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 (_q *AgentQuery) Aggregate(fns ...AggregateFunc) *AgentSelect
Aggregate returns a AgentSelect configured with the given aggregations.
func (*AgentQuery) All ¶
func (_q *AgentQuery) All(ctx context.Context) ([]*Agent, error)
All executes the query and returns a list of Agents.
func (*AgentQuery) AllX ¶
func (_q *AgentQuery) AllX(ctx context.Context) []*Agent
AllX is like All, but panics if an error occurs.
func (*AgentQuery) Clone ¶
func (_q *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 (_q *AgentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AgentQuery) CountX ¶
func (_q *AgentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AgentQuery) Exist ¶
func (_q *AgentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AgentQuery) ExistX ¶
func (_q *AgentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AgentQuery) First ¶
func (_q *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 (_q *AgentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AgentQuery) FirstX ¶
func (_q *AgentQuery) FirstX(ctx context.Context) *Agent
FirstX is like First, but panics if an error occurs.
func (*AgentQuery) GroupBy ¶
func (_q *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 {
MAC string `json:"mac,omitempty"`
Count int `json:"count,omitempty"`
}
client.Agent.Query().
GroupBy(agent.FieldMAC).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*AgentQuery) IDsX ¶
func (_q *AgentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AgentQuery) Limit ¶
func (_q *AgentQuery) Limit(limit int) *AgentQuery
Limit the number of records to be returned by this query.
func (*AgentQuery) Offset ¶
func (_q *AgentQuery) Offset(offset int) *AgentQuery
Offset to start from.
func (*AgentQuery) Only ¶
func (_q *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 (_q *AgentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AgentQuery) OnlyX ¶
func (_q *AgentQuery) OnlyX(ctx context.Context) *Agent
OnlyX is like Only, but panics if an error occurs.
func (*AgentQuery) Order ¶
func (_q *AgentQuery) Order(o ...agent.OrderOption) *AgentQuery
Order specifies how the records should be ordered.
func (*AgentQuery) Select ¶
func (_q *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 {
MAC string `json:"mac,omitempty"`
}
client.Agent.Query().
Select(agent.FieldMAC).
Scan(ctx, &v)
func (*AgentQuery) Unique ¶
func (_q *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 (_q *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 (_s *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 (_s *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) AddOccupiedCPU ¶
func (_u *AgentUpdate) AddOccupiedCPU(v int32) *AgentUpdate
AddOccupiedCPU adds value to the "occupied_cpu" field.
func (*AgentUpdate) AddOccupiedMemory ¶
func (_u *AgentUpdate) AddOccupiedMemory(v int32) *AgentUpdate
AddOccupiedMemory adds value to the "occupied_memory" field.
func (*AgentUpdate) AddTotalCPU ¶
func (_u *AgentUpdate) AddTotalCPU(v int32) *AgentUpdate
AddTotalCPU adds value to the "total_cpu" field.
func (*AgentUpdate) AddTotalMemory ¶
func (_u *AgentUpdate) AddTotalMemory(v int32) *AgentUpdate
AddTotalMemory adds value to the "total_memory" field.
func (*AgentUpdate) Exec ¶
func (_u *AgentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentUpdate) ExecX ¶
func (_u *AgentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentUpdate) Mutation ¶
func (_u *AgentUpdate) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentUpdate) Save ¶
func (_u *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 (_u *AgentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AgentUpdate) SetActive ¶
func (_u *AgentUpdate) SetActive(v bool) *AgentUpdate
SetActive sets the "active" field.
func (*AgentUpdate) SetArch ¶
func (_u *AgentUpdate) SetArch(v string) *AgentUpdate
SetArch sets the "arch" field.
func (*AgentUpdate) SetHostname ¶
func (_u *AgentUpdate) SetHostname(v string) *AgentUpdate
SetHostname sets the "hostname" field.
func (*AgentUpdate) SetIP ¶
func (_u *AgentUpdate) SetIP(v string) *AgentUpdate
SetIP sets the "ip" field.
func (*AgentUpdate) SetLastUpdateTime ¶
func (_u *AgentUpdate) SetLastUpdateTime(v time.Time) *AgentUpdate
SetLastUpdateTime sets the "last_update_time" field.
func (*AgentUpdate) SetMAC ¶
func (_u *AgentUpdate) SetMAC(v string) *AgentUpdate
SetMAC sets the "mac" field.
func (*AgentUpdate) SetNillableActive ¶
func (_u *AgentUpdate) SetNillableActive(v *bool) *AgentUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*AgentUpdate) SetNillableArch ¶
func (_u *AgentUpdate) SetNillableArch(v *string) *AgentUpdate
SetNillableArch sets the "arch" field if the given value is not nil.
func (*AgentUpdate) SetNillableHostname ¶
func (_u *AgentUpdate) SetNillableHostname(v *string) *AgentUpdate
SetNillableHostname sets the "hostname" field if the given value is not nil.
func (*AgentUpdate) SetNillableIP ¶
func (_u *AgentUpdate) SetNillableIP(v *string) *AgentUpdate
SetNillableIP sets the "ip" field if the given value is not nil.
func (*AgentUpdate) SetNillableMAC ¶
func (_u *AgentUpdate) SetNillableMAC(v *string) *AgentUpdate
SetNillableMAC sets the "mac" field if the given value is not nil.
func (*AgentUpdate) SetNillableOccupiedCPU ¶
func (_u *AgentUpdate) SetNillableOccupiedCPU(v *int32) *AgentUpdate
SetNillableOccupiedCPU sets the "occupied_cpu" field if the given value is not nil.
func (*AgentUpdate) SetNillableOccupiedMemory ¶
func (_u *AgentUpdate) SetNillableOccupiedMemory(v *int32) *AgentUpdate
SetNillableOccupiedMemory sets the "occupied_memory" field if the given value is not nil.
func (*AgentUpdate) SetNillableTotalCPU ¶
func (_u *AgentUpdate) SetNillableTotalCPU(v *int32) *AgentUpdate
SetNillableTotalCPU sets the "total_cpu" field if the given value is not nil.
func (*AgentUpdate) SetNillableTotalMemory ¶
func (_u *AgentUpdate) SetNillableTotalMemory(v *int32) *AgentUpdate
SetNillableTotalMemory sets the "total_memory" field if the given value is not nil.
func (*AgentUpdate) SetOccupiedCPU ¶
func (_u *AgentUpdate) SetOccupiedCPU(v int32) *AgentUpdate
SetOccupiedCPU sets the "occupied_cpu" field.
func (*AgentUpdate) SetOccupiedMemory ¶
func (_u *AgentUpdate) SetOccupiedMemory(v int32) *AgentUpdate
SetOccupiedMemory sets the "occupied_memory" field.
func (*AgentUpdate) SetTotalCPU ¶
func (_u *AgentUpdate) SetTotalCPU(v int32) *AgentUpdate
SetTotalCPU sets the "total_cpu" field.
func (*AgentUpdate) SetTotalMemory ¶
func (_u *AgentUpdate) SetTotalMemory(v int32) *AgentUpdate
SetTotalMemory sets the "total_memory" field.
func (*AgentUpdate) Where ¶
func (_u *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) AddOccupiedCPU ¶
func (_u *AgentUpdateOne) AddOccupiedCPU(v int32) *AgentUpdateOne
AddOccupiedCPU adds value to the "occupied_cpu" field.
func (*AgentUpdateOne) AddOccupiedMemory ¶
func (_u *AgentUpdateOne) AddOccupiedMemory(v int32) *AgentUpdateOne
AddOccupiedMemory adds value to the "occupied_memory" field.
func (*AgentUpdateOne) AddTotalCPU ¶
func (_u *AgentUpdateOne) AddTotalCPU(v int32) *AgentUpdateOne
AddTotalCPU adds value to the "total_cpu" field.
func (*AgentUpdateOne) AddTotalMemory ¶
func (_u *AgentUpdateOne) AddTotalMemory(v int32) *AgentUpdateOne
AddTotalMemory adds value to the "total_memory" field.
func (*AgentUpdateOne) Exec ¶
func (_u *AgentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AgentUpdateOne) ExecX ¶
func (_u *AgentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentUpdateOne) Mutation ¶
func (_u *AgentUpdateOne) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentUpdateOne) Save ¶
func (_u *AgentUpdateOne) Save(ctx context.Context) (*Agent, error)
Save executes the query and returns the updated Agent entity.
func (*AgentUpdateOne) SaveX ¶
func (_u *AgentUpdateOne) SaveX(ctx context.Context) *Agent
SaveX is like Save, but panics if an error occurs.
func (*AgentUpdateOne) Select ¶
func (_u *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) SetActive ¶
func (_u *AgentUpdateOne) SetActive(v bool) *AgentUpdateOne
SetActive sets the "active" field.
func (*AgentUpdateOne) SetArch ¶
func (_u *AgentUpdateOne) SetArch(v string) *AgentUpdateOne
SetArch sets the "arch" field.
func (*AgentUpdateOne) SetHostname ¶
func (_u *AgentUpdateOne) SetHostname(v string) *AgentUpdateOne
SetHostname sets the "hostname" field.
func (*AgentUpdateOne) SetIP ¶
func (_u *AgentUpdateOne) SetIP(v string) *AgentUpdateOne
SetIP sets the "ip" field.
func (*AgentUpdateOne) SetLastUpdateTime ¶
func (_u *AgentUpdateOne) SetLastUpdateTime(v time.Time) *AgentUpdateOne
SetLastUpdateTime sets the "last_update_time" field.
func (*AgentUpdateOne) SetMAC ¶
func (_u *AgentUpdateOne) SetMAC(v string) *AgentUpdateOne
SetMAC sets the "mac" field.
func (*AgentUpdateOne) SetNillableActive ¶
func (_u *AgentUpdateOne) SetNillableActive(v *bool) *AgentUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*AgentUpdateOne) SetNillableArch ¶
func (_u *AgentUpdateOne) SetNillableArch(v *string) *AgentUpdateOne
SetNillableArch sets the "arch" field if the given value is not nil.
func (*AgentUpdateOne) SetNillableHostname ¶
func (_u *AgentUpdateOne) SetNillableHostname(v *string) *AgentUpdateOne
SetNillableHostname sets the "hostname" field if the given value is not nil.
func (*AgentUpdateOne) SetNillableIP ¶
func (_u *AgentUpdateOne) SetNillableIP(v *string) *AgentUpdateOne
SetNillableIP sets the "ip" field if the given value is not nil.
func (*AgentUpdateOne) SetNillableMAC ¶
func (_u *AgentUpdateOne) SetNillableMAC(v *string) *AgentUpdateOne
SetNillableMAC sets the "mac" field if the given value is not nil.
func (*AgentUpdateOne) SetNillableOccupiedCPU ¶
func (_u *AgentUpdateOne) SetNillableOccupiedCPU(v *int32) *AgentUpdateOne
SetNillableOccupiedCPU sets the "occupied_cpu" field if the given value is not nil.
func (*AgentUpdateOne) SetNillableOccupiedMemory ¶
func (_u *AgentUpdateOne) SetNillableOccupiedMemory(v *int32) *AgentUpdateOne
SetNillableOccupiedMemory sets the "occupied_memory" field if the given value is not nil.
func (*AgentUpdateOne) SetNillableTotalCPU ¶
func (_u *AgentUpdateOne) SetNillableTotalCPU(v *int32) *AgentUpdateOne
SetNillableTotalCPU sets the "total_cpu" field if the given value is not nil.
func (*AgentUpdateOne) SetNillableTotalMemory ¶
func (_u *AgentUpdateOne) SetNillableTotalMemory(v *int32) *AgentUpdateOne
SetNillableTotalMemory sets the "total_memory" field if the given value is not nil.
func (*AgentUpdateOne) SetOccupiedCPU ¶
func (_u *AgentUpdateOne) SetOccupiedCPU(v int32) *AgentUpdateOne
SetOccupiedCPU sets the "occupied_cpu" field.
func (*AgentUpdateOne) SetOccupiedMemory ¶
func (_u *AgentUpdateOne) SetOccupiedMemory(v int32) *AgentUpdateOne
SetOccupiedMemory sets the "occupied_memory" field.
func (*AgentUpdateOne) SetTotalCPU ¶
func (_u *AgentUpdateOne) SetTotalCPU(v int32) *AgentUpdateOne
SetTotalCPU sets the "total_cpu" field.
func (*AgentUpdateOne) SetTotalMemory ¶
func (_u *AgentUpdateOne) SetTotalMemory(v int32) *AgentUpdateOne
SetTotalMemory sets the "total_memory" field.
func (*AgentUpdateOne) Where ¶
func (_u *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 AlipayOrderRollback ¶
type AlipayOrderRollback struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// 通知校验ID
NotifyID string `json:"notify_id,omitempty"`
// 通知类型
NotifyType string `json:"notify_type,omitempty"`
// 通知时间
NotifyTime string `json:"notify_time,omitempty"`
// 编码格式,如 utf-8、gbk、gb2312 等
Charset string `json:"charset,omitempty"`
// 调用的接口版本,固定为:1.0
Version string `json:"version,omitempty"`
// 签名类型
SignType string `json:"sign_type,omitempty"`
// 签名
Sign string `json:"sign,omitempty"`
// 支付成功的各个渠道金额信息。详情可查看 资金明细信息说明
FundBillList string `json:"fund_bill_list,omitempty"`
// 实收金额
ReceiptAmount string `json:"receipt_amount,omitempty"`
// 用户在交易中支付的可开发票的金额
InvoiceAmount string `json:"invoice_amount,omitempty"`
// 付款金额
BuyerPayAmount string `json:"buyer_pay_amount,omitempty"`
// 集分宝金额
PointAmount string `json:"point_amount,omitempty"`
// 本交易支付时所有优惠券信息,详情可查看 优惠券信息说明
VoucherDetailList string `json:"voucher_detail_list,omitempty"`
// 公共回传参数,如果请求时传递了该参数,则返回给商家时会在异步通知时将该参数原样返回。本参数必须进行 UrlEncode 之后才可以发送给支付宝。
PassbackParams string `json:"passback_params,omitempty"`
// 支付宝交易号
TradeNo string `json:"trade_no,omitempty"`
// 开发者id
AppID string `json:"app_id,omitempty"`
// 商户订单号
OutTradeNo string `json:"out_trade_no,omitempty"`
// 商户业务号
OutBizNo string `json:"out_biz_no,omitempty"`
// 买家支付宝ID
BuyerID string `json:"buyer_id,omitempty"`
// 卖家支付宝id
SellerID string `json:"seller_id,omitempty"`
// 交易状态
TradeStatus string `json:"trade_status,omitempty"`
// 订单金额
TotalAmount string `json:"total_amount,omitempty"`
// 总退款金额
RefundFee string `json:"refund_fee,omitempty"`
// 订单标题
Subject string `json:"subject,omitempty"`
// 订单的备注、描述、明细等。对应请求时的 body 参数,原样通知回来
Body string `json:"body,omitempty"`
// 交易创建时间
GmtCreate string `json:"gmt_create,omitempty"`
// 交易付款时间
GmtPayment string `json:"gmt_payment,omitempty"`
// 交易关闭时间
GmtClose string `json:"gmt_close,omitempty"`
// 创建时间
CreateTime time.Time `json:"create_time,omitempty"`
// 更新时间
UpdateTime time.Time `json:"update_time,omitempty"`
// contains filtered or unexported fields
}
AlipayOrderRollback is the model entity for the AlipayOrderRollback schema.
func (*AlipayOrderRollback) String ¶
func (_m *AlipayOrderRollback) String() string
String implements the fmt.Stringer.
func (*AlipayOrderRollback) Unwrap ¶
func (_m *AlipayOrderRollback) Unwrap() *AlipayOrderRollback
Unwrap unwraps the AlipayOrderRollback 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 (*AlipayOrderRollback) Update ¶
func (_m *AlipayOrderRollback) Update() *AlipayOrderRollbackUpdateOne
Update returns a builder for updating this AlipayOrderRollback. Note that you need to call AlipayOrderRollback.Unwrap() before calling this method if this AlipayOrderRollback was returned from a transaction, and the transaction was committed or rolled back.
type AlipayOrderRollbackClient ¶
type AlipayOrderRollbackClient struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackClient is a client for the AlipayOrderRollback schema.
func NewAlipayOrderRollbackClient ¶
func NewAlipayOrderRollbackClient(c config) *AlipayOrderRollbackClient
NewAlipayOrderRollbackClient returns a client for the AlipayOrderRollback from the given config.
func (*AlipayOrderRollbackClient) Create ¶
func (c *AlipayOrderRollbackClient) Create() *AlipayOrderRollbackCreate
Create returns a builder for creating a AlipayOrderRollback entity.
func (*AlipayOrderRollbackClient) CreateBulk ¶
func (c *AlipayOrderRollbackClient) CreateBulk(builders ...*AlipayOrderRollbackCreate) *AlipayOrderRollbackCreateBulk
CreateBulk returns a builder for creating a bulk of AlipayOrderRollback entities.
func (*AlipayOrderRollbackClient) Delete ¶
func (c *AlipayOrderRollbackClient) Delete() *AlipayOrderRollbackDelete
Delete returns a delete builder for AlipayOrderRollback.
func (*AlipayOrderRollbackClient) DeleteOne ¶
func (c *AlipayOrderRollbackClient) DeleteOne(_m *AlipayOrderRollback) *AlipayOrderRollbackDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AlipayOrderRollbackClient) DeleteOneID ¶
func (c *AlipayOrderRollbackClient) DeleteOneID(id int) *AlipayOrderRollbackDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AlipayOrderRollbackClient) Get ¶
func (c *AlipayOrderRollbackClient) Get(ctx context.Context, id int) (*AlipayOrderRollback, error)
Get returns a AlipayOrderRollback entity by its id.
func (*AlipayOrderRollbackClient) GetX ¶
func (c *AlipayOrderRollbackClient) GetX(ctx context.Context, id int) *AlipayOrderRollback
GetX is like Get, but panics if an error occurs.
func (*AlipayOrderRollbackClient) Hooks ¶
func (c *AlipayOrderRollbackClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AlipayOrderRollbackClient) Intercept ¶
func (c *AlipayOrderRollbackClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `alipayorderrollback.Intercept(f(g(h())))`.
func (*AlipayOrderRollbackClient) Interceptors ¶
func (c *AlipayOrderRollbackClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AlipayOrderRollbackClient) MapCreateBulk ¶
func (c *AlipayOrderRollbackClient) MapCreateBulk(slice any, setFunc func(*AlipayOrderRollbackCreate, int)) *AlipayOrderRollbackCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*AlipayOrderRollbackClient) Query ¶
func (c *AlipayOrderRollbackClient) Query() *AlipayOrderRollbackQuery
Query returns a query builder for AlipayOrderRollback.
func (*AlipayOrderRollbackClient) Update ¶
func (c *AlipayOrderRollbackClient) Update() *AlipayOrderRollbackUpdate
Update returns an update builder for AlipayOrderRollback.
func (*AlipayOrderRollbackClient) UpdateOne ¶
func (c *AlipayOrderRollbackClient) UpdateOne(_m *AlipayOrderRollback) *AlipayOrderRollbackUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AlipayOrderRollbackClient) UpdateOneID ¶
func (c *AlipayOrderRollbackClient) UpdateOneID(id int) *AlipayOrderRollbackUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AlipayOrderRollbackClient) Use ¶
func (c *AlipayOrderRollbackClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `alipayorderrollback.Hooks(f(g(h())))`.
type AlipayOrderRollbackCreate ¶
type AlipayOrderRollbackCreate struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackCreate is the builder for creating a AlipayOrderRollback entity.
func (*AlipayOrderRollbackCreate) Exec ¶
func (_c *AlipayOrderRollbackCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AlipayOrderRollbackCreate) ExecX ¶
func (_c *AlipayOrderRollbackCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlipayOrderRollbackCreate) Mutation ¶
func (_c *AlipayOrderRollbackCreate) Mutation() *AlipayOrderRollbackMutation
Mutation returns the AlipayOrderRollbackMutation object of the builder.
func (*AlipayOrderRollbackCreate) Save ¶
func (_c *AlipayOrderRollbackCreate) Save(ctx context.Context) (*AlipayOrderRollback, error)
Save creates the AlipayOrderRollback in the database.
func (*AlipayOrderRollbackCreate) SaveX ¶
func (_c *AlipayOrderRollbackCreate) SaveX(ctx context.Context) *AlipayOrderRollback
SaveX calls Save and panics if Save returns an error.
func (*AlipayOrderRollbackCreate) SetAppID ¶
func (_c *AlipayOrderRollbackCreate) SetAppID(v string) *AlipayOrderRollbackCreate
SetAppID sets the "app_id" field.
func (*AlipayOrderRollbackCreate) SetBody ¶
func (_c *AlipayOrderRollbackCreate) SetBody(v string) *AlipayOrderRollbackCreate
SetBody sets the "body" field.
func (*AlipayOrderRollbackCreate) SetBuyerID ¶
func (_c *AlipayOrderRollbackCreate) SetBuyerID(v string) *AlipayOrderRollbackCreate
SetBuyerID sets the "buyer_id" field.
func (*AlipayOrderRollbackCreate) SetBuyerPayAmount ¶
func (_c *AlipayOrderRollbackCreate) SetBuyerPayAmount(v string) *AlipayOrderRollbackCreate
SetBuyerPayAmount sets the "buyer_pay_amount" field.
func (*AlipayOrderRollbackCreate) SetCharset ¶
func (_c *AlipayOrderRollbackCreate) SetCharset(v string) *AlipayOrderRollbackCreate
SetCharset sets the "charset" field.
func (*AlipayOrderRollbackCreate) SetCreateTime ¶
func (_c *AlipayOrderRollbackCreate) SetCreateTime(v time.Time) *AlipayOrderRollbackCreate
SetCreateTime sets the "create_time" field.
func (*AlipayOrderRollbackCreate) SetFundBillList ¶
func (_c *AlipayOrderRollbackCreate) SetFundBillList(v string) *AlipayOrderRollbackCreate
SetFundBillList sets the "fund_bill_list" field.
func (*AlipayOrderRollbackCreate) SetGmtClose ¶
func (_c *AlipayOrderRollbackCreate) SetGmtClose(v string) *AlipayOrderRollbackCreate
SetGmtClose sets the "gmt_close" field.
func (*AlipayOrderRollbackCreate) SetGmtCreate ¶
func (_c *AlipayOrderRollbackCreate) SetGmtCreate(v string) *AlipayOrderRollbackCreate
SetGmtCreate sets the "gmt_create" field.
func (*AlipayOrderRollbackCreate) SetGmtPayment ¶
func (_c *AlipayOrderRollbackCreate) SetGmtPayment(v string) *AlipayOrderRollbackCreate
SetGmtPayment sets the "gmt_payment" field.
func (*AlipayOrderRollbackCreate) SetInvoiceAmount ¶
func (_c *AlipayOrderRollbackCreate) SetInvoiceAmount(v string) *AlipayOrderRollbackCreate
SetInvoiceAmount sets the "invoice_amount" field.
func (*AlipayOrderRollbackCreate) SetNotifyID ¶
func (_c *AlipayOrderRollbackCreate) SetNotifyID(v string) *AlipayOrderRollbackCreate
SetNotifyID sets the "notify_id" field.
func (*AlipayOrderRollbackCreate) SetNotifyTime ¶
func (_c *AlipayOrderRollbackCreate) SetNotifyTime(v string) *AlipayOrderRollbackCreate
SetNotifyTime sets the "notify_time" field.
func (*AlipayOrderRollbackCreate) SetNotifyType ¶
func (_c *AlipayOrderRollbackCreate) SetNotifyType(v string) *AlipayOrderRollbackCreate
SetNotifyType sets the "notify_type" field.
func (*AlipayOrderRollbackCreate) SetOutBizNo ¶
func (_c *AlipayOrderRollbackCreate) SetOutBizNo(v string) *AlipayOrderRollbackCreate
SetOutBizNo sets the "out_biz_no" field.
func (*AlipayOrderRollbackCreate) SetOutTradeNo ¶
func (_c *AlipayOrderRollbackCreate) SetOutTradeNo(v string) *AlipayOrderRollbackCreate
SetOutTradeNo sets the "out_trade_no" field.
func (*AlipayOrderRollbackCreate) SetPassbackParams ¶
func (_c *AlipayOrderRollbackCreate) SetPassbackParams(v string) *AlipayOrderRollbackCreate
SetPassbackParams sets the "passback_params" field.
func (*AlipayOrderRollbackCreate) SetPointAmount ¶
func (_c *AlipayOrderRollbackCreate) SetPointAmount(v string) *AlipayOrderRollbackCreate
SetPointAmount sets the "point_amount" field.
func (*AlipayOrderRollbackCreate) SetReceiptAmount ¶
func (_c *AlipayOrderRollbackCreate) SetReceiptAmount(v string) *AlipayOrderRollbackCreate
SetReceiptAmount sets the "receipt_amount" field.
func (*AlipayOrderRollbackCreate) SetRefundFee ¶
func (_c *AlipayOrderRollbackCreate) SetRefundFee(v string) *AlipayOrderRollbackCreate
SetRefundFee sets the "refund_fee" field.
func (*AlipayOrderRollbackCreate) SetSellerID ¶
func (_c *AlipayOrderRollbackCreate) SetSellerID(v string) *AlipayOrderRollbackCreate
SetSellerID sets the "seller_id" field.
func (*AlipayOrderRollbackCreate) SetSign ¶
func (_c *AlipayOrderRollbackCreate) SetSign(v string) *AlipayOrderRollbackCreate
SetSign sets the "sign" field.
func (*AlipayOrderRollbackCreate) SetSignType ¶
func (_c *AlipayOrderRollbackCreate) SetSignType(v string) *AlipayOrderRollbackCreate
SetSignType sets the "sign_type" field.
func (*AlipayOrderRollbackCreate) SetSubject ¶
func (_c *AlipayOrderRollbackCreate) SetSubject(v string) *AlipayOrderRollbackCreate
SetSubject sets the "subject" field.
func (*AlipayOrderRollbackCreate) SetTotalAmount ¶
func (_c *AlipayOrderRollbackCreate) SetTotalAmount(v string) *AlipayOrderRollbackCreate
SetTotalAmount sets the "total_amount" field.
func (*AlipayOrderRollbackCreate) SetTradeNo ¶
func (_c *AlipayOrderRollbackCreate) SetTradeNo(v string) *AlipayOrderRollbackCreate
SetTradeNo sets the "trade_no" field.
func (*AlipayOrderRollbackCreate) SetTradeStatus ¶
func (_c *AlipayOrderRollbackCreate) SetTradeStatus(v string) *AlipayOrderRollbackCreate
SetTradeStatus sets the "trade_status" field.
func (*AlipayOrderRollbackCreate) SetUpdateTime ¶
func (_c *AlipayOrderRollbackCreate) SetUpdateTime(v time.Time) *AlipayOrderRollbackCreate
SetUpdateTime sets the "update_time" field.
func (*AlipayOrderRollbackCreate) SetVersion ¶
func (_c *AlipayOrderRollbackCreate) SetVersion(v string) *AlipayOrderRollbackCreate
SetVersion sets the "version" field.
func (*AlipayOrderRollbackCreate) SetVoucherDetailList ¶
func (_c *AlipayOrderRollbackCreate) SetVoucherDetailList(v string) *AlipayOrderRollbackCreate
SetVoucherDetailList sets the "voucher_detail_list" field.
type AlipayOrderRollbackCreateBulk ¶
type AlipayOrderRollbackCreateBulk struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackCreateBulk is the builder for creating many AlipayOrderRollback entities in bulk.
func (*AlipayOrderRollbackCreateBulk) Exec ¶
func (_c *AlipayOrderRollbackCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AlipayOrderRollbackCreateBulk) ExecX ¶
func (_c *AlipayOrderRollbackCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlipayOrderRollbackCreateBulk) Save ¶
func (_c *AlipayOrderRollbackCreateBulk) Save(ctx context.Context) ([]*AlipayOrderRollback, error)
Save creates the AlipayOrderRollback entities in the database.
func (*AlipayOrderRollbackCreateBulk) SaveX ¶
func (_c *AlipayOrderRollbackCreateBulk) SaveX(ctx context.Context) []*AlipayOrderRollback
SaveX is like Save, but panics if an error occurs.
type AlipayOrderRollbackDelete ¶
type AlipayOrderRollbackDelete struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackDelete is the builder for deleting a AlipayOrderRollback entity.
func (*AlipayOrderRollbackDelete) Exec ¶
func (_d *AlipayOrderRollbackDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AlipayOrderRollbackDelete) ExecX ¶
func (_d *AlipayOrderRollbackDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AlipayOrderRollbackDelete) Where ¶
func (_d *AlipayOrderRollbackDelete) Where(ps ...predicate.AlipayOrderRollback) *AlipayOrderRollbackDelete
Where appends a list predicates to the AlipayOrderRollbackDelete builder.
type AlipayOrderRollbackDeleteOne ¶
type AlipayOrderRollbackDeleteOne struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackDeleteOne is the builder for deleting a single AlipayOrderRollback entity.
func (*AlipayOrderRollbackDeleteOne) Exec ¶
func (_d *AlipayOrderRollbackDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AlipayOrderRollbackDeleteOne) ExecX ¶
func (_d *AlipayOrderRollbackDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlipayOrderRollbackDeleteOne) Where ¶
func (_d *AlipayOrderRollbackDeleteOne) Where(ps ...predicate.AlipayOrderRollback) *AlipayOrderRollbackDeleteOne
Where appends a list predicates to the AlipayOrderRollbackDelete builder.
type AlipayOrderRollbackGroupBy ¶
type AlipayOrderRollbackGroupBy struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackGroupBy is the group-by builder for AlipayOrderRollback entities.
func (*AlipayOrderRollbackGroupBy) Aggregate ¶
func (_g *AlipayOrderRollbackGroupBy) Aggregate(fns ...AggregateFunc) *AlipayOrderRollbackGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AlipayOrderRollbackGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*AlipayOrderRollbackGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*AlipayOrderRollbackGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackGroupBy) Scan ¶
func (_g *AlipayOrderRollbackGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AlipayOrderRollbackGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AlipayOrderRollbackMutation ¶
type AlipayOrderRollbackMutation struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackMutation represents an operation that mutates the AlipayOrderRollback nodes in the graph.
func (*AlipayOrderRollbackMutation) AddField ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) AddedEdges ¶
func (m *AlipayOrderRollbackMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AlipayOrderRollbackMutation) AddedField ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) AddedFields ¶
func (m *AlipayOrderRollbackMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AlipayOrderRollbackMutation) AddedIDs ¶
func (m *AlipayOrderRollbackMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AlipayOrderRollbackMutation) AppID ¶
func (m *AlipayOrderRollbackMutation) AppID() (r string, exists bool)
AppID returns the value of the "app_id" field in the mutation.
func (*AlipayOrderRollbackMutation) Body ¶
func (m *AlipayOrderRollbackMutation) Body() (r string, exists bool)
Body returns the value of the "body" field in the mutation.
func (*AlipayOrderRollbackMutation) BuyerID ¶
func (m *AlipayOrderRollbackMutation) BuyerID() (r string, exists bool)
BuyerID returns the value of the "buyer_id" field in the mutation.
func (*AlipayOrderRollbackMutation) BuyerPayAmount ¶
func (m *AlipayOrderRollbackMutation) BuyerPayAmount() (r string, exists bool)
BuyerPayAmount returns the value of the "buyer_pay_amount" field in the mutation.
func (*AlipayOrderRollbackMutation) Charset ¶
func (m *AlipayOrderRollbackMutation) Charset() (r string, exists bool)
Charset returns the value of the "charset" field in the mutation.
func (*AlipayOrderRollbackMutation) ClearEdge ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) ClearField ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) ClearedEdges ¶
func (m *AlipayOrderRollbackMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AlipayOrderRollbackMutation) ClearedFields ¶
func (m *AlipayOrderRollbackMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AlipayOrderRollbackMutation) Client ¶
func (m AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) CreateTime ¶
func (m *AlipayOrderRollbackMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*AlipayOrderRollbackMutation) EdgeCleared ¶
func (m *AlipayOrderRollbackMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AlipayOrderRollbackMutation) Field ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) FieldCleared ¶
func (m *AlipayOrderRollbackMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AlipayOrderRollbackMutation) Fields ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) FundBillList ¶
func (m *AlipayOrderRollbackMutation) FundBillList() (r string, exists bool)
FundBillList returns the value of the "fund_bill_list" field in the mutation.
func (*AlipayOrderRollbackMutation) GmtClose ¶
func (m *AlipayOrderRollbackMutation) GmtClose() (r string, exists bool)
GmtClose returns the value of the "gmt_close" field in the mutation.
func (*AlipayOrderRollbackMutation) GmtCreate ¶
func (m *AlipayOrderRollbackMutation) GmtCreate() (r string, exists bool)
GmtCreate returns the value of the "gmt_create" field in the mutation.
func (*AlipayOrderRollbackMutation) GmtPayment ¶
func (m *AlipayOrderRollbackMutation) GmtPayment() (r string, exists bool)
GmtPayment returns the value of the "gmt_payment" field in the mutation.
func (*AlipayOrderRollbackMutation) ID ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) IDs ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) InvoiceAmount ¶
func (m *AlipayOrderRollbackMutation) InvoiceAmount() (r string, exists bool)
InvoiceAmount returns the value of the "invoice_amount" field in the mutation.
func (*AlipayOrderRollbackMutation) NotifyID ¶
func (m *AlipayOrderRollbackMutation) NotifyID() (r string, exists bool)
NotifyID returns the value of the "notify_id" field in the mutation.
func (*AlipayOrderRollbackMutation) NotifyTime ¶
func (m *AlipayOrderRollbackMutation) NotifyTime() (r string, exists bool)
NotifyTime returns the value of the "notify_time" field in the mutation.
func (*AlipayOrderRollbackMutation) NotifyType ¶
func (m *AlipayOrderRollbackMutation) NotifyType() (r string, exists bool)
NotifyType returns the value of the "notify_type" field in the mutation.
func (*AlipayOrderRollbackMutation) OldAppID ¶
func (m *AlipayOrderRollbackMutation) OldAppID(ctx context.Context) (v string, err error)
OldAppID returns the old "app_id" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldBody ¶
func (m *AlipayOrderRollbackMutation) OldBody(ctx context.Context) (v string, err error)
OldBody returns the old "body" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldBuyerID ¶
func (m *AlipayOrderRollbackMutation) OldBuyerID(ctx context.Context) (v string, err error)
OldBuyerID returns the old "buyer_id" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldBuyerPayAmount ¶
func (m *AlipayOrderRollbackMutation) OldBuyerPayAmount(ctx context.Context) (v string, err error)
OldBuyerPayAmount returns the old "buyer_pay_amount" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldCharset ¶
func (m *AlipayOrderRollbackMutation) OldCharset(ctx context.Context) (v string, err error)
OldCharset returns the old "charset" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) OldFundBillList ¶
func (m *AlipayOrderRollbackMutation) OldFundBillList(ctx context.Context) (v string, err error)
OldFundBillList returns the old "fund_bill_list" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldGmtClose ¶
func (m *AlipayOrderRollbackMutation) OldGmtClose(ctx context.Context) (v string, err error)
OldGmtClose returns the old "gmt_close" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldGmtCreate ¶
func (m *AlipayOrderRollbackMutation) OldGmtCreate(ctx context.Context) (v string, err error)
OldGmtCreate returns the old "gmt_create" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldGmtPayment ¶
func (m *AlipayOrderRollbackMutation) OldGmtPayment(ctx context.Context) (v string, err error)
OldGmtPayment returns the old "gmt_payment" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldInvoiceAmount ¶
func (m *AlipayOrderRollbackMutation) OldInvoiceAmount(ctx context.Context) (v string, err error)
OldInvoiceAmount returns the old "invoice_amount" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldNotifyID ¶
func (m *AlipayOrderRollbackMutation) OldNotifyID(ctx context.Context) (v string, err error)
OldNotifyID returns the old "notify_id" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldNotifyTime ¶
func (m *AlipayOrderRollbackMutation) OldNotifyTime(ctx context.Context) (v string, err error)
OldNotifyTime returns the old "notify_time" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldNotifyType ¶
func (m *AlipayOrderRollbackMutation) OldNotifyType(ctx context.Context) (v string, err error)
OldNotifyType returns the old "notify_type" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldOutBizNo ¶
func (m *AlipayOrderRollbackMutation) OldOutBizNo(ctx context.Context) (v string, err error)
OldOutBizNo returns the old "out_biz_no" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldOutTradeNo ¶
func (m *AlipayOrderRollbackMutation) OldOutTradeNo(ctx context.Context) (v string, err error)
OldOutTradeNo returns the old "out_trade_no" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldPassbackParams ¶
func (m *AlipayOrderRollbackMutation) OldPassbackParams(ctx context.Context) (v string, err error)
OldPassbackParams returns the old "passback_params" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldPointAmount ¶
func (m *AlipayOrderRollbackMutation) OldPointAmount(ctx context.Context) (v string, err error)
OldPointAmount returns the old "point_amount" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldReceiptAmount ¶
func (m *AlipayOrderRollbackMutation) OldReceiptAmount(ctx context.Context) (v string, err error)
OldReceiptAmount returns the old "receipt_amount" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldRefundFee ¶
func (m *AlipayOrderRollbackMutation) OldRefundFee(ctx context.Context) (v string, err error)
OldRefundFee returns the old "refund_fee" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldSellerID ¶
func (m *AlipayOrderRollbackMutation) OldSellerID(ctx context.Context) (v string, err error)
OldSellerID returns the old "seller_id" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldSign ¶
func (m *AlipayOrderRollbackMutation) OldSign(ctx context.Context) (v string, err error)
OldSign returns the old "sign" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldSignType ¶
func (m *AlipayOrderRollbackMutation) OldSignType(ctx context.Context) (v string, err error)
OldSignType returns the old "sign_type" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldSubject ¶
func (m *AlipayOrderRollbackMutation) OldSubject(ctx context.Context) (v string, err error)
OldSubject returns the old "subject" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldTotalAmount ¶
func (m *AlipayOrderRollbackMutation) OldTotalAmount(ctx context.Context) (v string, err error)
OldTotalAmount returns the old "total_amount" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldTradeNo ¶
func (m *AlipayOrderRollbackMutation) OldTradeNo(ctx context.Context) (v string, err error)
OldTradeNo returns the old "trade_no" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldTradeStatus ¶
func (m *AlipayOrderRollbackMutation) OldTradeStatus(ctx context.Context) (v string, err error)
OldTradeStatus returns the old "trade_status" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldVersion ¶
func (m *AlipayOrderRollbackMutation) OldVersion(ctx context.Context) (v string, err error)
OldVersion returns the old "version" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) OldVoucherDetailList ¶
func (m *AlipayOrderRollbackMutation) OldVoucherDetailList(ctx context.Context) (v string, err error)
OldVoucherDetailList returns the old "voucher_detail_list" field's value of the AlipayOrderRollback entity. If the AlipayOrderRollback 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 (*AlipayOrderRollbackMutation) Op ¶
func (m *AlipayOrderRollbackMutation) Op() Op
Op returns the operation name.
func (*AlipayOrderRollbackMutation) OutBizNo ¶
func (m *AlipayOrderRollbackMutation) OutBizNo() (r string, exists bool)
OutBizNo returns the value of the "out_biz_no" field in the mutation.
func (*AlipayOrderRollbackMutation) OutTradeNo ¶
func (m *AlipayOrderRollbackMutation) OutTradeNo() (r string, exists bool)
OutTradeNo returns the value of the "out_trade_no" field in the mutation.
func (*AlipayOrderRollbackMutation) PassbackParams ¶
func (m *AlipayOrderRollbackMutation) PassbackParams() (r string, exists bool)
PassbackParams returns the value of the "passback_params" field in the mutation.
func (*AlipayOrderRollbackMutation) PointAmount ¶
func (m *AlipayOrderRollbackMutation) PointAmount() (r string, exists bool)
PointAmount returns the value of the "point_amount" field in the mutation.
func (*AlipayOrderRollbackMutation) ReceiptAmount ¶
func (m *AlipayOrderRollbackMutation) ReceiptAmount() (r string, exists bool)
ReceiptAmount returns the value of the "receipt_amount" field in the mutation.
func (*AlipayOrderRollbackMutation) RefundFee ¶
func (m *AlipayOrderRollbackMutation) RefundFee() (r string, exists bool)
RefundFee returns the value of the "refund_fee" field in the mutation.
func (*AlipayOrderRollbackMutation) RemovedEdges ¶
func (m *AlipayOrderRollbackMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AlipayOrderRollbackMutation) RemovedIDs ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) ResetAppID ¶
func (m *AlipayOrderRollbackMutation) ResetAppID()
ResetAppID resets all changes to the "app_id" field.
func (*AlipayOrderRollbackMutation) ResetBody ¶
func (m *AlipayOrderRollbackMutation) ResetBody()
ResetBody resets all changes to the "body" field.
func (*AlipayOrderRollbackMutation) ResetBuyerID ¶
func (m *AlipayOrderRollbackMutation) ResetBuyerID()
ResetBuyerID resets all changes to the "buyer_id" field.
func (*AlipayOrderRollbackMutation) ResetBuyerPayAmount ¶
func (m *AlipayOrderRollbackMutation) ResetBuyerPayAmount()
ResetBuyerPayAmount resets all changes to the "buyer_pay_amount" field.
func (*AlipayOrderRollbackMutation) ResetCharset ¶
func (m *AlipayOrderRollbackMutation) ResetCharset()
ResetCharset resets all changes to the "charset" field.
func (*AlipayOrderRollbackMutation) ResetCreateTime ¶
func (m *AlipayOrderRollbackMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*AlipayOrderRollbackMutation) ResetEdge ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) ResetField ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) ResetFundBillList ¶
func (m *AlipayOrderRollbackMutation) ResetFundBillList()
ResetFundBillList resets all changes to the "fund_bill_list" field.
func (*AlipayOrderRollbackMutation) ResetGmtClose ¶
func (m *AlipayOrderRollbackMutation) ResetGmtClose()
ResetGmtClose resets all changes to the "gmt_close" field.
func (*AlipayOrderRollbackMutation) ResetGmtCreate ¶
func (m *AlipayOrderRollbackMutation) ResetGmtCreate()
ResetGmtCreate resets all changes to the "gmt_create" field.
func (*AlipayOrderRollbackMutation) ResetGmtPayment ¶
func (m *AlipayOrderRollbackMutation) ResetGmtPayment()
ResetGmtPayment resets all changes to the "gmt_payment" field.
func (*AlipayOrderRollbackMutation) ResetInvoiceAmount ¶
func (m *AlipayOrderRollbackMutation) ResetInvoiceAmount()
ResetInvoiceAmount resets all changes to the "invoice_amount" field.
func (*AlipayOrderRollbackMutation) ResetNotifyID ¶
func (m *AlipayOrderRollbackMutation) ResetNotifyID()
ResetNotifyID resets all changes to the "notify_id" field.
func (*AlipayOrderRollbackMutation) ResetNotifyTime ¶
func (m *AlipayOrderRollbackMutation) ResetNotifyTime()
ResetNotifyTime resets all changes to the "notify_time" field.
func (*AlipayOrderRollbackMutation) ResetNotifyType ¶
func (m *AlipayOrderRollbackMutation) ResetNotifyType()
ResetNotifyType resets all changes to the "notify_type" field.
func (*AlipayOrderRollbackMutation) ResetOutBizNo ¶
func (m *AlipayOrderRollbackMutation) ResetOutBizNo()
ResetOutBizNo resets all changes to the "out_biz_no" field.
func (*AlipayOrderRollbackMutation) ResetOutTradeNo ¶
func (m *AlipayOrderRollbackMutation) ResetOutTradeNo()
ResetOutTradeNo resets all changes to the "out_trade_no" field.
func (*AlipayOrderRollbackMutation) ResetPassbackParams ¶
func (m *AlipayOrderRollbackMutation) ResetPassbackParams()
ResetPassbackParams resets all changes to the "passback_params" field.
func (*AlipayOrderRollbackMutation) ResetPointAmount ¶
func (m *AlipayOrderRollbackMutation) ResetPointAmount()
ResetPointAmount resets all changes to the "point_amount" field.
func (*AlipayOrderRollbackMutation) ResetReceiptAmount ¶
func (m *AlipayOrderRollbackMutation) ResetReceiptAmount()
ResetReceiptAmount resets all changes to the "receipt_amount" field.
func (*AlipayOrderRollbackMutation) ResetRefundFee ¶
func (m *AlipayOrderRollbackMutation) ResetRefundFee()
ResetRefundFee resets all changes to the "refund_fee" field.
func (*AlipayOrderRollbackMutation) ResetSellerID ¶
func (m *AlipayOrderRollbackMutation) ResetSellerID()
ResetSellerID resets all changes to the "seller_id" field.
func (*AlipayOrderRollbackMutation) ResetSign ¶
func (m *AlipayOrderRollbackMutation) ResetSign()
ResetSign resets all changes to the "sign" field.
func (*AlipayOrderRollbackMutation) ResetSignType ¶
func (m *AlipayOrderRollbackMutation) ResetSignType()
ResetSignType resets all changes to the "sign_type" field.
func (*AlipayOrderRollbackMutation) ResetSubject ¶
func (m *AlipayOrderRollbackMutation) ResetSubject()
ResetSubject resets all changes to the "subject" field.
func (*AlipayOrderRollbackMutation) ResetTotalAmount ¶
func (m *AlipayOrderRollbackMutation) ResetTotalAmount()
ResetTotalAmount resets all changes to the "total_amount" field.
func (*AlipayOrderRollbackMutation) ResetTradeNo ¶
func (m *AlipayOrderRollbackMutation) ResetTradeNo()
ResetTradeNo resets all changes to the "trade_no" field.
func (*AlipayOrderRollbackMutation) ResetTradeStatus ¶
func (m *AlipayOrderRollbackMutation) ResetTradeStatus()
ResetTradeStatus resets all changes to the "trade_status" field.
func (*AlipayOrderRollbackMutation) ResetUpdateTime ¶
func (m *AlipayOrderRollbackMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*AlipayOrderRollbackMutation) ResetVersion ¶
func (m *AlipayOrderRollbackMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*AlipayOrderRollbackMutation) ResetVoucherDetailList ¶
func (m *AlipayOrderRollbackMutation) ResetVoucherDetailList()
ResetVoucherDetailList resets all changes to the "voucher_detail_list" field.
func (*AlipayOrderRollbackMutation) SellerID ¶
func (m *AlipayOrderRollbackMutation) SellerID() (r string, exists bool)
SellerID returns the value of the "seller_id" field in the mutation.
func (*AlipayOrderRollbackMutation) SetAppID ¶
func (m *AlipayOrderRollbackMutation) SetAppID(s string)
SetAppID sets the "app_id" field.
func (*AlipayOrderRollbackMutation) SetBody ¶
func (m *AlipayOrderRollbackMutation) SetBody(s string)
SetBody sets the "body" field.
func (*AlipayOrderRollbackMutation) SetBuyerID ¶
func (m *AlipayOrderRollbackMutation) SetBuyerID(s string)
SetBuyerID sets the "buyer_id" field.
func (*AlipayOrderRollbackMutation) SetBuyerPayAmount ¶
func (m *AlipayOrderRollbackMutation) SetBuyerPayAmount(s string)
SetBuyerPayAmount sets the "buyer_pay_amount" field.
func (*AlipayOrderRollbackMutation) SetCharset ¶
func (m *AlipayOrderRollbackMutation) SetCharset(s string)
SetCharset sets the "charset" field.
func (*AlipayOrderRollbackMutation) SetCreateTime ¶
func (m *AlipayOrderRollbackMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*AlipayOrderRollbackMutation) SetField ¶
func (m *AlipayOrderRollbackMutation) 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 (*AlipayOrderRollbackMutation) SetFundBillList ¶
func (m *AlipayOrderRollbackMutation) SetFundBillList(s string)
SetFundBillList sets the "fund_bill_list" field.
func (*AlipayOrderRollbackMutation) SetGmtClose ¶
func (m *AlipayOrderRollbackMutation) SetGmtClose(s string)
SetGmtClose sets the "gmt_close" field.
func (*AlipayOrderRollbackMutation) SetGmtCreate ¶
func (m *AlipayOrderRollbackMutation) SetGmtCreate(s string)
SetGmtCreate sets the "gmt_create" field.
func (*AlipayOrderRollbackMutation) SetGmtPayment ¶
func (m *AlipayOrderRollbackMutation) SetGmtPayment(s string)
SetGmtPayment sets the "gmt_payment" field.
func (*AlipayOrderRollbackMutation) SetInvoiceAmount ¶
func (m *AlipayOrderRollbackMutation) SetInvoiceAmount(s string)
SetInvoiceAmount sets the "invoice_amount" field.
func (*AlipayOrderRollbackMutation) SetNotifyID ¶
func (m *AlipayOrderRollbackMutation) SetNotifyID(s string)
SetNotifyID sets the "notify_id" field.
func (*AlipayOrderRollbackMutation) SetNotifyTime ¶
func (m *AlipayOrderRollbackMutation) SetNotifyTime(s string)
SetNotifyTime sets the "notify_time" field.
func (*AlipayOrderRollbackMutation) SetNotifyType ¶
func (m *AlipayOrderRollbackMutation) SetNotifyType(s string)
SetNotifyType sets the "notify_type" field.
func (*AlipayOrderRollbackMutation) SetOp ¶
func (m *AlipayOrderRollbackMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AlipayOrderRollbackMutation) SetOutBizNo ¶
func (m *AlipayOrderRollbackMutation) SetOutBizNo(s string)
SetOutBizNo sets the "out_biz_no" field.
func (*AlipayOrderRollbackMutation) SetOutTradeNo ¶
func (m *AlipayOrderRollbackMutation) SetOutTradeNo(s string)
SetOutTradeNo sets the "out_trade_no" field.
func (*AlipayOrderRollbackMutation) SetPassbackParams ¶
func (m *AlipayOrderRollbackMutation) SetPassbackParams(s string)
SetPassbackParams sets the "passback_params" field.
func (*AlipayOrderRollbackMutation) SetPointAmount ¶
func (m *AlipayOrderRollbackMutation) SetPointAmount(s string)
SetPointAmount sets the "point_amount" field.
func (*AlipayOrderRollbackMutation) SetReceiptAmount ¶
func (m *AlipayOrderRollbackMutation) SetReceiptAmount(s string)
SetReceiptAmount sets the "receipt_amount" field.
func (*AlipayOrderRollbackMutation) SetRefundFee ¶
func (m *AlipayOrderRollbackMutation) SetRefundFee(s string)
SetRefundFee sets the "refund_fee" field.
func (*AlipayOrderRollbackMutation) SetSellerID ¶
func (m *AlipayOrderRollbackMutation) SetSellerID(s string)
SetSellerID sets the "seller_id" field.
func (*AlipayOrderRollbackMutation) SetSign ¶
func (m *AlipayOrderRollbackMutation) SetSign(s string)
SetSign sets the "sign" field.
func (*AlipayOrderRollbackMutation) SetSignType ¶
func (m *AlipayOrderRollbackMutation) SetSignType(s string)
SetSignType sets the "sign_type" field.
func (*AlipayOrderRollbackMutation) SetSubject ¶
func (m *AlipayOrderRollbackMutation) SetSubject(s string)
SetSubject sets the "subject" field.
func (*AlipayOrderRollbackMutation) SetTotalAmount ¶
func (m *AlipayOrderRollbackMutation) SetTotalAmount(s string)
SetTotalAmount sets the "total_amount" field.
func (*AlipayOrderRollbackMutation) SetTradeNo ¶
func (m *AlipayOrderRollbackMutation) SetTradeNo(s string)
SetTradeNo sets the "trade_no" field.
func (*AlipayOrderRollbackMutation) SetTradeStatus ¶
func (m *AlipayOrderRollbackMutation) SetTradeStatus(s string)
SetTradeStatus sets the "trade_status" field.
func (*AlipayOrderRollbackMutation) SetUpdateTime ¶
func (m *AlipayOrderRollbackMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*AlipayOrderRollbackMutation) SetVersion ¶
func (m *AlipayOrderRollbackMutation) SetVersion(s string)
SetVersion sets the "version" field.
func (*AlipayOrderRollbackMutation) SetVoucherDetailList ¶
func (m *AlipayOrderRollbackMutation) SetVoucherDetailList(s string)
SetVoucherDetailList sets the "voucher_detail_list" field.
func (*AlipayOrderRollbackMutation) Sign ¶
func (m *AlipayOrderRollbackMutation) Sign() (r string, exists bool)
Sign returns the value of the "sign" field in the mutation.
func (*AlipayOrderRollbackMutation) SignType ¶
func (m *AlipayOrderRollbackMutation) SignType() (r string, exists bool)
SignType returns the value of the "sign_type" field in the mutation.
func (*AlipayOrderRollbackMutation) Subject ¶
func (m *AlipayOrderRollbackMutation) Subject() (r string, exists bool)
Subject returns the value of the "subject" field in the mutation.
func (*AlipayOrderRollbackMutation) TotalAmount ¶
func (m *AlipayOrderRollbackMutation) TotalAmount() (r string, exists bool)
TotalAmount returns the value of the "total_amount" field in the mutation.
func (*AlipayOrderRollbackMutation) TradeNo ¶
func (m *AlipayOrderRollbackMutation) TradeNo() (r string, exists bool)
TradeNo returns the value of the "trade_no" field in the mutation.
func (*AlipayOrderRollbackMutation) TradeStatus ¶
func (m *AlipayOrderRollbackMutation) TradeStatus() (r string, exists bool)
TradeStatus returns the value of the "trade_status" field in the mutation.
func (AlipayOrderRollbackMutation) Tx ¶
func (m AlipayOrderRollbackMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AlipayOrderRollbackMutation) Type ¶
func (m *AlipayOrderRollbackMutation) Type() string
Type returns the node type of this mutation (AlipayOrderRollback).
func (*AlipayOrderRollbackMutation) UpdateTime ¶
func (m *AlipayOrderRollbackMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*AlipayOrderRollbackMutation) Version ¶
func (m *AlipayOrderRollbackMutation) Version() (r string, exists bool)
Version returns the value of the "version" field in the mutation.
func (*AlipayOrderRollbackMutation) VoucherDetailList ¶
func (m *AlipayOrderRollbackMutation) VoucherDetailList() (r string, exists bool)
VoucherDetailList returns the value of the "voucher_detail_list" field in the mutation.
func (*AlipayOrderRollbackMutation) Where ¶
func (m *AlipayOrderRollbackMutation) Where(ps ...predicate.AlipayOrderRollback)
Where appends a list predicates to the AlipayOrderRollbackMutation builder.
func (*AlipayOrderRollbackMutation) WhereP ¶
func (m *AlipayOrderRollbackMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AlipayOrderRollbackMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AlipayOrderRollbackQuery ¶
type AlipayOrderRollbackQuery struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackQuery is the builder for querying AlipayOrderRollback entities.
func (*AlipayOrderRollbackQuery) Aggregate ¶
func (_q *AlipayOrderRollbackQuery) Aggregate(fns ...AggregateFunc) *AlipayOrderRollbackSelect
Aggregate returns a AlipayOrderRollbackSelect configured with the given aggregations.
func (*AlipayOrderRollbackQuery) All ¶
func (_q *AlipayOrderRollbackQuery) All(ctx context.Context) ([]*AlipayOrderRollback, error)
All executes the query and returns a list of AlipayOrderRollbacks.
func (*AlipayOrderRollbackQuery) AllX ¶
func (_q *AlipayOrderRollbackQuery) AllX(ctx context.Context) []*AlipayOrderRollback
AllX is like All, but panics if an error occurs.
func (*AlipayOrderRollbackQuery) Clone ¶
func (_q *AlipayOrderRollbackQuery) Clone() *AlipayOrderRollbackQuery
Clone returns a duplicate of the AlipayOrderRollbackQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AlipayOrderRollbackQuery) Count ¶
func (_q *AlipayOrderRollbackQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AlipayOrderRollbackQuery) CountX ¶
func (_q *AlipayOrderRollbackQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AlipayOrderRollbackQuery) Exist ¶
func (_q *AlipayOrderRollbackQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AlipayOrderRollbackQuery) ExistX ¶
func (_q *AlipayOrderRollbackQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AlipayOrderRollbackQuery) First ¶
func (_q *AlipayOrderRollbackQuery) First(ctx context.Context) (*AlipayOrderRollback, error)
First returns the first AlipayOrderRollback entity from the query. Returns a *NotFoundError when no AlipayOrderRollback was found.
func (*AlipayOrderRollbackQuery) FirstID ¶
func (_q *AlipayOrderRollbackQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AlipayOrderRollback ID from the query. Returns a *NotFoundError when no AlipayOrderRollback ID was found.
func (*AlipayOrderRollbackQuery) FirstIDX ¶
func (_q *AlipayOrderRollbackQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AlipayOrderRollbackQuery) FirstX ¶
func (_q *AlipayOrderRollbackQuery) FirstX(ctx context.Context) *AlipayOrderRollback
FirstX is like First, but panics if an error occurs.
func (*AlipayOrderRollbackQuery) GroupBy ¶
func (_q *AlipayOrderRollbackQuery) GroupBy(field string, fields ...string) *AlipayOrderRollbackGroupBy
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 {
NotifyID string `json:"notify_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.AlipayOrderRollback.Query().
GroupBy(alipayorderrollback.FieldNotifyID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*AlipayOrderRollbackQuery) IDs ¶
func (_q *AlipayOrderRollbackQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of AlipayOrderRollback IDs.
func (*AlipayOrderRollbackQuery) IDsX ¶
func (_q *AlipayOrderRollbackQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AlipayOrderRollbackQuery) Limit ¶
func (_q *AlipayOrderRollbackQuery) Limit(limit int) *AlipayOrderRollbackQuery
Limit the number of records to be returned by this query.
func (*AlipayOrderRollbackQuery) Offset ¶
func (_q *AlipayOrderRollbackQuery) Offset(offset int) *AlipayOrderRollbackQuery
Offset to start from.
func (*AlipayOrderRollbackQuery) Only ¶
func (_q *AlipayOrderRollbackQuery) Only(ctx context.Context) (*AlipayOrderRollback, error)
Only returns a single AlipayOrderRollback entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AlipayOrderRollback entity is found. Returns a *NotFoundError when no AlipayOrderRollback entities are found.
func (*AlipayOrderRollbackQuery) OnlyID ¶
func (_q *AlipayOrderRollbackQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only AlipayOrderRollback ID in the query. Returns a *NotSingularError when more than one AlipayOrderRollback ID is found. Returns a *NotFoundError when no entities are found.
func (*AlipayOrderRollbackQuery) OnlyIDX ¶
func (_q *AlipayOrderRollbackQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AlipayOrderRollbackQuery) OnlyX ¶
func (_q *AlipayOrderRollbackQuery) OnlyX(ctx context.Context) *AlipayOrderRollback
OnlyX is like Only, but panics if an error occurs.
func (*AlipayOrderRollbackQuery) Order ¶
func (_q *AlipayOrderRollbackQuery) Order(o ...alipayorderrollback.OrderOption) *AlipayOrderRollbackQuery
Order specifies how the records should be ordered.
func (*AlipayOrderRollbackQuery) Select ¶
func (_q *AlipayOrderRollbackQuery) Select(fields ...string) *AlipayOrderRollbackSelect
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 {
NotifyID string `json:"notify_id,omitempty"`
}
client.AlipayOrderRollback.Query().
Select(alipayorderrollback.FieldNotifyID).
Scan(ctx, &v)
func (*AlipayOrderRollbackQuery) Unique ¶
func (_q *AlipayOrderRollbackQuery) Unique(unique bool) *AlipayOrderRollbackQuery
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 (*AlipayOrderRollbackQuery) Where ¶
func (_q *AlipayOrderRollbackQuery) Where(ps ...predicate.AlipayOrderRollback) *AlipayOrderRollbackQuery
Where adds a new predicate for the AlipayOrderRollbackQuery builder.
type AlipayOrderRollbackSelect ¶
type AlipayOrderRollbackSelect struct {
*AlipayOrderRollbackQuery
// contains filtered or unexported fields
}
AlipayOrderRollbackSelect is the builder for selecting fields of AlipayOrderRollback entities.
func (*AlipayOrderRollbackSelect) Aggregate ¶
func (_s *AlipayOrderRollbackSelect) Aggregate(fns ...AggregateFunc) *AlipayOrderRollbackSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AlipayOrderRollbackSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*AlipayOrderRollbackSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*AlipayOrderRollbackSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AlipayOrderRollbackSelect) Scan ¶
func (_s *AlipayOrderRollbackSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AlipayOrderRollbackSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AlipayOrderRollbackUpdate ¶
type AlipayOrderRollbackUpdate struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackUpdate is the builder for updating AlipayOrderRollback entities.
func (*AlipayOrderRollbackUpdate) Exec ¶
func (_u *AlipayOrderRollbackUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AlipayOrderRollbackUpdate) ExecX ¶
func (_u *AlipayOrderRollbackUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlipayOrderRollbackUpdate) Mutation ¶
func (_u *AlipayOrderRollbackUpdate) Mutation() *AlipayOrderRollbackMutation
Mutation returns the AlipayOrderRollbackMutation object of the builder.
func (*AlipayOrderRollbackUpdate) Save ¶
func (_u *AlipayOrderRollbackUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AlipayOrderRollbackUpdate) SaveX ¶
func (_u *AlipayOrderRollbackUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AlipayOrderRollbackUpdate) SetAppID ¶
func (_u *AlipayOrderRollbackUpdate) SetAppID(v string) *AlipayOrderRollbackUpdate
SetAppID sets the "app_id" field.
func (*AlipayOrderRollbackUpdate) SetBody ¶
func (_u *AlipayOrderRollbackUpdate) SetBody(v string) *AlipayOrderRollbackUpdate
SetBody sets the "body" field.
func (*AlipayOrderRollbackUpdate) SetBuyerID ¶
func (_u *AlipayOrderRollbackUpdate) SetBuyerID(v string) *AlipayOrderRollbackUpdate
SetBuyerID sets the "buyer_id" field.
func (*AlipayOrderRollbackUpdate) SetBuyerPayAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetBuyerPayAmount(v string) *AlipayOrderRollbackUpdate
SetBuyerPayAmount sets the "buyer_pay_amount" field.
func (*AlipayOrderRollbackUpdate) SetCharset ¶
func (_u *AlipayOrderRollbackUpdate) SetCharset(v string) *AlipayOrderRollbackUpdate
SetCharset sets the "charset" field.
func (*AlipayOrderRollbackUpdate) SetCreateTime ¶
func (_u *AlipayOrderRollbackUpdate) SetCreateTime(v time.Time) *AlipayOrderRollbackUpdate
SetCreateTime sets the "create_time" field.
func (*AlipayOrderRollbackUpdate) SetFundBillList ¶
func (_u *AlipayOrderRollbackUpdate) SetFundBillList(v string) *AlipayOrderRollbackUpdate
SetFundBillList sets the "fund_bill_list" field.
func (*AlipayOrderRollbackUpdate) SetGmtClose ¶
func (_u *AlipayOrderRollbackUpdate) SetGmtClose(v string) *AlipayOrderRollbackUpdate
SetGmtClose sets the "gmt_close" field.
func (*AlipayOrderRollbackUpdate) SetGmtCreate ¶
func (_u *AlipayOrderRollbackUpdate) SetGmtCreate(v string) *AlipayOrderRollbackUpdate
SetGmtCreate sets the "gmt_create" field.
func (*AlipayOrderRollbackUpdate) SetGmtPayment ¶
func (_u *AlipayOrderRollbackUpdate) SetGmtPayment(v string) *AlipayOrderRollbackUpdate
SetGmtPayment sets the "gmt_payment" field.
func (*AlipayOrderRollbackUpdate) SetInvoiceAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetInvoiceAmount(v string) *AlipayOrderRollbackUpdate
SetInvoiceAmount sets the "invoice_amount" field.
func (*AlipayOrderRollbackUpdate) SetNillableAppID ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableAppID(v *string) *AlipayOrderRollbackUpdate
SetNillableAppID sets the "app_id" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableBody ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableBody(v *string) *AlipayOrderRollbackUpdate
SetNillableBody sets the "body" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableBuyerID ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableBuyerID(v *string) *AlipayOrderRollbackUpdate
SetNillableBuyerID sets the "buyer_id" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableBuyerPayAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableBuyerPayAmount(v *string) *AlipayOrderRollbackUpdate
SetNillableBuyerPayAmount sets the "buyer_pay_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableCharset ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableCharset(v *string) *AlipayOrderRollbackUpdate
SetNillableCharset sets the "charset" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableCreateTime ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableCreateTime(v *time.Time) *AlipayOrderRollbackUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableFundBillList ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableFundBillList(v *string) *AlipayOrderRollbackUpdate
SetNillableFundBillList sets the "fund_bill_list" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableGmtClose ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableGmtClose(v *string) *AlipayOrderRollbackUpdate
SetNillableGmtClose sets the "gmt_close" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableGmtCreate ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableGmtCreate(v *string) *AlipayOrderRollbackUpdate
SetNillableGmtCreate sets the "gmt_create" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableGmtPayment ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableGmtPayment(v *string) *AlipayOrderRollbackUpdate
SetNillableGmtPayment sets the "gmt_payment" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableInvoiceAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableInvoiceAmount(v *string) *AlipayOrderRollbackUpdate
SetNillableInvoiceAmount sets the "invoice_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableNotifyID ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableNotifyID(v *string) *AlipayOrderRollbackUpdate
SetNillableNotifyID sets the "notify_id" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableNotifyTime ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableNotifyTime(v *string) *AlipayOrderRollbackUpdate
SetNillableNotifyTime sets the "notify_time" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableNotifyType ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableNotifyType(v *string) *AlipayOrderRollbackUpdate
SetNillableNotifyType sets the "notify_type" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableOutBizNo ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableOutBizNo(v *string) *AlipayOrderRollbackUpdate
SetNillableOutBizNo sets the "out_biz_no" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableOutTradeNo ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableOutTradeNo(v *string) *AlipayOrderRollbackUpdate
SetNillableOutTradeNo sets the "out_trade_no" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillablePassbackParams ¶
func (_u *AlipayOrderRollbackUpdate) SetNillablePassbackParams(v *string) *AlipayOrderRollbackUpdate
SetNillablePassbackParams sets the "passback_params" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillablePointAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetNillablePointAmount(v *string) *AlipayOrderRollbackUpdate
SetNillablePointAmount sets the "point_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableReceiptAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableReceiptAmount(v *string) *AlipayOrderRollbackUpdate
SetNillableReceiptAmount sets the "receipt_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableRefundFee ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableRefundFee(v *string) *AlipayOrderRollbackUpdate
SetNillableRefundFee sets the "refund_fee" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableSellerID ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableSellerID(v *string) *AlipayOrderRollbackUpdate
SetNillableSellerID sets the "seller_id" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableSign ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableSign(v *string) *AlipayOrderRollbackUpdate
SetNillableSign sets the "sign" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableSignType ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableSignType(v *string) *AlipayOrderRollbackUpdate
SetNillableSignType sets the "sign_type" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableSubject ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableSubject(v *string) *AlipayOrderRollbackUpdate
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableTotalAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableTotalAmount(v *string) *AlipayOrderRollbackUpdate
SetNillableTotalAmount sets the "total_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableTradeNo ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableTradeNo(v *string) *AlipayOrderRollbackUpdate
SetNillableTradeNo sets the "trade_no" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableTradeStatus ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableTradeStatus(v *string) *AlipayOrderRollbackUpdate
SetNillableTradeStatus sets the "trade_status" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableUpdateTime ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableUpdateTime(v *time.Time) *AlipayOrderRollbackUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableVersion ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableVersion(v *string) *AlipayOrderRollbackUpdate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNillableVoucherDetailList ¶
func (_u *AlipayOrderRollbackUpdate) SetNillableVoucherDetailList(v *string) *AlipayOrderRollbackUpdate
SetNillableVoucherDetailList sets the "voucher_detail_list" field if the given value is not nil.
func (*AlipayOrderRollbackUpdate) SetNotifyID ¶
func (_u *AlipayOrderRollbackUpdate) SetNotifyID(v string) *AlipayOrderRollbackUpdate
SetNotifyID sets the "notify_id" field.
func (*AlipayOrderRollbackUpdate) SetNotifyTime ¶
func (_u *AlipayOrderRollbackUpdate) SetNotifyTime(v string) *AlipayOrderRollbackUpdate
SetNotifyTime sets the "notify_time" field.
func (*AlipayOrderRollbackUpdate) SetNotifyType ¶
func (_u *AlipayOrderRollbackUpdate) SetNotifyType(v string) *AlipayOrderRollbackUpdate
SetNotifyType sets the "notify_type" field.
func (*AlipayOrderRollbackUpdate) SetOutBizNo ¶
func (_u *AlipayOrderRollbackUpdate) SetOutBizNo(v string) *AlipayOrderRollbackUpdate
SetOutBizNo sets the "out_biz_no" field.
func (*AlipayOrderRollbackUpdate) SetOutTradeNo ¶
func (_u *AlipayOrderRollbackUpdate) SetOutTradeNo(v string) *AlipayOrderRollbackUpdate
SetOutTradeNo sets the "out_trade_no" field.
func (*AlipayOrderRollbackUpdate) SetPassbackParams ¶
func (_u *AlipayOrderRollbackUpdate) SetPassbackParams(v string) *AlipayOrderRollbackUpdate
SetPassbackParams sets the "passback_params" field.
func (*AlipayOrderRollbackUpdate) SetPointAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetPointAmount(v string) *AlipayOrderRollbackUpdate
SetPointAmount sets the "point_amount" field.
func (*AlipayOrderRollbackUpdate) SetReceiptAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetReceiptAmount(v string) *AlipayOrderRollbackUpdate
SetReceiptAmount sets the "receipt_amount" field.
func (*AlipayOrderRollbackUpdate) SetRefundFee ¶
func (_u *AlipayOrderRollbackUpdate) SetRefundFee(v string) *AlipayOrderRollbackUpdate
SetRefundFee sets the "refund_fee" field.
func (*AlipayOrderRollbackUpdate) SetSellerID ¶
func (_u *AlipayOrderRollbackUpdate) SetSellerID(v string) *AlipayOrderRollbackUpdate
SetSellerID sets the "seller_id" field.
func (*AlipayOrderRollbackUpdate) SetSign ¶
func (_u *AlipayOrderRollbackUpdate) SetSign(v string) *AlipayOrderRollbackUpdate
SetSign sets the "sign" field.
func (*AlipayOrderRollbackUpdate) SetSignType ¶
func (_u *AlipayOrderRollbackUpdate) SetSignType(v string) *AlipayOrderRollbackUpdate
SetSignType sets the "sign_type" field.
func (*AlipayOrderRollbackUpdate) SetSubject ¶
func (_u *AlipayOrderRollbackUpdate) SetSubject(v string) *AlipayOrderRollbackUpdate
SetSubject sets the "subject" field.
func (*AlipayOrderRollbackUpdate) SetTotalAmount ¶
func (_u *AlipayOrderRollbackUpdate) SetTotalAmount(v string) *AlipayOrderRollbackUpdate
SetTotalAmount sets the "total_amount" field.
func (*AlipayOrderRollbackUpdate) SetTradeNo ¶
func (_u *AlipayOrderRollbackUpdate) SetTradeNo(v string) *AlipayOrderRollbackUpdate
SetTradeNo sets the "trade_no" field.
func (*AlipayOrderRollbackUpdate) SetTradeStatus ¶
func (_u *AlipayOrderRollbackUpdate) SetTradeStatus(v string) *AlipayOrderRollbackUpdate
SetTradeStatus sets the "trade_status" field.
func (*AlipayOrderRollbackUpdate) SetUpdateTime ¶
func (_u *AlipayOrderRollbackUpdate) SetUpdateTime(v time.Time) *AlipayOrderRollbackUpdate
SetUpdateTime sets the "update_time" field.
func (*AlipayOrderRollbackUpdate) SetVersion ¶
func (_u *AlipayOrderRollbackUpdate) SetVersion(v string) *AlipayOrderRollbackUpdate
SetVersion sets the "version" field.
func (*AlipayOrderRollbackUpdate) SetVoucherDetailList ¶
func (_u *AlipayOrderRollbackUpdate) SetVoucherDetailList(v string) *AlipayOrderRollbackUpdate
SetVoucherDetailList sets the "voucher_detail_list" field.
func (*AlipayOrderRollbackUpdate) Where ¶
func (_u *AlipayOrderRollbackUpdate) Where(ps ...predicate.AlipayOrderRollback) *AlipayOrderRollbackUpdate
Where appends a list predicates to the AlipayOrderRollbackUpdate builder.
type AlipayOrderRollbackUpdateOne ¶
type AlipayOrderRollbackUpdateOne struct {
// contains filtered or unexported fields
}
AlipayOrderRollbackUpdateOne is the builder for updating a single AlipayOrderRollback entity.
func (*AlipayOrderRollbackUpdateOne) Exec ¶
func (_u *AlipayOrderRollbackUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AlipayOrderRollbackUpdateOne) ExecX ¶
func (_u *AlipayOrderRollbackUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlipayOrderRollbackUpdateOne) Mutation ¶
func (_u *AlipayOrderRollbackUpdateOne) Mutation() *AlipayOrderRollbackMutation
Mutation returns the AlipayOrderRollbackMutation object of the builder.
func (*AlipayOrderRollbackUpdateOne) Save ¶
func (_u *AlipayOrderRollbackUpdateOne) Save(ctx context.Context) (*AlipayOrderRollback, error)
Save executes the query and returns the updated AlipayOrderRollback entity.
func (*AlipayOrderRollbackUpdateOne) SaveX ¶
func (_u *AlipayOrderRollbackUpdateOne) SaveX(ctx context.Context) *AlipayOrderRollback
SaveX is like Save, but panics if an error occurs.
func (*AlipayOrderRollbackUpdateOne) Select ¶
func (_u *AlipayOrderRollbackUpdateOne) Select(field string, fields ...string) *AlipayOrderRollbackUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AlipayOrderRollbackUpdateOne) SetAppID ¶
func (_u *AlipayOrderRollbackUpdateOne) SetAppID(v string) *AlipayOrderRollbackUpdateOne
SetAppID sets the "app_id" field.
func (*AlipayOrderRollbackUpdateOne) SetBody ¶
func (_u *AlipayOrderRollbackUpdateOne) SetBody(v string) *AlipayOrderRollbackUpdateOne
SetBody sets the "body" field.
func (*AlipayOrderRollbackUpdateOne) SetBuyerID ¶
func (_u *AlipayOrderRollbackUpdateOne) SetBuyerID(v string) *AlipayOrderRollbackUpdateOne
SetBuyerID sets the "buyer_id" field.
func (*AlipayOrderRollbackUpdateOne) SetBuyerPayAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetBuyerPayAmount(v string) *AlipayOrderRollbackUpdateOne
SetBuyerPayAmount sets the "buyer_pay_amount" field.
func (*AlipayOrderRollbackUpdateOne) SetCharset ¶
func (_u *AlipayOrderRollbackUpdateOne) SetCharset(v string) *AlipayOrderRollbackUpdateOne
SetCharset sets the "charset" field.
func (*AlipayOrderRollbackUpdateOne) SetCreateTime ¶
func (_u *AlipayOrderRollbackUpdateOne) SetCreateTime(v time.Time) *AlipayOrderRollbackUpdateOne
SetCreateTime sets the "create_time" field.
func (*AlipayOrderRollbackUpdateOne) SetFundBillList ¶
func (_u *AlipayOrderRollbackUpdateOne) SetFundBillList(v string) *AlipayOrderRollbackUpdateOne
SetFundBillList sets the "fund_bill_list" field.
func (*AlipayOrderRollbackUpdateOne) SetGmtClose ¶
func (_u *AlipayOrderRollbackUpdateOne) SetGmtClose(v string) *AlipayOrderRollbackUpdateOne
SetGmtClose sets the "gmt_close" field.
func (*AlipayOrderRollbackUpdateOne) SetGmtCreate ¶
func (_u *AlipayOrderRollbackUpdateOne) SetGmtCreate(v string) *AlipayOrderRollbackUpdateOne
SetGmtCreate sets the "gmt_create" field.
func (*AlipayOrderRollbackUpdateOne) SetGmtPayment ¶
func (_u *AlipayOrderRollbackUpdateOne) SetGmtPayment(v string) *AlipayOrderRollbackUpdateOne
SetGmtPayment sets the "gmt_payment" field.
func (*AlipayOrderRollbackUpdateOne) SetInvoiceAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetInvoiceAmount(v string) *AlipayOrderRollbackUpdateOne
SetInvoiceAmount sets the "invoice_amount" field.
func (*AlipayOrderRollbackUpdateOne) SetNillableAppID ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableAppID(v *string) *AlipayOrderRollbackUpdateOne
SetNillableAppID sets the "app_id" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableBody ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableBody(v *string) *AlipayOrderRollbackUpdateOne
SetNillableBody sets the "body" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableBuyerID ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableBuyerID(v *string) *AlipayOrderRollbackUpdateOne
SetNillableBuyerID sets the "buyer_id" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableBuyerPayAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableBuyerPayAmount(v *string) *AlipayOrderRollbackUpdateOne
SetNillableBuyerPayAmount sets the "buyer_pay_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableCharset ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableCharset(v *string) *AlipayOrderRollbackUpdateOne
SetNillableCharset sets the "charset" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableCreateTime ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableCreateTime(v *time.Time) *AlipayOrderRollbackUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableFundBillList ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableFundBillList(v *string) *AlipayOrderRollbackUpdateOne
SetNillableFundBillList sets the "fund_bill_list" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableGmtClose ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableGmtClose(v *string) *AlipayOrderRollbackUpdateOne
SetNillableGmtClose sets the "gmt_close" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableGmtCreate ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableGmtCreate(v *string) *AlipayOrderRollbackUpdateOne
SetNillableGmtCreate sets the "gmt_create" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableGmtPayment ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableGmtPayment(v *string) *AlipayOrderRollbackUpdateOne
SetNillableGmtPayment sets the "gmt_payment" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableInvoiceAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableInvoiceAmount(v *string) *AlipayOrderRollbackUpdateOne
SetNillableInvoiceAmount sets the "invoice_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableNotifyID ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableNotifyID(v *string) *AlipayOrderRollbackUpdateOne
SetNillableNotifyID sets the "notify_id" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableNotifyTime ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableNotifyTime(v *string) *AlipayOrderRollbackUpdateOne
SetNillableNotifyTime sets the "notify_time" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableNotifyType ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableNotifyType(v *string) *AlipayOrderRollbackUpdateOne
SetNillableNotifyType sets the "notify_type" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableOutBizNo ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableOutBizNo(v *string) *AlipayOrderRollbackUpdateOne
SetNillableOutBizNo sets the "out_biz_no" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableOutTradeNo ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableOutTradeNo(v *string) *AlipayOrderRollbackUpdateOne
SetNillableOutTradeNo sets the "out_trade_no" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillablePassbackParams ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillablePassbackParams(v *string) *AlipayOrderRollbackUpdateOne
SetNillablePassbackParams sets the "passback_params" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillablePointAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillablePointAmount(v *string) *AlipayOrderRollbackUpdateOne
SetNillablePointAmount sets the "point_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableReceiptAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableReceiptAmount(v *string) *AlipayOrderRollbackUpdateOne
SetNillableReceiptAmount sets the "receipt_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableRefundFee ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableRefundFee(v *string) *AlipayOrderRollbackUpdateOne
SetNillableRefundFee sets the "refund_fee" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableSellerID ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableSellerID(v *string) *AlipayOrderRollbackUpdateOne
SetNillableSellerID sets the "seller_id" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableSign ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableSign(v *string) *AlipayOrderRollbackUpdateOne
SetNillableSign sets the "sign" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableSignType ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableSignType(v *string) *AlipayOrderRollbackUpdateOne
SetNillableSignType sets the "sign_type" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableSubject ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableSubject(v *string) *AlipayOrderRollbackUpdateOne
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableTotalAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableTotalAmount(v *string) *AlipayOrderRollbackUpdateOne
SetNillableTotalAmount sets the "total_amount" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableTradeNo ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableTradeNo(v *string) *AlipayOrderRollbackUpdateOne
SetNillableTradeNo sets the "trade_no" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableTradeStatus ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableTradeStatus(v *string) *AlipayOrderRollbackUpdateOne
SetNillableTradeStatus sets the "trade_status" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableUpdateTime ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableUpdateTime(v *time.Time) *AlipayOrderRollbackUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableVersion ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableVersion(v *string) *AlipayOrderRollbackUpdateOne
SetNillableVersion sets the "version" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNillableVoucherDetailList ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNillableVoucherDetailList(v *string) *AlipayOrderRollbackUpdateOne
SetNillableVoucherDetailList sets the "voucher_detail_list" field if the given value is not nil.
func (*AlipayOrderRollbackUpdateOne) SetNotifyID ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNotifyID(v string) *AlipayOrderRollbackUpdateOne
SetNotifyID sets the "notify_id" field.
func (*AlipayOrderRollbackUpdateOne) SetNotifyTime ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNotifyTime(v string) *AlipayOrderRollbackUpdateOne
SetNotifyTime sets the "notify_time" field.
func (*AlipayOrderRollbackUpdateOne) SetNotifyType ¶
func (_u *AlipayOrderRollbackUpdateOne) SetNotifyType(v string) *AlipayOrderRollbackUpdateOne
SetNotifyType sets the "notify_type" field.
func (*AlipayOrderRollbackUpdateOne) SetOutBizNo ¶
func (_u *AlipayOrderRollbackUpdateOne) SetOutBizNo(v string) *AlipayOrderRollbackUpdateOne
SetOutBizNo sets the "out_biz_no" field.
func (*AlipayOrderRollbackUpdateOne) SetOutTradeNo ¶
func (_u *AlipayOrderRollbackUpdateOne) SetOutTradeNo(v string) *AlipayOrderRollbackUpdateOne
SetOutTradeNo sets the "out_trade_no" field.
func (*AlipayOrderRollbackUpdateOne) SetPassbackParams ¶
func (_u *AlipayOrderRollbackUpdateOne) SetPassbackParams(v string) *AlipayOrderRollbackUpdateOne
SetPassbackParams sets the "passback_params" field.
func (*AlipayOrderRollbackUpdateOne) SetPointAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetPointAmount(v string) *AlipayOrderRollbackUpdateOne
SetPointAmount sets the "point_amount" field.
func (*AlipayOrderRollbackUpdateOne) SetReceiptAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetReceiptAmount(v string) *AlipayOrderRollbackUpdateOne
SetReceiptAmount sets the "receipt_amount" field.
func (*AlipayOrderRollbackUpdateOne) SetRefundFee ¶
func (_u *AlipayOrderRollbackUpdateOne) SetRefundFee(v string) *AlipayOrderRollbackUpdateOne
SetRefundFee sets the "refund_fee" field.
func (*AlipayOrderRollbackUpdateOne) SetSellerID ¶
func (_u *AlipayOrderRollbackUpdateOne) SetSellerID(v string) *AlipayOrderRollbackUpdateOne
SetSellerID sets the "seller_id" field.
func (*AlipayOrderRollbackUpdateOne) SetSign ¶
func (_u *AlipayOrderRollbackUpdateOne) SetSign(v string) *AlipayOrderRollbackUpdateOne
SetSign sets the "sign" field.
func (*AlipayOrderRollbackUpdateOne) SetSignType ¶
func (_u *AlipayOrderRollbackUpdateOne) SetSignType(v string) *AlipayOrderRollbackUpdateOne
SetSignType sets the "sign_type" field.
func (*AlipayOrderRollbackUpdateOne) SetSubject ¶
func (_u *AlipayOrderRollbackUpdateOne) SetSubject(v string) *AlipayOrderRollbackUpdateOne
SetSubject sets the "subject" field.
func (*AlipayOrderRollbackUpdateOne) SetTotalAmount ¶
func (_u *AlipayOrderRollbackUpdateOne) SetTotalAmount(v string) *AlipayOrderRollbackUpdateOne
SetTotalAmount sets the "total_amount" field.
func (*AlipayOrderRollbackUpdateOne) SetTradeNo ¶
func (_u *AlipayOrderRollbackUpdateOne) SetTradeNo(v string) *AlipayOrderRollbackUpdateOne
SetTradeNo sets the "trade_no" field.
func (*AlipayOrderRollbackUpdateOne) SetTradeStatus ¶
func (_u *AlipayOrderRollbackUpdateOne) SetTradeStatus(v string) *AlipayOrderRollbackUpdateOne
SetTradeStatus sets the "trade_status" field.
func (*AlipayOrderRollbackUpdateOne) SetUpdateTime ¶
func (_u *AlipayOrderRollbackUpdateOne) SetUpdateTime(v time.Time) *AlipayOrderRollbackUpdateOne
SetUpdateTime sets the "update_time" field.
func (*AlipayOrderRollbackUpdateOne) SetVersion ¶
func (_u *AlipayOrderRollbackUpdateOne) SetVersion(v string) *AlipayOrderRollbackUpdateOne
SetVersion sets the "version" field.
func (*AlipayOrderRollbackUpdateOne) SetVoucherDetailList ¶
func (_u *AlipayOrderRollbackUpdateOne) SetVoucherDetailList(v string) *AlipayOrderRollbackUpdateOne
SetVoucherDetailList sets the "voucher_detail_list" field.
func (*AlipayOrderRollbackUpdateOne) Where ¶
func (_u *AlipayOrderRollbackUpdateOne) Where(ps ...predicate.AlipayOrderRollback) *AlipayOrderRollbackUpdateOne
Where appends a list predicates to the AlipayOrderRollbackUpdate builder.
type AlipayOrderRollbacks ¶
type AlipayOrderRollbacks []*AlipayOrderRollback
AlipayOrderRollbacks is a parsable slice of AlipayOrderRollback.
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
// AlipayOrderRollback is the client for interacting with the AlipayOrderRollback builders.
AlipayOrderRollback *AlipayOrderRollbackClient
// 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
// ComputeSpecPrice is the client for interacting with the ComputeSpecPrice builders.
ComputeSpecPrice *ComputeSpecPriceClient
// Cycle is the client for interacting with the Cycle builders.
Cycle *CycleClient
// CycleOrder is the client for interacting with the CycleOrder builders.
CycleOrder *CycleOrderClient
// CycleRecharge is the client for interacting with the CycleRecharge builders.
CycleRecharge *CycleRechargeClient
// CycleRedeemCode is the client for interacting with the CycleRedeemCode builders.
CycleRedeemCode *CycleRedeemCodeClient
// CycleRenewal is the client for interacting with the CycleRenewal builders.
CycleRenewal *CycleRenewalClient
// CycleTransaction is the client for interacting with the CycleTransaction builders.
CycleTransaction *CycleTransactionClient
// DomainBinding is the client for interacting with the DomainBinding builders.
DomainBinding *DomainBindingClient
// Employee is the client for interacting with the Employee builders.
Employee *EmployeeClient
// Gateway is the client for interacting with the Gateway builders.
Gateway *GatewayClient
// GatewayPort is the client for interacting with the GatewayPort builders.
GatewayPort *GatewayPortClient
// NetworkMapping is the client for interacting with the NetworkMapping builders.
NetworkMapping *NetworkMappingClient
// S3Bucket is the client for interacting with the S3Bucket builders.
S3Bucket *S3BucketClient
// S3User is the client for interacting with the S3User builders.
S3User *S3UserClient
// Script is the client for interacting with the Script builders.
Script *ScriptClient
// ScriptExecutionRecord is the client for interacting with the ScriptExecutionRecord builders.
ScriptExecutionRecord *ScriptExecutionRecordClient
// Storage is the client for interacting with the Storage builders.
Storage *StorageClient
// StorageProvider is the client for interacting with the StorageProvider builders.
StorageProvider *StorageProviderClient
// Task is the client for interacting with the Task builders.
Task *TaskClient
// User is the client for interacting with the User builders.
User *UserClient
// UserResourceLimit is the client for interacting with the UserResourceLimit builders.
UserResourceLimit *UserResourceLimitClient
// 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"`
// 操作系统类型
OsType string `json:"os_type,omitempty"`
// 操作系统版本
OsVariant string `json:"os_variant,omitempty"`
// 镜像文件名
Filename string `json:"filename,omitempty"`
// 镜像下载地址
DownloadURL string `json:"download_url,omitempty"`
// 镜像md5
Md5 string `json:"md5,omitempty"`
// 排序
Sort uint `json:"sort,omitempty"`
// 计算机架构
Arch string `json:"arch,omitempty"`
// 初始化方式,iso/qcow2
BootType string `json:"boot_type,omitempty"`
// contains filtered or unexported fields
}
ComputeImage is the model entity for the ComputeImage schema.
func (*ComputeImage) String ¶
func (_m *ComputeImage) String() string
String implements the fmt.Stringer.
func (*ComputeImage) Unwrap ¶
func (_m *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 (_m *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(_m *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) MapCreateBulk ¶
func (c *ComputeImageClient) MapCreateBulk(slice any, setFunc func(*ComputeImageCreate, int)) *ComputeImageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*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(_m *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 (_c *ComputeImageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeImageCreate) ExecX ¶
func (_c *ComputeImageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageCreate) Mutation ¶
func (_c *ComputeImageCreate) Mutation() *ComputeImageMutation
Mutation returns the ComputeImageMutation object of the builder.
func (*ComputeImageCreate) Save ¶
func (_c *ComputeImageCreate) Save(ctx context.Context) (*ComputeImage, error)
Save creates the ComputeImage in the database.
func (*ComputeImageCreate) SaveX ¶
func (_c *ComputeImageCreate) SaveX(ctx context.Context) *ComputeImage
SaveX calls Save and panics if Save returns an error.
func (*ComputeImageCreate) SetArch ¶
func (_c *ComputeImageCreate) SetArch(v string) *ComputeImageCreate
SetArch sets the "arch" field.
func (*ComputeImageCreate) SetBootType ¶ added in v0.0.12
func (_c *ComputeImageCreate) SetBootType(v string) *ComputeImageCreate
SetBootType sets the "boot_type" field.
func (*ComputeImageCreate) SetDownloadURL ¶
func (_c *ComputeImageCreate) SetDownloadURL(v string) *ComputeImageCreate
SetDownloadURL sets the "download_url" field.
func (*ComputeImageCreate) SetFilename ¶
func (_c *ComputeImageCreate) SetFilename(v string) *ComputeImageCreate
SetFilename sets the "filename" field.
func (*ComputeImageCreate) SetID ¶
func (_c *ComputeImageCreate) SetID(v int32) *ComputeImageCreate
SetID sets the "id" field.
func (*ComputeImageCreate) SetImage ¶
func (_c *ComputeImageCreate) SetImage(v string) *ComputeImageCreate
SetImage sets the "image" field.
func (*ComputeImageCreate) SetMd5 ¶
func (_c *ComputeImageCreate) SetMd5(v string) *ComputeImageCreate
SetMd5 sets the "md5" field.
func (*ComputeImageCreate) SetName ¶
func (_c *ComputeImageCreate) SetName(v string) *ComputeImageCreate
SetName sets the "name" field.
func (*ComputeImageCreate) SetNillableBootType ¶ added in v0.0.12
func (_c *ComputeImageCreate) SetNillableBootType(v *string) *ComputeImageCreate
SetNillableBootType sets the "boot_type" field if the given value is not nil.
func (*ComputeImageCreate) SetOsType ¶
func (_c *ComputeImageCreate) SetOsType(v string) *ComputeImageCreate
SetOsType sets the "os_type" field.
func (*ComputeImageCreate) SetOsVariant ¶
func (_c *ComputeImageCreate) SetOsVariant(v string) *ComputeImageCreate
SetOsVariant sets the "os_variant" field.
func (*ComputeImageCreate) SetSort ¶
func (_c *ComputeImageCreate) SetSort(v uint) *ComputeImageCreate
SetSort sets the "sort" field.
func (*ComputeImageCreate) SetTag ¶
func (_c *ComputeImageCreate) SetTag(v 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 (_c *ComputeImageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeImageCreateBulk) ExecX ¶
func (_c *ComputeImageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageCreateBulk) Save ¶
func (_c *ComputeImageCreateBulk) Save(ctx context.Context) ([]*ComputeImage, error)
Save creates the ComputeImage entities in the database.
func (*ComputeImageCreateBulk) SaveX ¶
func (_c *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 (_d *ComputeImageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeImageDelete) ExecX ¶
func (_d *ComputeImageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageDelete) Where ¶
func (_d *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 (_d *ComputeImageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeImageDeleteOne) ExecX ¶
func (_d *ComputeImageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageDeleteOne) Where ¶
func (_d *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 (_g *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 (_g *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) AddSort ¶
func (m *ComputeImageMutation) AddSort(u int)
AddSort adds u to the "sort" 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) AddedSort ¶
func (m *ComputeImageMutation) AddedSort() (r int, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*ComputeImageMutation) Arch ¶
func (m *ComputeImageMutation) Arch() (r string, exists bool)
Arch returns the value of the "arch" field in the mutation.
func (*ComputeImageMutation) BootType ¶ added in v0.0.12
func (m *ComputeImageMutation) BootType() (r string, exists bool)
BootType returns the value of the "boot_type" field in the 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) DownloadURL ¶
func (m *ComputeImageMutation) DownloadURL() (r string, exists bool)
DownloadURL returns the value of the "download_url" field in the mutation.
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) Filename ¶
func (m *ComputeImageMutation) Filename() (r string, exists bool)
Filename returns the value of the "filename" field in the mutation.
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) Md5 ¶
func (m *ComputeImageMutation) Md5() (r string, exists bool)
Md5 returns the value of the "md5" 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) OldArch ¶
func (m *ComputeImageMutation) OldArch(ctx context.Context) (v string, err error)
OldArch returns the old "arch" 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) OldBootType ¶ added in v0.0.12
func (m *ComputeImageMutation) OldBootType(ctx context.Context) (v string, err error)
OldBootType returns the old "boot_type" 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) OldDownloadURL ¶
func (m *ComputeImageMutation) OldDownloadURL(ctx context.Context) (v string, err error)
OldDownloadURL returns the old "download_url" 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) 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) OldFilename ¶
func (m *ComputeImageMutation) OldFilename(ctx context.Context) (v string, err error)
OldFilename returns the old "filename" 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) 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) OldMd5 ¶
func (m *ComputeImageMutation) OldMd5(ctx context.Context) (v string, err error)
OldMd5 returns the old "md5" 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) OldOsType ¶
func (m *ComputeImageMutation) OldOsType(ctx context.Context) (v string, err error)
OldOsType returns the old "os_type" 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) OldOsVariant ¶
func (m *ComputeImageMutation) OldOsVariant(ctx context.Context) (v string, err error)
OldOsVariant returns the old "os_variant" 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) OldSort ¶
func (m *ComputeImageMutation) OldSort(ctx context.Context) (v uint, err error)
OldSort returns the old "sort" 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) OsType ¶
func (m *ComputeImageMutation) OsType() (r string, exists bool)
OsType returns the value of the "os_type" field in the mutation.
func (*ComputeImageMutation) OsVariant ¶
func (m *ComputeImageMutation) OsVariant() (r string, exists bool)
OsVariant returns the value of the "os_variant" 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) ResetArch ¶
func (m *ComputeImageMutation) ResetArch()
ResetArch resets all changes to the "arch" field.
func (*ComputeImageMutation) ResetBootType ¶ added in v0.0.12
func (m *ComputeImageMutation) ResetBootType()
ResetBootType resets all changes to the "boot_type" field.
func (*ComputeImageMutation) ResetDownloadURL ¶
func (m *ComputeImageMutation) ResetDownloadURL()
ResetDownloadURL resets all changes to the "download_url" field.
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) ResetFilename ¶
func (m *ComputeImageMutation) ResetFilename()
ResetFilename resets all changes to the "filename" field.
func (*ComputeImageMutation) ResetImage ¶
func (m *ComputeImageMutation) ResetImage()
ResetImage resets all changes to the "image" field.
func (*ComputeImageMutation) ResetMd5 ¶
func (m *ComputeImageMutation) ResetMd5()
ResetMd5 resets all changes to the "md5" field.
func (*ComputeImageMutation) ResetName ¶
func (m *ComputeImageMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ComputeImageMutation) ResetOsType ¶
func (m *ComputeImageMutation) ResetOsType()
ResetOsType resets all changes to the "os_type" field.
func (*ComputeImageMutation) ResetOsVariant ¶
func (m *ComputeImageMutation) ResetOsVariant()
ResetOsVariant resets all changes to the "os_variant" field.
func (*ComputeImageMutation) ResetSort ¶
func (m *ComputeImageMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*ComputeImageMutation) ResetTag ¶
func (m *ComputeImageMutation) ResetTag()
ResetTag resets all changes to the "tag" field.
func (*ComputeImageMutation) SetArch ¶
func (m *ComputeImageMutation) SetArch(s string)
SetArch sets the "arch" field.
func (*ComputeImageMutation) SetBootType ¶ added in v0.0.12
func (m *ComputeImageMutation) SetBootType(s string)
SetBootType sets the "boot_type" field.
func (*ComputeImageMutation) SetDownloadURL ¶
func (m *ComputeImageMutation) SetDownloadURL(s string)
SetDownloadURL sets the "download_url" 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) SetFilename ¶
func (m *ComputeImageMutation) SetFilename(s string)
SetFilename sets the "filename" field.
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) SetMd5 ¶
func (m *ComputeImageMutation) SetMd5(s string)
SetMd5 sets the "md5" 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) SetOsType ¶
func (m *ComputeImageMutation) SetOsType(s string)
SetOsType sets the "os_type" field.
func (*ComputeImageMutation) SetOsVariant ¶
func (m *ComputeImageMutation) SetOsVariant(s string)
SetOsVariant sets the "os_variant" field.
func (*ComputeImageMutation) SetSort ¶
func (m *ComputeImageMutation) SetSort(u uint)
SetSort sets the "sort" field.
func (*ComputeImageMutation) SetTag ¶
func (m *ComputeImageMutation) SetTag(s string)
SetTag sets the "tag" field.
func (*ComputeImageMutation) Sort ¶
func (m *ComputeImageMutation) Sort() (r uint, exists bool)
Sort returns the value of the "sort" field in the mutation.
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 (_q *ComputeImageQuery) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
Aggregate returns a ComputeImageSelect configured with the given aggregations.
func (*ComputeImageQuery) All ¶
func (_q *ComputeImageQuery) All(ctx context.Context) ([]*ComputeImage, error)
All executes the query and returns a list of ComputeImages.
func (*ComputeImageQuery) AllX ¶
func (_q *ComputeImageQuery) AllX(ctx context.Context) []*ComputeImage
AllX is like All, but panics if an error occurs.
func (*ComputeImageQuery) Clone ¶
func (_q *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 (_q *ComputeImageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeImageQuery) CountX ¶
func (_q *ComputeImageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeImageQuery) Exist ¶
func (_q *ComputeImageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeImageQuery) ExistX ¶
func (_q *ComputeImageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeImageQuery) First ¶
func (_q *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 (_q *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 (_q *ComputeImageQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeImageQuery) FirstX ¶
func (_q *ComputeImageQuery) FirstX(ctx context.Context) *ComputeImage
FirstX is like First, but panics if an error occurs.
func (*ComputeImageQuery) GroupBy ¶
func (_q *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 (_q *ComputeImageQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of ComputeImage IDs.
func (*ComputeImageQuery) IDsX ¶
func (_q *ComputeImageQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ComputeImageQuery) Limit ¶
func (_q *ComputeImageQuery) Limit(limit int) *ComputeImageQuery
Limit the number of records to be returned by this query.
func (*ComputeImageQuery) Offset ¶
func (_q *ComputeImageQuery) Offset(offset int) *ComputeImageQuery
Offset to start from.
func (*ComputeImageQuery) Only ¶
func (_q *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 (_q *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 (_q *ComputeImageQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeImageQuery) OnlyX ¶
func (_q *ComputeImageQuery) OnlyX(ctx context.Context) *ComputeImage
OnlyX is like Only, but panics if an error occurs.
func (*ComputeImageQuery) Order ¶
func (_q *ComputeImageQuery) Order(o ...computeimage.OrderOption) *ComputeImageQuery
Order specifies how the records should be ordered.
func (*ComputeImageQuery) Select ¶
func (_q *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 (_q *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 (_q *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 (_s *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 (_s *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) AddSort ¶
func (_u *ComputeImageUpdate) AddSort(v int) *ComputeImageUpdate
AddSort adds value to the "sort" field.
func (*ComputeImageUpdate) Exec ¶
func (_u *ComputeImageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeImageUpdate) ExecX ¶
func (_u *ComputeImageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageUpdate) Mutation ¶
func (_u *ComputeImageUpdate) Mutation() *ComputeImageMutation
Mutation returns the ComputeImageMutation object of the builder.
func (*ComputeImageUpdate) Save ¶
func (_u *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 (_u *ComputeImageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeImageUpdate) SetArch ¶
func (_u *ComputeImageUpdate) SetArch(v string) *ComputeImageUpdate
SetArch sets the "arch" field.
func (*ComputeImageUpdate) SetBootType ¶ added in v0.0.12
func (_u *ComputeImageUpdate) SetBootType(v string) *ComputeImageUpdate
SetBootType sets the "boot_type" field.
func (*ComputeImageUpdate) SetDownloadURL ¶
func (_u *ComputeImageUpdate) SetDownloadURL(v string) *ComputeImageUpdate
SetDownloadURL sets the "download_url" field.
func (*ComputeImageUpdate) SetFilename ¶
func (_u *ComputeImageUpdate) SetFilename(v string) *ComputeImageUpdate
SetFilename sets the "filename" field.
func (*ComputeImageUpdate) SetImage ¶
func (_u *ComputeImageUpdate) SetImage(v string) *ComputeImageUpdate
SetImage sets the "image" field.
func (*ComputeImageUpdate) SetMd5 ¶
func (_u *ComputeImageUpdate) SetMd5(v string) *ComputeImageUpdate
SetMd5 sets the "md5" field.
func (*ComputeImageUpdate) SetName ¶
func (_u *ComputeImageUpdate) SetName(v string) *ComputeImageUpdate
SetName sets the "name" field.
func (*ComputeImageUpdate) SetNillableArch ¶
func (_u *ComputeImageUpdate) SetNillableArch(v *string) *ComputeImageUpdate
SetNillableArch sets the "arch" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableBootType ¶ added in v0.0.12
func (_u *ComputeImageUpdate) SetNillableBootType(v *string) *ComputeImageUpdate
SetNillableBootType sets the "boot_type" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableDownloadURL ¶
func (_u *ComputeImageUpdate) SetNillableDownloadURL(v *string) *ComputeImageUpdate
SetNillableDownloadURL sets the "download_url" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableFilename ¶
func (_u *ComputeImageUpdate) SetNillableFilename(v *string) *ComputeImageUpdate
SetNillableFilename sets the "filename" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableImage ¶
func (_u *ComputeImageUpdate) SetNillableImage(v *string) *ComputeImageUpdate
SetNillableImage sets the "image" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableMd5 ¶
func (_u *ComputeImageUpdate) SetNillableMd5(v *string) *ComputeImageUpdate
SetNillableMd5 sets the "md5" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableName ¶
func (_u *ComputeImageUpdate) SetNillableName(v *string) *ComputeImageUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableOsType ¶
func (_u *ComputeImageUpdate) SetNillableOsType(v *string) *ComputeImageUpdate
SetNillableOsType sets the "os_type" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableOsVariant ¶
func (_u *ComputeImageUpdate) SetNillableOsVariant(v *string) *ComputeImageUpdate
SetNillableOsVariant sets the "os_variant" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableSort ¶
func (_u *ComputeImageUpdate) SetNillableSort(v *uint) *ComputeImageUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*ComputeImageUpdate) SetNillableTag ¶
func (_u *ComputeImageUpdate) SetNillableTag(v *string) *ComputeImageUpdate
SetNillableTag sets the "tag" field if the given value is not nil.
func (*ComputeImageUpdate) SetOsType ¶
func (_u *ComputeImageUpdate) SetOsType(v string) *ComputeImageUpdate
SetOsType sets the "os_type" field.
func (*ComputeImageUpdate) SetOsVariant ¶
func (_u *ComputeImageUpdate) SetOsVariant(v string) *ComputeImageUpdate
SetOsVariant sets the "os_variant" field.
func (*ComputeImageUpdate) SetSort ¶
func (_u *ComputeImageUpdate) SetSort(v uint) *ComputeImageUpdate
SetSort sets the "sort" field.
func (*ComputeImageUpdate) SetTag ¶
func (_u *ComputeImageUpdate) SetTag(v string) *ComputeImageUpdate
SetTag sets the "tag" field.
func (*ComputeImageUpdate) Where ¶
func (_u *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) AddSort ¶
func (_u *ComputeImageUpdateOne) AddSort(v int) *ComputeImageUpdateOne
AddSort adds value to the "sort" field.
func (*ComputeImageUpdateOne) Exec ¶
func (_u *ComputeImageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeImageUpdateOne) ExecX ¶
func (_u *ComputeImageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageUpdateOne) Mutation ¶
func (_u *ComputeImageUpdateOne) Mutation() *ComputeImageMutation
Mutation returns the ComputeImageMutation object of the builder.
func (*ComputeImageUpdateOne) Save ¶
func (_u *ComputeImageUpdateOne) Save(ctx context.Context) (*ComputeImage, error)
Save executes the query and returns the updated ComputeImage entity.
func (*ComputeImageUpdateOne) SaveX ¶
func (_u *ComputeImageUpdateOne) SaveX(ctx context.Context) *ComputeImage
SaveX is like Save, but panics if an error occurs.
func (*ComputeImageUpdateOne) Select ¶
func (_u *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) SetArch ¶
func (_u *ComputeImageUpdateOne) SetArch(v string) *ComputeImageUpdateOne
SetArch sets the "arch" field.
func (*ComputeImageUpdateOne) SetBootType ¶ added in v0.0.12
func (_u *ComputeImageUpdateOne) SetBootType(v string) *ComputeImageUpdateOne
SetBootType sets the "boot_type" field.
func (*ComputeImageUpdateOne) SetDownloadURL ¶
func (_u *ComputeImageUpdateOne) SetDownloadURL(v string) *ComputeImageUpdateOne
SetDownloadURL sets the "download_url" field.
func (*ComputeImageUpdateOne) SetFilename ¶
func (_u *ComputeImageUpdateOne) SetFilename(v string) *ComputeImageUpdateOne
SetFilename sets the "filename" field.
func (*ComputeImageUpdateOne) SetImage ¶
func (_u *ComputeImageUpdateOne) SetImage(v string) *ComputeImageUpdateOne
SetImage sets the "image" field.
func (*ComputeImageUpdateOne) SetMd5 ¶
func (_u *ComputeImageUpdateOne) SetMd5(v string) *ComputeImageUpdateOne
SetMd5 sets the "md5" field.
func (*ComputeImageUpdateOne) SetName ¶
func (_u *ComputeImageUpdateOne) SetName(v string) *ComputeImageUpdateOne
SetName sets the "name" field.
func (*ComputeImageUpdateOne) SetNillableArch ¶
func (_u *ComputeImageUpdateOne) SetNillableArch(v *string) *ComputeImageUpdateOne
SetNillableArch sets the "arch" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableBootType ¶ added in v0.0.12
func (_u *ComputeImageUpdateOne) SetNillableBootType(v *string) *ComputeImageUpdateOne
SetNillableBootType sets the "boot_type" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableDownloadURL ¶
func (_u *ComputeImageUpdateOne) SetNillableDownloadURL(v *string) *ComputeImageUpdateOne
SetNillableDownloadURL sets the "download_url" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableFilename ¶
func (_u *ComputeImageUpdateOne) SetNillableFilename(v *string) *ComputeImageUpdateOne
SetNillableFilename sets the "filename" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableImage ¶
func (_u *ComputeImageUpdateOne) SetNillableImage(v *string) *ComputeImageUpdateOne
SetNillableImage sets the "image" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableMd5 ¶
func (_u *ComputeImageUpdateOne) SetNillableMd5(v *string) *ComputeImageUpdateOne
SetNillableMd5 sets the "md5" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableName ¶
func (_u *ComputeImageUpdateOne) SetNillableName(v *string) *ComputeImageUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableOsType ¶
func (_u *ComputeImageUpdateOne) SetNillableOsType(v *string) *ComputeImageUpdateOne
SetNillableOsType sets the "os_type" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableOsVariant ¶
func (_u *ComputeImageUpdateOne) SetNillableOsVariant(v *string) *ComputeImageUpdateOne
SetNillableOsVariant sets the "os_variant" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableSort ¶
func (_u *ComputeImageUpdateOne) SetNillableSort(v *uint) *ComputeImageUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetNillableTag ¶
func (_u *ComputeImageUpdateOne) SetNillableTag(v *string) *ComputeImageUpdateOne
SetNillableTag sets the "tag" field if the given value is not nil.
func (*ComputeImageUpdateOne) SetOsType ¶
func (_u *ComputeImageUpdateOne) SetOsType(v string) *ComputeImageUpdateOne
SetOsType sets the "os_type" field.
func (*ComputeImageUpdateOne) SetOsVariant ¶
func (_u *ComputeImageUpdateOne) SetOsVariant(v string) *ComputeImageUpdateOne
SetOsVariant sets the "os_variant" field.
func (*ComputeImageUpdateOne) SetSort ¶
func (_u *ComputeImageUpdateOne) SetSort(v uint) *ComputeImageUpdateOne
SetSort sets the "sort" field.
func (*ComputeImageUpdateOne) SetTag ¶
func (_u *ComputeImageUpdateOne) SetTag(v string) *ComputeImageUpdateOne
SetTag sets the "tag" field.
func (*ComputeImageUpdateOne) Where ¶
func (_u *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"`
// cpu核数
Core int `json:"core,omitempty"`
// 内存G
Memory int `json:"memory,omitempty"`
// Image holds the value of the "image" field.
Image string `json:"image,omitempty"`
// 镜像id
ImageID int32 `json:"image_id,omitempty"`
// 容器端口
Port string `json:"port,omitempty"`
// ExpirationTime holds the value of the "expiration_time" field.
ExpirationTime time.Time `json:"expiration_time,omitempty"`
// 0: 启动中,1:运行中,2:连接中断, 3:过期
Status compute.InstanceStatus `json:"status,omitempty"`
// 容器id
ContainerID string `json:"container_id,omitempty"`
// p2p agent Id
AgentID string `json:"agent_id,omitempty"`
// vnc 内网链接ip
VncIP string `json:"vnc_ip,omitempty"`
// vnc 内网链接端口号
VncPort int32 `json:"vnc_port,omitempty"`
// 初始化的docker容器
DockerCompose string `json:"docker_compose,omitempty"`
// 创建时间
CreateTime time.Time `json:"create_time,omitempty"`
// 计算机架构
Arch string `json:"arch,omitempty"`
// 初始化方式,iso/qcow2
BootType string `json:"boot_type,omitempty"`
// contains filtered or unexported fields
}
ComputeInstance is the model entity for the ComputeInstance schema.
func (*ComputeInstance) String ¶
func (_m *ComputeInstance) String() string
String implements the fmt.Stringer.
func (*ComputeInstance) Unwrap ¶
func (_m *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 (_m *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(_m *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) MapCreateBulk ¶
func (c *ComputeInstanceClient) MapCreateBulk(slice any, setFunc func(*ComputeInstanceCreate, int)) *ComputeInstanceCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*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(_m *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 (_c *ComputeInstanceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeInstanceCreate) ExecX ¶
func (_c *ComputeInstanceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceCreate) Mutation ¶
func (_c *ComputeInstanceCreate) Mutation() *ComputeInstanceMutation
Mutation returns the ComputeInstanceMutation object of the builder.
func (*ComputeInstanceCreate) Save ¶
func (_c *ComputeInstanceCreate) Save(ctx context.Context) (*ComputeInstance, error)
Save creates the ComputeInstance in the database.
func (*ComputeInstanceCreate) SaveX ¶
func (_c *ComputeInstanceCreate) SaveX(ctx context.Context) *ComputeInstance
SaveX calls Save and panics if Save returns an error.
func (*ComputeInstanceCreate) SetAgentID ¶
func (_c *ComputeInstanceCreate) SetAgentID(v string) *ComputeInstanceCreate
SetAgentID sets the "agent_id" field.
func (*ComputeInstanceCreate) SetArch ¶ added in v0.0.12
func (_c *ComputeInstanceCreate) SetArch(v string) *ComputeInstanceCreate
SetArch sets the "arch" field.
func (*ComputeInstanceCreate) SetBootType ¶ added in v0.0.12
func (_c *ComputeInstanceCreate) SetBootType(v string) *ComputeInstanceCreate
SetBootType sets the "boot_type" field.
func (*ComputeInstanceCreate) SetContainerID ¶
func (_c *ComputeInstanceCreate) SetContainerID(v string) *ComputeInstanceCreate
SetContainerID sets the "container_id" field.
func (*ComputeInstanceCreate) SetCore ¶
func (_c *ComputeInstanceCreate) SetCore(v int) *ComputeInstanceCreate
SetCore sets the "core" field.
func (*ComputeInstanceCreate) SetCreateTime ¶
func (_c *ComputeInstanceCreate) SetCreateTime(v time.Time) *ComputeInstanceCreate
SetCreateTime sets the "create_time" field.
func (*ComputeInstanceCreate) SetDockerCompose ¶
func (_c *ComputeInstanceCreate) SetDockerCompose(v string) *ComputeInstanceCreate
SetDockerCompose sets the "docker_compose" field.
func (*ComputeInstanceCreate) SetExpirationTime ¶
func (_c *ComputeInstanceCreate) SetExpirationTime(v time.Time) *ComputeInstanceCreate
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceCreate) SetID ¶
func (_c *ComputeInstanceCreate) SetID(v uuid.UUID) *ComputeInstanceCreate
SetID sets the "id" field.
func (*ComputeInstanceCreate) SetImage ¶
func (_c *ComputeInstanceCreate) SetImage(v string) *ComputeInstanceCreate
SetImage sets the "image" field.
func (*ComputeInstanceCreate) SetImageID ¶
func (_c *ComputeInstanceCreate) SetImageID(v int32) *ComputeInstanceCreate
SetImageID sets the "image_id" field.
func (*ComputeInstanceCreate) SetMemory ¶
func (_c *ComputeInstanceCreate) SetMemory(v int) *ComputeInstanceCreate
SetMemory sets the "memory" field.
func (*ComputeInstanceCreate) SetName ¶
func (_c *ComputeInstanceCreate) SetName(v string) *ComputeInstanceCreate
SetName sets the "name" field.
func (*ComputeInstanceCreate) SetNillableAgentID ¶
func (_c *ComputeInstanceCreate) SetNillableAgentID(v *string) *ComputeInstanceCreate
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillableBootType ¶ added in v0.0.12
func (_c *ComputeInstanceCreate) SetNillableBootType(v *string) *ComputeInstanceCreate
SetNillableBootType sets the "boot_type" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillableContainerID ¶
func (_c *ComputeInstanceCreate) SetNillableContainerID(v *string) *ComputeInstanceCreate
SetNillableContainerID sets the "container_id" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillableCreateTime ¶
func (_c *ComputeInstanceCreate) SetNillableCreateTime(v *time.Time) *ComputeInstanceCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillableID ¶
func (_c *ComputeInstanceCreate) SetNillableID(v *uuid.UUID) *ComputeInstanceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillablePort ¶
func (_c *ComputeInstanceCreate) SetNillablePort(v *string) *ComputeInstanceCreate
SetNillablePort sets the "port" field if the given value is not nil.
func (*ComputeInstanceCreate) SetOwner ¶
func (_c *ComputeInstanceCreate) SetOwner(v string) *ComputeInstanceCreate
SetOwner sets the "owner" field.
func (*ComputeInstanceCreate) SetPort ¶
func (_c *ComputeInstanceCreate) SetPort(v string) *ComputeInstanceCreate
SetPort sets the "port" field.
func (*ComputeInstanceCreate) SetStatus ¶
func (_c *ComputeInstanceCreate) SetStatus(v compute.InstanceStatus) *ComputeInstanceCreate
SetStatus sets the "status" field.
func (*ComputeInstanceCreate) SetVncIP ¶
func (_c *ComputeInstanceCreate) SetVncIP(v string) *ComputeInstanceCreate
SetVncIP sets the "vnc_ip" field.
func (*ComputeInstanceCreate) SetVncPort ¶
func (_c *ComputeInstanceCreate) SetVncPort(v int32) *ComputeInstanceCreate
SetVncPort sets the "vnc_port" 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 (_c *ComputeInstanceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeInstanceCreateBulk) ExecX ¶
func (_c *ComputeInstanceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceCreateBulk) Save ¶
func (_c *ComputeInstanceCreateBulk) Save(ctx context.Context) ([]*ComputeInstance, error)
Save creates the ComputeInstance entities in the database.
func (*ComputeInstanceCreateBulk) SaveX ¶
func (_c *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 (_d *ComputeInstanceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeInstanceDelete) ExecX ¶
func (_d *ComputeInstanceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceDelete) Where ¶
func (_d *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 (_d *ComputeInstanceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeInstanceDeleteOne) ExecX ¶
func (_d *ComputeInstanceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceDeleteOne) Where ¶
func (_d *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 (_g *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 (_g *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) AddCore ¶
func (m *ComputeInstanceMutation) AddCore(i int)
AddCore adds i to the "core" field.
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) AddImageID ¶
func (m *ComputeInstanceMutation) AddImageID(i int32)
AddImageID adds i to the "image_id" field.
func (*ComputeInstanceMutation) AddMemory ¶
func (m *ComputeInstanceMutation) AddMemory(i int)
AddMemory adds i to the "memory" field.
func (*ComputeInstanceMutation) AddStatus ¶
func (m *ComputeInstanceMutation) AddStatus(cs compute.InstanceStatus)
AddStatus adds cs to the "status" field.
func (*ComputeInstanceMutation) AddVncPort ¶
func (m *ComputeInstanceMutation) AddVncPort(i int32)
AddVncPort adds i to the "vnc_port" field.
func (*ComputeInstanceMutation) AddedCore ¶
func (m *ComputeInstanceMutation) AddedCore() (r int, exists bool)
AddedCore returns the value that was added to the "core" field in this mutation.
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) AddedImageID ¶
func (m *ComputeInstanceMutation) AddedImageID() (r int32, exists bool)
AddedImageID returns the value that was added to the "image_id" field in this mutation.
func (*ComputeInstanceMutation) AddedMemory ¶
func (m *ComputeInstanceMutation) AddedMemory() (r int, exists bool)
AddedMemory returns the value that was added to the "memory" field in this mutation.
func (*ComputeInstanceMutation) AddedStatus ¶
func (m *ComputeInstanceMutation) AddedStatus() (r compute.InstanceStatus, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*ComputeInstanceMutation) AddedVncPort ¶
func (m *ComputeInstanceMutation) AddedVncPort() (r int32, exists bool)
AddedVncPort returns the value that was added to the "vnc_port" field in this mutation.
func (*ComputeInstanceMutation) AgentID ¶
func (m *ComputeInstanceMutation) AgentID() (r string, exists bool)
AgentID returns the value of the "agent_id" field in the mutation.
func (*ComputeInstanceMutation) AgentIDCleared ¶
func (m *ComputeInstanceMutation) AgentIDCleared() bool
AgentIDCleared returns if the "agent_id" field was cleared in this mutation.
func (*ComputeInstanceMutation) Arch ¶ added in v0.0.12
func (m *ComputeInstanceMutation) Arch() (r string, exists bool)
Arch returns the value of the "arch" field in the mutation.
func (*ComputeInstanceMutation) BootType ¶ added in v0.0.12
func (m *ComputeInstanceMutation) BootType() (r string, exists bool)
BootType returns the value of the "boot_type" field in the mutation.
func (*ComputeInstanceMutation) ClearAgentID ¶
func (m *ComputeInstanceMutation) ClearAgentID()
ClearAgentID clears the value of the "agent_id" field.
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) ClearPort ¶
func (m *ComputeInstanceMutation) ClearPort()
ClearPort clears the value of the "port" 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 int, exists bool)
Core returns the value of the "core" field in the mutation.
func (*ComputeInstanceMutation) CreateTime ¶
func (m *ComputeInstanceMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ComputeInstanceMutation) DockerCompose ¶
func (m *ComputeInstanceMutation) DockerCompose() (r string, exists bool)
DockerCompose returns the value of the "docker_compose" 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) ImageID ¶
func (m *ComputeInstanceMutation) ImageID() (r int32, exists bool)
ImageID returns the value of the "image_id" field in the mutation.
func (*ComputeInstanceMutation) Memory ¶
func (m *ComputeInstanceMutation) Memory() (r int, 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) OldAgentID ¶
func (m *ComputeInstanceMutation) OldAgentID(ctx context.Context) (v string, err error)
OldAgentID returns the old "agent_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) OldArch ¶ added in v0.0.12
func (m *ComputeInstanceMutation) OldArch(ctx context.Context) (v string, err error)
OldArch returns the old "arch" 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) OldBootType ¶ added in v0.0.12
func (m *ComputeInstanceMutation) OldBootType(ctx context.Context) (v string, err error)
OldBootType returns the old "boot_type" 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) 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 int, 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) OldCreateTime ¶
OldCreateTime returns the old "create_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) OldDockerCompose ¶
func (m *ComputeInstanceMutation) OldDockerCompose(ctx context.Context) (v string, err error)
OldDockerCompose returns the old "docker_compose" 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) OldImageID ¶
func (m *ComputeInstanceMutation) OldImageID(ctx context.Context) (v int32, err error)
OldImageID returns the old "image_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) OldMemory ¶
func (m *ComputeInstanceMutation) OldMemory(ctx context.Context) (v int, 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) OldPort ¶
func (m *ComputeInstanceMutation) OldPort(ctx context.Context) (v string, err error)
OldPort returns the old "port" 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 compute.InstanceStatus, 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) OldVncIP ¶
func (m *ComputeInstanceMutation) OldVncIP(ctx context.Context) (v string, err error)
OldVncIP returns the old "vnc_ip" 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) OldVncPort ¶
func (m *ComputeInstanceMutation) OldVncPort(ctx context.Context) (v int32, err error)
OldVncPort returns the old "vnc_port" 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) Port ¶
func (m *ComputeInstanceMutation) Port() (r string, exists bool)
Port returns the value of the "port" field in the mutation.
func (*ComputeInstanceMutation) PortCleared ¶
func (m *ComputeInstanceMutation) PortCleared() bool
PortCleared returns if the "port" 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) ResetAgentID ¶
func (m *ComputeInstanceMutation) ResetAgentID()
ResetAgentID resets all changes to the "agent_id" field.
func (*ComputeInstanceMutation) ResetArch ¶ added in v0.0.12
func (m *ComputeInstanceMutation) ResetArch()
ResetArch resets all changes to the "arch" field.
func (*ComputeInstanceMutation) ResetBootType ¶ added in v0.0.12
func (m *ComputeInstanceMutation) ResetBootType()
ResetBootType resets all changes to the "boot_type" field.
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) ResetCreateTime ¶
func (m *ComputeInstanceMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ComputeInstanceMutation) ResetDockerCompose ¶
func (m *ComputeInstanceMutation) ResetDockerCompose()
ResetDockerCompose resets all changes to the "docker_compose" 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) ResetImageID ¶
func (m *ComputeInstanceMutation) ResetImageID()
ResetImageID resets all changes to the "image_id" 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) ResetPort ¶
func (m *ComputeInstanceMutation) ResetPort()
ResetPort resets all changes to the "port" field.
func (*ComputeInstanceMutation) ResetStatus ¶
func (m *ComputeInstanceMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*ComputeInstanceMutation) ResetVncIP ¶
func (m *ComputeInstanceMutation) ResetVncIP()
ResetVncIP resets all changes to the "vnc_ip" field.
func (*ComputeInstanceMutation) ResetVncPort ¶
func (m *ComputeInstanceMutation) ResetVncPort()
ResetVncPort resets all changes to the "vnc_port" field.
func (*ComputeInstanceMutation) SetAgentID ¶
func (m *ComputeInstanceMutation) SetAgentID(s string)
SetAgentID sets the "agent_id" field.
func (*ComputeInstanceMutation) SetArch ¶ added in v0.0.12
func (m *ComputeInstanceMutation) SetArch(s string)
SetArch sets the "arch" field.
func (*ComputeInstanceMutation) SetBootType ¶ added in v0.0.12
func (m *ComputeInstanceMutation) SetBootType(s string)
SetBootType sets the "boot_type" field.
func (*ComputeInstanceMutation) SetContainerID ¶
func (m *ComputeInstanceMutation) SetContainerID(s string)
SetContainerID sets the "container_id" field.
func (*ComputeInstanceMutation) SetCore ¶
func (m *ComputeInstanceMutation) SetCore(i int)
SetCore sets the "core" field.
func (*ComputeInstanceMutation) SetCreateTime ¶
func (m *ComputeInstanceMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ComputeInstanceMutation) SetDockerCompose ¶
func (m *ComputeInstanceMutation) SetDockerCompose(s string)
SetDockerCompose sets the "docker_compose" 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) SetImageID ¶
func (m *ComputeInstanceMutation) SetImageID(i int32)
SetImageID sets the "image_id" field.
func (*ComputeInstanceMutation) SetMemory ¶
func (m *ComputeInstanceMutation) SetMemory(i int)
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) SetPort ¶
func (m *ComputeInstanceMutation) SetPort(s string)
SetPort sets the "port" field.
func (*ComputeInstanceMutation) SetStatus ¶
func (m *ComputeInstanceMutation) SetStatus(cs compute.InstanceStatus)
SetStatus sets the "status" field.
func (*ComputeInstanceMutation) SetVncIP ¶
func (m *ComputeInstanceMutation) SetVncIP(s string)
SetVncIP sets the "vnc_ip" field.
func (*ComputeInstanceMutation) SetVncPort ¶
func (m *ComputeInstanceMutation) SetVncPort(i int32)
SetVncPort sets the "vnc_port" field.
func (*ComputeInstanceMutation) Status ¶
func (m *ComputeInstanceMutation) Status() (r compute.InstanceStatus, 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) VncIP ¶
func (m *ComputeInstanceMutation) VncIP() (r string, exists bool)
VncIP returns the value of the "vnc_ip" field in the mutation.
func (*ComputeInstanceMutation) VncPort ¶
func (m *ComputeInstanceMutation) VncPort() (r int32, exists bool)
VncPort returns the value of the "vnc_port" field in the mutation.
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 (_q *ComputeInstanceQuery) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
Aggregate returns a ComputeInstanceSelect configured with the given aggregations.
func (*ComputeInstanceQuery) All ¶
func (_q *ComputeInstanceQuery) All(ctx context.Context) ([]*ComputeInstance, error)
All executes the query and returns a list of ComputeInstances.
func (*ComputeInstanceQuery) AllX ¶
func (_q *ComputeInstanceQuery) AllX(ctx context.Context) []*ComputeInstance
AllX is like All, but panics if an error occurs.
func (*ComputeInstanceQuery) Clone ¶
func (_q *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 (_q *ComputeInstanceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeInstanceQuery) CountX ¶
func (_q *ComputeInstanceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeInstanceQuery) Exist ¶
func (_q *ComputeInstanceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeInstanceQuery) ExistX ¶
func (_q *ComputeInstanceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeInstanceQuery) First ¶
func (_q *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 (_q *ComputeInstanceQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeInstanceQuery) FirstX ¶
func (_q *ComputeInstanceQuery) FirstX(ctx context.Context) *ComputeInstance
FirstX is like First, but panics if an error occurs.
func (*ComputeInstanceQuery) GroupBy ¶
func (_q *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 (_q *ComputeInstanceQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ComputeInstanceQuery) Limit ¶
func (_q *ComputeInstanceQuery) Limit(limit int) *ComputeInstanceQuery
Limit the number of records to be returned by this query.
func (*ComputeInstanceQuery) Offset ¶
func (_q *ComputeInstanceQuery) Offset(offset int) *ComputeInstanceQuery
Offset to start from.
func (*ComputeInstanceQuery) Only ¶
func (_q *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 (_q *ComputeInstanceQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeInstanceQuery) OnlyX ¶
func (_q *ComputeInstanceQuery) OnlyX(ctx context.Context) *ComputeInstance
OnlyX is like Only, but panics if an error occurs.
func (*ComputeInstanceQuery) Order ¶
func (_q *ComputeInstanceQuery) Order(o ...computeinstance.OrderOption) *ComputeInstanceQuery
Order specifies how the records should be ordered.
func (*ComputeInstanceQuery) Select ¶
func (_q *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 (_q *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 (_q *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 (_s *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 (_s *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) AddCore ¶
func (_u *ComputeInstanceUpdate) AddCore(v int) *ComputeInstanceUpdate
AddCore adds value to the "core" field.
func (*ComputeInstanceUpdate) AddImageID ¶
func (_u *ComputeInstanceUpdate) AddImageID(v int32) *ComputeInstanceUpdate
AddImageID adds value to the "image_id" field.
func (*ComputeInstanceUpdate) AddMemory ¶
func (_u *ComputeInstanceUpdate) AddMemory(v int) *ComputeInstanceUpdate
AddMemory adds value to the "memory" field.
func (*ComputeInstanceUpdate) AddStatus ¶
func (_u *ComputeInstanceUpdate) AddStatus(v compute.InstanceStatus) *ComputeInstanceUpdate
AddStatus adds value to the "status" field.
func (*ComputeInstanceUpdate) AddVncPort ¶
func (_u *ComputeInstanceUpdate) AddVncPort(v int32) *ComputeInstanceUpdate
AddVncPort adds value to the "vnc_port" field.
func (*ComputeInstanceUpdate) ClearAgentID ¶
func (_u *ComputeInstanceUpdate) ClearAgentID() *ComputeInstanceUpdate
ClearAgentID clears the value of the "agent_id" field.
func (*ComputeInstanceUpdate) ClearContainerID ¶
func (_u *ComputeInstanceUpdate) ClearContainerID() *ComputeInstanceUpdate
ClearContainerID clears the value of the "container_id" field.
func (*ComputeInstanceUpdate) ClearPort ¶
func (_u *ComputeInstanceUpdate) ClearPort() *ComputeInstanceUpdate
ClearPort clears the value of the "port" field.
func (*ComputeInstanceUpdate) Exec ¶
func (_u *ComputeInstanceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeInstanceUpdate) ExecX ¶
func (_u *ComputeInstanceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceUpdate) Mutation ¶
func (_u *ComputeInstanceUpdate) Mutation() *ComputeInstanceMutation
Mutation returns the ComputeInstanceMutation object of the builder.
func (*ComputeInstanceUpdate) Save ¶
func (_u *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 (_u *ComputeInstanceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeInstanceUpdate) SetAgentID ¶
func (_u *ComputeInstanceUpdate) SetAgentID(v string) *ComputeInstanceUpdate
SetAgentID sets the "agent_id" field.
func (*ComputeInstanceUpdate) SetArch ¶ added in v0.0.12
func (_u *ComputeInstanceUpdate) SetArch(v string) *ComputeInstanceUpdate
SetArch sets the "arch" field.
func (*ComputeInstanceUpdate) SetBootType ¶ added in v0.0.12
func (_u *ComputeInstanceUpdate) SetBootType(v string) *ComputeInstanceUpdate
SetBootType sets the "boot_type" field.
func (*ComputeInstanceUpdate) SetContainerID ¶
func (_u *ComputeInstanceUpdate) SetContainerID(v string) *ComputeInstanceUpdate
SetContainerID sets the "container_id" field.
func (*ComputeInstanceUpdate) SetCore ¶
func (_u *ComputeInstanceUpdate) SetCore(v int) *ComputeInstanceUpdate
SetCore sets the "core" field.
func (*ComputeInstanceUpdate) SetCreateTime ¶
func (_u *ComputeInstanceUpdate) SetCreateTime(v time.Time) *ComputeInstanceUpdate
SetCreateTime sets the "create_time" field.
func (*ComputeInstanceUpdate) SetDockerCompose ¶
func (_u *ComputeInstanceUpdate) SetDockerCompose(v string) *ComputeInstanceUpdate
SetDockerCompose sets the "docker_compose" field.
func (*ComputeInstanceUpdate) SetExpirationTime ¶
func (_u *ComputeInstanceUpdate) SetExpirationTime(v time.Time) *ComputeInstanceUpdate
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceUpdate) SetImage ¶
func (_u *ComputeInstanceUpdate) SetImage(v string) *ComputeInstanceUpdate
SetImage sets the "image" field.
func (*ComputeInstanceUpdate) SetImageID ¶
func (_u *ComputeInstanceUpdate) SetImageID(v int32) *ComputeInstanceUpdate
SetImageID sets the "image_id" field.
func (*ComputeInstanceUpdate) SetMemory ¶
func (_u *ComputeInstanceUpdate) SetMemory(v int) *ComputeInstanceUpdate
SetMemory sets the "memory" field.
func (*ComputeInstanceUpdate) SetName ¶
func (_u *ComputeInstanceUpdate) SetName(v string) *ComputeInstanceUpdate
SetName sets the "name" field.
func (*ComputeInstanceUpdate) SetNillableAgentID ¶
func (_u *ComputeInstanceUpdate) SetNillableAgentID(v *string) *ComputeInstanceUpdate
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableArch ¶ added in v0.0.12
func (_u *ComputeInstanceUpdate) SetNillableArch(v *string) *ComputeInstanceUpdate
SetNillableArch sets the "arch" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableBootType ¶ added in v0.0.12
func (_u *ComputeInstanceUpdate) SetNillableBootType(v *string) *ComputeInstanceUpdate
SetNillableBootType sets the "boot_type" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableContainerID ¶
func (_u *ComputeInstanceUpdate) SetNillableContainerID(v *string) *ComputeInstanceUpdate
SetNillableContainerID sets the "container_id" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableCore ¶
func (_u *ComputeInstanceUpdate) SetNillableCore(v *int) *ComputeInstanceUpdate
SetNillableCore sets the "core" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableCreateTime ¶
func (_u *ComputeInstanceUpdate) SetNillableCreateTime(v *time.Time) *ComputeInstanceUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableDockerCompose ¶
func (_u *ComputeInstanceUpdate) SetNillableDockerCompose(v *string) *ComputeInstanceUpdate
SetNillableDockerCompose sets the "docker_compose" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableExpirationTime ¶
func (_u *ComputeInstanceUpdate) SetNillableExpirationTime(v *time.Time) *ComputeInstanceUpdate
SetNillableExpirationTime sets the "expiration_time" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableImage ¶
func (_u *ComputeInstanceUpdate) SetNillableImage(v *string) *ComputeInstanceUpdate
SetNillableImage sets the "image" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableImageID ¶
func (_u *ComputeInstanceUpdate) SetNillableImageID(v *int32) *ComputeInstanceUpdate
SetNillableImageID sets the "image_id" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableMemory ¶
func (_u *ComputeInstanceUpdate) SetNillableMemory(v *int) *ComputeInstanceUpdate
SetNillableMemory sets the "memory" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableName ¶
func (_u *ComputeInstanceUpdate) SetNillableName(v *string) *ComputeInstanceUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableOwner ¶
func (_u *ComputeInstanceUpdate) SetNillableOwner(v *string) *ComputeInstanceUpdate
SetNillableOwner sets the "owner" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillablePort ¶
func (_u *ComputeInstanceUpdate) SetNillablePort(v *string) *ComputeInstanceUpdate
SetNillablePort sets the "port" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableStatus ¶
func (_u *ComputeInstanceUpdate) SetNillableStatus(v *compute.InstanceStatus) *ComputeInstanceUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableVncIP ¶
func (_u *ComputeInstanceUpdate) SetNillableVncIP(v *string) *ComputeInstanceUpdate
SetNillableVncIP sets the "vnc_ip" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableVncPort ¶
func (_u *ComputeInstanceUpdate) SetNillableVncPort(v *int32) *ComputeInstanceUpdate
SetNillableVncPort sets the "vnc_port" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetOwner ¶
func (_u *ComputeInstanceUpdate) SetOwner(v string) *ComputeInstanceUpdate
SetOwner sets the "owner" field.
func (*ComputeInstanceUpdate) SetPort ¶
func (_u *ComputeInstanceUpdate) SetPort(v string) *ComputeInstanceUpdate
SetPort sets the "port" field.
func (*ComputeInstanceUpdate) SetStatus ¶
func (_u *ComputeInstanceUpdate) SetStatus(v compute.InstanceStatus) *ComputeInstanceUpdate
SetStatus sets the "status" field.
func (*ComputeInstanceUpdate) SetVncIP ¶
func (_u *ComputeInstanceUpdate) SetVncIP(v string) *ComputeInstanceUpdate
SetVncIP sets the "vnc_ip" field.
func (*ComputeInstanceUpdate) SetVncPort ¶
func (_u *ComputeInstanceUpdate) SetVncPort(v int32) *ComputeInstanceUpdate
SetVncPort sets the "vnc_port" field.
func (*ComputeInstanceUpdate) Where ¶
func (_u *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) AddCore ¶
func (_u *ComputeInstanceUpdateOne) AddCore(v int) *ComputeInstanceUpdateOne
AddCore adds value to the "core" field.
func (*ComputeInstanceUpdateOne) AddImageID ¶
func (_u *ComputeInstanceUpdateOne) AddImageID(v int32) *ComputeInstanceUpdateOne
AddImageID adds value to the "image_id" field.
func (*ComputeInstanceUpdateOne) AddMemory ¶
func (_u *ComputeInstanceUpdateOne) AddMemory(v int) *ComputeInstanceUpdateOne
AddMemory adds value to the "memory" field.
func (*ComputeInstanceUpdateOne) AddStatus ¶
func (_u *ComputeInstanceUpdateOne) AddStatus(v compute.InstanceStatus) *ComputeInstanceUpdateOne
AddStatus adds value to the "status" field.
func (*ComputeInstanceUpdateOne) AddVncPort ¶
func (_u *ComputeInstanceUpdateOne) AddVncPort(v int32) *ComputeInstanceUpdateOne
AddVncPort adds value to the "vnc_port" field.
func (*ComputeInstanceUpdateOne) ClearAgentID ¶
func (_u *ComputeInstanceUpdateOne) ClearAgentID() *ComputeInstanceUpdateOne
ClearAgentID clears the value of the "agent_id" field.
func (*ComputeInstanceUpdateOne) ClearContainerID ¶
func (_u *ComputeInstanceUpdateOne) ClearContainerID() *ComputeInstanceUpdateOne
ClearContainerID clears the value of the "container_id" field.
func (*ComputeInstanceUpdateOne) ClearPort ¶
func (_u *ComputeInstanceUpdateOne) ClearPort() *ComputeInstanceUpdateOne
ClearPort clears the value of the "port" field.
func (*ComputeInstanceUpdateOne) Exec ¶
func (_u *ComputeInstanceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeInstanceUpdateOne) ExecX ¶
func (_u *ComputeInstanceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceUpdateOne) Mutation ¶
func (_u *ComputeInstanceUpdateOne) Mutation() *ComputeInstanceMutation
Mutation returns the ComputeInstanceMutation object of the builder.
func (*ComputeInstanceUpdateOne) Save ¶
func (_u *ComputeInstanceUpdateOne) Save(ctx context.Context) (*ComputeInstance, error)
Save executes the query and returns the updated ComputeInstance entity.
func (*ComputeInstanceUpdateOne) SaveX ¶
func (_u *ComputeInstanceUpdateOne) SaveX(ctx context.Context) *ComputeInstance
SaveX is like Save, but panics if an error occurs.
func (*ComputeInstanceUpdateOne) Select ¶
func (_u *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) SetAgentID ¶
func (_u *ComputeInstanceUpdateOne) SetAgentID(v string) *ComputeInstanceUpdateOne
SetAgentID sets the "agent_id" field.
func (*ComputeInstanceUpdateOne) SetArch ¶ added in v0.0.12
func (_u *ComputeInstanceUpdateOne) SetArch(v string) *ComputeInstanceUpdateOne
SetArch sets the "arch" field.
func (*ComputeInstanceUpdateOne) SetBootType ¶ added in v0.0.12
func (_u *ComputeInstanceUpdateOne) SetBootType(v string) *ComputeInstanceUpdateOne
SetBootType sets the "boot_type" field.
func (*ComputeInstanceUpdateOne) SetContainerID ¶
func (_u *ComputeInstanceUpdateOne) SetContainerID(v string) *ComputeInstanceUpdateOne
SetContainerID sets the "container_id" field.
func (*ComputeInstanceUpdateOne) SetCore ¶
func (_u *ComputeInstanceUpdateOne) SetCore(v int) *ComputeInstanceUpdateOne
SetCore sets the "core" field.
func (*ComputeInstanceUpdateOne) SetCreateTime ¶
func (_u *ComputeInstanceUpdateOne) SetCreateTime(v time.Time) *ComputeInstanceUpdateOne
SetCreateTime sets the "create_time" field.
func (*ComputeInstanceUpdateOne) SetDockerCompose ¶
func (_u *ComputeInstanceUpdateOne) SetDockerCompose(v string) *ComputeInstanceUpdateOne
SetDockerCompose sets the "docker_compose" field.
func (*ComputeInstanceUpdateOne) SetExpirationTime ¶
func (_u *ComputeInstanceUpdateOne) SetExpirationTime(v time.Time) *ComputeInstanceUpdateOne
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceUpdateOne) SetImage ¶
func (_u *ComputeInstanceUpdateOne) SetImage(v string) *ComputeInstanceUpdateOne
SetImage sets the "image" field.
func (*ComputeInstanceUpdateOne) SetImageID ¶
func (_u *ComputeInstanceUpdateOne) SetImageID(v int32) *ComputeInstanceUpdateOne
SetImageID sets the "image_id" field.
func (*ComputeInstanceUpdateOne) SetMemory ¶
func (_u *ComputeInstanceUpdateOne) SetMemory(v int) *ComputeInstanceUpdateOne
SetMemory sets the "memory" field.
func (*ComputeInstanceUpdateOne) SetName ¶
func (_u *ComputeInstanceUpdateOne) SetName(v string) *ComputeInstanceUpdateOne
SetName sets the "name" field.
func (*ComputeInstanceUpdateOne) SetNillableAgentID ¶
func (_u *ComputeInstanceUpdateOne) SetNillableAgentID(v *string) *ComputeInstanceUpdateOne
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableArch ¶ added in v0.0.12
func (_u *ComputeInstanceUpdateOne) SetNillableArch(v *string) *ComputeInstanceUpdateOne
SetNillableArch sets the "arch" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableBootType ¶ added in v0.0.12
func (_u *ComputeInstanceUpdateOne) SetNillableBootType(v *string) *ComputeInstanceUpdateOne
SetNillableBootType sets the "boot_type" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableContainerID ¶
func (_u *ComputeInstanceUpdateOne) SetNillableContainerID(v *string) *ComputeInstanceUpdateOne
SetNillableContainerID sets the "container_id" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableCore ¶
func (_u *ComputeInstanceUpdateOne) SetNillableCore(v *int) *ComputeInstanceUpdateOne
SetNillableCore sets the "core" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableCreateTime ¶
func (_u *ComputeInstanceUpdateOne) SetNillableCreateTime(v *time.Time) *ComputeInstanceUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableDockerCompose ¶
func (_u *ComputeInstanceUpdateOne) SetNillableDockerCompose(v *string) *ComputeInstanceUpdateOne
SetNillableDockerCompose sets the "docker_compose" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableExpirationTime ¶
func (_u *ComputeInstanceUpdateOne) SetNillableExpirationTime(v *time.Time) *ComputeInstanceUpdateOne
SetNillableExpirationTime sets the "expiration_time" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableImage ¶
func (_u *ComputeInstanceUpdateOne) SetNillableImage(v *string) *ComputeInstanceUpdateOne
SetNillableImage sets the "image" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableImageID ¶
func (_u *ComputeInstanceUpdateOne) SetNillableImageID(v *int32) *ComputeInstanceUpdateOne
SetNillableImageID sets the "image_id" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableMemory ¶
func (_u *ComputeInstanceUpdateOne) SetNillableMemory(v *int) *ComputeInstanceUpdateOne
SetNillableMemory sets the "memory" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableName ¶
func (_u *ComputeInstanceUpdateOne) SetNillableName(v *string) *ComputeInstanceUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableOwner ¶
func (_u *ComputeInstanceUpdateOne) SetNillableOwner(v *string) *ComputeInstanceUpdateOne
SetNillableOwner sets the "owner" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillablePort ¶
func (_u *ComputeInstanceUpdateOne) SetNillablePort(v *string) *ComputeInstanceUpdateOne
SetNillablePort sets the "port" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableStatus ¶
func (_u *ComputeInstanceUpdateOne) SetNillableStatus(v *compute.InstanceStatus) *ComputeInstanceUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableVncIP ¶
func (_u *ComputeInstanceUpdateOne) SetNillableVncIP(v *string) *ComputeInstanceUpdateOne
SetNillableVncIP sets the "vnc_ip" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableVncPort ¶
func (_u *ComputeInstanceUpdateOne) SetNillableVncPort(v *int32) *ComputeInstanceUpdateOne
SetNillableVncPort sets the "vnc_port" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetOwner ¶
func (_u *ComputeInstanceUpdateOne) SetOwner(v string) *ComputeInstanceUpdateOne
SetOwner sets the "owner" field.
func (*ComputeInstanceUpdateOne) SetPort ¶
func (_u *ComputeInstanceUpdateOne) SetPort(v string) *ComputeInstanceUpdateOne
SetPort sets the "port" field.
func (*ComputeInstanceUpdateOne) SetStatus ¶
func (_u *ComputeInstanceUpdateOne) SetStatus(v compute.InstanceStatus) *ComputeInstanceUpdateOne
SetStatus sets the "status" field.
func (*ComputeInstanceUpdateOne) SetVncIP ¶
func (_u *ComputeInstanceUpdateOne) SetVncIP(v string) *ComputeInstanceUpdateOne
SetVncIP sets the "vnc_ip" field.
func (*ComputeInstanceUpdateOne) SetVncPort ¶
func (_u *ComputeInstanceUpdateOne) SetVncPort(v int32) *ComputeInstanceUpdateOne
SetVncPort sets the "vnc_port" field.
func (*ComputeInstanceUpdateOne) Where ¶
func (_u *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"`
// cpu核数
Core int `json:"core,omitempty"`
// 服务器内存G
Memory int `json:"memory,omitempty"`
// contains filtered or unexported fields
}
ComputeSpec is the model entity for the ComputeSpec schema.
func (*ComputeSpec) String ¶
func (_m *ComputeSpec) String() string
String implements the fmt.Stringer.
func (*ComputeSpec) Unwrap ¶
func (_m *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 (_m *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(_m *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) MapCreateBulk ¶
func (c *ComputeSpecClient) MapCreateBulk(slice any, setFunc func(*ComputeSpecCreate, int)) *ComputeSpecCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*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(_m *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 (_c *ComputeSpecCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecCreate) ExecX ¶
func (_c *ComputeSpecCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecCreate) Mutation ¶
func (_c *ComputeSpecCreate) Mutation() *ComputeSpecMutation
Mutation returns the ComputeSpecMutation object of the builder.
func (*ComputeSpecCreate) Save ¶
func (_c *ComputeSpecCreate) Save(ctx context.Context) (*ComputeSpec, error)
Save creates the ComputeSpec in the database.
func (*ComputeSpecCreate) SaveX ¶
func (_c *ComputeSpecCreate) SaveX(ctx context.Context) *ComputeSpec
SaveX calls Save and panics if Save returns an error.
func (*ComputeSpecCreate) SetCore ¶
func (_c *ComputeSpecCreate) SetCore(v int) *ComputeSpecCreate
SetCore sets the "core" field.
func (*ComputeSpecCreate) SetID ¶
func (_c *ComputeSpecCreate) SetID(v int32) *ComputeSpecCreate
SetID sets the "id" field.
func (*ComputeSpecCreate) SetMemory ¶
func (_c *ComputeSpecCreate) SetMemory(v int) *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 (_c *ComputeSpecCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecCreateBulk) ExecX ¶
func (_c *ComputeSpecCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecCreateBulk) Save ¶
func (_c *ComputeSpecCreateBulk) Save(ctx context.Context) ([]*ComputeSpec, error)
Save creates the ComputeSpec entities in the database.
func (*ComputeSpecCreateBulk) SaveX ¶
func (_c *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 (_d *ComputeSpecDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeSpecDelete) ExecX ¶
func (_d *ComputeSpecDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecDelete) Where ¶
func (_d *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 (_d *ComputeSpecDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeSpecDeleteOne) ExecX ¶
func (_d *ComputeSpecDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecDeleteOne) Where ¶
func (_d *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 (_g *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 (_g *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) AddCore ¶
func (m *ComputeSpecMutation) AddCore(i int)
AddCore adds i to the "core" field.
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) AddMemory ¶
func (m *ComputeSpecMutation) AddMemory(i int)
AddMemory adds i to the "memory" field.
func (*ComputeSpecMutation) AddedCore ¶
func (m *ComputeSpecMutation) AddedCore() (r int, exists bool)
AddedCore returns the value that was added to the "core" field in this mutation.
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) AddedMemory ¶
func (m *ComputeSpecMutation) AddedMemory() (r int, exists bool)
AddedMemory returns the value that was added to the "memory" field 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 int, 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 int, exists bool)
Memory returns the value of the "memory" field in the mutation.
func (*ComputeSpecMutation) OldCore ¶
func (m *ComputeSpecMutation) OldCore(ctx context.Context) (v int, 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 int, 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(i int)
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(i int)
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 ComputeSpecPrice ¶
type ComputeSpecPrice struct {
// ID of the ent.
ID int32 `json:"id,omitempty"`
// 资源规格id
FkComputeSpecID int32 `json:"fk_compute_spec_id,omitempty"`
// 天数
Day int32 `json:"day,omitempty"`
// 此天数的价格
Price float32 `json:"price,omitempty"`
// contains filtered or unexported fields
}
ComputeSpecPrice is the model entity for the ComputeSpecPrice schema.
func (*ComputeSpecPrice) String ¶
func (_m *ComputeSpecPrice) String() string
String implements the fmt.Stringer.
func (*ComputeSpecPrice) Unwrap ¶
func (_m *ComputeSpecPrice) Unwrap() *ComputeSpecPrice
Unwrap unwraps the ComputeSpecPrice 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 (*ComputeSpecPrice) Update ¶
func (_m *ComputeSpecPrice) Update() *ComputeSpecPriceUpdateOne
Update returns a builder for updating this ComputeSpecPrice. Note that you need to call ComputeSpecPrice.Unwrap() before calling this method if this ComputeSpecPrice was returned from a transaction, and the transaction was committed or rolled back.
type ComputeSpecPriceClient ¶
type ComputeSpecPriceClient struct {
// contains filtered or unexported fields
}
ComputeSpecPriceClient is a client for the ComputeSpecPrice schema.
func NewComputeSpecPriceClient ¶
func NewComputeSpecPriceClient(c config) *ComputeSpecPriceClient
NewComputeSpecPriceClient returns a client for the ComputeSpecPrice from the given config.
func (*ComputeSpecPriceClient) Create ¶
func (c *ComputeSpecPriceClient) Create() *ComputeSpecPriceCreate
Create returns a builder for creating a ComputeSpecPrice entity.
func (*ComputeSpecPriceClient) CreateBulk ¶
func (c *ComputeSpecPriceClient) CreateBulk(builders ...*ComputeSpecPriceCreate) *ComputeSpecPriceCreateBulk
CreateBulk returns a builder for creating a bulk of ComputeSpecPrice entities.
func (*ComputeSpecPriceClient) Delete ¶
func (c *ComputeSpecPriceClient) Delete() *ComputeSpecPriceDelete
Delete returns a delete builder for ComputeSpecPrice.
func (*ComputeSpecPriceClient) DeleteOne ¶
func (c *ComputeSpecPriceClient) DeleteOne(_m *ComputeSpecPrice) *ComputeSpecPriceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ComputeSpecPriceClient) DeleteOneID ¶
func (c *ComputeSpecPriceClient) DeleteOneID(id int32) *ComputeSpecPriceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ComputeSpecPriceClient) Get ¶
func (c *ComputeSpecPriceClient) Get(ctx context.Context, id int32) (*ComputeSpecPrice, error)
Get returns a ComputeSpecPrice entity by its id.
func (*ComputeSpecPriceClient) GetX ¶
func (c *ComputeSpecPriceClient) GetX(ctx context.Context, id int32) *ComputeSpecPrice
GetX is like Get, but panics if an error occurs.
func (*ComputeSpecPriceClient) Hooks ¶
func (c *ComputeSpecPriceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ComputeSpecPriceClient) Intercept ¶
func (c *ComputeSpecPriceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `computespecprice.Intercept(f(g(h())))`.
func (*ComputeSpecPriceClient) Interceptors ¶
func (c *ComputeSpecPriceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ComputeSpecPriceClient) MapCreateBulk ¶
func (c *ComputeSpecPriceClient) MapCreateBulk(slice any, setFunc func(*ComputeSpecPriceCreate, int)) *ComputeSpecPriceCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ComputeSpecPriceClient) Query ¶
func (c *ComputeSpecPriceClient) Query() *ComputeSpecPriceQuery
Query returns a query builder for ComputeSpecPrice.
func (*ComputeSpecPriceClient) Update ¶
func (c *ComputeSpecPriceClient) Update() *ComputeSpecPriceUpdate
Update returns an update builder for ComputeSpecPrice.
func (*ComputeSpecPriceClient) UpdateOne ¶
func (c *ComputeSpecPriceClient) UpdateOne(_m *ComputeSpecPrice) *ComputeSpecPriceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ComputeSpecPriceClient) UpdateOneID ¶
func (c *ComputeSpecPriceClient) UpdateOneID(id int32) *ComputeSpecPriceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ComputeSpecPriceClient) Use ¶
func (c *ComputeSpecPriceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `computespecprice.Hooks(f(g(h())))`.
type ComputeSpecPriceCreate ¶
type ComputeSpecPriceCreate struct {
// contains filtered or unexported fields
}
ComputeSpecPriceCreate is the builder for creating a ComputeSpecPrice entity.
func (*ComputeSpecPriceCreate) Exec ¶
func (_c *ComputeSpecPriceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecPriceCreate) ExecX ¶
func (_c *ComputeSpecPriceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecPriceCreate) Mutation ¶
func (_c *ComputeSpecPriceCreate) Mutation() *ComputeSpecPriceMutation
Mutation returns the ComputeSpecPriceMutation object of the builder.
func (*ComputeSpecPriceCreate) Save ¶
func (_c *ComputeSpecPriceCreate) Save(ctx context.Context) (*ComputeSpecPrice, error)
Save creates the ComputeSpecPrice in the database.
func (*ComputeSpecPriceCreate) SaveX ¶
func (_c *ComputeSpecPriceCreate) SaveX(ctx context.Context) *ComputeSpecPrice
SaveX calls Save and panics if Save returns an error.
func (*ComputeSpecPriceCreate) SetDay ¶
func (_c *ComputeSpecPriceCreate) SetDay(v int32) *ComputeSpecPriceCreate
SetDay sets the "day" field.
func (*ComputeSpecPriceCreate) SetFkComputeSpecID ¶
func (_c *ComputeSpecPriceCreate) SetFkComputeSpecID(v int32) *ComputeSpecPriceCreate
SetFkComputeSpecID sets the "fk_compute_spec_id" field.
func (*ComputeSpecPriceCreate) SetID ¶
func (_c *ComputeSpecPriceCreate) SetID(v int32) *ComputeSpecPriceCreate
SetID sets the "id" field.
func (*ComputeSpecPriceCreate) SetNillableDay ¶
func (_c *ComputeSpecPriceCreate) SetNillableDay(v *int32) *ComputeSpecPriceCreate
SetNillableDay sets the "day" field if the given value is not nil.
func (*ComputeSpecPriceCreate) SetNillablePrice ¶
func (_c *ComputeSpecPriceCreate) SetNillablePrice(v *float32) *ComputeSpecPriceCreate
SetNillablePrice sets the "price" field if the given value is not nil.
func (*ComputeSpecPriceCreate) SetPrice ¶
func (_c *ComputeSpecPriceCreate) SetPrice(v float32) *ComputeSpecPriceCreate
SetPrice sets the "price" field.
type ComputeSpecPriceCreateBulk ¶
type ComputeSpecPriceCreateBulk struct {
// contains filtered or unexported fields
}
ComputeSpecPriceCreateBulk is the builder for creating many ComputeSpecPrice entities in bulk.
func (*ComputeSpecPriceCreateBulk) Exec ¶
func (_c *ComputeSpecPriceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecPriceCreateBulk) ExecX ¶
func (_c *ComputeSpecPriceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecPriceCreateBulk) Save ¶
func (_c *ComputeSpecPriceCreateBulk) Save(ctx context.Context) ([]*ComputeSpecPrice, error)
Save creates the ComputeSpecPrice entities in the database.
func (*ComputeSpecPriceCreateBulk) SaveX ¶
func (_c *ComputeSpecPriceCreateBulk) SaveX(ctx context.Context) []*ComputeSpecPrice
SaveX is like Save, but panics if an error occurs.
type ComputeSpecPriceDelete ¶
type ComputeSpecPriceDelete struct {
// contains filtered or unexported fields
}
ComputeSpecPriceDelete is the builder for deleting a ComputeSpecPrice entity.
func (*ComputeSpecPriceDelete) Exec ¶
func (_d *ComputeSpecPriceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeSpecPriceDelete) ExecX ¶
func (_d *ComputeSpecPriceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecPriceDelete) Where ¶
func (_d *ComputeSpecPriceDelete) Where(ps ...predicate.ComputeSpecPrice) *ComputeSpecPriceDelete
Where appends a list predicates to the ComputeSpecPriceDelete builder.
type ComputeSpecPriceDeleteOne ¶
type ComputeSpecPriceDeleteOne struct {
// contains filtered or unexported fields
}
ComputeSpecPriceDeleteOne is the builder for deleting a single ComputeSpecPrice entity.
func (*ComputeSpecPriceDeleteOne) Exec ¶
func (_d *ComputeSpecPriceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeSpecPriceDeleteOne) ExecX ¶
func (_d *ComputeSpecPriceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecPriceDeleteOne) Where ¶
func (_d *ComputeSpecPriceDeleteOne) Where(ps ...predicate.ComputeSpecPrice) *ComputeSpecPriceDeleteOne
Where appends a list predicates to the ComputeSpecPriceDelete builder.
type ComputeSpecPriceGroupBy ¶
type ComputeSpecPriceGroupBy struct {
// contains filtered or unexported fields
}
ComputeSpecPriceGroupBy is the group-by builder for ComputeSpecPrice entities.
func (*ComputeSpecPriceGroupBy) Aggregate ¶
func (_g *ComputeSpecPriceGroupBy) Aggregate(fns ...AggregateFunc) *ComputeSpecPriceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ComputeSpecPriceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ComputeSpecPriceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceGroupBy) Scan ¶
func (_g *ComputeSpecPriceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeSpecPriceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeSpecPriceMutation ¶
type ComputeSpecPriceMutation struct {
// contains filtered or unexported fields
}
ComputeSpecPriceMutation represents an operation that mutates the ComputeSpecPrice nodes in the graph.
func (*ComputeSpecPriceMutation) AddDay ¶
func (m *ComputeSpecPriceMutation) AddDay(i int32)
AddDay adds i to the "day" field.
func (*ComputeSpecPriceMutation) AddField ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) AddFkComputeSpecID ¶
func (m *ComputeSpecPriceMutation) AddFkComputeSpecID(i int32)
AddFkComputeSpecID adds i to the "fk_compute_spec_id" field.
func (*ComputeSpecPriceMutation) AddPrice ¶
func (m *ComputeSpecPriceMutation) AddPrice(f float32)
AddPrice adds f to the "price" field.
func (*ComputeSpecPriceMutation) AddedDay ¶
func (m *ComputeSpecPriceMutation) AddedDay() (r int32, exists bool)
AddedDay returns the value that was added to the "day" field in this mutation.
func (*ComputeSpecPriceMutation) AddedEdges ¶
func (m *ComputeSpecPriceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ComputeSpecPriceMutation) AddedField ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) AddedFields ¶
func (m *ComputeSpecPriceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ComputeSpecPriceMutation) AddedFkComputeSpecID ¶
func (m *ComputeSpecPriceMutation) AddedFkComputeSpecID() (r int32, exists bool)
AddedFkComputeSpecID returns the value that was added to the "fk_compute_spec_id" field in this mutation.
func (*ComputeSpecPriceMutation) AddedIDs ¶
func (m *ComputeSpecPriceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ComputeSpecPriceMutation) AddedPrice ¶
func (m *ComputeSpecPriceMutation) AddedPrice() (r float32, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*ComputeSpecPriceMutation) ClearEdge ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) ClearField ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) ClearedEdges ¶
func (m *ComputeSpecPriceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ComputeSpecPriceMutation) ClearedFields ¶
func (m *ComputeSpecPriceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ComputeSpecPriceMutation) Client ¶
func (m ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) Day ¶
func (m *ComputeSpecPriceMutation) Day() (r int32, exists bool)
Day returns the value of the "day" field in the mutation.
func (*ComputeSpecPriceMutation) EdgeCleared ¶
func (m *ComputeSpecPriceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ComputeSpecPriceMutation) Field ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) FieldCleared ¶
func (m *ComputeSpecPriceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ComputeSpecPriceMutation) Fields ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) FkComputeSpecID ¶
func (m *ComputeSpecPriceMutation) FkComputeSpecID() (r int32, exists bool)
FkComputeSpecID returns the value of the "fk_compute_spec_id" field in the mutation.
func (*ComputeSpecPriceMutation) ID ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) IDs ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) OldDay ¶
func (m *ComputeSpecPriceMutation) OldDay(ctx context.Context) (v int32, err error)
OldDay returns the old "day" field's value of the ComputeSpecPrice entity. If the ComputeSpecPrice 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 (*ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) OldFkComputeSpecID ¶
func (m *ComputeSpecPriceMutation) OldFkComputeSpecID(ctx context.Context) (v int32, err error)
OldFkComputeSpecID returns the old "fk_compute_spec_id" field's value of the ComputeSpecPrice entity. If the ComputeSpecPrice 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 (*ComputeSpecPriceMutation) OldPrice ¶
func (m *ComputeSpecPriceMutation) OldPrice(ctx context.Context) (v float32, err error)
OldPrice returns the old "price" field's value of the ComputeSpecPrice entity. If the ComputeSpecPrice 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 (*ComputeSpecPriceMutation) Op ¶
func (m *ComputeSpecPriceMutation) Op() Op
Op returns the operation name.
func (*ComputeSpecPriceMutation) Price ¶
func (m *ComputeSpecPriceMutation) Price() (r float32, exists bool)
Price returns the value of the "price" field in the mutation.
func (*ComputeSpecPriceMutation) RemovedEdges ¶
func (m *ComputeSpecPriceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ComputeSpecPriceMutation) RemovedIDs ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) ResetDay ¶
func (m *ComputeSpecPriceMutation) ResetDay()
ResetDay resets all changes to the "day" field.
func (*ComputeSpecPriceMutation) ResetEdge ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) ResetField ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) ResetFkComputeSpecID ¶
func (m *ComputeSpecPriceMutation) ResetFkComputeSpecID()
ResetFkComputeSpecID resets all changes to the "fk_compute_spec_id" field.
func (*ComputeSpecPriceMutation) ResetPrice ¶
func (m *ComputeSpecPriceMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*ComputeSpecPriceMutation) SetDay ¶
func (m *ComputeSpecPriceMutation) SetDay(i int32)
SetDay sets the "day" field.
func (*ComputeSpecPriceMutation) SetField ¶
func (m *ComputeSpecPriceMutation) 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 (*ComputeSpecPriceMutation) SetFkComputeSpecID ¶
func (m *ComputeSpecPriceMutation) SetFkComputeSpecID(i int32)
SetFkComputeSpecID sets the "fk_compute_spec_id" field.
func (*ComputeSpecPriceMutation) SetID ¶
func (m *ComputeSpecPriceMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ComputeSpecPrice entities.
func (*ComputeSpecPriceMutation) SetOp ¶
func (m *ComputeSpecPriceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ComputeSpecPriceMutation) SetPrice ¶
func (m *ComputeSpecPriceMutation) SetPrice(f float32)
SetPrice sets the "price" field.
func (ComputeSpecPriceMutation) Tx ¶
func (m ComputeSpecPriceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ComputeSpecPriceMutation) Type ¶
func (m *ComputeSpecPriceMutation) Type() string
Type returns the node type of this mutation (ComputeSpecPrice).
func (*ComputeSpecPriceMutation) Where ¶
func (m *ComputeSpecPriceMutation) Where(ps ...predicate.ComputeSpecPrice)
Where appends a list predicates to the ComputeSpecPriceMutation builder.
func (*ComputeSpecPriceMutation) WhereP ¶
func (m *ComputeSpecPriceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ComputeSpecPriceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ComputeSpecPriceQuery ¶
type ComputeSpecPriceQuery struct {
// contains filtered or unexported fields
}
ComputeSpecPriceQuery is the builder for querying ComputeSpecPrice entities.
func (*ComputeSpecPriceQuery) Aggregate ¶
func (_q *ComputeSpecPriceQuery) Aggregate(fns ...AggregateFunc) *ComputeSpecPriceSelect
Aggregate returns a ComputeSpecPriceSelect configured with the given aggregations.
func (*ComputeSpecPriceQuery) All ¶
func (_q *ComputeSpecPriceQuery) All(ctx context.Context) ([]*ComputeSpecPrice, error)
All executes the query and returns a list of ComputeSpecPrices.
func (*ComputeSpecPriceQuery) AllX ¶
func (_q *ComputeSpecPriceQuery) AllX(ctx context.Context) []*ComputeSpecPrice
AllX is like All, but panics if an error occurs.
func (*ComputeSpecPriceQuery) Clone ¶
func (_q *ComputeSpecPriceQuery) Clone() *ComputeSpecPriceQuery
Clone returns a duplicate of the ComputeSpecPriceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ComputeSpecPriceQuery) Count ¶
func (_q *ComputeSpecPriceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeSpecPriceQuery) CountX ¶
func (_q *ComputeSpecPriceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeSpecPriceQuery) Exist ¶
func (_q *ComputeSpecPriceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeSpecPriceQuery) ExistX ¶
func (_q *ComputeSpecPriceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeSpecPriceQuery) First ¶
func (_q *ComputeSpecPriceQuery) First(ctx context.Context) (*ComputeSpecPrice, error)
First returns the first ComputeSpecPrice entity from the query. Returns a *NotFoundError when no ComputeSpecPrice was found.
func (*ComputeSpecPriceQuery) FirstID ¶
func (_q *ComputeSpecPriceQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first ComputeSpecPrice ID from the query. Returns a *NotFoundError when no ComputeSpecPrice ID was found.
func (*ComputeSpecPriceQuery) FirstIDX ¶
func (_q *ComputeSpecPriceQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeSpecPriceQuery) FirstX ¶
func (_q *ComputeSpecPriceQuery) FirstX(ctx context.Context) *ComputeSpecPrice
FirstX is like First, but panics if an error occurs.
func (*ComputeSpecPriceQuery) GroupBy ¶
func (_q *ComputeSpecPriceQuery) GroupBy(field string, fields ...string) *ComputeSpecPriceGroupBy
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 {
FkComputeSpecID int32 `json:"fk_compute_spec_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.ComputeSpecPrice.Query().
GroupBy(computespecprice.FieldFkComputeSpecID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ComputeSpecPriceQuery) IDs ¶
func (_q *ComputeSpecPriceQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of ComputeSpecPrice IDs.
func (*ComputeSpecPriceQuery) IDsX ¶
func (_q *ComputeSpecPriceQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ComputeSpecPriceQuery) Limit ¶
func (_q *ComputeSpecPriceQuery) Limit(limit int) *ComputeSpecPriceQuery
Limit the number of records to be returned by this query.
func (*ComputeSpecPriceQuery) Offset ¶
func (_q *ComputeSpecPriceQuery) Offset(offset int) *ComputeSpecPriceQuery
Offset to start from.
func (*ComputeSpecPriceQuery) Only ¶
func (_q *ComputeSpecPriceQuery) Only(ctx context.Context) (*ComputeSpecPrice, error)
Only returns a single ComputeSpecPrice entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ComputeSpecPrice entity is found. Returns a *NotFoundError when no ComputeSpecPrice entities are found.
func (*ComputeSpecPriceQuery) OnlyID ¶
func (_q *ComputeSpecPriceQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only ComputeSpecPrice ID in the query. Returns a *NotSingularError when more than one ComputeSpecPrice ID is found. Returns a *NotFoundError when no entities are found.
func (*ComputeSpecPriceQuery) OnlyIDX ¶
func (_q *ComputeSpecPriceQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeSpecPriceQuery) OnlyX ¶
func (_q *ComputeSpecPriceQuery) OnlyX(ctx context.Context) *ComputeSpecPrice
OnlyX is like Only, but panics if an error occurs.
func (*ComputeSpecPriceQuery) Order ¶
func (_q *ComputeSpecPriceQuery) Order(o ...computespecprice.OrderOption) *ComputeSpecPriceQuery
Order specifies how the records should be ordered.
func (*ComputeSpecPriceQuery) Select ¶
func (_q *ComputeSpecPriceQuery) Select(fields ...string) *ComputeSpecPriceSelect
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 {
FkComputeSpecID int32 `json:"fk_compute_spec_id,omitempty"`
}
client.ComputeSpecPrice.Query().
Select(computespecprice.FieldFkComputeSpecID).
Scan(ctx, &v)
func (*ComputeSpecPriceQuery) Unique ¶
func (_q *ComputeSpecPriceQuery) Unique(unique bool) *ComputeSpecPriceQuery
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 (*ComputeSpecPriceQuery) Where ¶
func (_q *ComputeSpecPriceQuery) Where(ps ...predicate.ComputeSpecPrice) *ComputeSpecPriceQuery
Where adds a new predicate for the ComputeSpecPriceQuery builder.
type ComputeSpecPriceSelect ¶
type ComputeSpecPriceSelect struct {
*ComputeSpecPriceQuery
// contains filtered or unexported fields
}
ComputeSpecPriceSelect is the builder for selecting fields of ComputeSpecPrice entities.
func (*ComputeSpecPriceSelect) Aggregate ¶
func (_s *ComputeSpecPriceSelect) Aggregate(fns ...AggregateFunc) *ComputeSpecPriceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ComputeSpecPriceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ComputeSpecPriceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeSpecPriceSelect) Scan ¶
func (_s *ComputeSpecPriceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeSpecPriceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeSpecPriceUpdate ¶
type ComputeSpecPriceUpdate struct {
// contains filtered or unexported fields
}
ComputeSpecPriceUpdate is the builder for updating ComputeSpecPrice entities.
func (*ComputeSpecPriceUpdate) AddDay ¶
func (_u *ComputeSpecPriceUpdate) AddDay(v int32) *ComputeSpecPriceUpdate
AddDay adds value to the "day" field.
func (*ComputeSpecPriceUpdate) AddFkComputeSpecID ¶
func (_u *ComputeSpecPriceUpdate) AddFkComputeSpecID(v int32) *ComputeSpecPriceUpdate
AddFkComputeSpecID adds value to the "fk_compute_spec_id" field.
func (*ComputeSpecPriceUpdate) AddPrice ¶
func (_u *ComputeSpecPriceUpdate) AddPrice(v float32) *ComputeSpecPriceUpdate
AddPrice adds value to the "price" field.
func (*ComputeSpecPriceUpdate) Exec ¶
func (_u *ComputeSpecPriceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecPriceUpdate) ExecX ¶
func (_u *ComputeSpecPriceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecPriceUpdate) Mutation ¶
func (_u *ComputeSpecPriceUpdate) Mutation() *ComputeSpecPriceMutation
Mutation returns the ComputeSpecPriceMutation object of the builder.
func (*ComputeSpecPriceUpdate) Save ¶
func (_u *ComputeSpecPriceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ComputeSpecPriceUpdate) SaveX ¶
func (_u *ComputeSpecPriceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeSpecPriceUpdate) SetDay ¶
func (_u *ComputeSpecPriceUpdate) SetDay(v int32) *ComputeSpecPriceUpdate
SetDay sets the "day" field.
func (*ComputeSpecPriceUpdate) SetFkComputeSpecID ¶
func (_u *ComputeSpecPriceUpdate) SetFkComputeSpecID(v int32) *ComputeSpecPriceUpdate
SetFkComputeSpecID sets the "fk_compute_spec_id" field.
func (*ComputeSpecPriceUpdate) SetNillableDay ¶
func (_u *ComputeSpecPriceUpdate) SetNillableDay(v *int32) *ComputeSpecPriceUpdate
SetNillableDay sets the "day" field if the given value is not nil.
func (*ComputeSpecPriceUpdate) SetNillableFkComputeSpecID ¶
func (_u *ComputeSpecPriceUpdate) SetNillableFkComputeSpecID(v *int32) *ComputeSpecPriceUpdate
SetNillableFkComputeSpecID sets the "fk_compute_spec_id" field if the given value is not nil.
func (*ComputeSpecPriceUpdate) SetNillablePrice ¶
func (_u *ComputeSpecPriceUpdate) SetNillablePrice(v *float32) *ComputeSpecPriceUpdate
SetNillablePrice sets the "price" field if the given value is not nil.
func (*ComputeSpecPriceUpdate) SetPrice ¶
func (_u *ComputeSpecPriceUpdate) SetPrice(v float32) *ComputeSpecPriceUpdate
SetPrice sets the "price" field.
func (*ComputeSpecPriceUpdate) Where ¶
func (_u *ComputeSpecPriceUpdate) Where(ps ...predicate.ComputeSpecPrice) *ComputeSpecPriceUpdate
Where appends a list predicates to the ComputeSpecPriceUpdate builder.
type ComputeSpecPriceUpdateOne ¶
type ComputeSpecPriceUpdateOne struct {
// contains filtered or unexported fields
}
ComputeSpecPriceUpdateOne is the builder for updating a single ComputeSpecPrice entity.
func (*ComputeSpecPriceUpdateOne) AddDay ¶
func (_u *ComputeSpecPriceUpdateOne) AddDay(v int32) *ComputeSpecPriceUpdateOne
AddDay adds value to the "day" field.
func (*ComputeSpecPriceUpdateOne) AddFkComputeSpecID ¶
func (_u *ComputeSpecPriceUpdateOne) AddFkComputeSpecID(v int32) *ComputeSpecPriceUpdateOne
AddFkComputeSpecID adds value to the "fk_compute_spec_id" field.
func (*ComputeSpecPriceUpdateOne) AddPrice ¶
func (_u *ComputeSpecPriceUpdateOne) AddPrice(v float32) *ComputeSpecPriceUpdateOne
AddPrice adds value to the "price" field.
func (*ComputeSpecPriceUpdateOne) Exec ¶
func (_u *ComputeSpecPriceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeSpecPriceUpdateOne) ExecX ¶
func (_u *ComputeSpecPriceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecPriceUpdateOne) Mutation ¶
func (_u *ComputeSpecPriceUpdateOne) Mutation() *ComputeSpecPriceMutation
Mutation returns the ComputeSpecPriceMutation object of the builder.
func (*ComputeSpecPriceUpdateOne) Save ¶
func (_u *ComputeSpecPriceUpdateOne) Save(ctx context.Context) (*ComputeSpecPrice, error)
Save executes the query and returns the updated ComputeSpecPrice entity.
func (*ComputeSpecPriceUpdateOne) SaveX ¶
func (_u *ComputeSpecPriceUpdateOne) SaveX(ctx context.Context) *ComputeSpecPrice
SaveX is like Save, but panics if an error occurs.
func (*ComputeSpecPriceUpdateOne) Select ¶
func (_u *ComputeSpecPriceUpdateOne) Select(field string, fields ...string) *ComputeSpecPriceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ComputeSpecPriceUpdateOne) SetDay ¶
func (_u *ComputeSpecPriceUpdateOne) SetDay(v int32) *ComputeSpecPriceUpdateOne
SetDay sets the "day" field.
func (*ComputeSpecPriceUpdateOne) SetFkComputeSpecID ¶
func (_u *ComputeSpecPriceUpdateOne) SetFkComputeSpecID(v int32) *ComputeSpecPriceUpdateOne
SetFkComputeSpecID sets the "fk_compute_spec_id" field.
func (*ComputeSpecPriceUpdateOne) SetNillableDay ¶
func (_u *ComputeSpecPriceUpdateOne) SetNillableDay(v *int32) *ComputeSpecPriceUpdateOne
SetNillableDay sets the "day" field if the given value is not nil.
func (*ComputeSpecPriceUpdateOne) SetNillableFkComputeSpecID ¶
func (_u *ComputeSpecPriceUpdateOne) SetNillableFkComputeSpecID(v *int32) *ComputeSpecPriceUpdateOne
SetNillableFkComputeSpecID sets the "fk_compute_spec_id" field if the given value is not nil.
func (*ComputeSpecPriceUpdateOne) SetNillablePrice ¶
func (_u *ComputeSpecPriceUpdateOne) SetNillablePrice(v *float32) *ComputeSpecPriceUpdateOne
SetNillablePrice sets the "price" field if the given value is not nil.
func (*ComputeSpecPriceUpdateOne) SetPrice ¶
func (_u *ComputeSpecPriceUpdateOne) SetPrice(v float32) *ComputeSpecPriceUpdateOne
SetPrice sets the "price" field.
func (*ComputeSpecPriceUpdateOne) Where ¶
func (_u *ComputeSpecPriceUpdateOne) Where(ps ...predicate.ComputeSpecPrice) *ComputeSpecPriceUpdateOne
Where appends a list predicates to the ComputeSpecPriceUpdate builder.
type ComputeSpecPrices ¶
type ComputeSpecPrices []*ComputeSpecPrice
ComputeSpecPrices is a parsable slice of ComputeSpecPrice.
type ComputeSpecQuery ¶
type ComputeSpecQuery struct {
// contains filtered or unexported fields
}
ComputeSpecQuery is the builder for querying ComputeSpec entities.
func (*ComputeSpecQuery) Aggregate ¶
func (_q *ComputeSpecQuery) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
Aggregate returns a ComputeSpecSelect configured with the given aggregations.
func (*ComputeSpecQuery) All ¶
func (_q *ComputeSpecQuery) All(ctx context.Context) ([]*ComputeSpec, error)
All executes the query and returns a list of ComputeSpecs.
func (*ComputeSpecQuery) AllX ¶
func (_q *ComputeSpecQuery) AllX(ctx context.Context) []*ComputeSpec
AllX is like All, but panics if an error occurs.
func (*ComputeSpecQuery) Clone ¶
func (_q *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 (_q *ComputeSpecQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeSpecQuery) CountX ¶
func (_q *ComputeSpecQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeSpecQuery) Exist ¶
func (_q *ComputeSpecQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeSpecQuery) ExistX ¶
func (_q *ComputeSpecQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeSpecQuery) First ¶
func (_q *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 (_q *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 (_q *ComputeSpecQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeSpecQuery) FirstX ¶
func (_q *ComputeSpecQuery) FirstX(ctx context.Context) *ComputeSpec
FirstX is like First, but panics if an error occurs.
func (*ComputeSpecQuery) GroupBy ¶
func (_q *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 int `json:"core,omitempty"`
Count int `json:"count,omitempty"`
}
client.ComputeSpec.Query().
GroupBy(computespec.FieldCore).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ComputeSpecQuery) IDs ¶
func (_q *ComputeSpecQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of ComputeSpec IDs.
func (*ComputeSpecQuery) IDsX ¶
func (_q *ComputeSpecQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ComputeSpecQuery) Limit ¶
func (_q *ComputeSpecQuery) Limit(limit int) *ComputeSpecQuery
Limit the number of records to be returned by this query.
func (*ComputeSpecQuery) Offset ¶
func (_q *ComputeSpecQuery) Offset(offset int) *ComputeSpecQuery
Offset to start from.
func (*ComputeSpecQuery) Only ¶
func (_q *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 (_q *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 (_q *ComputeSpecQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeSpecQuery) OnlyX ¶
func (_q *ComputeSpecQuery) OnlyX(ctx context.Context) *ComputeSpec
OnlyX is like Only, but panics if an error occurs.
func (*ComputeSpecQuery) Order ¶
func (_q *ComputeSpecQuery) Order(o ...computespec.OrderOption) *ComputeSpecQuery
Order specifies how the records should be ordered.
func (*ComputeSpecQuery) Select ¶
func (_q *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 int `json:"core,omitempty"`
}
client.ComputeSpec.Query().
Select(computespec.FieldCore).
Scan(ctx, &v)
func (*ComputeSpecQuery) Unique ¶
func (_q *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 (_q *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 (_s *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 (_s *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) AddCore ¶
func (_u *ComputeSpecUpdate) AddCore(v int) *ComputeSpecUpdate
AddCore adds value to the "core" field.
func (*ComputeSpecUpdate) AddMemory ¶
func (_u *ComputeSpecUpdate) AddMemory(v int) *ComputeSpecUpdate
AddMemory adds value to the "memory" field.
func (*ComputeSpecUpdate) Exec ¶
func (_u *ComputeSpecUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecUpdate) ExecX ¶
func (_u *ComputeSpecUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecUpdate) Mutation ¶
func (_u *ComputeSpecUpdate) Mutation() *ComputeSpecMutation
Mutation returns the ComputeSpecMutation object of the builder.
func (*ComputeSpecUpdate) Save ¶
func (_u *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 (_u *ComputeSpecUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeSpecUpdate) SetCore ¶
func (_u *ComputeSpecUpdate) SetCore(v int) *ComputeSpecUpdate
SetCore sets the "core" field.
func (*ComputeSpecUpdate) SetMemory ¶
func (_u *ComputeSpecUpdate) SetMemory(v int) *ComputeSpecUpdate
SetMemory sets the "memory" field.
func (*ComputeSpecUpdate) SetNillableCore ¶
func (_u *ComputeSpecUpdate) SetNillableCore(v *int) *ComputeSpecUpdate
SetNillableCore sets the "core" field if the given value is not nil.
func (*ComputeSpecUpdate) SetNillableMemory ¶
func (_u *ComputeSpecUpdate) SetNillableMemory(v *int) *ComputeSpecUpdate
SetNillableMemory sets the "memory" field if the given value is not nil.
func (*ComputeSpecUpdate) Where ¶
func (_u *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) AddCore ¶
func (_u *ComputeSpecUpdateOne) AddCore(v int) *ComputeSpecUpdateOne
AddCore adds value to the "core" field.
func (*ComputeSpecUpdateOne) AddMemory ¶
func (_u *ComputeSpecUpdateOne) AddMemory(v int) *ComputeSpecUpdateOne
AddMemory adds value to the "memory" field.
func (*ComputeSpecUpdateOne) Exec ¶
func (_u *ComputeSpecUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeSpecUpdateOne) ExecX ¶
func (_u *ComputeSpecUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecUpdateOne) Mutation ¶
func (_u *ComputeSpecUpdateOne) Mutation() *ComputeSpecMutation
Mutation returns the ComputeSpecMutation object of the builder.
func (*ComputeSpecUpdateOne) Save ¶
func (_u *ComputeSpecUpdateOne) Save(ctx context.Context) (*ComputeSpec, error)
Save executes the query and returns the updated ComputeSpec entity.
func (*ComputeSpecUpdateOne) SaveX ¶
func (_u *ComputeSpecUpdateOne) SaveX(ctx context.Context) *ComputeSpec
SaveX is like Save, but panics if an error occurs.
func (*ComputeSpecUpdateOne) Select ¶
func (_u *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 (_u *ComputeSpecUpdateOne) SetCore(v int) *ComputeSpecUpdateOne
SetCore sets the "core" field.
func (*ComputeSpecUpdateOne) SetMemory ¶
func (_u *ComputeSpecUpdateOne) SetMemory(v int) *ComputeSpecUpdateOne
SetMemory sets the "memory" field.
func (*ComputeSpecUpdateOne) SetNillableCore ¶
func (_u *ComputeSpecUpdateOne) SetNillableCore(v *int) *ComputeSpecUpdateOne
SetNillableCore sets the "core" field if the given value is not nil.
func (*ComputeSpecUpdateOne) SetNillableMemory ¶
func (_u *ComputeSpecUpdateOne) SetNillableMemory(v *int) *ComputeSpecUpdateOne
SetNillableMemory sets the "memory" field if the given value is not nil.
func (*ComputeSpecUpdateOne) Where ¶
func (_u *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 Cycle ¶
type Cycle struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// Cycle holds the value of the "cycle" field.
Cycle float64 `json:"cycle,omitempty"`
// CreateTime holds the value of the "create_time" field.
CreateTime time.Time `json:"create_time,omitempty"`
// UpdateTime holds the value of the "update_time" field.
UpdateTime time.Time `json:"update_time,omitempty"`
// contains filtered or unexported fields
}
Cycle is the model entity for the Cycle schema.
func (*Cycle) Unwrap ¶
Unwrap unwraps the Cycle 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 (*Cycle) Update ¶
func (_m *Cycle) Update() *CycleUpdateOne
Update returns a builder for updating this Cycle. Note that you need to call Cycle.Unwrap() before calling this method if this Cycle was returned from a transaction, and the transaction was committed or rolled back.
type CycleClient ¶
type CycleClient struct {
// contains filtered or unexported fields
}
CycleClient is a client for the Cycle schema.
func NewCycleClient ¶
func NewCycleClient(c config) *CycleClient
NewCycleClient returns a client for the Cycle from the given config.
func (*CycleClient) Create ¶
func (c *CycleClient) Create() *CycleCreate
Create returns a builder for creating a Cycle entity.
func (*CycleClient) CreateBulk ¶
func (c *CycleClient) CreateBulk(builders ...*CycleCreate) *CycleCreateBulk
CreateBulk returns a builder for creating a bulk of Cycle entities.
func (*CycleClient) Delete ¶
func (c *CycleClient) Delete() *CycleDelete
Delete returns a delete builder for Cycle.
func (*CycleClient) DeleteOne ¶
func (c *CycleClient) DeleteOne(_m *Cycle) *CycleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CycleClient) DeleteOneID ¶
func (c *CycleClient) DeleteOneID(id uuid.UUID) *CycleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CycleClient) Intercept ¶
func (c *CycleClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cycle.Intercept(f(g(h())))`.
func (*CycleClient) Interceptors ¶
func (c *CycleClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CycleClient) MapCreateBulk ¶
func (c *CycleClient) MapCreateBulk(slice any, setFunc func(*CycleCreate, int)) *CycleCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CycleClient) Query ¶
func (c *CycleClient) Query() *CycleQuery
Query returns a query builder for Cycle.
func (*CycleClient) Update ¶
func (c *CycleClient) Update() *CycleUpdate
Update returns an update builder for Cycle.
func (*CycleClient) UpdateOne ¶
func (c *CycleClient) UpdateOne(_m *Cycle) *CycleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CycleClient) UpdateOneID ¶
func (c *CycleClient) UpdateOneID(id uuid.UUID) *CycleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CycleClient) Use ¶
func (c *CycleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cycle.Hooks(f(g(h())))`.
type CycleCreate ¶
type CycleCreate struct {
// contains filtered or unexported fields
}
CycleCreate is the builder for creating a Cycle entity.
func (*CycleCreate) Exec ¶
func (_c *CycleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleCreate) ExecX ¶
func (_c *CycleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleCreate) Mutation ¶
func (_c *CycleCreate) Mutation() *CycleMutation
Mutation returns the CycleMutation object of the builder.
func (*CycleCreate) Save ¶
func (_c *CycleCreate) Save(ctx context.Context) (*Cycle, error)
Save creates the Cycle in the database.
func (*CycleCreate) SaveX ¶
func (_c *CycleCreate) SaveX(ctx context.Context) *Cycle
SaveX calls Save and panics if Save returns an error.
func (*CycleCreate) SetCreateTime ¶
func (_c *CycleCreate) SetCreateTime(v time.Time) *CycleCreate
SetCreateTime sets the "create_time" field.
func (*CycleCreate) SetCycle ¶
func (_c *CycleCreate) SetCycle(v float64) *CycleCreate
SetCycle sets the "cycle" field.
func (*CycleCreate) SetFkUserID ¶
func (_c *CycleCreate) SetFkUserID(v uuid.UUID) *CycleCreate
SetFkUserID sets the "fk_user_id" field.
func (*CycleCreate) SetID ¶
func (_c *CycleCreate) SetID(v uuid.UUID) *CycleCreate
SetID sets the "id" field.
func (*CycleCreate) SetNillableID ¶
func (_c *CycleCreate) SetNillableID(v *uuid.UUID) *CycleCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CycleCreate) SetUpdateTime ¶
func (_c *CycleCreate) SetUpdateTime(v time.Time) *CycleCreate
SetUpdateTime sets the "update_time" field.
type CycleCreateBulk ¶
type CycleCreateBulk struct {
// contains filtered or unexported fields
}
CycleCreateBulk is the builder for creating many Cycle entities in bulk.
func (*CycleCreateBulk) Exec ¶
func (_c *CycleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleCreateBulk) ExecX ¶
func (_c *CycleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CycleDelete ¶
type CycleDelete struct {
// contains filtered or unexported fields
}
CycleDelete is the builder for deleting a Cycle entity.
func (*CycleDelete) Exec ¶
func (_d *CycleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CycleDelete) ExecX ¶
func (_d *CycleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CycleDelete) Where ¶
func (_d *CycleDelete) Where(ps ...predicate.Cycle) *CycleDelete
Where appends a list predicates to the CycleDelete builder.
type CycleDeleteOne ¶
type CycleDeleteOne struct {
// contains filtered or unexported fields
}
CycleDeleteOne is the builder for deleting a single Cycle entity.
func (*CycleDeleteOne) Exec ¶
func (_d *CycleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CycleDeleteOne) ExecX ¶
func (_d *CycleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleDeleteOne) Where ¶
func (_d *CycleDeleteOne) Where(ps ...predicate.Cycle) *CycleDeleteOne
Where appends a list predicates to the CycleDelete builder.
type CycleGroupBy ¶
type CycleGroupBy struct {
// contains filtered or unexported fields
}
CycleGroupBy is the group-by builder for Cycle entities.
func (*CycleGroupBy) Aggregate ¶
func (_g *CycleGroupBy) Aggregate(fns ...AggregateFunc) *CycleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CycleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleGroupBy) Scan ¶
func (_g *CycleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleMutation ¶
type CycleMutation struct {
// contains filtered or unexported fields
}
CycleMutation represents an operation that mutates the Cycle nodes in the graph.
func (*CycleMutation) AddCycle ¶
func (m *CycleMutation) AddCycle(f float64)
AddCycle adds f to the "cycle" field.
func (*CycleMutation) AddField ¶
func (m *CycleMutation) 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 (*CycleMutation) AddedCycle ¶
func (m *CycleMutation) AddedCycle() (r float64, exists bool)
AddedCycle returns the value that was added to the "cycle" field in this mutation.
func (*CycleMutation) AddedEdges ¶
func (m *CycleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CycleMutation) AddedField ¶
func (m *CycleMutation) 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 (*CycleMutation) AddedFields ¶
func (m *CycleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CycleMutation) AddedIDs ¶
func (m *CycleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CycleMutation) ClearEdge ¶
func (m *CycleMutation) 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 (*CycleMutation) ClearField ¶
func (m *CycleMutation) 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 (*CycleMutation) ClearedEdges ¶
func (m *CycleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CycleMutation) ClearedFields ¶
func (m *CycleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CycleMutation) Client ¶
func (m CycleMutation) 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 (*CycleMutation) CreateTime ¶
func (m *CycleMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*CycleMutation) Cycle ¶
func (m *CycleMutation) Cycle() (r float64, exists bool)
Cycle returns the value of the "cycle" field in the mutation.
func (*CycleMutation) EdgeCleared ¶
func (m *CycleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CycleMutation) Field ¶
func (m *CycleMutation) 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 (*CycleMutation) FieldCleared ¶
func (m *CycleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CycleMutation) Fields ¶
func (m *CycleMutation) 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 (*CycleMutation) FkUserID ¶
func (m *CycleMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*CycleMutation) ID ¶
func (m *CycleMutation) 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 (*CycleMutation) 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 (*CycleMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Cycle entity. If the Cycle 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 (*CycleMutation) OldCycle ¶
func (m *CycleMutation) OldCycle(ctx context.Context) (v float64, err error)
OldCycle returns the old "cycle" field's value of the Cycle entity. If the Cycle 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 (*CycleMutation) 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 (*CycleMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the Cycle entity. If the Cycle 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 (*CycleMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Cycle entity. If the Cycle 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 (*CycleMutation) RemovedEdges ¶
func (m *CycleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CycleMutation) RemovedIDs ¶
func (m *CycleMutation) 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 (*CycleMutation) ResetCreateTime ¶
func (m *CycleMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*CycleMutation) ResetCycle ¶
func (m *CycleMutation) ResetCycle()
ResetCycle resets all changes to the "cycle" field.
func (*CycleMutation) ResetEdge ¶
func (m *CycleMutation) 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 (*CycleMutation) ResetField ¶
func (m *CycleMutation) 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 (*CycleMutation) ResetFkUserID ¶
func (m *CycleMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*CycleMutation) ResetUpdateTime ¶
func (m *CycleMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*CycleMutation) SetCreateTime ¶
func (m *CycleMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*CycleMutation) SetCycle ¶
func (m *CycleMutation) SetCycle(f float64)
SetCycle sets the "cycle" field.
func (*CycleMutation) SetField ¶
func (m *CycleMutation) 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 (*CycleMutation) SetFkUserID ¶
func (m *CycleMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*CycleMutation) SetID ¶
func (m *CycleMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Cycle entities.
func (*CycleMutation) SetOp ¶
func (m *CycleMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CycleMutation) SetUpdateTime ¶
func (m *CycleMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (CycleMutation) Tx ¶
func (m CycleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CycleMutation) Type ¶
func (m *CycleMutation) Type() string
Type returns the node type of this mutation (Cycle).
func (*CycleMutation) UpdateTime ¶
func (m *CycleMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*CycleMutation) Where ¶
func (m *CycleMutation) Where(ps ...predicate.Cycle)
Where appends a list predicates to the CycleMutation builder.
func (*CycleMutation) WhereP ¶
func (m *CycleMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CycleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CycleOrder ¶
type CycleOrder struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// 订单编号
OrderNo string `json:"order_no,omitempty"`
// 产品名字
ProductName string `json:"product_name,omitempty"`
// 产品描述
ProductDesc string `json:"product_desc,omitempty"`
// symbol
Symbol string `json:"symbol,omitempty"`
// Cycle holds the value of the "cycle" field.
Cycle float64 `json:"cycle,omitempty"`
// 资源id,可为空
ResourceID *string `json:"resource_id,omitempty"`
// CreateTime holds the value of the "create_time" field.
CreateTime time.Time `json:"create_time,omitempty"`
// contains filtered or unexported fields
}
CycleOrder is the model entity for the CycleOrder schema.
func (*CycleOrder) String ¶
func (_m *CycleOrder) String() string
String implements the fmt.Stringer.
func (*CycleOrder) Unwrap ¶
func (_m *CycleOrder) Unwrap() *CycleOrder
Unwrap unwraps the CycleOrder 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 (*CycleOrder) Update ¶
func (_m *CycleOrder) Update() *CycleOrderUpdateOne
Update returns a builder for updating this CycleOrder. Note that you need to call CycleOrder.Unwrap() before calling this method if this CycleOrder was returned from a transaction, and the transaction was committed or rolled back.
type CycleOrderClient ¶
type CycleOrderClient struct {
// contains filtered or unexported fields
}
CycleOrderClient is a client for the CycleOrder schema.
func NewCycleOrderClient ¶
func NewCycleOrderClient(c config) *CycleOrderClient
NewCycleOrderClient returns a client for the CycleOrder from the given config.
func (*CycleOrderClient) Create ¶
func (c *CycleOrderClient) Create() *CycleOrderCreate
Create returns a builder for creating a CycleOrder entity.
func (*CycleOrderClient) CreateBulk ¶
func (c *CycleOrderClient) CreateBulk(builders ...*CycleOrderCreate) *CycleOrderCreateBulk
CreateBulk returns a builder for creating a bulk of CycleOrder entities.
func (*CycleOrderClient) Delete ¶
func (c *CycleOrderClient) Delete() *CycleOrderDelete
Delete returns a delete builder for CycleOrder.
func (*CycleOrderClient) DeleteOne ¶
func (c *CycleOrderClient) DeleteOne(_m *CycleOrder) *CycleOrderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CycleOrderClient) DeleteOneID ¶
func (c *CycleOrderClient) DeleteOneID(id uuid.UUID) *CycleOrderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CycleOrderClient) Get ¶
func (c *CycleOrderClient) Get(ctx context.Context, id uuid.UUID) (*CycleOrder, error)
Get returns a CycleOrder entity by its id.
func (*CycleOrderClient) GetX ¶
func (c *CycleOrderClient) GetX(ctx context.Context, id uuid.UUID) *CycleOrder
GetX is like Get, but panics if an error occurs.
func (*CycleOrderClient) Hooks ¶
func (c *CycleOrderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CycleOrderClient) Intercept ¶
func (c *CycleOrderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cycleorder.Intercept(f(g(h())))`.
func (*CycleOrderClient) Interceptors ¶
func (c *CycleOrderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CycleOrderClient) MapCreateBulk ¶
func (c *CycleOrderClient) MapCreateBulk(slice any, setFunc func(*CycleOrderCreate, int)) *CycleOrderCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CycleOrderClient) Query ¶
func (c *CycleOrderClient) Query() *CycleOrderQuery
Query returns a query builder for CycleOrder.
func (*CycleOrderClient) Update ¶
func (c *CycleOrderClient) Update() *CycleOrderUpdate
Update returns an update builder for CycleOrder.
func (*CycleOrderClient) UpdateOne ¶
func (c *CycleOrderClient) UpdateOne(_m *CycleOrder) *CycleOrderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CycleOrderClient) UpdateOneID ¶
func (c *CycleOrderClient) UpdateOneID(id uuid.UUID) *CycleOrderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CycleOrderClient) Use ¶
func (c *CycleOrderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cycleorder.Hooks(f(g(h())))`.
type CycleOrderCreate ¶
type CycleOrderCreate struct {
// contains filtered or unexported fields
}
CycleOrderCreate is the builder for creating a CycleOrder entity.
func (*CycleOrderCreate) Exec ¶
func (_c *CycleOrderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleOrderCreate) ExecX ¶
func (_c *CycleOrderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleOrderCreate) Mutation ¶
func (_c *CycleOrderCreate) Mutation() *CycleOrderMutation
Mutation returns the CycleOrderMutation object of the builder.
func (*CycleOrderCreate) Save ¶
func (_c *CycleOrderCreate) Save(ctx context.Context) (*CycleOrder, error)
Save creates the CycleOrder in the database.
func (*CycleOrderCreate) SaveX ¶
func (_c *CycleOrderCreate) SaveX(ctx context.Context) *CycleOrder
SaveX calls Save and panics if Save returns an error.
func (*CycleOrderCreate) SetCreateTime ¶
func (_c *CycleOrderCreate) SetCreateTime(v time.Time) *CycleOrderCreate
SetCreateTime sets the "create_time" field.
func (*CycleOrderCreate) SetCycle ¶
func (_c *CycleOrderCreate) SetCycle(v float64) *CycleOrderCreate
SetCycle sets the "cycle" field.
func (*CycleOrderCreate) SetFkUserID ¶
func (_c *CycleOrderCreate) SetFkUserID(v uuid.UUID) *CycleOrderCreate
SetFkUserID sets the "fk_user_id" field.
func (*CycleOrderCreate) SetID ¶
func (_c *CycleOrderCreate) SetID(v uuid.UUID) *CycleOrderCreate
SetID sets the "id" field.
func (*CycleOrderCreate) SetNillableID ¶
func (_c *CycleOrderCreate) SetNillableID(v *uuid.UUID) *CycleOrderCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CycleOrderCreate) SetNillableResourceID ¶
func (_c *CycleOrderCreate) SetNillableResourceID(v *string) *CycleOrderCreate
SetNillableResourceID sets the "resource_id" field if the given value is not nil.
func (*CycleOrderCreate) SetOrderNo ¶
func (_c *CycleOrderCreate) SetOrderNo(v string) *CycleOrderCreate
SetOrderNo sets the "order_no" field.
func (*CycleOrderCreate) SetProductDesc ¶
func (_c *CycleOrderCreate) SetProductDesc(v string) *CycleOrderCreate
SetProductDesc sets the "product_desc" field.
func (*CycleOrderCreate) SetProductName ¶
func (_c *CycleOrderCreate) SetProductName(v string) *CycleOrderCreate
SetProductName sets the "product_name" field.
func (*CycleOrderCreate) SetResourceID ¶
func (_c *CycleOrderCreate) SetResourceID(v string) *CycleOrderCreate
SetResourceID sets the "resource_id" field.
func (*CycleOrderCreate) SetSymbol ¶
func (_c *CycleOrderCreate) SetSymbol(v string) *CycleOrderCreate
SetSymbol sets the "symbol" field.
type CycleOrderCreateBulk ¶
type CycleOrderCreateBulk struct {
// contains filtered or unexported fields
}
CycleOrderCreateBulk is the builder for creating many CycleOrder entities in bulk.
func (*CycleOrderCreateBulk) Exec ¶
func (_c *CycleOrderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleOrderCreateBulk) ExecX ¶
func (_c *CycleOrderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleOrderCreateBulk) Save ¶
func (_c *CycleOrderCreateBulk) Save(ctx context.Context) ([]*CycleOrder, error)
Save creates the CycleOrder entities in the database.
func (*CycleOrderCreateBulk) SaveX ¶
func (_c *CycleOrderCreateBulk) SaveX(ctx context.Context) []*CycleOrder
SaveX is like Save, but panics if an error occurs.
type CycleOrderDelete ¶
type CycleOrderDelete struct {
// contains filtered or unexported fields
}
CycleOrderDelete is the builder for deleting a CycleOrder entity.
func (*CycleOrderDelete) Exec ¶
func (_d *CycleOrderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CycleOrderDelete) ExecX ¶
func (_d *CycleOrderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CycleOrderDelete) Where ¶
func (_d *CycleOrderDelete) Where(ps ...predicate.CycleOrder) *CycleOrderDelete
Where appends a list predicates to the CycleOrderDelete builder.
type CycleOrderDeleteOne ¶
type CycleOrderDeleteOne struct {
// contains filtered or unexported fields
}
CycleOrderDeleteOne is the builder for deleting a single CycleOrder entity.
func (*CycleOrderDeleteOne) Exec ¶
func (_d *CycleOrderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CycleOrderDeleteOne) ExecX ¶
func (_d *CycleOrderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleOrderDeleteOne) Where ¶
func (_d *CycleOrderDeleteOne) Where(ps ...predicate.CycleOrder) *CycleOrderDeleteOne
Where appends a list predicates to the CycleOrderDelete builder.
type CycleOrderGroupBy ¶
type CycleOrderGroupBy struct {
// contains filtered or unexported fields
}
CycleOrderGroupBy is the group-by builder for CycleOrder entities.
func (*CycleOrderGroupBy) Aggregate ¶
func (_g *CycleOrderGroupBy) Aggregate(fns ...AggregateFunc) *CycleOrderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CycleOrderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleOrderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleOrderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleOrderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleOrderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleOrderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleOrderGroupBy) Scan ¶
func (_g *CycleOrderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleOrderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleOrderMutation ¶
type CycleOrderMutation struct {
// contains filtered or unexported fields
}
CycleOrderMutation represents an operation that mutates the CycleOrder nodes in the graph.
func (*CycleOrderMutation) AddCycle ¶
func (m *CycleOrderMutation) AddCycle(f float64)
AddCycle adds f to the "cycle" field.
func (*CycleOrderMutation) AddField ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) AddedCycle ¶
func (m *CycleOrderMutation) AddedCycle() (r float64, exists bool)
AddedCycle returns the value that was added to the "cycle" field in this mutation.
func (*CycleOrderMutation) AddedEdges ¶
func (m *CycleOrderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CycleOrderMutation) AddedField ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) AddedFields ¶
func (m *CycleOrderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CycleOrderMutation) AddedIDs ¶
func (m *CycleOrderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CycleOrderMutation) ClearEdge ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) ClearField ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) ClearResourceID ¶
func (m *CycleOrderMutation) ClearResourceID()
ClearResourceID clears the value of the "resource_id" field.
func (*CycleOrderMutation) ClearedEdges ¶
func (m *CycleOrderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CycleOrderMutation) ClearedFields ¶
func (m *CycleOrderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CycleOrderMutation) Client ¶
func (m CycleOrderMutation) 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 (*CycleOrderMutation) CreateTime ¶
func (m *CycleOrderMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*CycleOrderMutation) Cycle ¶
func (m *CycleOrderMutation) Cycle() (r float64, exists bool)
Cycle returns the value of the "cycle" field in the mutation.
func (*CycleOrderMutation) EdgeCleared ¶
func (m *CycleOrderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CycleOrderMutation) Field ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) FieldCleared ¶
func (m *CycleOrderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CycleOrderMutation) Fields ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) FkUserID ¶
func (m *CycleOrderMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*CycleOrderMutation) ID ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) 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 (*CycleOrderMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the CycleOrder entity. If the CycleOrder 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 (*CycleOrderMutation) OldCycle ¶
func (m *CycleOrderMutation) OldCycle(ctx context.Context) (v float64, err error)
OldCycle returns the old "cycle" field's value of the CycleOrder entity. If the CycleOrder 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 (*CycleOrderMutation) 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 (*CycleOrderMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the CycleOrder entity. If the CycleOrder 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 (*CycleOrderMutation) OldOrderNo ¶
func (m *CycleOrderMutation) OldOrderNo(ctx context.Context) (v string, err error)
OldOrderNo returns the old "order_no" field's value of the CycleOrder entity. If the CycleOrder 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 (*CycleOrderMutation) OldProductDesc ¶
func (m *CycleOrderMutation) OldProductDesc(ctx context.Context) (v string, err error)
OldProductDesc returns the old "product_desc" field's value of the CycleOrder entity. If the CycleOrder 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 (*CycleOrderMutation) OldProductName ¶
func (m *CycleOrderMutation) OldProductName(ctx context.Context) (v string, err error)
OldProductName returns the old "product_name" field's value of the CycleOrder entity. If the CycleOrder 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 (*CycleOrderMutation) OldResourceID ¶
func (m *CycleOrderMutation) OldResourceID(ctx context.Context) (v *string, err error)
OldResourceID returns the old "resource_id" field's value of the CycleOrder entity. If the CycleOrder 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 (*CycleOrderMutation) OldSymbol ¶
func (m *CycleOrderMutation) OldSymbol(ctx context.Context) (v string, err error)
OldSymbol returns the old "symbol" field's value of the CycleOrder entity. If the CycleOrder 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 (*CycleOrderMutation) OrderNo ¶
func (m *CycleOrderMutation) OrderNo() (r string, exists bool)
OrderNo returns the value of the "order_no" field in the mutation.
func (*CycleOrderMutation) ProductDesc ¶
func (m *CycleOrderMutation) ProductDesc() (r string, exists bool)
ProductDesc returns the value of the "product_desc" field in the mutation.
func (*CycleOrderMutation) ProductName ¶
func (m *CycleOrderMutation) ProductName() (r string, exists bool)
ProductName returns the value of the "product_name" field in the mutation.
func (*CycleOrderMutation) RemovedEdges ¶
func (m *CycleOrderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CycleOrderMutation) RemovedIDs ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) ResetCreateTime ¶
func (m *CycleOrderMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*CycleOrderMutation) ResetCycle ¶
func (m *CycleOrderMutation) ResetCycle()
ResetCycle resets all changes to the "cycle" field.
func (*CycleOrderMutation) ResetEdge ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) ResetField ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) ResetFkUserID ¶
func (m *CycleOrderMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*CycleOrderMutation) ResetOrderNo ¶
func (m *CycleOrderMutation) ResetOrderNo()
ResetOrderNo resets all changes to the "order_no" field.
func (*CycleOrderMutation) ResetProductDesc ¶
func (m *CycleOrderMutation) ResetProductDesc()
ResetProductDesc resets all changes to the "product_desc" field.
func (*CycleOrderMutation) ResetProductName ¶
func (m *CycleOrderMutation) ResetProductName()
ResetProductName resets all changes to the "product_name" field.
func (*CycleOrderMutation) ResetResourceID ¶
func (m *CycleOrderMutation) ResetResourceID()
ResetResourceID resets all changes to the "resource_id" field.
func (*CycleOrderMutation) ResetSymbol ¶
func (m *CycleOrderMutation) ResetSymbol()
ResetSymbol resets all changes to the "symbol" field.
func (*CycleOrderMutation) ResourceID ¶
func (m *CycleOrderMutation) ResourceID() (r string, exists bool)
ResourceID returns the value of the "resource_id" field in the mutation.
func (*CycleOrderMutation) ResourceIDCleared ¶
func (m *CycleOrderMutation) ResourceIDCleared() bool
ResourceIDCleared returns if the "resource_id" field was cleared in this mutation.
func (*CycleOrderMutation) SetCreateTime ¶
func (m *CycleOrderMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*CycleOrderMutation) SetCycle ¶
func (m *CycleOrderMutation) SetCycle(f float64)
SetCycle sets the "cycle" field.
func (*CycleOrderMutation) SetField ¶
func (m *CycleOrderMutation) 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 (*CycleOrderMutation) SetFkUserID ¶
func (m *CycleOrderMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*CycleOrderMutation) SetID ¶
func (m *CycleOrderMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CycleOrder entities.
func (*CycleOrderMutation) SetOp ¶
func (m *CycleOrderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CycleOrderMutation) SetOrderNo ¶
func (m *CycleOrderMutation) SetOrderNo(s string)
SetOrderNo sets the "order_no" field.
func (*CycleOrderMutation) SetProductDesc ¶
func (m *CycleOrderMutation) SetProductDesc(s string)
SetProductDesc sets the "product_desc" field.
func (*CycleOrderMutation) SetProductName ¶
func (m *CycleOrderMutation) SetProductName(s string)
SetProductName sets the "product_name" field.
func (*CycleOrderMutation) SetResourceID ¶
func (m *CycleOrderMutation) SetResourceID(s string)
SetResourceID sets the "resource_id" field.
func (*CycleOrderMutation) SetSymbol ¶
func (m *CycleOrderMutation) SetSymbol(s string)
SetSymbol sets the "symbol" field.
func (*CycleOrderMutation) Symbol ¶
func (m *CycleOrderMutation) Symbol() (r string, exists bool)
Symbol returns the value of the "symbol" field in the mutation.
func (CycleOrderMutation) Tx ¶
func (m CycleOrderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CycleOrderMutation) Type ¶
func (m *CycleOrderMutation) Type() string
Type returns the node type of this mutation (CycleOrder).
func (*CycleOrderMutation) Where ¶
func (m *CycleOrderMutation) Where(ps ...predicate.CycleOrder)
Where appends a list predicates to the CycleOrderMutation builder.
func (*CycleOrderMutation) WhereP ¶
func (m *CycleOrderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CycleOrderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CycleOrderQuery ¶
type CycleOrderQuery struct {
// contains filtered or unexported fields
}
CycleOrderQuery is the builder for querying CycleOrder entities.
func (*CycleOrderQuery) Aggregate ¶
func (_q *CycleOrderQuery) Aggregate(fns ...AggregateFunc) *CycleOrderSelect
Aggregate returns a CycleOrderSelect configured with the given aggregations.
func (*CycleOrderQuery) All ¶
func (_q *CycleOrderQuery) All(ctx context.Context) ([]*CycleOrder, error)
All executes the query and returns a list of CycleOrders.
func (*CycleOrderQuery) AllX ¶
func (_q *CycleOrderQuery) AllX(ctx context.Context) []*CycleOrder
AllX is like All, but panics if an error occurs.
func (*CycleOrderQuery) Clone ¶
func (_q *CycleOrderQuery) Clone() *CycleOrderQuery
Clone returns a duplicate of the CycleOrderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CycleOrderQuery) Count ¶
func (_q *CycleOrderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CycleOrderQuery) CountX ¶
func (_q *CycleOrderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CycleOrderQuery) Exist ¶
func (_q *CycleOrderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CycleOrderQuery) ExistX ¶
func (_q *CycleOrderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CycleOrderQuery) First ¶
func (_q *CycleOrderQuery) First(ctx context.Context) (*CycleOrder, error)
First returns the first CycleOrder entity from the query. Returns a *NotFoundError when no CycleOrder was found.
func (*CycleOrderQuery) FirstID ¶
FirstID returns the first CycleOrder ID from the query. Returns a *NotFoundError when no CycleOrder ID was found.
func (*CycleOrderQuery) FirstIDX ¶
func (_q *CycleOrderQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CycleOrderQuery) FirstX ¶
func (_q *CycleOrderQuery) FirstX(ctx context.Context) *CycleOrder
FirstX is like First, but panics if an error occurs.
func (*CycleOrderQuery) GroupBy ¶
func (_q *CycleOrderQuery) GroupBy(field string, fields ...string) *CycleOrderGroupBy
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.CycleOrder.Query().
GroupBy(cycleorder.FieldFkUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CycleOrderQuery) IDsX ¶
func (_q *CycleOrderQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CycleOrderQuery) Limit ¶
func (_q *CycleOrderQuery) Limit(limit int) *CycleOrderQuery
Limit the number of records to be returned by this query.
func (*CycleOrderQuery) Offset ¶
func (_q *CycleOrderQuery) Offset(offset int) *CycleOrderQuery
Offset to start from.
func (*CycleOrderQuery) Only ¶
func (_q *CycleOrderQuery) Only(ctx context.Context) (*CycleOrder, error)
Only returns a single CycleOrder entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CycleOrder entity is found. Returns a *NotFoundError when no CycleOrder entities are found.
func (*CycleOrderQuery) OnlyID ¶
OnlyID is like Only, but returns the only CycleOrder ID in the query. Returns a *NotSingularError when more than one CycleOrder ID is found. Returns a *NotFoundError when no entities are found.
func (*CycleOrderQuery) OnlyIDX ¶
func (_q *CycleOrderQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CycleOrderQuery) OnlyX ¶
func (_q *CycleOrderQuery) OnlyX(ctx context.Context) *CycleOrder
OnlyX is like Only, but panics if an error occurs.
func (*CycleOrderQuery) Order ¶
func (_q *CycleOrderQuery) Order(o ...cycleorder.OrderOption) *CycleOrderQuery
Order specifies how the records should be ordered.
func (*CycleOrderQuery) Select ¶
func (_q *CycleOrderQuery) Select(fields ...string) *CycleOrderSelect
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
}
client.CycleOrder.Query().
Select(cycleorder.FieldFkUserID).
Scan(ctx, &v)
func (*CycleOrderQuery) Unique ¶
func (_q *CycleOrderQuery) Unique(unique bool) *CycleOrderQuery
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 (*CycleOrderQuery) Where ¶
func (_q *CycleOrderQuery) Where(ps ...predicate.CycleOrder) *CycleOrderQuery
Where adds a new predicate for the CycleOrderQuery builder.
type CycleOrderSelect ¶
type CycleOrderSelect struct {
*CycleOrderQuery
// contains filtered or unexported fields
}
CycleOrderSelect is the builder for selecting fields of CycleOrder entities.
func (*CycleOrderSelect) Aggregate ¶
func (_s *CycleOrderSelect) Aggregate(fns ...AggregateFunc) *CycleOrderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CycleOrderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleOrderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleOrderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleOrderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleOrderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleOrderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleOrderSelect) Scan ¶
func (_s *CycleOrderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleOrderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleOrderUpdate ¶
type CycleOrderUpdate struct {
// contains filtered or unexported fields
}
CycleOrderUpdate is the builder for updating CycleOrder entities.
func (*CycleOrderUpdate) AddCycle ¶
func (_u *CycleOrderUpdate) AddCycle(v float64) *CycleOrderUpdate
AddCycle adds value to the "cycle" field.
func (*CycleOrderUpdate) ClearResourceID ¶
func (_u *CycleOrderUpdate) ClearResourceID() *CycleOrderUpdate
ClearResourceID clears the value of the "resource_id" field.
func (*CycleOrderUpdate) Exec ¶
func (_u *CycleOrderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleOrderUpdate) ExecX ¶
func (_u *CycleOrderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleOrderUpdate) Mutation ¶
func (_u *CycleOrderUpdate) Mutation() *CycleOrderMutation
Mutation returns the CycleOrderMutation object of the builder.
func (*CycleOrderUpdate) Save ¶
func (_u *CycleOrderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CycleOrderUpdate) SaveX ¶
func (_u *CycleOrderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CycleOrderUpdate) SetCreateTime ¶
func (_u *CycleOrderUpdate) SetCreateTime(v time.Time) *CycleOrderUpdate
SetCreateTime sets the "create_time" field.
func (*CycleOrderUpdate) SetCycle ¶
func (_u *CycleOrderUpdate) SetCycle(v float64) *CycleOrderUpdate
SetCycle sets the "cycle" field.
func (*CycleOrderUpdate) SetFkUserID ¶
func (_u *CycleOrderUpdate) SetFkUserID(v uuid.UUID) *CycleOrderUpdate
SetFkUserID sets the "fk_user_id" field.
func (*CycleOrderUpdate) SetNillableCreateTime ¶
func (_u *CycleOrderUpdate) SetNillableCreateTime(v *time.Time) *CycleOrderUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CycleOrderUpdate) SetNillableCycle ¶
func (_u *CycleOrderUpdate) SetNillableCycle(v *float64) *CycleOrderUpdate
SetNillableCycle sets the "cycle" field if the given value is not nil.
func (*CycleOrderUpdate) SetNillableFkUserID ¶
func (_u *CycleOrderUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleOrderUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleOrderUpdate) SetNillableOrderNo ¶
func (_u *CycleOrderUpdate) SetNillableOrderNo(v *string) *CycleOrderUpdate
SetNillableOrderNo sets the "order_no" field if the given value is not nil.
func (*CycleOrderUpdate) SetNillableProductDesc ¶
func (_u *CycleOrderUpdate) SetNillableProductDesc(v *string) *CycleOrderUpdate
SetNillableProductDesc sets the "product_desc" field if the given value is not nil.
func (*CycleOrderUpdate) SetNillableProductName ¶
func (_u *CycleOrderUpdate) SetNillableProductName(v *string) *CycleOrderUpdate
SetNillableProductName sets the "product_name" field if the given value is not nil.
func (*CycleOrderUpdate) SetNillableResourceID ¶
func (_u *CycleOrderUpdate) SetNillableResourceID(v *string) *CycleOrderUpdate
SetNillableResourceID sets the "resource_id" field if the given value is not nil.
func (*CycleOrderUpdate) SetNillableSymbol ¶
func (_u *CycleOrderUpdate) SetNillableSymbol(v *string) *CycleOrderUpdate
SetNillableSymbol sets the "symbol" field if the given value is not nil.
func (*CycleOrderUpdate) SetOrderNo ¶
func (_u *CycleOrderUpdate) SetOrderNo(v string) *CycleOrderUpdate
SetOrderNo sets the "order_no" field.
func (*CycleOrderUpdate) SetProductDesc ¶
func (_u *CycleOrderUpdate) SetProductDesc(v string) *CycleOrderUpdate
SetProductDesc sets the "product_desc" field.
func (*CycleOrderUpdate) SetProductName ¶
func (_u *CycleOrderUpdate) SetProductName(v string) *CycleOrderUpdate
SetProductName sets the "product_name" field.
func (*CycleOrderUpdate) SetResourceID ¶
func (_u *CycleOrderUpdate) SetResourceID(v string) *CycleOrderUpdate
SetResourceID sets the "resource_id" field.
func (*CycleOrderUpdate) SetSymbol ¶
func (_u *CycleOrderUpdate) SetSymbol(v string) *CycleOrderUpdate
SetSymbol sets the "symbol" field.
func (*CycleOrderUpdate) Where ¶
func (_u *CycleOrderUpdate) Where(ps ...predicate.CycleOrder) *CycleOrderUpdate
Where appends a list predicates to the CycleOrderUpdate builder.
type CycleOrderUpdateOne ¶
type CycleOrderUpdateOne struct {
// contains filtered or unexported fields
}
CycleOrderUpdateOne is the builder for updating a single CycleOrder entity.
func (*CycleOrderUpdateOne) AddCycle ¶
func (_u *CycleOrderUpdateOne) AddCycle(v float64) *CycleOrderUpdateOne
AddCycle adds value to the "cycle" field.
func (*CycleOrderUpdateOne) ClearResourceID ¶
func (_u *CycleOrderUpdateOne) ClearResourceID() *CycleOrderUpdateOne
ClearResourceID clears the value of the "resource_id" field.
func (*CycleOrderUpdateOne) Exec ¶
func (_u *CycleOrderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CycleOrderUpdateOne) ExecX ¶
func (_u *CycleOrderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleOrderUpdateOne) Mutation ¶
func (_u *CycleOrderUpdateOne) Mutation() *CycleOrderMutation
Mutation returns the CycleOrderMutation object of the builder.
func (*CycleOrderUpdateOne) Save ¶
func (_u *CycleOrderUpdateOne) Save(ctx context.Context) (*CycleOrder, error)
Save executes the query and returns the updated CycleOrder entity.
func (*CycleOrderUpdateOne) SaveX ¶
func (_u *CycleOrderUpdateOne) SaveX(ctx context.Context) *CycleOrder
SaveX is like Save, but panics if an error occurs.
func (*CycleOrderUpdateOne) Select ¶
func (_u *CycleOrderUpdateOne) Select(field string, fields ...string) *CycleOrderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CycleOrderUpdateOne) SetCreateTime ¶
func (_u *CycleOrderUpdateOne) SetCreateTime(v time.Time) *CycleOrderUpdateOne
SetCreateTime sets the "create_time" field.
func (*CycleOrderUpdateOne) SetCycle ¶
func (_u *CycleOrderUpdateOne) SetCycle(v float64) *CycleOrderUpdateOne
SetCycle sets the "cycle" field.
func (*CycleOrderUpdateOne) SetFkUserID ¶
func (_u *CycleOrderUpdateOne) SetFkUserID(v uuid.UUID) *CycleOrderUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*CycleOrderUpdateOne) SetNillableCreateTime ¶
func (_u *CycleOrderUpdateOne) SetNillableCreateTime(v *time.Time) *CycleOrderUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CycleOrderUpdateOne) SetNillableCycle ¶
func (_u *CycleOrderUpdateOne) SetNillableCycle(v *float64) *CycleOrderUpdateOne
SetNillableCycle sets the "cycle" field if the given value is not nil.
func (*CycleOrderUpdateOne) SetNillableFkUserID ¶
func (_u *CycleOrderUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleOrderUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleOrderUpdateOne) SetNillableOrderNo ¶
func (_u *CycleOrderUpdateOne) SetNillableOrderNo(v *string) *CycleOrderUpdateOne
SetNillableOrderNo sets the "order_no" field if the given value is not nil.
func (*CycleOrderUpdateOne) SetNillableProductDesc ¶
func (_u *CycleOrderUpdateOne) SetNillableProductDesc(v *string) *CycleOrderUpdateOne
SetNillableProductDesc sets the "product_desc" field if the given value is not nil.
func (*CycleOrderUpdateOne) SetNillableProductName ¶
func (_u *CycleOrderUpdateOne) SetNillableProductName(v *string) *CycleOrderUpdateOne
SetNillableProductName sets the "product_name" field if the given value is not nil.
func (*CycleOrderUpdateOne) SetNillableResourceID ¶
func (_u *CycleOrderUpdateOne) SetNillableResourceID(v *string) *CycleOrderUpdateOne
SetNillableResourceID sets the "resource_id" field if the given value is not nil.
func (*CycleOrderUpdateOne) SetNillableSymbol ¶
func (_u *CycleOrderUpdateOne) SetNillableSymbol(v *string) *CycleOrderUpdateOne
SetNillableSymbol sets the "symbol" field if the given value is not nil.
func (*CycleOrderUpdateOne) SetOrderNo ¶
func (_u *CycleOrderUpdateOne) SetOrderNo(v string) *CycleOrderUpdateOne
SetOrderNo sets the "order_no" field.
func (*CycleOrderUpdateOne) SetProductDesc ¶
func (_u *CycleOrderUpdateOne) SetProductDesc(v string) *CycleOrderUpdateOne
SetProductDesc sets the "product_desc" field.
func (*CycleOrderUpdateOne) SetProductName ¶
func (_u *CycleOrderUpdateOne) SetProductName(v string) *CycleOrderUpdateOne
SetProductName sets the "product_name" field.
func (*CycleOrderUpdateOne) SetResourceID ¶
func (_u *CycleOrderUpdateOne) SetResourceID(v string) *CycleOrderUpdateOne
SetResourceID sets the "resource_id" field.
func (*CycleOrderUpdateOne) SetSymbol ¶
func (_u *CycleOrderUpdateOne) SetSymbol(v string) *CycleOrderUpdateOne
SetSymbol sets the "symbol" field.
func (*CycleOrderUpdateOne) Where ¶
func (_u *CycleOrderUpdateOne) Where(ps ...predicate.CycleOrder) *CycleOrderUpdateOne
Where appends a list predicates to the CycleOrderUpdate builder.
type CycleQuery ¶
type CycleQuery struct {
// contains filtered or unexported fields
}
CycleQuery is the builder for querying Cycle entities.
func (*CycleQuery) Aggregate ¶
func (_q *CycleQuery) Aggregate(fns ...AggregateFunc) *CycleSelect
Aggregate returns a CycleSelect configured with the given aggregations.
func (*CycleQuery) All ¶
func (_q *CycleQuery) All(ctx context.Context) ([]*Cycle, error)
All executes the query and returns a list of Cycles.
func (*CycleQuery) AllX ¶
func (_q *CycleQuery) AllX(ctx context.Context) []*Cycle
AllX is like All, but panics if an error occurs.
func (*CycleQuery) Clone ¶
func (_q *CycleQuery) Clone() *CycleQuery
Clone returns a duplicate of the CycleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CycleQuery) Count ¶
func (_q *CycleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CycleQuery) CountX ¶
func (_q *CycleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CycleQuery) Exist ¶
func (_q *CycleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CycleQuery) ExistX ¶
func (_q *CycleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CycleQuery) First ¶
func (_q *CycleQuery) First(ctx context.Context) (*Cycle, error)
First returns the first Cycle entity from the query. Returns a *NotFoundError when no Cycle was found.
func (*CycleQuery) FirstID ¶
FirstID returns the first Cycle ID from the query. Returns a *NotFoundError when no Cycle ID was found.
func (*CycleQuery) FirstIDX ¶
func (_q *CycleQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CycleQuery) FirstX ¶
func (_q *CycleQuery) FirstX(ctx context.Context) *Cycle
FirstX is like First, but panics if an error occurs.
func (*CycleQuery) GroupBy ¶
func (_q *CycleQuery) GroupBy(field string, fields ...string) *CycleGroupBy
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Cycle.Query().
GroupBy(cycle.FieldFkUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CycleQuery) IDsX ¶
func (_q *CycleQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CycleQuery) Limit ¶
func (_q *CycleQuery) Limit(limit int) *CycleQuery
Limit the number of records to be returned by this query.
func (*CycleQuery) Offset ¶
func (_q *CycleQuery) Offset(offset int) *CycleQuery
Offset to start from.
func (*CycleQuery) Only ¶
func (_q *CycleQuery) Only(ctx context.Context) (*Cycle, error)
Only returns a single Cycle entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Cycle entity is found. Returns a *NotFoundError when no Cycle entities are found.
func (*CycleQuery) OnlyID ¶
OnlyID is like Only, but returns the only Cycle ID in the query. Returns a *NotSingularError when more than one Cycle ID is found. Returns a *NotFoundError when no entities are found.
func (*CycleQuery) OnlyIDX ¶
func (_q *CycleQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CycleQuery) OnlyX ¶
func (_q *CycleQuery) OnlyX(ctx context.Context) *Cycle
OnlyX is like Only, but panics if an error occurs.
func (*CycleQuery) Order ¶
func (_q *CycleQuery) Order(o ...cycle.OrderOption) *CycleQuery
Order specifies how the records should be ordered.
func (*CycleQuery) Select ¶
func (_q *CycleQuery) Select(fields ...string) *CycleSelect
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
}
client.Cycle.Query().
Select(cycle.FieldFkUserID).
Scan(ctx, &v)
func (*CycleQuery) Unique ¶
func (_q *CycleQuery) Unique(unique bool) *CycleQuery
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 (*CycleQuery) Where ¶
func (_q *CycleQuery) Where(ps ...predicate.Cycle) *CycleQuery
Where adds a new predicate for the CycleQuery builder.
type CycleRecharge ¶
type CycleRecharge struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// 商家订单号
OutTradeNo string `json:"out_trade_no,omitempty"`
// 支付宝订单号
AlipayTradeNo string `json:"alipay_trade_no,omitempty"`
// 充值渠道
RechargeChannel int `json:"recharge_channel,omitempty"`
// 兑换码
RedeemCode string `json:"redeem_code,omitempty"`
// 状态
State string `json:"state,omitempty"`
// 支付的钱
PayAmount float64 `json:"pay_amount,omitempty"`
// 收到的钱
TotalAmount float64 `json:"total_amount,omitempty"`
// 购买的周期
BuyCycle float64 `json:"buy_cycle,omitempty"`
// 创建时间
CreateTime time.Time `json:"create_time,omitempty"`
// 更新时间
UpdateTime time.Time `json:"update_time,omitempty"`
// contains filtered or unexported fields
}
CycleRecharge is the model entity for the CycleRecharge schema.
func (*CycleRecharge) String ¶
func (_m *CycleRecharge) String() string
String implements the fmt.Stringer.
func (*CycleRecharge) Unwrap ¶
func (_m *CycleRecharge) Unwrap() *CycleRecharge
Unwrap unwraps the CycleRecharge 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 (*CycleRecharge) Update ¶
func (_m *CycleRecharge) Update() *CycleRechargeUpdateOne
Update returns a builder for updating this CycleRecharge. Note that you need to call CycleRecharge.Unwrap() before calling this method if this CycleRecharge was returned from a transaction, and the transaction was committed or rolled back.
type CycleRechargeClient ¶
type CycleRechargeClient struct {
// contains filtered or unexported fields
}
CycleRechargeClient is a client for the CycleRecharge schema.
func NewCycleRechargeClient ¶
func NewCycleRechargeClient(c config) *CycleRechargeClient
NewCycleRechargeClient returns a client for the CycleRecharge from the given config.
func (*CycleRechargeClient) Create ¶
func (c *CycleRechargeClient) Create() *CycleRechargeCreate
Create returns a builder for creating a CycleRecharge entity.
func (*CycleRechargeClient) CreateBulk ¶
func (c *CycleRechargeClient) CreateBulk(builders ...*CycleRechargeCreate) *CycleRechargeCreateBulk
CreateBulk returns a builder for creating a bulk of CycleRecharge entities.
func (*CycleRechargeClient) Delete ¶
func (c *CycleRechargeClient) Delete() *CycleRechargeDelete
Delete returns a delete builder for CycleRecharge.
func (*CycleRechargeClient) DeleteOne ¶
func (c *CycleRechargeClient) DeleteOne(_m *CycleRecharge) *CycleRechargeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CycleRechargeClient) DeleteOneID ¶
func (c *CycleRechargeClient) DeleteOneID(id uuid.UUID) *CycleRechargeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CycleRechargeClient) Get ¶
func (c *CycleRechargeClient) Get(ctx context.Context, id uuid.UUID) (*CycleRecharge, error)
Get returns a CycleRecharge entity by its id.
func (*CycleRechargeClient) GetX ¶
func (c *CycleRechargeClient) GetX(ctx context.Context, id uuid.UUID) *CycleRecharge
GetX is like Get, but panics if an error occurs.
func (*CycleRechargeClient) Hooks ¶
func (c *CycleRechargeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CycleRechargeClient) Intercept ¶
func (c *CycleRechargeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cyclerecharge.Intercept(f(g(h())))`.
func (*CycleRechargeClient) Interceptors ¶
func (c *CycleRechargeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CycleRechargeClient) MapCreateBulk ¶
func (c *CycleRechargeClient) MapCreateBulk(slice any, setFunc func(*CycleRechargeCreate, int)) *CycleRechargeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CycleRechargeClient) Query ¶
func (c *CycleRechargeClient) Query() *CycleRechargeQuery
Query returns a query builder for CycleRecharge.
func (*CycleRechargeClient) Update ¶
func (c *CycleRechargeClient) Update() *CycleRechargeUpdate
Update returns an update builder for CycleRecharge.
func (*CycleRechargeClient) UpdateOne ¶
func (c *CycleRechargeClient) UpdateOne(_m *CycleRecharge) *CycleRechargeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CycleRechargeClient) UpdateOneID ¶
func (c *CycleRechargeClient) UpdateOneID(id uuid.UUID) *CycleRechargeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CycleRechargeClient) Use ¶
func (c *CycleRechargeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cyclerecharge.Hooks(f(g(h())))`.
type CycleRechargeCreate ¶
type CycleRechargeCreate struct {
// contains filtered or unexported fields
}
CycleRechargeCreate is the builder for creating a CycleRecharge entity.
func (*CycleRechargeCreate) Exec ¶
func (_c *CycleRechargeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleRechargeCreate) ExecX ¶
func (_c *CycleRechargeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRechargeCreate) Mutation ¶
func (_c *CycleRechargeCreate) Mutation() *CycleRechargeMutation
Mutation returns the CycleRechargeMutation object of the builder.
func (*CycleRechargeCreate) Save ¶
func (_c *CycleRechargeCreate) Save(ctx context.Context) (*CycleRecharge, error)
Save creates the CycleRecharge in the database.
func (*CycleRechargeCreate) SaveX ¶
func (_c *CycleRechargeCreate) SaveX(ctx context.Context) *CycleRecharge
SaveX calls Save and panics if Save returns an error.
func (*CycleRechargeCreate) SetAlipayTradeNo ¶
func (_c *CycleRechargeCreate) SetAlipayTradeNo(v string) *CycleRechargeCreate
SetAlipayTradeNo sets the "alipay_trade_no" field.
func (*CycleRechargeCreate) SetBuyCycle ¶
func (_c *CycleRechargeCreate) SetBuyCycle(v float64) *CycleRechargeCreate
SetBuyCycle sets the "buy_cycle" field.
func (*CycleRechargeCreate) SetCreateTime ¶
func (_c *CycleRechargeCreate) SetCreateTime(v time.Time) *CycleRechargeCreate
SetCreateTime sets the "create_time" field.
func (*CycleRechargeCreate) SetFkUserID ¶
func (_c *CycleRechargeCreate) SetFkUserID(v uuid.UUID) *CycleRechargeCreate
SetFkUserID sets the "fk_user_id" field.
func (*CycleRechargeCreate) SetID ¶
func (_c *CycleRechargeCreate) SetID(v uuid.UUID) *CycleRechargeCreate
SetID sets the "id" field.
func (*CycleRechargeCreate) SetNillableID ¶
func (_c *CycleRechargeCreate) SetNillableID(v *uuid.UUID) *CycleRechargeCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CycleRechargeCreate) SetOutTradeNo ¶
func (_c *CycleRechargeCreate) SetOutTradeNo(v string) *CycleRechargeCreate
SetOutTradeNo sets the "out_trade_no" field.
func (*CycleRechargeCreate) SetPayAmount ¶
func (_c *CycleRechargeCreate) SetPayAmount(v float64) *CycleRechargeCreate
SetPayAmount sets the "pay_amount" field.
func (*CycleRechargeCreate) SetRechargeChannel ¶
func (_c *CycleRechargeCreate) SetRechargeChannel(v int) *CycleRechargeCreate
SetRechargeChannel sets the "recharge_channel" field.
func (*CycleRechargeCreate) SetRedeemCode ¶
func (_c *CycleRechargeCreate) SetRedeemCode(v string) *CycleRechargeCreate
SetRedeemCode sets the "redeem_code" field.
func (*CycleRechargeCreate) SetState ¶
func (_c *CycleRechargeCreate) SetState(v string) *CycleRechargeCreate
SetState sets the "state" field.
func (*CycleRechargeCreate) SetTotalAmount ¶
func (_c *CycleRechargeCreate) SetTotalAmount(v float64) *CycleRechargeCreate
SetTotalAmount sets the "total_amount" field.
func (*CycleRechargeCreate) SetUpdateTime ¶
func (_c *CycleRechargeCreate) SetUpdateTime(v time.Time) *CycleRechargeCreate
SetUpdateTime sets the "update_time" field.
type CycleRechargeCreateBulk ¶
type CycleRechargeCreateBulk struct {
// contains filtered or unexported fields
}
CycleRechargeCreateBulk is the builder for creating many CycleRecharge entities in bulk.
func (*CycleRechargeCreateBulk) Exec ¶
func (_c *CycleRechargeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleRechargeCreateBulk) ExecX ¶
func (_c *CycleRechargeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRechargeCreateBulk) Save ¶
func (_c *CycleRechargeCreateBulk) Save(ctx context.Context) ([]*CycleRecharge, error)
Save creates the CycleRecharge entities in the database.
func (*CycleRechargeCreateBulk) SaveX ¶
func (_c *CycleRechargeCreateBulk) SaveX(ctx context.Context) []*CycleRecharge
SaveX is like Save, but panics if an error occurs.
type CycleRechargeDelete ¶
type CycleRechargeDelete struct {
// contains filtered or unexported fields
}
CycleRechargeDelete is the builder for deleting a CycleRecharge entity.
func (*CycleRechargeDelete) Exec ¶
func (_d *CycleRechargeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CycleRechargeDelete) ExecX ¶
func (_d *CycleRechargeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CycleRechargeDelete) Where ¶
func (_d *CycleRechargeDelete) Where(ps ...predicate.CycleRecharge) *CycleRechargeDelete
Where appends a list predicates to the CycleRechargeDelete builder.
type CycleRechargeDeleteOne ¶
type CycleRechargeDeleteOne struct {
// contains filtered or unexported fields
}
CycleRechargeDeleteOne is the builder for deleting a single CycleRecharge entity.
func (*CycleRechargeDeleteOne) Exec ¶
func (_d *CycleRechargeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CycleRechargeDeleteOne) ExecX ¶
func (_d *CycleRechargeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRechargeDeleteOne) Where ¶
func (_d *CycleRechargeDeleteOne) Where(ps ...predicate.CycleRecharge) *CycleRechargeDeleteOne
Where appends a list predicates to the CycleRechargeDelete builder.
type CycleRechargeGroupBy ¶
type CycleRechargeGroupBy struct {
// contains filtered or unexported fields
}
CycleRechargeGroupBy is the group-by builder for CycleRecharge entities.
func (*CycleRechargeGroupBy) Aggregate ¶
func (_g *CycleRechargeGroupBy) Aggregate(fns ...AggregateFunc) *CycleRechargeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CycleRechargeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleRechargeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleRechargeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleRechargeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleRechargeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleRechargeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleRechargeGroupBy) Scan ¶
func (_g *CycleRechargeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleRechargeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleRechargeMutation ¶
type CycleRechargeMutation struct {
// contains filtered or unexported fields
}
CycleRechargeMutation represents an operation that mutates the CycleRecharge nodes in the graph.
func (*CycleRechargeMutation) AddBuyCycle ¶
func (m *CycleRechargeMutation) AddBuyCycle(f float64)
AddBuyCycle adds f to the "buy_cycle" field.
func (*CycleRechargeMutation) AddField ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) AddPayAmount ¶
func (m *CycleRechargeMutation) AddPayAmount(f float64)
AddPayAmount adds f to the "pay_amount" field.
func (*CycleRechargeMutation) AddRechargeChannel ¶
func (m *CycleRechargeMutation) AddRechargeChannel(i int)
AddRechargeChannel adds i to the "recharge_channel" field.
func (*CycleRechargeMutation) AddTotalAmount ¶
func (m *CycleRechargeMutation) AddTotalAmount(f float64)
AddTotalAmount adds f to the "total_amount" field.
func (*CycleRechargeMutation) AddedBuyCycle ¶
func (m *CycleRechargeMutation) AddedBuyCycle() (r float64, exists bool)
AddedBuyCycle returns the value that was added to the "buy_cycle" field in this mutation.
func (*CycleRechargeMutation) AddedEdges ¶
func (m *CycleRechargeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CycleRechargeMutation) AddedField ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) AddedFields ¶
func (m *CycleRechargeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CycleRechargeMutation) AddedIDs ¶
func (m *CycleRechargeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CycleRechargeMutation) AddedPayAmount ¶
func (m *CycleRechargeMutation) AddedPayAmount() (r float64, exists bool)
AddedPayAmount returns the value that was added to the "pay_amount" field in this mutation.
func (*CycleRechargeMutation) AddedRechargeChannel ¶
func (m *CycleRechargeMutation) AddedRechargeChannel() (r int, exists bool)
AddedRechargeChannel returns the value that was added to the "recharge_channel" field in this mutation.
func (*CycleRechargeMutation) AddedTotalAmount ¶
func (m *CycleRechargeMutation) AddedTotalAmount() (r float64, exists bool)
AddedTotalAmount returns the value that was added to the "total_amount" field in this mutation.
func (*CycleRechargeMutation) AlipayTradeNo ¶
func (m *CycleRechargeMutation) AlipayTradeNo() (r string, exists bool)
AlipayTradeNo returns the value of the "alipay_trade_no" field in the mutation.
func (*CycleRechargeMutation) BuyCycle ¶
func (m *CycleRechargeMutation) BuyCycle() (r float64, exists bool)
BuyCycle returns the value of the "buy_cycle" field in the mutation.
func (*CycleRechargeMutation) ClearEdge ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) ClearField ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) ClearedEdges ¶
func (m *CycleRechargeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CycleRechargeMutation) ClearedFields ¶
func (m *CycleRechargeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CycleRechargeMutation) Client ¶
func (m CycleRechargeMutation) 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 (*CycleRechargeMutation) CreateTime ¶
func (m *CycleRechargeMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*CycleRechargeMutation) EdgeCleared ¶
func (m *CycleRechargeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CycleRechargeMutation) Field ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) FieldCleared ¶
func (m *CycleRechargeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CycleRechargeMutation) Fields ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) FkUserID ¶
func (m *CycleRechargeMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*CycleRechargeMutation) ID ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) 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 (*CycleRechargeMutation) OldAlipayTradeNo ¶
func (m *CycleRechargeMutation) OldAlipayTradeNo(ctx context.Context) (v string, err error)
OldAlipayTradeNo returns the old "alipay_trade_no" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) OldBuyCycle ¶
func (m *CycleRechargeMutation) OldBuyCycle(ctx context.Context) (v float64, err error)
OldBuyCycle returns the old "buy_cycle" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) 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 (*CycleRechargeMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) OldOutTradeNo ¶
func (m *CycleRechargeMutation) OldOutTradeNo(ctx context.Context) (v string, err error)
OldOutTradeNo returns the old "out_trade_no" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) OldPayAmount ¶
func (m *CycleRechargeMutation) OldPayAmount(ctx context.Context) (v float64, err error)
OldPayAmount returns the old "pay_amount" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) OldRechargeChannel ¶
func (m *CycleRechargeMutation) OldRechargeChannel(ctx context.Context) (v int, err error)
OldRechargeChannel returns the old "recharge_channel" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) OldRedeemCode ¶
func (m *CycleRechargeMutation) OldRedeemCode(ctx context.Context) (v string, err error)
OldRedeemCode returns the old "redeem_code" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) OldState ¶
func (m *CycleRechargeMutation) OldState(ctx context.Context) (v string, err error)
OldState returns the old "state" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) OldTotalAmount ¶
func (m *CycleRechargeMutation) OldTotalAmount(ctx context.Context) (v float64, err error)
OldTotalAmount returns the old "total_amount" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the CycleRecharge entity. If the CycleRecharge 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 (*CycleRechargeMutation) Op ¶
func (m *CycleRechargeMutation) Op() Op
Op returns the operation name.
func (*CycleRechargeMutation) OutTradeNo ¶
func (m *CycleRechargeMutation) OutTradeNo() (r string, exists bool)
OutTradeNo returns the value of the "out_trade_no" field in the mutation.
func (*CycleRechargeMutation) PayAmount ¶
func (m *CycleRechargeMutation) PayAmount() (r float64, exists bool)
PayAmount returns the value of the "pay_amount" field in the mutation.
func (*CycleRechargeMutation) RechargeChannel ¶
func (m *CycleRechargeMutation) RechargeChannel() (r int, exists bool)
RechargeChannel returns the value of the "recharge_channel" field in the mutation.
func (*CycleRechargeMutation) RedeemCode ¶
func (m *CycleRechargeMutation) RedeemCode() (r string, exists bool)
RedeemCode returns the value of the "redeem_code" field in the mutation.
func (*CycleRechargeMutation) RemovedEdges ¶
func (m *CycleRechargeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CycleRechargeMutation) RemovedIDs ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) ResetAlipayTradeNo ¶
func (m *CycleRechargeMutation) ResetAlipayTradeNo()
ResetAlipayTradeNo resets all changes to the "alipay_trade_no" field.
func (*CycleRechargeMutation) ResetBuyCycle ¶
func (m *CycleRechargeMutation) ResetBuyCycle()
ResetBuyCycle resets all changes to the "buy_cycle" field.
func (*CycleRechargeMutation) ResetCreateTime ¶
func (m *CycleRechargeMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*CycleRechargeMutation) ResetEdge ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) ResetField ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) ResetFkUserID ¶
func (m *CycleRechargeMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*CycleRechargeMutation) ResetOutTradeNo ¶
func (m *CycleRechargeMutation) ResetOutTradeNo()
ResetOutTradeNo resets all changes to the "out_trade_no" field.
func (*CycleRechargeMutation) ResetPayAmount ¶
func (m *CycleRechargeMutation) ResetPayAmount()
ResetPayAmount resets all changes to the "pay_amount" field.
func (*CycleRechargeMutation) ResetRechargeChannel ¶
func (m *CycleRechargeMutation) ResetRechargeChannel()
ResetRechargeChannel resets all changes to the "recharge_channel" field.
func (*CycleRechargeMutation) ResetRedeemCode ¶
func (m *CycleRechargeMutation) ResetRedeemCode()
ResetRedeemCode resets all changes to the "redeem_code" field.
func (*CycleRechargeMutation) ResetState ¶
func (m *CycleRechargeMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*CycleRechargeMutation) ResetTotalAmount ¶
func (m *CycleRechargeMutation) ResetTotalAmount()
ResetTotalAmount resets all changes to the "total_amount" field.
func (*CycleRechargeMutation) ResetUpdateTime ¶
func (m *CycleRechargeMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*CycleRechargeMutation) SetAlipayTradeNo ¶
func (m *CycleRechargeMutation) SetAlipayTradeNo(s string)
SetAlipayTradeNo sets the "alipay_trade_no" field.
func (*CycleRechargeMutation) SetBuyCycle ¶
func (m *CycleRechargeMutation) SetBuyCycle(f float64)
SetBuyCycle sets the "buy_cycle" field.
func (*CycleRechargeMutation) SetCreateTime ¶
func (m *CycleRechargeMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*CycleRechargeMutation) SetField ¶
func (m *CycleRechargeMutation) 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 (*CycleRechargeMutation) SetFkUserID ¶
func (m *CycleRechargeMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*CycleRechargeMutation) SetID ¶
func (m *CycleRechargeMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CycleRecharge entities.
func (*CycleRechargeMutation) SetOp ¶
func (m *CycleRechargeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CycleRechargeMutation) SetOutTradeNo ¶
func (m *CycleRechargeMutation) SetOutTradeNo(s string)
SetOutTradeNo sets the "out_trade_no" field.
func (*CycleRechargeMutation) SetPayAmount ¶
func (m *CycleRechargeMutation) SetPayAmount(f float64)
SetPayAmount sets the "pay_amount" field.
func (*CycleRechargeMutation) SetRechargeChannel ¶
func (m *CycleRechargeMutation) SetRechargeChannel(i int)
SetRechargeChannel sets the "recharge_channel" field.
func (*CycleRechargeMutation) SetRedeemCode ¶
func (m *CycleRechargeMutation) SetRedeemCode(s string)
SetRedeemCode sets the "redeem_code" field.
func (*CycleRechargeMutation) SetState ¶
func (m *CycleRechargeMutation) SetState(s string)
SetState sets the "state" field.
func (*CycleRechargeMutation) SetTotalAmount ¶
func (m *CycleRechargeMutation) SetTotalAmount(f float64)
SetTotalAmount sets the "total_amount" field.
func (*CycleRechargeMutation) SetUpdateTime ¶
func (m *CycleRechargeMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*CycleRechargeMutation) State ¶
func (m *CycleRechargeMutation) State() (r string, exists bool)
State returns the value of the "state" field in the mutation.
func (*CycleRechargeMutation) TotalAmount ¶
func (m *CycleRechargeMutation) TotalAmount() (r float64, exists bool)
TotalAmount returns the value of the "total_amount" field in the mutation.
func (CycleRechargeMutation) Tx ¶
func (m CycleRechargeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CycleRechargeMutation) Type ¶
func (m *CycleRechargeMutation) Type() string
Type returns the node type of this mutation (CycleRecharge).
func (*CycleRechargeMutation) UpdateTime ¶
func (m *CycleRechargeMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*CycleRechargeMutation) Where ¶
func (m *CycleRechargeMutation) Where(ps ...predicate.CycleRecharge)
Where appends a list predicates to the CycleRechargeMutation builder.
func (*CycleRechargeMutation) WhereP ¶
func (m *CycleRechargeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CycleRechargeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CycleRechargeQuery ¶
type CycleRechargeQuery struct {
// contains filtered or unexported fields
}
CycleRechargeQuery is the builder for querying CycleRecharge entities.
func (*CycleRechargeQuery) Aggregate ¶
func (_q *CycleRechargeQuery) Aggregate(fns ...AggregateFunc) *CycleRechargeSelect
Aggregate returns a CycleRechargeSelect configured with the given aggregations.
func (*CycleRechargeQuery) All ¶
func (_q *CycleRechargeQuery) All(ctx context.Context) ([]*CycleRecharge, error)
All executes the query and returns a list of CycleRecharges.
func (*CycleRechargeQuery) AllX ¶
func (_q *CycleRechargeQuery) AllX(ctx context.Context) []*CycleRecharge
AllX is like All, but panics if an error occurs.
func (*CycleRechargeQuery) Clone ¶
func (_q *CycleRechargeQuery) Clone() *CycleRechargeQuery
Clone returns a duplicate of the CycleRechargeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CycleRechargeQuery) Count ¶
func (_q *CycleRechargeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CycleRechargeQuery) CountX ¶
func (_q *CycleRechargeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CycleRechargeQuery) Exist ¶
func (_q *CycleRechargeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CycleRechargeQuery) ExistX ¶
func (_q *CycleRechargeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CycleRechargeQuery) First ¶
func (_q *CycleRechargeQuery) First(ctx context.Context) (*CycleRecharge, error)
First returns the first CycleRecharge entity from the query. Returns a *NotFoundError when no CycleRecharge was found.
func (*CycleRechargeQuery) FirstID ¶
FirstID returns the first CycleRecharge ID from the query. Returns a *NotFoundError when no CycleRecharge ID was found.
func (*CycleRechargeQuery) FirstIDX ¶
func (_q *CycleRechargeQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CycleRechargeQuery) FirstX ¶
func (_q *CycleRechargeQuery) FirstX(ctx context.Context) *CycleRecharge
FirstX is like First, but panics if an error occurs.
func (*CycleRechargeQuery) GroupBy ¶
func (_q *CycleRechargeQuery) GroupBy(field string, fields ...string) *CycleRechargeGroupBy
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.CycleRecharge.Query().
GroupBy(cyclerecharge.FieldFkUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CycleRechargeQuery) IDsX ¶
func (_q *CycleRechargeQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CycleRechargeQuery) Limit ¶
func (_q *CycleRechargeQuery) Limit(limit int) *CycleRechargeQuery
Limit the number of records to be returned by this query.
func (*CycleRechargeQuery) Offset ¶
func (_q *CycleRechargeQuery) Offset(offset int) *CycleRechargeQuery
Offset to start from.
func (*CycleRechargeQuery) Only ¶
func (_q *CycleRechargeQuery) Only(ctx context.Context) (*CycleRecharge, error)
Only returns a single CycleRecharge entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CycleRecharge entity is found. Returns a *NotFoundError when no CycleRecharge entities are found.
func (*CycleRechargeQuery) OnlyID ¶
OnlyID is like Only, but returns the only CycleRecharge ID in the query. Returns a *NotSingularError when more than one CycleRecharge ID is found. Returns a *NotFoundError when no entities are found.
func (*CycleRechargeQuery) OnlyIDX ¶
func (_q *CycleRechargeQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CycleRechargeQuery) OnlyX ¶
func (_q *CycleRechargeQuery) OnlyX(ctx context.Context) *CycleRecharge
OnlyX is like Only, but panics if an error occurs.
func (*CycleRechargeQuery) Order ¶
func (_q *CycleRechargeQuery) Order(o ...cyclerecharge.OrderOption) *CycleRechargeQuery
Order specifies how the records should be ordered.
func (*CycleRechargeQuery) Select ¶
func (_q *CycleRechargeQuery) Select(fields ...string) *CycleRechargeSelect
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
}
client.CycleRecharge.Query().
Select(cyclerecharge.FieldFkUserID).
Scan(ctx, &v)
func (*CycleRechargeQuery) Unique ¶
func (_q *CycleRechargeQuery) Unique(unique bool) *CycleRechargeQuery
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 (*CycleRechargeQuery) Where ¶
func (_q *CycleRechargeQuery) Where(ps ...predicate.CycleRecharge) *CycleRechargeQuery
Where adds a new predicate for the CycleRechargeQuery builder.
type CycleRechargeSelect ¶
type CycleRechargeSelect struct {
*CycleRechargeQuery
// contains filtered or unexported fields
}
CycleRechargeSelect is the builder for selecting fields of CycleRecharge entities.
func (*CycleRechargeSelect) Aggregate ¶
func (_s *CycleRechargeSelect) Aggregate(fns ...AggregateFunc) *CycleRechargeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CycleRechargeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleRechargeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleRechargeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleRechargeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleRechargeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleRechargeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleRechargeSelect) Scan ¶
func (_s *CycleRechargeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleRechargeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleRechargeUpdate ¶
type CycleRechargeUpdate struct {
// contains filtered or unexported fields
}
CycleRechargeUpdate is the builder for updating CycleRecharge entities.
func (*CycleRechargeUpdate) AddBuyCycle ¶
func (_u *CycleRechargeUpdate) AddBuyCycle(v float64) *CycleRechargeUpdate
AddBuyCycle adds value to the "buy_cycle" field.
func (*CycleRechargeUpdate) AddPayAmount ¶
func (_u *CycleRechargeUpdate) AddPayAmount(v float64) *CycleRechargeUpdate
AddPayAmount adds value to the "pay_amount" field.
func (*CycleRechargeUpdate) AddRechargeChannel ¶
func (_u *CycleRechargeUpdate) AddRechargeChannel(v int) *CycleRechargeUpdate
AddRechargeChannel adds value to the "recharge_channel" field.
func (*CycleRechargeUpdate) AddTotalAmount ¶
func (_u *CycleRechargeUpdate) AddTotalAmount(v float64) *CycleRechargeUpdate
AddTotalAmount adds value to the "total_amount" field.
func (*CycleRechargeUpdate) Exec ¶
func (_u *CycleRechargeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleRechargeUpdate) ExecX ¶
func (_u *CycleRechargeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRechargeUpdate) Mutation ¶
func (_u *CycleRechargeUpdate) Mutation() *CycleRechargeMutation
Mutation returns the CycleRechargeMutation object of the builder.
func (*CycleRechargeUpdate) Save ¶
func (_u *CycleRechargeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CycleRechargeUpdate) SaveX ¶
func (_u *CycleRechargeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CycleRechargeUpdate) SetAlipayTradeNo ¶
func (_u *CycleRechargeUpdate) SetAlipayTradeNo(v string) *CycleRechargeUpdate
SetAlipayTradeNo sets the "alipay_trade_no" field.
func (*CycleRechargeUpdate) SetBuyCycle ¶
func (_u *CycleRechargeUpdate) SetBuyCycle(v float64) *CycleRechargeUpdate
SetBuyCycle sets the "buy_cycle" field.
func (*CycleRechargeUpdate) SetCreateTime ¶
func (_u *CycleRechargeUpdate) SetCreateTime(v time.Time) *CycleRechargeUpdate
SetCreateTime sets the "create_time" field.
func (*CycleRechargeUpdate) SetFkUserID ¶
func (_u *CycleRechargeUpdate) SetFkUserID(v uuid.UUID) *CycleRechargeUpdate
SetFkUserID sets the "fk_user_id" field.
func (*CycleRechargeUpdate) SetNillableAlipayTradeNo ¶
func (_u *CycleRechargeUpdate) SetNillableAlipayTradeNo(v *string) *CycleRechargeUpdate
SetNillableAlipayTradeNo sets the "alipay_trade_no" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillableBuyCycle ¶
func (_u *CycleRechargeUpdate) SetNillableBuyCycle(v *float64) *CycleRechargeUpdate
SetNillableBuyCycle sets the "buy_cycle" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillableCreateTime ¶
func (_u *CycleRechargeUpdate) SetNillableCreateTime(v *time.Time) *CycleRechargeUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillableFkUserID ¶
func (_u *CycleRechargeUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleRechargeUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillableOutTradeNo ¶
func (_u *CycleRechargeUpdate) SetNillableOutTradeNo(v *string) *CycleRechargeUpdate
SetNillableOutTradeNo sets the "out_trade_no" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillablePayAmount ¶
func (_u *CycleRechargeUpdate) SetNillablePayAmount(v *float64) *CycleRechargeUpdate
SetNillablePayAmount sets the "pay_amount" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillableRechargeChannel ¶
func (_u *CycleRechargeUpdate) SetNillableRechargeChannel(v *int) *CycleRechargeUpdate
SetNillableRechargeChannel sets the "recharge_channel" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillableRedeemCode ¶
func (_u *CycleRechargeUpdate) SetNillableRedeemCode(v *string) *CycleRechargeUpdate
SetNillableRedeemCode sets the "redeem_code" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillableState ¶
func (_u *CycleRechargeUpdate) SetNillableState(v *string) *CycleRechargeUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillableTotalAmount ¶
func (_u *CycleRechargeUpdate) SetNillableTotalAmount(v *float64) *CycleRechargeUpdate
SetNillableTotalAmount sets the "total_amount" field if the given value is not nil.
func (*CycleRechargeUpdate) SetNillableUpdateTime ¶
func (_u *CycleRechargeUpdate) SetNillableUpdateTime(v *time.Time) *CycleRechargeUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*CycleRechargeUpdate) SetOutTradeNo ¶
func (_u *CycleRechargeUpdate) SetOutTradeNo(v string) *CycleRechargeUpdate
SetOutTradeNo sets the "out_trade_no" field.
func (*CycleRechargeUpdate) SetPayAmount ¶
func (_u *CycleRechargeUpdate) SetPayAmount(v float64) *CycleRechargeUpdate
SetPayAmount sets the "pay_amount" field.
func (*CycleRechargeUpdate) SetRechargeChannel ¶
func (_u *CycleRechargeUpdate) SetRechargeChannel(v int) *CycleRechargeUpdate
SetRechargeChannel sets the "recharge_channel" field.
func (*CycleRechargeUpdate) SetRedeemCode ¶
func (_u *CycleRechargeUpdate) SetRedeemCode(v string) *CycleRechargeUpdate
SetRedeemCode sets the "redeem_code" field.
func (*CycleRechargeUpdate) SetState ¶
func (_u *CycleRechargeUpdate) SetState(v string) *CycleRechargeUpdate
SetState sets the "state" field.
func (*CycleRechargeUpdate) SetTotalAmount ¶
func (_u *CycleRechargeUpdate) SetTotalAmount(v float64) *CycleRechargeUpdate
SetTotalAmount sets the "total_amount" field.
func (*CycleRechargeUpdate) SetUpdateTime ¶
func (_u *CycleRechargeUpdate) SetUpdateTime(v time.Time) *CycleRechargeUpdate
SetUpdateTime sets the "update_time" field.
func (*CycleRechargeUpdate) Where ¶
func (_u *CycleRechargeUpdate) Where(ps ...predicate.CycleRecharge) *CycleRechargeUpdate
Where appends a list predicates to the CycleRechargeUpdate builder.
type CycleRechargeUpdateOne ¶
type CycleRechargeUpdateOne struct {
// contains filtered or unexported fields
}
CycleRechargeUpdateOne is the builder for updating a single CycleRecharge entity.
func (*CycleRechargeUpdateOne) AddBuyCycle ¶
func (_u *CycleRechargeUpdateOne) AddBuyCycle(v float64) *CycleRechargeUpdateOne
AddBuyCycle adds value to the "buy_cycle" field.
func (*CycleRechargeUpdateOne) AddPayAmount ¶
func (_u *CycleRechargeUpdateOne) AddPayAmount(v float64) *CycleRechargeUpdateOne
AddPayAmount adds value to the "pay_amount" field.
func (*CycleRechargeUpdateOne) AddRechargeChannel ¶
func (_u *CycleRechargeUpdateOne) AddRechargeChannel(v int) *CycleRechargeUpdateOne
AddRechargeChannel adds value to the "recharge_channel" field.
func (*CycleRechargeUpdateOne) AddTotalAmount ¶
func (_u *CycleRechargeUpdateOne) AddTotalAmount(v float64) *CycleRechargeUpdateOne
AddTotalAmount adds value to the "total_amount" field.
func (*CycleRechargeUpdateOne) Exec ¶
func (_u *CycleRechargeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CycleRechargeUpdateOne) ExecX ¶
func (_u *CycleRechargeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRechargeUpdateOne) Mutation ¶
func (_u *CycleRechargeUpdateOne) Mutation() *CycleRechargeMutation
Mutation returns the CycleRechargeMutation object of the builder.
func (*CycleRechargeUpdateOne) Save ¶
func (_u *CycleRechargeUpdateOne) Save(ctx context.Context) (*CycleRecharge, error)
Save executes the query and returns the updated CycleRecharge entity.
func (*CycleRechargeUpdateOne) SaveX ¶
func (_u *CycleRechargeUpdateOne) SaveX(ctx context.Context) *CycleRecharge
SaveX is like Save, but panics if an error occurs.
func (*CycleRechargeUpdateOne) Select ¶
func (_u *CycleRechargeUpdateOne) Select(field string, fields ...string) *CycleRechargeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CycleRechargeUpdateOne) SetAlipayTradeNo ¶
func (_u *CycleRechargeUpdateOne) SetAlipayTradeNo(v string) *CycleRechargeUpdateOne
SetAlipayTradeNo sets the "alipay_trade_no" field.
func (*CycleRechargeUpdateOne) SetBuyCycle ¶
func (_u *CycleRechargeUpdateOne) SetBuyCycle(v float64) *CycleRechargeUpdateOne
SetBuyCycle sets the "buy_cycle" field.
func (*CycleRechargeUpdateOne) SetCreateTime ¶
func (_u *CycleRechargeUpdateOne) SetCreateTime(v time.Time) *CycleRechargeUpdateOne
SetCreateTime sets the "create_time" field.
func (*CycleRechargeUpdateOne) SetFkUserID ¶
func (_u *CycleRechargeUpdateOne) SetFkUserID(v uuid.UUID) *CycleRechargeUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*CycleRechargeUpdateOne) SetNillableAlipayTradeNo ¶
func (_u *CycleRechargeUpdateOne) SetNillableAlipayTradeNo(v *string) *CycleRechargeUpdateOne
SetNillableAlipayTradeNo sets the "alipay_trade_no" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillableBuyCycle ¶
func (_u *CycleRechargeUpdateOne) SetNillableBuyCycle(v *float64) *CycleRechargeUpdateOne
SetNillableBuyCycle sets the "buy_cycle" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillableCreateTime ¶
func (_u *CycleRechargeUpdateOne) SetNillableCreateTime(v *time.Time) *CycleRechargeUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillableFkUserID ¶
func (_u *CycleRechargeUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleRechargeUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillableOutTradeNo ¶
func (_u *CycleRechargeUpdateOne) SetNillableOutTradeNo(v *string) *CycleRechargeUpdateOne
SetNillableOutTradeNo sets the "out_trade_no" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillablePayAmount ¶
func (_u *CycleRechargeUpdateOne) SetNillablePayAmount(v *float64) *CycleRechargeUpdateOne
SetNillablePayAmount sets the "pay_amount" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillableRechargeChannel ¶
func (_u *CycleRechargeUpdateOne) SetNillableRechargeChannel(v *int) *CycleRechargeUpdateOne
SetNillableRechargeChannel sets the "recharge_channel" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillableRedeemCode ¶
func (_u *CycleRechargeUpdateOne) SetNillableRedeemCode(v *string) *CycleRechargeUpdateOne
SetNillableRedeemCode sets the "redeem_code" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillableState ¶
func (_u *CycleRechargeUpdateOne) SetNillableState(v *string) *CycleRechargeUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillableTotalAmount ¶
func (_u *CycleRechargeUpdateOne) SetNillableTotalAmount(v *float64) *CycleRechargeUpdateOne
SetNillableTotalAmount sets the "total_amount" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetNillableUpdateTime ¶
func (_u *CycleRechargeUpdateOne) SetNillableUpdateTime(v *time.Time) *CycleRechargeUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*CycleRechargeUpdateOne) SetOutTradeNo ¶
func (_u *CycleRechargeUpdateOne) SetOutTradeNo(v string) *CycleRechargeUpdateOne
SetOutTradeNo sets the "out_trade_no" field.
func (*CycleRechargeUpdateOne) SetPayAmount ¶
func (_u *CycleRechargeUpdateOne) SetPayAmount(v float64) *CycleRechargeUpdateOne
SetPayAmount sets the "pay_amount" field.
func (*CycleRechargeUpdateOne) SetRechargeChannel ¶
func (_u *CycleRechargeUpdateOne) SetRechargeChannel(v int) *CycleRechargeUpdateOne
SetRechargeChannel sets the "recharge_channel" field.
func (*CycleRechargeUpdateOne) SetRedeemCode ¶
func (_u *CycleRechargeUpdateOne) SetRedeemCode(v string) *CycleRechargeUpdateOne
SetRedeemCode sets the "redeem_code" field.
func (*CycleRechargeUpdateOne) SetState ¶
func (_u *CycleRechargeUpdateOne) SetState(v string) *CycleRechargeUpdateOne
SetState sets the "state" field.
func (*CycleRechargeUpdateOne) SetTotalAmount ¶
func (_u *CycleRechargeUpdateOne) SetTotalAmount(v float64) *CycleRechargeUpdateOne
SetTotalAmount sets the "total_amount" field.
func (*CycleRechargeUpdateOne) SetUpdateTime ¶
func (_u *CycleRechargeUpdateOne) SetUpdateTime(v time.Time) *CycleRechargeUpdateOne
SetUpdateTime sets the "update_time" field.
func (*CycleRechargeUpdateOne) Where ¶
func (_u *CycleRechargeUpdateOne) Where(ps ...predicate.CycleRecharge) *CycleRechargeUpdateOne
Where appends a list predicates to the CycleRechargeUpdate builder.
type CycleRecharges ¶
type CycleRecharges []*CycleRecharge
CycleRecharges is a parsable slice of CycleRecharge.
type CycleRedeemCode ¶
type CycleRedeemCode struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// 兑换码
RedeemCode string `json:"redeem_code,omitempty"`
// 兑换码对应的周期
Cycle float64 `json:"cycle,omitempty"`
// 状态
State bool `json:"state,omitempty"`
// 创建时间
CreateTime time.Time `json:"create_time,omitempty"`
// 使用
UseTime time.Time `json:"use_time,omitempty"`
// contains filtered or unexported fields
}
CycleRedeemCode is the model entity for the CycleRedeemCode schema.
func (*CycleRedeemCode) String ¶
func (_m *CycleRedeemCode) String() string
String implements the fmt.Stringer.
func (*CycleRedeemCode) Unwrap ¶
func (_m *CycleRedeemCode) Unwrap() *CycleRedeemCode
Unwrap unwraps the CycleRedeemCode 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 (*CycleRedeemCode) Update ¶
func (_m *CycleRedeemCode) Update() *CycleRedeemCodeUpdateOne
Update returns a builder for updating this CycleRedeemCode. Note that you need to call CycleRedeemCode.Unwrap() before calling this method if this CycleRedeemCode was returned from a transaction, and the transaction was committed or rolled back.
type CycleRedeemCodeClient ¶
type CycleRedeemCodeClient struct {
// contains filtered or unexported fields
}
CycleRedeemCodeClient is a client for the CycleRedeemCode schema.
func NewCycleRedeemCodeClient ¶
func NewCycleRedeemCodeClient(c config) *CycleRedeemCodeClient
NewCycleRedeemCodeClient returns a client for the CycleRedeemCode from the given config.
func (*CycleRedeemCodeClient) Create ¶
func (c *CycleRedeemCodeClient) Create() *CycleRedeemCodeCreate
Create returns a builder for creating a CycleRedeemCode entity.
func (*CycleRedeemCodeClient) CreateBulk ¶
func (c *CycleRedeemCodeClient) CreateBulk(builders ...*CycleRedeemCodeCreate) *CycleRedeemCodeCreateBulk
CreateBulk returns a builder for creating a bulk of CycleRedeemCode entities.
func (*CycleRedeemCodeClient) Delete ¶
func (c *CycleRedeemCodeClient) Delete() *CycleRedeemCodeDelete
Delete returns a delete builder for CycleRedeemCode.
func (*CycleRedeemCodeClient) DeleteOne ¶
func (c *CycleRedeemCodeClient) DeleteOne(_m *CycleRedeemCode) *CycleRedeemCodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CycleRedeemCodeClient) DeleteOneID ¶
func (c *CycleRedeemCodeClient) DeleteOneID(id uuid.UUID) *CycleRedeemCodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CycleRedeemCodeClient) Get ¶
func (c *CycleRedeemCodeClient) Get(ctx context.Context, id uuid.UUID) (*CycleRedeemCode, error)
Get returns a CycleRedeemCode entity by its id.
func (*CycleRedeemCodeClient) GetX ¶
func (c *CycleRedeemCodeClient) GetX(ctx context.Context, id uuid.UUID) *CycleRedeemCode
GetX is like Get, but panics if an error occurs.
func (*CycleRedeemCodeClient) Hooks ¶
func (c *CycleRedeemCodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CycleRedeemCodeClient) Intercept ¶
func (c *CycleRedeemCodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cycleredeemcode.Intercept(f(g(h())))`.
func (*CycleRedeemCodeClient) Interceptors ¶
func (c *CycleRedeemCodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CycleRedeemCodeClient) MapCreateBulk ¶
func (c *CycleRedeemCodeClient) MapCreateBulk(slice any, setFunc func(*CycleRedeemCodeCreate, int)) *CycleRedeemCodeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CycleRedeemCodeClient) Query ¶
func (c *CycleRedeemCodeClient) Query() *CycleRedeemCodeQuery
Query returns a query builder for CycleRedeemCode.
func (*CycleRedeemCodeClient) Update ¶
func (c *CycleRedeemCodeClient) Update() *CycleRedeemCodeUpdate
Update returns an update builder for CycleRedeemCode.
func (*CycleRedeemCodeClient) UpdateOne ¶
func (c *CycleRedeemCodeClient) UpdateOne(_m *CycleRedeemCode) *CycleRedeemCodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CycleRedeemCodeClient) UpdateOneID ¶
func (c *CycleRedeemCodeClient) UpdateOneID(id uuid.UUID) *CycleRedeemCodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CycleRedeemCodeClient) Use ¶
func (c *CycleRedeemCodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cycleredeemcode.Hooks(f(g(h())))`.
type CycleRedeemCodeCreate ¶
type CycleRedeemCodeCreate struct {
// contains filtered or unexported fields
}
CycleRedeemCodeCreate is the builder for creating a CycleRedeemCode entity.
func (*CycleRedeemCodeCreate) Exec ¶
func (_c *CycleRedeemCodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleRedeemCodeCreate) ExecX ¶
func (_c *CycleRedeemCodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRedeemCodeCreate) Mutation ¶
func (_c *CycleRedeemCodeCreate) Mutation() *CycleRedeemCodeMutation
Mutation returns the CycleRedeemCodeMutation object of the builder.
func (*CycleRedeemCodeCreate) Save ¶
func (_c *CycleRedeemCodeCreate) Save(ctx context.Context) (*CycleRedeemCode, error)
Save creates the CycleRedeemCode in the database.
func (*CycleRedeemCodeCreate) SaveX ¶
func (_c *CycleRedeemCodeCreate) SaveX(ctx context.Context) *CycleRedeemCode
SaveX calls Save and panics if Save returns an error.
func (*CycleRedeemCodeCreate) SetCreateTime ¶
func (_c *CycleRedeemCodeCreate) SetCreateTime(v time.Time) *CycleRedeemCodeCreate
SetCreateTime sets the "create_time" field.
func (*CycleRedeemCodeCreate) SetCycle ¶
func (_c *CycleRedeemCodeCreate) SetCycle(v float64) *CycleRedeemCodeCreate
SetCycle sets the "cycle" field.
func (*CycleRedeemCodeCreate) SetFkUserID ¶
func (_c *CycleRedeemCodeCreate) SetFkUserID(v uuid.UUID) *CycleRedeemCodeCreate
SetFkUserID sets the "fk_user_id" field.
func (*CycleRedeemCodeCreate) SetID ¶
func (_c *CycleRedeemCodeCreate) SetID(v uuid.UUID) *CycleRedeemCodeCreate
SetID sets the "id" field.
func (*CycleRedeemCodeCreate) SetNillableFkUserID ¶
func (_c *CycleRedeemCodeCreate) SetNillableFkUserID(v *uuid.UUID) *CycleRedeemCodeCreate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleRedeemCodeCreate) SetNillableID ¶
func (_c *CycleRedeemCodeCreate) SetNillableID(v *uuid.UUID) *CycleRedeemCodeCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CycleRedeemCodeCreate) SetNillableUseTime ¶
func (_c *CycleRedeemCodeCreate) SetNillableUseTime(v *time.Time) *CycleRedeemCodeCreate
SetNillableUseTime sets the "use_time" field if the given value is not nil.
func (*CycleRedeemCodeCreate) SetRedeemCode ¶
func (_c *CycleRedeemCodeCreate) SetRedeemCode(v string) *CycleRedeemCodeCreate
SetRedeemCode sets the "redeem_code" field.
func (*CycleRedeemCodeCreate) SetState ¶
func (_c *CycleRedeemCodeCreate) SetState(v bool) *CycleRedeemCodeCreate
SetState sets the "state" field.
func (*CycleRedeemCodeCreate) SetUseTime ¶
func (_c *CycleRedeemCodeCreate) SetUseTime(v time.Time) *CycleRedeemCodeCreate
SetUseTime sets the "use_time" field.
type CycleRedeemCodeCreateBulk ¶
type CycleRedeemCodeCreateBulk struct {
// contains filtered or unexported fields
}
CycleRedeemCodeCreateBulk is the builder for creating many CycleRedeemCode entities in bulk.
func (*CycleRedeemCodeCreateBulk) Exec ¶
func (_c *CycleRedeemCodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleRedeemCodeCreateBulk) ExecX ¶
func (_c *CycleRedeemCodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRedeemCodeCreateBulk) Save ¶
func (_c *CycleRedeemCodeCreateBulk) Save(ctx context.Context) ([]*CycleRedeemCode, error)
Save creates the CycleRedeemCode entities in the database.
func (*CycleRedeemCodeCreateBulk) SaveX ¶
func (_c *CycleRedeemCodeCreateBulk) SaveX(ctx context.Context) []*CycleRedeemCode
SaveX is like Save, but panics if an error occurs.
type CycleRedeemCodeDelete ¶
type CycleRedeemCodeDelete struct {
// contains filtered or unexported fields
}
CycleRedeemCodeDelete is the builder for deleting a CycleRedeemCode entity.
func (*CycleRedeemCodeDelete) Exec ¶
func (_d *CycleRedeemCodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CycleRedeemCodeDelete) ExecX ¶
func (_d *CycleRedeemCodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CycleRedeemCodeDelete) Where ¶
func (_d *CycleRedeemCodeDelete) Where(ps ...predicate.CycleRedeemCode) *CycleRedeemCodeDelete
Where appends a list predicates to the CycleRedeemCodeDelete builder.
type CycleRedeemCodeDeleteOne ¶
type CycleRedeemCodeDeleteOne struct {
// contains filtered or unexported fields
}
CycleRedeemCodeDeleteOne is the builder for deleting a single CycleRedeemCode entity.
func (*CycleRedeemCodeDeleteOne) Exec ¶
func (_d *CycleRedeemCodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CycleRedeemCodeDeleteOne) ExecX ¶
func (_d *CycleRedeemCodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRedeemCodeDeleteOne) Where ¶
func (_d *CycleRedeemCodeDeleteOne) Where(ps ...predicate.CycleRedeemCode) *CycleRedeemCodeDeleteOne
Where appends a list predicates to the CycleRedeemCodeDelete builder.
type CycleRedeemCodeGroupBy ¶
type CycleRedeemCodeGroupBy struct {
// contains filtered or unexported fields
}
CycleRedeemCodeGroupBy is the group-by builder for CycleRedeemCode entities.
func (*CycleRedeemCodeGroupBy) Aggregate ¶
func (_g *CycleRedeemCodeGroupBy) Aggregate(fns ...AggregateFunc) *CycleRedeemCodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CycleRedeemCodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*CycleRedeemCodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeGroupBy) Scan ¶
func (_g *CycleRedeemCodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleRedeemCodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleRedeemCodeMutation ¶
type CycleRedeemCodeMutation struct {
// contains filtered or unexported fields
}
CycleRedeemCodeMutation represents an operation that mutates the CycleRedeemCode nodes in the graph.
func (*CycleRedeemCodeMutation) AddCycle ¶
func (m *CycleRedeemCodeMutation) AddCycle(f float64)
AddCycle adds f to the "cycle" field.
func (*CycleRedeemCodeMutation) AddField ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) AddedCycle ¶
func (m *CycleRedeemCodeMutation) AddedCycle() (r float64, exists bool)
AddedCycle returns the value that was added to the "cycle" field in this mutation.
func (*CycleRedeemCodeMutation) AddedEdges ¶
func (m *CycleRedeemCodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CycleRedeemCodeMutation) AddedField ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) AddedFields ¶
func (m *CycleRedeemCodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CycleRedeemCodeMutation) AddedIDs ¶
func (m *CycleRedeemCodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CycleRedeemCodeMutation) ClearEdge ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) ClearField ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) ClearFkUserID ¶
func (m *CycleRedeemCodeMutation) ClearFkUserID()
ClearFkUserID clears the value of the "fk_user_id" field.
func (*CycleRedeemCodeMutation) ClearUseTime ¶
func (m *CycleRedeemCodeMutation) ClearUseTime()
ClearUseTime clears the value of the "use_time" field.
func (*CycleRedeemCodeMutation) ClearedEdges ¶
func (m *CycleRedeemCodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CycleRedeemCodeMutation) ClearedFields ¶
func (m *CycleRedeemCodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CycleRedeemCodeMutation) Client ¶
func (m CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) CreateTime ¶
func (m *CycleRedeemCodeMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*CycleRedeemCodeMutation) Cycle ¶
func (m *CycleRedeemCodeMutation) Cycle() (r float64, exists bool)
Cycle returns the value of the "cycle" field in the mutation.
func (*CycleRedeemCodeMutation) EdgeCleared ¶
func (m *CycleRedeemCodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CycleRedeemCodeMutation) Field ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) FieldCleared ¶
func (m *CycleRedeemCodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CycleRedeemCodeMutation) Fields ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) FkUserID ¶
func (m *CycleRedeemCodeMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*CycleRedeemCodeMutation) FkUserIDCleared ¶
func (m *CycleRedeemCodeMutation) FkUserIDCleared() bool
FkUserIDCleared returns if the "fk_user_id" field was cleared in this mutation.
func (*CycleRedeemCodeMutation) ID ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the CycleRedeemCode entity. If the CycleRedeemCode 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 (*CycleRedeemCodeMutation) OldCycle ¶
func (m *CycleRedeemCodeMutation) OldCycle(ctx context.Context) (v float64, err error)
OldCycle returns the old "cycle" field's value of the CycleRedeemCode entity. If the CycleRedeemCode 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 (*CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the CycleRedeemCode entity. If the CycleRedeemCode 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 (*CycleRedeemCodeMutation) OldRedeemCode ¶
func (m *CycleRedeemCodeMutation) OldRedeemCode(ctx context.Context) (v string, err error)
OldRedeemCode returns the old "redeem_code" field's value of the CycleRedeemCode entity. If the CycleRedeemCode 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 (*CycleRedeemCodeMutation) OldState ¶
func (m *CycleRedeemCodeMutation) OldState(ctx context.Context) (v bool, err error)
OldState returns the old "state" field's value of the CycleRedeemCode entity. If the CycleRedeemCode 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 (*CycleRedeemCodeMutation) OldUseTime ¶
OldUseTime returns the old "use_time" field's value of the CycleRedeemCode entity. If the CycleRedeemCode 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 (*CycleRedeemCodeMutation) Op ¶
func (m *CycleRedeemCodeMutation) Op() Op
Op returns the operation name.
func (*CycleRedeemCodeMutation) RedeemCode ¶
func (m *CycleRedeemCodeMutation) RedeemCode() (r string, exists bool)
RedeemCode returns the value of the "redeem_code" field in the mutation.
func (*CycleRedeemCodeMutation) RemovedEdges ¶
func (m *CycleRedeemCodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CycleRedeemCodeMutation) RemovedIDs ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) ResetCreateTime ¶
func (m *CycleRedeemCodeMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*CycleRedeemCodeMutation) ResetCycle ¶
func (m *CycleRedeemCodeMutation) ResetCycle()
ResetCycle resets all changes to the "cycle" field.
func (*CycleRedeemCodeMutation) ResetEdge ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) ResetField ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) ResetFkUserID ¶
func (m *CycleRedeemCodeMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*CycleRedeemCodeMutation) ResetRedeemCode ¶
func (m *CycleRedeemCodeMutation) ResetRedeemCode()
ResetRedeemCode resets all changes to the "redeem_code" field.
func (*CycleRedeemCodeMutation) ResetState ¶
func (m *CycleRedeemCodeMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*CycleRedeemCodeMutation) ResetUseTime ¶
func (m *CycleRedeemCodeMutation) ResetUseTime()
ResetUseTime resets all changes to the "use_time" field.
func (*CycleRedeemCodeMutation) SetCreateTime ¶
func (m *CycleRedeemCodeMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*CycleRedeemCodeMutation) SetCycle ¶
func (m *CycleRedeemCodeMutation) SetCycle(f float64)
SetCycle sets the "cycle" field.
func (*CycleRedeemCodeMutation) SetField ¶
func (m *CycleRedeemCodeMutation) 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 (*CycleRedeemCodeMutation) SetFkUserID ¶
func (m *CycleRedeemCodeMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*CycleRedeemCodeMutation) SetID ¶
func (m *CycleRedeemCodeMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CycleRedeemCode entities.
func (*CycleRedeemCodeMutation) SetOp ¶
func (m *CycleRedeemCodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CycleRedeemCodeMutation) SetRedeemCode ¶
func (m *CycleRedeemCodeMutation) SetRedeemCode(s string)
SetRedeemCode sets the "redeem_code" field.
func (*CycleRedeemCodeMutation) SetState ¶
func (m *CycleRedeemCodeMutation) SetState(b bool)
SetState sets the "state" field.
func (*CycleRedeemCodeMutation) SetUseTime ¶
func (m *CycleRedeemCodeMutation) SetUseTime(t time.Time)
SetUseTime sets the "use_time" field.
func (*CycleRedeemCodeMutation) State ¶
func (m *CycleRedeemCodeMutation) State() (r bool, exists bool)
State returns the value of the "state" field in the mutation.
func (CycleRedeemCodeMutation) Tx ¶
func (m CycleRedeemCodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CycleRedeemCodeMutation) Type ¶
func (m *CycleRedeemCodeMutation) Type() string
Type returns the node type of this mutation (CycleRedeemCode).
func (*CycleRedeemCodeMutation) UseTime ¶
func (m *CycleRedeemCodeMutation) UseTime() (r time.Time, exists bool)
UseTime returns the value of the "use_time" field in the mutation.
func (*CycleRedeemCodeMutation) UseTimeCleared ¶
func (m *CycleRedeemCodeMutation) UseTimeCleared() bool
UseTimeCleared returns if the "use_time" field was cleared in this mutation.
func (*CycleRedeemCodeMutation) Where ¶
func (m *CycleRedeemCodeMutation) Where(ps ...predicate.CycleRedeemCode)
Where appends a list predicates to the CycleRedeemCodeMutation builder.
func (*CycleRedeemCodeMutation) WhereP ¶
func (m *CycleRedeemCodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CycleRedeemCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CycleRedeemCodeQuery ¶
type CycleRedeemCodeQuery struct {
// contains filtered or unexported fields
}
CycleRedeemCodeQuery is the builder for querying CycleRedeemCode entities.
func (*CycleRedeemCodeQuery) Aggregate ¶
func (_q *CycleRedeemCodeQuery) Aggregate(fns ...AggregateFunc) *CycleRedeemCodeSelect
Aggregate returns a CycleRedeemCodeSelect configured with the given aggregations.
func (*CycleRedeemCodeQuery) All ¶
func (_q *CycleRedeemCodeQuery) All(ctx context.Context) ([]*CycleRedeemCode, error)
All executes the query and returns a list of CycleRedeemCodes.
func (*CycleRedeemCodeQuery) AllX ¶
func (_q *CycleRedeemCodeQuery) AllX(ctx context.Context) []*CycleRedeemCode
AllX is like All, but panics if an error occurs.
func (*CycleRedeemCodeQuery) Clone ¶
func (_q *CycleRedeemCodeQuery) Clone() *CycleRedeemCodeQuery
Clone returns a duplicate of the CycleRedeemCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CycleRedeemCodeQuery) Count ¶
func (_q *CycleRedeemCodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CycleRedeemCodeQuery) CountX ¶
func (_q *CycleRedeemCodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CycleRedeemCodeQuery) Exist ¶
func (_q *CycleRedeemCodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CycleRedeemCodeQuery) ExistX ¶
func (_q *CycleRedeemCodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CycleRedeemCodeQuery) First ¶
func (_q *CycleRedeemCodeQuery) First(ctx context.Context) (*CycleRedeemCode, error)
First returns the first CycleRedeemCode entity from the query. Returns a *NotFoundError when no CycleRedeemCode was found.
func (*CycleRedeemCodeQuery) FirstID ¶
FirstID returns the first CycleRedeemCode ID from the query. Returns a *NotFoundError when no CycleRedeemCode ID was found.
func (*CycleRedeemCodeQuery) FirstIDX ¶
func (_q *CycleRedeemCodeQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CycleRedeemCodeQuery) FirstX ¶
func (_q *CycleRedeemCodeQuery) FirstX(ctx context.Context) *CycleRedeemCode
FirstX is like First, but panics if an error occurs.
func (*CycleRedeemCodeQuery) GroupBy ¶
func (_q *CycleRedeemCodeQuery) GroupBy(field string, fields ...string) *CycleRedeemCodeGroupBy
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.CycleRedeemCode.Query().
GroupBy(cycleredeemcode.FieldFkUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CycleRedeemCodeQuery) IDs ¶
IDs executes the query and returns a list of CycleRedeemCode IDs.
func (*CycleRedeemCodeQuery) IDsX ¶
func (_q *CycleRedeemCodeQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CycleRedeemCodeQuery) Limit ¶
func (_q *CycleRedeemCodeQuery) Limit(limit int) *CycleRedeemCodeQuery
Limit the number of records to be returned by this query.
func (*CycleRedeemCodeQuery) Offset ¶
func (_q *CycleRedeemCodeQuery) Offset(offset int) *CycleRedeemCodeQuery
Offset to start from.
func (*CycleRedeemCodeQuery) Only ¶
func (_q *CycleRedeemCodeQuery) Only(ctx context.Context) (*CycleRedeemCode, error)
Only returns a single CycleRedeemCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CycleRedeemCode entity is found. Returns a *NotFoundError when no CycleRedeemCode entities are found.
func (*CycleRedeemCodeQuery) OnlyID ¶
OnlyID is like Only, but returns the only CycleRedeemCode ID in the query. Returns a *NotSingularError when more than one CycleRedeemCode ID is found. Returns a *NotFoundError when no entities are found.
func (*CycleRedeemCodeQuery) OnlyIDX ¶
func (_q *CycleRedeemCodeQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CycleRedeemCodeQuery) OnlyX ¶
func (_q *CycleRedeemCodeQuery) OnlyX(ctx context.Context) *CycleRedeemCode
OnlyX is like Only, but panics if an error occurs.
func (*CycleRedeemCodeQuery) Order ¶
func (_q *CycleRedeemCodeQuery) Order(o ...cycleredeemcode.OrderOption) *CycleRedeemCodeQuery
Order specifies how the records should be ordered.
func (*CycleRedeemCodeQuery) Select ¶
func (_q *CycleRedeemCodeQuery) Select(fields ...string) *CycleRedeemCodeSelect
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
}
client.CycleRedeemCode.Query().
Select(cycleredeemcode.FieldFkUserID).
Scan(ctx, &v)
func (*CycleRedeemCodeQuery) Unique ¶
func (_q *CycleRedeemCodeQuery) Unique(unique bool) *CycleRedeemCodeQuery
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 (*CycleRedeemCodeQuery) Where ¶
func (_q *CycleRedeemCodeQuery) Where(ps ...predicate.CycleRedeemCode) *CycleRedeemCodeQuery
Where adds a new predicate for the CycleRedeemCodeQuery builder.
type CycleRedeemCodeSelect ¶
type CycleRedeemCodeSelect struct {
*CycleRedeemCodeQuery
// contains filtered or unexported fields
}
CycleRedeemCodeSelect is the builder for selecting fields of CycleRedeemCode entities.
func (*CycleRedeemCodeSelect) Aggregate ¶
func (_s *CycleRedeemCodeSelect) Aggregate(fns ...AggregateFunc) *CycleRedeemCodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CycleRedeemCodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*CycleRedeemCodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleRedeemCodeSelect) Scan ¶
func (_s *CycleRedeemCodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleRedeemCodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleRedeemCodeUpdate ¶
type CycleRedeemCodeUpdate struct {
// contains filtered or unexported fields
}
CycleRedeemCodeUpdate is the builder for updating CycleRedeemCode entities.
func (*CycleRedeemCodeUpdate) AddCycle ¶
func (_u *CycleRedeemCodeUpdate) AddCycle(v float64) *CycleRedeemCodeUpdate
AddCycle adds value to the "cycle" field.
func (*CycleRedeemCodeUpdate) ClearFkUserID ¶
func (_u *CycleRedeemCodeUpdate) ClearFkUserID() *CycleRedeemCodeUpdate
ClearFkUserID clears the value of the "fk_user_id" field.
func (*CycleRedeemCodeUpdate) ClearUseTime ¶
func (_u *CycleRedeemCodeUpdate) ClearUseTime() *CycleRedeemCodeUpdate
ClearUseTime clears the value of the "use_time" field.
func (*CycleRedeemCodeUpdate) Exec ¶
func (_u *CycleRedeemCodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleRedeemCodeUpdate) ExecX ¶
func (_u *CycleRedeemCodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRedeemCodeUpdate) Mutation ¶
func (_u *CycleRedeemCodeUpdate) Mutation() *CycleRedeemCodeMutation
Mutation returns the CycleRedeemCodeMutation object of the builder.
func (*CycleRedeemCodeUpdate) Save ¶
func (_u *CycleRedeemCodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CycleRedeemCodeUpdate) SaveX ¶
func (_u *CycleRedeemCodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CycleRedeemCodeUpdate) SetCreateTime ¶
func (_u *CycleRedeemCodeUpdate) SetCreateTime(v time.Time) *CycleRedeemCodeUpdate
SetCreateTime sets the "create_time" field.
func (*CycleRedeemCodeUpdate) SetCycle ¶
func (_u *CycleRedeemCodeUpdate) SetCycle(v float64) *CycleRedeemCodeUpdate
SetCycle sets the "cycle" field.
func (*CycleRedeemCodeUpdate) SetFkUserID ¶
func (_u *CycleRedeemCodeUpdate) SetFkUserID(v uuid.UUID) *CycleRedeemCodeUpdate
SetFkUserID sets the "fk_user_id" field.
func (*CycleRedeemCodeUpdate) SetNillableCreateTime ¶
func (_u *CycleRedeemCodeUpdate) SetNillableCreateTime(v *time.Time) *CycleRedeemCodeUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CycleRedeemCodeUpdate) SetNillableCycle ¶
func (_u *CycleRedeemCodeUpdate) SetNillableCycle(v *float64) *CycleRedeemCodeUpdate
SetNillableCycle sets the "cycle" field if the given value is not nil.
func (*CycleRedeemCodeUpdate) SetNillableFkUserID ¶
func (_u *CycleRedeemCodeUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleRedeemCodeUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleRedeemCodeUpdate) SetNillableRedeemCode ¶
func (_u *CycleRedeemCodeUpdate) SetNillableRedeemCode(v *string) *CycleRedeemCodeUpdate
SetNillableRedeemCode sets the "redeem_code" field if the given value is not nil.
func (*CycleRedeemCodeUpdate) SetNillableState ¶
func (_u *CycleRedeemCodeUpdate) SetNillableState(v *bool) *CycleRedeemCodeUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*CycleRedeemCodeUpdate) SetNillableUseTime ¶
func (_u *CycleRedeemCodeUpdate) SetNillableUseTime(v *time.Time) *CycleRedeemCodeUpdate
SetNillableUseTime sets the "use_time" field if the given value is not nil.
func (*CycleRedeemCodeUpdate) SetRedeemCode ¶
func (_u *CycleRedeemCodeUpdate) SetRedeemCode(v string) *CycleRedeemCodeUpdate
SetRedeemCode sets the "redeem_code" field.
func (*CycleRedeemCodeUpdate) SetState ¶
func (_u *CycleRedeemCodeUpdate) SetState(v bool) *CycleRedeemCodeUpdate
SetState sets the "state" field.
func (*CycleRedeemCodeUpdate) SetUseTime ¶
func (_u *CycleRedeemCodeUpdate) SetUseTime(v time.Time) *CycleRedeemCodeUpdate
SetUseTime sets the "use_time" field.
func (*CycleRedeemCodeUpdate) Where ¶
func (_u *CycleRedeemCodeUpdate) Where(ps ...predicate.CycleRedeemCode) *CycleRedeemCodeUpdate
Where appends a list predicates to the CycleRedeemCodeUpdate builder.
type CycleRedeemCodeUpdateOne ¶
type CycleRedeemCodeUpdateOne struct {
// contains filtered or unexported fields
}
CycleRedeemCodeUpdateOne is the builder for updating a single CycleRedeemCode entity.
func (*CycleRedeemCodeUpdateOne) AddCycle ¶
func (_u *CycleRedeemCodeUpdateOne) AddCycle(v float64) *CycleRedeemCodeUpdateOne
AddCycle adds value to the "cycle" field.
func (*CycleRedeemCodeUpdateOne) ClearFkUserID ¶
func (_u *CycleRedeemCodeUpdateOne) ClearFkUserID() *CycleRedeemCodeUpdateOne
ClearFkUserID clears the value of the "fk_user_id" field.
func (*CycleRedeemCodeUpdateOne) ClearUseTime ¶
func (_u *CycleRedeemCodeUpdateOne) ClearUseTime() *CycleRedeemCodeUpdateOne
ClearUseTime clears the value of the "use_time" field.
func (*CycleRedeemCodeUpdateOne) Exec ¶
func (_u *CycleRedeemCodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CycleRedeemCodeUpdateOne) ExecX ¶
func (_u *CycleRedeemCodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRedeemCodeUpdateOne) Mutation ¶
func (_u *CycleRedeemCodeUpdateOne) Mutation() *CycleRedeemCodeMutation
Mutation returns the CycleRedeemCodeMutation object of the builder.
func (*CycleRedeemCodeUpdateOne) Save ¶
func (_u *CycleRedeemCodeUpdateOne) Save(ctx context.Context) (*CycleRedeemCode, error)
Save executes the query and returns the updated CycleRedeemCode entity.
func (*CycleRedeemCodeUpdateOne) SaveX ¶
func (_u *CycleRedeemCodeUpdateOne) SaveX(ctx context.Context) *CycleRedeemCode
SaveX is like Save, but panics if an error occurs.
func (*CycleRedeemCodeUpdateOne) Select ¶
func (_u *CycleRedeemCodeUpdateOne) Select(field string, fields ...string) *CycleRedeemCodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CycleRedeemCodeUpdateOne) SetCreateTime ¶
func (_u *CycleRedeemCodeUpdateOne) SetCreateTime(v time.Time) *CycleRedeemCodeUpdateOne
SetCreateTime sets the "create_time" field.
func (*CycleRedeemCodeUpdateOne) SetCycle ¶
func (_u *CycleRedeemCodeUpdateOne) SetCycle(v float64) *CycleRedeemCodeUpdateOne
SetCycle sets the "cycle" field.
func (*CycleRedeemCodeUpdateOne) SetFkUserID ¶
func (_u *CycleRedeemCodeUpdateOne) SetFkUserID(v uuid.UUID) *CycleRedeemCodeUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*CycleRedeemCodeUpdateOne) SetNillableCreateTime ¶
func (_u *CycleRedeemCodeUpdateOne) SetNillableCreateTime(v *time.Time) *CycleRedeemCodeUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CycleRedeemCodeUpdateOne) SetNillableCycle ¶
func (_u *CycleRedeemCodeUpdateOne) SetNillableCycle(v *float64) *CycleRedeemCodeUpdateOne
SetNillableCycle sets the "cycle" field if the given value is not nil.
func (*CycleRedeemCodeUpdateOne) SetNillableFkUserID ¶
func (_u *CycleRedeemCodeUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleRedeemCodeUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleRedeemCodeUpdateOne) SetNillableRedeemCode ¶
func (_u *CycleRedeemCodeUpdateOne) SetNillableRedeemCode(v *string) *CycleRedeemCodeUpdateOne
SetNillableRedeemCode sets the "redeem_code" field if the given value is not nil.
func (*CycleRedeemCodeUpdateOne) SetNillableState ¶
func (_u *CycleRedeemCodeUpdateOne) SetNillableState(v *bool) *CycleRedeemCodeUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*CycleRedeemCodeUpdateOne) SetNillableUseTime ¶
func (_u *CycleRedeemCodeUpdateOne) SetNillableUseTime(v *time.Time) *CycleRedeemCodeUpdateOne
SetNillableUseTime sets the "use_time" field if the given value is not nil.
func (*CycleRedeemCodeUpdateOne) SetRedeemCode ¶
func (_u *CycleRedeemCodeUpdateOne) SetRedeemCode(v string) *CycleRedeemCodeUpdateOne
SetRedeemCode sets the "redeem_code" field.
func (*CycleRedeemCodeUpdateOne) SetState ¶
func (_u *CycleRedeemCodeUpdateOne) SetState(v bool) *CycleRedeemCodeUpdateOne
SetState sets the "state" field.
func (*CycleRedeemCodeUpdateOne) SetUseTime ¶
func (_u *CycleRedeemCodeUpdateOne) SetUseTime(v time.Time) *CycleRedeemCodeUpdateOne
SetUseTime sets the "use_time" field.
func (*CycleRedeemCodeUpdateOne) Where ¶
func (_u *CycleRedeemCodeUpdateOne) Where(ps ...predicate.CycleRedeemCode) *CycleRedeemCodeUpdateOne
Where appends a list predicates to the CycleRedeemCodeUpdate builder.
type CycleRedeemCodes ¶
type CycleRedeemCodes []*CycleRedeemCode
CycleRedeemCodes is a parsable slice of CycleRedeemCode.
type CycleRenewal ¶
type CycleRenewal struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// 资源ID
ResourceID uuid.UUID `json:"resource_id,omitempty"`
// 资源类型
ResourceType int `json:"resource_type,omitempty"`
// 产品名字
ProductName string `json:"product_name,omitempty"`
// 产品描述
ProductDesc string `json:"product_desc,omitempty"`
// 状态
State int8 `json:"state,omitempty"`
// 延长时间
ExtendDay int8 `json:"extend_day,omitempty"`
// 额外的价格
ExtendPrice float64 `json:"extend_price,omitempty"`
// 到期时间
DueTime *time.Time `json:"due_time,omitempty"`
// 续费时间
RenewalTime *time.Time `json:"renewal_time,omitempty"`
// 自动续费
AutoRenewal bool `json:"auto_renewal,omitempty"`
// contains filtered or unexported fields
}
CycleRenewal is the model entity for the CycleRenewal schema.
func (*CycleRenewal) String ¶
func (_m *CycleRenewal) String() string
String implements the fmt.Stringer.
func (*CycleRenewal) Unwrap ¶
func (_m *CycleRenewal) Unwrap() *CycleRenewal
Unwrap unwraps the CycleRenewal 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 (*CycleRenewal) Update ¶
func (_m *CycleRenewal) Update() *CycleRenewalUpdateOne
Update returns a builder for updating this CycleRenewal. Note that you need to call CycleRenewal.Unwrap() before calling this method if this CycleRenewal was returned from a transaction, and the transaction was committed or rolled back.
type CycleRenewalClient ¶
type CycleRenewalClient struct {
// contains filtered or unexported fields
}
CycleRenewalClient is a client for the CycleRenewal schema.
func NewCycleRenewalClient ¶
func NewCycleRenewalClient(c config) *CycleRenewalClient
NewCycleRenewalClient returns a client for the CycleRenewal from the given config.
func (*CycleRenewalClient) Create ¶
func (c *CycleRenewalClient) Create() *CycleRenewalCreate
Create returns a builder for creating a CycleRenewal entity.
func (*CycleRenewalClient) CreateBulk ¶
func (c *CycleRenewalClient) CreateBulk(builders ...*CycleRenewalCreate) *CycleRenewalCreateBulk
CreateBulk returns a builder for creating a bulk of CycleRenewal entities.
func (*CycleRenewalClient) Delete ¶
func (c *CycleRenewalClient) Delete() *CycleRenewalDelete
Delete returns a delete builder for CycleRenewal.
func (*CycleRenewalClient) DeleteOne ¶
func (c *CycleRenewalClient) DeleteOne(_m *CycleRenewal) *CycleRenewalDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CycleRenewalClient) DeleteOneID ¶
func (c *CycleRenewalClient) DeleteOneID(id uuid.UUID) *CycleRenewalDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CycleRenewalClient) Get ¶
func (c *CycleRenewalClient) Get(ctx context.Context, id uuid.UUID) (*CycleRenewal, error)
Get returns a CycleRenewal entity by its id.
func (*CycleRenewalClient) GetX ¶
func (c *CycleRenewalClient) GetX(ctx context.Context, id uuid.UUID) *CycleRenewal
GetX is like Get, but panics if an error occurs.
func (*CycleRenewalClient) Hooks ¶
func (c *CycleRenewalClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CycleRenewalClient) Intercept ¶
func (c *CycleRenewalClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cyclerenewal.Intercept(f(g(h())))`.
func (*CycleRenewalClient) Interceptors ¶
func (c *CycleRenewalClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CycleRenewalClient) MapCreateBulk ¶
func (c *CycleRenewalClient) MapCreateBulk(slice any, setFunc func(*CycleRenewalCreate, int)) *CycleRenewalCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CycleRenewalClient) Query ¶
func (c *CycleRenewalClient) Query() *CycleRenewalQuery
Query returns a query builder for CycleRenewal.
func (*CycleRenewalClient) Update ¶
func (c *CycleRenewalClient) Update() *CycleRenewalUpdate
Update returns an update builder for CycleRenewal.
func (*CycleRenewalClient) UpdateOne ¶
func (c *CycleRenewalClient) UpdateOne(_m *CycleRenewal) *CycleRenewalUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CycleRenewalClient) UpdateOneID ¶
func (c *CycleRenewalClient) UpdateOneID(id uuid.UUID) *CycleRenewalUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CycleRenewalClient) Use ¶
func (c *CycleRenewalClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cyclerenewal.Hooks(f(g(h())))`.
type CycleRenewalCreate ¶
type CycleRenewalCreate struct {
// contains filtered or unexported fields
}
CycleRenewalCreate is the builder for creating a CycleRenewal entity.
func (*CycleRenewalCreate) Exec ¶
func (_c *CycleRenewalCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleRenewalCreate) ExecX ¶
func (_c *CycleRenewalCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRenewalCreate) Mutation ¶
func (_c *CycleRenewalCreate) Mutation() *CycleRenewalMutation
Mutation returns the CycleRenewalMutation object of the builder.
func (*CycleRenewalCreate) Save ¶
func (_c *CycleRenewalCreate) Save(ctx context.Context) (*CycleRenewal, error)
Save creates the CycleRenewal in the database.
func (*CycleRenewalCreate) SaveX ¶
func (_c *CycleRenewalCreate) SaveX(ctx context.Context) *CycleRenewal
SaveX calls Save and panics if Save returns an error.
func (*CycleRenewalCreate) SetAutoRenewal ¶
func (_c *CycleRenewalCreate) SetAutoRenewal(v bool) *CycleRenewalCreate
SetAutoRenewal sets the "auto_renewal" field.
func (*CycleRenewalCreate) SetDueTime ¶
func (_c *CycleRenewalCreate) SetDueTime(v time.Time) *CycleRenewalCreate
SetDueTime sets the "due_time" field.
func (*CycleRenewalCreate) SetExtendDay ¶
func (_c *CycleRenewalCreate) SetExtendDay(v int8) *CycleRenewalCreate
SetExtendDay sets the "extend_day" field.
func (*CycleRenewalCreate) SetExtendPrice ¶
func (_c *CycleRenewalCreate) SetExtendPrice(v float64) *CycleRenewalCreate
SetExtendPrice sets the "extend_price" field.
func (*CycleRenewalCreate) SetFkUserID ¶
func (_c *CycleRenewalCreate) SetFkUserID(v uuid.UUID) *CycleRenewalCreate
SetFkUserID sets the "fk_user_id" field.
func (*CycleRenewalCreate) SetID ¶
func (_c *CycleRenewalCreate) SetID(v uuid.UUID) *CycleRenewalCreate
SetID sets the "id" field.
func (*CycleRenewalCreate) SetNillableDueTime ¶
func (_c *CycleRenewalCreate) SetNillableDueTime(v *time.Time) *CycleRenewalCreate
SetNillableDueTime sets the "due_time" field if the given value is not nil.
func (*CycleRenewalCreate) SetNillableID ¶
func (_c *CycleRenewalCreate) SetNillableID(v *uuid.UUID) *CycleRenewalCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CycleRenewalCreate) SetNillableRenewalTime ¶
func (_c *CycleRenewalCreate) SetNillableRenewalTime(v *time.Time) *CycleRenewalCreate
SetNillableRenewalTime sets the "renewal_time" field if the given value is not nil.
func (*CycleRenewalCreate) SetProductDesc ¶
func (_c *CycleRenewalCreate) SetProductDesc(v string) *CycleRenewalCreate
SetProductDesc sets the "product_desc" field.
func (*CycleRenewalCreate) SetProductName ¶
func (_c *CycleRenewalCreate) SetProductName(v string) *CycleRenewalCreate
SetProductName sets the "product_name" field.
func (*CycleRenewalCreate) SetRenewalTime ¶
func (_c *CycleRenewalCreate) SetRenewalTime(v time.Time) *CycleRenewalCreate
SetRenewalTime sets the "renewal_time" field.
func (*CycleRenewalCreate) SetResourceID ¶
func (_c *CycleRenewalCreate) SetResourceID(v uuid.UUID) *CycleRenewalCreate
SetResourceID sets the "resource_id" field.
func (*CycleRenewalCreate) SetResourceType ¶
func (_c *CycleRenewalCreate) SetResourceType(v int) *CycleRenewalCreate
SetResourceType sets the "resource_type" field.
func (*CycleRenewalCreate) SetState ¶
func (_c *CycleRenewalCreate) SetState(v int8) *CycleRenewalCreate
SetState sets the "state" field.
type CycleRenewalCreateBulk ¶
type CycleRenewalCreateBulk struct {
// contains filtered or unexported fields
}
CycleRenewalCreateBulk is the builder for creating many CycleRenewal entities in bulk.
func (*CycleRenewalCreateBulk) Exec ¶
func (_c *CycleRenewalCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleRenewalCreateBulk) ExecX ¶
func (_c *CycleRenewalCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRenewalCreateBulk) Save ¶
func (_c *CycleRenewalCreateBulk) Save(ctx context.Context) ([]*CycleRenewal, error)
Save creates the CycleRenewal entities in the database.
func (*CycleRenewalCreateBulk) SaveX ¶
func (_c *CycleRenewalCreateBulk) SaveX(ctx context.Context) []*CycleRenewal
SaveX is like Save, but panics if an error occurs.
type CycleRenewalDelete ¶
type CycleRenewalDelete struct {
// contains filtered or unexported fields
}
CycleRenewalDelete is the builder for deleting a CycleRenewal entity.
func (*CycleRenewalDelete) Exec ¶
func (_d *CycleRenewalDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CycleRenewalDelete) ExecX ¶
func (_d *CycleRenewalDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CycleRenewalDelete) Where ¶
func (_d *CycleRenewalDelete) Where(ps ...predicate.CycleRenewal) *CycleRenewalDelete
Where appends a list predicates to the CycleRenewalDelete builder.
type CycleRenewalDeleteOne ¶
type CycleRenewalDeleteOne struct {
// contains filtered or unexported fields
}
CycleRenewalDeleteOne is the builder for deleting a single CycleRenewal entity.
func (*CycleRenewalDeleteOne) Exec ¶
func (_d *CycleRenewalDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CycleRenewalDeleteOne) ExecX ¶
func (_d *CycleRenewalDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRenewalDeleteOne) Where ¶
func (_d *CycleRenewalDeleteOne) Where(ps ...predicate.CycleRenewal) *CycleRenewalDeleteOne
Where appends a list predicates to the CycleRenewalDelete builder.
type CycleRenewalGroupBy ¶
type CycleRenewalGroupBy struct {
// contains filtered or unexported fields
}
CycleRenewalGroupBy is the group-by builder for CycleRenewal entities.
func (*CycleRenewalGroupBy) Aggregate ¶
func (_g *CycleRenewalGroupBy) Aggregate(fns ...AggregateFunc) *CycleRenewalGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CycleRenewalGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleRenewalGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleRenewalGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleRenewalGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleRenewalGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleRenewalGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleRenewalGroupBy) Scan ¶
func (_g *CycleRenewalGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleRenewalGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleRenewalMutation ¶
type CycleRenewalMutation struct {
// contains filtered or unexported fields
}
CycleRenewalMutation represents an operation that mutates the CycleRenewal nodes in the graph.
func (*CycleRenewalMutation) AddExtendDay ¶
func (m *CycleRenewalMutation) AddExtendDay(i int8)
AddExtendDay adds i to the "extend_day" field.
func (*CycleRenewalMutation) AddExtendPrice ¶
func (m *CycleRenewalMutation) AddExtendPrice(f float64)
AddExtendPrice adds f to the "extend_price" field.
func (*CycleRenewalMutation) AddField ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) AddResourceType ¶
func (m *CycleRenewalMutation) AddResourceType(i int)
AddResourceType adds i to the "resource_type" field.
func (*CycleRenewalMutation) AddState ¶
func (m *CycleRenewalMutation) AddState(i int8)
AddState adds i to the "state" field.
func (*CycleRenewalMutation) AddedEdges ¶
func (m *CycleRenewalMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CycleRenewalMutation) AddedExtendDay ¶
func (m *CycleRenewalMutation) AddedExtendDay() (r int8, exists bool)
AddedExtendDay returns the value that was added to the "extend_day" field in this mutation.
func (*CycleRenewalMutation) AddedExtendPrice ¶
func (m *CycleRenewalMutation) AddedExtendPrice() (r float64, exists bool)
AddedExtendPrice returns the value that was added to the "extend_price" field in this mutation.
func (*CycleRenewalMutation) AddedField ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) AddedFields ¶
func (m *CycleRenewalMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CycleRenewalMutation) AddedIDs ¶
func (m *CycleRenewalMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CycleRenewalMutation) AddedResourceType ¶
func (m *CycleRenewalMutation) AddedResourceType() (r int, exists bool)
AddedResourceType returns the value that was added to the "resource_type" field in this mutation.
func (*CycleRenewalMutation) AddedState ¶
func (m *CycleRenewalMutation) AddedState() (r int8, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*CycleRenewalMutation) AutoRenewal ¶
func (m *CycleRenewalMutation) AutoRenewal() (r bool, exists bool)
AutoRenewal returns the value of the "auto_renewal" field in the mutation.
func (*CycleRenewalMutation) ClearDueTime ¶
func (m *CycleRenewalMutation) ClearDueTime()
ClearDueTime clears the value of the "due_time" field.
func (*CycleRenewalMutation) ClearEdge ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) ClearField ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) ClearRenewalTime ¶
func (m *CycleRenewalMutation) ClearRenewalTime()
ClearRenewalTime clears the value of the "renewal_time" field.
func (*CycleRenewalMutation) ClearedEdges ¶
func (m *CycleRenewalMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CycleRenewalMutation) ClearedFields ¶
func (m *CycleRenewalMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CycleRenewalMutation) Client ¶
func (m CycleRenewalMutation) 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 (*CycleRenewalMutation) DueTime ¶
func (m *CycleRenewalMutation) DueTime() (r time.Time, exists bool)
DueTime returns the value of the "due_time" field in the mutation.
func (*CycleRenewalMutation) DueTimeCleared ¶
func (m *CycleRenewalMutation) DueTimeCleared() bool
DueTimeCleared returns if the "due_time" field was cleared in this mutation.
func (*CycleRenewalMutation) EdgeCleared ¶
func (m *CycleRenewalMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CycleRenewalMutation) ExtendDay ¶
func (m *CycleRenewalMutation) ExtendDay() (r int8, exists bool)
ExtendDay returns the value of the "extend_day" field in the mutation.
func (*CycleRenewalMutation) ExtendPrice ¶
func (m *CycleRenewalMutation) ExtendPrice() (r float64, exists bool)
ExtendPrice returns the value of the "extend_price" field in the mutation.
func (*CycleRenewalMutation) Field ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) FieldCleared ¶
func (m *CycleRenewalMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CycleRenewalMutation) Fields ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) FkUserID ¶
func (m *CycleRenewalMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*CycleRenewalMutation) ID ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) 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 (*CycleRenewalMutation) OldAutoRenewal ¶
func (m *CycleRenewalMutation) OldAutoRenewal(ctx context.Context) (v bool, err error)
OldAutoRenewal returns the old "auto_renewal" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) OldDueTime ¶
OldDueTime returns the old "due_time" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) OldExtendDay ¶
func (m *CycleRenewalMutation) OldExtendDay(ctx context.Context) (v int8, err error)
OldExtendDay returns the old "extend_day" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) OldExtendPrice ¶
func (m *CycleRenewalMutation) OldExtendPrice(ctx context.Context) (v float64, err error)
OldExtendPrice returns the old "extend_price" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) 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 (*CycleRenewalMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) OldProductDesc ¶
func (m *CycleRenewalMutation) OldProductDesc(ctx context.Context) (v string, err error)
OldProductDesc returns the old "product_desc" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) OldProductName ¶
func (m *CycleRenewalMutation) OldProductName(ctx context.Context) (v string, err error)
OldProductName returns the old "product_name" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) OldRenewalTime ¶
OldRenewalTime returns the old "renewal_time" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) OldResourceID ¶
OldResourceID returns the old "resource_id" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) OldResourceType ¶
func (m *CycleRenewalMutation) OldResourceType(ctx context.Context) (v int, err error)
OldResourceType returns the old "resource_type" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) OldState ¶
func (m *CycleRenewalMutation) OldState(ctx context.Context) (v int8, err error)
OldState returns the old "state" field's value of the CycleRenewal entity. If the CycleRenewal 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 (*CycleRenewalMutation) Op ¶
func (m *CycleRenewalMutation) Op() Op
Op returns the operation name.
func (*CycleRenewalMutation) ProductDesc ¶
func (m *CycleRenewalMutation) ProductDesc() (r string, exists bool)
ProductDesc returns the value of the "product_desc" field in the mutation.
func (*CycleRenewalMutation) ProductName ¶
func (m *CycleRenewalMutation) ProductName() (r string, exists bool)
ProductName returns the value of the "product_name" field in the mutation.
func (*CycleRenewalMutation) RemovedEdges ¶
func (m *CycleRenewalMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CycleRenewalMutation) RemovedIDs ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) RenewalTime ¶
func (m *CycleRenewalMutation) RenewalTime() (r time.Time, exists bool)
RenewalTime returns the value of the "renewal_time" field in the mutation.
func (*CycleRenewalMutation) RenewalTimeCleared ¶
func (m *CycleRenewalMutation) RenewalTimeCleared() bool
RenewalTimeCleared returns if the "renewal_time" field was cleared in this mutation.
func (*CycleRenewalMutation) ResetAutoRenewal ¶
func (m *CycleRenewalMutation) ResetAutoRenewal()
ResetAutoRenewal resets all changes to the "auto_renewal" field.
func (*CycleRenewalMutation) ResetDueTime ¶
func (m *CycleRenewalMutation) ResetDueTime()
ResetDueTime resets all changes to the "due_time" field.
func (*CycleRenewalMutation) ResetEdge ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) ResetExtendDay ¶
func (m *CycleRenewalMutation) ResetExtendDay()
ResetExtendDay resets all changes to the "extend_day" field.
func (*CycleRenewalMutation) ResetExtendPrice ¶
func (m *CycleRenewalMutation) ResetExtendPrice()
ResetExtendPrice resets all changes to the "extend_price" field.
func (*CycleRenewalMutation) ResetField ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) ResetFkUserID ¶
func (m *CycleRenewalMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*CycleRenewalMutation) ResetProductDesc ¶
func (m *CycleRenewalMutation) ResetProductDesc()
ResetProductDesc resets all changes to the "product_desc" field.
func (*CycleRenewalMutation) ResetProductName ¶
func (m *CycleRenewalMutation) ResetProductName()
ResetProductName resets all changes to the "product_name" field.
func (*CycleRenewalMutation) ResetRenewalTime ¶
func (m *CycleRenewalMutation) ResetRenewalTime()
ResetRenewalTime resets all changes to the "renewal_time" field.
func (*CycleRenewalMutation) ResetResourceID ¶
func (m *CycleRenewalMutation) ResetResourceID()
ResetResourceID resets all changes to the "resource_id" field.
func (*CycleRenewalMutation) ResetResourceType ¶
func (m *CycleRenewalMutation) ResetResourceType()
ResetResourceType resets all changes to the "resource_type" field.
func (*CycleRenewalMutation) ResetState ¶
func (m *CycleRenewalMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*CycleRenewalMutation) ResourceID ¶
func (m *CycleRenewalMutation) ResourceID() (r uuid.UUID, exists bool)
ResourceID returns the value of the "resource_id" field in the mutation.
func (*CycleRenewalMutation) ResourceType ¶
func (m *CycleRenewalMutation) ResourceType() (r int, exists bool)
ResourceType returns the value of the "resource_type" field in the mutation.
func (*CycleRenewalMutation) SetAutoRenewal ¶
func (m *CycleRenewalMutation) SetAutoRenewal(b bool)
SetAutoRenewal sets the "auto_renewal" field.
func (*CycleRenewalMutation) SetDueTime ¶
func (m *CycleRenewalMutation) SetDueTime(t time.Time)
SetDueTime sets the "due_time" field.
func (*CycleRenewalMutation) SetExtendDay ¶
func (m *CycleRenewalMutation) SetExtendDay(i int8)
SetExtendDay sets the "extend_day" field.
func (*CycleRenewalMutation) SetExtendPrice ¶
func (m *CycleRenewalMutation) SetExtendPrice(f float64)
SetExtendPrice sets the "extend_price" field.
func (*CycleRenewalMutation) SetField ¶
func (m *CycleRenewalMutation) 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 (*CycleRenewalMutation) SetFkUserID ¶
func (m *CycleRenewalMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*CycleRenewalMutation) SetID ¶
func (m *CycleRenewalMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CycleRenewal entities.
func (*CycleRenewalMutation) SetOp ¶
func (m *CycleRenewalMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CycleRenewalMutation) SetProductDesc ¶
func (m *CycleRenewalMutation) SetProductDesc(s string)
SetProductDesc sets the "product_desc" field.
func (*CycleRenewalMutation) SetProductName ¶
func (m *CycleRenewalMutation) SetProductName(s string)
SetProductName sets the "product_name" field.
func (*CycleRenewalMutation) SetRenewalTime ¶
func (m *CycleRenewalMutation) SetRenewalTime(t time.Time)
SetRenewalTime sets the "renewal_time" field.
func (*CycleRenewalMutation) SetResourceID ¶
func (m *CycleRenewalMutation) SetResourceID(u uuid.UUID)
SetResourceID sets the "resource_id" field.
func (*CycleRenewalMutation) SetResourceType ¶
func (m *CycleRenewalMutation) SetResourceType(i int)
SetResourceType sets the "resource_type" field.
func (*CycleRenewalMutation) SetState ¶
func (m *CycleRenewalMutation) SetState(i int8)
SetState sets the "state" field.
func (*CycleRenewalMutation) State ¶
func (m *CycleRenewalMutation) State() (r int8, exists bool)
State returns the value of the "state" field in the mutation.
func (CycleRenewalMutation) Tx ¶
func (m CycleRenewalMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CycleRenewalMutation) Type ¶
func (m *CycleRenewalMutation) Type() string
Type returns the node type of this mutation (CycleRenewal).
func (*CycleRenewalMutation) Where ¶
func (m *CycleRenewalMutation) Where(ps ...predicate.CycleRenewal)
Where appends a list predicates to the CycleRenewalMutation builder.
func (*CycleRenewalMutation) WhereP ¶
func (m *CycleRenewalMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CycleRenewalMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CycleRenewalQuery ¶
type CycleRenewalQuery struct {
// contains filtered or unexported fields
}
CycleRenewalQuery is the builder for querying CycleRenewal entities.
func (*CycleRenewalQuery) Aggregate ¶
func (_q *CycleRenewalQuery) Aggregate(fns ...AggregateFunc) *CycleRenewalSelect
Aggregate returns a CycleRenewalSelect configured with the given aggregations.
func (*CycleRenewalQuery) All ¶
func (_q *CycleRenewalQuery) All(ctx context.Context) ([]*CycleRenewal, error)
All executes the query and returns a list of CycleRenewals.
func (*CycleRenewalQuery) AllX ¶
func (_q *CycleRenewalQuery) AllX(ctx context.Context) []*CycleRenewal
AllX is like All, but panics if an error occurs.
func (*CycleRenewalQuery) Clone ¶
func (_q *CycleRenewalQuery) Clone() *CycleRenewalQuery
Clone returns a duplicate of the CycleRenewalQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CycleRenewalQuery) Count ¶
func (_q *CycleRenewalQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CycleRenewalQuery) CountX ¶
func (_q *CycleRenewalQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CycleRenewalQuery) Exist ¶
func (_q *CycleRenewalQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CycleRenewalQuery) ExistX ¶
func (_q *CycleRenewalQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CycleRenewalQuery) First ¶
func (_q *CycleRenewalQuery) First(ctx context.Context) (*CycleRenewal, error)
First returns the first CycleRenewal entity from the query. Returns a *NotFoundError when no CycleRenewal was found.
func (*CycleRenewalQuery) FirstID ¶
FirstID returns the first CycleRenewal ID from the query. Returns a *NotFoundError when no CycleRenewal ID was found.
func (*CycleRenewalQuery) FirstIDX ¶
func (_q *CycleRenewalQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CycleRenewalQuery) FirstX ¶
func (_q *CycleRenewalQuery) FirstX(ctx context.Context) *CycleRenewal
FirstX is like First, but panics if an error occurs.
func (*CycleRenewalQuery) GroupBy ¶
func (_q *CycleRenewalQuery) GroupBy(field string, fields ...string) *CycleRenewalGroupBy
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.CycleRenewal.Query().
GroupBy(cyclerenewal.FieldFkUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CycleRenewalQuery) IDsX ¶
func (_q *CycleRenewalQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CycleRenewalQuery) Limit ¶
func (_q *CycleRenewalQuery) Limit(limit int) *CycleRenewalQuery
Limit the number of records to be returned by this query.
func (*CycleRenewalQuery) Offset ¶
func (_q *CycleRenewalQuery) Offset(offset int) *CycleRenewalQuery
Offset to start from.
func (*CycleRenewalQuery) Only ¶
func (_q *CycleRenewalQuery) Only(ctx context.Context) (*CycleRenewal, error)
Only returns a single CycleRenewal entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CycleRenewal entity is found. Returns a *NotFoundError when no CycleRenewal entities are found.
func (*CycleRenewalQuery) OnlyID ¶
OnlyID is like Only, but returns the only CycleRenewal ID in the query. Returns a *NotSingularError when more than one CycleRenewal ID is found. Returns a *NotFoundError when no entities are found.
func (*CycleRenewalQuery) OnlyIDX ¶
func (_q *CycleRenewalQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CycleRenewalQuery) OnlyX ¶
func (_q *CycleRenewalQuery) OnlyX(ctx context.Context) *CycleRenewal
OnlyX is like Only, but panics if an error occurs.
func (*CycleRenewalQuery) Order ¶
func (_q *CycleRenewalQuery) Order(o ...cyclerenewal.OrderOption) *CycleRenewalQuery
Order specifies how the records should be ordered.
func (*CycleRenewalQuery) Select ¶
func (_q *CycleRenewalQuery) Select(fields ...string) *CycleRenewalSelect
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
}
client.CycleRenewal.Query().
Select(cyclerenewal.FieldFkUserID).
Scan(ctx, &v)
func (*CycleRenewalQuery) Unique ¶
func (_q *CycleRenewalQuery) Unique(unique bool) *CycleRenewalQuery
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 (*CycleRenewalQuery) Where ¶
func (_q *CycleRenewalQuery) Where(ps ...predicate.CycleRenewal) *CycleRenewalQuery
Where adds a new predicate for the CycleRenewalQuery builder.
type CycleRenewalSelect ¶
type CycleRenewalSelect struct {
*CycleRenewalQuery
// contains filtered or unexported fields
}
CycleRenewalSelect is the builder for selecting fields of CycleRenewal entities.
func (*CycleRenewalSelect) Aggregate ¶
func (_s *CycleRenewalSelect) Aggregate(fns ...AggregateFunc) *CycleRenewalSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CycleRenewalSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleRenewalSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleRenewalSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleRenewalSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleRenewalSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleRenewalSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleRenewalSelect) Scan ¶
func (_s *CycleRenewalSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleRenewalSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleRenewalUpdate ¶
type CycleRenewalUpdate struct {
// contains filtered or unexported fields
}
CycleRenewalUpdate is the builder for updating CycleRenewal entities.
func (*CycleRenewalUpdate) AddExtendDay ¶
func (_u *CycleRenewalUpdate) AddExtendDay(v int8) *CycleRenewalUpdate
AddExtendDay adds value to the "extend_day" field.
func (*CycleRenewalUpdate) AddExtendPrice ¶
func (_u *CycleRenewalUpdate) AddExtendPrice(v float64) *CycleRenewalUpdate
AddExtendPrice adds value to the "extend_price" field.
func (*CycleRenewalUpdate) AddResourceType ¶
func (_u *CycleRenewalUpdate) AddResourceType(v int) *CycleRenewalUpdate
AddResourceType adds value to the "resource_type" field.
func (*CycleRenewalUpdate) AddState ¶
func (_u *CycleRenewalUpdate) AddState(v int8) *CycleRenewalUpdate
AddState adds value to the "state" field.
func (*CycleRenewalUpdate) ClearDueTime ¶
func (_u *CycleRenewalUpdate) ClearDueTime() *CycleRenewalUpdate
ClearDueTime clears the value of the "due_time" field.
func (*CycleRenewalUpdate) ClearRenewalTime ¶
func (_u *CycleRenewalUpdate) ClearRenewalTime() *CycleRenewalUpdate
ClearRenewalTime clears the value of the "renewal_time" field.
func (*CycleRenewalUpdate) Exec ¶
func (_u *CycleRenewalUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleRenewalUpdate) ExecX ¶
func (_u *CycleRenewalUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRenewalUpdate) Mutation ¶
func (_u *CycleRenewalUpdate) Mutation() *CycleRenewalMutation
Mutation returns the CycleRenewalMutation object of the builder.
func (*CycleRenewalUpdate) Save ¶
func (_u *CycleRenewalUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CycleRenewalUpdate) SaveX ¶
func (_u *CycleRenewalUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CycleRenewalUpdate) SetAutoRenewal ¶
func (_u *CycleRenewalUpdate) SetAutoRenewal(v bool) *CycleRenewalUpdate
SetAutoRenewal sets the "auto_renewal" field.
func (*CycleRenewalUpdate) SetDueTime ¶
func (_u *CycleRenewalUpdate) SetDueTime(v time.Time) *CycleRenewalUpdate
SetDueTime sets the "due_time" field.
func (*CycleRenewalUpdate) SetExtendDay ¶
func (_u *CycleRenewalUpdate) SetExtendDay(v int8) *CycleRenewalUpdate
SetExtendDay sets the "extend_day" field.
func (*CycleRenewalUpdate) SetExtendPrice ¶
func (_u *CycleRenewalUpdate) SetExtendPrice(v float64) *CycleRenewalUpdate
SetExtendPrice sets the "extend_price" field.
func (*CycleRenewalUpdate) SetFkUserID ¶
func (_u *CycleRenewalUpdate) SetFkUserID(v uuid.UUID) *CycleRenewalUpdate
SetFkUserID sets the "fk_user_id" field.
func (*CycleRenewalUpdate) SetNillableAutoRenewal ¶
func (_u *CycleRenewalUpdate) SetNillableAutoRenewal(v *bool) *CycleRenewalUpdate
SetNillableAutoRenewal sets the "auto_renewal" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableDueTime ¶
func (_u *CycleRenewalUpdate) SetNillableDueTime(v *time.Time) *CycleRenewalUpdate
SetNillableDueTime sets the "due_time" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableExtendDay ¶
func (_u *CycleRenewalUpdate) SetNillableExtendDay(v *int8) *CycleRenewalUpdate
SetNillableExtendDay sets the "extend_day" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableExtendPrice ¶
func (_u *CycleRenewalUpdate) SetNillableExtendPrice(v *float64) *CycleRenewalUpdate
SetNillableExtendPrice sets the "extend_price" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableFkUserID ¶
func (_u *CycleRenewalUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleRenewalUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableProductDesc ¶
func (_u *CycleRenewalUpdate) SetNillableProductDesc(v *string) *CycleRenewalUpdate
SetNillableProductDesc sets the "product_desc" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableProductName ¶
func (_u *CycleRenewalUpdate) SetNillableProductName(v *string) *CycleRenewalUpdate
SetNillableProductName sets the "product_name" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableRenewalTime ¶
func (_u *CycleRenewalUpdate) SetNillableRenewalTime(v *time.Time) *CycleRenewalUpdate
SetNillableRenewalTime sets the "renewal_time" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableResourceID ¶
func (_u *CycleRenewalUpdate) SetNillableResourceID(v *uuid.UUID) *CycleRenewalUpdate
SetNillableResourceID sets the "resource_id" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableResourceType ¶
func (_u *CycleRenewalUpdate) SetNillableResourceType(v *int) *CycleRenewalUpdate
SetNillableResourceType sets the "resource_type" field if the given value is not nil.
func (*CycleRenewalUpdate) SetNillableState ¶
func (_u *CycleRenewalUpdate) SetNillableState(v *int8) *CycleRenewalUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*CycleRenewalUpdate) SetProductDesc ¶
func (_u *CycleRenewalUpdate) SetProductDesc(v string) *CycleRenewalUpdate
SetProductDesc sets the "product_desc" field.
func (*CycleRenewalUpdate) SetProductName ¶
func (_u *CycleRenewalUpdate) SetProductName(v string) *CycleRenewalUpdate
SetProductName sets the "product_name" field.
func (*CycleRenewalUpdate) SetRenewalTime ¶
func (_u *CycleRenewalUpdate) SetRenewalTime(v time.Time) *CycleRenewalUpdate
SetRenewalTime sets the "renewal_time" field.
func (*CycleRenewalUpdate) SetResourceID ¶
func (_u *CycleRenewalUpdate) SetResourceID(v uuid.UUID) *CycleRenewalUpdate
SetResourceID sets the "resource_id" field.
func (*CycleRenewalUpdate) SetResourceType ¶
func (_u *CycleRenewalUpdate) SetResourceType(v int) *CycleRenewalUpdate
SetResourceType sets the "resource_type" field.
func (*CycleRenewalUpdate) SetState ¶
func (_u *CycleRenewalUpdate) SetState(v int8) *CycleRenewalUpdate
SetState sets the "state" field.
func (*CycleRenewalUpdate) Where ¶
func (_u *CycleRenewalUpdate) Where(ps ...predicate.CycleRenewal) *CycleRenewalUpdate
Where appends a list predicates to the CycleRenewalUpdate builder.
type CycleRenewalUpdateOne ¶
type CycleRenewalUpdateOne struct {
// contains filtered or unexported fields
}
CycleRenewalUpdateOne is the builder for updating a single CycleRenewal entity.
func (*CycleRenewalUpdateOne) AddExtendDay ¶
func (_u *CycleRenewalUpdateOne) AddExtendDay(v int8) *CycleRenewalUpdateOne
AddExtendDay adds value to the "extend_day" field.
func (*CycleRenewalUpdateOne) AddExtendPrice ¶
func (_u *CycleRenewalUpdateOne) AddExtendPrice(v float64) *CycleRenewalUpdateOne
AddExtendPrice adds value to the "extend_price" field.
func (*CycleRenewalUpdateOne) AddResourceType ¶
func (_u *CycleRenewalUpdateOne) AddResourceType(v int) *CycleRenewalUpdateOne
AddResourceType adds value to the "resource_type" field.
func (*CycleRenewalUpdateOne) AddState ¶
func (_u *CycleRenewalUpdateOne) AddState(v int8) *CycleRenewalUpdateOne
AddState adds value to the "state" field.
func (*CycleRenewalUpdateOne) ClearDueTime ¶
func (_u *CycleRenewalUpdateOne) ClearDueTime() *CycleRenewalUpdateOne
ClearDueTime clears the value of the "due_time" field.
func (*CycleRenewalUpdateOne) ClearRenewalTime ¶
func (_u *CycleRenewalUpdateOne) ClearRenewalTime() *CycleRenewalUpdateOne
ClearRenewalTime clears the value of the "renewal_time" field.
func (*CycleRenewalUpdateOne) Exec ¶
func (_u *CycleRenewalUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CycleRenewalUpdateOne) ExecX ¶
func (_u *CycleRenewalUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleRenewalUpdateOne) Mutation ¶
func (_u *CycleRenewalUpdateOne) Mutation() *CycleRenewalMutation
Mutation returns the CycleRenewalMutation object of the builder.
func (*CycleRenewalUpdateOne) Save ¶
func (_u *CycleRenewalUpdateOne) Save(ctx context.Context) (*CycleRenewal, error)
Save executes the query and returns the updated CycleRenewal entity.
func (*CycleRenewalUpdateOne) SaveX ¶
func (_u *CycleRenewalUpdateOne) SaveX(ctx context.Context) *CycleRenewal
SaveX is like Save, but panics if an error occurs.
func (*CycleRenewalUpdateOne) Select ¶
func (_u *CycleRenewalUpdateOne) Select(field string, fields ...string) *CycleRenewalUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CycleRenewalUpdateOne) SetAutoRenewal ¶
func (_u *CycleRenewalUpdateOne) SetAutoRenewal(v bool) *CycleRenewalUpdateOne
SetAutoRenewal sets the "auto_renewal" field.
func (*CycleRenewalUpdateOne) SetDueTime ¶
func (_u *CycleRenewalUpdateOne) SetDueTime(v time.Time) *CycleRenewalUpdateOne
SetDueTime sets the "due_time" field.
func (*CycleRenewalUpdateOne) SetExtendDay ¶
func (_u *CycleRenewalUpdateOne) SetExtendDay(v int8) *CycleRenewalUpdateOne
SetExtendDay sets the "extend_day" field.
func (*CycleRenewalUpdateOne) SetExtendPrice ¶
func (_u *CycleRenewalUpdateOne) SetExtendPrice(v float64) *CycleRenewalUpdateOne
SetExtendPrice sets the "extend_price" field.
func (*CycleRenewalUpdateOne) SetFkUserID ¶
func (_u *CycleRenewalUpdateOne) SetFkUserID(v uuid.UUID) *CycleRenewalUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*CycleRenewalUpdateOne) SetNillableAutoRenewal ¶
func (_u *CycleRenewalUpdateOne) SetNillableAutoRenewal(v *bool) *CycleRenewalUpdateOne
SetNillableAutoRenewal sets the "auto_renewal" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableDueTime ¶
func (_u *CycleRenewalUpdateOne) SetNillableDueTime(v *time.Time) *CycleRenewalUpdateOne
SetNillableDueTime sets the "due_time" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableExtendDay ¶
func (_u *CycleRenewalUpdateOne) SetNillableExtendDay(v *int8) *CycleRenewalUpdateOne
SetNillableExtendDay sets the "extend_day" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableExtendPrice ¶
func (_u *CycleRenewalUpdateOne) SetNillableExtendPrice(v *float64) *CycleRenewalUpdateOne
SetNillableExtendPrice sets the "extend_price" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableFkUserID ¶
func (_u *CycleRenewalUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleRenewalUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableProductDesc ¶
func (_u *CycleRenewalUpdateOne) SetNillableProductDesc(v *string) *CycleRenewalUpdateOne
SetNillableProductDesc sets the "product_desc" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableProductName ¶
func (_u *CycleRenewalUpdateOne) SetNillableProductName(v *string) *CycleRenewalUpdateOne
SetNillableProductName sets the "product_name" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableRenewalTime ¶
func (_u *CycleRenewalUpdateOne) SetNillableRenewalTime(v *time.Time) *CycleRenewalUpdateOne
SetNillableRenewalTime sets the "renewal_time" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableResourceID ¶
func (_u *CycleRenewalUpdateOne) SetNillableResourceID(v *uuid.UUID) *CycleRenewalUpdateOne
SetNillableResourceID sets the "resource_id" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableResourceType ¶
func (_u *CycleRenewalUpdateOne) SetNillableResourceType(v *int) *CycleRenewalUpdateOne
SetNillableResourceType sets the "resource_type" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetNillableState ¶
func (_u *CycleRenewalUpdateOne) SetNillableState(v *int8) *CycleRenewalUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*CycleRenewalUpdateOne) SetProductDesc ¶
func (_u *CycleRenewalUpdateOne) SetProductDesc(v string) *CycleRenewalUpdateOne
SetProductDesc sets the "product_desc" field.
func (*CycleRenewalUpdateOne) SetProductName ¶
func (_u *CycleRenewalUpdateOne) SetProductName(v string) *CycleRenewalUpdateOne
SetProductName sets the "product_name" field.
func (*CycleRenewalUpdateOne) SetRenewalTime ¶
func (_u *CycleRenewalUpdateOne) SetRenewalTime(v time.Time) *CycleRenewalUpdateOne
SetRenewalTime sets the "renewal_time" field.
func (*CycleRenewalUpdateOne) SetResourceID ¶
func (_u *CycleRenewalUpdateOne) SetResourceID(v uuid.UUID) *CycleRenewalUpdateOne
SetResourceID sets the "resource_id" field.
func (*CycleRenewalUpdateOne) SetResourceType ¶
func (_u *CycleRenewalUpdateOne) SetResourceType(v int) *CycleRenewalUpdateOne
SetResourceType sets the "resource_type" field.
func (*CycleRenewalUpdateOne) SetState ¶
func (_u *CycleRenewalUpdateOne) SetState(v int8) *CycleRenewalUpdateOne
SetState sets the "state" field.
func (*CycleRenewalUpdateOne) Where ¶
func (_u *CycleRenewalUpdateOne) Where(ps ...predicate.CycleRenewal) *CycleRenewalUpdateOne
Where appends a list predicates to the CycleRenewalUpdate builder.
type CycleRenewals ¶
type CycleRenewals []*CycleRenewal
CycleRenewals is a parsable slice of CycleRenewal.
type CycleSelect ¶
type CycleSelect struct {
*CycleQuery
// contains filtered or unexported fields
}
CycleSelect is the builder for selecting fields of Cycle entities.
func (*CycleSelect) Aggregate ¶
func (_s *CycleSelect) Aggregate(fns ...AggregateFunc) *CycleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CycleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleSelect) Scan ¶
func (_s *CycleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleTransaction ¶
type CycleTransaction struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// cycleId
FkCycleID uuid.UUID `json:"fk_cycle_id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// fk_cycle_order_id
FkCycleOrderID uuid.UUID `json:"fk_cycle_order_id,omitempty"`
// fk_cycle_recharge_id
FkCycleRechargeID uuid.UUID `json:"fk_cycle_recharge_id,omitempty"`
// 操作
Operation string `json:"operation,omitempty"`
// symbol
Symbol string `json:"symbol,omitempty"`
// Cycle holds the value of the "cycle" field.
Cycle float64 `json:"cycle,omitempty"`
// 余额
Balance float64 `json:"balance,omitempty"`
// 操作时间
OperationTime time.Time `json:"operation_time,omitempty"`
// contains filtered or unexported fields
}
CycleTransaction is the model entity for the CycleTransaction schema.
func (*CycleTransaction) String ¶
func (_m *CycleTransaction) String() string
String implements the fmt.Stringer.
func (*CycleTransaction) Unwrap ¶
func (_m *CycleTransaction) Unwrap() *CycleTransaction
Unwrap unwraps the CycleTransaction 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 (*CycleTransaction) Update ¶
func (_m *CycleTransaction) Update() *CycleTransactionUpdateOne
Update returns a builder for updating this CycleTransaction. Note that you need to call CycleTransaction.Unwrap() before calling this method if this CycleTransaction was returned from a transaction, and the transaction was committed or rolled back.
type CycleTransactionClient ¶
type CycleTransactionClient struct {
// contains filtered or unexported fields
}
CycleTransactionClient is a client for the CycleTransaction schema.
func NewCycleTransactionClient ¶
func NewCycleTransactionClient(c config) *CycleTransactionClient
NewCycleTransactionClient returns a client for the CycleTransaction from the given config.
func (*CycleTransactionClient) Create ¶
func (c *CycleTransactionClient) Create() *CycleTransactionCreate
Create returns a builder for creating a CycleTransaction entity.
func (*CycleTransactionClient) CreateBulk ¶
func (c *CycleTransactionClient) CreateBulk(builders ...*CycleTransactionCreate) *CycleTransactionCreateBulk
CreateBulk returns a builder for creating a bulk of CycleTransaction entities.
func (*CycleTransactionClient) Delete ¶
func (c *CycleTransactionClient) Delete() *CycleTransactionDelete
Delete returns a delete builder for CycleTransaction.
func (*CycleTransactionClient) DeleteOne ¶
func (c *CycleTransactionClient) DeleteOne(_m *CycleTransaction) *CycleTransactionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CycleTransactionClient) DeleteOneID ¶
func (c *CycleTransactionClient) DeleteOneID(id uuid.UUID) *CycleTransactionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CycleTransactionClient) Get ¶
func (c *CycleTransactionClient) Get(ctx context.Context, id uuid.UUID) (*CycleTransaction, error)
Get returns a CycleTransaction entity by its id.
func (*CycleTransactionClient) GetX ¶
func (c *CycleTransactionClient) GetX(ctx context.Context, id uuid.UUID) *CycleTransaction
GetX is like Get, but panics if an error occurs.
func (*CycleTransactionClient) Hooks ¶
func (c *CycleTransactionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CycleTransactionClient) Intercept ¶
func (c *CycleTransactionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cycletransaction.Intercept(f(g(h())))`.
func (*CycleTransactionClient) Interceptors ¶
func (c *CycleTransactionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CycleTransactionClient) MapCreateBulk ¶
func (c *CycleTransactionClient) MapCreateBulk(slice any, setFunc func(*CycleTransactionCreate, int)) *CycleTransactionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CycleTransactionClient) Query ¶
func (c *CycleTransactionClient) Query() *CycleTransactionQuery
Query returns a query builder for CycleTransaction.
func (*CycleTransactionClient) Update ¶
func (c *CycleTransactionClient) Update() *CycleTransactionUpdate
Update returns an update builder for CycleTransaction.
func (*CycleTransactionClient) UpdateOne ¶
func (c *CycleTransactionClient) UpdateOne(_m *CycleTransaction) *CycleTransactionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CycleTransactionClient) UpdateOneID ¶
func (c *CycleTransactionClient) UpdateOneID(id uuid.UUID) *CycleTransactionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CycleTransactionClient) Use ¶
func (c *CycleTransactionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cycletransaction.Hooks(f(g(h())))`.
type CycleTransactionCreate ¶
type CycleTransactionCreate struct {
// contains filtered or unexported fields
}
CycleTransactionCreate is the builder for creating a CycleTransaction entity.
func (*CycleTransactionCreate) Exec ¶
func (_c *CycleTransactionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleTransactionCreate) ExecX ¶
func (_c *CycleTransactionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleTransactionCreate) Mutation ¶
func (_c *CycleTransactionCreate) Mutation() *CycleTransactionMutation
Mutation returns the CycleTransactionMutation object of the builder.
func (*CycleTransactionCreate) Save ¶
func (_c *CycleTransactionCreate) Save(ctx context.Context) (*CycleTransaction, error)
Save creates the CycleTransaction in the database.
func (*CycleTransactionCreate) SaveX ¶
func (_c *CycleTransactionCreate) SaveX(ctx context.Context) *CycleTransaction
SaveX calls Save and panics if Save returns an error.
func (*CycleTransactionCreate) SetBalance ¶
func (_c *CycleTransactionCreate) SetBalance(v float64) *CycleTransactionCreate
SetBalance sets the "balance" field.
func (*CycleTransactionCreate) SetCycle ¶
func (_c *CycleTransactionCreate) SetCycle(v float64) *CycleTransactionCreate
SetCycle sets the "cycle" field.
func (*CycleTransactionCreate) SetFkCycleID ¶
func (_c *CycleTransactionCreate) SetFkCycleID(v uuid.UUID) *CycleTransactionCreate
SetFkCycleID sets the "fk_cycle_id" field.
func (*CycleTransactionCreate) SetFkCycleOrderID ¶
func (_c *CycleTransactionCreate) SetFkCycleOrderID(v uuid.UUID) *CycleTransactionCreate
SetFkCycleOrderID sets the "fk_cycle_order_id" field.
func (*CycleTransactionCreate) SetFkCycleRechargeID ¶
func (_c *CycleTransactionCreate) SetFkCycleRechargeID(v uuid.UUID) *CycleTransactionCreate
SetFkCycleRechargeID sets the "fk_cycle_recharge_id" field.
func (*CycleTransactionCreate) SetFkUserID ¶
func (_c *CycleTransactionCreate) SetFkUserID(v uuid.UUID) *CycleTransactionCreate
SetFkUserID sets the "fk_user_id" field.
func (*CycleTransactionCreate) SetID ¶
func (_c *CycleTransactionCreate) SetID(v uuid.UUID) *CycleTransactionCreate
SetID sets the "id" field.
func (*CycleTransactionCreate) SetNillableID ¶
func (_c *CycleTransactionCreate) SetNillableID(v *uuid.UUID) *CycleTransactionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CycleTransactionCreate) SetOperation ¶
func (_c *CycleTransactionCreate) SetOperation(v string) *CycleTransactionCreate
SetOperation sets the "operation" field.
func (*CycleTransactionCreate) SetOperationTime ¶
func (_c *CycleTransactionCreate) SetOperationTime(v time.Time) *CycleTransactionCreate
SetOperationTime sets the "operation_time" field.
func (*CycleTransactionCreate) SetSymbol ¶
func (_c *CycleTransactionCreate) SetSymbol(v string) *CycleTransactionCreate
SetSymbol sets the "symbol" field.
type CycleTransactionCreateBulk ¶
type CycleTransactionCreateBulk struct {
// contains filtered or unexported fields
}
CycleTransactionCreateBulk is the builder for creating many CycleTransaction entities in bulk.
func (*CycleTransactionCreateBulk) Exec ¶
func (_c *CycleTransactionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleTransactionCreateBulk) ExecX ¶
func (_c *CycleTransactionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleTransactionCreateBulk) Save ¶
func (_c *CycleTransactionCreateBulk) Save(ctx context.Context) ([]*CycleTransaction, error)
Save creates the CycleTransaction entities in the database.
func (*CycleTransactionCreateBulk) SaveX ¶
func (_c *CycleTransactionCreateBulk) SaveX(ctx context.Context) []*CycleTransaction
SaveX is like Save, but panics if an error occurs.
type CycleTransactionDelete ¶
type CycleTransactionDelete struct {
// contains filtered or unexported fields
}
CycleTransactionDelete is the builder for deleting a CycleTransaction entity.
func (*CycleTransactionDelete) Exec ¶
func (_d *CycleTransactionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CycleTransactionDelete) ExecX ¶
func (_d *CycleTransactionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CycleTransactionDelete) Where ¶
func (_d *CycleTransactionDelete) Where(ps ...predicate.CycleTransaction) *CycleTransactionDelete
Where appends a list predicates to the CycleTransactionDelete builder.
type CycleTransactionDeleteOne ¶
type CycleTransactionDeleteOne struct {
// contains filtered or unexported fields
}
CycleTransactionDeleteOne is the builder for deleting a single CycleTransaction entity.
func (*CycleTransactionDeleteOne) Exec ¶
func (_d *CycleTransactionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CycleTransactionDeleteOne) ExecX ¶
func (_d *CycleTransactionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleTransactionDeleteOne) Where ¶
func (_d *CycleTransactionDeleteOne) Where(ps ...predicate.CycleTransaction) *CycleTransactionDeleteOne
Where appends a list predicates to the CycleTransactionDelete builder.
type CycleTransactionGroupBy ¶
type CycleTransactionGroupBy struct {
// contains filtered or unexported fields
}
CycleTransactionGroupBy is the group-by builder for CycleTransaction entities.
func (*CycleTransactionGroupBy) Aggregate ¶
func (_g *CycleTransactionGroupBy) Aggregate(fns ...AggregateFunc) *CycleTransactionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CycleTransactionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleTransactionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleTransactionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleTransactionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleTransactionGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*CycleTransactionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleTransactionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleTransactionGroupBy) Scan ¶
func (_g *CycleTransactionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleTransactionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleTransactionMutation ¶
type CycleTransactionMutation struct {
// contains filtered or unexported fields
}
CycleTransactionMutation represents an operation that mutates the CycleTransaction nodes in the graph.
func (*CycleTransactionMutation) AddBalance ¶
func (m *CycleTransactionMutation) AddBalance(f float64)
AddBalance adds f to the "balance" field.
func (*CycleTransactionMutation) AddCycle ¶
func (m *CycleTransactionMutation) AddCycle(f float64)
AddCycle adds f to the "cycle" field.
func (*CycleTransactionMutation) AddField ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) AddedBalance ¶
func (m *CycleTransactionMutation) AddedBalance() (r float64, exists bool)
AddedBalance returns the value that was added to the "balance" field in this mutation.
func (*CycleTransactionMutation) AddedCycle ¶
func (m *CycleTransactionMutation) AddedCycle() (r float64, exists bool)
AddedCycle returns the value that was added to the "cycle" field in this mutation.
func (*CycleTransactionMutation) AddedEdges ¶
func (m *CycleTransactionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CycleTransactionMutation) AddedField ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) AddedFields ¶
func (m *CycleTransactionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CycleTransactionMutation) AddedIDs ¶
func (m *CycleTransactionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CycleTransactionMutation) Balance ¶
func (m *CycleTransactionMutation) Balance() (r float64, exists bool)
Balance returns the value of the "balance" field in the mutation.
func (*CycleTransactionMutation) ClearEdge ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) ClearField ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) ClearedEdges ¶
func (m *CycleTransactionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CycleTransactionMutation) ClearedFields ¶
func (m *CycleTransactionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CycleTransactionMutation) Client ¶
func (m CycleTransactionMutation) 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 (*CycleTransactionMutation) Cycle ¶
func (m *CycleTransactionMutation) Cycle() (r float64, exists bool)
Cycle returns the value of the "cycle" field in the mutation.
func (*CycleTransactionMutation) EdgeCleared ¶
func (m *CycleTransactionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CycleTransactionMutation) Field ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) FieldCleared ¶
func (m *CycleTransactionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CycleTransactionMutation) Fields ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) FkCycleID ¶
func (m *CycleTransactionMutation) FkCycleID() (r uuid.UUID, exists bool)
FkCycleID returns the value of the "fk_cycle_id" field in the mutation.
func (*CycleTransactionMutation) FkCycleOrderID ¶
func (m *CycleTransactionMutation) FkCycleOrderID() (r uuid.UUID, exists bool)
FkCycleOrderID returns the value of the "fk_cycle_order_id" field in the mutation.
func (*CycleTransactionMutation) FkCycleRechargeID ¶
func (m *CycleTransactionMutation) FkCycleRechargeID() (r uuid.UUID, exists bool)
FkCycleRechargeID returns the value of the "fk_cycle_recharge_id" field in the mutation.
func (*CycleTransactionMutation) FkUserID ¶
func (m *CycleTransactionMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*CycleTransactionMutation) ID ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) 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 (*CycleTransactionMutation) OldBalance ¶
func (m *CycleTransactionMutation) OldBalance(ctx context.Context) (v float64, err error)
OldBalance returns the old "balance" field's value of the CycleTransaction entity. If the CycleTransaction 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 (*CycleTransactionMutation) OldCycle ¶
func (m *CycleTransactionMutation) OldCycle(ctx context.Context) (v float64, err error)
OldCycle returns the old "cycle" field's value of the CycleTransaction entity. If the CycleTransaction 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 (*CycleTransactionMutation) 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 (*CycleTransactionMutation) OldFkCycleID ¶
OldFkCycleID returns the old "fk_cycle_id" field's value of the CycleTransaction entity. If the CycleTransaction 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 (*CycleTransactionMutation) OldFkCycleOrderID ¶
OldFkCycleOrderID returns the old "fk_cycle_order_id" field's value of the CycleTransaction entity. If the CycleTransaction 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 (*CycleTransactionMutation) OldFkCycleRechargeID ¶
func (m *CycleTransactionMutation) OldFkCycleRechargeID(ctx context.Context) (v uuid.UUID, err error)
OldFkCycleRechargeID returns the old "fk_cycle_recharge_id" field's value of the CycleTransaction entity. If the CycleTransaction 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 (*CycleTransactionMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the CycleTransaction entity. If the CycleTransaction 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 (*CycleTransactionMutation) OldOperation ¶
func (m *CycleTransactionMutation) OldOperation(ctx context.Context) (v string, err error)
OldOperation returns the old "operation" field's value of the CycleTransaction entity. If the CycleTransaction 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 (*CycleTransactionMutation) OldOperationTime ¶
OldOperationTime returns the old "operation_time" field's value of the CycleTransaction entity. If the CycleTransaction 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 (*CycleTransactionMutation) OldSymbol ¶
func (m *CycleTransactionMutation) OldSymbol(ctx context.Context) (v string, err error)
OldSymbol returns the old "symbol" field's value of the CycleTransaction entity. If the CycleTransaction 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 (*CycleTransactionMutation) Op ¶
func (m *CycleTransactionMutation) Op() Op
Op returns the operation name.
func (*CycleTransactionMutation) Operation ¶
func (m *CycleTransactionMutation) Operation() (r string, exists bool)
Operation returns the value of the "operation" field in the mutation.
func (*CycleTransactionMutation) OperationTime ¶
func (m *CycleTransactionMutation) OperationTime() (r time.Time, exists bool)
OperationTime returns the value of the "operation_time" field in the mutation.
func (*CycleTransactionMutation) RemovedEdges ¶
func (m *CycleTransactionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CycleTransactionMutation) RemovedIDs ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) ResetBalance ¶
func (m *CycleTransactionMutation) ResetBalance()
ResetBalance resets all changes to the "balance" field.
func (*CycleTransactionMutation) ResetCycle ¶
func (m *CycleTransactionMutation) ResetCycle()
ResetCycle resets all changes to the "cycle" field.
func (*CycleTransactionMutation) ResetEdge ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) ResetField ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) ResetFkCycleID ¶
func (m *CycleTransactionMutation) ResetFkCycleID()
ResetFkCycleID resets all changes to the "fk_cycle_id" field.
func (*CycleTransactionMutation) ResetFkCycleOrderID ¶
func (m *CycleTransactionMutation) ResetFkCycleOrderID()
ResetFkCycleOrderID resets all changes to the "fk_cycle_order_id" field.
func (*CycleTransactionMutation) ResetFkCycleRechargeID ¶
func (m *CycleTransactionMutation) ResetFkCycleRechargeID()
ResetFkCycleRechargeID resets all changes to the "fk_cycle_recharge_id" field.
func (*CycleTransactionMutation) ResetFkUserID ¶
func (m *CycleTransactionMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*CycleTransactionMutation) ResetOperation ¶
func (m *CycleTransactionMutation) ResetOperation()
ResetOperation resets all changes to the "operation" field.
func (*CycleTransactionMutation) ResetOperationTime ¶
func (m *CycleTransactionMutation) ResetOperationTime()
ResetOperationTime resets all changes to the "operation_time" field.
func (*CycleTransactionMutation) ResetSymbol ¶
func (m *CycleTransactionMutation) ResetSymbol()
ResetSymbol resets all changes to the "symbol" field.
func (*CycleTransactionMutation) SetBalance ¶
func (m *CycleTransactionMutation) SetBalance(f float64)
SetBalance sets the "balance" field.
func (*CycleTransactionMutation) SetCycle ¶
func (m *CycleTransactionMutation) SetCycle(f float64)
SetCycle sets the "cycle" field.
func (*CycleTransactionMutation) SetField ¶
func (m *CycleTransactionMutation) 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 (*CycleTransactionMutation) SetFkCycleID ¶
func (m *CycleTransactionMutation) SetFkCycleID(u uuid.UUID)
SetFkCycleID sets the "fk_cycle_id" field.
func (*CycleTransactionMutation) SetFkCycleOrderID ¶
func (m *CycleTransactionMutation) SetFkCycleOrderID(u uuid.UUID)
SetFkCycleOrderID sets the "fk_cycle_order_id" field.
func (*CycleTransactionMutation) SetFkCycleRechargeID ¶
func (m *CycleTransactionMutation) SetFkCycleRechargeID(u uuid.UUID)
SetFkCycleRechargeID sets the "fk_cycle_recharge_id" field.
func (*CycleTransactionMutation) SetFkUserID ¶
func (m *CycleTransactionMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*CycleTransactionMutation) SetID ¶
func (m *CycleTransactionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CycleTransaction entities.
func (*CycleTransactionMutation) SetOp ¶
func (m *CycleTransactionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CycleTransactionMutation) SetOperation ¶
func (m *CycleTransactionMutation) SetOperation(s string)
SetOperation sets the "operation" field.
func (*CycleTransactionMutation) SetOperationTime ¶
func (m *CycleTransactionMutation) SetOperationTime(t time.Time)
SetOperationTime sets the "operation_time" field.
func (*CycleTransactionMutation) SetSymbol ¶
func (m *CycleTransactionMutation) SetSymbol(s string)
SetSymbol sets the "symbol" field.
func (*CycleTransactionMutation) Symbol ¶
func (m *CycleTransactionMutation) Symbol() (r string, exists bool)
Symbol returns the value of the "symbol" field in the mutation.
func (CycleTransactionMutation) Tx ¶
func (m CycleTransactionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CycleTransactionMutation) Type ¶
func (m *CycleTransactionMutation) Type() string
Type returns the node type of this mutation (CycleTransaction).
func (*CycleTransactionMutation) Where ¶
func (m *CycleTransactionMutation) Where(ps ...predicate.CycleTransaction)
Where appends a list predicates to the CycleTransactionMutation builder.
func (*CycleTransactionMutation) WhereP ¶
func (m *CycleTransactionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CycleTransactionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CycleTransactionQuery ¶
type CycleTransactionQuery struct {
// contains filtered or unexported fields
}
CycleTransactionQuery is the builder for querying CycleTransaction entities.
func (*CycleTransactionQuery) Aggregate ¶
func (_q *CycleTransactionQuery) Aggregate(fns ...AggregateFunc) *CycleTransactionSelect
Aggregate returns a CycleTransactionSelect configured with the given aggregations.
func (*CycleTransactionQuery) All ¶
func (_q *CycleTransactionQuery) All(ctx context.Context) ([]*CycleTransaction, error)
All executes the query and returns a list of CycleTransactions.
func (*CycleTransactionQuery) AllX ¶
func (_q *CycleTransactionQuery) AllX(ctx context.Context) []*CycleTransaction
AllX is like All, but panics if an error occurs.
func (*CycleTransactionQuery) Clone ¶
func (_q *CycleTransactionQuery) Clone() *CycleTransactionQuery
Clone returns a duplicate of the CycleTransactionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CycleTransactionQuery) Count ¶
func (_q *CycleTransactionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CycleTransactionQuery) CountX ¶
func (_q *CycleTransactionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CycleTransactionQuery) Exist ¶
func (_q *CycleTransactionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CycleTransactionQuery) ExistX ¶
func (_q *CycleTransactionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CycleTransactionQuery) First ¶
func (_q *CycleTransactionQuery) First(ctx context.Context) (*CycleTransaction, error)
First returns the first CycleTransaction entity from the query. Returns a *NotFoundError when no CycleTransaction was found.
func (*CycleTransactionQuery) FirstID ¶
FirstID returns the first CycleTransaction ID from the query. Returns a *NotFoundError when no CycleTransaction ID was found.
func (*CycleTransactionQuery) FirstIDX ¶
func (_q *CycleTransactionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CycleTransactionQuery) FirstX ¶
func (_q *CycleTransactionQuery) FirstX(ctx context.Context) *CycleTransaction
FirstX is like First, but panics if an error occurs.
func (*CycleTransactionQuery) GroupBy ¶
func (_q *CycleTransactionQuery) GroupBy(field string, fields ...string) *CycleTransactionGroupBy
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 {
FkCycleID uuid.UUID `json:"fk_cycle_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.CycleTransaction.Query().
GroupBy(cycletransaction.FieldFkCycleID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CycleTransactionQuery) IDs ¶
IDs executes the query and returns a list of CycleTransaction IDs.
func (*CycleTransactionQuery) IDsX ¶
func (_q *CycleTransactionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CycleTransactionQuery) Limit ¶
func (_q *CycleTransactionQuery) Limit(limit int) *CycleTransactionQuery
Limit the number of records to be returned by this query.
func (*CycleTransactionQuery) Offset ¶
func (_q *CycleTransactionQuery) Offset(offset int) *CycleTransactionQuery
Offset to start from.
func (*CycleTransactionQuery) Only ¶
func (_q *CycleTransactionQuery) Only(ctx context.Context) (*CycleTransaction, error)
Only returns a single CycleTransaction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CycleTransaction entity is found. Returns a *NotFoundError when no CycleTransaction entities are found.
func (*CycleTransactionQuery) OnlyID ¶
OnlyID is like Only, but returns the only CycleTransaction ID in the query. Returns a *NotSingularError when more than one CycleTransaction ID is found. Returns a *NotFoundError when no entities are found.
func (*CycleTransactionQuery) OnlyIDX ¶
func (_q *CycleTransactionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CycleTransactionQuery) OnlyX ¶
func (_q *CycleTransactionQuery) OnlyX(ctx context.Context) *CycleTransaction
OnlyX is like Only, but panics if an error occurs.
func (*CycleTransactionQuery) Order ¶
func (_q *CycleTransactionQuery) Order(o ...cycletransaction.OrderOption) *CycleTransactionQuery
Order specifies how the records should be ordered.
func (*CycleTransactionQuery) Select ¶
func (_q *CycleTransactionQuery) Select(fields ...string) *CycleTransactionSelect
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 {
FkCycleID uuid.UUID `json:"fk_cycle_id,omitempty"`
}
client.CycleTransaction.Query().
Select(cycletransaction.FieldFkCycleID).
Scan(ctx, &v)
func (*CycleTransactionQuery) Unique ¶
func (_q *CycleTransactionQuery) Unique(unique bool) *CycleTransactionQuery
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 (*CycleTransactionQuery) Where ¶
func (_q *CycleTransactionQuery) Where(ps ...predicate.CycleTransaction) *CycleTransactionQuery
Where adds a new predicate for the CycleTransactionQuery builder.
type CycleTransactionSelect ¶
type CycleTransactionSelect struct {
*CycleTransactionQuery
// contains filtered or unexported fields
}
CycleTransactionSelect is the builder for selecting fields of CycleTransaction entities.
func (*CycleTransactionSelect) Aggregate ¶
func (_s *CycleTransactionSelect) Aggregate(fns ...AggregateFunc) *CycleTransactionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CycleTransactionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CycleTransactionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CycleTransactionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CycleTransactionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CycleTransactionSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*CycleTransactionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CycleTransactionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CycleTransactionSelect) Scan ¶
func (_s *CycleTransactionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CycleTransactionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CycleTransactionUpdate ¶
type CycleTransactionUpdate struct {
// contains filtered or unexported fields
}
CycleTransactionUpdate is the builder for updating CycleTransaction entities.
func (*CycleTransactionUpdate) AddBalance ¶
func (_u *CycleTransactionUpdate) AddBalance(v float64) *CycleTransactionUpdate
AddBalance adds value to the "balance" field.
func (*CycleTransactionUpdate) AddCycle ¶
func (_u *CycleTransactionUpdate) AddCycle(v float64) *CycleTransactionUpdate
AddCycle adds value to the "cycle" field.
func (*CycleTransactionUpdate) Exec ¶
func (_u *CycleTransactionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleTransactionUpdate) ExecX ¶
func (_u *CycleTransactionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleTransactionUpdate) Mutation ¶
func (_u *CycleTransactionUpdate) Mutation() *CycleTransactionMutation
Mutation returns the CycleTransactionMutation object of the builder.
func (*CycleTransactionUpdate) Save ¶
func (_u *CycleTransactionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CycleTransactionUpdate) SaveX ¶
func (_u *CycleTransactionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CycleTransactionUpdate) SetBalance ¶
func (_u *CycleTransactionUpdate) SetBalance(v float64) *CycleTransactionUpdate
SetBalance sets the "balance" field.
func (*CycleTransactionUpdate) SetCycle ¶
func (_u *CycleTransactionUpdate) SetCycle(v float64) *CycleTransactionUpdate
SetCycle sets the "cycle" field.
func (*CycleTransactionUpdate) SetFkCycleID ¶
func (_u *CycleTransactionUpdate) SetFkCycleID(v uuid.UUID) *CycleTransactionUpdate
SetFkCycleID sets the "fk_cycle_id" field.
func (*CycleTransactionUpdate) SetFkCycleOrderID ¶
func (_u *CycleTransactionUpdate) SetFkCycleOrderID(v uuid.UUID) *CycleTransactionUpdate
SetFkCycleOrderID sets the "fk_cycle_order_id" field.
func (*CycleTransactionUpdate) SetFkCycleRechargeID ¶
func (_u *CycleTransactionUpdate) SetFkCycleRechargeID(v uuid.UUID) *CycleTransactionUpdate
SetFkCycleRechargeID sets the "fk_cycle_recharge_id" field.
func (*CycleTransactionUpdate) SetFkUserID ¶
func (_u *CycleTransactionUpdate) SetFkUserID(v uuid.UUID) *CycleTransactionUpdate
SetFkUserID sets the "fk_user_id" field.
func (*CycleTransactionUpdate) SetNillableBalance ¶
func (_u *CycleTransactionUpdate) SetNillableBalance(v *float64) *CycleTransactionUpdate
SetNillableBalance sets the "balance" field if the given value is not nil.
func (*CycleTransactionUpdate) SetNillableCycle ¶
func (_u *CycleTransactionUpdate) SetNillableCycle(v *float64) *CycleTransactionUpdate
SetNillableCycle sets the "cycle" field if the given value is not nil.
func (*CycleTransactionUpdate) SetNillableFkCycleID ¶
func (_u *CycleTransactionUpdate) SetNillableFkCycleID(v *uuid.UUID) *CycleTransactionUpdate
SetNillableFkCycleID sets the "fk_cycle_id" field if the given value is not nil.
func (*CycleTransactionUpdate) SetNillableFkCycleOrderID ¶
func (_u *CycleTransactionUpdate) SetNillableFkCycleOrderID(v *uuid.UUID) *CycleTransactionUpdate
SetNillableFkCycleOrderID sets the "fk_cycle_order_id" field if the given value is not nil.
func (*CycleTransactionUpdate) SetNillableFkCycleRechargeID ¶
func (_u *CycleTransactionUpdate) SetNillableFkCycleRechargeID(v *uuid.UUID) *CycleTransactionUpdate
SetNillableFkCycleRechargeID sets the "fk_cycle_recharge_id" field if the given value is not nil.
func (*CycleTransactionUpdate) SetNillableFkUserID ¶
func (_u *CycleTransactionUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleTransactionUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleTransactionUpdate) SetNillableOperation ¶
func (_u *CycleTransactionUpdate) SetNillableOperation(v *string) *CycleTransactionUpdate
SetNillableOperation sets the "operation" field if the given value is not nil.
func (*CycleTransactionUpdate) SetNillableOperationTime ¶
func (_u *CycleTransactionUpdate) SetNillableOperationTime(v *time.Time) *CycleTransactionUpdate
SetNillableOperationTime sets the "operation_time" field if the given value is not nil.
func (*CycleTransactionUpdate) SetNillableSymbol ¶
func (_u *CycleTransactionUpdate) SetNillableSymbol(v *string) *CycleTransactionUpdate
SetNillableSymbol sets the "symbol" field if the given value is not nil.
func (*CycleTransactionUpdate) SetOperation ¶
func (_u *CycleTransactionUpdate) SetOperation(v string) *CycleTransactionUpdate
SetOperation sets the "operation" field.
func (*CycleTransactionUpdate) SetOperationTime ¶
func (_u *CycleTransactionUpdate) SetOperationTime(v time.Time) *CycleTransactionUpdate
SetOperationTime sets the "operation_time" field.
func (*CycleTransactionUpdate) SetSymbol ¶
func (_u *CycleTransactionUpdate) SetSymbol(v string) *CycleTransactionUpdate
SetSymbol sets the "symbol" field.
func (*CycleTransactionUpdate) Where ¶
func (_u *CycleTransactionUpdate) Where(ps ...predicate.CycleTransaction) *CycleTransactionUpdate
Where appends a list predicates to the CycleTransactionUpdate builder.
type CycleTransactionUpdateOne ¶
type CycleTransactionUpdateOne struct {
// contains filtered or unexported fields
}
CycleTransactionUpdateOne is the builder for updating a single CycleTransaction entity.
func (*CycleTransactionUpdateOne) AddBalance ¶
func (_u *CycleTransactionUpdateOne) AddBalance(v float64) *CycleTransactionUpdateOne
AddBalance adds value to the "balance" field.
func (*CycleTransactionUpdateOne) AddCycle ¶
func (_u *CycleTransactionUpdateOne) AddCycle(v float64) *CycleTransactionUpdateOne
AddCycle adds value to the "cycle" field.
func (*CycleTransactionUpdateOne) Exec ¶
func (_u *CycleTransactionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CycleTransactionUpdateOne) ExecX ¶
func (_u *CycleTransactionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleTransactionUpdateOne) Mutation ¶
func (_u *CycleTransactionUpdateOne) Mutation() *CycleTransactionMutation
Mutation returns the CycleTransactionMutation object of the builder.
func (*CycleTransactionUpdateOne) Save ¶
func (_u *CycleTransactionUpdateOne) Save(ctx context.Context) (*CycleTransaction, error)
Save executes the query and returns the updated CycleTransaction entity.
func (*CycleTransactionUpdateOne) SaveX ¶
func (_u *CycleTransactionUpdateOne) SaveX(ctx context.Context) *CycleTransaction
SaveX is like Save, but panics if an error occurs.
func (*CycleTransactionUpdateOne) Select ¶
func (_u *CycleTransactionUpdateOne) Select(field string, fields ...string) *CycleTransactionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CycleTransactionUpdateOne) SetBalance ¶
func (_u *CycleTransactionUpdateOne) SetBalance(v float64) *CycleTransactionUpdateOne
SetBalance sets the "balance" field.
func (*CycleTransactionUpdateOne) SetCycle ¶
func (_u *CycleTransactionUpdateOne) SetCycle(v float64) *CycleTransactionUpdateOne
SetCycle sets the "cycle" field.
func (*CycleTransactionUpdateOne) SetFkCycleID ¶
func (_u *CycleTransactionUpdateOne) SetFkCycleID(v uuid.UUID) *CycleTransactionUpdateOne
SetFkCycleID sets the "fk_cycle_id" field.
func (*CycleTransactionUpdateOne) SetFkCycleOrderID ¶
func (_u *CycleTransactionUpdateOne) SetFkCycleOrderID(v uuid.UUID) *CycleTransactionUpdateOne
SetFkCycleOrderID sets the "fk_cycle_order_id" field.
func (*CycleTransactionUpdateOne) SetFkCycleRechargeID ¶
func (_u *CycleTransactionUpdateOne) SetFkCycleRechargeID(v uuid.UUID) *CycleTransactionUpdateOne
SetFkCycleRechargeID sets the "fk_cycle_recharge_id" field.
func (*CycleTransactionUpdateOne) SetFkUserID ¶
func (_u *CycleTransactionUpdateOne) SetFkUserID(v uuid.UUID) *CycleTransactionUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*CycleTransactionUpdateOne) SetNillableBalance ¶
func (_u *CycleTransactionUpdateOne) SetNillableBalance(v *float64) *CycleTransactionUpdateOne
SetNillableBalance sets the "balance" field if the given value is not nil.
func (*CycleTransactionUpdateOne) SetNillableCycle ¶
func (_u *CycleTransactionUpdateOne) SetNillableCycle(v *float64) *CycleTransactionUpdateOne
SetNillableCycle sets the "cycle" field if the given value is not nil.
func (*CycleTransactionUpdateOne) SetNillableFkCycleID ¶
func (_u *CycleTransactionUpdateOne) SetNillableFkCycleID(v *uuid.UUID) *CycleTransactionUpdateOne
SetNillableFkCycleID sets the "fk_cycle_id" field if the given value is not nil.
func (*CycleTransactionUpdateOne) SetNillableFkCycleOrderID ¶
func (_u *CycleTransactionUpdateOne) SetNillableFkCycleOrderID(v *uuid.UUID) *CycleTransactionUpdateOne
SetNillableFkCycleOrderID sets the "fk_cycle_order_id" field if the given value is not nil.
func (*CycleTransactionUpdateOne) SetNillableFkCycleRechargeID ¶
func (_u *CycleTransactionUpdateOne) SetNillableFkCycleRechargeID(v *uuid.UUID) *CycleTransactionUpdateOne
SetNillableFkCycleRechargeID sets the "fk_cycle_recharge_id" field if the given value is not nil.
func (*CycleTransactionUpdateOne) SetNillableFkUserID ¶
func (_u *CycleTransactionUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleTransactionUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleTransactionUpdateOne) SetNillableOperation ¶
func (_u *CycleTransactionUpdateOne) SetNillableOperation(v *string) *CycleTransactionUpdateOne
SetNillableOperation sets the "operation" field if the given value is not nil.
func (*CycleTransactionUpdateOne) SetNillableOperationTime ¶
func (_u *CycleTransactionUpdateOne) SetNillableOperationTime(v *time.Time) *CycleTransactionUpdateOne
SetNillableOperationTime sets the "operation_time" field if the given value is not nil.
func (*CycleTransactionUpdateOne) SetNillableSymbol ¶
func (_u *CycleTransactionUpdateOne) SetNillableSymbol(v *string) *CycleTransactionUpdateOne
SetNillableSymbol sets the "symbol" field if the given value is not nil.
func (*CycleTransactionUpdateOne) SetOperation ¶
func (_u *CycleTransactionUpdateOne) SetOperation(v string) *CycleTransactionUpdateOne
SetOperation sets the "operation" field.
func (*CycleTransactionUpdateOne) SetOperationTime ¶
func (_u *CycleTransactionUpdateOne) SetOperationTime(v time.Time) *CycleTransactionUpdateOne
SetOperationTime sets the "operation_time" field.
func (*CycleTransactionUpdateOne) SetSymbol ¶
func (_u *CycleTransactionUpdateOne) SetSymbol(v string) *CycleTransactionUpdateOne
SetSymbol sets the "symbol" field.
func (*CycleTransactionUpdateOne) Where ¶
func (_u *CycleTransactionUpdateOne) Where(ps ...predicate.CycleTransaction) *CycleTransactionUpdateOne
Where appends a list predicates to the CycleTransactionUpdate builder.
type CycleTransactions ¶
type CycleTransactions []*CycleTransaction
CycleTransactions is a parsable slice of CycleTransaction.
type CycleUpdate ¶
type CycleUpdate struct {
// contains filtered or unexported fields
}
CycleUpdate is the builder for updating Cycle entities.
func (*CycleUpdate) AddCycle ¶
func (_u *CycleUpdate) AddCycle(v float64) *CycleUpdate
AddCycle adds value to the "cycle" field.
func (*CycleUpdate) Exec ¶
func (_u *CycleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CycleUpdate) ExecX ¶
func (_u *CycleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleUpdate) Mutation ¶
func (_u *CycleUpdate) Mutation() *CycleMutation
Mutation returns the CycleMutation object of the builder.
func (*CycleUpdate) Save ¶
func (_u *CycleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CycleUpdate) SaveX ¶
func (_u *CycleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CycleUpdate) SetCreateTime ¶
func (_u *CycleUpdate) SetCreateTime(v time.Time) *CycleUpdate
SetCreateTime sets the "create_time" field.
func (*CycleUpdate) SetCycle ¶
func (_u *CycleUpdate) SetCycle(v float64) *CycleUpdate
SetCycle sets the "cycle" field.
func (*CycleUpdate) SetFkUserID ¶
func (_u *CycleUpdate) SetFkUserID(v uuid.UUID) *CycleUpdate
SetFkUserID sets the "fk_user_id" field.
func (*CycleUpdate) SetNillableCreateTime ¶
func (_u *CycleUpdate) SetNillableCreateTime(v *time.Time) *CycleUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CycleUpdate) SetNillableCycle ¶
func (_u *CycleUpdate) SetNillableCycle(v *float64) *CycleUpdate
SetNillableCycle sets the "cycle" field if the given value is not nil.
func (*CycleUpdate) SetNillableFkUserID ¶
func (_u *CycleUpdate) SetNillableFkUserID(v *uuid.UUID) *CycleUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleUpdate) SetNillableUpdateTime ¶
func (_u *CycleUpdate) SetNillableUpdateTime(v *time.Time) *CycleUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*CycleUpdate) SetUpdateTime ¶
func (_u *CycleUpdate) SetUpdateTime(v time.Time) *CycleUpdate
SetUpdateTime sets the "update_time" field.
func (*CycleUpdate) Where ¶
func (_u *CycleUpdate) Where(ps ...predicate.Cycle) *CycleUpdate
Where appends a list predicates to the CycleUpdate builder.
type CycleUpdateOne ¶
type CycleUpdateOne struct {
// contains filtered or unexported fields
}
CycleUpdateOne is the builder for updating a single Cycle entity.
func (*CycleUpdateOne) AddCycle ¶
func (_u *CycleUpdateOne) AddCycle(v float64) *CycleUpdateOne
AddCycle adds value to the "cycle" field.
func (*CycleUpdateOne) Exec ¶
func (_u *CycleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CycleUpdateOne) ExecX ¶
func (_u *CycleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CycleUpdateOne) Mutation ¶
func (_u *CycleUpdateOne) Mutation() *CycleMutation
Mutation returns the CycleMutation object of the builder.
func (*CycleUpdateOne) Save ¶
func (_u *CycleUpdateOne) Save(ctx context.Context) (*Cycle, error)
Save executes the query and returns the updated Cycle entity.
func (*CycleUpdateOne) SaveX ¶
func (_u *CycleUpdateOne) SaveX(ctx context.Context) *Cycle
SaveX is like Save, but panics if an error occurs.
func (*CycleUpdateOne) Select ¶
func (_u *CycleUpdateOne) Select(field string, fields ...string) *CycleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CycleUpdateOne) SetCreateTime ¶
func (_u *CycleUpdateOne) SetCreateTime(v time.Time) *CycleUpdateOne
SetCreateTime sets the "create_time" field.
func (*CycleUpdateOne) SetCycle ¶
func (_u *CycleUpdateOne) SetCycle(v float64) *CycleUpdateOne
SetCycle sets the "cycle" field.
func (*CycleUpdateOne) SetFkUserID ¶
func (_u *CycleUpdateOne) SetFkUserID(v uuid.UUID) *CycleUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*CycleUpdateOne) SetNillableCreateTime ¶
func (_u *CycleUpdateOne) SetNillableCreateTime(v *time.Time) *CycleUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CycleUpdateOne) SetNillableCycle ¶
func (_u *CycleUpdateOne) SetNillableCycle(v *float64) *CycleUpdateOne
SetNillableCycle sets the "cycle" field if the given value is not nil.
func (*CycleUpdateOne) SetNillableFkUserID ¶
func (_u *CycleUpdateOne) SetNillableFkUserID(v *uuid.UUID) *CycleUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*CycleUpdateOne) SetNillableUpdateTime ¶
func (_u *CycleUpdateOne) SetNillableUpdateTime(v *time.Time) *CycleUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*CycleUpdateOne) SetUpdateTime ¶
func (_u *CycleUpdateOne) SetUpdateTime(v time.Time) *CycleUpdateOne
SetUpdateTime sets the "update_time" field.
func (*CycleUpdateOne) Where ¶
func (_u *CycleUpdateOne) Where(ps ...predicate.Cycle) *CycleUpdateOne
Where appends a list predicates to the CycleUpdate builder.
type DomainBinding ¶
type DomainBinding struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// 用户ID
UserID uuid.UUID `json:"user_id,omitempty"`
// 实例ID
FkComputeInstanceID uuid.UUID `json:"fk_compute_instance_id,omitempty"`
// 网络映射id
FkNetworkMappingID uuid.UUID `json:"fk_network_mapping_id,omitempty"`
// 映射名
Name string `json:"name,omitempty"`
// 域名
Domain string `json:"domain,omitempty"`
// 映射到gateway的端口
GatewayPort int32 `json:"gateway_port,omitempty"`
// 创建时间
CreateTime time.Time `json:"create_time,omitempty"`
// contains filtered or unexported fields
}
DomainBinding is the model entity for the DomainBinding schema.
func (*DomainBinding) String ¶
func (_m *DomainBinding) String() string
String implements the fmt.Stringer.
func (*DomainBinding) Unwrap ¶
func (_m *DomainBinding) Unwrap() *DomainBinding
Unwrap unwraps the DomainBinding 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 (*DomainBinding) Update ¶
func (_m *DomainBinding) Update() *DomainBindingUpdateOne
Update returns a builder for updating this DomainBinding. Note that you need to call DomainBinding.Unwrap() before calling this method if this DomainBinding was returned from a transaction, and the transaction was committed or rolled back.
type DomainBindingClient ¶
type DomainBindingClient struct {
// contains filtered or unexported fields
}
DomainBindingClient is a client for the DomainBinding schema.
func NewDomainBindingClient ¶
func NewDomainBindingClient(c config) *DomainBindingClient
NewDomainBindingClient returns a client for the DomainBinding from the given config.
func (*DomainBindingClient) Create ¶
func (c *DomainBindingClient) Create() *DomainBindingCreate
Create returns a builder for creating a DomainBinding entity.
func (*DomainBindingClient) CreateBulk ¶
func (c *DomainBindingClient) CreateBulk(builders ...*DomainBindingCreate) *DomainBindingCreateBulk
CreateBulk returns a builder for creating a bulk of DomainBinding entities.
func (*DomainBindingClient) Delete ¶
func (c *DomainBindingClient) Delete() *DomainBindingDelete
Delete returns a delete builder for DomainBinding.
func (*DomainBindingClient) DeleteOne ¶
func (c *DomainBindingClient) DeleteOne(_m *DomainBinding) *DomainBindingDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DomainBindingClient) DeleteOneID ¶
func (c *DomainBindingClient) DeleteOneID(id uuid.UUID) *DomainBindingDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DomainBindingClient) Get ¶
func (c *DomainBindingClient) Get(ctx context.Context, id uuid.UUID) (*DomainBinding, error)
Get returns a DomainBinding entity by its id.
func (*DomainBindingClient) GetX ¶
func (c *DomainBindingClient) GetX(ctx context.Context, id uuid.UUID) *DomainBinding
GetX is like Get, but panics if an error occurs.
func (*DomainBindingClient) Hooks ¶
func (c *DomainBindingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DomainBindingClient) Intercept ¶
func (c *DomainBindingClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `domainbinding.Intercept(f(g(h())))`.
func (*DomainBindingClient) Interceptors ¶
func (c *DomainBindingClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DomainBindingClient) MapCreateBulk ¶
func (c *DomainBindingClient) MapCreateBulk(slice any, setFunc func(*DomainBindingCreate, int)) *DomainBindingCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*DomainBindingClient) Query ¶
func (c *DomainBindingClient) Query() *DomainBindingQuery
Query returns a query builder for DomainBinding.
func (*DomainBindingClient) Update ¶
func (c *DomainBindingClient) Update() *DomainBindingUpdate
Update returns an update builder for DomainBinding.
func (*DomainBindingClient) UpdateOne ¶
func (c *DomainBindingClient) UpdateOne(_m *DomainBinding) *DomainBindingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DomainBindingClient) UpdateOneID ¶
func (c *DomainBindingClient) UpdateOneID(id uuid.UUID) *DomainBindingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DomainBindingClient) Use ¶
func (c *DomainBindingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `domainbinding.Hooks(f(g(h())))`.
type DomainBindingCreate ¶
type DomainBindingCreate struct {
// contains filtered or unexported fields
}
DomainBindingCreate is the builder for creating a DomainBinding entity.
func (*DomainBindingCreate) Exec ¶
func (_c *DomainBindingCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DomainBindingCreate) ExecX ¶
func (_c *DomainBindingCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DomainBindingCreate) Mutation ¶
func (_c *DomainBindingCreate) Mutation() *DomainBindingMutation
Mutation returns the DomainBindingMutation object of the builder.
func (*DomainBindingCreate) Save ¶
func (_c *DomainBindingCreate) Save(ctx context.Context) (*DomainBinding, error)
Save creates the DomainBinding in the database.
func (*DomainBindingCreate) SaveX ¶
func (_c *DomainBindingCreate) SaveX(ctx context.Context) *DomainBinding
SaveX calls Save and panics if Save returns an error.
func (*DomainBindingCreate) SetCreateTime ¶
func (_c *DomainBindingCreate) SetCreateTime(v time.Time) *DomainBindingCreate
SetCreateTime sets the "create_time" field.
func (*DomainBindingCreate) SetDomain ¶
func (_c *DomainBindingCreate) SetDomain(v string) *DomainBindingCreate
SetDomain sets the "domain" field.
func (*DomainBindingCreate) SetFkComputeInstanceID ¶
func (_c *DomainBindingCreate) SetFkComputeInstanceID(v uuid.UUID) *DomainBindingCreate
SetFkComputeInstanceID sets the "fk_compute_instance_id" field.
func (*DomainBindingCreate) SetFkNetworkMappingID ¶
func (_c *DomainBindingCreate) SetFkNetworkMappingID(v uuid.UUID) *DomainBindingCreate
SetFkNetworkMappingID sets the "fk_network_mapping_id" field.
func (*DomainBindingCreate) SetGatewayPort ¶
func (_c *DomainBindingCreate) SetGatewayPort(v int32) *DomainBindingCreate
SetGatewayPort sets the "gateway_port" field.
func (*DomainBindingCreate) SetID ¶
func (_c *DomainBindingCreate) SetID(v uuid.UUID) *DomainBindingCreate
SetID sets the "id" field.
func (*DomainBindingCreate) SetName ¶
func (_c *DomainBindingCreate) SetName(v string) *DomainBindingCreate
SetName sets the "name" field.
func (*DomainBindingCreate) SetNillableID ¶
func (_c *DomainBindingCreate) SetNillableID(v *uuid.UUID) *DomainBindingCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*DomainBindingCreate) SetUserID ¶
func (_c *DomainBindingCreate) SetUserID(v uuid.UUID) *DomainBindingCreate
SetUserID sets the "user_id" field.
type DomainBindingCreateBulk ¶
type DomainBindingCreateBulk struct {
// contains filtered or unexported fields
}
DomainBindingCreateBulk is the builder for creating many DomainBinding entities in bulk.
func (*DomainBindingCreateBulk) Exec ¶
func (_c *DomainBindingCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DomainBindingCreateBulk) ExecX ¶
func (_c *DomainBindingCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DomainBindingCreateBulk) Save ¶
func (_c *DomainBindingCreateBulk) Save(ctx context.Context) ([]*DomainBinding, error)
Save creates the DomainBinding entities in the database.
func (*DomainBindingCreateBulk) SaveX ¶
func (_c *DomainBindingCreateBulk) SaveX(ctx context.Context) []*DomainBinding
SaveX is like Save, but panics if an error occurs.
type DomainBindingDelete ¶
type DomainBindingDelete struct {
// contains filtered or unexported fields
}
DomainBindingDelete is the builder for deleting a DomainBinding entity.
func (*DomainBindingDelete) Exec ¶
func (_d *DomainBindingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DomainBindingDelete) ExecX ¶
func (_d *DomainBindingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DomainBindingDelete) Where ¶
func (_d *DomainBindingDelete) Where(ps ...predicate.DomainBinding) *DomainBindingDelete
Where appends a list predicates to the DomainBindingDelete builder.
type DomainBindingDeleteOne ¶
type DomainBindingDeleteOne struct {
// contains filtered or unexported fields
}
DomainBindingDeleteOne is the builder for deleting a single DomainBinding entity.
func (*DomainBindingDeleteOne) Exec ¶
func (_d *DomainBindingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DomainBindingDeleteOne) ExecX ¶
func (_d *DomainBindingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DomainBindingDeleteOne) Where ¶
func (_d *DomainBindingDeleteOne) Where(ps ...predicate.DomainBinding) *DomainBindingDeleteOne
Where appends a list predicates to the DomainBindingDelete builder.
type DomainBindingGroupBy ¶
type DomainBindingGroupBy struct {
// contains filtered or unexported fields
}
DomainBindingGroupBy is the group-by builder for DomainBinding entities.
func (*DomainBindingGroupBy) Aggregate ¶
func (_g *DomainBindingGroupBy) Aggregate(fns ...AggregateFunc) *DomainBindingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DomainBindingGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DomainBindingGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DomainBindingGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DomainBindingGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DomainBindingGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DomainBindingGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DomainBindingGroupBy) Scan ¶
func (_g *DomainBindingGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DomainBindingGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DomainBindingMutation ¶
type DomainBindingMutation struct {
// contains filtered or unexported fields
}
DomainBindingMutation represents an operation that mutates the DomainBinding nodes in the graph.
func (*DomainBindingMutation) AddField ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) AddGatewayPort ¶
func (m *DomainBindingMutation) AddGatewayPort(i int32)
AddGatewayPort adds i to the "gateway_port" field.
func (*DomainBindingMutation) AddedEdges ¶
func (m *DomainBindingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DomainBindingMutation) AddedField ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) AddedFields ¶
func (m *DomainBindingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DomainBindingMutation) AddedGatewayPort ¶
func (m *DomainBindingMutation) AddedGatewayPort() (r int32, exists bool)
AddedGatewayPort returns the value that was added to the "gateway_port" field in this mutation.
func (*DomainBindingMutation) AddedIDs ¶
func (m *DomainBindingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DomainBindingMutation) ClearEdge ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) ClearField ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) ClearedEdges ¶
func (m *DomainBindingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DomainBindingMutation) ClearedFields ¶
func (m *DomainBindingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DomainBindingMutation) Client ¶
func (m DomainBindingMutation) 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 (*DomainBindingMutation) CreateTime ¶
func (m *DomainBindingMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*DomainBindingMutation) Domain ¶
func (m *DomainBindingMutation) Domain() (r string, exists bool)
Domain returns the value of the "domain" field in the mutation.
func (*DomainBindingMutation) EdgeCleared ¶
func (m *DomainBindingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DomainBindingMutation) Field ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) FieldCleared ¶
func (m *DomainBindingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DomainBindingMutation) Fields ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) FkComputeInstanceID ¶
func (m *DomainBindingMutation) FkComputeInstanceID() (r uuid.UUID, exists bool)
FkComputeInstanceID returns the value of the "fk_compute_instance_id" field in the mutation.
func (*DomainBindingMutation) FkNetworkMappingID ¶
func (m *DomainBindingMutation) FkNetworkMappingID() (r uuid.UUID, exists bool)
FkNetworkMappingID returns the value of the "fk_network_mapping_id" field in the mutation.
func (*DomainBindingMutation) GatewayPort ¶
func (m *DomainBindingMutation) GatewayPort() (r int32, exists bool)
GatewayPort returns the value of the "gateway_port" field in the mutation.
func (*DomainBindingMutation) ID ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) 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 (*DomainBindingMutation) Name ¶
func (m *DomainBindingMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*DomainBindingMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the DomainBinding entity. If the DomainBinding 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 (*DomainBindingMutation) OldDomain ¶
func (m *DomainBindingMutation) OldDomain(ctx context.Context) (v string, err error)
OldDomain returns the old "domain" field's value of the DomainBinding entity. If the DomainBinding 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 (*DomainBindingMutation) 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 (*DomainBindingMutation) OldFkComputeInstanceID ¶
func (m *DomainBindingMutation) OldFkComputeInstanceID(ctx context.Context) (v uuid.UUID, err error)
OldFkComputeInstanceID returns the old "fk_compute_instance_id" field's value of the DomainBinding entity. If the DomainBinding 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 (*DomainBindingMutation) OldFkNetworkMappingID ¶
OldFkNetworkMappingID returns the old "fk_network_mapping_id" field's value of the DomainBinding entity. If the DomainBinding 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 (*DomainBindingMutation) OldGatewayPort ¶
func (m *DomainBindingMutation) OldGatewayPort(ctx context.Context) (v int32, err error)
OldGatewayPort returns the old "gateway_port" field's value of the DomainBinding entity. If the DomainBinding 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 (*DomainBindingMutation) OldName ¶
func (m *DomainBindingMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the DomainBinding entity. If the DomainBinding 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 (*DomainBindingMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the DomainBinding entity. If the DomainBinding 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 (*DomainBindingMutation) Op ¶
func (m *DomainBindingMutation) Op() Op
Op returns the operation name.
func (*DomainBindingMutation) RemovedEdges ¶
func (m *DomainBindingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DomainBindingMutation) RemovedIDs ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) ResetCreateTime ¶
func (m *DomainBindingMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*DomainBindingMutation) ResetDomain ¶
func (m *DomainBindingMutation) ResetDomain()
ResetDomain resets all changes to the "domain" field.
func (*DomainBindingMutation) ResetEdge ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) ResetField ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) ResetFkComputeInstanceID ¶
func (m *DomainBindingMutation) ResetFkComputeInstanceID()
ResetFkComputeInstanceID resets all changes to the "fk_compute_instance_id" field.
func (*DomainBindingMutation) ResetFkNetworkMappingID ¶
func (m *DomainBindingMutation) ResetFkNetworkMappingID()
ResetFkNetworkMappingID resets all changes to the "fk_network_mapping_id" field.
func (*DomainBindingMutation) ResetGatewayPort ¶
func (m *DomainBindingMutation) ResetGatewayPort()
ResetGatewayPort resets all changes to the "gateway_port" field.
func (*DomainBindingMutation) ResetName ¶
func (m *DomainBindingMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*DomainBindingMutation) ResetUserID ¶
func (m *DomainBindingMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*DomainBindingMutation) SetCreateTime ¶
func (m *DomainBindingMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*DomainBindingMutation) SetDomain ¶
func (m *DomainBindingMutation) SetDomain(s string)
SetDomain sets the "domain" field.
func (*DomainBindingMutation) SetField ¶
func (m *DomainBindingMutation) 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 (*DomainBindingMutation) SetFkComputeInstanceID ¶
func (m *DomainBindingMutation) SetFkComputeInstanceID(u uuid.UUID)
SetFkComputeInstanceID sets the "fk_compute_instance_id" field.
func (*DomainBindingMutation) SetFkNetworkMappingID ¶
func (m *DomainBindingMutation) SetFkNetworkMappingID(u uuid.UUID)
SetFkNetworkMappingID sets the "fk_network_mapping_id" field.
func (*DomainBindingMutation) SetGatewayPort ¶
func (m *DomainBindingMutation) SetGatewayPort(i int32)
SetGatewayPort sets the "gateway_port" field.
func (*DomainBindingMutation) SetID ¶
func (m *DomainBindingMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of DomainBinding entities.
func (*DomainBindingMutation) SetName ¶
func (m *DomainBindingMutation) SetName(s string)
SetName sets the "name" field.
func (*DomainBindingMutation) SetOp ¶
func (m *DomainBindingMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DomainBindingMutation) SetUserID ¶
func (m *DomainBindingMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" field.
func (DomainBindingMutation) Tx ¶
func (m DomainBindingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DomainBindingMutation) Type ¶
func (m *DomainBindingMutation) Type() string
Type returns the node type of this mutation (DomainBinding).
func (*DomainBindingMutation) UserID ¶
func (m *DomainBindingMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*DomainBindingMutation) Where ¶
func (m *DomainBindingMutation) Where(ps ...predicate.DomainBinding)
Where appends a list predicates to the DomainBindingMutation builder.
func (*DomainBindingMutation) WhereP ¶
func (m *DomainBindingMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DomainBindingMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DomainBindingQuery ¶
type DomainBindingQuery struct {
// contains filtered or unexported fields
}
DomainBindingQuery is the builder for querying DomainBinding entities.
func (*DomainBindingQuery) Aggregate ¶
func (_q *DomainBindingQuery) Aggregate(fns ...AggregateFunc) *DomainBindingSelect
Aggregate returns a DomainBindingSelect configured with the given aggregations.
func (*DomainBindingQuery) All ¶
func (_q *DomainBindingQuery) All(ctx context.Context) ([]*DomainBinding, error)
All executes the query and returns a list of DomainBindings.
func (*DomainBindingQuery) AllX ¶
func (_q *DomainBindingQuery) AllX(ctx context.Context) []*DomainBinding
AllX is like All, but panics if an error occurs.
func (*DomainBindingQuery) Clone ¶
func (_q *DomainBindingQuery) Clone() *DomainBindingQuery
Clone returns a duplicate of the DomainBindingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DomainBindingQuery) Count ¶
func (_q *DomainBindingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DomainBindingQuery) CountX ¶
func (_q *DomainBindingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DomainBindingQuery) Exist ¶
func (_q *DomainBindingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DomainBindingQuery) ExistX ¶
func (_q *DomainBindingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DomainBindingQuery) First ¶
func (_q *DomainBindingQuery) First(ctx context.Context) (*DomainBinding, error)
First returns the first DomainBinding entity from the query. Returns a *NotFoundError when no DomainBinding was found.
func (*DomainBindingQuery) FirstID ¶
FirstID returns the first DomainBinding ID from the query. Returns a *NotFoundError when no DomainBinding ID was found.
func (*DomainBindingQuery) FirstIDX ¶
func (_q *DomainBindingQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*DomainBindingQuery) FirstX ¶
func (_q *DomainBindingQuery) FirstX(ctx context.Context) *DomainBinding
FirstX is like First, but panics if an error occurs.
func (*DomainBindingQuery) GroupBy ¶
func (_q *DomainBindingQuery) GroupBy(field string, fields ...string) *DomainBindingGroupBy
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 {
UserID uuid.UUID `json:"user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.DomainBinding.Query().
GroupBy(domainbinding.FieldUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DomainBindingQuery) IDsX ¶
func (_q *DomainBindingQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*DomainBindingQuery) Limit ¶
func (_q *DomainBindingQuery) Limit(limit int) *DomainBindingQuery
Limit the number of records to be returned by this query.
func (*DomainBindingQuery) Offset ¶
func (_q *DomainBindingQuery) Offset(offset int) *DomainBindingQuery
Offset to start from.
func (*DomainBindingQuery) Only ¶
func (_q *DomainBindingQuery) Only(ctx context.Context) (*DomainBinding, error)
Only returns a single DomainBinding entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DomainBinding entity is found. Returns a *NotFoundError when no DomainBinding entities are found.
func (*DomainBindingQuery) OnlyID ¶
OnlyID is like Only, but returns the only DomainBinding ID in the query. Returns a *NotSingularError when more than one DomainBinding ID is found. Returns a *NotFoundError when no entities are found.
func (*DomainBindingQuery) OnlyIDX ¶
func (_q *DomainBindingQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DomainBindingQuery) OnlyX ¶
func (_q *DomainBindingQuery) OnlyX(ctx context.Context) *DomainBinding
OnlyX is like Only, but panics if an error occurs.
func (*DomainBindingQuery) Order ¶
func (_q *DomainBindingQuery) Order(o ...domainbinding.OrderOption) *DomainBindingQuery
Order specifies how the records should be ordered.
func (*DomainBindingQuery) Select ¶
func (_q *DomainBindingQuery) Select(fields ...string) *DomainBindingSelect
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 {
UserID uuid.UUID `json:"user_id,omitempty"`
}
client.DomainBinding.Query().
Select(domainbinding.FieldUserID).
Scan(ctx, &v)
func (*DomainBindingQuery) Unique ¶
func (_q *DomainBindingQuery) Unique(unique bool) *DomainBindingQuery
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 (*DomainBindingQuery) Where ¶
func (_q *DomainBindingQuery) Where(ps ...predicate.DomainBinding) *DomainBindingQuery
Where adds a new predicate for the DomainBindingQuery builder.
type DomainBindingSelect ¶
type DomainBindingSelect struct {
*DomainBindingQuery
// contains filtered or unexported fields
}
DomainBindingSelect is the builder for selecting fields of DomainBinding entities.
func (*DomainBindingSelect) Aggregate ¶
func (_s *DomainBindingSelect) Aggregate(fns ...AggregateFunc) *DomainBindingSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DomainBindingSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DomainBindingSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DomainBindingSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DomainBindingSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DomainBindingSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DomainBindingSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DomainBindingSelect) Scan ¶
func (_s *DomainBindingSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DomainBindingSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DomainBindingUpdate ¶
type DomainBindingUpdate struct {
// contains filtered or unexported fields
}
DomainBindingUpdate is the builder for updating DomainBinding entities.
func (*DomainBindingUpdate) AddGatewayPort ¶
func (_u *DomainBindingUpdate) AddGatewayPort(v int32) *DomainBindingUpdate
AddGatewayPort adds value to the "gateway_port" field.
func (*DomainBindingUpdate) Exec ¶
func (_u *DomainBindingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DomainBindingUpdate) ExecX ¶
func (_u *DomainBindingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DomainBindingUpdate) Mutation ¶
func (_u *DomainBindingUpdate) Mutation() *DomainBindingMutation
Mutation returns the DomainBindingMutation object of the builder.
func (*DomainBindingUpdate) Save ¶
func (_u *DomainBindingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DomainBindingUpdate) SaveX ¶
func (_u *DomainBindingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DomainBindingUpdate) SetCreateTime ¶
func (_u *DomainBindingUpdate) SetCreateTime(v time.Time) *DomainBindingUpdate
SetCreateTime sets the "create_time" field.
func (*DomainBindingUpdate) SetDomain ¶
func (_u *DomainBindingUpdate) SetDomain(v string) *DomainBindingUpdate
SetDomain sets the "domain" field.
func (*DomainBindingUpdate) SetFkComputeInstanceID ¶
func (_u *DomainBindingUpdate) SetFkComputeInstanceID(v uuid.UUID) *DomainBindingUpdate
SetFkComputeInstanceID sets the "fk_compute_instance_id" field.
func (*DomainBindingUpdate) SetFkNetworkMappingID ¶
func (_u *DomainBindingUpdate) SetFkNetworkMappingID(v uuid.UUID) *DomainBindingUpdate
SetFkNetworkMappingID sets the "fk_network_mapping_id" field.
func (*DomainBindingUpdate) SetGatewayPort ¶
func (_u *DomainBindingUpdate) SetGatewayPort(v int32) *DomainBindingUpdate
SetGatewayPort sets the "gateway_port" field.
func (*DomainBindingUpdate) SetName ¶
func (_u *DomainBindingUpdate) SetName(v string) *DomainBindingUpdate
SetName sets the "name" field.
func (*DomainBindingUpdate) SetNillableCreateTime ¶
func (_u *DomainBindingUpdate) SetNillableCreateTime(v *time.Time) *DomainBindingUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*DomainBindingUpdate) SetNillableDomain ¶
func (_u *DomainBindingUpdate) SetNillableDomain(v *string) *DomainBindingUpdate
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*DomainBindingUpdate) SetNillableFkComputeInstanceID ¶
func (_u *DomainBindingUpdate) SetNillableFkComputeInstanceID(v *uuid.UUID) *DomainBindingUpdate
SetNillableFkComputeInstanceID sets the "fk_compute_instance_id" field if the given value is not nil.
func (*DomainBindingUpdate) SetNillableFkNetworkMappingID ¶
func (_u *DomainBindingUpdate) SetNillableFkNetworkMappingID(v *uuid.UUID) *DomainBindingUpdate
SetNillableFkNetworkMappingID sets the "fk_network_mapping_id" field if the given value is not nil.
func (*DomainBindingUpdate) SetNillableGatewayPort ¶
func (_u *DomainBindingUpdate) SetNillableGatewayPort(v *int32) *DomainBindingUpdate
SetNillableGatewayPort sets the "gateway_port" field if the given value is not nil.
func (*DomainBindingUpdate) SetNillableName ¶
func (_u *DomainBindingUpdate) SetNillableName(v *string) *DomainBindingUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*DomainBindingUpdate) SetNillableUserID ¶
func (_u *DomainBindingUpdate) SetNillableUserID(v *uuid.UUID) *DomainBindingUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*DomainBindingUpdate) SetUserID ¶
func (_u *DomainBindingUpdate) SetUserID(v uuid.UUID) *DomainBindingUpdate
SetUserID sets the "user_id" field.
func (*DomainBindingUpdate) Where ¶
func (_u *DomainBindingUpdate) Where(ps ...predicate.DomainBinding) *DomainBindingUpdate
Where appends a list predicates to the DomainBindingUpdate builder.
type DomainBindingUpdateOne ¶
type DomainBindingUpdateOne struct {
// contains filtered or unexported fields
}
DomainBindingUpdateOne is the builder for updating a single DomainBinding entity.
func (*DomainBindingUpdateOne) AddGatewayPort ¶
func (_u *DomainBindingUpdateOne) AddGatewayPort(v int32) *DomainBindingUpdateOne
AddGatewayPort adds value to the "gateway_port" field.
func (*DomainBindingUpdateOne) Exec ¶
func (_u *DomainBindingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DomainBindingUpdateOne) ExecX ¶
func (_u *DomainBindingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DomainBindingUpdateOne) Mutation ¶
func (_u *DomainBindingUpdateOne) Mutation() *DomainBindingMutation
Mutation returns the DomainBindingMutation object of the builder.
func (*DomainBindingUpdateOne) Save ¶
func (_u *DomainBindingUpdateOne) Save(ctx context.Context) (*DomainBinding, error)
Save executes the query and returns the updated DomainBinding entity.
func (*DomainBindingUpdateOne) SaveX ¶
func (_u *DomainBindingUpdateOne) SaveX(ctx context.Context) *DomainBinding
SaveX is like Save, but panics if an error occurs.
func (*DomainBindingUpdateOne) Select ¶
func (_u *DomainBindingUpdateOne) Select(field string, fields ...string) *DomainBindingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DomainBindingUpdateOne) SetCreateTime ¶
func (_u *DomainBindingUpdateOne) SetCreateTime(v time.Time) *DomainBindingUpdateOne
SetCreateTime sets the "create_time" field.
func (*DomainBindingUpdateOne) SetDomain ¶
func (_u *DomainBindingUpdateOne) SetDomain(v string) *DomainBindingUpdateOne
SetDomain sets the "domain" field.
func (*DomainBindingUpdateOne) SetFkComputeInstanceID ¶
func (_u *DomainBindingUpdateOne) SetFkComputeInstanceID(v uuid.UUID) *DomainBindingUpdateOne
SetFkComputeInstanceID sets the "fk_compute_instance_id" field.
func (*DomainBindingUpdateOne) SetFkNetworkMappingID ¶
func (_u *DomainBindingUpdateOne) SetFkNetworkMappingID(v uuid.UUID) *DomainBindingUpdateOne
SetFkNetworkMappingID sets the "fk_network_mapping_id" field.
func (*DomainBindingUpdateOne) SetGatewayPort ¶
func (_u *DomainBindingUpdateOne) SetGatewayPort(v int32) *DomainBindingUpdateOne
SetGatewayPort sets the "gateway_port" field.
func (*DomainBindingUpdateOne) SetName ¶
func (_u *DomainBindingUpdateOne) SetName(v string) *DomainBindingUpdateOne
SetName sets the "name" field.
func (*DomainBindingUpdateOne) SetNillableCreateTime ¶
func (_u *DomainBindingUpdateOne) SetNillableCreateTime(v *time.Time) *DomainBindingUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*DomainBindingUpdateOne) SetNillableDomain ¶
func (_u *DomainBindingUpdateOne) SetNillableDomain(v *string) *DomainBindingUpdateOne
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*DomainBindingUpdateOne) SetNillableFkComputeInstanceID ¶
func (_u *DomainBindingUpdateOne) SetNillableFkComputeInstanceID(v *uuid.UUID) *DomainBindingUpdateOne
SetNillableFkComputeInstanceID sets the "fk_compute_instance_id" field if the given value is not nil.
func (*DomainBindingUpdateOne) SetNillableFkNetworkMappingID ¶
func (_u *DomainBindingUpdateOne) SetNillableFkNetworkMappingID(v *uuid.UUID) *DomainBindingUpdateOne
SetNillableFkNetworkMappingID sets the "fk_network_mapping_id" field if the given value is not nil.
func (*DomainBindingUpdateOne) SetNillableGatewayPort ¶
func (_u *DomainBindingUpdateOne) SetNillableGatewayPort(v *int32) *DomainBindingUpdateOne
SetNillableGatewayPort sets the "gateway_port" field if the given value is not nil.
func (*DomainBindingUpdateOne) SetNillableName ¶
func (_u *DomainBindingUpdateOne) SetNillableName(v *string) *DomainBindingUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*DomainBindingUpdateOne) SetNillableUserID ¶
func (_u *DomainBindingUpdateOne) SetNillableUserID(v *uuid.UUID) *DomainBindingUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*DomainBindingUpdateOne) SetUserID ¶
func (_u *DomainBindingUpdateOne) SetUserID(v uuid.UUID) *DomainBindingUpdateOne
SetUserID sets the "user_id" field.
func (*DomainBindingUpdateOne) Where ¶
func (_u *DomainBindingUpdateOne) Where(ps ...predicate.DomainBinding) *DomainBindingUpdateOne
Where appends a list predicates to the DomainBindingUpdate builder.
type DomainBindings ¶
type DomainBindings []*DomainBinding
DomainBindings is a parsable slice of DomainBinding.
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 (_m *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(_m *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) MapCreateBulk ¶
func (c *EmployeeClient) MapCreateBulk(slice any, setFunc func(*EmployeeCreate, int)) *EmployeeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*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(_m *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 (_c *EmployeeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmployeeCreate) ExecX ¶
func (_c *EmployeeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeCreate) Mutation ¶
func (_c *EmployeeCreate) Mutation() *EmployeeMutation
Mutation returns the EmployeeMutation object of the builder.
func (*EmployeeCreate) Save ¶
func (_c *EmployeeCreate) Save(ctx context.Context) (*Employee, error)
Save creates the Employee in the database.
func (*EmployeeCreate) SaveX ¶
func (_c *EmployeeCreate) SaveX(ctx context.Context) *Employee
SaveX calls Save and panics if Save returns an error.
func (*EmployeeCreate) SetAge ¶
func (_c *EmployeeCreate) SetAge(v int32) *EmployeeCreate
SetAge sets the "age" field.
func (*EmployeeCreate) SetName ¶
func (_c *EmployeeCreate) SetName(v string) *EmployeeCreate
SetName sets the "name" field.
func (*EmployeeCreate) SetNillableAge ¶
func (_c *EmployeeCreate) SetNillableAge(v *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 (_c *EmployeeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EmployeeCreateBulk) ExecX ¶
func (_c *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 (_d *EmployeeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EmployeeDelete) ExecX ¶
func (_d *EmployeeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeDelete) Where ¶
func (_d *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 (_d *EmployeeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EmployeeDeleteOne) ExecX ¶
func (_d *EmployeeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeDeleteOne) Where ¶
func (_d *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 (_g *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 (_g *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 (_q *EmployeeQuery) Aggregate(fns ...AggregateFunc) *EmployeeSelect
Aggregate returns a EmployeeSelect configured with the given aggregations.
func (*EmployeeQuery) All ¶
func (_q *EmployeeQuery) All(ctx context.Context) ([]*Employee, error)
All executes the query and returns a list of Employees.
func (*EmployeeQuery) AllX ¶
func (_q *EmployeeQuery) AllX(ctx context.Context) []*Employee
AllX is like All, but panics if an error occurs.
func (*EmployeeQuery) Clone ¶
func (_q *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 (_q *EmployeeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EmployeeQuery) CountX ¶
func (_q *EmployeeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EmployeeQuery) Exist ¶
func (_q *EmployeeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EmployeeQuery) ExistX ¶
func (_q *EmployeeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EmployeeQuery) First ¶
func (_q *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 (_q *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 (_q *EmployeeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EmployeeQuery) FirstX ¶
func (_q *EmployeeQuery) FirstX(ctx context.Context) *Employee
FirstX is like First, but panics if an error occurs.
func (*EmployeeQuery) GroupBy ¶
func (_q *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 (_q *EmployeeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Employee IDs.
func (*EmployeeQuery) IDsX ¶
func (_q *EmployeeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EmployeeQuery) Limit ¶
func (_q *EmployeeQuery) Limit(limit int) *EmployeeQuery
Limit the number of records to be returned by this query.
func (*EmployeeQuery) Offset ¶
func (_q *EmployeeQuery) Offset(offset int) *EmployeeQuery
Offset to start from.
func (*EmployeeQuery) Only ¶
func (_q *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 (_q *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 (_q *EmployeeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EmployeeQuery) OnlyX ¶
func (_q *EmployeeQuery) OnlyX(ctx context.Context) *Employee
OnlyX is like Only, but panics if an error occurs.
func (*EmployeeQuery) Order ¶
func (_q *EmployeeQuery) Order(o ...employee.OrderOption) *EmployeeQuery
Order specifies how the records should be ordered.
func (*EmployeeQuery) Select ¶
func (_q *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 (_q *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 (_q *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 (_s *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 (_s *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 (_u *EmployeeUpdate) AddAge(v int32) *EmployeeUpdate
AddAge adds value to the "age" field.
func (*EmployeeUpdate) ClearAge ¶
func (_u *EmployeeUpdate) ClearAge() *EmployeeUpdate
ClearAge clears the value of the "age" field.
func (*EmployeeUpdate) Exec ¶
func (_u *EmployeeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmployeeUpdate) ExecX ¶
func (_u *EmployeeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeUpdate) Mutation ¶
func (_u *EmployeeUpdate) Mutation() *EmployeeMutation
Mutation returns the EmployeeMutation object of the builder.
func (*EmployeeUpdate) Save ¶
func (_u *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 (_u *EmployeeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EmployeeUpdate) SetAge ¶
func (_u *EmployeeUpdate) SetAge(v int32) *EmployeeUpdate
SetAge sets the "age" field.
func (*EmployeeUpdate) SetName ¶
func (_u *EmployeeUpdate) SetName(v string) *EmployeeUpdate
SetName sets the "name" field.
func (*EmployeeUpdate) SetNillableAge ¶
func (_u *EmployeeUpdate) SetNillableAge(v *int32) *EmployeeUpdate
SetNillableAge sets the "age" field if the given value is not nil.
func (*EmployeeUpdate) SetNillableName ¶
func (_u *EmployeeUpdate) SetNillableName(v *string) *EmployeeUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*EmployeeUpdate) Where ¶
func (_u *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 (_u *EmployeeUpdateOne) AddAge(v int32) *EmployeeUpdateOne
AddAge adds value to the "age" field.
func (*EmployeeUpdateOne) ClearAge ¶
func (_u *EmployeeUpdateOne) ClearAge() *EmployeeUpdateOne
ClearAge clears the value of the "age" field.
func (*EmployeeUpdateOne) Exec ¶
func (_u *EmployeeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EmployeeUpdateOne) ExecX ¶
func (_u *EmployeeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeUpdateOne) Mutation ¶
func (_u *EmployeeUpdateOne) Mutation() *EmployeeMutation
Mutation returns the EmployeeMutation object of the builder.
func (*EmployeeUpdateOne) Save ¶
func (_u *EmployeeUpdateOne) Save(ctx context.Context) (*Employee, error)
Save executes the query and returns the updated Employee entity.
func (*EmployeeUpdateOne) SaveX ¶
func (_u *EmployeeUpdateOne) SaveX(ctx context.Context) *Employee
SaveX is like Save, but panics if an error occurs.
func (*EmployeeUpdateOne) Select ¶
func (_u *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 (_u *EmployeeUpdateOne) SetAge(v int32) *EmployeeUpdateOne
SetAge sets the "age" field.
func (*EmployeeUpdateOne) SetName ¶
func (_u *EmployeeUpdateOne) SetName(v string) *EmployeeUpdateOne
SetName sets the "name" field.
func (*EmployeeUpdateOne) SetNillableAge ¶
func (_u *EmployeeUpdateOne) SetNillableAge(v *int32) *EmployeeUpdateOne
SetNillableAge sets the "age" field if the given value is not nil.
func (*EmployeeUpdateOne) SetNillableName ¶
func (_u *EmployeeUpdateOne) SetNillableName(v *string) *EmployeeUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*EmployeeUpdateOne) Where ¶
func (_u *EmployeeUpdateOne) Where(ps ...predicate.Employee) *EmployeeUpdateOne
Where appends a list predicates to the EmployeeUpdate builder.
type Gateway ¶
type Gateway struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// 网关ip
IP string `json:"ip,omitempty"`
// 端口号
Port int32 `json:"port,omitempty"`
// 内网ip
InternalIP string `json:"internal_ip,omitempty"`
// frp 认证Token
AuthToken string `json:"auth_token,omitempty"`
// contains filtered or unexported fields
}
Gateway is the model entity for the Gateway schema.
func (*Gateway) Unwrap ¶
Unwrap unwraps the Gateway 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 (*Gateway) Update ¶
func (_m *Gateway) Update() *GatewayUpdateOne
Update returns a builder for updating this Gateway. Note that you need to call Gateway.Unwrap() before calling this method if this Gateway was returned from a transaction, and the transaction was committed or rolled back.
type GatewayClient ¶
type GatewayClient struct {
// contains filtered or unexported fields
}
GatewayClient is a client for the Gateway schema.
func NewGatewayClient ¶
func NewGatewayClient(c config) *GatewayClient
NewGatewayClient returns a client for the Gateway from the given config.
func (*GatewayClient) Create ¶
func (c *GatewayClient) Create() *GatewayCreate
Create returns a builder for creating a Gateway entity.
func (*GatewayClient) CreateBulk ¶
func (c *GatewayClient) CreateBulk(builders ...*GatewayCreate) *GatewayCreateBulk
CreateBulk returns a builder for creating a bulk of Gateway entities.
func (*GatewayClient) Delete ¶
func (c *GatewayClient) Delete() *GatewayDelete
Delete returns a delete builder for Gateway.
func (*GatewayClient) DeleteOne ¶
func (c *GatewayClient) DeleteOne(_m *Gateway) *GatewayDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GatewayClient) DeleteOneID ¶
func (c *GatewayClient) DeleteOneID(id uuid.UUID) *GatewayDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GatewayClient) Hooks ¶
func (c *GatewayClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GatewayClient) Intercept ¶
func (c *GatewayClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gateway.Intercept(f(g(h())))`.
func (*GatewayClient) Interceptors ¶
func (c *GatewayClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GatewayClient) MapCreateBulk ¶
func (c *GatewayClient) MapCreateBulk(slice any, setFunc func(*GatewayCreate, int)) *GatewayCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*GatewayClient) Query ¶
func (c *GatewayClient) Query() *GatewayQuery
Query returns a query builder for Gateway.
func (*GatewayClient) Update ¶
func (c *GatewayClient) Update() *GatewayUpdate
Update returns an update builder for Gateway.
func (*GatewayClient) UpdateOne ¶
func (c *GatewayClient) UpdateOne(_m *Gateway) *GatewayUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GatewayClient) UpdateOneID ¶
func (c *GatewayClient) UpdateOneID(id uuid.UUID) *GatewayUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GatewayClient) Use ¶
func (c *GatewayClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gateway.Hooks(f(g(h())))`.
type GatewayCreate ¶
type GatewayCreate struct {
// contains filtered or unexported fields
}
GatewayCreate is the builder for creating a Gateway entity.
func (*GatewayCreate) Exec ¶
func (_c *GatewayCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GatewayCreate) ExecX ¶
func (_c *GatewayCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GatewayCreate) Mutation ¶
func (_c *GatewayCreate) Mutation() *GatewayMutation
Mutation returns the GatewayMutation object of the builder.
func (*GatewayCreate) Save ¶
func (_c *GatewayCreate) Save(ctx context.Context) (*Gateway, error)
Save creates the Gateway in the database.
func (*GatewayCreate) SaveX ¶
func (_c *GatewayCreate) SaveX(ctx context.Context) *Gateway
SaveX calls Save and panics if Save returns an error.
func (*GatewayCreate) SetAuthToken ¶ added in v0.0.12
func (_c *GatewayCreate) SetAuthToken(v string) *GatewayCreate
SetAuthToken sets the "auth_token" field.
func (*GatewayCreate) SetID ¶
func (_c *GatewayCreate) SetID(v uuid.UUID) *GatewayCreate
SetID sets the "id" field.
func (*GatewayCreate) SetIP ¶
func (_c *GatewayCreate) SetIP(v string) *GatewayCreate
SetIP sets the "ip" field.
func (*GatewayCreate) SetInternalIP ¶
func (_c *GatewayCreate) SetInternalIP(v string) *GatewayCreate
SetInternalIP sets the "internal_ip" field.
func (*GatewayCreate) SetName ¶
func (_c *GatewayCreate) SetName(v string) *GatewayCreate
SetName sets the "name" field.
func (*GatewayCreate) SetNillableID ¶
func (_c *GatewayCreate) SetNillableID(v *uuid.UUID) *GatewayCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*GatewayCreate) SetPort ¶
func (_c *GatewayCreate) SetPort(v int32) *GatewayCreate
SetPort sets the "port" field.
type GatewayCreateBulk ¶
type GatewayCreateBulk struct {
// contains filtered or unexported fields
}
GatewayCreateBulk is the builder for creating many Gateway entities in bulk.
func (*GatewayCreateBulk) Exec ¶
func (_c *GatewayCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GatewayCreateBulk) ExecX ¶
func (_c *GatewayCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GatewayDelete ¶
type GatewayDelete struct {
// contains filtered or unexported fields
}
GatewayDelete is the builder for deleting a Gateway entity.
func (*GatewayDelete) Exec ¶
func (_d *GatewayDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GatewayDelete) ExecX ¶
func (_d *GatewayDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GatewayDelete) Where ¶
func (_d *GatewayDelete) Where(ps ...predicate.Gateway) *GatewayDelete
Where appends a list predicates to the GatewayDelete builder.
type GatewayDeleteOne ¶
type GatewayDeleteOne struct {
// contains filtered or unexported fields
}
GatewayDeleteOne is the builder for deleting a single Gateway entity.
func (*GatewayDeleteOne) Exec ¶
func (_d *GatewayDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GatewayDeleteOne) ExecX ¶
func (_d *GatewayDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GatewayDeleteOne) Where ¶
func (_d *GatewayDeleteOne) Where(ps ...predicate.Gateway) *GatewayDeleteOne
Where appends a list predicates to the GatewayDelete builder.
type GatewayGroupBy ¶
type GatewayGroupBy struct {
// contains filtered or unexported fields
}
GatewayGroupBy is the group-by builder for Gateway entities.
func (*GatewayGroupBy) Aggregate ¶
func (_g *GatewayGroupBy) Aggregate(fns ...AggregateFunc) *GatewayGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GatewayGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GatewayGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GatewayGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GatewayGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GatewayGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GatewayGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GatewayGroupBy) Scan ¶
func (_g *GatewayGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GatewayGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GatewayMutation ¶
type GatewayMutation struct {
// contains filtered or unexported fields
}
GatewayMutation represents an operation that mutates the Gateway nodes in the graph.
func (*GatewayMutation) AddField ¶
func (m *GatewayMutation) 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 (*GatewayMutation) AddPort ¶
func (m *GatewayMutation) AddPort(i int32)
AddPort adds i to the "port" field.
func (*GatewayMutation) AddedEdges ¶
func (m *GatewayMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GatewayMutation) AddedField ¶
func (m *GatewayMutation) 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 (*GatewayMutation) AddedFields ¶
func (m *GatewayMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GatewayMutation) AddedIDs ¶
func (m *GatewayMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GatewayMutation) AddedPort ¶
func (m *GatewayMutation) AddedPort() (r int32, exists bool)
AddedPort returns the value that was added to the "port" field in this mutation.
func (*GatewayMutation) AuthToken ¶ added in v0.0.12
func (m *GatewayMutation) AuthToken() (r string, exists bool)
AuthToken returns the value of the "auth_token" field in the mutation.
func (*GatewayMutation) ClearEdge ¶
func (m *GatewayMutation) 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 (*GatewayMutation) ClearField ¶
func (m *GatewayMutation) 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 (*GatewayMutation) ClearedEdges ¶
func (m *GatewayMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GatewayMutation) ClearedFields ¶
func (m *GatewayMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GatewayMutation) Client ¶
func (m GatewayMutation) 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 (*GatewayMutation) EdgeCleared ¶
func (m *GatewayMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GatewayMutation) Field ¶
func (m *GatewayMutation) 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 (*GatewayMutation) FieldCleared ¶
func (m *GatewayMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GatewayMutation) Fields ¶
func (m *GatewayMutation) 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 (*GatewayMutation) ID ¶
func (m *GatewayMutation) 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 (*GatewayMutation) 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 (*GatewayMutation) IP ¶
func (m *GatewayMutation) IP() (r string, exists bool)
IP returns the value of the "ip" field in the mutation.
func (*GatewayMutation) InternalIP ¶
func (m *GatewayMutation) InternalIP() (r string, exists bool)
InternalIP returns the value of the "internal_ip" field in the mutation.
func (*GatewayMutation) Name ¶
func (m *GatewayMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GatewayMutation) OldAuthToken ¶ added in v0.0.12
func (m *GatewayMutation) OldAuthToken(ctx context.Context) (v string, err error)
OldAuthToken returns the old "auth_token" field's value of the Gateway entity. If the Gateway 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 (*GatewayMutation) 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 (*GatewayMutation) OldIP ¶
func (m *GatewayMutation) OldIP(ctx context.Context) (v string, err error)
OldIP returns the old "ip" field's value of the Gateway entity. If the Gateway 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 (*GatewayMutation) OldInternalIP ¶
func (m *GatewayMutation) OldInternalIP(ctx context.Context) (v string, err error)
OldInternalIP returns the old "internal_ip" field's value of the Gateway entity. If the Gateway 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 (*GatewayMutation) OldName ¶
func (m *GatewayMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Gateway entity. If the Gateway 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 (*GatewayMutation) OldPort ¶
func (m *GatewayMutation) OldPort(ctx context.Context) (v int32, err error)
OldPort returns the old "port" field's value of the Gateway entity. If the Gateway 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 (*GatewayMutation) Port ¶
func (m *GatewayMutation) Port() (r int32, exists bool)
Port returns the value of the "port" field in the mutation.
func (*GatewayMutation) RemovedEdges ¶
func (m *GatewayMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GatewayMutation) RemovedIDs ¶
func (m *GatewayMutation) 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 (*GatewayMutation) ResetAuthToken ¶ added in v0.0.12
func (m *GatewayMutation) ResetAuthToken()
ResetAuthToken resets all changes to the "auth_token" field.
func (*GatewayMutation) ResetEdge ¶
func (m *GatewayMutation) 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 (*GatewayMutation) ResetField ¶
func (m *GatewayMutation) 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 (*GatewayMutation) ResetIP ¶
func (m *GatewayMutation) ResetIP()
ResetIP resets all changes to the "ip" field.
func (*GatewayMutation) ResetInternalIP ¶
func (m *GatewayMutation) ResetInternalIP()
ResetInternalIP resets all changes to the "internal_ip" field.
func (*GatewayMutation) ResetName ¶
func (m *GatewayMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GatewayMutation) ResetPort ¶
func (m *GatewayMutation) ResetPort()
ResetPort resets all changes to the "port" field.
func (*GatewayMutation) SetAuthToken ¶ added in v0.0.12
func (m *GatewayMutation) SetAuthToken(s string)
SetAuthToken sets the "auth_token" field.
func (*GatewayMutation) SetField ¶
func (m *GatewayMutation) 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 (*GatewayMutation) SetID ¶
func (m *GatewayMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Gateway entities.
func (*GatewayMutation) SetIP ¶
func (m *GatewayMutation) SetIP(s string)
SetIP sets the "ip" field.
func (*GatewayMutation) SetInternalIP ¶
func (m *GatewayMutation) SetInternalIP(s string)
SetInternalIP sets the "internal_ip" field.
func (*GatewayMutation) SetName ¶
func (m *GatewayMutation) SetName(s string)
SetName sets the "name" field.
func (*GatewayMutation) SetOp ¶
func (m *GatewayMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GatewayMutation) SetPort ¶
func (m *GatewayMutation) SetPort(i int32)
SetPort sets the "port" field.
func (GatewayMutation) Tx ¶
func (m GatewayMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GatewayMutation) Type ¶
func (m *GatewayMutation) Type() string
Type returns the node type of this mutation (Gateway).
func (*GatewayMutation) Where ¶
func (m *GatewayMutation) Where(ps ...predicate.Gateway)
Where appends a list predicates to the GatewayMutation builder.
func (*GatewayMutation) WhereP ¶
func (m *GatewayMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GatewayMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GatewayPort ¶
type GatewayPort struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// gateway id
FkGatewayID uuid.UUID `json:"fk_gateway_id,omitempty"`
// 端口号
Port int32 `json:"port,omitempty"`
// 是否使用
IsUse bool `json:"is_use,omitempty"`
// 是否public 端口
IsPublic bool `json:"is_public,omitempty"`
// contains filtered or unexported fields
}
GatewayPort is the model entity for the GatewayPort schema.
func (*GatewayPort) String ¶
func (_m *GatewayPort) String() string
String implements the fmt.Stringer.
func (*GatewayPort) Unwrap ¶
func (_m *GatewayPort) Unwrap() *GatewayPort
Unwrap unwraps the GatewayPort 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 (*GatewayPort) Update ¶
func (_m *GatewayPort) Update() *GatewayPortUpdateOne
Update returns a builder for updating this GatewayPort. Note that you need to call GatewayPort.Unwrap() before calling this method if this GatewayPort was returned from a transaction, and the transaction was committed or rolled back.
type GatewayPortClient ¶
type GatewayPortClient struct {
// contains filtered or unexported fields
}
GatewayPortClient is a client for the GatewayPort schema.
func NewGatewayPortClient ¶
func NewGatewayPortClient(c config) *GatewayPortClient
NewGatewayPortClient returns a client for the GatewayPort from the given config.
func (*GatewayPortClient) Create ¶
func (c *GatewayPortClient) Create() *GatewayPortCreate
Create returns a builder for creating a GatewayPort entity.
func (*GatewayPortClient) CreateBulk ¶
func (c *GatewayPortClient) CreateBulk(builders ...*GatewayPortCreate) *GatewayPortCreateBulk
CreateBulk returns a builder for creating a bulk of GatewayPort entities.
func (*GatewayPortClient) Delete ¶
func (c *GatewayPortClient) Delete() *GatewayPortDelete
Delete returns a delete builder for GatewayPort.
func (*GatewayPortClient) DeleteOne ¶
func (c *GatewayPortClient) DeleteOne(_m *GatewayPort) *GatewayPortDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GatewayPortClient) DeleteOneID ¶
func (c *GatewayPortClient) DeleteOneID(id uuid.UUID) *GatewayPortDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GatewayPortClient) Get ¶
func (c *GatewayPortClient) Get(ctx context.Context, id uuid.UUID) (*GatewayPort, error)
Get returns a GatewayPort entity by its id.
func (*GatewayPortClient) GetX ¶
func (c *GatewayPortClient) GetX(ctx context.Context, id uuid.UUID) *GatewayPort
GetX is like Get, but panics if an error occurs.
func (*GatewayPortClient) Hooks ¶
func (c *GatewayPortClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GatewayPortClient) Intercept ¶
func (c *GatewayPortClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gatewayport.Intercept(f(g(h())))`.
func (*GatewayPortClient) Interceptors ¶
func (c *GatewayPortClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GatewayPortClient) MapCreateBulk ¶
func (c *GatewayPortClient) MapCreateBulk(slice any, setFunc func(*GatewayPortCreate, int)) *GatewayPortCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*GatewayPortClient) Query ¶
func (c *GatewayPortClient) Query() *GatewayPortQuery
Query returns a query builder for GatewayPort.
func (*GatewayPortClient) Update ¶
func (c *GatewayPortClient) Update() *GatewayPortUpdate
Update returns an update builder for GatewayPort.
func (*GatewayPortClient) UpdateOne ¶
func (c *GatewayPortClient) UpdateOne(_m *GatewayPort) *GatewayPortUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GatewayPortClient) UpdateOneID ¶
func (c *GatewayPortClient) UpdateOneID(id uuid.UUID) *GatewayPortUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GatewayPortClient) Use ¶
func (c *GatewayPortClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gatewayport.Hooks(f(g(h())))`.
type GatewayPortCreate ¶
type GatewayPortCreate struct {
// contains filtered or unexported fields
}
GatewayPortCreate is the builder for creating a GatewayPort entity.
func (*GatewayPortCreate) Exec ¶
func (_c *GatewayPortCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GatewayPortCreate) ExecX ¶
func (_c *GatewayPortCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GatewayPortCreate) Mutation ¶
func (_c *GatewayPortCreate) Mutation() *GatewayPortMutation
Mutation returns the GatewayPortMutation object of the builder.
func (*GatewayPortCreate) Save ¶
func (_c *GatewayPortCreate) Save(ctx context.Context) (*GatewayPort, error)
Save creates the GatewayPort in the database.
func (*GatewayPortCreate) SaveX ¶
func (_c *GatewayPortCreate) SaveX(ctx context.Context) *GatewayPort
SaveX calls Save and panics if Save returns an error.
func (*GatewayPortCreate) SetFkGatewayID ¶
func (_c *GatewayPortCreate) SetFkGatewayID(v uuid.UUID) *GatewayPortCreate
SetFkGatewayID sets the "fk_gateway_id" field.
func (*GatewayPortCreate) SetID ¶
func (_c *GatewayPortCreate) SetID(v uuid.UUID) *GatewayPortCreate
SetID sets the "id" field.
func (*GatewayPortCreate) SetIsPublic ¶
func (_c *GatewayPortCreate) SetIsPublic(v bool) *GatewayPortCreate
SetIsPublic sets the "is_public" field.
func (*GatewayPortCreate) SetIsUse ¶
func (_c *GatewayPortCreate) SetIsUse(v bool) *GatewayPortCreate
SetIsUse sets the "is_use" field.
func (*GatewayPortCreate) SetNillableID ¶
func (_c *GatewayPortCreate) SetNillableID(v *uuid.UUID) *GatewayPortCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*GatewayPortCreate) SetNillableIsPublic ¶
func (_c *GatewayPortCreate) SetNillableIsPublic(v *bool) *GatewayPortCreate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*GatewayPortCreate) SetNillableIsUse ¶
func (_c *GatewayPortCreate) SetNillableIsUse(v *bool) *GatewayPortCreate
SetNillableIsUse sets the "is_use" field if the given value is not nil.
func (*GatewayPortCreate) SetPort ¶
func (_c *GatewayPortCreate) SetPort(v int32) *GatewayPortCreate
SetPort sets the "port" field.
type GatewayPortCreateBulk ¶
type GatewayPortCreateBulk struct {
// contains filtered or unexported fields
}
GatewayPortCreateBulk is the builder for creating many GatewayPort entities in bulk.
func (*GatewayPortCreateBulk) Exec ¶
func (_c *GatewayPortCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GatewayPortCreateBulk) ExecX ¶
func (_c *GatewayPortCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GatewayPortCreateBulk) Save ¶
func (_c *GatewayPortCreateBulk) Save(ctx context.Context) ([]*GatewayPort, error)
Save creates the GatewayPort entities in the database.
func (*GatewayPortCreateBulk) SaveX ¶
func (_c *GatewayPortCreateBulk) SaveX(ctx context.Context) []*GatewayPort
SaveX is like Save, but panics if an error occurs.
type GatewayPortDelete ¶
type GatewayPortDelete struct {
// contains filtered or unexported fields
}
GatewayPortDelete is the builder for deleting a GatewayPort entity.
func (*GatewayPortDelete) Exec ¶
func (_d *GatewayPortDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GatewayPortDelete) ExecX ¶
func (_d *GatewayPortDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GatewayPortDelete) Where ¶
func (_d *GatewayPortDelete) Where(ps ...predicate.GatewayPort) *GatewayPortDelete
Where appends a list predicates to the GatewayPortDelete builder.
type GatewayPortDeleteOne ¶
type GatewayPortDeleteOne struct {
// contains filtered or unexported fields
}
GatewayPortDeleteOne is the builder for deleting a single GatewayPort entity.
func (*GatewayPortDeleteOne) Exec ¶
func (_d *GatewayPortDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GatewayPortDeleteOne) ExecX ¶
func (_d *GatewayPortDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GatewayPortDeleteOne) Where ¶
func (_d *GatewayPortDeleteOne) Where(ps ...predicate.GatewayPort) *GatewayPortDeleteOne
Where appends a list predicates to the GatewayPortDelete builder.
type GatewayPortGroupBy ¶
type GatewayPortGroupBy struct {
// contains filtered or unexported fields
}
GatewayPortGroupBy is the group-by builder for GatewayPort entities.
func (*GatewayPortGroupBy) Aggregate ¶
func (_g *GatewayPortGroupBy) Aggregate(fns ...AggregateFunc) *GatewayPortGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GatewayPortGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GatewayPortGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GatewayPortGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GatewayPortGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GatewayPortGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GatewayPortGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GatewayPortGroupBy) Scan ¶
func (_g *GatewayPortGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GatewayPortGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GatewayPortMutation ¶
type GatewayPortMutation struct {
// contains filtered or unexported fields
}
GatewayPortMutation represents an operation that mutates the GatewayPort nodes in the graph.
func (*GatewayPortMutation) AddField ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) AddPort ¶
func (m *GatewayPortMutation) AddPort(i int32)
AddPort adds i to the "port" field.
func (*GatewayPortMutation) AddedEdges ¶
func (m *GatewayPortMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GatewayPortMutation) AddedField ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) AddedFields ¶
func (m *GatewayPortMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GatewayPortMutation) AddedIDs ¶
func (m *GatewayPortMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GatewayPortMutation) AddedPort ¶
func (m *GatewayPortMutation) AddedPort() (r int32, exists bool)
AddedPort returns the value that was added to the "port" field in this mutation.
func (*GatewayPortMutation) ClearEdge ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) ClearField ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) ClearedEdges ¶
func (m *GatewayPortMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GatewayPortMutation) ClearedFields ¶
func (m *GatewayPortMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GatewayPortMutation) Client ¶
func (m GatewayPortMutation) 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 (*GatewayPortMutation) EdgeCleared ¶
func (m *GatewayPortMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GatewayPortMutation) Field ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) FieldCleared ¶
func (m *GatewayPortMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GatewayPortMutation) Fields ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) FkGatewayID ¶
func (m *GatewayPortMutation) FkGatewayID() (r uuid.UUID, exists bool)
FkGatewayID returns the value of the "fk_gateway_id" field in the mutation.
func (*GatewayPortMutation) ID ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) 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 (*GatewayPortMutation) IsPublic ¶
func (m *GatewayPortMutation) IsPublic() (r bool, exists bool)
IsPublic returns the value of the "is_public" field in the mutation.
func (*GatewayPortMutation) IsUse ¶
func (m *GatewayPortMutation) IsUse() (r bool, exists bool)
IsUse returns the value of the "is_use" field in the mutation.
func (*GatewayPortMutation) 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 (*GatewayPortMutation) OldFkGatewayID ¶
OldFkGatewayID returns the old "fk_gateway_id" field's value of the GatewayPort entity. If the GatewayPort 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 (*GatewayPortMutation) OldIsPublic ¶
func (m *GatewayPortMutation) OldIsPublic(ctx context.Context) (v bool, err error)
OldIsPublic returns the old "is_public" field's value of the GatewayPort entity. If the GatewayPort 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 (*GatewayPortMutation) OldIsUse ¶
func (m *GatewayPortMutation) OldIsUse(ctx context.Context) (v bool, err error)
OldIsUse returns the old "is_use" field's value of the GatewayPort entity. If the GatewayPort 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 (*GatewayPortMutation) OldPort ¶
func (m *GatewayPortMutation) OldPort(ctx context.Context) (v int32, err error)
OldPort returns the old "port" field's value of the GatewayPort entity. If the GatewayPort 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 (*GatewayPortMutation) Op ¶
func (m *GatewayPortMutation) Op() Op
Op returns the operation name.
func (*GatewayPortMutation) Port ¶
func (m *GatewayPortMutation) Port() (r int32, exists bool)
Port returns the value of the "port" field in the mutation.
func (*GatewayPortMutation) RemovedEdges ¶
func (m *GatewayPortMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GatewayPortMutation) RemovedIDs ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) ResetEdge ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) ResetField ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) ResetFkGatewayID ¶
func (m *GatewayPortMutation) ResetFkGatewayID()
ResetFkGatewayID resets all changes to the "fk_gateway_id" field.
func (*GatewayPortMutation) ResetIsPublic ¶
func (m *GatewayPortMutation) ResetIsPublic()
ResetIsPublic resets all changes to the "is_public" field.
func (*GatewayPortMutation) ResetIsUse ¶
func (m *GatewayPortMutation) ResetIsUse()
ResetIsUse resets all changes to the "is_use" field.
func (*GatewayPortMutation) ResetPort ¶
func (m *GatewayPortMutation) ResetPort()
ResetPort resets all changes to the "port" field.
func (*GatewayPortMutation) SetField ¶
func (m *GatewayPortMutation) 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 (*GatewayPortMutation) SetFkGatewayID ¶
func (m *GatewayPortMutation) SetFkGatewayID(u uuid.UUID)
SetFkGatewayID sets the "fk_gateway_id" field.
func (*GatewayPortMutation) SetID ¶
func (m *GatewayPortMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GatewayPort entities.
func (*GatewayPortMutation) SetIsPublic ¶
func (m *GatewayPortMutation) SetIsPublic(b bool)
SetIsPublic sets the "is_public" field.
func (*GatewayPortMutation) SetIsUse ¶
func (m *GatewayPortMutation) SetIsUse(b bool)
SetIsUse sets the "is_use" field.
func (*GatewayPortMutation) SetOp ¶
func (m *GatewayPortMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GatewayPortMutation) SetPort ¶
func (m *GatewayPortMutation) SetPort(i int32)
SetPort sets the "port" field.
func (GatewayPortMutation) Tx ¶
func (m GatewayPortMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GatewayPortMutation) Type ¶
func (m *GatewayPortMutation) Type() string
Type returns the node type of this mutation (GatewayPort).
func (*GatewayPortMutation) Where ¶
func (m *GatewayPortMutation) Where(ps ...predicate.GatewayPort)
Where appends a list predicates to the GatewayPortMutation builder.
func (*GatewayPortMutation) WhereP ¶
func (m *GatewayPortMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GatewayPortMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GatewayPortQuery ¶
type GatewayPortQuery struct {
// contains filtered or unexported fields
}
GatewayPortQuery is the builder for querying GatewayPort entities.
func (*GatewayPortQuery) Aggregate ¶
func (_q *GatewayPortQuery) Aggregate(fns ...AggregateFunc) *GatewayPortSelect
Aggregate returns a GatewayPortSelect configured with the given aggregations.
func (*GatewayPortQuery) All ¶
func (_q *GatewayPortQuery) All(ctx context.Context) ([]*GatewayPort, error)
All executes the query and returns a list of GatewayPorts.
func (*GatewayPortQuery) AllX ¶
func (_q *GatewayPortQuery) AllX(ctx context.Context) []*GatewayPort
AllX is like All, but panics if an error occurs.
func (*GatewayPortQuery) Clone ¶
func (_q *GatewayPortQuery) Clone() *GatewayPortQuery
Clone returns a duplicate of the GatewayPortQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GatewayPortQuery) Count ¶
func (_q *GatewayPortQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GatewayPortQuery) CountX ¶
func (_q *GatewayPortQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GatewayPortQuery) Exist ¶
func (_q *GatewayPortQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GatewayPortQuery) ExistX ¶
func (_q *GatewayPortQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GatewayPortQuery) First ¶
func (_q *GatewayPortQuery) First(ctx context.Context) (*GatewayPort, error)
First returns the first GatewayPort entity from the query. Returns a *NotFoundError when no GatewayPort was found.
func (*GatewayPortQuery) FirstID ¶
FirstID returns the first GatewayPort ID from the query. Returns a *NotFoundError when no GatewayPort ID was found.
func (*GatewayPortQuery) FirstIDX ¶
func (_q *GatewayPortQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*GatewayPortQuery) FirstX ¶
func (_q *GatewayPortQuery) FirstX(ctx context.Context) *GatewayPort
FirstX is like First, but panics if an error occurs.
func (*GatewayPortQuery) GroupBy ¶
func (_q *GatewayPortQuery) GroupBy(field string, fields ...string) *GatewayPortGroupBy
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 {
FkGatewayID uuid.UUID `json:"fk_gateway_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.GatewayPort.Query().
GroupBy(gatewayport.FieldFkGatewayID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*GatewayPortQuery) IDsX ¶
func (_q *GatewayPortQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*GatewayPortQuery) Limit ¶
func (_q *GatewayPortQuery) Limit(limit int) *GatewayPortQuery
Limit the number of records to be returned by this query.
func (*GatewayPortQuery) Offset ¶
func (_q *GatewayPortQuery) Offset(offset int) *GatewayPortQuery
Offset to start from.
func (*GatewayPortQuery) Only ¶
func (_q *GatewayPortQuery) Only(ctx context.Context) (*GatewayPort, error)
Only returns a single GatewayPort entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GatewayPort entity is found. Returns a *NotFoundError when no GatewayPort entities are found.
func (*GatewayPortQuery) OnlyID ¶
OnlyID is like Only, but returns the only GatewayPort ID in the query. Returns a *NotSingularError when more than one GatewayPort ID is found. Returns a *NotFoundError when no entities are found.
func (*GatewayPortQuery) OnlyIDX ¶
func (_q *GatewayPortQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GatewayPortQuery) OnlyX ¶
func (_q *GatewayPortQuery) OnlyX(ctx context.Context) *GatewayPort
OnlyX is like Only, but panics if an error occurs.
func (*GatewayPortQuery) Order ¶
func (_q *GatewayPortQuery) Order(o ...gatewayport.OrderOption) *GatewayPortQuery
Order specifies how the records should be ordered.
func (*GatewayPortQuery) Select ¶
func (_q *GatewayPortQuery) Select(fields ...string) *GatewayPortSelect
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 {
FkGatewayID uuid.UUID `json:"fk_gateway_id,omitempty"`
}
client.GatewayPort.Query().
Select(gatewayport.FieldFkGatewayID).
Scan(ctx, &v)
func (*GatewayPortQuery) Unique ¶
func (_q *GatewayPortQuery) Unique(unique bool) *GatewayPortQuery
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 (*GatewayPortQuery) Where ¶
func (_q *GatewayPortQuery) Where(ps ...predicate.GatewayPort) *GatewayPortQuery
Where adds a new predicate for the GatewayPortQuery builder.
type GatewayPortSelect ¶
type GatewayPortSelect struct {
*GatewayPortQuery
// contains filtered or unexported fields
}
GatewayPortSelect is the builder for selecting fields of GatewayPort entities.
func (*GatewayPortSelect) Aggregate ¶
func (_s *GatewayPortSelect) Aggregate(fns ...AggregateFunc) *GatewayPortSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GatewayPortSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GatewayPortSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GatewayPortSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GatewayPortSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GatewayPortSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GatewayPortSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GatewayPortSelect) Scan ¶
func (_s *GatewayPortSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GatewayPortSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GatewayPortUpdate ¶
type GatewayPortUpdate struct {
// contains filtered or unexported fields
}
GatewayPortUpdate is the builder for updating GatewayPort entities.
func (*GatewayPortUpdate) AddPort ¶
func (_u *GatewayPortUpdate) AddPort(v int32) *GatewayPortUpdate
AddPort adds value to the "port" field.
func (*GatewayPortUpdate) Exec ¶
func (_u *GatewayPortUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GatewayPortUpdate) ExecX ¶
func (_u *GatewayPortUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GatewayPortUpdate) Mutation ¶
func (_u *GatewayPortUpdate) Mutation() *GatewayPortMutation
Mutation returns the GatewayPortMutation object of the builder.
func (*GatewayPortUpdate) Save ¶
func (_u *GatewayPortUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GatewayPortUpdate) SaveX ¶
func (_u *GatewayPortUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GatewayPortUpdate) SetFkGatewayID ¶
func (_u *GatewayPortUpdate) SetFkGatewayID(v uuid.UUID) *GatewayPortUpdate
SetFkGatewayID sets the "fk_gateway_id" field.
func (*GatewayPortUpdate) SetIsPublic ¶
func (_u *GatewayPortUpdate) SetIsPublic(v bool) *GatewayPortUpdate
SetIsPublic sets the "is_public" field.
func (*GatewayPortUpdate) SetIsUse ¶
func (_u *GatewayPortUpdate) SetIsUse(v bool) *GatewayPortUpdate
SetIsUse sets the "is_use" field.
func (*GatewayPortUpdate) SetNillableFkGatewayID ¶
func (_u *GatewayPortUpdate) SetNillableFkGatewayID(v *uuid.UUID) *GatewayPortUpdate
SetNillableFkGatewayID sets the "fk_gateway_id" field if the given value is not nil.
func (*GatewayPortUpdate) SetNillableIsPublic ¶
func (_u *GatewayPortUpdate) SetNillableIsPublic(v *bool) *GatewayPortUpdate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*GatewayPortUpdate) SetNillableIsUse ¶
func (_u *GatewayPortUpdate) SetNillableIsUse(v *bool) *GatewayPortUpdate
SetNillableIsUse sets the "is_use" field if the given value is not nil.
func (*GatewayPortUpdate) SetNillablePort ¶
func (_u *GatewayPortUpdate) SetNillablePort(v *int32) *GatewayPortUpdate
SetNillablePort sets the "port" field if the given value is not nil.
func (*GatewayPortUpdate) SetPort ¶
func (_u *GatewayPortUpdate) SetPort(v int32) *GatewayPortUpdate
SetPort sets the "port" field.
func (*GatewayPortUpdate) Where ¶
func (_u *GatewayPortUpdate) Where(ps ...predicate.GatewayPort) *GatewayPortUpdate
Where appends a list predicates to the GatewayPortUpdate builder.
type GatewayPortUpdateOne ¶
type GatewayPortUpdateOne struct {
// contains filtered or unexported fields
}
GatewayPortUpdateOne is the builder for updating a single GatewayPort entity.
func (*GatewayPortUpdateOne) AddPort ¶
func (_u *GatewayPortUpdateOne) AddPort(v int32) *GatewayPortUpdateOne
AddPort adds value to the "port" field.
func (*GatewayPortUpdateOne) Exec ¶
func (_u *GatewayPortUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GatewayPortUpdateOne) ExecX ¶
func (_u *GatewayPortUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GatewayPortUpdateOne) Mutation ¶
func (_u *GatewayPortUpdateOne) Mutation() *GatewayPortMutation
Mutation returns the GatewayPortMutation object of the builder.
func (*GatewayPortUpdateOne) Save ¶
func (_u *GatewayPortUpdateOne) Save(ctx context.Context) (*GatewayPort, error)
Save executes the query and returns the updated GatewayPort entity.
func (*GatewayPortUpdateOne) SaveX ¶
func (_u *GatewayPortUpdateOne) SaveX(ctx context.Context) *GatewayPort
SaveX is like Save, but panics if an error occurs.
func (*GatewayPortUpdateOne) Select ¶
func (_u *GatewayPortUpdateOne) Select(field string, fields ...string) *GatewayPortUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GatewayPortUpdateOne) SetFkGatewayID ¶
func (_u *GatewayPortUpdateOne) SetFkGatewayID(v uuid.UUID) *GatewayPortUpdateOne
SetFkGatewayID sets the "fk_gateway_id" field.
func (*GatewayPortUpdateOne) SetIsPublic ¶
func (_u *GatewayPortUpdateOne) SetIsPublic(v bool) *GatewayPortUpdateOne
SetIsPublic sets the "is_public" field.
func (*GatewayPortUpdateOne) SetIsUse ¶
func (_u *GatewayPortUpdateOne) SetIsUse(v bool) *GatewayPortUpdateOne
SetIsUse sets the "is_use" field.
func (*GatewayPortUpdateOne) SetNillableFkGatewayID ¶
func (_u *GatewayPortUpdateOne) SetNillableFkGatewayID(v *uuid.UUID) *GatewayPortUpdateOne
SetNillableFkGatewayID sets the "fk_gateway_id" field if the given value is not nil.
func (*GatewayPortUpdateOne) SetNillableIsPublic ¶
func (_u *GatewayPortUpdateOne) SetNillableIsPublic(v *bool) *GatewayPortUpdateOne
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*GatewayPortUpdateOne) SetNillableIsUse ¶
func (_u *GatewayPortUpdateOne) SetNillableIsUse(v *bool) *GatewayPortUpdateOne
SetNillableIsUse sets the "is_use" field if the given value is not nil.
func (*GatewayPortUpdateOne) SetNillablePort ¶
func (_u *GatewayPortUpdateOne) SetNillablePort(v *int32) *GatewayPortUpdateOne
SetNillablePort sets the "port" field if the given value is not nil.
func (*GatewayPortUpdateOne) SetPort ¶
func (_u *GatewayPortUpdateOne) SetPort(v int32) *GatewayPortUpdateOne
SetPort sets the "port" field.
func (*GatewayPortUpdateOne) Where ¶
func (_u *GatewayPortUpdateOne) Where(ps ...predicate.GatewayPort) *GatewayPortUpdateOne
Where appends a list predicates to the GatewayPortUpdate builder.
type GatewayPorts ¶
type GatewayPorts []*GatewayPort
GatewayPorts is a parsable slice of GatewayPort.
type GatewayQuery ¶
type GatewayQuery struct {
// contains filtered or unexported fields
}
GatewayQuery is the builder for querying Gateway entities.
func (*GatewayQuery) Aggregate ¶
func (_q *GatewayQuery) Aggregate(fns ...AggregateFunc) *GatewaySelect
Aggregate returns a GatewaySelect configured with the given aggregations.
func (*GatewayQuery) All ¶
func (_q *GatewayQuery) All(ctx context.Context) ([]*Gateway, error)
All executes the query and returns a list of Gateways.
func (*GatewayQuery) AllX ¶
func (_q *GatewayQuery) AllX(ctx context.Context) []*Gateway
AllX is like All, but panics if an error occurs.
func (*GatewayQuery) Clone ¶
func (_q *GatewayQuery) Clone() *GatewayQuery
Clone returns a duplicate of the GatewayQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GatewayQuery) Count ¶
func (_q *GatewayQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GatewayQuery) CountX ¶
func (_q *GatewayQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GatewayQuery) Exist ¶
func (_q *GatewayQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GatewayQuery) ExistX ¶
func (_q *GatewayQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GatewayQuery) First ¶
func (_q *GatewayQuery) First(ctx context.Context) (*Gateway, error)
First returns the first Gateway entity from the query. Returns a *NotFoundError when no Gateway was found.
func (*GatewayQuery) FirstID ¶
FirstID returns the first Gateway ID from the query. Returns a *NotFoundError when no Gateway ID was found.
func (*GatewayQuery) FirstIDX ¶
func (_q *GatewayQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*GatewayQuery) FirstX ¶
func (_q *GatewayQuery) FirstX(ctx context.Context) *Gateway
FirstX is like First, but panics if an error occurs.
func (*GatewayQuery) GroupBy ¶
func (_q *GatewayQuery) GroupBy(field string, fields ...string) *GatewayGroupBy
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.Gateway.Query().
GroupBy(gateway.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*GatewayQuery) IDsX ¶
func (_q *GatewayQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*GatewayQuery) Limit ¶
func (_q *GatewayQuery) Limit(limit int) *GatewayQuery
Limit the number of records to be returned by this query.
func (*GatewayQuery) Offset ¶
func (_q *GatewayQuery) Offset(offset int) *GatewayQuery
Offset to start from.
func (*GatewayQuery) Only ¶
func (_q *GatewayQuery) Only(ctx context.Context) (*Gateway, error)
Only returns a single Gateway entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Gateway entity is found. Returns a *NotFoundError when no Gateway entities are found.
func (*GatewayQuery) OnlyID ¶
OnlyID is like Only, but returns the only Gateway ID in the query. Returns a *NotSingularError when more than one Gateway ID is found. Returns a *NotFoundError when no entities are found.
func (*GatewayQuery) OnlyIDX ¶
func (_q *GatewayQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GatewayQuery) OnlyX ¶
func (_q *GatewayQuery) OnlyX(ctx context.Context) *Gateway
OnlyX is like Only, but panics if an error occurs.
func (*GatewayQuery) Order ¶
func (_q *GatewayQuery) Order(o ...gateway.OrderOption) *GatewayQuery
Order specifies how the records should be ordered.
func (*GatewayQuery) Select ¶
func (_q *GatewayQuery) Select(fields ...string) *GatewaySelect
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.Gateway.Query().
Select(gateway.FieldName).
Scan(ctx, &v)
func (*GatewayQuery) Unique ¶
func (_q *GatewayQuery) Unique(unique bool) *GatewayQuery
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 (*GatewayQuery) Where ¶
func (_q *GatewayQuery) Where(ps ...predicate.Gateway) *GatewayQuery
Where adds a new predicate for the GatewayQuery builder.
type GatewaySelect ¶
type GatewaySelect struct {
*GatewayQuery
// contains filtered or unexported fields
}
GatewaySelect is the builder for selecting fields of Gateway entities.
func (*GatewaySelect) Aggregate ¶
func (_s *GatewaySelect) Aggregate(fns ...AggregateFunc) *GatewaySelect
Aggregate adds the given aggregation functions to the selector query.
func (*GatewaySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GatewaySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GatewaySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GatewaySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GatewaySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GatewaySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GatewaySelect) Scan ¶
func (_s *GatewaySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GatewaySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GatewayUpdate ¶
type GatewayUpdate struct {
// contains filtered or unexported fields
}
GatewayUpdate is the builder for updating Gateway entities.
func (*GatewayUpdate) AddPort ¶
func (_u *GatewayUpdate) AddPort(v int32) *GatewayUpdate
AddPort adds value to the "port" field.
func (*GatewayUpdate) Exec ¶
func (_u *GatewayUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GatewayUpdate) ExecX ¶
func (_u *GatewayUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GatewayUpdate) Mutation ¶
func (_u *GatewayUpdate) Mutation() *GatewayMutation
Mutation returns the GatewayMutation object of the builder.
func (*GatewayUpdate) Save ¶
func (_u *GatewayUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GatewayUpdate) SaveX ¶
func (_u *GatewayUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GatewayUpdate) SetAuthToken ¶ added in v0.0.12
func (_u *GatewayUpdate) SetAuthToken(v string) *GatewayUpdate
SetAuthToken sets the "auth_token" field.
func (*GatewayUpdate) SetIP ¶
func (_u *GatewayUpdate) SetIP(v string) *GatewayUpdate
SetIP sets the "ip" field.
func (*GatewayUpdate) SetInternalIP ¶
func (_u *GatewayUpdate) SetInternalIP(v string) *GatewayUpdate
SetInternalIP sets the "internal_ip" field.
func (*GatewayUpdate) SetName ¶
func (_u *GatewayUpdate) SetName(v string) *GatewayUpdate
SetName sets the "name" field.
func (*GatewayUpdate) SetNillableAuthToken ¶ added in v0.0.12
func (_u *GatewayUpdate) SetNillableAuthToken(v *string) *GatewayUpdate
SetNillableAuthToken sets the "auth_token" field if the given value is not nil.
func (*GatewayUpdate) SetNillableIP ¶
func (_u *GatewayUpdate) SetNillableIP(v *string) *GatewayUpdate
SetNillableIP sets the "ip" field if the given value is not nil.
func (*GatewayUpdate) SetNillableInternalIP ¶
func (_u *GatewayUpdate) SetNillableInternalIP(v *string) *GatewayUpdate
SetNillableInternalIP sets the "internal_ip" field if the given value is not nil.
func (*GatewayUpdate) SetNillableName ¶
func (_u *GatewayUpdate) SetNillableName(v *string) *GatewayUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*GatewayUpdate) SetNillablePort ¶
func (_u *GatewayUpdate) SetNillablePort(v *int32) *GatewayUpdate
SetNillablePort sets the "port" field if the given value is not nil.
func (*GatewayUpdate) SetPort ¶
func (_u *GatewayUpdate) SetPort(v int32) *GatewayUpdate
SetPort sets the "port" field.
func (*GatewayUpdate) Where ¶
func (_u *GatewayUpdate) Where(ps ...predicate.Gateway) *GatewayUpdate
Where appends a list predicates to the GatewayUpdate builder.
type GatewayUpdateOne ¶
type GatewayUpdateOne struct {
// contains filtered or unexported fields
}
GatewayUpdateOne is the builder for updating a single Gateway entity.
func (*GatewayUpdateOne) AddPort ¶
func (_u *GatewayUpdateOne) AddPort(v int32) *GatewayUpdateOne
AddPort adds value to the "port" field.
func (*GatewayUpdateOne) Exec ¶
func (_u *GatewayUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GatewayUpdateOne) ExecX ¶
func (_u *GatewayUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GatewayUpdateOne) Mutation ¶
func (_u *GatewayUpdateOne) Mutation() *GatewayMutation
Mutation returns the GatewayMutation object of the builder.
func (*GatewayUpdateOne) Save ¶
func (_u *GatewayUpdateOne) Save(ctx context.Context) (*Gateway, error)
Save executes the query and returns the updated Gateway entity.
func (*GatewayUpdateOne) SaveX ¶
func (_u *GatewayUpdateOne) SaveX(ctx context.Context) *Gateway
SaveX is like Save, but panics if an error occurs.
func (*GatewayUpdateOne) Select ¶
func (_u *GatewayUpdateOne) Select(field string, fields ...string) *GatewayUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GatewayUpdateOne) SetAuthToken ¶ added in v0.0.12
func (_u *GatewayUpdateOne) SetAuthToken(v string) *GatewayUpdateOne
SetAuthToken sets the "auth_token" field.
func (*GatewayUpdateOne) SetIP ¶
func (_u *GatewayUpdateOne) SetIP(v string) *GatewayUpdateOne
SetIP sets the "ip" field.
func (*GatewayUpdateOne) SetInternalIP ¶
func (_u *GatewayUpdateOne) SetInternalIP(v string) *GatewayUpdateOne
SetInternalIP sets the "internal_ip" field.
func (*GatewayUpdateOne) SetName ¶
func (_u *GatewayUpdateOne) SetName(v string) *GatewayUpdateOne
SetName sets the "name" field.
func (*GatewayUpdateOne) SetNillableAuthToken ¶ added in v0.0.12
func (_u *GatewayUpdateOne) SetNillableAuthToken(v *string) *GatewayUpdateOne
SetNillableAuthToken sets the "auth_token" field if the given value is not nil.
func (*GatewayUpdateOne) SetNillableIP ¶
func (_u *GatewayUpdateOne) SetNillableIP(v *string) *GatewayUpdateOne
SetNillableIP sets the "ip" field if the given value is not nil.
func (*GatewayUpdateOne) SetNillableInternalIP ¶
func (_u *GatewayUpdateOne) SetNillableInternalIP(v *string) *GatewayUpdateOne
SetNillableInternalIP sets the "internal_ip" field if the given value is not nil.
func (*GatewayUpdateOne) SetNillableName ¶
func (_u *GatewayUpdateOne) SetNillableName(v *string) *GatewayUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*GatewayUpdateOne) SetNillablePort ¶
func (_u *GatewayUpdateOne) SetNillablePort(v *int32) *GatewayUpdateOne
SetNillablePort sets the "port" field if the given value is not nil.
func (*GatewayUpdateOne) SetPort ¶
func (_u *GatewayUpdateOne) SetPort(v int32) *GatewayUpdateOne
SetPort sets the "port" field.
func (*GatewayUpdateOne) Where ¶
func (_u *GatewayUpdateOne) Where(ps ...predicate.Gateway) *GatewayUpdateOne
Where appends a list predicates to the GatewayUpdate 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 NetworkMapping ¶
type NetworkMapping struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Protocol holds the value of the "protocol" field.
Protocol string `json:"protocol,omitempty"`
// gateway id
FkGatewayID uuid.UUID `json:"fk_gateway_id,omitempty"`
// 映射到网关的端口号
GatewayPort int32 `json:"gateway_port,omitempty"`
// 网关ip
GatewayIP string `json:"gateway_ip,omitempty"`
// 需要映射的虚拟机端口号
ComputerPort int32 `json:"computer_port,omitempty"`
// 0 待开始 1 进行中 2 已完成, 3 失败
Status int `json:"status,omitempty"`
// 虚拟机实例ID
FkComputerID uuid.UUID `json:"fk_computer_id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// 删除状态
DeleteState bool `json:"delete_state,omitempty"`
// 创建时间
CreateTime time.Time `json:"create_time,omitempty"`
// contains filtered or unexported fields
}
NetworkMapping is the model entity for the NetworkMapping schema.
func (*NetworkMapping) String ¶
func (_m *NetworkMapping) String() string
String implements the fmt.Stringer.
func (*NetworkMapping) Unwrap ¶
func (_m *NetworkMapping) Unwrap() *NetworkMapping
Unwrap unwraps the NetworkMapping 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 (*NetworkMapping) Update ¶
func (_m *NetworkMapping) Update() *NetworkMappingUpdateOne
Update returns a builder for updating this NetworkMapping. Note that you need to call NetworkMapping.Unwrap() before calling this method if this NetworkMapping was returned from a transaction, and the transaction was committed or rolled back.
type NetworkMappingClient ¶
type NetworkMappingClient struct {
// contains filtered or unexported fields
}
NetworkMappingClient is a client for the NetworkMapping schema.
func NewNetworkMappingClient ¶
func NewNetworkMappingClient(c config) *NetworkMappingClient
NewNetworkMappingClient returns a client for the NetworkMapping from the given config.
func (*NetworkMappingClient) Create ¶
func (c *NetworkMappingClient) Create() *NetworkMappingCreate
Create returns a builder for creating a NetworkMapping entity.
func (*NetworkMappingClient) CreateBulk ¶
func (c *NetworkMappingClient) CreateBulk(builders ...*NetworkMappingCreate) *NetworkMappingCreateBulk
CreateBulk returns a builder for creating a bulk of NetworkMapping entities.
func (*NetworkMappingClient) Delete ¶
func (c *NetworkMappingClient) Delete() *NetworkMappingDelete
Delete returns a delete builder for NetworkMapping.
func (*NetworkMappingClient) DeleteOne ¶
func (c *NetworkMappingClient) DeleteOne(_m *NetworkMapping) *NetworkMappingDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NetworkMappingClient) DeleteOneID ¶
func (c *NetworkMappingClient) DeleteOneID(id uuid.UUID) *NetworkMappingDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NetworkMappingClient) Get ¶
func (c *NetworkMappingClient) Get(ctx context.Context, id uuid.UUID) (*NetworkMapping, error)
Get returns a NetworkMapping entity by its id.
func (*NetworkMappingClient) GetX ¶
func (c *NetworkMappingClient) GetX(ctx context.Context, id uuid.UUID) *NetworkMapping
GetX is like Get, but panics if an error occurs.
func (*NetworkMappingClient) Hooks ¶
func (c *NetworkMappingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NetworkMappingClient) Intercept ¶
func (c *NetworkMappingClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `networkmapping.Intercept(f(g(h())))`.
func (*NetworkMappingClient) Interceptors ¶
func (c *NetworkMappingClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NetworkMappingClient) MapCreateBulk ¶
func (c *NetworkMappingClient) MapCreateBulk(slice any, setFunc func(*NetworkMappingCreate, int)) *NetworkMappingCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*NetworkMappingClient) Query ¶
func (c *NetworkMappingClient) Query() *NetworkMappingQuery
Query returns a query builder for NetworkMapping.
func (*NetworkMappingClient) Update ¶
func (c *NetworkMappingClient) Update() *NetworkMappingUpdate
Update returns an update builder for NetworkMapping.
func (*NetworkMappingClient) UpdateOne ¶
func (c *NetworkMappingClient) UpdateOne(_m *NetworkMapping) *NetworkMappingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NetworkMappingClient) UpdateOneID ¶
func (c *NetworkMappingClient) UpdateOneID(id uuid.UUID) *NetworkMappingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NetworkMappingClient) Use ¶
func (c *NetworkMappingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `networkmapping.Hooks(f(g(h())))`.
type NetworkMappingCreate ¶
type NetworkMappingCreate struct {
// contains filtered or unexported fields
}
NetworkMappingCreate is the builder for creating a NetworkMapping entity.
func (*NetworkMappingCreate) Exec ¶
func (_c *NetworkMappingCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NetworkMappingCreate) ExecX ¶
func (_c *NetworkMappingCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetworkMappingCreate) Mutation ¶
func (_c *NetworkMappingCreate) Mutation() *NetworkMappingMutation
Mutation returns the NetworkMappingMutation object of the builder.
func (*NetworkMappingCreate) Save ¶
func (_c *NetworkMappingCreate) Save(ctx context.Context) (*NetworkMapping, error)
Save creates the NetworkMapping in the database.
func (*NetworkMappingCreate) SaveX ¶
func (_c *NetworkMappingCreate) SaveX(ctx context.Context) *NetworkMapping
SaveX calls Save and panics if Save returns an error.
func (*NetworkMappingCreate) SetComputerPort ¶
func (_c *NetworkMappingCreate) SetComputerPort(v int32) *NetworkMappingCreate
SetComputerPort sets the "computer_port" field.
func (*NetworkMappingCreate) SetCreateTime ¶
func (_c *NetworkMappingCreate) SetCreateTime(v time.Time) *NetworkMappingCreate
SetCreateTime sets the "create_time" field.
func (*NetworkMappingCreate) SetDeleteState ¶
func (_c *NetworkMappingCreate) SetDeleteState(v bool) *NetworkMappingCreate
SetDeleteState sets the "delete_state" field.
func (*NetworkMappingCreate) SetFkComputerID ¶
func (_c *NetworkMappingCreate) SetFkComputerID(v uuid.UUID) *NetworkMappingCreate
SetFkComputerID sets the "fk_computer_id" field.
func (*NetworkMappingCreate) SetFkGatewayID ¶
func (_c *NetworkMappingCreate) SetFkGatewayID(v uuid.UUID) *NetworkMappingCreate
SetFkGatewayID sets the "fk_gateway_id" field.
func (*NetworkMappingCreate) SetFkUserID ¶
func (_c *NetworkMappingCreate) SetFkUserID(v uuid.UUID) *NetworkMappingCreate
SetFkUserID sets the "fk_user_id" field.
func (*NetworkMappingCreate) SetGatewayIP ¶
func (_c *NetworkMappingCreate) SetGatewayIP(v string) *NetworkMappingCreate
SetGatewayIP sets the "gateway_ip" field.
func (*NetworkMappingCreate) SetGatewayPort ¶
func (_c *NetworkMappingCreate) SetGatewayPort(v int32) *NetworkMappingCreate
SetGatewayPort sets the "gateway_port" field.
func (*NetworkMappingCreate) SetID ¶
func (_c *NetworkMappingCreate) SetID(v uuid.UUID) *NetworkMappingCreate
SetID sets the "id" field.
func (*NetworkMappingCreate) SetName ¶
func (_c *NetworkMappingCreate) SetName(v string) *NetworkMappingCreate
SetName sets the "name" field.
func (*NetworkMappingCreate) SetNillableCreateTime ¶
func (_c *NetworkMappingCreate) SetNillableCreateTime(v *time.Time) *NetworkMappingCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*NetworkMappingCreate) SetNillableDeleteState ¶
func (_c *NetworkMappingCreate) SetNillableDeleteState(v *bool) *NetworkMappingCreate
SetNillableDeleteState sets the "delete_state" field if the given value is not nil.
func (*NetworkMappingCreate) SetNillableID ¶
func (_c *NetworkMappingCreate) SetNillableID(v *uuid.UUID) *NetworkMappingCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*NetworkMappingCreate) SetNillableProtocol ¶
func (_c *NetworkMappingCreate) SetNillableProtocol(v *string) *NetworkMappingCreate
SetNillableProtocol sets the "protocol" field if the given value is not nil.
func (*NetworkMappingCreate) SetNillableStatus ¶
func (_c *NetworkMappingCreate) SetNillableStatus(v *int) *NetworkMappingCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*NetworkMappingCreate) SetProtocol ¶
func (_c *NetworkMappingCreate) SetProtocol(v string) *NetworkMappingCreate
SetProtocol sets the "protocol" field.
func (*NetworkMappingCreate) SetStatus ¶
func (_c *NetworkMappingCreate) SetStatus(v int) *NetworkMappingCreate
SetStatus sets the "status" field.
type NetworkMappingCreateBulk ¶
type NetworkMappingCreateBulk struct {
// contains filtered or unexported fields
}
NetworkMappingCreateBulk is the builder for creating many NetworkMapping entities in bulk.
func (*NetworkMappingCreateBulk) Exec ¶
func (_c *NetworkMappingCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NetworkMappingCreateBulk) ExecX ¶
func (_c *NetworkMappingCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetworkMappingCreateBulk) Save ¶
func (_c *NetworkMappingCreateBulk) Save(ctx context.Context) ([]*NetworkMapping, error)
Save creates the NetworkMapping entities in the database.
func (*NetworkMappingCreateBulk) SaveX ¶
func (_c *NetworkMappingCreateBulk) SaveX(ctx context.Context) []*NetworkMapping
SaveX is like Save, but panics if an error occurs.
type NetworkMappingDelete ¶
type NetworkMappingDelete struct {
// contains filtered or unexported fields
}
NetworkMappingDelete is the builder for deleting a NetworkMapping entity.
func (*NetworkMappingDelete) Exec ¶
func (_d *NetworkMappingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NetworkMappingDelete) ExecX ¶
func (_d *NetworkMappingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NetworkMappingDelete) Where ¶
func (_d *NetworkMappingDelete) Where(ps ...predicate.NetworkMapping) *NetworkMappingDelete
Where appends a list predicates to the NetworkMappingDelete builder.
type NetworkMappingDeleteOne ¶
type NetworkMappingDeleteOne struct {
// contains filtered or unexported fields
}
NetworkMappingDeleteOne is the builder for deleting a single NetworkMapping entity.
func (*NetworkMappingDeleteOne) Exec ¶
func (_d *NetworkMappingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NetworkMappingDeleteOne) ExecX ¶
func (_d *NetworkMappingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetworkMappingDeleteOne) Where ¶
func (_d *NetworkMappingDeleteOne) Where(ps ...predicate.NetworkMapping) *NetworkMappingDeleteOne
Where appends a list predicates to the NetworkMappingDelete builder.
type NetworkMappingGroupBy ¶
type NetworkMappingGroupBy struct {
// contains filtered or unexported fields
}
NetworkMappingGroupBy is the group-by builder for NetworkMapping entities.
func (*NetworkMappingGroupBy) Aggregate ¶
func (_g *NetworkMappingGroupBy) Aggregate(fns ...AggregateFunc) *NetworkMappingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NetworkMappingGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NetworkMappingGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NetworkMappingGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NetworkMappingGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NetworkMappingGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*NetworkMappingGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NetworkMappingGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NetworkMappingGroupBy) Scan ¶
func (_g *NetworkMappingGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NetworkMappingGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NetworkMappingMutation ¶
type NetworkMappingMutation struct {
// contains filtered or unexported fields
}
NetworkMappingMutation represents an operation that mutates the NetworkMapping nodes in the graph.
func (*NetworkMappingMutation) AddComputerPort ¶
func (m *NetworkMappingMutation) AddComputerPort(i int32)
AddComputerPort adds i to the "computer_port" field.
func (*NetworkMappingMutation) AddField ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) AddGatewayPort ¶
func (m *NetworkMappingMutation) AddGatewayPort(i int32)
AddGatewayPort adds i to the "gateway_port" field.
func (*NetworkMappingMutation) AddStatus ¶
func (m *NetworkMappingMutation) AddStatus(i int)
AddStatus adds i to the "status" field.
func (*NetworkMappingMutation) AddedComputerPort ¶
func (m *NetworkMappingMutation) AddedComputerPort() (r int32, exists bool)
AddedComputerPort returns the value that was added to the "computer_port" field in this mutation.
func (*NetworkMappingMutation) AddedEdges ¶
func (m *NetworkMappingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NetworkMappingMutation) AddedField ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) AddedFields ¶
func (m *NetworkMappingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NetworkMappingMutation) AddedGatewayPort ¶
func (m *NetworkMappingMutation) AddedGatewayPort() (r int32, exists bool)
AddedGatewayPort returns the value that was added to the "gateway_port" field in this mutation.
func (*NetworkMappingMutation) AddedIDs ¶
func (m *NetworkMappingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NetworkMappingMutation) AddedStatus ¶
func (m *NetworkMappingMutation) AddedStatus() (r int, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*NetworkMappingMutation) ClearEdge ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) ClearField ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) ClearedEdges ¶
func (m *NetworkMappingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NetworkMappingMutation) ClearedFields ¶
func (m *NetworkMappingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NetworkMappingMutation) Client ¶
func (m NetworkMappingMutation) 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 (*NetworkMappingMutation) ComputerPort ¶
func (m *NetworkMappingMutation) ComputerPort() (r int32, exists bool)
ComputerPort returns the value of the "computer_port" field in the mutation.
func (*NetworkMappingMutation) CreateTime ¶
func (m *NetworkMappingMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*NetworkMappingMutation) DeleteState ¶
func (m *NetworkMappingMutation) DeleteState() (r bool, exists bool)
DeleteState returns the value of the "delete_state" field in the mutation.
func (*NetworkMappingMutation) EdgeCleared ¶
func (m *NetworkMappingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NetworkMappingMutation) Field ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) FieldCleared ¶
func (m *NetworkMappingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NetworkMappingMutation) Fields ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) FkComputerID ¶
func (m *NetworkMappingMutation) FkComputerID() (r uuid.UUID, exists bool)
FkComputerID returns the value of the "fk_computer_id" field in the mutation.
func (*NetworkMappingMutation) FkGatewayID ¶
func (m *NetworkMappingMutation) FkGatewayID() (r uuid.UUID, exists bool)
FkGatewayID returns the value of the "fk_gateway_id" field in the mutation.
func (*NetworkMappingMutation) FkUserID ¶
func (m *NetworkMappingMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*NetworkMappingMutation) GatewayIP ¶
func (m *NetworkMappingMutation) GatewayIP() (r string, exists bool)
GatewayIP returns the value of the "gateway_ip" field in the mutation.
func (*NetworkMappingMutation) GatewayPort ¶
func (m *NetworkMappingMutation) GatewayPort() (r int32, exists bool)
GatewayPort returns the value of the "gateway_port" field in the mutation.
func (*NetworkMappingMutation) ID ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) 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 (*NetworkMappingMutation) Name ¶
func (m *NetworkMappingMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*NetworkMappingMutation) OldComputerPort ¶
func (m *NetworkMappingMutation) OldComputerPort(ctx context.Context) (v int32, err error)
OldComputerPort returns the old "computer_port" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) OldDeleteState ¶
func (m *NetworkMappingMutation) OldDeleteState(ctx context.Context) (v bool, err error)
OldDeleteState returns the old "delete_state" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) 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 (*NetworkMappingMutation) OldFkComputerID ¶
OldFkComputerID returns the old "fk_computer_id" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) OldFkGatewayID ¶
OldFkGatewayID returns the old "fk_gateway_id" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) OldGatewayIP ¶
func (m *NetworkMappingMutation) OldGatewayIP(ctx context.Context) (v string, err error)
OldGatewayIP returns the old "gateway_ip" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) OldGatewayPort ¶
func (m *NetworkMappingMutation) OldGatewayPort(ctx context.Context) (v int32, err error)
OldGatewayPort returns the old "gateway_port" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) OldName ¶
func (m *NetworkMappingMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) OldProtocol ¶
func (m *NetworkMappingMutation) OldProtocol(ctx context.Context) (v string, err error)
OldProtocol returns the old "protocol" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) OldStatus ¶
func (m *NetworkMappingMutation) OldStatus(ctx context.Context) (v int, err error)
OldStatus returns the old "status" field's value of the NetworkMapping entity. If the NetworkMapping 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 (*NetworkMappingMutation) Op ¶
func (m *NetworkMappingMutation) Op() Op
Op returns the operation name.
func (*NetworkMappingMutation) Protocol ¶
func (m *NetworkMappingMutation) Protocol() (r string, exists bool)
Protocol returns the value of the "protocol" field in the mutation.
func (*NetworkMappingMutation) RemovedEdges ¶
func (m *NetworkMappingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NetworkMappingMutation) RemovedIDs ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) ResetComputerPort ¶
func (m *NetworkMappingMutation) ResetComputerPort()
ResetComputerPort resets all changes to the "computer_port" field.
func (*NetworkMappingMutation) ResetCreateTime ¶
func (m *NetworkMappingMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*NetworkMappingMutation) ResetDeleteState ¶
func (m *NetworkMappingMutation) ResetDeleteState()
ResetDeleteState resets all changes to the "delete_state" field.
func (*NetworkMappingMutation) ResetEdge ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) ResetField ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) ResetFkComputerID ¶
func (m *NetworkMappingMutation) ResetFkComputerID()
ResetFkComputerID resets all changes to the "fk_computer_id" field.
func (*NetworkMappingMutation) ResetFkGatewayID ¶
func (m *NetworkMappingMutation) ResetFkGatewayID()
ResetFkGatewayID resets all changes to the "fk_gateway_id" field.
func (*NetworkMappingMutation) ResetFkUserID ¶
func (m *NetworkMappingMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*NetworkMappingMutation) ResetGatewayIP ¶
func (m *NetworkMappingMutation) ResetGatewayIP()
ResetGatewayIP resets all changes to the "gateway_ip" field.
func (*NetworkMappingMutation) ResetGatewayPort ¶
func (m *NetworkMappingMutation) ResetGatewayPort()
ResetGatewayPort resets all changes to the "gateway_port" field.
func (*NetworkMappingMutation) ResetName ¶
func (m *NetworkMappingMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*NetworkMappingMutation) ResetProtocol ¶
func (m *NetworkMappingMutation) ResetProtocol()
ResetProtocol resets all changes to the "protocol" field.
func (*NetworkMappingMutation) ResetStatus ¶
func (m *NetworkMappingMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*NetworkMappingMutation) SetComputerPort ¶
func (m *NetworkMappingMutation) SetComputerPort(i int32)
SetComputerPort sets the "computer_port" field.
func (*NetworkMappingMutation) SetCreateTime ¶
func (m *NetworkMappingMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*NetworkMappingMutation) SetDeleteState ¶
func (m *NetworkMappingMutation) SetDeleteState(b bool)
SetDeleteState sets the "delete_state" field.
func (*NetworkMappingMutation) SetField ¶
func (m *NetworkMappingMutation) 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 (*NetworkMappingMutation) SetFkComputerID ¶
func (m *NetworkMappingMutation) SetFkComputerID(u uuid.UUID)
SetFkComputerID sets the "fk_computer_id" field.
func (*NetworkMappingMutation) SetFkGatewayID ¶
func (m *NetworkMappingMutation) SetFkGatewayID(u uuid.UUID)
SetFkGatewayID sets the "fk_gateway_id" field.
func (*NetworkMappingMutation) SetFkUserID ¶
func (m *NetworkMappingMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*NetworkMappingMutation) SetGatewayIP ¶
func (m *NetworkMappingMutation) SetGatewayIP(s string)
SetGatewayIP sets the "gateway_ip" field.
func (*NetworkMappingMutation) SetGatewayPort ¶
func (m *NetworkMappingMutation) SetGatewayPort(i int32)
SetGatewayPort sets the "gateway_port" field.
func (*NetworkMappingMutation) SetID ¶
func (m *NetworkMappingMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of NetworkMapping entities.
func (*NetworkMappingMutation) SetName ¶
func (m *NetworkMappingMutation) SetName(s string)
SetName sets the "name" field.
func (*NetworkMappingMutation) SetOp ¶
func (m *NetworkMappingMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NetworkMappingMutation) SetProtocol ¶
func (m *NetworkMappingMutation) SetProtocol(s string)
SetProtocol sets the "protocol" field.
func (*NetworkMappingMutation) SetStatus ¶
func (m *NetworkMappingMutation) SetStatus(i int)
SetStatus sets the "status" field.
func (*NetworkMappingMutation) Status ¶
func (m *NetworkMappingMutation) Status() (r int, exists bool)
Status returns the value of the "status" field in the mutation.
func (NetworkMappingMutation) Tx ¶
func (m NetworkMappingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NetworkMappingMutation) Type ¶
func (m *NetworkMappingMutation) Type() string
Type returns the node type of this mutation (NetworkMapping).
func (*NetworkMappingMutation) Where ¶
func (m *NetworkMappingMutation) Where(ps ...predicate.NetworkMapping)
Where appends a list predicates to the NetworkMappingMutation builder.
func (*NetworkMappingMutation) WhereP ¶
func (m *NetworkMappingMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NetworkMappingMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NetworkMappingQuery ¶
type NetworkMappingQuery struct {
// contains filtered or unexported fields
}
NetworkMappingQuery is the builder for querying NetworkMapping entities.
func (*NetworkMappingQuery) Aggregate ¶
func (_q *NetworkMappingQuery) Aggregate(fns ...AggregateFunc) *NetworkMappingSelect
Aggregate returns a NetworkMappingSelect configured with the given aggregations.
func (*NetworkMappingQuery) All ¶
func (_q *NetworkMappingQuery) All(ctx context.Context) ([]*NetworkMapping, error)
All executes the query and returns a list of NetworkMappings.
func (*NetworkMappingQuery) AllX ¶
func (_q *NetworkMappingQuery) AllX(ctx context.Context) []*NetworkMapping
AllX is like All, but panics if an error occurs.
func (*NetworkMappingQuery) Clone ¶
func (_q *NetworkMappingQuery) Clone() *NetworkMappingQuery
Clone returns a duplicate of the NetworkMappingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NetworkMappingQuery) Count ¶
func (_q *NetworkMappingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NetworkMappingQuery) CountX ¶
func (_q *NetworkMappingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NetworkMappingQuery) Exist ¶
func (_q *NetworkMappingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NetworkMappingQuery) ExistX ¶
func (_q *NetworkMappingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NetworkMappingQuery) First ¶
func (_q *NetworkMappingQuery) First(ctx context.Context) (*NetworkMapping, error)
First returns the first NetworkMapping entity from the query. Returns a *NotFoundError when no NetworkMapping was found.
func (*NetworkMappingQuery) FirstID ¶
FirstID returns the first NetworkMapping ID from the query. Returns a *NotFoundError when no NetworkMapping ID was found.
func (*NetworkMappingQuery) FirstIDX ¶
func (_q *NetworkMappingQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*NetworkMappingQuery) FirstX ¶
func (_q *NetworkMappingQuery) FirstX(ctx context.Context) *NetworkMapping
FirstX is like First, but panics if an error occurs.
func (*NetworkMappingQuery) GroupBy ¶
func (_q *NetworkMappingQuery) GroupBy(field string, fields ...string) *NetworkMappingGroupBy
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.NetworkMapping.Query().
GroupBy(networkmapping.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*NetworkMappingQuery) IDsX ¶
func (_q *NetworkMappingQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*NetworkMappingQuery) Limit ¶
func (_q *NetworkMappingQuery) Limit(limit int) *NetworkMappingQuery
Limit the number of records to be returned by this query.
func (*NetworkMappingQuery) Offset ¶
func (_q *NetworkMappingQuery) Offset(offset int) *NetworkMappingQuery
Offset to start from.
func (*NetworkMappingQuery) Only ¶
func (_q *NetworkMappingQuery) Only(ctx context.Context) (*NetworkMapping, error)
Only returns a single NetworkMapping entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NetworkMapping entity is found. Returns a *NotFoundError when no NetworkMapping entities are found.
func (*NetworkMappingQuery) OnlyID ¶
OnlyID is like Only, but returns the only NetworkMapping ID in the query. Returns a *NotSingularError when more than one NetworkMapping ID is found. Returns a *NotFoundError when no entities are found.
func (*NetworkMappingQuery) OnlyIDX ¶
func (_q *NetworkMappingQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NetworkMappingQuery) OnlyX ¶
func (_q *NetworkMappingQuery) OnlyX(ctx context.Context) *NetworkMapping
OnlyX is like Only, but panics if an error occurs.
func (*NetworkMappingQuery) Order ¶
func (_q *NetworkMappingQuery) Order(o ...networkmapping.OrderOption) *NetworkMappingQuery
Order specifies how the records should be ordered.
func (*NetworkMappingQuery) Select ¶
func (_q *NetworkMappingQuery) Select(fields ...string) *NetworkMappingSelect
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.NetworkMapping.Query().
Select(networkmapping.FieldName).
Scan(ctx, &v)
func (*NetworkMappingQuery) Unique ¶
func (_q *NetworkMappingQuery) Unique(unique bool) *NetworkMappingQuery
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 (*NetworkMappingQuery) Where ¶
func (_q *NetworkMappingQuery) Where(ps ...predicate.NetworkMapping) *NetworkMappingQuery
Where adds a new predicate for the NetworkMappingQuery builder.
type NetworkMappingSelect ¶
type NetworkMappingSelect struct {
*NetworkMappingQuery
// contains filtered or unexported fields
}
NetworkMappingSelect is the builder for selecting fields of NetworkMapping entities.
func (*NetworkMappingSelect) Aggregate ¶
func (_s *NetworkMappingSelect) Aggregate(fns ...AggregateFunc) *NetworkMappingSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NetworkMappingSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NetworkMappingSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NetworkMappingSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NetworkMappingSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NetworkMappingSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NetworkMappingSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NetworkMappingSelect) Scan ¶
func (_s *NetworkMappingSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NetworkMappingSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NetworkMappingUpdate ¶
type NetworkMappingUpdate struct {
// contains filtered or unexported fields
}
NetworkMappingUpdate is the builder for updating NetworkMapping entities.
func (*NetworkMappingUpdate) AddComputerPort ¶
func (_u *NetworkMappingUpdate) AddComputerPort(v int32) *NetworkMappingUpdate
AddComputerPort adds value to the "computer_port" field.
func (*NetworkMappingUpdate) AddGatewayPort ¶
func (_u *NetworkMappingUpdate) AddGatewayPort(v int32) *NetworkMappingUpdate
AddGatewayPort adds value to the "gateway_port" field.
func (*NetworkMappingUpdate) AddStatus ¶
func (_u *NetworkMappingUpdate) AddStatus(v int) *NetworkMappingUpdate
AddStatus adds value to the "status" field.
func (*NetworkMappingUpdate) Exec ¶
func (_u *NetworkMappingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NetworkMappingUpdate) ExecX ¶
func (_u *NetworkMappingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetworkMappingUpdate) Mutation ¶
func (_u *NetworkMappingUpdate) Mutation() *NetworkMappingMutation
Mutation returns the NetworkMappingMutation object of the builder.
func (*NetworkMappingUpdate) Save ¶
func (_u *NetworkMappingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NetworkMappingUpdate) SaveX ¶
func (_u *NetworkMappingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NetworkMappingUpdate) SetComputerPort ¶
func (_u *NetworkMappingUpdate) SetComputerPort(v int32) *NetworkMappingUpdate
SetComputerPort sets the "computer_port" field.
func (*NetworkMappingUpdate) SetCreateTime ¶
func (_u *NetworkMappingUpdate) SetCreateTime(v time.Time) *NetworkMappingUpdate
SetCreateTime sets the "create_time" field.
func (*NetworkMappingUpdate) SetDeleteState ¶
func (_u *NetworkMappingUpdate) SetDeleteState(v bool) *NetworkMappingUpdate
SetDeleteState sets the "delete_state" field.
func (*NetworkMappingUpdate) SetFkComputerID ¶
func (_u *NetworkMappingUpdate) SetFkComputerID(v uuid.UUID) *NetworkMappingUpdate
SetFkComputerID sets the "fk_computer_id" field.
func (*NetworkMappingUpdate) SetFkGatewayID ¶
func (_u *NetworkMappingUpdate) SetFkGatewayID(v uuid.UUID) *NetworkMappingUpdate
SetFkGatewayID sets the "fk_gateway_id" field.
func (*NetworkMappingUpdate) SetFkUserID ¶
func (_u *NetworkMappingUpdate) SetFkUserID(v uuid.UUID) *NetworkMappingUpdate
SetFkUserID sets the "fk_user_id" field.
func (*NetworkMappingUpdate) SetGatewayIP ¶
func (_u *NetworkMappingUpdate) SetGatewayIP(v string) *NetworkMappingUpdate
SetGatewayIP sets the "gateway_ip" field.
func (*NetworkMappingUpdate) SetGatewayPort ¶
func (_u *NetworkMappingUpdate) SetGatewayPort(v int32) *NetworkMappingUpdate
SetGatewayPort sets the "gateway_port" field.
func (*NetworkMappingUpdate) SetName ¶
func (_u *NetworkMappingUpdate) SetName(v string) *NetworkMappingUpdate
SetName sets the "name" field.
func (*NetworkMappingUpdate) SetNillableComputerPort ¶
func (_u *NetworkMappingUpdate) SetNillableComputerPort(v *int32) *NetworkMappingUpdate
SetNillableComputerPort sets the "computer_port" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableCreateTime ¶
func (_u *NetworkMappingUpdate) SetNillableCreateTime(v *time.Time) *NetworkMappingUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableDeleteState ¶
func (_u *NetworkMappingUpdate) SetNillableDeleteState(v *bool) *NetworkMappingUpdate
SetNillableDeleteState sets the "delete_state" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableFkComputerID ¶
func (_u *NetworkMappingUpdate) SetNillableFkComputerID(v *uuid.UUID) *NetworkMappingUpdate
SetNillableFkComputerID sets the "fk_computer_id" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableFkGatewayID ¶
func (_u *NetworkMappingUpdate) SetNillableFkGatewayID(v *uuid.UUID) *NetworkMappingUpdate
SetNillableFkGatewayID sets the "fk_gateway_id" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableFkUserID ¶
func (_u *NetworkMappingUpdate) SetNillableFkUserID(v *uuid.UUID) *NetworkMappingUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableGatewayIP ¶
func (_u *NetworkMappingUpdate) SetNillableGatewayIP(v *string) *NetworkMappingUpdate
SetNillableGatewayIP sets the "gateway_ip" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableGatewayPort ¶
func (_u *NetworkMappingUpdate) SetNillableGatewayPort(v *int32) *NetworkMappingUpdate
SetNillableGatewayPort sets the "gateway_port" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableName ¶
func (_u *NetworkMappingUpdate) SetNillableName(v *string) *NetworkMappingUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableProtocol ¶
func (_u *NetworkMappingUpdate) SetNillableProtocol(v *string) *NetworkMappingUpdate
SetNillableProtocol sets the "protocol" field if the given value is not nil.
func (*NetworkMappingUpdate) SetNillableStatus ¶
func (_u *NetworkMappingUpdate) SetNillableStatus(v *int) *NetworkMappingUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*NetworkMappingUpdate) SetProtocol ¶
func (_u *NetworkMappingUpdate) SetProtocol(v string) *NetworkMappingUpdate
SetProtocol sets the "protocol" field.
func (*NetworkMappingUpdate) SetStatus ¶
func (_u *NetworkMappingUpdate) SetStatus(v int) *NetworkMappingUpdate
SetStatus sets the "status" field.
func (*NetworkMappingUpdate) Where ¶
func (_u *NetworkMappingUpdate) Where(ps ...predicate.NetworkMapping) *NetworkMappingUpdate
Where appends a list predicates to the NetworkMappingUpdate builder.
type NetworkMappingUpdateOne ¶
type NetworkMappingUpdateOne struct {
// contains filtered or unexported fields
}
NetworkMappingUpdateOne is the builder for updating a single NetworkMapping entity.
func (*NetworkMappingUpdateOne) AddComputerPort ¶
func (_u *NetworkMappingUpdateOne) AddComputerPort(v int32) *NetworkMappingUpdateOne
AddComputerPort adds value to the "computer_port" field.
func (*NetworkMappingUpdateOne) AddGatewayPort ¶
func (_u *NetworkMappingUpdateOne) AddGatewayPort(v int32) *NetworkMappingUpdateOne
AddGatewayPort adds value to the "gateway_port" field.
func (*NetworkMappingUpdateOne) AddStatus ¶
func (_u *NetworkMappingUpdateOne) AddStatus(v int) *NetworkMappingUpdateOne
AddStatus adds value to the "status" field.
func (*NetworkMappingUpdateOne) Exec ¶
func (_u *NetworkMappingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NetworkMappingUpdateOne) ExecX ¶
func (_u *NetworkMappingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetworkMappingUpdateOne) Mutation ¶
func (_u *NetworkMappingUpdateOne) Mutation() *NetworkMappingMutation
Mutation returns the NetworkMappingMutation object of the builder.
func (*NetworkMappingUpdateOne) Save ¶
func (_u *NetworkMappingUpdateOne) Save(ctx context.Context) (*NetworkMapping, error)
Save executes the query and returns the updated NetworkMapping entity.
func (*NetworkMappingUpdateOne) SaveX ¶
func (_u *NetworkMappingUpdateOne) SaveX(ctx context.Context) *NetworkMapping
SaveX is like Save, but panics if an error occurs.
func (*NetworkMappingUpdateOne) Select ¶
func (_u *NetworkMappingUpdateOne) Select(field string, fields ...string) *NetworkMappingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NetworkMappingUpdateOne) SetComputerPort ¶
func (_u *NetworkMappingUpdateOne) SetComputerPort(v int32) *NetworkMappingUpdateOne
SetComputerPort sets the "computer_port" field.
func (*NetworkMappingUpdateOne) SetCreateTime ¶
func (_u *NetworkMappingUpdateOne) SetCreateTime(v time.Time) *NetworkMappingUpdateOne
SetCreateTime sets the "create_time" field.
func (*NetworkMappingUpdateOne) SetDeleteState ¶
func (_u *NetworkMappingUpdateOne) SetDeleteState(v bool) *NetworkMappingUpdateOne
SetDeleteState sets the "delete_state" field.
func (*NetworkMappingUpdateOne) SetFkComputerID ¶
func (_u *NetworkMappingUpdateOne) SetFkComputerID(v uuid.UUID) *NetworkMappingUpdateOne
SetFkComputerID sets the "fk_computer_id" field.
func (*NetworkMappingUpdateOne) SetFkGatewayID ¶
func (_u *NetworkMappingUpdateOne) SetFkGatewayID(v uuid.UUID) *NetworkMappingUpdateOne
SetFkGatewayID sets the "fk_gateway_id" field.
func (*NetworkMappingUpdateOne) SetFkUserID ¶
func (_u *NetworkMappingUpdateOne) SetFkUserID(v uuid.UUID) *NetworkMappingUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*NetworkMappingUpdateOne) SetGatewayIP ¶
func (_u *NetworkMappingUpdateOne) SetGatewayIP(v string) *NetworkMappingUpdateOne
SetGatewayIP sets the "gateway_ip" field.
func (*NetworkMappingUpdateOne) SetGatewayPort ¶
func (_u *NetworkMappingUpdateOne) SetGatewayPort(v int32) *NetworkMappingUpdateOne
SetGatewayPort sets the "gateway_port" field.
func (*NetworkMappingUpdateOne) SetName ¶
func (_u *NetworkMappingUpdateOne) SetName(v string) *NetworkMappingUpdateOne
SetName sets the "name" field.
func (*NetworkMappingUpdateOne) SetNillableComputerPort ¶
func (_u *NetworkMappingUpdateOne) SetNillableComputerPort(v *int32) *NetworkMappingUpdateOne
SetNillableComputerPort sets the "computer_port" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableCreateTime ¶
func (_u *NetworkMappingUpdateOne) SetNillableCreateTime(v *time.Time) *NetworkMappingUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableDeleteState ¶
func (_u *NetworkMappingUpdateOne) SetNillableDeleteState(v *bool) *NetworkMappingUpdateOne
SetNillableDeleteState sets the "delete_state" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableFkComputerID ¶
func (_u *NetworkMappingUpdateOne) SetNillableFkComputerID(v *uuid.UUID) *NetworkMappingUpdateOne
SetNillableFkComputerID sets the "fk_computer_id" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableFkGatewayID ¶
func (_u *NetworkMappingUpdateOne) SetNillableFkGatewayID(v *uuid.UUID) *NetworkMappingUpdateOne
SetNillableFkGatewayID sets the "fk_gateway_id" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableFkUserID ¶
func (_u *NetworkMappingUpdateOne) SetNillableFkUserID(v *uuid.UUID) *NetworkMappingUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableGatewayIP ¶
func (_u *NetworkMappingUpdateOne) SetNillableGatewayIP(v *string) *NetworkMappingUpdateOne
SetNillableGatewayIP sets the "gateway_ip" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableGatewayPort ¶
func (_u *NetworkMappingUpdateOne) SetNillableGatewayPort(v *int32) *NetworkMappingUpdateOne
SetNillableGatewayPort sets the "gateway_port" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableName ¶
func (_u *NetworkMappingUpdateOne) SetNillableName(v *string) *NetworkMappingUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableProtocol ¶
func (_u *NetworkMappingUpdateOne) SetNillableProtocol(v *string) *NetworkMappingUpdateOne
SetNillableProtocol sets the "protocol" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetNillableStatus ¶
func (_u *NetworkMappingUpdateOne) SetNillableStatus(v *int) *NetworkMappingUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*NetworkMappingUpdateOne) SetProtocol ¶
func (_u *NetworkMappingUpdateOne) SetProtocol(v string) *NetworkMappingUpdateOne
SetProtocol sets the "protocol" field.
func (*NetworkMappingUpdateOne) SetStatus ¶
func (_u *NetworkMappingUpdateOne) SetStatus(v int) *NetworkMappingUpdateOne
SetStatus sets the "status" field.
func (*NetworkMappingUpdateOne) Where ¶
func (_u *NetworkMappingUpdateOne) Where(ps ...predicate.NetworkMapping) *NetworkMappingUpdateOne
Where appends a list predicates to the NetworkMappingUpdate builder.
type NetworkMappings ¶
type NetworkMappings []*NetworkMapping
NetworkMappings is a parsable slice of NetworkMapping.
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 S3Bucket ¶
type S3Bucket struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// bucketName
BucketName string `json:"bucket_name,omitempty"`
// CreatedTime holds the value of the "createdTime" field.
CreatedTime time.Time `json:"createdTime,omitempty"`
// contains filtered or unexported fields
}
S3Bucket is the model entity for the S3Bucket schema.
func (*S3Bucket) Unwrap ¶
Unwrap unwraps the S3Bucket 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 (*S3Bucket) Update ¶
func (_m *S3Bucket) Update() *S3BucketUpdateOne
Update returns a builder for updating this S3Bucket. Note that you need to call S3Bucket.Unwrap() before calling this method if this S3Bucket was returned from a transaction, and the transaction was committed or rolled back.
type S3BucketClient ¶
type S3BucketClient struct {
// contains filtered or unexported fields
}
S3BucketClient is a client for the S3Bucket schema.
func NewS3BucketClient ¶
func NewS3BucketClient(c config) *S3BucketClient
NewS3BucketClient returns a client for the S3Bucket from the given config.
func (*S3BucketClient) Create ¶
func (c *S3BucketClient) Create() *S3BucketCreate
Create returns a builder for creating a S3Bucket entity.
func (*S3BucketClient) CreateBulk ¶
func (c *S3BucketClient) CreateBulk(builders ...*S3BucketCreate) *S3BucketCreateBulk
CreateBulk returns a builder for creating a bulk of S3Bucket entities.
func (*S3BucketClient) Delete ¶
func (c *S3BucketClient) Delete() *S3BucketDelete
Delete returns a delete builder for S3Bucket.
func (*S3BucketClient) DeleteOne ¶
func (c *S3BucketClient) DeleteOne(_m *S3Bucket) *S3BucketDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*S3BucketClient) DeleteOneID ¶
func (c *S3BucketClient) DeleteOneID(id uuid.UUID) *S3BucketDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*S3BucketClient) Hooks ¶
func (c *S3BucketClient) Hooks() []Hook
Hooks returns the client hooks.
func (*S3BucketClient) Intercept ¶
func (c *S3BucketClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `s3bucket.Intercept(f(g(h())))`.
func (*S3BucketClient) Interceptors ¶
func (c *S3BucketClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*S3BucketClient) MapCreateBulk ¶
func (c *S3BucketClient) MapCreateBulk(slice any, setFunc func(*S3BucketCreate, int)) *S3BucketCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*S3BucketClient) Query ¶
func (c *S3BucketClient) Query() *S3BucketQuery
Query returns a query builder for S3Bucket.
func (*S3BucketClient) Update ¶
func (c *S3BucketClient) Update() *S3BucketUpdate
Update returns an update builder for S3Bucket.
func (*S3BucketClient) UpdateOne ¶
func (c *S3BucketClient) UpdateOne(_m *S3Bucket) *S3BucketUpdateOne
UpdateOne returns an update builder for the given entity.
func (*S3BucketClient) UpdateOneID ¶
func (c *S3BucketClient) UpdateOneID(id uuid.UUID) *S3BucketUpdateOne
UpdateOneID returns an update builder for the given id.
func (*S3BucketClient) Use ¶
func (c *S3BucketClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `s3bucket.Hooks(f(g(h())))`.
type S3BucketCreate ¶
type S3BucketCreate struct {
// contains filtered or unexported fields
}
S3BucketCreate is the builder for creating a S3Bucket entity.
func (*S3BucketCreate) Exec ¶
func (_c *S3BucketCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*S3BucketCreate) ExecX ¶
func (_c *S3BucketCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*S3BucketCreate) Mutation ¶
func (_c *S3BucketCreate) Mutation() *S3BucketMutation
Mutation returns the S3BucketMutation object of the builder.
func (*S3BucketCreate) Save ¶
func (_c *S3BucketCreate) Save(ctx context.Context) (*S3Bucket, error)
Save creates the S3Bucket in the database.
func (*S3BucketCreate) SaveX ¶
func (_c *S3BucketCreate) SaveX(ctx context.Context) *S3Bucket
SaveX calls Save and panics if Save returns an error.
func (*S3BucketCreate) SetBucketName ¶
func (_c *S3BucketCreate) SetBucketName(v string) *S3BucketCreate
SetBucketName sets the "bucket_name" field.
func (*S3BucketCreate) SetCreatedTime ¶
func (_c *S3BucketCreate) SetCreatedTime(v time.Time) *S3BucketCreate
SetCreatedTime sets the "createdTime" field.
func (*S3BucketCreate) SetFkUserID ¶
func (_c *S3BucketCreate) SetFkUserID(v uuid.UUID) *S3BucketCreate
SetFkUserID sets the "fk_user_id" field.
func (*S3BucketCreate) SetID ¶
func (_c *S3BucketCreate) SetID(v uuid.UUID) *S3BucketCreate
SetID sets the "id" field.
func (*S3BucketCreate) SetNillableID ¶
func (_c *S3BucketCreate) SetNillableID(v *uuid.UUID) *S3BucketCreate
SetNillableID sets the "id" field if the given value is not nil.
type S3BucketCreateBulk ¶
type S3BucketCreateBulk struct {
// contains filtered or unexported fields
}
S3BucketCreateBulk is the builder for creating many S3Bucket entities in bulk.
func (*S3BucketCreateBulk) Exec ¶
func (_c *S3BucketCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*S3BucketCreateBulk) ExecX ¶
func (_c *S3BucketCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type S3BucketDelete ¶
type S3BucketDelete struct {
// contains filtered or unexported fields
}
S3BucketDelete is the builder for deleting a S3Bucket entity.
func (*S3BucketDelete) Exec ¶
func (_d *S3BucketDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*S3BucketDelete) ExecX ¶
func (_d *S3BucketDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*S3BucketDelete) Where ¶
func (_d *S3BucketDelete) Where(ps ...predicate.S3Bucket) *S3BucketDelete
Where appends a list predicates to the S3BucketDelete builder.
type S3BucketDeleteOne ¶
type S3BucketDeleteOne struct {
// contains filtered or unexported fields
}
S3BucketDeleteOne is the builder for deleting a single S3Bucket entity.
func (*S3BucketDeleteOne) Exec ¶
func (_d *S3BucketDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*S3BucketDeleteOne) ExecX ¶
func (_d *S3BucketDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*S3BucketDeleteOne) Where ¶
func (_d *S3BucketDeleteOne) Where(ps ...predicate.S3Bucket) *S3BucketDeleteOne
Where appends a list predicates to the S3BucketDelete builder.
type S3BucketGroupBy ¶
type S3BucketGroupBy struct {
// contains filtered or unexported fields
}
S3BucketGroupBy is the group-by builder for S3Bucket entities.
func (*S3BucketGroupBy) Aggregate ¶
func (_g *S3BucketGroupBy) Aggregate(fns ...AggregateFunc) *S3BucketGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*S3BucketGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*S3BucketGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*S3BucketGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*S3BucketGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*S3BucketGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*S3BucketGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*S3BucketGroupBy) Scan ¶
func (_g *S3BucketGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*S3BucketGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type S3BucketMutation ¶
type S3BucketMutation struct {
// contains filtered or unexported fields
}
S3BucketMutation represents an operation that mutates the S3Bucket nodes in the graph.
func (*S3BucketMutation) AddField ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) AddedEdges ¶
func (m *S3BucketMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*S3BucketMutation) AddedField ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) AddedFields ¶
func (m *S3BucketMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*S3BucketMutation) AddedIDs ¶
func (m *S3BucketMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*S3BucketMutation) BucketName ¶
func (m *S3BucketMutation) BucketName() (r string, exists bool)
BucketName returns the value of the "bucket_name" field in the mutation.
func (*S3BucketMutation) ClearEdge ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) ClearField ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) ClearedEdges ¶
func (m *S3BucketMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*S3BucketMutation) ClearedFields ¶
func (m *S3BucketMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (S3BucketMutation) Client ¶
func (m S3BucketMutation) 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 (*S3BucketMutation) CreatedTime ¶
func (m *S3BucketMutation) CreatedTime() (r time.Time, exists bool)
CreatedTime returns the value of the "createdTime" field in the mutation.
func (*S3BucketMutation) EdgeCleared ¶
func (m *S3BucketMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*S3BucketMutation) Field ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) FieldCleared ¶
func (m *S3BucketMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*S3BucketMutation) Fields ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) FkUserID ¶
func (m *S3BucketMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*S3BucketMutation) ID ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) 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 (*S3BucketMutation) OldBucketName ¶
func (m *S3BucketMutation) OldBucketName(ctx context.Context) (v string, err error)
OldBucketName returns the old "bucket_name" field's value of the S3Bucket entity. If the S3Bucket 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 (*S3BucketMutation) OldCreatedTime ¶
OldCreatedTime returns the old "createdTime" field's value of the S3Bucket entity. If the S3Bucket 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 (*S3BucketMutation) 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 (*S3BucketMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the S3Bucket entity. If the S3Bucket 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 (*S3BucketMutation) RemovedEdges ¶
func (m *S3BucketMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*S3BucketMutation) RemovedIDs ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) ResetBucketName ¶
func (m *S3BucketMutation) ResetBucketName()
ResetBucketName resets all changes to the "bucket_name" field.
func (*S3BucketMutation) ResetCreatedTime ¶
func (m *S3BucketMutation) ResetCreatedTime()
ResetCreatedTime resets all changes to the "createdTime" field.
func (*S3BucketMutation) ResetEdge ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) ResetField ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) ResetFkUserID ¶
func (m *S3BucketMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*S3BucketMutation) SetBucketName ¶
func (m *S3BucketMutation) SetBucketName(s string)
SetBucketName sets the "bucket_name" field.
func (*S3BucketMutation) SetCreatedTime ¶
func (m *S3BucketMutation) SetCreatedTime(t time.Time)
SetCreatedTime sets the "createdTime" field.
func (*S3BucketMutation) SetField ¶
func (m *S3BucketMutation) 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 (*S3BucketMutation) SetFkUserID ¶
func (m *S3BucketMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*S3BucketMutation) SetID ¶
func (m *S3BucketMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of S3Bucket entities.
func (*S3BucketMutation) SetOp ¶
func (m *S3BucketMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (S3BucketMutation) Tx ¶
func (m S3BucketMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*S3BucketMutation) Type ¶
func (m *S3BucketMutation) Type() string
Type returns the node type of this mutation (S3Bucket).
func (*S3BucketMutation) Where ¶
func (m *S3BucketMutation) Where(ps ...predicate.S3Bucket)
Where appends a list predicates to the S3BucketMutation builder.
func (*S3BucketMutation) WhereP ¶
func (m *S3BucketMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the S3BucketMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type S3BucketQuery ¶
type S3BucketQuery struct {
// contains filtered or unexported fields
}
S3BucketQuery is the builder for querying S3Bucket entities.
func (*S3BucketQuery) Aggregate ¶
func (_q *S3BucketQuery) Aggregate(fns ...AggregateFunc) *S3BucketSelect
Aggregate returns a S3BucketSelect configured with the given aggregations.
func (*S3BucketQuery) All ¶
func (_q *S3BucketQuery) All(ctx context.Context) ([]*S3Bucket, error)
All executes the query and returns a list of S3Buckets.
func (*S3BucketQuery) AllX ¶
func (_q *S3BucketQuery) AllX(ctx context.Context) []*S3Bucket
AllX is like All, but panics if an error occurs.
func (*S3BucketQuery) Clone ¶
func (_q *S3BucketQuery) Clone() *S3BucketQuery
Clone returns a duplicate of the S3BucketQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*S3BucketQuery) Count ¶
func (_q *S3BucketQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*S3BucketQuery) CountX ¶
func (_q *S3BucketQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*S3BucketQuery) Exist ¶
func (_q *S3BucketQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*S3BucketQuery) ExistX ¶
func (_q *S3BucketQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*S3BucketQuery) First ¶
func (_q *S3BucketQuery) First(ctx context.Context) (*S3Bucket, error)
First returns the first S3Bucket entity from the query. Returns a *NotFoundError when no S3Bucket was found.
func (*S3BucketQuery) FirstID ¶
FirstID returns the first S3Bucket ID from the query. Returns a *NotFoundError when no S3Bucket ID was found.
func (*S3BucketQuery) FirstIDX ¶
func (_q *S3BucketQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*S3BucketQuery) FirstX ¶
func (_q *S3BucketQuery) FirstX(ctx context.Context) *S3Bucket
FirstX is like First, but panics if an error occurs.
func (*S3BucketQuery) GroupBy ¶
func (_q *S3BucketQuery) GroupBy(field string, fields ...string) *S3BucketGroupBy
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.S3Bucket.Query().
GroupBy(s3bucket.FieldFkUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*S3BucketQuery) IDsX ¶
func (_q *S3BucketQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*S3BucketQuery) Limit ¶
func (_q *S3BucketQuery) Limit(limit int) *S3BucketQuery
Limit the number of records to be returned by this query.
func (*S3BucketQuery) Offset ¶
func (_q *S3BucketQuery) Offset(offset int) *S3BucketQuery
Offset to start from.
func (*S3BucketQuery) Only ¶
func (_q *S3BucketQuery) Only(ctx context.Context) (*S3Bucket, error)
Only returns a single S3Bucket entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one S3Bucket entity is found. Returns a *NotFoundError when no S3Bucket entities are found.
func (*S3BucketQuery) OnlyID ¶
OnlyID is like Only, but returns the only S3Bucket ID in the query. Returns a *NotSingularError when more than one S3Bucket ID is found. Returns a *NotFoundError when no entities are found.
func (*S3BucketQuery) OnlyIDX ¶
func (_q *S3BucketQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*S3BucketQuery) OnlyX ¶
func (_q *S3BucketQuery) OnlyX(ctx context.Context) *S3Bucket
OnlyX is like Only, but panics if an error occurs.
func (*S3BucketQuery) Order ¶
func (_q *S3BucketQuery) Order(o ...s3bucket.OrderOption) *S3BucketQuery
Order specifies how the records should be ordered.
func (*S3BucketQuery) Select ¶
func (_q *S3BucketQuery) Select(fields ...string) *S3BucketSelect
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
}
client.S3Bucket.Query().
Select(s3bucket.FieldFkUserID).
Scan(ctx, &v)
func (*S3BucketQuery) Unique ¶
func (_q *S3BucketQuery) Unique(unique bool) *S3BucketQuery
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 (*S3BucketQuery) Where ¶
func (_q *S3BucketQuery) Where(ps ...predicate.S3Bucket) *S3BucketQuery
Where adds a new predicate for the S3BucketQuery builder.
type S3BucketSelect ¶
type S3BucketSelect struct {
*S3BucketQuery
// contains filtered or unexported fields
}
S3BucketSelect is the builder for selecting fields of S3Bucket entities.
func (*S3BucketSelect) Aggregate ¶
func (_s *S3BucketSelect) Aggregate(fns ...AggregateFunc) *S3BucketSelect
Aggregate adds the given aggregation functions to the selector query.
func (*S3BucketSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*S3BucketSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*S3BucketSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*S3BucketSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*S3BucketSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*S3BucketSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*S3BucketSelect) Scan ¶
func (_s *S3BucketSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*S3BucketSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type S3BucketUpdate ¶
type S3BucketUpdate struct {
// contains filtered or unexported fields
}
S3BucketUpdate is the builder for updating S3Bucket entities.
func (*S3BucketUpdate) Exec ¶
func (_u *S3BucketUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*S3BucketUpdate) ExecX ¶
func (_u *S3BucketUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*S3BucketUpdate) Mutation ¶
func (_u *S3BucketUpdate) Mutation() *S3BucketMutation
Mutation returns the S3BucketMutation object of the builder.
func (*S3BucketUpdate) Save ¶
func (_u *S3BucketUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*S3BucketUpdate) SaveX ¶
func (_u *S3BucketUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*S3BucketUpdate) SetBucketName ¶
func (_u *S3BucketUpdate) SetBucketName(v string) *S3BucketUpdate
SetBucketName sets the "bucket_name" field.
func (*S3BucketUpdate) SetCreatedTime ¶
func (_u *S3BucketUpdate) SetCreatedTime(v time.Time) *S3BucketUpdate
SetCreatedTime sets the "createdTime" field.
func (*S3BucketUpdate) SetFkUserID ¶
func (_u *S3BucketUpdate) SetFkUserID(v uuid.UUID) *S3BucketUpdate
SetFkUserID sets the "fk_user_id" field.
func (*S3BucketUpdate) SetNillableBucketName ¶
func (_u *S3BucketUpdate) SetNillableBucketName(v *string) *S3BucketUpdate
SetNillableBucketName sets the "bucket_name" field if the given value is not nil.
func (*S3BucketUpdate) SetNillableCreatedTime ¶
func (_u *S3BucketUpdate) SetNillableCreatedTime(v *time.Time) *S3BucketUpdate
SetNillableCreatedTime sets the "createdTime" field if the given value is not nil.
func (*S3BucketUpdate) SetNillableFkUserID ¶
func (_u *S3BucketUpdate) SetNillableFkUserID(v *uuid.UUID) *S3BucketUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*S3BucketUpdate) Where ¶
func (_u *S3BucketUpdate) Where(ps ...predicate.S3Bucket) *S3BucketUpdate
Where appends a list predicates to the S3BucketUpdate builder.
type S3BucketUpdateOne ¶
type S3BucketUpdateOne struct {
// contains filtered or unexported fields
}
S3BucketUpdateOne is the builder for updating a single S3Bucket entity.
func (*S3BucketUpdateOne) Exec ¶
func (_u *S3BucketUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*S3BucketUpdateOne) ExecX ¶
func (_u *S3BucketUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*S3BucketUpdateOne) Mutation ¶
func (_u *S3BucketUpdateOne) Mutation() *S3BucketMutation
Mutation returns the S3BucketMutation object of the builder.
func (*S3BucketUpdateOne) Save ¶
func (_u *S3BucketUpdateOne) Save(ctx context.Context) (*S3Bucket, error)
Save executes the query and returns the updated S3Bucket entity.
func (*S3BucketUpdateOne) SaveX ¶
func (_u *S3BucketUpdateOne) SaveX(ctx context.Context) *S3Bucket
SaveX is like Save, but panics if an error occurs.
func (*S3BucketUpdateOne) Select ¶
func (_u *S3BucketUpdateOne) Select(field string, fields ...string) *S3BucketUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*S3BucketUpdateOne) SetBucketName ¶
func (_u *S3BucketUpdateOne) SetBucketName(v string) *S3BucketUpdateOne
SetBucketName sets the "bucket_name" field.
func (*S3BucketUpdateOne) SetCreatedTime ¶
func (_u *S3BucketUpdateOne) SetCreatedTime(v time.Time) *S3BucketUpdateOne
SetCreatedTime sets the "createdTime" field.
func (*S3BucketUpdateOne) SetFkUserID ¶
func (_u *S3BucketUpdateOne) SetFkUserID(v uuid.UUID) *S3BucketUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*S3BucketUpdateOne) SetNillableBucketName ¶
func (_u *S3BucketUpdateOne) SetNillableBucketName(v *string) *S3BucketUpdateOne
SetNillableBucketName sets the "bucket_name" field if the given value is not nil.
func (*S3BucketUpdateOne) SetNillableCreatedTime ¶
func (_u *S3BucketUpdateOne) SetNillableCreatedTime(v *time.Time) *S3BucketUpdateOne
SetNillableCreatedTime sets the "createdTime" field if the given value is not nil.
func (*S3BucketUpdateOne) SetNillableFkUserID ¶
func (_u *S3BucketUpdateOne) SetNillableFkUserID(v *uuid.UUID) *S3BucketUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*S3BucketUpdateOne) Where ¶
func (_u *S3BucketUpdateOne) Where(ps ...predicate.S3Bucket) *S3BucketUpdateOne
Where appends a list predicates to the S3BucketUpdate builder.
type S3User ¶
type S3User struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// 类型
Type int8 `json:"type,omitempty"`
// accessKey
AccessKey string `json:"access_key,omitempty"`
// secretKey
SecretKey string `json:"secret_key,omitempty"`
// 创建时间
CreateTime time.Time `json:"create_time,omitempty"`
// 修改时间
UpdateTime time.Time `json:"update_time,omitempty"`
// contains filtered or unexported fields
}
S3User is the model entity for the S3User schema.
func (*S3User) Unwrap ¶
Unwrap unwraps the S3User 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 (*S3User) Update ¶
func (_m *S3User) Update() *S3UserUpdateOne
Update returns a builder for updating this S3User. Note that you need to call S3User.Unwrap() before calling this method if this S3User was returned from a transaction, and the transaction was committed or rolled back.
type S3UserClient ¶
type S3UserClient struct {
// contains filtered or unexported fields
}
S3UserClient is a client for the S3User schema.
func NewS3UserClient ¶
func NewS3UserClient(c config) *S3UserClient
NewS3UserClient returns a client for the S3User from the given config.
func (*S3UserClient) Create ¶
func (c *S3UserClient) Create() *S3UserCreate
Create returns a builder for creating a S3User entity.
func (*S3UserClient) CreateBulk ¶
func (c *S3UserClient) CreateBulk(builders ...*S3UserCreate) *S3UserCreateBulk
CreateBulk returns a builder for creating a bulk of S3User entities.
func (*S3UserClient) Delete ¶
func (c *S3UserClient) Delete() *S3UserDelete
Delete returns a delete builder for S3User.
func (*S3UserClient) DeleteOne ¶
func (c *S3UserClient) DeleteOne(_m *S3User) *S3UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*S3UserClient) DeleteOneID ¶
func (c *S3UserClient) DeleteOneID(id uuid.UUID) *S3UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*S3UserClient) Intercept ¶
func (c *S3UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `s3user.Intercept(f(g(h())))`.
func (*S3UserClient) Interceptors ¶
func (c *S3UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*S3UserClient) MapCreateBulk ¶
func (c *S3UserClient) MapCreateBulk(slice any, setFunc func(*S3UserCreate, int)) *S3UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*S3UserClient) Query ¶
func (c *S3UserClient) Query() *S3UserQuery
Query returns a query builder for S3User.
func (*S3UserClient) Update ¶
func (c *S3UserClient) Update() *S3UserUpdate
Update returns an update builder for S3User.
func (*S3UserClient) UpdateOne ¶
func (c *S3UserClient) UpdateOne(_m *S3User) *S3UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*S3UserClient) UpdateOneID ¶
func (c *S3UserClient) UpdateOneID(id uuid.UUID) *S3UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*S3UserClient) Use ¶
func (c *S3UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `s3user.Hooks(f(g(h())))`.
type S3UserCreate ¶
type S3UserCreate struct {
// contains filtered or unexported fields
}
S3UserCreate is the builder for creating a S3User entity.
func (*S3UserCreate) Exec ¶
func (_c *S3UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*S3UserCreate) ExecX ¶
func (_c *S3UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*S3UserCreate) Mutation ¶
func (_c *S3UserCreate) Mutation() *S3UserMutation
Mutation returns the S3UserMutation object of the builder.
func (*S3UserCreate) Save ¶
func (_c *S3UserCreate) Save(ctx context.Context) (*S3User, error)
Save creates the S3User in the database.
func (*S3UserCreate) SaveX ¶
func (_c *S3UserCreate) SaveX(ctx context.Context) *S3User
SaveX calls Save and panics if Save returns an error.
func (*S3UserCreate) SetAccessKey ¶
func (_c *S3UserCreate) SetAccessKey(v string) *S3UserCreate
SetAccessKey sets the "access_key" field.
func (*S3UserCreate) SetCreateTime ¶
func (_c *S3UserCreate) SetCreateTime(v time.Time) *S3UserCreate
SetCreateTime sets the "create_time" field.
func (*S3UserCreate) SetFkUserID ¶
func (_c *S3UserCreate) SetFkUserID(v uuid.UUID) *S3UserCreate
SetFkUserID sets the "fk_user_id" field.
func (*S3UserCreate) SetID ¶
func (_c *S3UserCreate) SetID(v uuid.UUID) *S3UserCreate
SetID sets the "id" field.
func (*S3UserCreate) SetNillableCreateTime ¶
func (_c *S3UserCreate) SetNillableCreateTime(v *time.Time) *S3UserCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*S3UserCreate) SetNillableID ¶
func (_c *S3UserCreate) SetNillableID(v *uuid.UUID) *S3UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*S3UserCreate) SetNillableUpdateTime ¶
func (_c *S3UserCreate) SetNillableUpdateTime(v *time.Time) *S3UserCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*S3UserCreate) SetSecretKey ¶
func (_c *S3UserCreate) SetSecretKey(v string) *S3UserCreate
SetSecretKey sets the "secret_key" field.
func (*S3UserCreate) SetType ¶
func (_c *S3UserCreate) SetType(v int8) *S3UserCreate
SetType sets the "type" field.
func (*S3UserCreate) SetUpdateTime ¶
func (_c *S3UserCreate) SetUpdateTime(v time.Time) *S3UserCreate
SetUpdateTime sets the "update_time" field.
type S3UserCreateBulk ¶
type S3UserCreateBulk struct {
// contains filtered or unexported fields
}
S3UserCreateBulk is the builder for creating many S3User entities in bulk.
func (*S3UserCreateBulk) Exec ¶
func (_c *S3UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*S3UserCreateBulk) ExecX ¶
func (_c *S3UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type S3UserDelete ¶
type S3UserDelete struct {
// contains filtered or unexported fields
}
S3UserDelete is the builder for deleting a S3User entity.
func (*S3UserDelete) Exec ¶
func (_d *S3UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*S3UserDelete) ExecX ¶
func (_d *S3UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*S3UserDelete) Where ¶
func (_d *S3UserDelete) Where(ps ...predicate.S3User) *S3UserDelete
Where appends a list predicates to the S3UserDelete builder.
type S3UserDeleteOne ¶
type S3UserDeleteOne struct {
// contains filtered or unexported fields
}
S3UserDeleteOne is the builder for deleting a single S3User entity.
func (*S3UserDeleteOne) Exec ¶
func (_d *S3UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*S3UserDeleteOne) ExecX ¶
func (_d *S3UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*S3UserDeleteOne) Where ¶
func (_d *S3UserDeleteOne) Where(ps ...predicate.S3User) *S3UserDeleteOne
Where appends a list predicates to the S3UserDelete builder.
type S3UserGroupBy ¶
type S3UserGroupBy struct {
// contains filtered or unexported fields
}
S3UserGroupBy is the group-by builder for S3User entities.
func (*S3UserGroupBy) Aggregate ¶
func (_g *S3UserGroupBy) Aggregate(fns ...AggregateFunc) *S3UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*S3UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*S3UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*S3UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*S3UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*S3UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*S3UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*S3UserGroupBy) Scan ¶
func (_g *S3UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*S3UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type S3UserMutation ¶
type S3UserMutation struct {
// contains filtered or unexported fields
}
S3UserMutation represents an operation that mutates the S3User nodes in the graph.
func (*S3UserMutation) AccessKey ¶
func (m *S3UserMutation) AccessKey() (r string, exists bool)
AccessKey returns the value of the "access_key" field in the mutation.
func (*S3UserMutation) AddField ¶
func (m *S3UserMutation) 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 (*S3UserMutation) AddType ¶
func (m *S3UserMutation) AddType(i int8)
AddType adds i to the "type" field.
func (*S3UserMutation) AddedEdges ¶
func (m *S3UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*S3UserMutation) AddedField ¶
func (m *S3UserMutation) 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 (*S3UserMutation) AddedFields ¶
func (m *S3UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*S3UserMutation) AddedIDs ¶
func (m *S3UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*S3UserMutation) AddedType ¶
func (m *S3UserMutation) AddedType() (r int8, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*S3UserMutation) ClearEdge ¶
func (m *S3UserMutation) 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 (*S3UserMutation) ClearField ¶
func (m *S3UserMutation) 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 (*S3UserMutation) ClearedEdges ¶
func (m *S3UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*S3UserMutation) ClearedFields ¶
func (m *S3UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (S3UserMutation) Client ¶
func (m S3UserMutation) 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 (*S3UserMutation) CreateTime ¶
func (m *S3UserMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*S3UserMutation) EdgeCleared ¶
func (m *S3UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*S3UserMutation) Field ¶
func (m *S3UserMutation) 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 (*S3UserMutation) FieldCleared ¶
func (m *S3UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*S3UserMutation) Fields ¶
func (m *S3UserMutation) 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 (*S3UserMutation) FkUserID ¶
func (m *S3UserMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*S3UserMutation) GetType ¶
func (m *S3UserMutation) GetType() (r int8, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*S3UserMutation) ID ¶
func (m *S3UserMutation) 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 (*S3UserMutation) 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 (*S3UserMutation) OldAccessKey ¶
func (m *S3UserMutation) OldAccessKey(ctx context.Context) (v string, err error)
OldAccessKey returns the old "access_key" field's value of the S3User entity. If the S3User 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 (*S3UserMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the S3User entity. If the S3User 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 (*S3UserMutation) 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 (*S3UserMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the S3User entity. If the S3User 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 (*S3UserMutation) OldSecretKey ¶
func (m *S3UserMutation) OldSecretKey(ctx context.Context) (v string, err error)
OldSecretKey returns the old "secret_key" field's value of the S3User entity. If the S3User 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 (*S3UserMutation) OldType ¶
func (m *S3UserMutation) OldType(ctx context.Context) (v int8, err error)
OldType returns the old "type" field's value of the S3User entity. If the S3User 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 (*S3UserMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the S3User entity. If the S3User 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 (*S3UserMutation) RemovedEdges ¶
func (m *S3UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*S3UserMutation) RemovedIDs ¶
func (m *S3UserMutation) 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 (*S3UserMutation) ResetAccessKey ¶
func (m *S3UserMutation) ResetAccessKey()
ResetAccessKey resets all changes to the "access_key" field.
func (*S3UserMutation) ResetCreateTime ¶
func (m *S3UserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*S3UserMutation) ResetEdge ¶
func (m *S3UserMutation) 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 (*S3UserMutation) ResetField ¶
func (m *S3UserMutation) 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 (*S3UserMutation) ResetFkUserID ¶
func (m *S3UserMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*S3UserMutation) ResetSecretKey ¶
func (m *S3UserMutation) ResetSecretKey()
ResetSecretKey resets all changes to the "secret_key" field.
func (*S3UserMutation) ResetType ¶
func (m *S3UserMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*S3UserMutation) ResetUpdateTime ¶
func (m *S3UserMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*S3UserMutation) SecretKey ¶
func (m *S3UserMutation) SecretKey() (r string, exists bool)
SecretKey returns the value of the "secret_key" field in the mutation.
func (*S3UserMutation) SetAccessKey ¶
func (m *S3UserMutation) SetAccessKey(s string)
SetAccessKey sets the "access_key" field.
func (*S3UserMutation) SetCreateTime ¶
func (m *S3UserMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*S3UserMutation) SetField ¶
func (m *S3UserMutation) 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 (*S3UserMutation) SetFkUserID ¶
func (m *S3UserMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*S3UserMutation) SetID ¶
func (m *S3UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of S3User entities.
func (*S3UserMutation) SetOp ¶
func (m *S3UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*S3UserMutation) SetSecretKey ¶
func (m *S3UserMutation) SetSecretKey(s string)
SetSecretKey sets the "secret_key" field.
func (*S3UserMutation) SetType ¶
func (m *S3UserMutation) SetType(i int8)
SetType sets the "type" field.
func (*S3UserMutation) SetUpdateTime ¶
func (m *S3UserMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (S3UserMutation) Tx ¶
func (m S3UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*S3UserMutation) Type ¶
func (m *S3UserMutation) Type() string
Type returns the node type of this mutation (S3User).
func (*S3UserMutation) UpdateTime ¶
func (m *S3UserMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*S3UserMutation) Where ¶
func (m *S3UserMutation) Where(ps ...predicate.S3User)
Where appends a list predicates to the S3UserMutation builder.
func (*S3UserMutation) WhereP ¶
func (m *S3UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the S3UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type S3UserQuery ¶
type S3UserQuery struct {
// contains filtered or unexported fields
}
S3UserQuery is the builder for querying S3User entities.
func (*S3UserQuery) Aggregate ¶
func (_q *S3UserQuery) Aggregate(fns ...AggregateFunc) *S3UserSelect
Aggregate returns a S3UserSelect configured with the given aggregations.
func (*S3UserQuery) All ¶
func (_q *S3UserQuery) All(ctx context.Context) ([]*S3User, error)
All executes the query and returns a list of S3Users.
func (*S3UserQuery) AllX ¶
func (_q *S3UserQuery) AllX(ctx context.Context) []*S3User
AllX is like All, but panics if an error occurs.
func (*S3UserQuery) Clone ¶
func (_q *S3UserQuery) Clone() *S3UserQuery
Clone returns a duplicate of the S3UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*S3UserQuery) Count ¶
func (_q *S3UserQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*S3UserQuery) CountX ¶
func (_q *S3UserQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*S3UserQuery) Exist ¶
func (_q *S3UserQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*S3UserQuery) ExistX ¶
func (_q *S3UserQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*S3UserQuery) First ¶
func (_q *S3UserQuery) First(ctx context.Context) (*S3User, error)
First returns the first S3User entity from the query. Returns a *NotFoundError when no S3User was found.
func (*S3UserQuery) FirstID ¶
FirstID returns the first S3User ID from the query. Returns a *NotFoundError when no S3User ID was found.
func (*S3UserQuery) FirstIDX ¶
func (_q *S3UserQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*S3UserQuery) FirstX ¶
func (_q *S3UserQuery) FirstX(ctx context.Context) *S3User
FirstX is like First, but panics if an error occurs.
func (*S3UserQuery) GroupBy ¶
func (_q *S3UserQuery) GroupBy(field string, fields ...string) *S3UserGroupBy
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.S3User.Query().
GroupBy(s3user.FieldFkUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*S3UserQuery) IDsX ¶
func (_q *S3UserQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*S3UserQuery) Limit ¶
func (_q *S3UserQuery) Limit(limit int) *S3UserQuery
Limit the number of records to be returned by this query.
func (*S3UserQuery) Offset ¶
func (_q *S3UserQuery) Offset(offset int) *S3UserQuery
Offset to start from.
func (*S3UserQuery) Only ¶
func (_q *S3UserQuery) Only(ctx context.Context) (*S3User, error)
Only returns a single S3User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one S3User entity is found. Returns a *NotFoundError when no S3User entities are found.
func (*S3UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only S3User ID in the query. Returns a *NotSingularError when more than one S3User ID is found. Returns a *NotFoundError when no entities are found.
func (*S3UserQuery) OnlyIDX ¶
func (_q *S3UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*S3UserQuery) OnlyX ¶
func (_q *S3UserQuery) OnlyX(ctx context.Context) *S3User
OnlyX is like Only, but panics if an error occurs.
func (*S3UserQuery) Order ¶
func (_q *S3UserQuery) Order(o ...s3user.OrderOption) *S3UserQuery
Order specifies how the records should be ordered.
func (*S3UserQuery) Select ¶
func (_q *S3UserQuery) Select(fields ...string) *S3UserSelect
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
}
client.S3User.Query().
Select(s3user.FieldFkUserID).
Scan(ctx, &v)
func (*S3UserQuery) Unique ¶
func (_q *S3UserQuery) Unique(unique bool) *S3UserQuery
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 (*S3UserQuery) Where ¶
func (_q *S3UserQuery) Where(ps ...predicate.S3User) *S3UserQuery
Where adds a new predicate for the S3UserQuery builder.
type S3UserSelect ¶
type S3UserSelect struct {
*S3UserQuery
// contains filtered or unexported fields
}
S3UserSelect is the builder for selecting fields of S3User entities.
func (*S3UserSelect) Aggregate ¶
func (_s *S3UserSelect) Aggregate(fns ...AggregateFunc) *S3UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*S3UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*S3UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*S3UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*S3UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*S3UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*S3UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*S3UserSelect) Scan ¶
func (_s *S3UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*S3UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type S3UserUpdate ¶
type S3UserUpdate struct {
// contains filtered or unexported fields
}
S3UserUpdate is the builder for updating S3User entities.
func (*S3UserUpdate) AddType ¶
func (_u *S3UserUpdate) AddType(v int8) *S3UserUpdate
AddType adds value to the "type" field.
func (*S3UserUpdate) Exec ¶
func (_u *S3UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*S3UserUpdate) ExecX ¶
func (_u *S3UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*S3UserUpdate) Mutation ¶
func (_u *S3UserUpdate) Mutation() *S3UserMutation
Mutation returns the S3UserMutation object of the builder.
func (*S3UserUpdate) Save ¶
func (_u *S3UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*S3UserUpdate) SaveX ¶
func (_u *S3UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*S3UserUpdate) SetAccessKey ¶
func (_u *S3UserUpdate) SetAccessKey(v string) *S3UserUpdate
SetAccessKey sets the "access_key" field.
func (*S3UserUpdate) SetCreateTime ¶
func (_u *S3UserUpdate) SetCreateTime(v time.Time) *S3UserUpdate
SetCreateTime sets the "create_time" field.
func (*S3UserUpdate) SetFkUserID ¶
func (_u *S3UserUpdate) SetFkUserID(v uuid.UUID) *S3UserUpdate
SetFkUserID sets the "fk_user_id" field.
func (*S3UserUpdate) SetNillableAccessKey ¶
func (_u *S3UserUpdate) SetNillableAccessKey(v *string) *S3UserUpdate
SetNillableAccessKey sets the "access_key" field if the given value is not nil.
func (*S3UserUpdate) SetNillableCreateTime ¶
func (_u *S3UserUpdate) SetNillableCreateTime(v *time.Time) *S3UserUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*S3UserUpdate) SetNillableFkUserID ¶
func (_u *S3UserUpdate) SetNillableFkUserID(v *uuid.UUID) *S3UserUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*S3UserUpdate) SetNillableSecretKey ¶
func (_u *S3UserUpdate) SetNillableSecretKey(v *string) *S3UserUpdate
SetNillableSecretKey sets the "secret_key" field if the given value is not nil.
func (*S3UserUpdate) SetNillableType ¶
func (_u *S3UserUpdate) SetNillableType(v *int8) *S3UserUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*S3UserUpdate) SetNillableUpdateTime ¶
func (_u *S3UserUpdate) SetNillableUpdateTime(v *time.Time) *S3UserUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*S3UserUpdate) SetSecretKey ¶
func (_u *S3UserUpdate) SetSecretKey(v string) *S3UserUpdate
SetSecretKey sets the "secret_key" field.
func (*S3UserUpdate) SetType ¶
func (_u *S3UserUpdate) SetType(v int8) *S3UserUpdate
SetType sets the "type" field.
func (*S3UserUpdate) SetUpdateTime ¶
func (_u *S3UserUpdate) SetUpdateTime(v time.Time) *S3UserUpdate
SetUpdateTime sets the "update_time" field.
func (*S3UserUpdate) Where ¶
func (_u *S3UserUpdate) Where(ps ...predicate.S3User) *S3UserUpdate
Where appends a list predicates to the S3UserUpdate builder.
type S3UserUpdateOne ¶
type S3UserUpdateOne struct {
// contains filtered or unexported fields
}
S3UserUpdateOne is the builder for updating a single S3User entity.
func (*S3UserUpdateOne) AddType ¶
func (_u *S3UserUpdateOne) AddType(v int8) *S3UserUpdateOne
AddType adds value to the "type" field.
func (*S3UserUpdateOne) Exec ¶
func (_u *S3UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*S3UserUpdateOne) ExecX ¶
func (_u *S3UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*S3UserUpdateOne) Mutation ¶
func (_u *S3UserUpdateOne) Mutation() *S3UserMutation
Mutation returns the S3UserMutation object of the builder.
func (*S3UserUpdateOne) Save ¶
func (_u *S3UserUpdateOne) Save(ctx context.Context) (*S3User, error)
Save executes the query and returns the updated S3User entity.
func (*S3UserUpdateOne) SaveX ¶
func (_u *S3UserUpdateOne) SaveX(ctx context.Context) *S3User
SaveX is like Save, but panics if an error occurs.
func (*S3UserUpdateOne) Select ¶
func (_u *S3UserUpdateOne) Select(field string, fields ...string) *S3UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*S3UserUpdateOne) SetAccessKey ¶
func (_u *S3UserUpdateOne) SetAccessKey(v string) *S3UserUpdateOne
SetAccessKey sets the "access_key" field.
func (*S3UserUpdateOne) SetCreateTime ¶
func (_u *S3UserUpdateOne) SetCreateTime(v time.Time) *S3UserUpdateOne
SetCreateTime sets the "create_time" field.
func (*S3UserUpdateOne) SetFkUserID ¶
func (_u *S3UserUpdateOne) SetFkUserID(v uuid.UUID) *S3UserUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*S3UserUpdateOne) SetNillableAccessKey ¶
func (_u *S3UserUpdateOne) SetNillableAccessKey(v *string) *S3UserUpdateOne
SetNillableAccessKey sets the "access_key" field if the given value is not nil.
func (*S3UserUpdateOne) SetNillableCreateTime ¶
func (_u *S3UserUpdateOne) SetNillableCreateTime(v *time.Time) *S3UserUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*S3UserUpdateOne) SetNillableFkUserID ¶
func (_u *S3UserUpdateOne) SetNillableFkUserID(v *uuid.UUID) *S3UserUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*S3UserUpdateOne) SetNillableSecretKey ¶
func (_u *S3UserUpdateOne) SetNillableSecretKey(v *string) *S3UserUpdateOne
SetNillableSecretKey sets the "secret_key" field if the given value is not nil.
func (*S3UserUpdateOne) SetNillableType ¶
func (_u *S3UserUpdateOne) SetNillableType(v *int8) *S3UserUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*S3UserUpdateOne) SetNillableUpdateTime ¶
func (_u *S3UserUpdateOne) SetNillableUpdateTime(v *time.Time) *S3UserUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*S3UserUpdateOne) SetSecretKey ¶
func (_u *S3UserUpdateOne) SetSecretKey(v string) *S3UserUpdateOne
SetSecretKey sets the "secret_key" field.
func (*S3UserUpdateOne) SetType ¶
func (_u *S3UserUpdateOne) SetType(v int8) *S3UserUpdateOne
SetType sets the "type" field.
func (*S3UserUpdateOne) SetUpdateTime ¶
func (_u *S3UserUpdateOne) SetUpdateTime(v time.Time) *S3UserUpdateOne
SetUpdateTime sets the "update_time" field.
func (*S3UserUpdateOne) Where ¶
func (_u *S3UserUpdateOne) Where(ps ...predicate.S3User) *S3UserUpdateOne
Where appends a list predicates to the S3UserUpdate builder.
type Script ¶
type Script struct {
// ID of the ent.
ID int32 `json:"id,omitempty"`
// UserID holds the value of the "user_id" field.
UserID string `json:"user_id,omitempty"`
// TaskNumber holds the value of the "task_number" field.
TaskNumber int32 `json:"task_number,omitempty"`
// ScriptName holds the value of the "script_name" field.
ScriptName string `json:"script_name,omitempty"`
// FileAddress holds the value of the "file_address" field.
FileAddress string `json:"file_address,omitempty"`
// ScriptContent holds the value of the "script_content" field.
ScriptContent string `json:"script_content,omitempty"`
// CreateTime holds the value of the "create_time" field.
CreateTime time.Time `json:"create_time,omitempty"`
// UpdateTime holds the value of the "update_time" field.
UpdateTime time.Time `json:"update_time,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ScriptQuery when eager-loading is set.
Edges ScriptEdges `json:"edges"`
// contains filtered or unexported fields
}
Script is the model entity for the Script schema.
func (*Script) QueryScriptExecutionRecords ¶
func (_m *Script) QueryScriptExecutionRecords() *ScriptExecutionRecordQuery
QueryScriptExecutionRecords queries the "scriptExecutionRecords" edge of the Script entity.
func (*Script) Unwrap ¶
Unwrap unwraps the Script entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Script) Update ¶
func (_m *Script) Update() *ScriptUpdateOne
Update returns a builder for updating this Script. Note that you need to call Script.Unwrap() before calling this method if this Script was returned from a transaction, and the transaction was committed or rolled back.
type ScriptClient ¶
type ScriptClient struct {
// contains filtered or unexported fields
}
ScriptClient is a client for the Script schema.
func NewScriptClient ¶
func NewScriptClient(c config) *ScriptClient
NewScriptClient returns a client for the Script from the given config.
func (*ScriptClient) Create ¶
func (c *ScriptClient) Create() *ScriptCreate
Create returns a builder for creating a Script entity.
func (*ScriptClient) CreateBulk ¶
func (c *ScriptClient) CreateBulk(builders ...*ScriptCreate) *ScriptCreateBulk
CreateBulk returns a builder for creating a bulk of Script entities.
func (*ScriptClient) Delete ¶
func (c *ScriptClient) Delete() *ScriptDelete
Delete returns a delete builder for Script.
func (*ScriptClient) DeleteOne ¶
func (c *ScriptClient) DeleteOne(_m *Script) *ScriptDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ScriptClient) DeleteOneID ¶
func (c *ScriptClient) DeleteOneID(id int32) *ScriptDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ScriptClient) GetX ¶
func (c *ScriptClient) GetX(ctx context.Context, id int32) *Script
GetX is like Get, but panics if an error occurs.
func (*ScriptClient) Intercept ¶
func (c *ScriptClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `script.Intercept(f(g(h())))`.
func (*ScriptClient) Interceptors ¶
func (c *ScriptClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ScriptClient) MapCreateBulk ¶
func (c *ScriptClient) MapCreateBulk(slice any, setFunc func(*ScriptCreate, int)) *ScriptCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ScriptClient) Query ¶
func (c *ScriptClient) Query() *ScriptQuery
Query returns a query builder for Script.
func (*ScriptClient) QueryScriptExecutionRecords ¶
func (c *ScriptClient) QueryScriptExecutionRecords(_m *Script) *ScriptExecutionRecordQuery
QueryScriptExecutionRecords queries the scriptExecutionRecords edge of a Script.
func (*ScriptClient) Update ¶
func (c *ScriptClient) Update() *ScriptUpdate
Update returns an update builder for Script.
func (*ScriptClient) UpdateOne ¶
func (c *ScriptClient) UpdateOne(_m *Script) *ScriptUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScriptClient) UpdateOneID ¶
func (c *ScriptClient) UpdateOneID(id int32) *ScriptUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScriptClient) Use ¶
func (c *ScriptClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `script.Hooks(f(g(h())))`.
type ScriptCreate ¶
type ScriptCreate struct {
// contains filtered or unexported fields
}
ScriptCreate is the builder for creating a Script entity.
func (*ScriptCreate) AddScriptExecutionRecordIDs ¶
func (_c *ScriptCreate) AddScriptExecutionRecordIDs(ids ...int32) *ScriptCreate
AddScriptExecutionRecordIDs adds the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by IDs.
func (*ScriptCreate) AddScriptExecutionRecords ¶
func (_c *ScriptCreate) AddScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptCreate
AddScriptExecutionRecords adds the "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptCreate) Exec ¶
func (_c *ScriptCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptCreate) ExecX ¶
func (_c *ScriptCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptCreate) Mutation ¶
func (_c *ScriptCreate) Mutation() *ScriptMutation
Mutation returns the ScriptMutation object of the builder.
func (*ScriptCreate) Save ¶
func (_c *ScriptCreate) Save(ctx context.Context) (*Script, error)
Save creates the Script in the database.
func (*ScriptCreate) SaveX ¶
func (_c *ScriptCreate) SaveX(ctx context.Context) *Script
SaveX calls Save and panics if Save returns an error.
func (*ScriptCreate) SetCreateTime ¶
func (_c *ScriptCreate) SetCreateTime(v time.Time) *ScriptCreate
SetCreateTime sets the "create_time" field.
func (*ScriptCreate) SetFileAddress ¶
func (_c *ScriptCreate) SetFileAddress(v string) *ScriptCreate
SetFileAddress sets the "file_address" field.
func (*ScriptCreate) SetID ¶
func (_c *ScriptCreate) SetID(v int32) *ScriptCreate
SetID sets the "id" field.
func (*ScriptCreate) SetNillableCreateTime ¶
func (_c *ScriptCreate) SetNillableCreateTime(v *time.Time) *ScriptCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptCreate) SetNillableUpdateTime ¶
func (_c *ScriptCreate) SetNillableUpdateTime(v *time.Time) *ScriptCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptCreate) SetScriptContent ¶
func (_c *ScriptCreate) SetScriptContent(v string) *ScriptCreate
SetScriptContent sets the "script_content" field.
func (*ScriptCreate) SetScriptName ¶
func (_c *ScriptCreate) SetScriptName(v string) *ScriptCreate
SetScriptName sets the "script_name" field.
func (*ScriptCreate) SetTaskNumber ¶
func (_c *ScriptCreate) SetTaskNumber(v int32) *ScriptCreate
SetTaskNumber sets the "task_number" field.
func (*ScriptCreate) SetUpdateTime ¶
func (_c *ScriptCreate) SetUpdateTime(v time.Time) *ScriptCreate
SetUpdateTime sets the "update_time" field.
func (*ScriptCreate) SetUserID ¶
func (_c *ScriptCreate) SetUserID(v string) *ScriptCreate
SetUserID sets the "user_id" field.
type ScriptCreateBulk ¶
type ScriptCreateBulk struct {
// contains filtered or unexported fields
}
ScriptCreateBulk is the builder for creating many Script entities in bulk.
func (*ScriptCreateBulk) Exec ¶
func (_c *ScriptCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptCreateBulk) ExecX ¶
func (_c *ScriptCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScriptDelete ¶
type ScriptDelete struct {
// contains filtered or unexported fields
}
ScriptDelete is the builder for deleting a Script entity.
func (*ScriptDelete) Exec ¶
func (_d *ScriptDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScriptDelete) ExecX ¶
func (_d *ScriptDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScriptDelete) Where ¶
func (_d *ScriptDelete) Where(ps ...predicate.Script) *ScriptDelete
Where appends a list predicates to the ScriptDelete builder.
type ScriptDeleteOne ¶
type ScriptDeleteOne struct {
// contains filtered or unexported fields
}
ScriptDeleteOne is the builder for deleting a single Script entity.
func (*ScriptDeleteOne) Exec ¶
func (_d *ScriptDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScriptDeleteOne) ExecX ¶
func (_d *ScriptDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptDeleteOne) Where ¶
func (_d *ScriptDeleteOne) Where(ps ...predicate.Script) *ScriptDeleteOne
Where appends a list predicates to the ScriptDelete builder.
type ScriptEdges ¶
type ScriptEdges struct {
// ScriptExecutionRecords holds the value of the scriptExecutionRecords edge.
ScriptExecutionRecords []*ScriptExecutionRecord `json:"scriptExecutionRecords,omitempty"`
// contains filtered or unexported fields
}
ScriptEdges holds the relations/edges for other nodes in the graph.
func (ScriptEdges) ScriptExecutionRecordsOrErr ¶
func (e ScriptEdges) ScriptExecutionRecordsOrErr() ([]*ScriptExecutionRecord, error)
ScriptExecutionRecordsOrErr returns the ScriptExecutionRecords value or an error if the edge was not loaded in eager-loading.
type ScriptExecutionRecord ¶
type ScriptExecutionRecord struct {
// ID of the ent.
ID int32 `json:"id,omitempty"`
// UserID holds the value of the "user_id" field.
UserID string `json:"user_id,omitempty"`
// FkScriptID holds the value of the "fk_script_id" field.
FkScriptID int32 `json:"fk_script_id,omitempty"`
// ScriptContent holds the value of the "script_content" field.
ScriptContent string `json:"script_content,omitempty"`
// TaskNumber holds the value of the "task_number" field.
TaskNumber int32 `json:"task_number,omitempty"`
// ScriptName holds the value of the "script_name" field.
ScriptName string `json:"script_name,omitempty"`
// FileAddress holds the value of the "file_address" field.
FileAddress string `json:"file_address,omitempty"`
// ExecuteState holds the value of the "execute_state" field.
ExecuteState int32 `json:"execute_state,omitempty"`
// ExecuteResult holds the value of the "execute_result" field.
ExecuteResult string `json:"execute_result,omitempty"`
// CreateTime holds the value of the "create_time" field.
CreateTime time.Time `json:"create_time,omitempty"`
// UpdateTime holds the value of the "update_time" field.
UpdateTime time.Time `json:"update_time,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ScriptExecutionRecordQuery when eager-loading is set.
Edges ScriptExecutionRecordEdges `json:"edges"`
// contains filtered or unexported fields
}
ScriptExecutionRecord is the model entity for the ScriptExecutionRecord schema.
func (*ScriptExecutionRecord) QueryScript ¶
func (_m *ScriptExecutionRecord) QueryScript() *ScriptQuery
QueryScript queries the "script" edge of the ScriptExecutionRecord entity.
func (*ScriptExecutionRecord) String ¶
func (_m *ScriptExecutionRecord) String() string
String implements the fmt.Stringer.
func (*ScriptExecutionRecord) Unwrap ¶
func (_m *ScriptExecutionRecord) Unwrap() *ScriptExecutionRecord
Unwrap unwraps the ScriptExecutionRecord 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 (*ScriptExecutionRecord) Update ¶
func (_m *ScriptExecutionRecord) Update() *ScriptExecutionRecordUpdateOne
Update returns a builder for updating this ScriptExecutionRecord. Note that you need to call ScriptExecutionRecord.Unwrap() before calling this method if this ScriptExecutionRecord was returned from a transaction, and the transaction was committed or rolled back.
type ScriptExecutionRecordClient ¶
type ScriptExecutionRecordClient struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordClient is a client for the ScriptExecutionRecord schema.
func NewScriptExecutionRecordClient ¶
func NewScriptExecutionRecordClient(c config) *ScriptExecutionRecordClient
NewScriptExecutionRecordClient returns a client for the ScriptExecutionRecord from the given config.
func (*ScriptExecutionRecordClient) Create ¶
func (c *ScriptExecutionRecordClient) Create() *ScriptExecutionRecordCreate
Create returns a builder for creating a ScriptExecutionRecord entity.
func (*ScriptExecutionRecordClient) CreateBulk ¶
func (c *ScriptExecutionRecordClient) CreateBulk(builders ...*ScriptExecutionRecordCreate) *ScriptExecutionRecordCreateBulk
CreateBulk returns a builder for creating a bulk of ScriptExecutionRecord entities.
func (*ScriptExecutionRecordClient) Delete ¶
func (c *ScriptExecutionRecordClient) Delete() *ScriptExecutionRecordDelete
Delete returns a delete builder for ScriptExecutionRecord.
func (*ScriptExecutionRecordClient) DeleteOne ¶
func (c *ScriptExecutionRecordClient) DeleteOne(_m *ScriptExecutionRecord) *ScriptExecutionRecordDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ScriptExecutionRecordClient) DeleteOneID ¶
func (c *ScriptExecutionRecordClient) DeleteOneID(id int32) *ScriptExecutionRecordDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ScriptExecutionRecordClient) Get ¶
func (c *ScriptExecutionRecordClient) Get(ctx context.Context, id int32) (*ScriptExecutionRecord, error)
Get returns a ScriptExecutionRecord entity by its id.
func (*ScriptExecutionRecordClient) GetX ¶
func (c *ScriptExecutionRecordClient) GetX(ctx context.Context, id int32) *ScriptExecutionRecord
GetX is like Get, but panics if an error occurs.
func (*ScriptExecutionRecordClient) Hooks ¶
func (c *ScriptExecutionRecordClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ScriptExecutionRecordClient) Intercept ¶
func (c *ScriptExecutionRecordClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `scriptexecutionrecord.Intercept(f(g(h())))`.
func (*ScriptExecutionRecordClient) Interceptors ¶
func (c *ScriptExecutionRecordClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ScriptExecutionRecordClient) MapCreateBulk ¶
func (c *ScriptExecutionRecordClient) MapCreateBulk(slice any, setFunc func(*ScriptExecutionRecordCreate, int)) *ScriptExecutionRecordCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ScriptExecutionRecordClient) Query ¶
func (c *ScriptExecutionRecordClient) Query() *ScriptExecutionRecordQuery
Query returns a query builder for ScriptExecutionRecord.
func (*ScriptExecutionRecordClient) QueryScript ¶
func (c *ScriptExecutionRecordClient) QueryScript(_m *ScriptExecutionRecord) *ScriptQuery
QueryScript queries the script edge of a ScriptExecutionRecord.
func (*ScriptExecutionRecordClient) Update ¶
func (c *ScriptExecutionRecordClient) Update() *ScriptExecutionRecordUpdate
Update returns an update builder for ScriptExecutionRecord.
func (*ScriptExecutionRecordClient) UpdateOne ¶
func (c *ScriptExecutionRecordClient) UpdateOne(_m *ScriptExecutionRecord) *ScriptExecutionRecordUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScriptExecutionRecordClient) UpdateOneID ¶
func (c *ScriptExecutionRecordClient) UpdateOneID(id int32) *ScriptExecutionRecordUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScriptExecutionRecordClient) Use ¶
func (c *ScriptExecutionRecordClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scriptexecutionrecord.Hooks(f(g(h())))`.
type ScriptExecutionRecordCreate ¶
type ScriptExecutionRecordCreate struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordCreate is the builder for creating a ScriptExecutionRecord entity.
func (*ScriptExecutionRecordCreate) Exec ¶
func (_c *ScriptExecutionRecordCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptExecutionRecordCreate) ExecX ¶
func (_c *ScriptExecutionRecordCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordCreate) Mutation ¶
func (_c *ScriptExecutionRecordCreate) Mutation() *ScriptExecutionRecordMutation
Mutation returns the ScriptExecutionRecordMutation object of the builder.
func (*ScriptExecutionRecordCreate) Save ¶
func (_c *ScriptExecutionRecordCreate) Save(ctx context.Context) (*ScriptExecutionRecord, error)
Save creates the ScriptExecutionRecord in the database.
func (*ScriptExecutionRecordCreate) SaveX ¶
func (_c *ScriptExecutionRecordCreate) SaveX(ctx context.Context) *ScriptExecutionRecord
SaveX calls Save and panics if Save returns an error.
func (*ScriptExecutionRecordCreate) SetCreateTime ¶
func (_c *ScriptExecutionRecordCreate) SetCreateTime(v time.Time) *ScriptExecutionRecordCreate
SetCreateTime sets the "create_time" field.
func (*ScriptExecutionRecordCreate) SetExecuteResult ¶
func (_c *ScriptExecutionRecordCreate) SetExecuteResult(v string) *ScriptExecutionRecordCreate
SetExecuteResult sets the "execute_result" field.
func (*ScriptExecutionRecordCreate) SetExecuteState ¶
func (_c *ScriptExecutionRecordCreate) SetExecuteState(v int32) *ScriptExecutionRecordCreate
SetExecuteState sets the "execute_state" field.
func (*ScriptExecutionRecordCreate) SetFileAddress ¶
func (_c *ScriptExecutionRecordCreate) SetFileAddress(v string) *ScriptExecutionRecordCreate
SetFileAddress sets the "file_address" field.
func (*ScriptExecutionRecordCreate) SetFkScriptID ¶
func (_c *ScriptExecutionRecordCreate) SetFkScriptID(v int32) *ScriptExecutionRecordCreate
SetFkScriptID sets the "fk_script_id" field.
func (*ScriptExecutionRecordCreate) SetID ¶
func (_c *ScriptExecutionRecordCreate) SetID(v int32) *ScriptExecutionRecordCreate
SetID sets the "id" field.
func (*ScriptExecutionRecordCreate) SetNillableCreateTime ¶
func (_c *ScriptExecutionRecordCreate) SetNillableCreateTime(v *time.Time) *ScriptExecutionRecordCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptExecutionRecordCreate) SetNillableScriptID ¶
func (_c *ScriptExecutionRecordCreate) SetNillableScriptID(id *int32) *ScriptExecutionRecordCreate
SetNillableScriptID sets the "script" edge to the Script entity by ID if the given value is not nil.
func (*ScriptExecutionRecordCreate) SetNillableUpdateTime ¶
func (_c *ScriptExecutionRecordCreate) SetNillableUpdateTime(v *time.Time) *ScriptExecutionRecordCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptExecutionRecordCreate) SetScript ¶
func (_c *ScriptExecutionRecordCreate) SetScript(v *Script) *ScriptExecutionRecordCreate
SetScript sets the "script" edge to the Script entity.
func (*ScriptExecutionRecordCreate) SetScriptContent ¶
func (_c *ScriptExecutionRecordCreate) SetScriptContent(v string) *ScriptExecutionRecordCreate
SetScriptContent sets the "script_content" field.
func (*ScriptExecutionRecordCreate) SetScriptID ¶
func (_c *ScriptExecutionRecordCreate) SetScriptID(id int32) *ScriptExecutionRecordCreate
SetScriptID sets the "script" edge to the Script entity by ID.
func (*ScriptExecutionRecordCreate) SetScriptName ¶
func (_c *ScriptExecutionRecordCreate) SetScriptName(v string) *ScriptExecutionRecordCreate
SetScriptName sets the "script_name" field.
func (*ScriptExecutionRecordCreate) SetTaskNumber ¶
func (_c *ScriptExecutionRecordCreate) SetTaskNumber(v int32) *ScriptExecutionRecordCreate
SetTaskNumber sets the "task_number" field.
func (*ScriptExecutionRecordCreate) SetUpdateTime ¶
func (_c *ScriptExecutionRecordCreate) SetUpdateTime(v time.Time) *ScriptExecutionRecordCreate
SetUpdateTime sets the "update_time" field.
func (*ScriptExecutionRecordCreate) SetUserID ¶
func (_c *ScriptExecutionRecordCreate) SetUserID(v string) *ScriptExecutionRecordCreate
SetUserID sets the "user_id" field.
type ScriptExecutionRecordCreateBulk ¶
type ScriptExecutionRecordCreateBulk struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordCreateBulk is the builder for creating many ScriptExecutionRecord entities in bulk.
func (*ScriptExecutionRecordCreateBulk) Exec ¶
func (_c *ScriptExecutionRecordCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptExecutionRecordCreateBulk) ExecX ¶
func (_c *ScriptExecutionRecordCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordCreateBulk) Save ¶
func (_c *ScriptExecutionRecordCreateBulk) Save(ctx context.Context) ([]*ScriptExecutionRecord, error)
Save creates the ScriptExecutionRecord entities in the database.
func (*ScriptExecutionRecordCreateBulk) SaveX ¶
func (_c *ScriptExecutionRecordCreateBulk) SaveX(ctx context.Context) []*ScriptExecutionRecord
SaveX is like Save, but panics if an error occurs.
type ScriptExecutionRecordDelete ¶
type ScriptExecutionRecordDelete struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordDelete is the builder for deleting a ScriptExecutionRecord entity.
func (*ScriptExecutionRecordDelete) Exec ¶
func (_d *ScriptExecutionRecordDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScriptExecutionRecordDelete) ExecX ¶
func (_d *ScriptExecutionRecordDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordDelete) Where ¶
func (_d *ScriptExecutionRecordDelete) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordDelete
Where appends a list predicates to the ScriptExecutionRecordDelete builder.
type ScriptExecutionRecordDeleteOne ¶
type ScriptExecutionRecordDeleteOne struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordDeleteOne is the builder for deleting a single ScriptExecutionRecord entity.
func (*ScriptExecutionRecordDeleteOne) Exec ¶
func (_d *ScriptExecutionRecordDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScriptExecutionRecordDeleteOne) ExecX ¶
func (_d *ScriptExecutionRecordDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordDeleteOne) Where ¶
func (_d *ScriptExecutionRecordDeleteOne) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordDeleteOne
Where appends a list predicates to the ScriptExecutionRecordDelete builder.
type ScriptExecutionRecordEdges ¶
type ScriptExecutionRecordEdges struct {
// Script holds the value of the script edge.
Script *Script `json:"script,omitempty"`
// contains filtered or unexported fields
}
ScriptExecutionRecordEdges holds the relations/edges for other nodes in the graph.
func (ScriptExecutionRecordEdges) ScriptOrErr ¶
func (e ScriptExecutionRecordEdges) ScriptOrErr() (*Script, error)
ScriptOrErr returns the Script value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ScriptExecutionRecordGroupBy ¶
type ScriptExecutionRecordGroupBy struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordGroupBy is the group-by builder for ScriptExecutionRecord entities.
func (*ScriptExecutionRecordGroupBy) Aggregate ¶
func (_g *ScriptExecutionRecordGroupBy) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScriptExecutionRecordGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*ScriptExecutionRecordGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ScriptExecutionRecordGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) Scan ¶
func (_g *ScriptExecutionRecordGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptExecutionRecordGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) StringX ¶
StringX is like String, but panics if an error occurs.
type ScriptExecutionRecordMutation ¶
type ScriptExecutionRecordMutation struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordMutation represents an operation that mutates the ScriptExecutionRecord nodes in the graph.
func (*ScriptExecutionRecordMutation) AddExecuteState ¶
func (m *ScriptExecutionRecordMutation) AddExecuteState(i int32)
AddExecuteState adds i to the "execute_state" field.
func (*ScriptExecutionRecordMutation) AddField ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) AddFkScriptID ¶
func (m *ScriptExecutionRecordMutation) AddFkScriptID(i int32)
AddFkScriptID adds i to the "fk_script_id" field.
func (*ScriptExecutionRecordMutation) AddTaskNumber ¶
func (m *ScriptExecutionRecordMutation) AddTaskNumber(i int32)
AddTaskNumber adds i to the "task_number" field.
func (*ScriptExecutionRecordMutation) AddedEdges ¶
func (m *ScriptExecutionRecordMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScriptExecutionRecordMutation) AddedExecuteState ¶
func (m *ScriptExecutionRecordMutation) AddedExecuteState() (r int32, exists bool)
AddedExecuteState returns the value that was added to the "execute_state" field in this mutation.
func (*ScriptExecutionRecordMutation) AddedField ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) AddedFields ¶
func (m *ScriptExecutionRecordMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScriptExecutionRecordMutation) AddedFkScriptID ¶
func (m *ScriptExecutionRecordMutation) AddedFkScriptID() (r int32, exists bool)
AddedFkScriptID returns the value that was added to the "fk_script_id" field in this mutation.
func (*ScriptExecutionRecordMutation) AddedIDs ¶
func (m *ScriptExecutionRecordMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScriptExecutionRecordMutation) AddedTaskNumber ¶
func (m *ScriptExecutionRecordMutation) AddedTaskNumber() (r int32, exists bool)
AddedTaskNumber returns the value that was added to the "task_number" field in this mutation.
func (*ScriptExecutionRecordMutation) ClearEdge ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ClearField ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ClearScript ¶
func (m *ScriptExecutionRecordMutation) ClearScript()
ClearScript clears the "script" edge to the Script entity.
func (*ScriptExecutionRecordMutation) ClearedEdges ¶
func (m *ScriptExecutionRecordMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScriptExecutionRecordMutation) ClearedFields ¶
func (m *ScriptExecutionRecordMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScriptExecutionRecordMutation) Client ¶
func (m ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) CreateTime ¶
func (m *ScriptExecutionRecordMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ScriptExecutionRecordMutation) EdgeCleared ¶
func (m *ScriptExecutionRecordMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScriptExecutionRecordMutation) ExecuteResult ¶
func (m *ScriptExecutionRecordMutation) ExecuteResult() (r string, exists bool)
ExecuteResult returns the value of the "execute_result" field in the mutation.
func (*ScriptExecutionRecordMutation) ExecuteState ¶
func (m *ScriptExecutionRecordMutation) ExecuteState() (r int32, exists bool)
ExecuteState returns the value of the "execute_state" field in the mutation.
func (*ScriptExecutionRecordMutation) Field ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) FieldCleared ¶
func (m *ScriptExecutionRecordMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScriptExecutionRecordMutation) Fields ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) FileAddress ¶
func (m *ScriptExecutionRecordMutation) FileAddress() (r string, exists bool)
FileAddress returns the value of the "file_address" field in the mutation.
func (*ScriptExecutionRecordMutation) FkScriptID ¶
func (m *ScriptExecutionRecordMutation) FkScriptID() (r int32, exists bool)
FkScriptID returns the value of the "fk_script_id" field in the mutation.
func (*ScriptExecutionRecordMutation) ID ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) IDs ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) OldExecuteResult ¶
func (m *ScriptExecutionRecordMutation) OldExecuteResult(ctx context.Context) (v string, err error)
OldExecuteResult returns the old "execute_result" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) OldExecuteState ¶
func (m *ScriptExecutionRecordMutation) OldExecuteState(ctx context.Context) (v int32, err error)
OldExecuteState returns the old "execute_state" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) OldField ¶
func (m *ScriptExecutionRecordMutation) OldField(ctx context.Context, name string) (ent.Value, error)
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 (*ScriptExecutionRecordMutation) OldFileAddress ¶
func (m *ScriptExecutionRecordMutation) OldFileAddress(ctx context.Context) (v string, err error)
OldFileAddress returns the old "file_address" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) OldFkScriptID ¶
func (m *ScriptExecutionRecordMutation) OldFkScriptID(ctx context.Context) (v int32, err error)
OldFkScriptID returns the old "fk_script_id" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) OldScriptContent ¶
func (m *ScriptExecutionRecordMutation) OldScriptContent(ctx context.Context) (v string, err error)
OldScriptContent returns the old "script_content" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) OldScriptName ¶
func (m *ScriptExecutionRecordMutation) OldScriptName(ctx context.Context) (v string, err error)
OldScriptName returns the old "script_name" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) OldTaskNumber ¶
func (m *ScriptExecutionRecordMutation) OldTaskNumber(ctx context.Context) (v int32, err error)
OldTaskNumber returns the old "task_number" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) OldUserID ¶
func (m *ScriptExecutionRecordMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord 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 (*ScriptExecutionRecordMutation) Op ¶
func (m *ScriptExecutionRecordMutation) Op() Op
Op returns the operation name.
func (*ScriptExecutionRecordMutation) RemovedEdges ¶
func (m *ScriptExecutionRecordMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScriptExecutionRecordMutation) RemovedIDs ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ResetCreateTime ¶
func (m *ScriptExecutionRecordMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ScriptExecutionRecordMutation) ResetEdge ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ResetExecuteResult ¶
func (m *ScriptExecutionRecordMutation) ResetExecuteResult()
ResetExecuteResult resets all changes to the "execute_result" field.
func (*ScriptExecutionRecordMutation) ResetExecuteState ¶
func (m *ScriptExecutionRecordMutation) ResetExecuteState()
ResetExecuteState resets all changes to the "execute_state" field.
func (*ScriptExecutionRecordMutation) ResetField ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ResetFileAddress ¶
func (m *ScriptExecutionRecordMutation) ResetFileAddress()
ResetFileAddress resets all changes to the "file_address" field.
func (*ScriptExecutionRecordMutation) ResetFkScriptID ¶
func (m *ScriptExecutionRecordMutation) ResetFkScriptID()
ResetFkScriptID resets all changes to the "fk_script_id" field.
func (*ScriptExecutionRecordMutation) ResetScript ¶
func (m *ScriptExecutionRecordMutation) ResetScript()
ResetScript resets all changes to the "script" edge.
func (*ScriptExecutionRecordMutation) ResetScriptContent ¶
func (m *ScriptExecutionRecordMutation) ResetScriptContent()
ResetScriptContent resets all changes to the "script_content" field.
func (*ScriptExecutionRecordMutation) ResetScriptName ¶
func (m *ScriptExecutionRecordMutation) ResetScriptName()
ResetScriptName resets all changes to the "script_name" field.
func (*ScriptExecutionRecordMutation) ResetTaskNumber ¶
func (m *ScriptExecutionRecordMutation) ResetTaskNumber()
ResetTaskNumber resets all changes to the "task_number" field.
func (*ScriptExecutionRecordMutation) ResetUpdateTime ¶
func (m *ScriptExecutionRecordMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ScriptExecutionRecordMutation) ResetUserID ¶
func (m *ScriptExecutionRecordMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ScriptExecutionRecordMutation) ScriptCleared ¶
func (m *ScriptExecutionRecordMutation) ScriptCleared() bool
ScriptCleared reports if the "script" edge to the Script entity was cleared.
func (*ScriptExecutionRecordMutation) ScriptContent ¶
func (m *ScriptExecutionRecordMutation) ScriptContent() (r string, exists bool)
ScriptContent returns the value of the "script_content" field in the mutation.
func (*ScriptExecutionRecordMutation) ScriptID ¶
func (m *ScriptExecutionRecordMutation) ScriptID() (id int32, exists bool)
ScriptID returns the "script" edge ID in the mutation.
func (*ScriptExecutionRecordMutation) ScriptIDs ¶
func (m *ScriptExecutionRecordMutation) ScriptIDs() (ids []int32)
ScriptIDs returns the "script" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScriptID instead. It exists only for internal usage by the builders.
func (*ScriptExecutionRecordMutation) ScriptName ¶
func (m *ScriptExecutionRecordMutation) ScriptName() (r string, exists bool)
ScriptName returns the value of the "script_name" field in the mutation.
func (*ScriptExecutionRecordMutation) SetCreateTime ¶
func (m *ScriptExecutionRecordMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ScriptExecutionRecordMutation) SetExecuteResult ¶
func (m *ScriptExecutionRecordMutation) SetExecuteResult(s string)
SetExecuteResult sets the "execute_result" field.
func (*ScriptExecutionRecordMutation) SetExecuteState ¶
func (m *ScriptExecutionRecordMutation) SetExecuteState(i int32)
SetExecuteState sets the "execute_state" field.
func (*ScriptExecutionRecordMutation) SetField ¶
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) SetFileAddress ¶
func (m *ScriptExecutionRecordMutation) SetFileAddress(s string)
SetFileAddress sets the "file_address" field.
func (*ScriptExecutionRecordMutation) SetFkScriptID ¶
func (m *ScriptExecutionRecordMutation) SetFkScriptID(i int32)
SetFkScriptID sets the "fk_script_id" field.
func (*ScriptExecutionRecordMutation) SetID ¶
func (m *ScriptExecutionRecordMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ScriptExecutionRecord entities.
func (*ScriptExecutionRecordMutation) SetOp ¶
func (m *ScriptExecutionRecordMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ScriptExecutionRecordMutation) SetScriptContent ¶
func (m *ScriptExecutionRecordMutation) SetScriptContent(s string)
SetScriptContent sets the "script_content" field.
func (*ScriptExecutionRecordMutation) SetScriptID ¶
func (m *ScriptExecutionRecordMutation) SetScriptID(id int32)
SetScriptID sets the "script" edge to the Script entity by id.
func (*ScriptExecutionRecordMutation) SetScriptName ¶
func (m *ScriptExecutionRecordMutation) SetScriptName(s string)
SetScriptName sets the "script_name" field.
func (*ScriptExecutionRecordMutation) SetTaskNumber ¶
func (m *ScriptExecutionRecordMutation) SetTaskNumber(i int32)
SetTaskNumber sets the "task_number" field.
func (*ScriptExecutionRecordMutation) SetUpdateTime ¶
func (m *ScriptExecutionRecordMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ScriptExecutionRecordMutation) SetUserID ¶
func (m *ScriptExecutionRecordMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*ScriptExecutionRecordMutation) TaskNumber ¶
func (m *ScriptExecutionRecordMutation) TaskNumber() (r int32, exists bool)
TaskNumber returns the value of the "task_number" field in the mutation.
func (ScriptExecutionRecordMutation) Tx ¶
func (m ScriptExecutionRecordMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScriptExecutionRecordMutation) Type ¶
func (m *ScriptExecutionRecordMutation) Type() string
Type returns the node type of this mutation (ScriptExecutionRecord).
func (*ScriptExecutionRecordMutation) UpdateTime ¶
func (m *ScriptExecutionRecordMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ScriptExecutionRecordMutation) UserID ¶
func (m *ScriptExecutionRecordMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ScriptExecutionRecordMutation) Where ¶
func (m *ScriptExecutionRecordMutation) Where(ps ...predicate.ScriptExecutionRecord)
Where appends a list predicates to the ScriptExecutionRecordMutation builder.
func (*ScriptExecutionRecordMutation) WhereP ¶
func (m *ScriptExecutionRecordMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ScriptExecutionRecordMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ScriptExecutionRecordQuery ¶
type ScriptExecutionRecordQuery struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordQuery is the builder for querying ScriptExecutionRecord entities.
func (*ScriptExecutionRecordQuery) Aggregate ¶
func (_q *ScriptExecutionRecordQuery) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordSelect
Aggregate returns a ScriptExecutionRecordSelect configured with the given aggregations.
func (*ScriptExecutionRecordQuery) All ¶
func (_q *ScriptExecutionRecordQuery) All(ctx context.Context) ([]*ScriptExecutionRecord, error)
All executes the query and returns a list of ScriptExecutionRecords.
func (*ScriptExecutionRecordQuery) AllX ¶
func (_q *ScriptExecutionRecordQuery) AllX(ctx context.Context) []*ScriptExecutionRecord
AllX is like All, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) Clone ¶
func (_q *ScriptExecutionRecordQuery) Clone() *ScriptExecutionRecordQuery
Clone returns a duplicate of the ScriptExecutionRecordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScriptExecutionRecordQuery) Count ¶
func (_q *ScriptExecutionRecordQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScriptExecutionRecordQuery) CountX ¶
func (_q *ScriptExecutionRecordQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) Exist ¶
func (_q *ScriptExecutionRecordQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScriptExecutionRecordQuery) ExistX ¶
func (_q *ScriptExecutionRecordQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) First ¶
func (_q *ScriptExecutionRecordQuery) First(ctx context.Context) (*ScriptExecutionRecord, error)
First returns the first ScriptExecutionRecord entity from the query. Returns a *NotFoundError when no ScriptExecutionRecord was found.
func (*ScriptExecutionRecordQuery) FirstID ¶
func (_q *ScriptExecutionRecordQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first ScriptExecutionRecord ID from the query. Returns a *NotFoundError when no ScriptExecutionRecord ID was found.
func (*ScriptExecutionRecordQuery) FirstIDX ¶
func (_q *ScriptExecutionRecordQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) FirstX ¶
func (_q *ScriptExecutionRecordQuery) FirstX(ctx context.Context) *ScriptExecutionRecord
FirstX is like First, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) GroupBy ¶
func (_q *ScriptExecutionRecordQuery) GroupBy(field string, fields ...string) *ScriptExecutionRecordGroupBy
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 {
UserID string `json:"user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.ScriptExecutionRecord.Query().
GroupBy(scriptexecutionrecord.FieldUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ScriptExecutionRecordQuery) IDs ¶
func (_q *ScriptExecutionRecordQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of ScriptExecutionRecord IDs.
func (*ScriptExecutionRecordQuery) IDsX ¶
func (_q *ScriptExecutionRecordQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) Limit ¶
func (_q *ScriptExecutionRecordQuery) Limit(limit int) *ScriptExecutionRecordQuery
Limit the number of records to be returned by this query.
func (*ScriptExecutionRecordQuery) Offset ¶
func (_q *ScriptExecutionRecordQuery) Offset(offset int) *ScriptExecutionRecordQuery
Offset to start from.
func (*ScriptExecutionRecordQuery) Only ¶
func (_q *ScriptExecutionRecordQuery) Only(ctx context.Context) (*ScriptExecutionRecord, error)
Only returns a single ScriptExecutionRecord entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ScriptExecutionRecord entity is found. Returns a *NotFoundError when no ScriptExecutionRecord entities are found.
func (*ScriptExecutionRecordQuery) OnlyID ¶
func (_q *ScriptExecutionRecordQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only ScriptExecutionRecord ID in the query. Returns a *NotSingularError when more than one ScriptExecutionRecord ID is found. Returns a *NotFoundError when no entities are found.
func (*ScriptExecutionRecordQuery) OnlyIDX ¶
func (_q *ScriptExecutionRecordQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) OnlyX ¶
func (_q *ScriptExecutionRecordQuery) OnlyX(ctx context.Context) *ScriptExecutionRecord
OnlyX is like Only, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) Order ¶
func (_q *ScriptExecutionRecordQuery) Order(o ...scriptexecutionrecord.OrderOption) *ScriptExecutionRecordQuery
Order specifies how the records should be ordered.
func (*ScriptExecutionRecordQuery) QueryScript ¶
func (_q *ScriptExecutionRecordQuery) QueryScript() *ScriptQuery
QueryScript chains the current query on the "script" edge.
func (*ScriptExecutionRecordQuery) Select ¶
func (_q *ScriptExecutionRecordQuery) Select(fields ...string) *ScriptExecutionRecordSelect
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 {
UserID string `json:"user_id,omitempty"`
}
client.ScriptExecutionRecord.Query().
Select(scriptexecutionrecord.FieldUserID).
Scan(ctx, &v)
func (*ScriptExecutionRecordQuery) Unique ¶
func (_q *ScriptExecutionRecordQuery) Unique(unique bool) *ScriptExecutionRecordQuery
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 (*ScriptExecutionRecordQuery) Where ¶
func (_q *ScriptExecutionRecordQuery) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordQuery
Where adds a new predicate for the ScriptExecutionRecordQuery builder.
func (*ScriptExecutionRecordQuery) WithScript ¶
func (_q *ScriptExecutionRecordQuery) WithScript(opts ...func(*ScriptQuery)) *ScriptExecutionRecordQuery
WithScript tells the query-builder to eager-load the nodes that are connected to the "script" edge. The optional arguments are used to configure the query builder of the edge.
type ScriptExecutionRecordSelect ¶
type ScriptExecutionRecordSelect struct {
*ScriptExecutionRecordQuery
// contains filtered or unexported fields
}
ScriptExecutionRecordSelect is the builder for selecting fields of ScriptExecutionRecord entities.
func (*ScriptExecutionRecordSelect) Aggregate ¶
func (_s *ScriptExecutionRecordSelect) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ScriptExecutionRecordSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*ScriptExecutionRecordSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ScriptExecutionRecordSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) Scan ¶
func (_s *ScriptExecutionRecordSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptExecutionRecordSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) StringX ¶
StringX is like String, but panics if an error occurs.
type ScriptExecutionRecordUpdate ¶
type ScriptExecutionRecordUpdate struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordUpdate is the builder for updating ScriptExecutionRecord entities.
func (*ScriptExecutionRecordUpdate) AddExecuteState ¶
func (_u *ScriptExecutionRecordUpdate) AddExecuteState(v int32) *ScriptExecutionRecordUpdate
AddExecuteState adds value to the "execute_state" field.
func (*ScriptExecutionRecordUpdate) AddFkScriptID ¶
func (_u *ScriptExecutionRecordUpdate) AddFkScriptID(v int32) *ScriptExecutionRecordUpdate
AddFkScriptID adds value to the "fk_script_id" field.
func (*ScriptExecutionRecordUpdate) AddTaskNumber ¶
func (_u *ScriptExecutionRecordUpdate) AddTaskNumber(v int32) *ScriptExecutionRecordUpdate
AddTaskNumber adds value to the "task_number" field.
func (*ScriptExecutionRecordUpdate) ClearScript ¶
func (_u *ScriptExecutionRecordUpdate) ClearScript() *ScriptExecutionRecordUpdate
ClearScript clears the "script" edge to the Script entity.
func (*ScriptExecutionRecordUpdate) Exec ¶
func (_u *ScriptExecutionRecordUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptExecutionRecordUpdate) ExecX ¶
func (_u *ScriptExecutionRecordUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordUpdate) Mutation ¶
func (_u *ScriptExecutionRecordUpdate) Mutation() *ScriptExecutionRecordMutation
Mutation returns the ScriptExecutionRecordMutation object of the builder.
func (*ScriptExecutionRecordUpdate) Save ¶
func (_u *ScriptExecutionRecordUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScriptExecutionRecordUpdate) SaveX ¶
func (_u *ScriptExecutionRecordUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScriptExecutionRecordUpdate) SetCreateTime ¶
func (_u *ScriptExecutionRecordUpdate) SetCreateTime(v time.Time) *ScriptExecutionRecordUpdate
SetCreateTime sets the "create_time" field.
func (*ScriptExecutionRecordUpdate) SetExecuteResult ¶
func (_u *ScriptExecutionRecordUpdate) SetExecuteResult(v string) *ScriptExecutionRecordUpdate
SetExecuteResult sets the "execute_result" field.
func (*ScriptExecutionRecordUpdate) SetExecuteState ¶
func (_u *ScriptExecutionRecordUpdate) SetExecuteState(v int32) *ScriptExecutionRecordUpdate
SetExecuteState sets the "execute_state" field.
func (*ScriptExecutionRecordUpdate) SetFileAddress ¶
func (_u *ScriptExecutionRecordUpdate) SetFileAddress(v string) *ScriptExecutionRecordUpdate
SetFileAddress sets the "file_address" field.
func (*ScriptExecutionRecordUpdate) SetFkScriptID ¶
func (_u *ScriptExecutionRecordUpdate) SetFkScriptID(v int32) *ScriptExecutionRecordUpdate
SetFkScriptID sets the "fk_script_id" field.
func (*ScriptExecutionRecordUpdate) SetNillableCreateTime ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableCreateTime(v *time.Time) *ScriptExecutionRecordUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableExecuteResult ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableExecuteResult(v *string) *ScriptExecutionRecordUpdate
SetNillableExecuteResult sets the "execute_result" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableExecuteState ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableExecuteState(v *int32) *ScriptExecutionRecordUpdate
SetNillableExecuteState sets the "execute_state" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableFileAddress ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableFileAddress(v *string) *ScriptExecutionRecordUpdate
SetNillableFileAddress sets the "file_address" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableFkScriptID ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableFkScriptID(v *int32) *ScriptExecutionRecordUpdate
SetNillableFkScriptID sets the "fk_script_id" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableScriptContent ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableScriptContent(v *string) *ScriptExecutionRecordUpdate
SetNillableScriptContent sets the "script_content" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableScriptID ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableScriptID(id *int32) *ScriptExecutionRecordUpdate
SetNillableScriptID sets the "script" edge to the Script entity by ID if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableScriptName ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableScriptName(v *string) *ScriptExecutionRecordUpdate
SetNillableScriptName sets the "script_name" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableTaskNumber ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableTaskNumber(v *int32) *ScriptExecutionRecordUpdate
SetNillableTaskNumber sets the "task_number" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableUpdateTime ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableUpdateTime(v *time.Time) *ScriptExecutionRecordUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableUserID ¶
func (_u *ScriptExecutionRecordUpdate) SetNillableUserID(v *string) *ScriptExecutionRecordUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetScript ¶
func (_u *ScriptExecutionRecordUpdate) SetScript(v *Script) *ScriptExecutionRecordUpdate
SetScript sets the "script" edge to the Script entity.
func (*ScriptExecutionRecordUpdate) SetScriptContent ¶
func (_u *ScriptExecutionRecordUpdate) SetScriptContent(v string) *ScriptExecutionRecordUpdate
SetScriptContent sets the "script_content" field.
func (*ScriptExecutionRecordUpdate) SetScriptID ¶
func (_u *ScriptExecutionRecordUpdate) SetScriptID(id int32) *ScriptExecutionRecordUpdate
SetScriptID sets the "script" edge to the Script entity by ID.
func (*ScriptExecutionRecordUpdate) SetScriptName ¶
func (_u *ScriptExecutionRecordUpdate) SetScriptName(v string) *ScriptExecutionRecordUpdate
SetScriptName sets the "script_name" field.
func (*ScriptExecutionRecordUpdate) SetTaskNumber ¶
func (_u *ScriptExecutionRecordUpdate) SetTaskNumber(v int32) *ScriptExecutionRecordUpdate
SetTaskNumber sets the "task_number" field.
func (*ScriptExecutionRecordUpdate) SetUpdateTime ¶
func (_u *ScriptExecutionRecordUpdate) SetUpdateTime(v time.Time) *ScriptExecutionRecordUpdate
SetUpdateTime sets the "update_time" field.
func (*ScriptExecutionRecordUpdate) SetUserID ¶
func (_u *ScriptExecutionRecordUpdate) SetUserID(v string) *ScriptExecutionRecordUpdate
SetUserID sets the "user_id" field.
func (*ScriptExecutionRecordUpdate) Where ¶
func (_u *ScriptExecutionRecordUpdate) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordUpdate
Where appends a list predicates to the ScriptExecutionRecordUpdate builder.
type ScriptExecutionRecordUpdateOne ¶
type ScriptExecutionRecordUpdateOne struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordUpdateOne is the builder for updating a single ScriptExecutionRecord entity.
func (*ScriptExecutionRecordUpdateOne) AddExecuteState ¶
func (_u *ScriptExecutionRecordUpdateOne) AddExecuteState(v int32) *ScriptExecutionRecordUpdateOne
AddExecuteState adds value to the "execute_state" field.
func (*ScriptExecutionRecordUpdateOne) AddFkScriptID ¶
func (_u *ScriptExecutionRecordUpdateOne) AddFkScriptID(v int32) *ScriptExecutionRecordUpdateOne
AddFkScriptID adds value to the "fk_script_id" field.
func (*ScriptExecutionRecordUpdateOne) AddTaskNumber ¶
func (_u *ScriptExecutionRecordUpdateOne) AddTaskNumber(v int32) *ScriptExecutionRecordUpdateOne
AddTaskNumber adds value to the "task_number" field.
func (*ScriptExecutionRecordUpdateOne) ClearScript ¶
func (_u *ScriptExecutionRecordUpdateOne) ClearScript() *ScriptExecutionRecordUpdateOne
ClearScript clears the "script" edge to the Script entity.
func (*ScriptExecutionRecordUpdateOne) Exec ¶
func (_u *ScriptExecutionRecordUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScriptExecutionRecordUpdateOne) ExecX ¶
func (_u *ScriptExecutionRecordUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordUpdateOne) Mutation ¶
func (_u *ScriptExecutionRecordUpdateOne) Mutation() *ScriptExecutionRecordMutation
Mutation returns the ScriptExecutionRecordMutation object of the builder.
func (*ScriptExecutionRecordUpdateOne) Save ¶
func (_u *ScriptExecutionRecordUpdateOne) Save(ctx context.Context) (*ScriptExecutionRecord, error)
Save executes the query and returns the updated ScriptExecutionRecord entity.
func (*ScriptExecutionRecordUpdateOne) SaveX ¶
func (_u *ScriptExecutionRecordUpdateOne) SaveX(ctx context.Context) *ScriptExecutionRecord
SaveX is like Save, but panics if an error occurs.
func (*ScriptExecutionRecordUpdateOne) Select ¶
func (_u *ScriptExecutionRecordUpdateOne) Select(field string, fields ...string) *ScriptExecutionRecordUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScriptExecutionRecordUpdateOne) SetCreateTime ¶
func (_u *ScriptExecutionRecordUpdateOne) SetCreateTime(v time.Time) *ScriptExecutionRecordUpdateOne
SetCreateTime sets the "create_time" field.
func (*ScriptExecutionRecordUpdateOne) SetExecuteResult ¶
func (_u *ScriptExecutionRecordUpdateOne) SetExecuteResult(v string) *ScriptExecutionRecordUpdateOne
SetExecuteResult sets the "execute_result" field.
func (*ScriptExecutionRecordUpdateOne) SetExecuteState ¶
func (_u *ScriptExecutionRecordUpdateOne) SetExecuteState(v int32) *ScriptExecutionRecordUpdateOne
SetExecuteState sets the "execute_state" field.
func (*ScriptExecutionRecordUpdateOne) SetFileAddress ¶
func (_u *ScriptExecutionRecordUpdateOne) SetFileAddress(v string) *ScriptExecutionRecordUpdateOne
SetFileAddress sets the "file_address" field.
func (*ScriptExecutionRecordUpdateOne) SetFkScriptID ¶
func (_u *ScriptExecutionRecordUpdateOne) SetFkScriptID(v int32) *ScriptExecutionRecordUpdateOne
SetFkScriptID sets the "fk_script_id" field.
func (*ScriptExecutionRecordUpdateOne) SetNillableCreateTime ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableCreateTime(v *time.Time) *ScriptExecutionRecordUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableExecuteResult ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableExecuteResult(v *string) *ScriptExecutionRecordUpdateOne
SetNillableExecuteResult sets the "execute_result" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableExecuteState ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableExecuteState(v *int32) *ScriptExecutionRecordUpdateOne
SetNillableExecuteState sets the "execute_state" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableFileAddress ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableFileAddress(v *string) *ScriptExecutionRecordUpdateOne
SetNillableFileAddress sets the "file_address" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableFkScriptID ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableFkScriptID(v *int32) *ScriptExecutionRecordUpdateOne
SetNillableFkScriptID sets the "fk_script_id" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableScriptContent ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableScriptContent(v *string) *ScriptExecutionRecordUpdateOne
SetNillableScriptContent sets the "script_content" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableScriptID ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableScriptID(id *int32) *ScriptExecutionRecordUpdateOne
SetNillableScriptID sets the "script" edge to the Script entity by ID if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableScriptName ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableScriptName(v *string) *ScriptExecutionRecordUpdateOne
SetNillableScriptName sets the "script_name" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableTaskNumber ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableTaskNumber(v *int32) *ScriptExecutionRecordUpdateOne
SetNillableTaskNumber sets the "task_number" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableUpdateTime ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableUpdateTime(v *time.Time) *ScriptExecutionRecordUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableUserID ¶
func (_u *ScriptExecutionRecordUpdateOne) SetNillableUserID(v *string) *ScriptExecutionRecordUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetScript ¶
func (_u *ScriptExecutionRecordUpdateOne) SetScript(v *Script) *ScriptExecutionRecordUpdateOne
SetScript sets the "script" edge to the Script entity.
func (*ScriptExecutionRecordUpdateOne) SetScriptContent ¶
func (_u *ScriptExecutionRecordUpdateOne) SetScriptContent(v string) *ScriptExecutionRecordUpdateOne
SetScriptContent sets the "script_content" field.
func (*ScriptExecutionRecordUpdateOne) SetScriptID ¶
func (_u *ScriptExecutionRecordUpdateOne) SetScriptID(id int32) *ScriptExecutionRecordUpdateOne
SetScriptID sets the "script" edge to the Script entity by ID.
func (*ScriptExecutionRecordUpdateOne) SetScriptName ¶
func (_u *ScriptExecutionRecordUpdateOne) SetScriptName(v string) *ScriptExecutionRecordUpdateOne
SetScriptName sets the "script_name" field.
func (*ScriptExecutionRecordUpdateOne) SetTaskNumber ¶
func (_u *ScriptExecutionRecordUpdateOne) SetTaskNumber(v int32) *ScriptExecutionRecordUpdateOne
SetTaskNumber sets the "task_number" field.
func (*ScriptExecutionRecordUpdateOne) SetUpdateTime ¶
func (_u *ScriptExecutionRecordUpdateOne) SetUpdateTime(v time.Time) *ScriptExecutionRecordUpdateOne
SetUpdateTime sets the "update_time" field.
func (*ScriptExecutionRecordUpdateOne) SetUserID ¶
func (_u *ScriptExecutionRecordUpdateOne) SetUserID(v string) *ScriptExecutionRecordUpdateOne
SetUserID sets the "user_id" field.
func (*ScriptExecutionRecordUpdateOne) Where ¶
func (_u *ScriptExecutionRecordUpdateOne) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordUpdateOne
Where appends a list predicates to the ScriptExecutionRecordUpdate builder.
type ScriptExecutionRecords ¶
type ScriptExecutionRecords []*ScriptExecutionRecord
ScriptExecutionRecords is a parsable slice of ScriptExecutionRecord.
type ScriptGroupBy ¶
type ScriptGroupBy struct {
// contains filtered or unexported fields
}
ScriptGroupBy is the group-by builder for Script entities.
func (*ScriptGroupBy) Aggregate ¶
func (_g *ScriptGroupBy) Aggregate(fns ...AggregateFunc) *ScriptGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScriptGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Scan ¶
func (_g *ScriptGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScriptMutation ¶
type ScriptMutation struct {
// contains filtered or unexported fields
}
ScriptMutation represents an operation that mutates the Script nodes in the graph.
func (*ScriptMutation) AddField ¶
func (m *ScriptMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ScriptMutation) AddScriptExecutionRecordIDs ¶
func (m *ScriptMutation) AddScriptExecutionRecordIDs(ids ...int32)
AddScriptExecutionRecordIDs adds the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by ids.
func (*ScriptMutation) AddTaskNumber ¶
func (m *ScriptMutation) AddTaskNumber(i int32)
AddTaskNumber adds i to the "task_number" field.
func (*ScriptMutation) AddedEdges ¶
func (m *ScriptMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScriptMutation) AddedField ¶
func (m *ScriptMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ScriptMutation) AddedFields ¶
func (m *ScriptMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScriptMutation) AddedIDs ¶
func (m *ScriptMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScriptMutation) AddedTaskNumber ¶
func (m *ScriptMutation) AddedTaskNumber() (r int32, exists bool)
AddedTaskNumber returns the value that was added to the "task_number" field in this mutation.
func (*ScriptMutation) ClearEdge ¶
func (m *ScriptMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*ScriptMutation) ClearField ¶
func (m *ScriptMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*ScriptMutation) ClearScriptExecutionRecords ¶
func (m *ScriptMutation) ClearScriptExecutionRecords()
ClearScriptExecutionRecords clears the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity.
func (*ScriptMutation) ClearedEdges ¶
func (m *ScriptMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScriptMutation) ClearedFields ¶
func (m *ScriptMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScriptMutation) Client ¶
func (m ScriptMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*ScriptMutation) CreateTime ¶
func (m *ScriptMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ScriptMutation) EdgeCleared ¶
func (m *ScriptMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScriptMutation) Field ¶
func (m *ScriptMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ScriptMutation) FieldCleared ¶
func (m *ScriptMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScriptMutation) Fields ¶
func (m *ScriptMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*ScriptMutation) FileAddress ¶
func (m *ScriptMutation) FileAddress() (r string, exists bool)
FileAddress returns the value of the "file_address" field in the mutation.
func (*ScriptMutation) ID ¶
func (m *ScriptMutation) 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 (*ScriptMutation) IDs ¶
func (m *ScriptMutation) 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 (*ScriptMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ScriptMutation) OldFileAddress ¶
func (m *ScriptMutation) OldFileAddress(ctx context.Context) (v string, err error)
OldFileAddress returns the old "file_address" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldScriptContent ¶
func (m *ScriptMutation) OldScriptContent(ctx context.Context) (v string, err error)
OldScriptContent returns the old "script_content" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldScriptName ¶
func (m *ScriptMutation) OldScriptName(ctx context.Context) (v string, err error)
OldScriptName returns the old "script_name" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldTaskNumber ¶
func (m *ScriptMutation) OldTaskNumber(ctx context.Context) (v int32, err error)
OldTaskNumber returns the old "task_number" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldUserID ¶
func (m *ScriptMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) RemoveScriptExecutionRecordIDs ¶
func (m *ScriptMutation) RemoveScriptExecutionRecordIDs(ids ...int32)
RemoveScriptExecutionRecordIDs removes the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by IDs.
func (*ScriptMutation) RemovedEdges ¶
func (m *ScriptMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScriptMutation) RemovedIDs ¶
func (m *ScriptMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*ScriptMutation) RemovedScriptExecutionRecordsIDs ¶
func (m *ScriptMutation) RemovedScriptExecutionRecordsIDs() (ids []int32)
RemovedScriptExecutionRecords returns the removed IDs of the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity.
func (*ScriptMutation) ResetCreateTime ¶
func (m *ScriptMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ScriptMutation) ResetEdge ¶
func (m *ScriptMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*ScriptMutation) ResetField ¶
func (m *ScriptMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*ScriptMutation) ResetFileAddress ¶
func (m *ScriptMutation) ResetFileAddress()
ResetFileAddress resets all changes to the "file_address" field.
func (*ScriptMutation) ResetScriptContent ¶
func (m *ScriptMutation) ResetScriptContent()
ResetScriptContent resets all changes to the "script_content" field.
func (*ScriptMutation) ResetScriptExecutionRecords ¶
func (m *ScriptMutation) ResetScriptExecutionRecords()
ResetScriptExecutionRecords resets all changes to the "scriptExecutionRecords" edge.
func (*ScriptMutation) ResetScriptName ¶
func (m *ScriptMutation) ResetScriptName()
ResetScriptName resets all changes to the "script_name" field.
func (*ScriptMutation) ResetTaskNumber ¶
func (m *ScriptMutation) ResetTaskNumber()
ResetTaskNumber resets all changes to the "task_number" field.
func (*ScriptMutation) ResetUpdateTime ¶
func (m *ScriptMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ScriptMutation) ResetUserID ¶
func (m *ScriptMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ScriptMutation) ScriptContent ¶
func (m *ScriptMutation) ScriptContent() (r string, exists bool)
ScriptContent returns the value of the "script_content" field in the mutation.
func (*ScriptMutation) ScriptExecutionRecordsCleared ¶
func (m *ScriptMutation) ScriptExecutionRecordsCleared() bool
ScriptExecutionRecordsCleared reports if the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity was cleared.
func (*ScriptMutation) ScriptExecutionRecordsIDs ¶
func (m *ScriptMutation) ScriptExecutionRecordsIDs() (ids []int32)
ScriptExecutionRecordsIDs returns the "scriptExecutionRecords" edge IDs in the mutation.
func (*ScriptMutation) ScriptName ¶
func (m *ScriptMutation) ScriptName() (r string, exists bool)
ScriptName returns the value of the "script_name" field in the mutation.
func (*ScriptMutation) SetCreateTime ¶
func (m *ScriptMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ScriptMutation) SetField ¶
func (m *ScriptMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ScriptMutation) SetFileAddress ¶
func (m *ScriptMutation) SetFileAddress(s string)
SetFileAddress sets the "file_address" field.
func (*ScriptMutation) SetID ¶
func (m *ScriptMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Script entities.
func (*ScriptMutation) SetOp ¶
func (m *ScriptMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ScriptMutation) SetScriptContent ¶
func (m *ScriptMutation) SetScriptContent(s string)
SetScriptContent sets the "script_content" field.
func (*ScriptMutation) SetScriptName ¶
func (m *ScriptMutation) SetScriptName(s string)
SetScriptName sets the "script_name" field.
func (*ScriptMutation) SetTaskNumber ¶
func (m *ScriptMutation) SetTaskNumber(i int32)
SetTaskNumber sets the "task_number" field.
func (*ScriptMutation) SetUpdateTime ¶
func (m *ScriptMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ScriptMutation) SetUserID ¶
func (m *ScriptMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*ScriptMutation) TaskNumber ¶
func (m *ScriptMutation) TaskNumber() (r int32, exists bool)
TaskNumber returns the value of the "task_number" field in the mutation.
func (ScriptMutation) Tx ¶
func (m ScriptMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScriptMutation) Type ¶
func (m *ScriptMutation) Type() string
Type returns the node type of this mutation (Script).
func (*ScriptMutation) UpdateTime ¶
func (m *ScriptMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ScriptMutation) UserID ¶
func (m *ScriptMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ScriptMutation) Where ¶
func (m *ScriptMutation) Where(ps ...predicate.Script)
Where appends a list predicates to the ScriptMutation builder.
func (*ScriptMutation) WhereP ¶
func (m *ScriptMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ScriptMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ScriptQuery ¶
type ScriptQuery struct {
// contains filtered or unexported fields
}
ScriptQuery is the builder for querying Script entities.
func (*ScriptQuery) Aggregate ¶
func (_q *ScriptQuery) Aggregate(fns ...AggregateFunc) *ScriptSelect
Aggregate returns a ScriptSelect configured with the given aggregations.
func (*ScriptQuery) All ¶
func (_q *ScriptQuery) All(ctx context.Context) ([]*Script, error)
All executes the query and returns a list of Scripts.
func (*ScriptQuery) AllX ¶
func (_q *ScriptQuery) AllX(ctx context.Context) []*Script
AllX is like All, but panics if an error occurs.
func (*ScriptQuery) Clone ¶
func (_q *ScriptQuery) Clone() *ScriptQuery
Clone returns a duplicate of the ScriptQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScriptQuery) Count ¶
func (_q *ScriptQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScriptQuery) CountX ¶
func (_q *ScriptQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScriptQuery) Exist ¶
func (_q *ScriptQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScriptQuery) ExistX ¶
func (_q *ScriptQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScriptQuery) First ¶
func (_q *ScriptQuery) First(ctx context.Context) (*Script, error)
First returns the first Script entity from the query. Returns a *NotFoundError when no Script was found.
func (*ScriptQuery) FirstID ¶
func (_q *ScriptQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first Script ID from the query. Returns a *NotFoundError when no Script ID was found.
func (*ScriptQuery) FirstIDX ¶
func (_q *ScriptQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScriptQuery) FirstX ¶
func (_q *ScriptQuery) FirstX(ctx context.Context) *Script
FirstX is like First, but panics if an error occurs.
func (*ScriptQuery) GroupBy ¶
func (_q *ScriptQuery) GroupBy(field string, fields ...string) *ScriptGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
UserID string `json:"user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Script.Query().
GroupBy(script.FieldUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ScriptQuery) IDs ¶
func (_q *ScriptQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of Script IDs.
func (*ScriptQuery) IDsX ¶
func (_q *ScriptQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ScriptQuery) Limit ¶
func (_q *ScriptQuery) Limit(limit int) *ScriptQuery
Limit the number of records to be returned by this query.
func (*ScriptQuery) Offset ¶
func (_q *ScriptQuery) Offset(offset int) *ScriptQuery
Offset to start from.
func (*ScriptQuery) Only ¶
func (_q *ScriptQuery) Only(ctx context.Context) (*Script, error)
Only returns a single Script entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Script entity is found. Returns a *NotFoundError when no Script entities are found.
func (*ScriptQuery) OnlyID ¶
func (_q *ScriptQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only Script ID in the query. Returns a *NotSingularError when more than one Script ID is found. Returns a *NotFoundError when no entities are found.
func (*ScriptQuery) OnlyIDX ¶
func (_q *ScriptQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScriptQuery) OnlyX ¶
func (_q *ScriptQuery) OnlyX(ctx context.Context) *Script
OnlyX is like Only, but panics if an error occurs.
func (*ScriptQuery) Order ¶
func (_q *ScriptQuery) Order(o ...script.OrderOption) *ScriptQuery
Order specifies how the records should be ordered.
func (*ScriptQuery) QueryScriptExecutionRecords ¶
func (_q *ScriptQuery) QueryScriptExecutionRecords() *ScriptExecutionRecordQuery
QueryScriptExecutionRecords chains the current query on the "scriptExecutionRecords" edge.
func (*ScriptQuery) Select ¶
func (_q *ScriptQuery) Select(fields ...string) *ScriptSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
UserID string `json:"user_id,omitempty"`
}
client.Script.Query().
Select(script.FieldUserID).
Scan(ctx, &v)
func (*ScriptQuery) Unique ¶
func (_q *ScriptQuery) Unique(unique bool) *ScriptQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ScriptQuery) Where ¶
func (_q *ScriptQuery) Where(ps ...predicate.Script) *ScriptQuery
Where adds a new predicate for the ScriptQuery builder.
func (*ScriptQuery) WithScriptExecutionRecords ¶
func (_q *ScriptQuery) WithScriptExecutionRecords(opts ...func(*ScriptExecutionRecordQuery)) *ScriptQuery
WithScriptExecutionRecords tells the query-builder to eager-load the nodes that are connected to the "scriptExecutionRecords" edge. The optional arguments are used to configure the query builder of the edge.
type ScriptSelect ¶
type ScriptSelect struct {
*ScriptQuery
// contains filtered or unexported fields
}
ScriptSelect is the builder for selecting fields of Script entities.
func (*ScriptSelect) Aggregate ¶
func (_s *ScriptSelect) Aggregate(fns ...AggregateFunc) *ScriptSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ScriptSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Scan ¶
func (_s *ScriptSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScriptUpdate ¶
type ScriptUpdate struct {
// contains filtered or unexported fields
}
ScriptUpdate is the builder for updating Script entities.
func (*ScriptUpdate) AddScriptExecutionRecordIDs ¶
func (_u *ScriptUpdate) AddScriptExecutionRecordIDs(ids ...int32) *ScriptUpdate
AddScriptExecutionRecordIDs adds the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by IDs.
func (*ScriptUpdate) AddScriptExecutionRecords ¶
func (_u *ScriptUpdate) AddScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptUpdate
AddScriptExecutionRecords adds the "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptUpdate) AddTaskNumber ¶
func (_u *ScriptUpdate) AddTaskNumber(v int32) *ScriptUpdate
AddTaskNumber adds value to the "task_number" field.
func (*ScriptUpdate) ClearScriptExecutionRecords ¶
func (_u *ScriptUpdate) ClearScriptExecutionRecords() *ScriptUpdate
ClearScriptExecutionRecords clears all "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptUpdate) Exec ¶
func (_u *ScriptUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptUpdate) ExecX ¶
func (_u *ScriptUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptUpdate) Mutation ¶
func (_u *ScriptUpdate) Mutation() *ScriptMutation
Mutation returns the ScriptMutation object of the builder.
func (*ScriptUpdate) RemoveScriptExecutionRecordIDs ¶
func (_u *ScriptUpdate) RemoveScriptExecutionRecordIDs(ids ...int32) *ScriptUpdate
RemoveScriptExecutionRecordIDs removes the "scriptExecutionRecords" edge to ScriptExecutionRecord entities by IDs.
func (*ScriptUpdate) RemoveScriptExecutionRecords ¶
func (_u *ScriptUpdate) RemoveScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptUpdate
RemoveScriptExecutionRecords removes "scriptExecutionRecords" edges to ScriptExecutionRecord entities.
func (*ScriptUpdate) Save ¶
func (_u *ScriptUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScriptUpdate) SaveX ¶
func (_u *ScriptUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScriptUpdate) SetCreateTime ¶
func (_u *ScriptUpdate) SetCreateTime(v time.Time) *ScriptUpdate
SetCreateTime sets the "create_time" field.
func (*ScriptUpdate) SetFileAddress ¶
func (_u *ScriptUpdate) SetFileAddress(v string) *ScriptUpdate
SetFileAddress sets the "file_address" field.
func (*ScriptUpdate) SetNillableCreateTime ¶
func (_u *ScriptUpdate) SetNillableCreateTime(v *time.Time) *ScriptUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptUpdate) SetNillableFileAddress ¶
func (_u *ScriptUpdate) SetNillableFileAddress(v *string) *ScriptUpdate
SetNillableFileAddress sets the "file_address" field if the given value is not nil.
func (*ScriptUpdate) SetNillableScriptContent ¶
func (_u *ScriptUpdate) SetNillableScriptContent(v *string) *ScriptUpdate
SetNillableScriptContent sets the "script_content" field if the given value is not nil.
func (*ScriptUpdate) SetNillableScriptName ¶
func (_u *ScriptUpdate) SetNillableScriptName(v *string) *ScriptUpdate
SetNillableScriptName sets the "script_name" field if the given value is not nil.
func (*ScriptUpdate) SetNillableTaskNumber ¶
func (_u *ScriptUpdate) SetNillableTaskNumber(v *int32) *ScriptUpdate
SetNillableTaskNumber sets the "task_number" field if the given value is not nil.
func (*ScriptUpdate) SetNillableUpdateTime ¶
func (_u *ScriptUpdate) SetNillableUpdateTime(v *time.Time) *ScriptUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptUpdate) SetNillableUserID ¶
func (_u *ScriptUpdate) SetNillableUserID(v *string) *ScriptUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ScriptUpdate) SetScriptContent ¶
func (_u *ScriptUpdate) SetScriptContent(v string) *ScriptUpdate
SetScriptContent sets the "script_content" field.
func (*ScriptUpdate) SetScriptName ¶
func (_u *ScriptUpdate) SetScriptName(v string) *ScriptUpdate
SetScriptName sets the "script_name" field.
func (*ScriptUpdate) SetTaskNumber ¶
func (_u *ScriptUpdate) SetTaskNumber(v int32) *ScriptUpdate
SetTaskNumber sets the "task_number" field.
func (*ScriptUpdate) SetUpdateTime ¶
func (_u *ScriptUpdate) SetUpdateTime(v time.Time) *ScriptUpdate
SetUpdateTime sets the "update_time" field.
func (*ScriptUpdate) SetUserID ¶
func (_u *ScriptUpdate) SetUserID(v string) *ScriptUpdate
SetUserID sets the "user_id" field.
func (*ScriptUpdate) Where ¶
func (_u *ScriptUpdate) Where(ps ...predicate.Script) *ScriptUpdate
Where appends a list predicates to the ScriptUpdate builder.
type ScriptUpdateOne ¶
type ScriptUpdateOne struct {
// contains filtered or unexported fields
}
ScriptUpdateOne is the builder for updating a single Script entity.
func (*ScriptUpdateOne) AddScriptExecutionRecordIDs ¶
func (_u *ScriptUpdateOne) AddScriptExecutionRecordIDs(ids ...int32) *ScriptUpdateOne
AddScriptExecutionRecordIDs adds the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by IDs.
func (*ScriptUpdateOne) AddScriptExecutionRecords ¶
func (_u *ScriptUpdateOne) AddScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptUpdateOne
AddScriptExecutionRecords adds the "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptUpdateOne) AddTaskNumber ¶
func (_u *ScriptUpdateOne) AddTaskNumber(v int32) *ScriptUpdateOne
AddTaskNumber adds value to the "task_number" field.
func (*ScriptUpdateOne) ClearScriptExecutionRecords ¶
func (_u *ScriptUpdateOne) ClearScriptExecutionRecords() *ScriptUpdateOne
ClearScriptExecutionRecords clears all "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptUpdateOne) Exec ¶
func (_u *ScriptUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScriptUpdateOne) ExecX ¶
func (_u *ScriptUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptUpdateOne) Mutation ¶
func (_u *ScriptUpdateOne) Mutation() *ScriptMutation
Mutation returns the ScriptMutation object of the builder.
func (*ScriptUpdateOne) RemoveScriptExecutionRecordIDs ¶
func (_u *ScriptUpdateOne) RemoveScriptExecutionRecordIDs(ids ...int32) *ScriptUpdateOne
RemoveScriptExecutionRecordIDs removes the "scriptExecutionRecords" edge to ScriptExecutionRecord entities by IDs.
func (*ScriptUpdateOne) RemoveScriptExecutionRecords ¶
func (_u *ScriptUpdateOne) RemoveScriptExecutionRecords(v ...*ScriptExecutionRecord) *ScriptUpdateOne
RemoveScriptExecutionRecords removes "scriptExecutionRecords" edges to ScriptExecutionRecord entities.
func (*ScriptUpdateOne) Save ¶
func (_u *ScriptUpdateOne) Save(ctx context.Context) (*Script, error)
Save executes the query and returns the updated Script entity.
func (*ScriptUpdateOne) SaveX ¶
func (_u *ScriptUpdateOne) SaveX(ctx context.Context) *Script
SaveX is like Save, but panics if an error occurs.
func (*ScriptUpdateOne) Select ¶
func (_u *ScriptUpdateOne) Select(field string, fields ...string) *ScriptUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScriptUpdateOne) SetCreateTime ¶
func (_u *ScriptUpdateOne) SetCreateTime(v time.Time) *ScriptUpdateOne
SetCreateTime sets the "create_time" field.
func (*ScriptUpdateOne) SetFileAddress ¶
func (_u *ScriptUpdateOne) SetFileAddress(v string) *ScriptUpdateOne
SetFileAddress sets the "file_address" field.
func (*ScriptUpdateOne) SetNillableCreateTime ¶
func (_u *ScriptUpdateOne) SetNillableCreateTime(v *time.Time) *ScriptUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableFileAddress ¶
func (_u *ScriptUpdateOne) SetNillableFileAddress(v *string) *ScriptUpdateOne
SetNillableFileAddress sets the "file_address" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableScriptContent ¶
func (_u *ScriptUpdateOne) SetNillableScriptContent(v *string) *ScriptUpdateOne
SetNillableScriptContent sets the "script_content" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableScriptName ¶
func (_u *ScriptUpdateOne) SetNillableScriptName(v *string) *ScriptUpdateOne
SetNillableScriptName sets the "script_name" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableTaskNumber ¶
func (_u *ScriptUpdateOne) SetNillableTaskNumber(v *int32) *ScriptUpdateOne
SetNillableTaskNumber sets the "task_number" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableUpdateTime ¶
func (_u *ScriptUpdateOne) SetNillableUpdateTime(v *time.Time) *ScriptUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableUserID ¶
func (_u *ScriptUpdateOne) SetNillableUserID(v *string) *ScriptUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*ScriptUpdateOne) SetScriptContent ¶
func (_u *ScriptUpdateOne) SetScriptContent(v string) *ScriptUpdateOne
SetScriptContent sets the "script_content" field.
func (*ScriptUpdateOne) SetScriptName ¶
func (_u *ScriptUpdateOne) SetScriptName(v string) *ScriptUpdateOne
SetScriptName sets the "script_name" field.
func (*ScriptUpdateOne) SetTaskNumber ¶
func (_u *ScriptUpdateOne) SetTaskNumber(v int32) *ScriptUpdateOne
SetTaskNumber sets the "task_number" field.
func (*ScriptUpdateOne) SetUpdateTime ¶
func (_u *ScriptUpdateOne) SetUpdateTime(v time.Time) *ScriptUpdateOne
SetUpdateTime sets the "update_time" field.
func (*ScriptUpdateOne) SetUserID ¶
func (_u *ScriptUpdateOne) SetUserID(v string) *ScriptUpdateOne
SetUserID sets the "user_id" field.
func (*ScriptUpdateOne) Where ¶
func (_u *ScriptUpdateOne) Where(ps ...predicate.Script) *ScriptUpdateOne
Where appends a list predicates to the ScriptUpdate builder.
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 (_m *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(_m *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) MapCreateBulk ¶
func (c *StorageClient) MapCreateBulk(slice any, setFunc func(*StorageCreate, int)) *StorageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*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(_m *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 (_c *StorageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageCreate) ExecX ¶
func (_c *StorageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageCreate) Mutation ¶
func (_c *StorageCreate) Mutation() *StorageMutation
Mutation returns the StorageMutation object of the builder.
func (*StorageCreate) Save ¶
func (_c *StorageCreate) Save(ctx context.Context) (*Storage, error)
Save creates the Storage in the database.
func (*StorageCreate) SaveX ¶
func (_c *StorageCreate) SaveX(ctx context.Context) *Storage
SaveX calls Save and panics if Save returns an error.
func (*StorageCreate) SetCid ¶
func (_c *StorageCreate) SetCid(v string) *StorageCreate
SetCid sets the "cid" field.
func (*StorageCreate) SetID ¶
func (_c *StorageCreate) SetID(v uuid.UUID) *StorageCreate
SetID sets the "id" field.
func (*StorageCreate) SetLastModify ¶
func (_c *StorageCreate) SetLastModify(v time.Time) *StorageCreate
SetLastModify sets the "last_modify" field.
func (*StorageCreate) SetName ¶
func (_c *StorageCreate) SetName(v string) *StorageCreate
SetName sets the "name" field.
func (*StorageCreate) SetNillableID ¶
func (_c *StorageCreate) SetNillableID(v *uuid.UUID) *StorageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*StorageCreate) SetNillableLastModify ¶
func (_c *StorageCreate) SetNillableLastModify(v *time.Time) *StorageCreate
SetNillableLastModify sets the "last_modify" field if the given value is not nil.
func (*StorageCreate) SetNillableType ¶
func (_c *StorageCreate) SetNillableType(v *int32) *StorageCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*StorageCreate) SetOwner ¶
func (_c *StorageCreate) SetOwner(v string) *StorageCreate
SetOwner sets the "owner" field.
func (*StorageCreate) SetParentID ¶
func (_c *StorageCreate) SetParentID(v string) *StorageCreate
SetParentID sets the "parent_id" field.
func (*StorageCreate) SetSize ¶
func (_c *StorageCreate) SetSize(v int32) *StorageCreate
SetSize sets the "size" field.
func (*StorageCreate) SetType ¶
func (_c *StorageCreate) SetType(v 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 (_c *StorageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageCreateBulk) ExecX ¶
func (_c *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 (_d *StorageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StorageDelete) ExecX ¶
func (_d *StorageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StorageDelete) Where ¶
func (_d *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 (_d *StorageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StorageDeleteOne) ExecX ¶
func (_d *StorageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageDeleteOne) Where ¶
func (_d *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 (_g *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 (_g *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 StorageProvider ¶
type StorageProvider struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// agent 节点ID
AgentID uuid.UUID `json:"agent_id,omitempty"`
// 提供状态: 0:未运行,1:启动中,2: 启动失败,3: 运行中,4: 运行失败
Status consts.StorageProviderStatus `json:"status,omitempty"`
// 存储节点master http地址
MasterServer string `json:"master_server,omitempty"`
// 存储volume的nat 映射IP
PublicIP string `json:"public_ip,omitempty"`
// 存储节点volume的http nat映射端口
PublicPort int32 `json:"public_port,omitempty"`
// 存储节点volume的grpc nat映射端口
GrpcPort int32 `json:"grpc_port,omitempty"`
// 创建时间
CreatedTime time.Time `json:"created_time,omitempty"`
// contains filtered or unexported fields
}
StorageProvider is the model entity for the StorageProvider schema.
func (*StorageProvider) String ¶
func (_m *StorageProvider) String() string
String implements the fmt.Stringer.
func (*StorageProvider) Unwrap ¶
func (_m *StorageProvider) Unwrap() *StorageProvider
Unwrap unwraps the StorageProvider 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 (*StorageProvider) Update ¶
func (_m *StorageProvider) Update() *StorageProviderUpdateOne
Update returns a builder for updating this StorageProvider. Note that you need to call StorageProvider.Unwrap() before calling this method if this StorageProvider was returned from a transaction, and the transaction was committed or rolled back.
type StorageProviderClient ¶
type StorageProviderClient struct {
// contains filtered or unexported fields
}
StorageProviderClient is a client for the StorageProvider schema.
func NewStorageProviderClient ¶
func NewStorageProviderClient(c config) *StorageProviderClient
NewStorageProviderClient returns a client for the StorageProvider from the given config.
func (*StorageProviderClient) Create ¶
func (c *StorageProviderClient) Create() *StorageProviderCreate
Create returns a builder for creating a StorageProvider entity.
func (*StorageProviderClient) CreateBulk ¶
func (c *StorageProviderClient) CreateBulk(builders ...*StorageProviderCreate) *StorageProviderCreateBulk
CreateBulk returns a builder for creating a bulk of StorageProvider entities.
func (*StorageProviderClient) Delete ¶
func (c *StorageProviderClient) Delete() *StorageProviderDelete
Delete returns a delete builder for StorageProvider.
func (*StorageProviderClient) DeleteOne ¶
func (c *StorageProviderClient) DeleteOne(_m *StorageProvider) *StorageProviderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StorageProviderClient) DeleteOneID ¶
func (c *StorageProviderClient) DeleteOneID(id uuid.UUID) *StorageProviderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*StorageProviderClient) Get ¶
func (c *StorageProviderClient) Get(ctx context.Context, id uuid.UUID) (*StorageProvider, error)
Get returns a StorageProvider entity by its id.
func (*StorageProviderClient) GetX ¶
func (c *StorageProviderClient) GetX(ctx context.Context, id uuid.UUID) *StorageProvider
GetX is like Get, but panics if an error occurs.
func (*StorageProviderClient) Hooks ¶
func (c *StorageProviderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*StorageProviderClient) Intercept ¶
func (c *StorageProviderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `storageprovider.Intercept(f(g(h())))`.
func (*StorageProviderClient) Interceptors ¶
func (c *StorageProviderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*StorageProviderClient) MapCreateBulk ¶
func (c *StorageProviderClient) MapCreateBulk(slice any, setFunc func(*StorageProviderCreate, int)) *StorageProviderCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*StorageProviderClient) Query ¶
func (c *StorageProviderClient) Query() *StorageProviderQuery
Query returns a query builder for StorageProvider.
func (*StorageProviderClient) Update ¶
func (c *StorageProviderClient) Update() *StorageProviderUpdate
Update returns an update builder for StorageProvider.
func (*StorageProviderClient) UpdateOne ¶
func (c *StorageProviderClient) UpdateOne(_m *StorageProvider) *StorageProviderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StorageProviderClient) UpdateOneID ¶
func (c *StorageProviderClient) UpdateOneID(id uuid.UUID) *StorageProviderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StorageProviderClient) Use ¶
func (c *StorageProviderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `storageprovider.Hooks(f(g(h())))`.
type StorageProviderCreate ¶
type StorageProviderCreate struct {
// contains filtered or unexported fields
}
StorageProviderCreate is the builder for creating a StorageProvider entity.
func (*StorageProviderCreate) Exec ¶
func (_c *StorageProviderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageProviderCreate) ExecX ¶
func (_c *StorageProviderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderCreate) Mutation ¶
func (_c *StorageProviderCreate) Mutation() *StorageProviderMutation
Mutation returns the StorageProviderMutation object of the builder.
func (*StorageProviderCreate) Save ¶
func (_c *StorageProviderCreate) Save(ctx context.Context) (*StorageProvider, error)
Save creates the StorageProvider in the database.
func (*StorageProviderCreate) SaveX ¶
func (_c *StorageProviderCreate) SaveX(ctx context.Context) *StorageProvider
SaveX calls Save and panics if Save returns an error.
func (*StorageProviderCreate) SetAgentID ¶
func (_c *StorageProviderCreate) SetAgentID(v uuid.UUID) *StorageProviderCreate
SetAgentID sets the "agent_id" field.
func (*StorageProviderCreate) SetCreatedTime ¶
func (_c *StorageProviderCreate) SetCreatedTime(v time.Time) *StorageProviderCreate
SetCreatedTime sets the "created_time" field.
func (*StorageProviderCreate) SetGrpcPort ¶
func (_c *StorageProviderCreate) SetGrpcPort(v int32) *StorageProviderCreate
SetGrpcPort sets the "grpc_port" field.
func (*StorageProviderCreate) SetID ¶
func (_c *StorageProviderCreate) SetID(v uuid.UUID) *StorageProviderCreate
SetID sets the "id" field.
func (*StorageProviderCreate) SetMasterServer ¶
func (_c *StorageProviderCreate) SetMasterServer(v string) *StorageProviderCreate
SetMasterServer sets the "master_server" field.
func (*StorageProviderCreate) SetNillableID ¶
func (_c *StorageProviderCreate) SetNillableID(v *uuid.UUID) *StorageProviderCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*StorageProviderCreate) SetNillableStatus ¶
func (_c *StorageProviderCreate) SetNillableStatus(v *consts.StorageProviderStatus) *StorageProviderCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*StorageProviderCreate) SetPublicIP ¶
func (_c *StorageProviderCreate) SetPublicIP(v string) *StorageProviderCreate
SetPublicIP sets the "public_ip" field.
func (*StorageProviderCreate) SetPublicPort ¶
func (_c *StorageProviderCreate) SetPublicPort(v int32) *StorageProviderCreate
SetPublicPort sets the "public_port" field.
func (*StorageProviderCreate) SetStatus ¶
func (_c *StorageProviderCreate) SetStatus(v consts.StorageProviderStatus) *StorageProviderCreate
SetStatus sets the "status" field.
type StorageProviderCreateBulk ¶
type StorageProviderCreateBulk struct {
// contains filtered or unexported fields
}
StorageProviderCreateBulk is the builder for creating many StorageProvider entities in bulk.
func (*StorageProviderCreateBulk) Exec ¶
func (_c *StorageProviderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageProviderCreateBulk) ExecX ¶
func (_c *StorageProviderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderCreateBulk) Save ¶
func (_c *StorageProviderCreateBulk) Save(ctx context.Context) ([]*StorageProvider, error)
Save creates the StorageProvider entities in the database.
func (*StorageProviderCreateBulk) SaveX ¶
func (_c *StorageProviderCreateBulk) SaveX(ctx context.Context) []*StorageProvider
SaveX is like Save, but panics if an error occurs.
type StorageProviderDelete ¶
type StorageProviderDelete struct {
// contains filtered or unexported fields
}
StorageProviderDelete is the builder for deleting a StorageProvider entity.
func (*StorageProviderDelete) Exec ¶
func (_d *StorageProviderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StorageProviderDelete) ExecX ¶
func (_d *StorageProviderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderDelete) Where ¶
func (_d *StorageProviderDelete) Where(ps ...predicate.StorageProvider) *StorageProviderDelete
Where appends a list predicates to the StorageProviderDelete builder.
type StorageProviderDeleteOne ¶
type StorageProviderDeleteOne struct {
// contains filtered or unexported fields
}
StorageProviderDeleteOne is the builder for deleting a single StorageProvider entity.
func (*StorageProviderDeleteOne) Exec ¶
func (_d *StorageProviderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StorageProviderDeleteOne) ExecX ¶
func (_d *StorageProviderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderDeleteOne) Where ¶
func (_d *StorageProviderDeleteOne) Where(ps ...predicate.StorageProvider) *StorageProviderDeleteOne
Where appends a list predicates to the StorageProviderDelete builder.
type StorageProviderGroupBy ¶
type StorageProviderGroupBy struct {
// contains filtered or unexported fields
}
StorageProviderGroupBy is the group-by builder for StorageProvider entities.
func (*StorageProviderGroupBy) Aggregate ¶
func (_g *StorageProviderGroupBy) Aggregate(fns ...AggregateFunc) *StorageProviderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StorageProviderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*StorageProviderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Scan ¶
func (_g *StorageProviderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StorageProviderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StorageProviderMutation ¶
type StorageProviderMutation struct {
// contains filtered or unexported fields
}
StorageProviderMutation represents an operation that mutates the StorageProvider nodes in the graph.
func (*StorageProviderMutation) AddField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) AddGrpcPort ¶
func (m *StorageProviderMutation) AddGrpcPort(i int32)
AddGrpcPort adds i to the "grpc_port" field.
func (*StorageProviderMutation) AddPublicPort ¶
func (m *StorageProviderMutation) AddPublicPort(i int32)
AddPublicPort adds i to the "public_port" field.
func (*StorageProviderMutation) AddStatus ¶
func (m *StorageProviderMutation) AddStatus(cps consts.StorageProviderStatus)
AddStatus adds cps to the "status" field.
func (*StorageProviderMutation) AddedEdges ¶
func (m *StorageProviderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StorageProviderMutation) AddedField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) AddedFields ¶
func (m *StorageProviderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StorageProviderMutation) AddedGrpcPort ¶
func (m *StorageProviderMutation) AddedGrpcPort() (r int32, exists bool)
AddedGrpcPort returns the value that was added to the "grpc_port" field in this mutation.
func (*StorageProviderMutation) AddedIDs ¶
func (m *StorageProviderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StorageProviderMutation) AddedPublicPort ¶
func (m *StorageProviderMutation) AddedPublicPort() (r int32, exists bool)
AddedPublicPort returns the value that was added to the "public_port" field in this mutation.
func (*StorageProviderMutation) AddedStatus ¶
func (m *StorageProviderMutation) AddedStatus() (r consts.StorageProviderStatus, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*StorageProviderMutation) AgentID ¶
func (m *StorageProviderMutation) AgentID() (r uuid.UUID, exists bool)
AgentID returns the value of the "agent_id" field in the mutation.
func (*StorageProviderMutation) ClearEdge ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ClearField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ClearedEdges ¶
func (m *StorageProviderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StorageProviderMutation) ClearedFields ¶
func (m *StorageProviderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StorageProviderMutation) Client ¶
func (m StorageProviderMutation) 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 (*StorageProviderMutation) CreatedTime ¶
func (m *StorageProviderMutation) CreatedTime() (r time.Time, exists bool)
CreatedTime returns the value of the "created_time" field in the mutation.
func (*StorageProviderMutation) EdgeCleared ¶
func (m *StorageProviderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StorageProviderMutation) Field ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) FieldCleared ¶
func (m *StorageProviderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StorageProviderMutation) Fields ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) GrpcPort ¶
func (m *StorageProviderMutation) GrpcPort() (r int32, exists bool)
GrpcPort returns the value of the "grpc_port" field in the mutation.
func (*StorageProviderMutation) ID ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) 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 (*StorageProviderMutation) MasterServer ¶
func (m *StorageProviderMutation) MasterServer() (r string, exists bool)
MasterServer returns the value of the "master_server" field in the mutation.
func (*StorageProviderMutation) OldAgentID ¶
OldAgentID returns the old "agent_id" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldCreatedTime ¶
OldCreatedTime returns the old "created_time" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) 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 (*StorageProviderMutation) OldGrpcPort ¶
func (m *StorageProviderMutation) OldGrpcPort(ctx context.Context) (v int32, err error)
OldGrpcPort returns the old "grpc_port" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldMasterServer ¶
func (m *StorageProviderMutation) OldMasterServer(ctx context.Context) (v string, err error)
OldMasterServer returns the old "master_server" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldPublicIP ¶
func (m *StorageProviderMutation) OldPublicIP(ctx context.Context) (v string, err error)
OldPublicIP returns the old "public_ip" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldPublicPort ¶
func (m *StorageProviderMutation) OldPublicPort(ctx context.Context) (v int32, err error)
OldPublicPort returns the old "public_port" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldStatus ¶
func (m *StorageProviderMutation) OldStatus(ctx context.Context) (v consts.StorageProviderStatus, err error)
OldStatus returns the old "status" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) Op ¶
func (m *StorageProviderMutation) Op() Op
Op returns the operation name.
func (*StorageProviderMutation) PublicIP ¶
func (m *StorageProviderMutation) PublicIP() (r string, exists bool)
PublicIP returns the value of the "public_ip" field in the mutation.
func (*StorageProviderMutation) PublicPort ¶
func (m *StorageProviderMutation) PublicPort() (r int32, exists bool)
PublicPort returns the value of the "public_port" field in the mutation.
func (*StorageProviderMutation) RemovedEdges ¶
func (m *StorageProviderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StorageProviderMutation) RemovedIDs ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ResetAgentID ¶
func (m *StorageProviderMutation) ResetAgentID()
ResetAgentID resets all changes to the "agent_id" field.
func (*StorageProviderMutation) ResetCreatedTime ¶
func (m *StorageProviderMutation) ResetCreatedTime()
ResetCreatedTime resets all changes to the "created_time" field.
func (*StorageProviderMutation) ResetEdge ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ResetField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ResetGrpcPort ¶
func (m *StorageProviderMutation) ResetGrpcPort()
ResetGrpcPort resets all changes to the "grpc_port" field.
func (*StorageProviderMutation) ResetMasterServer ¶
func (m *StorageProviderMutation) ResetMasterServer()
ResetMasterServer resets all changes to the "master_server" field.
func (*StorageProviderMutation) ResetPublicIP ¶
func (m *StorageProviderMutation) ResetPublicIP()
ResetPublicIP resets all changes to the "public_ip" field.
func (*StorageProviderMutation) ResetPublicPort ¶
func (m *StorageProviderMutation) ResetPublicPort()
ResetPublicPort resets all changes to the "public_port" field.
func (*StorageProviderMutation) ResetStatus ¶
func (m *StorageProviderMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*StorageProviderMutation) SetAgentID ¶
func (m *StorageProviderMutation) SetAgentID(u uuid.UUID)
SetAgentID sets the "agent_id" field.
func (*StorageProviderMutation) SetCreatedTime ¶
func (m *StorageProviderMutation) SetCreatedTime(t time.Time)
SetCreatedTime sets the "created_time" field.
func (*StorageProviderMutation) SetField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) SetGrpcPort ¶
func (m *StorageProviderMutation) SetGrpcPort(i int32)
SetGrpcPort sets the "grpc_port" field.
func (*StorageProviderMutation) SetID ¶
func (m *StorageProviderMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of StorageProvider entities.
func (*StorageProviderMutation) SetMasterServer ¶
func (m *StorageProviderMutation) SetMasterServer(s string)
SetMasterServer sets the "master_server" field.
func (*StorageProviderMutation) SetOp ¶
func (m *StorageProviderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*StorageProviderMutation) SetPublicIP ¶
func (m *StorageProviderMutation) SetPublicIP(s string)
SetPublicIP sets the "public_ip" field.
func (*StorageProviderMutation) SetPublicPort ¶
func (m *StorageProviderMutation) SetPublicPort(i int32)
SetPublicPort sets the "public_port" field.
func (*StorageProviderMutation) SetStatus ¶
func (m *StorageProviderMutation) SetStatus(cps consts.StorageProviderStatus)
SetStatus sets the "status" field.
func (*StorageProviderMutation) Status ¶
func (m *StorageProviderMutation) Status() (r consts.StorageProviderStatus, exists bool)
Status returns the value of the "status" field in the mutation.
func (StorageProviderMutation) Tx ¶
func (m StorageProviderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StorageProviderMutation) Type ¶
func (m *StorageProviderMutation) Type() string
Type returns the node type of this mutation (StorageProvider).
func (*StorageProviderMutation) Where ¶
func (m *StorageProviderMutation) Where(ps ...predicate.StorageProvider)
Where appends a list predicates to the StorageProviderMutation builder.
func (*StorageProviderMutation) WhereP ¶
func (m *StorageProviderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the StorageProviderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type StorageProviderQuery ¶
type StorageProviderQuery struct {
// contains filtered or unexported fields
}
StorageProviderQuery is the builder for querying StorageProvider entities.
func (*StorageProviderQuery) Aggregate ¶
func (_q *StorageProviderQuery) Aggregate(fns ...AggregateFunc) *StorageProviderSelect
Aggregate returns a StorageProviderSelect configured with the given aggregations.
func (*StorageProviderQuery) All ¶
func (_q *StorageProviderQuery) All(ctx context.Context) ([]*StorageProvider, error)
All executes the query and returns a list of StorageProviders.
func (*StorageProviderQuery) AllX ¶
func (_q *StorageProviderQuery) AllX(ctx context.Context) []*StorageProvider
AllX is like All, but panics if an error occurs.
func (*StorageProviderQuery) Clone ¶
func (_q *StorageProviderQuery) Clone() *StorageProviderQuery
Clone returns a duplicate of the StorageProviderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StorageProviderQuery) Count ¶
func (_q *StorageProviderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StorageProviderQuery) CountX ¶
func (_q *StorageProviderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StorageProviderQuery) Exist ¶
func (_q *StorageProviderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StorageProviderQuery) ExistX ¶
func (_q *StorageProviderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StorageProviderQuery) First ¶
func (_q *StorageProviderQuery) First(ctx context.Context) (*StorageProvider, error)
First returns the first StorageProvider entity from the query. Returns a *NotFoundError when no StorageProvider was found.
func (*StorageProviderQuery) FirstID ¶
FirstID returns the first StorageProvider ID from the query. Returns a *NotFoundError when no StorageProvider ID was found.
func (*StorageProviderQuery) FirstIDX ¶
func (_q *StorageProviderQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*StorageProviderQuery) FirstX ¶
func (_q *StorageProviderQuery) FirstX(ctx context.Context) *StorageProvider
FirstX is like First, but panics if an error occurs.
func (*StorageProviderQuery) GroupBy ¶
func (_q *StorageProviderQuery) GroupBy(field string, fields ...string) *StorageProviderGroupBy
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 {
AgentID uuid.UUID `json:"agent_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.StorageProvider.Query().
GroupBy(storageprovider.FieldAgentID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*StorageProviderQuery) IDs ¶
IDs executes the query and returns a list of StorageProvider IDs.
func (*StorageProviderQuery) IDsX ¶
func (_q *StorageProviderQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*StorageProviderQuery) Limit ¶
func (_q *StorageProviderQuery) Limit(limit int) *StorageProviderQuery
Limit the number of records to be returned by this query.
func (*StorageProviderQuery) Offset ¶
func (_q *StorageProviderQuery) Offset(offset int) *StorageProviderQuery
Offset to start from.
func (*StorageProviderQuery) Only ¶
func (_q *StorageProviderQuery) Only(ctx context.Context) (*StorageProvider, error)
Only returns a single StorageProvider entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one StorageProvider entity is found. Returns a *NotFoundError when no StorageProvider entities are found.
func (*StorageProviderQuery) OnlyID ¶
OnlyID is like Only, but returns the only StorageProvider ID in the query. Returns a *NotSingularError when more than one StorageProvider ID is found. Returns a *NotFoundError when no entities are found.
func (*StorageProviderQuery) OnlyIDX ¶
func (_q *StorageProviderQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StorageProviderQuery) OnlyX ¶
func (_q *StorageProviderQuery) OnlyX(ctx context.Context) *StorageProvider
OnlyX is like Only, but panics if an error occurs.
func (*StorageProviderQuery) Order ¶
func (_q *StorageProviderQuery) Order(o ...storageprovider.OrderOption) *StorageProviderQuery
Order specifies how the records should be ordered.
func (*StorageProviderQuery) Select ¶
func (_q *StorageProviderQuery) Select(fields ...string) *StorageProviderSelect
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 {
AgentID uuid.UUID `json:"agent_id,omitempty"`
}
client.StorageProvider.Query().
Select(storageprovider.FieldAgentID).
Scan(ctx, &v)
func (*StorageProviderQuery) Unique ¶
func (_q *StorageProviderQuery) Unique(unique bool) *StorageProviderQuery
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 (*StorageProviderQuery) Where ¶
func (_q *StorageProviderQuery) Where(ps ...predicate.StorageProvider) *StorageProviderQuery
Where adds a new predicate for the StorageProviderQuery builder.
type StorageProviderSelect ¶
type StorageProviderSelect struct {
*StorageProviderQuery
// contains filtered or unexported fields
}
StorageProviderSelect is the builder for selecting fields of StorageProvider entities.
func (*StorageProviderSelect) Aggregate ¶
func (_s *StorageProviderSelect) Aggregate(fns ...AggregateFunc) *StorageProviderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*StorageProviderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*StorageProviderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Scan ¶
func (_s *StorageProviderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StorageProviderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StorageProviderUpdate ¶
type StorageProviderUpdate struct {
// contains filtered or unexported fields
}
StorageProviderUpdate is the builder for updating StorageProvider entities.
func (*StorageProviderUpdate) AddGrpcPort ¶
func (_u *StorageProviderUpdate) AddGrpcPort(v int32) *StorageProviderUpdate
AddGrpcPort adds value to the "grpc_port" field.
func (*StorageProviderUpdate) AddPublicPort ¶
func (_u *StorageProviderUpdate) AddPublicPort(v int32) *StorageProviderUpdate
AddPublicPort adds value to the "public_port" field.
func (*StorageProviderUpdate) AddStatus ¶
func (_u *StorageProviderUpdate) AddStatus(v consts.StorageProviderStatus) *StorageProviderUpdate
AddStatus adds value to the "status" field.
func (*StorageProviderUpdate) Exec ¶
func (_u *StorageProviderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageProviderUpdate) ExecX ¶
func (_u *StorageProviderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderUpdate) Mutation ¶
func (_u *StorageProviderUpdate) Mutation() *StorageProviderMutation
Mutation returns the StorageProviderMutation object of the builder.
func (*StorageProviderUpdate) Save ¶
func (_u *StorageProviderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StorageProviderUpdate) SaveX ¶
func (_u *StorageProviderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StorageProviderUpdate) SetAgentID ¶
func (_u *StorageProviderUpdate) SetAgentID(v uuid.UUID) *StorageProviderUpdate
SetAgentID sets the "agent_id" field.
func (*StorageProviderUpdate) SetCreatedTime ¶
func (_u *StorageProviderUpdate) SetCreatedTime(v time.Time) *StorageProviderUpdate
SetCreatedTime sets the "created_time" field.
func (*StorageProviderUpdate) SetGrpcPort ¶
func (_u *StorageProviderUpdate) SetGrpcPort(v int32) *StorageProviderUpdate
SetGrpcPort sets the "grpc_port" field.
func (*StorageProviderUpdate) SetMasterServer ¶
func (_u *StorageProviderUpdate) SetMasterServer(v string) *StorageProviderUpdate
SetMasterServer sets the "master_server" field.
func (*StorageProviderUpdate) SetNillableAgentID ¶
func (_u *StorageProviderUpdate) SetNillableAgentID(v *uuid.UUID) *StorageProviderUpdate
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableCreatedTime ¶
func (_u *StorageProviderUpdate) SetNillableCreatedTime(v *time.Time) *StorageProviderUpdate
SetNillableCreatedTime sets the "created_time" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableGrpcPort ¶
func (_u *StorageProviderUpdate) SetNillableGrpcPort(v *int32) *StorageProviderUpdate
SetNillableGrpcPort sets the "grpc_port" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableMasterServer ¶
func (_u *StorageProviderUpdate) SetNillableMasterServer(v *string) *StorageProviderUpdate
SetNillableMasterServer sets the "master_server" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillablePublicIP ¶
func (_u *StorageProviderUpdate) SetNillablePublicIP(v *string) *StorageProviderUpdate
SetNillablePublicIP sets the "public_ip" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillablePublicPort ¶
func (_u *StorageProviderUpdate) SetNillablePublicPort(v *int32) *StorageProviderUpdate
SetNillablePublicPort sets the "public_port" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableStatus ¶
func (_u *StorageProviderUpdate) SetNillableStatus(v *consts.StorageProviderStatus) *StorageProviderUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*StorageProviderUpdate) SetPublicIP ¶
func (_u *StorageProviderUpdate) SetPublicIP(v string) *StorageProviderUpdate
SetPublicIP sets the "public_ip" field.
func (*StorageProviderUpdate) SetPublicPort ¶
func (_u *StorageProviderUpdate) SetPublicPort(v int32) *StorageProviderUpdate
SetPublicPort sets the "public_port" field.
func (*StorageProviderUpdate) SetStatus ¶
func (_u *StorageProviderUpdate) SetStatus(v consts.StorageProviderStatus) *StorageProviderUpdate
SetStatus sets the "status" field.
func (*StorageProviderUpdate) Where ¶
func (_u *StorageProviderUpdate) Where(ps ...predicate.StorageProvider) *StorageProviderUpdate
Where appends a list predicates to the StorageProviderUpdate builder.
type StorageProviderUpdateOne ¶
type StorageProviderUpdateOne struct {
// contains filtered or unexported fields
}
StorageProviderUpdateOne is the builder for updating a single StorageProvider entity.
func (*StorageProviderUpdateOne) AddGrpcPort ¶
func (_u *StorageProviderUpdateOne) AddGrpcPort(v int32) *StorageProviderUpdateOne
AddGrpcPort adds value to the "grpc_port" field.
func (*StorageProviderUpdateOne) AddPublicPort ¶
func (_u *StorageProviderUpdateOne) AddPublicPort(v int32) *StorageProviderUpdateOne
AddPublicPort adds value to the "public_port" field.
func (*StorageProviderUpdateOne) AddStatus ¶
func (_u *StorageProviderUpdateOne) AddStatus(v consts.StorageProviderStatus) *StorageProviderUpdateOne
AddStatus adds value to the "status" field.
func (*StorageProviderUpdateOne) Exec ¶
func (_u *StorageProviderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StorageProviderUpdateOne) ExecX ¶
func (_u *StorageProviderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderUpdateOne) Mutation ¶
func (_u *StorageProviderUpdateOne) Mutation() *StorageProviderMutation
Mutation returns the StorageProviderMutation object of the builder.
func (*StorageProviderUpdateOne) Save ¶
func (_u *StorageProviderUpdateOne) Save(ctx context.Context) (*StorageProvider, error)
Save executes the query and returns the updated StorageProvider entity.
func (*StorageProviderUpdateOne) SaveX ¶
func (_u *StorageProviderUpdateOne) SaveX(ctx context.Context) *StorageProvider
SaveX is like Save, but panics if an error occurs.
func (*StorageProviderUpdateOne) Select ¶
func (_u *StorageProviderUpdateOne) Select(field string, fields ...string) *StorageProviderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StorageProviderUpdateOne) SetAgentID ¶
func (_u *StorageProviderUpdateOne) SetAgentID(v uuid.UUID) *StorageProviderUpdateOne
SetAgentID sets the "agent_id" field.
func (*StorageProviderUpdateOne) SetCreatedTime ¶
func (_u *StorageProviderUpdateOne) SetCreatedTime(v time.Time) *StorageProviderUpdateOne
SetCreatedTime sets the "created_time" field.
func (*StorageProviderUpdateOne) SetGrpcPort ¶
func (_u *StorageProviderUpdateOne) SetGrpcPort(v int32) *StorageProviderUpdateOne
SetGrpcPort sets the "grpc_port" field.
func (*StorageProviderUpdateOne) SetMasterServer ¶
func (_u *StorageProviderUpdateOne) SetMasterServer(v string) *StorageProviderUpdateOne
SetMasterServer sets the "master_server" field.
func (*StorageProviderUpdateOne) SetNillableAgentID ¶
func (_u *StorageProviderUpdateOne) SetNillableAgentID(v *uuid.UUID) *StorageProviderUpdateOne
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableCreatedTime ¶
func (_u *StorageProviderUpdateOne) SetNillableCreatedTime(v *time.Time) *StorageProviderUpdateOne
SetNillableCreatedTime sets the "created_time" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableGrpcPort ¶
func (_u *StorageProviderUpdateOne) SetNillableGrpcPort(v *int32) *StorageProviderUpdateOne
SetNillableGrpcPort sets the "grpc_port" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableMasterServer ¶
func (_u *StorageProviderUpdateOne) SetNillableMasterServer(v *string) *StorageProviderUpdateOne
SetNillableMasterServer sets the "master_server" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillablePublicIP ¶
func (_u *StorageProviderUpdateOne) SetNillablePublicIP(v *string) *StorageProviderUpdateOne
SetNillablePublicIP sets the "public_ip" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillablePublicPort ¶
func (_u *StorageProviderUpdateOne) SetNillablePublicPort(v *int32) *StorageProviderUpdateOne
SetNillablePublicPort sets the "public_port" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableStatus ¶
func (_u *StorageProviderUpdateOne) SetNillableStatus(v *consts.StorageProviderStatus) *StorageProviderUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetPublicIP ¶
func (_u *StorageProviderUpdateOne) SetPublicIP(v string) *StorageProviderUpdateOne
SetPublicIP sets the "public_ip" field.
func (*StorageProviderUpdateOne) SetPublicPort ¶
func (_u *StorageProviderUpdateOne) SetPublicPort(v int32) *StorageProviderUpdateOne
SetPublicPort sets the "public_port" field.
func (*StorageProviderUpdateOne) SetStatus ¶
func (_u *StorageProviderUpdateOne) SetStatus(v consts.StorageProviderStatus) *StorageProviderUpdateOne
SetStatus sets the "status" field.
func (*StorageProviderUpdateOne) Where ¶
func (_u *StorageProviderUpdateOne) Where(ps ...predicate.StorageProvider) *StorageProviderUpdateOne
Where appends a list predicates to the StorageProviderUpdate builder.
type StorageProviders ¶
type StorageProviders []*StorageProvider
StorageProviders is a parsable slice of StorageProvider.
type StorageQuery ¶
type StorageQuery struct {
// contains filtered or unexported fields
}
StorageQuery is the builder for querying Storage entities.
func (*StorageQuery) Aggregate ¶
func (_q *StorageQuery) Aggregate(fns ...AggregateFunc) *StorageSelect
Aggregate returns a StorageSelect configured with the given aggregations.
func (*StorageQuery) All ¶
func (_q *StorageQuery) All(ctx context.Context) ([]*Storage, error)
All executes the query and returns a list of Storages.
func (*StorageQuery) AllX ¶
func (_q *StorageQuery) AllX(ctx context.Context) []*Storage
AllX is like All, but panics if an error occurs.
func (*StorageQuery) Clone ¶
func (_q *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 (_q *StorageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StorageQuery) CountX ¶
func (_q *StorageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StorageQuery) Exist ¶
func (_q *StorageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StorageQuery) ExistX ¶
func (_q *StorageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StorageQuery) First ¶
func (_q *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 (_q *StorageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*StorageQuery) FirstX ¶
func (_q *StorageQuery) FirstX(ctx context.Context) *Storage
FirstX is like First, but panics if an error occurs.
func (*StorageQuery) GroupBy ¶
func (_q *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 (_q *StorageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*StorageQuery) Limit ¶
func (_q *StorageQuery) Limit(limit int) *StorageQuery
Limit the number of records to be returned by this query.
func (*StorageQuery) Offset ¶
func (_q *StorageQuery) Offset(offset int) *StorageQuery
Offset to start from.
func (*StorageQuery) Only ¶
func (_q *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 (_q *StorageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StorageQuery) OnlyX ¶
func (_q *StorageQuery) OnlyX(ctx context.Context) *Storage
OnlyX is like Only, but panics if an error occurs.
func (*StorageQuery) Order ¶
func (_q *StorageQuery) Order(o ...storage.OrderOption) *StorageQuery
Order specifies how the records should be ordered.
func (*StorageQuery) Select ¶
func (_q *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 (_q *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 (_q *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 (_s *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 (_s *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 (_u *StorageUpdate) AddSize(v int32) *StorageUpdate
AddSize adds value to the "size" field.
func (*StorageUpdate) AddType ¶
func (_u *StorageUpdate) AddType(v int32) *StorageUpdate
AddType adds value to the "type" field.
func (*StorageUpdate) Exec ¶
func (_u *StorageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageUpdate) ExecX ¶
func (_u *StorageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageUpdate) Mutation ¶
func (_u *StorageUpdate) Mutation() *StorageMutation
Mutation returns the StorageMutation object of the builder.
func (*StorageUpdate) Save ¶
func (_u *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 (_u *StorageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StorageUpdate) SetCid ¶
func (_u *StorageUpdate) SetCid(v string) *StorageUpdate
SetCid sets the "cid" field.
func (*StorageUpdate) SetLastModify ¶
func (_u *StorageUpdate) SetLastModify(v time.Time) *StorageUpdate
SetLastModify sets the "last_modify" field.
func (*StorageUpdate) SetName ¶
func (_u *StorageUpdate) SetName(v string) *StorageUpdate
SetName sets the "name" field.
func (*StorageUpdate) SetNillableCid ¶
func (_u *StorageUpdate) SetNillableCid(v *string) *StorageUpdate
SetNillableCid sets the "cid" field if the given value is not nil.
func (*StorageUpdate) SetNillableLastModify ¶
func (_u *StorageUpdate) SetNillableLastModify(v *time.Time) *StorageUpdate
SetNillableLastModify sets the "last_modify" field if the given value is not nil.
func (*StorageUpdate) SetNillableName ¶
func (_u *StorageUpdate) SetNillableName(v *string) *StorageUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*StorageUpdate) SetNillableOwner ¶
func (_u *StorageUpdate) SetNillableOwner(v *string) *StorageUpdate
SetNillableOwner sets the "owner" field if the given value is not nil.
func (*StorageUpdate) SetNillableParentID ¶
func (_u *StorageUpdate) SetNillableParentID(v *string) *StorageUpdate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*StorageUpdate) SetNillableSize ¶
func (_u *StorageUpdate) SetNillableSize(v *int32) *StorageUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (*StorageUpdate) SetNillableType ¶
func (_u *StorageUpdate) SetNillableType(v *int32) *StorageUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*StorageUpdate) SetOwner ¶
func (_u *StorageUpdate) SetOwner(v string) *StorageUpdate
SetOwner sets the "owner" field.
func (*StorageUpdate) SetParentID ¶
func (_u *StorageUpdate) SetParentID(v string) *StorageUpdate
SetParentID sets the "parent_id" field.
func (*StorageUpdate) SetSize ¶
func (_u *StorageUpdate) SetSize(v int32) *StorageUpdate
SetSize sets the "size" field.
func (*StorageUpdate) SetType ¶
func (_u *StorageUpdate) SetType(v int32) *StorageUpdate
SetType sets the "type" field.
func (*StorageUpdate) Where ¶
func (_u *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 (_u *StorageUpdateOne) AddSize(v int32) *StorageUpdateOne
AddSize adds value to the "size" field.
func (*StorageUpdateOne) AddType ¶
func (_u *StorageUpdateOne) AddType(v int32) *StorageUpdateOne
AddType adds value to the "type" field.
func (*StorageUpdateOne) Exec ¶
func (_u *StorageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StorageUpdateOne) ExecX ¶
func (_u *StorageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageUpdateOne) Mutation ¶
func (_u *StorageUpdateOne) Mutation() *StorageMutation
Mutation returns the StorageMutation object of the builder.
func (*StorageUpdateOne) Save ¶
func (_u *StorageUpdateOne) Save(ctx context.Context) (*Storage, error)
Save executes the query and returns the updated Storage entity.
func (*StorageUpdateOne) SaveX ¶
func (_u *StorageUpdateOne) SaveX(ctx context.Context) *Storage
SaveX is like Save, but panics if an error occurs.
func (*StorageUpdateOne) Select ¶
func (_u *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 (_u *StorageUpdateOne) SetCid(v string) *StorageUpdateOne
SetCid sets the "cid" field.
func (*StorageUpdateOne) SetLastModify ¶
func (_u *StorageUpdateOne) SetLastModify(v time.Time) *StorageUpdateOne
SetLastModify sets the "last_modify" field.
func (*StorageUpdateOne) SetName ¶
func (_u *StorageUpdateOne) SetName(v string) *StorageUpdateOne
SetName sets the "name" field.
func (*StorageUpdateOne) SetNillableCid ¶
func (_u *StorageUpdateOne) SetNillableCid(v *string) *StorageUpdateOne
SetNillableCid sets the "cid" field if the given value is not nil.
func (*StorageUpdateOne) SetNillableLastModify ¶
func (_u *StorageUpdateOne) SetNillableLastModify(v *time.Time) *StorageUpdateOne
SetNillableLastModify sets the "last_modify" field if the given value is not nil.
func (*StorageUpdateOne) SetNillableName ¶
func (_u *StorageUpdateOne) SetNillableName(v *string) *StorageUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*StorageUpdateOne) SetNillableOwner ¶
func (_u *StorageUpdateOne) SetNillableOwner(v *string) *StorageUpdateOne
SetNillableOwner sets the "owner" field if the given value is not nil.
func (*StorageUpdateOne) SetNillableParentID ¶
func (_u *StorageUpdateOne) SetNillableParentID(v *string) *StorageUpdateOne
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*StorageUpdateOne) SetNillableSize ¶
func (_u *StorageUpdateOne) SetNillableSize(v *int32) *StorageUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (*StorageUpdateOne) SetNillableType ¶
func (_u *StorageUpdateOne) SetNillableType(v *int32) *StorageUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*StorageUpdateOne) SetOwner ¶
func (_u *StorageUpdateOne) SetOwner(v string) *StorageUpdateOne
SetOwner sets the "owner" field.
func (*StorageUpdateOne) SetParentID ¶
func (_u *StorageUpdateOne) SetParentID(v string) *StorageUpdateOne
SetParentID sets the "parent_id" field.
func (*StorageUpdateOne) SetSize ¶
func (_u *StorageUpdateOne) SetSize(v int32) *StorageUpdateOne
SetSize sets the "size" field.
func (*StorageUpdateOne) SetType ¶
func (_u *StorageUpdateOne) SetType(v int32) *StorageUpdateOne
SetType sets the "type" field.
func (*StorageUpdateOne) Where ¶
func (_u *StorageUpdateOne) Where(ps ...predicate.Storage) *StorageUpdateOne
Where appends a list predicates to the StorageUpdate builder.
type Task ¶
type Task struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// AgentID holds the value of the "agent_id" field.
AgentID string `json:"agent_id,omitempty"`
// VM_CREATE = 0; // 创建虚拟机
// VM_DELETE = 1; // 删除虚拟机
// VM_START = 2; // 启动虚拟机
// VM_SHUTDOWN = 3; //关闭虚拟机
// VM_RESTART = 4; //关闭虚拟机
// VM_VNC_CONNECT = 5; // vnc 连接
// NAT_PROXY_CREATE = 6; // nat 代理创建
// NAT_PROXY_DELETE = 7; // nat 代理删除
// NAT_VISITOR_CREATE = 8; // nat 访问创建
// NAT_VISITOR_DELETE = 9; // nat 访问删除
Cmd int32 `json:"cmd,omitempty"`
// 执行参数,nat 网络类型对应 NatProxyCreateVO, 虚拟机类型对应 ComputeInstanceTaskParamVO
Params *string `json:"params,omitempty"`
// CREATED = 0; //创建
// EXECUTING = 1; //执行中
// EXECUTED = 2 ; // 执行成功
// FAILED = 3 ; // 执行失败
Status int `json:"status,omitempty"`
// CreateTime holds the value of the "create_time" field.
CreateTime time.Time `json:"create_time,omitempty"`
// contains filtered or unexported fields
}
Task is the model entity for the Task schema.
func (*Task) Unwrap ¶
Unwrap unwraps the Task entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Task) Update ¶
func (_m *Task) Update() *TaskUpdateOne
Update returns a builder for updating this Task. Note that you need to call Task.Unwrap() before calling this method if this Task was returned from a transaction, and the transaction was committed or rolled back.
type TaskClient ¶
type TaskClient struct {
// contains filtered or unexported fields
}
TaskClient is a client for the Task schema.
func NewTaskClient ¶
func NewTaskClient(c config) *TaskClient
NewTaskClient returns a client for the Task from the given config.
func (*TaskClient) Create ¶
func (c *TaskClient) Create() *TaskCreate
Create returns a builder for creating a Task entity.
func (*TaskClient) CreateBulk ¶
func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
CreateBulk returns a builder for creating a bulk of Task entities.
func (*TaskClient) Delete ¶
func (c *TaskClient) Delete() *TaskDelete
Delete returns a delete builder for Task.
func (*TaskClient) DeleteOne ¶
func (c *TaskClient) DeleteOne(_m *Task) *TaskDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TaskClient) DeleteOneID ¶
func (c *TaskClient) DeleteOneID(id uuid.UUID) *TaskDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TaskClient) Intercept ¶
func (c *TaskClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `task.Intercept(f(g(h())))`.
func (*TaskClient) Interceptors ¶
func (c *TaskClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TaskClient) MapCreateBulk ¶
func (c *TaskClient) MapCreateBulk(slice any, setFunc func(*TaskCreate, int)) *TaskCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TaskClient) Query ¶
func (c *TaskClient) Query() *TaskQuery
Query returns a query builder for Task.
func (*TaskClient) Update ¶
func (c *TaskClient) Update() *TaskUpdate
Update returns an update builder for Task.
func (*TaskClient) UpdateOne ¶
func (c *TaskClient) UpdateOne(_m *Task) *TaskUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TaskClient) UpdateOneID ¶
func (c *TaskClient) UpdateOneID(id uuid.UUID) *TaskUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TaskClient) Use ¶
func (c *TaskClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `task.Hooks(f(g(h())))`.
type TaskCreate ¶
type TaskCreate struct {
// contains filtered or unexported fields
}
TaskCreate is the builder for creating a Task entity.
func (*TaskCreate) Exec ¶
func (_c *TaskCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreate) ExecX ¶
func (_c *TaskCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCreate) Mutation ¶
func (_c *TaskCreate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskCreate) Save ¶
func (_c *TaskCreate) Save(ctx context.Context) (*Task, error)
Save creates the Task in the database.
func (*TaskCreate) SaveX ¶
func (_c *TaskCreate) SaveX(ctx context.Context) *Task
SaveX calls Save and panics if Save returns an error.
func (*TaskCreate) SetAgentID ¶
func (_c *TaskCreate) SetAgentID(v string) *TaskCreate
SetAgentID sets the "agent_id" field.
func (*TaskCreate) SetCmd ¶
func (_c *TaskCreate) SetCmd(v int32) *TaskCreate
SetCmd sets the "cmd" field.
func (*TaskCreate) SetCreateTime ¶
func (_c *TaskCreate) SetCreateTime(v time.Time) *TaskCreate
SetCreateTime sets the "create_time" field.
func (*TaskCreate) SetID ¶
func (_c *TaskCreate) SetID(v uuid.UUID) *TaskCreate
SetID sets the "id" field.
func (*TaskCreate) SetNillableCmd ¶
func (_c *TaskCreate) SetNillableCmd(v *int32) *TaskCreate
SetNillableCmd sets the "cmd" field if the given value is not nil.
func (*TaskCreate) SetNillableCreateTime ¶
func (_c *TaskCreate) SetNillableCreateTime(v *time.Time) *TaskCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TaskCreate) SetNillableID ¶
func (_c *TaskCreate) SetNillableID(v *uuid.UUID) *TaskCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TaskCreate) SetParams ¶
func (_c *TaskCreate) SetParams(v string) *TaskCreate
SetParams sets the "params" field.
func (*TaskCreate) SetStatus ¶
func (_c *TaskCreate) SetStatus(v int) *TaskCreate
SetStatus sets the "status" field.
type TaskCreateBulk ¶
type TaskCreateBulk struct {
// contains filtered or unexported fields
}
TaskCreateBulk is the builder for creating many Task entities in bulk.
func (*TaskCreateBulk) Exec ¶
func (_c *TaskCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreateBulk) ExecX ¶
func (_c *TaskCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TaskDelete ¶
type TaskDelete struct {
// contains filtered or unexported fields
}
TaskDelete is the builder for deleting a Task entity.
func (*TaskDelete) Exec ¶
func (_d *TaskDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TaskDelete) ExecX ¶
func (_d *TaskDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TaskDelete) Where ¶
func (_d *TaskDelete) Where(ps ...predicate.Task) *TaskDelete
Where appends a list predicates to the TaskDelete builder.
type TaskDeleteOne ¶
type TaskDeleteOne struct {
// contains filtered or unexported fields
}
TaskDeleteOne is the builder for deleting a single Task entity.
func (*TaskDeleteOne) Exec ¶
func (_d *TaskDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TaskDeleteOne) ExecX ¶
func (_d *TaskDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskDeleteOne) Where ¶
func (_d *TaskDeleteOne) Where(ps ...predicate.Task) *TaskDeleteOne
Where appends a list predicates to the TaskDelete builder.
type TaskGroupBy ¶
type TaskGroupBy struct {
// contains filtered or unexported fields
}
TaskGroupBy is the group-by builder for Task entities.
func (*TaskGroupBy) Aggregate ¶
func (_g *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TaskGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Scan ¶
func (_g *TaskGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TaskGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TaskMutation ¶
type TaskMutation struct {
// contains filtered or unexported fields
}
TaskMutation represents an operation that mutates the Task nodes in the graph.
func (*TaskMutation) AddCmd ¶
func (m *TaskMutation) AddCmd(i int32)
AddCmd adds i to the "cmd" field.
func (*TaskMutation) AddField ¶
func (m *TaskMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*TaskMutation) AddStatus ¶
func (m *TaskMutation) AddStatus(i int)
AddStatus adds i to the "status" field.
func (*TaskMutation) AddedCmd ¶
func (m *TaskMutation) AddedCmd() (r int32, exists bool)
AddedCmd returns the value that was added to the "cmd" field in this mutation.
func (*TaskMutation) AddedEdges ¶
func (m *TaskMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TaskMutation) AddedField ¶
func (m *TaskMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*TaskMutation) AddedFields ¶
func (m *TaskMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TaskMutation) AddedIDs ¶
func (m *TaskMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TaskMutation) AddedStatus ¶
func (m *TaskMutation) AddedStatus() (r int, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*TaskMutation) AgentID ¶
func (m *TaskMutation) AgentID() (r string, exists bool)
AgentID returns the value of the "agent_id" field in the mutation.
func (*TaskMutation) ClearEdge ¶
func (m *TaskMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*TaskMutation) ClearField ¶
func (m *TaskMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*TaskMutation) ClearedEdges ¶
func (m *TaskMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TaskMutation) ClearedFields ¶
func (m *TaskMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TaskMutation) Client ¶
func (m TaskMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*TaskMutation) Cmd ¶
func (m *TaskMutation) Cmd() (r int32, exists bool)
Cmd returns the value of the "cmd" field in the mutation.
func (*TaskMutation) CreateTime ¶
func (m *TaskMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*TaskMutation) EdgeCleared ¶
func (m *TaskMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TaskMutation) Field ¶
func (m *TaskMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*TaskMutation) FieldCleared ¶
func (m *TaskMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TaskMutation) Fields ¶
func (m *TaskMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*TaskMutation) ID ¶
func (m *TaskMutation) ID() (id 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 (*TaskMutation) 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 (*TaskMutation) OldAgentID ¶
func (m *TaskMutation) OldAgentID(ctx context.Context) (v string, err error)
OldAgentID returns the old "agent_id" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TaskMutation) OldCmd ¶
func (m *TaskMutation) OldCmd(ctx context.Context) (v int32, err error)
OldCmd returns the old "cmd" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TaskMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TaskMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*TaskMutation) OldParams ¶
func (m *TaskMutation) OldParams(ctx context.Context) (v *string, err error)
OldParams returns the old "params" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TaskMutation) OldStatus ¶
func (m *TaskMutation) OldStatus(ctx context.Context) (v int, err error)
OldStatus returns the old "status" field's value of the Task entity. If the Task object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TaskMutation) Params ¶
func (m *TaskMutation) Params() (r string, exists bool)
Params returns the value of the "params" field in the mutation.
func (*TaskMutation) RemovedEdges ¶
func (m *TaskMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TaskMutation) RemovedIDs ¶
func (m *TaskMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*TaskMutation) ResetAgentID ¶
func (m *TaskMutation) ResetAgentID()
ResetAgentID resets all changes to the "agent_id" field.
func (*TaskMutation) ResetCmd ¶
func (m *TaskMutation) ResetCmd()
ResetCmd resets all changes to the "cmd" field.
func (*TaskMutation) ResetCreateTime ¶
func (m *TaskMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*TaskMutation) ResetEdge ¶
func (m *TaskMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*TaskMutation) ResetField ¶
func (m *TaskMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*TaskMutation) ResetParams ¶
func (m *TaskMutation) ResetParams()
ResetParams resets all changes to the "params" field.
func (*TaskMutation) ResetStatus ¶
func (m *TaskMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*TaskMutation) SetAgentID ¶
func (m *TaskMutation) SetAgentID(s string)
SetAgentID sets the "agent_id" field.
func (*TaskMutation) SetCreateTime ¶
func (m *TaskMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*TaskMutation) SetField ¶
func (m *TaskMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*TaskMutation) SetID ¶
func (m *TaskMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Task entities.
func (*TaskMutation) SetOp ¶
func (m *TaskMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TaskMutation) SetParams ¶
func (m *TaskMutation) SetParams(s string)
SetParams sets the "params" field.
func (*TaskMutation) SetStatus ¶
func (m *TaskMutation) SetStatus(i int)
SetStatus sets the "status" field.
func (*TaskMutation) Status ¶
func (m *TaskMutation) Status() (r int, exists bool)
Status returns the value of the "status" field in the mutation.
func (TaskMutation) Tx ¶
func (m TaskMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TaskMutation) Type ¶
func (m *TaskMutation) Type() string
Type returns the node type of this mutation (Task).
func (*TaskMutation) Where ¶
func (m *TaskMutation) Where(ps ...predicate.Task)
Where appends a list predicates to the TaskMutation builder.
func (*TaskMutation) WhereP ¶
func (m *TaskMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TaskMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TaskQuery ¶
type TaskQuery struct {
// contains filtered or unexported fields
}
TaskQuery is the builder for querying Task entities.
func (*TaskQuery) Aggregate ¶
func (_q *TaskQuery) Aggregate(fns ...AggregateFunc) *TaskSelect
Aggregate returns a TaskSelect configured with the given aggregations.
func (*TaskQuery) Clone ¶
Clone returns a duplicate of the TaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TaskQuery) First ¶
First returns the first Task entity from the query. Returns a *NotFoundError when no Task was found.
func (*TaskQuery) FirstID ¶
FirstID returns the first Task ID from the query. Returns a *NotFoundError when no Task ID was found.
func (*TaskQuery) GroupBy ¶
func (_q *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
AgentID string `json:"agent_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Task.Query().
GroupBy(task.FieldAgentID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*TaskQuery) Only ¶
Only returns a single Task entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Task entity is found. Returns a *NotFoundError when no Task entities are found.
func (*TaskQuery) OnlyID ¶
OnlyID is like Only, but returns the only Task ID in the query. Returns a *NotSingularError when more than one Task ID is found. Returns a *NotFoundError when no entities are found.
func (*TaskQuery) Order ¶
func (_q *TaskQuery) Order(o ...task.OrderOption) *TaskQuery
Order specifies how the records should be ordered.
func (*TaskQuery) Select ¶
func (_q *TaskQuery) Select(fields ...string) *TaskSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
AgentID string `json:"agent_id,omitempty"`
}
client.Task.Query().
Select(task.FieldAgentID).
Scan(ctx, &v)
type TaskSelect ¶
type TaskSelect struct {
*TaskQuery
// contains filtered or unexported fields
}
TaskSelect is the builder for selecting fields of Task entities.
func (*TaskSelect) Aggregate ¶
func (_s *TaskSelect) Aggregate(fns ...AggregateFunc) *TaskSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TaskSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Scan ¶
func (_s *TaskSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TaskSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TaskUpdate ¶
type TaskUpdate struct {
// contains filtered or unexported fields
}
TaskUpdate is the builder for updating Task entities.
func (*TaskUpdate) AddCmd ¶
func (_u *TaskUpdate) AddCmd(v int32) *TaskUpdate
AddCmd adds value to the "cmd" field.
func (*TaskUpdate) AddStatus ¶
func (_u *TaskUpdate) AddStatus(v int) *TaskUpdate
AddStatus adds value to the "status" field.
func (*TaskUpdate) Exec ¶
func (_u *TaskUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpdate) ExecX ¶
func (_u *TaskUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdate) Mutation ¶
func (_u *TaskUpdate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdate) Save ¶
func (_u *TaskUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TaskUpdate) SaveX ¶
func (_u *TaskUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdate) SetAgentID ¶
func (_u *TaskUpdate) SetAgentID(v string) *TaskUpdate
SetAgentID sets the "agent_id" field.
func (*TaskUpdate) SetCmd ¶
func (_u *TaskUpdate) SetCmd(v int32) *TaskUpdate
SetCmd sets the "cmd" field.
func (*TaskUpdate) SetCreateTime ¶
func (_u *TaskUpdate) SetCreateTime(v time.Time) *TaskUpdate
SetCreateTime sets the "create_time" field.
func (*TaskUpdate) SetNillableAgentID ¶
func (_u *TaskUpdate) SetNillableAgentID(v *string) *TaskUpdate
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*TaskUpdate) SetNillableCmd ¶
func (_u *TaskUpdate) SetNillableCmd(v *int32) *TaskUpdate
SetNillableCmd sets the "cmd" field if the given value is not nil.
func (*TaskUpdate) SetNillableCreateTime ¶
func (_u *TaskUpdate) SetNillableCreateTime(v *time.Time) *TaskUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TaskUpdate) SetNillableParams ¶
func (_u *TaskUpdate) SetNillableParams(v *string) *TaskUpdate
SetNillableParams sets the "params" field if the given value is not nil.
func (*TaskUpdate) SetNillableStatus ¶
func (_u *TaskUpdate) SetNillableStatus(v *int) *TaskUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TaskUpdate) SetParams ¶
func (_u *TaskUpdate) SetParams(v string) *TaskUpdate
SetParams sets the "params" field.
func (*TaskUpdate) SetStatus ¶
func (_u *TaskUpdate) SetStatus(v int) *TaskUpdate
SetStatus sets the "status" field.
func (*TaskUpdate) Where ¶
func (_u *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
Where appends a list predicates to the TaskUpdate builder.
type TaskUpdateOne ¶
type TaskUpdateOne struct {
// contains filtered or unexported fields
}
TaskUpdateOne is the builder for updating a single Task entity.
func (*TaskUpdateOne) AddCmd ¶
func (_u *TaskUpdateOne) AddCmd(v int32) *TaskUpdateOne
AddCmd adds value to the "cmd" field.
func (*TaskUpdateOne) AddStatus ¶
func (_u *TaskUpdateOne) AddStatus(v int) *TaskUpdateOne
AddStatus adds value to the "status" field.
func (*TaskUpdateOne) Exec ¶
func (_u *TaskUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TaskUpdateOne) ExecX ¶
func (_u *TaskUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdateOne) Mutation ¶
func (_u *TaskUpdateOne) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdateOne) Save ¶
func (_u *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
Save executes the query and returns the updated Task entity.
func (*TaskUpdateOne) SaveX ¶
func (_u *TaskUpdateOne) SaveX(ctx context.Context) *Task
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdateOne) Select ¶
func (_u *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TaskUpdateOne) SetAgentID ¶
func (_u *TaskUpdateOne) SetAgentID(v string) *TaskUpdateOne
SetAgentID sets the "agent_id" field.
func (*TaskUpdateOne) SetCmd ¶
func (_u *TaskUpdateOne) SetCmd(v int32) *TaskUpdateOne
SetCmd sets the "cmd" field.
func (*TaskUpdateOne) SetCreateTime ¶
func (_u *TaskUpdateOne) SetCreateTime(v time.Time) *TaskUpdateOne
SetCreateTime sets the "create_time" field.
func (*TaskUpdateOne) SetNillableAgentID ¶
func (_u *TaskUpdateOne) SetNillableAgentID(v *string) *TaskUpdateOne
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableCmd ¶
func (_u *TaskUpdateOne) SetNillableCmd(v *int32) *TaskUpdateOne
SetNillableCmd sets the "cmd" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableCreateTime ¶
func (_u *TaskUpdateOne) SetNillableCreateTime(v *time.Time) *TaskUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableParams ¶
func (_u *TaskUpdateOne) SetNillableParams(v *string) *TaskUpdateOne
SetNillableParams sets the "params" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableStatus ¶
func (_u *TaskUpdateOne) SetNillableStatus(v *int) *TaskUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TaskUpdateOne) SetParams ¶
func (_u *TaskUpdateOne) SetParams(v string) *TaskUpdateOne
SetParams sets the "params" field.
func (*TaskUpdateOne) SetStatus ¶
func (_u *TaskUpdateOne) SetStatus(v int) *TaskUpdateOne
SetStatus sets the "status" field.
func (*TaskUpdateOne) Where ¶
func (_u *TaskUpdateOne) Where(ps ...predicate.Task) *TaskUpdateOne
Where appends a list predicates to the TaskUpdate 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
// AlipayOrderRollback is the client for interacting with the AlipayOrderRollback builders.
AlipayOrderRollback *AlipayOrderRollbackClient
// 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
// ComputeSpecPrice is the client for interacting with the ComputeSpecPrice builders.
ComputeSpecPrice *ComputeSpecPriceClient
// Cycle is the client for interacting with the Cycle builders.
Cycle *CycleClient
// CycleOrder is the client for interacting with the CycleOrder builders.
CycleOrder *CycleOrderClient
// CycleRecharge is the client for interacting with the CycleRecharge builders.
CycleRecharge *CycleRechargeClient
// CycleRedeemCode is the client for interacting with the CycleRedeemCode builders.
CycleRedeemCode *CycleRedeemCodeClient
// CycleRenewal is the client for interacting with the CycleRenewal builders.
CycleRenewal *CycleRenewalClient
// CycleTransaction is the client for interacting with the CycleTransaction builders.
CycleTransaction *CycleTransactionClient
// DomainBinding is the client for interacting with the DomainBinding builders.
DomainBinding *DomainBindingClient
// Employee is the client for interacting with the Employee builders.
Employee *EmployeeClient
// Gateway is the client for interacting with the Gateway builders.
Gateway *GatewayClient
// GatewayPort is the client for interacting with the GatewayPort builders.
GatewayPort *GatewayPortClient
// NetworkMapping is the client for interacting with the NetworkMapping builders.
NetworkMapping *NetworkMappingClient
// S3Bucket is the client for interacting with the S3Bucket builders.
S3Bucket *S3BucketClient
// S3User is the client for interacting with the S3User builders.
S3User *S3UserClient
// Script is the client for interacting with the Script builders.
Script *ScriptClient
// ScriptExecutionRecord is the client for interacting with the ScriptExecutionRecord builders.
ScriptExecutionRecord *ScriptExecutionRecordClient
// Storage is the client for interacting with the Storage builders.
Storage *StorageClient
// StorageProvider is the client for interacting with the StorageProvider builders.
StorageProvider *StorageProviderClient
// Task is the client for interacting with the Task builders.
Task *TaskClient
// User is the client for interacting with the User builders.
User *UserClient
// UserResourceLimit is the client for interacting with the UserResourceLimit builders.
UserResourceLimit *UserResourceLimitClient
// 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"`
// 用户名
Username string `json:"username,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"`
// 是否配置过密码
PwdConfig bool `json:"pwd_config,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 (_m *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(_m *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) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(_m *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 (_c *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (_c *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (_c *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (_c *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (_c *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCountryCallCoding ¶
func (_c *UserCreate) SetCountryCallCoding(v string) *UserCreate
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserCreate) SetCreateDate ¶
func (_c *UserCreate) SetCreateDate(v time.Time) *UserCreate
SetCreateDate sets the "create_date" field.
func (*UserCreate) SetID ¶
func (_c *UserCreate) SetID(v uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIcon ¶
func (_c *UserCreate) SetIcon(v string) *UserCreate
SetIcon sets the "icon" field.
func (*UserCreate) SetLastLoginDate ¶
func (_c *UserCreate) SetLastLoginDate(v time.Time) *UserCreate
SetLastLoginDate sets the "last_login_date" field.
func (*UserCreate) SetName ¶
func (_c *UserCreate) SetName(v string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableCreateDate ¶
func (_c *UserCreate) SetNillableCreateDate(v *time.Time) *UserCreate
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (_c *UserCreate) SetNillableID(v *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableLastLoginDate ¶
func (_c *UserCreate) SetNillableLastLoginDate(v *time.Time) *UserCreate
SetNillableLastLoginDate sets the "last_login_date" field if the given value is not nil.
func (*UserCreate) SetNillablePwdConfig ¶
func (_c *UserCreate) SetNillablePwdConfig(v *bool) *UserCreate
SetNillablePwdConfig sets the "pwd_config" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (_c *UserCreate) SetPassword(v string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetPwdConfig ¶
func (_c *UserCreate) SetPwdConfig(v bool) *UserCreate
SetPwdConfig sets the "pwd_config" field.
func (*UserCreate) SetTelephoneNumber ¶
func (_c *UserCreate) SetTelephoneNumber(v string) *UserCreate
SetTelephoneNumber sets the "telephone_number" field.
func (*UserCreate) SetUsername ¶
func (_c *UserCreate) SetUsername(v string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (_c *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (_c *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 (_d *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (_d *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (_d *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 (_d *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (_d *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (_d *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 (_g *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 (_g *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) OldPwdConfig ¶
func (m *UserMutation) OldPwdConfig(ctx context.Context) (v bool, err error)
OldPwdConfig returns the old "pwd_config" 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) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PwdConfig ¶
func (m *UserMutation) PwdConfig() (r bool, exists bool)
PwdConfig returns the value of the "pwd_config" 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) ResetPwdConfig ¶
func (m *UserMutation) ResetPwdConfig()
ResetPwdConfig resets all changes to the "pwd_config" field.
func (*UserMutation) ResetTelephoneNumber ¶
func (m *UserMutation) ResetTelephoneNumber()
ResetTelephoneNumber resets all changes to the "telephone_number" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" 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) SetPwdConfig ¶
func (m *UserMutation) SetPwdConfig(b bool)
SetPwdConfig sets the "pwd_config" field.
func (*UserMutation) SetTelephoneNumber ¶
func (m *UserMutation) SetTelephoneNumber(s string)
SetTelephoneNumber sets the "telephone_number" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" 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) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (_q *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 (_q *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 {
Username string `json:"username,omitempty"`
Count int `json:"count,omitempty"`
}
client.User.Query().
GroupBy(user.FieldUsername).
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 (_q *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) Select ¶
func (_q *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 {
Username string `json:"username,omitempty"`
}
client.User.Query().
Select(user.FieldUsername).
Scan(ctx, &v)
type UserResourceLimit ¶
type UserResourceLimit struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// 用户id
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
// MaxCPU holds the value of the "max_cpu" field.
MaxCPU int32 `json:"max_cpu,omitempty"`
// MaxMemory holds the value of the "max_memory" field.
MaxMemory int32 `json:"max_memory,omitempty"`
// MaxNetworkMapping holds the value of the "max_network_mapping" field.
MaxNetworkMapping int32 `json:"max_network_mapping,omitempty"`
// contains filtered or unexported fields
}
UserResourceLimit is the model entity for the UserResourceLimit schema.
func (*UserResourceLimit) String ¶
func (_m *UserResourceLimit) String() string
String implements the fmt.Stringer.
func (*UserResourceLimit) Unwrap ¶
func (_m *UserResourceLimit) Unwrap() *UserResourceLimit
Unwrap unwraps the UserResourceLimit 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 (*UserResourceLimit) Update ¶
func (_m *UserResourceLimit) Update() *UserResourceLimitUpdateOne
Update returns a builder for updating this UserResourceLimit. Note that you need to call UserResourceLimit.Unwrap() before calling this method if this UserResourceLimit was returned from a transaction, and the transaction was committed or rolled back.
type UserResourceLimitClient ¶
type UserResourceLimitClient struct {
// contains filtered or unexported fields
}
UserResourceLimitClient is a client for the UserResourceLimit schema.
func NewUserResourceLimitClient ¶
func NewUserResourceLimitClient(c config) *UserResourceLimitClient
NewUserResourceLimitClient returns a client for the UserResourceLimit from the given config.
func (*UserResourceLimitClient) Create ¶
func (c *UserResourceLimitClient) Create() *UserResourceLimitCreate
Create returns a builder for creating a UserResourceLimit entity.
func (*UserResourceLimitClient) CreateBulk ¶
func (c *UserResourceLimitClient) CreateBulk(builders ...*UserResourceLimitCreate) *UserResourceLimitCreateBulk
CreateBulk returns a builder for creating a bulk of UserResourceLimit entities.
func (*UserResourceLimitClient) Delete ¶
func (c *UserResourceLimitClient) Delete() *UserResourceLimitDelete
Delete returns a delete builder for UserResourceLimit.
func (*UserResourceLimitClient) DeleteOne ¶
func (c *UserResourceLimitClient) DeleteOne(_m *UserResourceLimit) *UserResourceLimitDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserResourceLimitClient) DeleteOneID ¶
func (c *UserResourceLimitClient) DeleteOneID(id uuid.UUID) *UserResourceLimitDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserResourceLimitClient) Get ¶
func (c *UserResourceLimitClient) Get(ctx context.Context, id uuid.UUID) (*UserResourceLimit, error)
Get returns a UserResourceLimit entity by its id.
func (*UserResourceLimitClient) GetX ¶
func (c *UserResourceLimitClient) GetX(ctx context.Context, id uuid.UUID) *UserResourceLimit
GetX is like Get, but panics if an error occurs.
func (*UserResourceLimitClient) Hooks ¶
func (c *UserResourceLimitClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserResourceLimitClient) Intercept ¶
func (c *UserResourceLimitClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userresourcelimit.Intercept(f(g(h())))`.
func (*UserResourceLimitClient) Interceptors ¶
func (c *UserResourceLimitClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserResourceLimitClient) MapCreateBulk ¶
func (c *UserResourceLimitClient) MapCreateBulk(slice any, setFunc func(*UserResourceLimitCreate, int)) *UserResourceLimitCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserResourceLimitClient) Query ¶
func (c *UserResourceLimitClient) Query() *UserResourceLimitQuery
Query returns a query builder for UserResourceLimit.
func (*UserResourceLimitClient) Update ¶
func (c *UserResourceLimitClient) Update() *UserResourceLimitUpdate
Update returns an update builder for UserResourceLimit.
func (*UserResourceLimitClient) UpdateOne ¶
func (c *UserResourceLimitClient) UpdateOne(_m *UserResourceLimit) *UserResourceLimitUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserResourceLimitClient) UpdateOneID ¶
func (c *UserResourceLimitClient) UpdateOneID(id uuid.UUID) *UserResourceLimitUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserResourceLimitClient) Use ¶
func (c *UserResourceLimitClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userresourcelimit.Hooks(f(g(h())))`.
type UserResourceLimitCreate ¶
type UserResourceLimitCreate struct {
// contains filtered or unexported fields
}
UserResourceLimitCreate is the builder for creating a UserResourceLimit entity.
func (*UserResourceLimitCreate) Exec ¶
func (_c *UserResourceLimitCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserResourceLimitCreate) ExecX ¶
func (_c *UserResourceLimitCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserResourceLimitCreate) Mutation ¶
func (_c *UserResourceLimitCreate) Mutation() *UserResourceLimitMutation
Mutation returns the UserResourceLimitMutation object of the builder.
func (*UserResourceLimitCreate) Save ¶
func (_c *UserResourceLimitCreate) Save(ctx context.Context) (*UserResourceLimit, error)
Save creates the UserResourceLimit in the database.
func (*UserResourceLimitCreate) SaveX ¶
func (_c *UserResourceLimitCreate) SaveX(ctx context.Context) *UserResourceLimit
SaveX calls Save and panics if Save returns an error.
func (*UserResourceLimitCreate) SetFkUserID ¶
func (_c *UserResourceLimitCreate) SetFkUserID(v uuid.UUID) *UserResourceLimitCreate
SetFkUserID sets the "fk_user_id" field.
func (*UserResourceLimitCreate) SetID ¶
func (_c *UserResourceLimitCreate) SetID(v uuid.UUID) *UserResourceLimitCreate
SetID sets the "id" field.
func (*UserResourceLimitCreate) SetMaxCPU ¶
func (_c *UserResourceLimitCreate) SetMaxCPU(v int32) *UserResourceLimitCreate
SetMaxCPU sets the "max_cpu" field.
func (*UserResourceLimitCreate) SetMaxMemory ¶
func (_c *UserResourceLimitCreate) SetMaxMemory(v int32) *UserResourceLimitCreate
SetMaxMemory sets the "max_memory" field.
func (*UserResourceLimitCreate) SetMaxNetworkMapping ¶
func (_c *UserResourceLimitCreate) SetMaxNetworkMapping(v int32) *UserResourceLimitCreate
SetMaxNetworkMapping sets the "max_network_mapping" field.
func (*UserResourceLimitCreate) SetNillableFkUserID ¶
func (_c *UserResourceLimitCreate) SetNillableFkUserID(v *uuid.UUID) *UserResourceLimitCreate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*UserResourceLimitCreate) SetNillableID ¶
func (_c *UserResourceLimitCreate) SetNillableID(v *uuid.UUID) *UserResourceLimitCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserResourceLimitCreate) SetNillableMaxCPU ¶
func (_c *UserResourceLimitCreate) SetNillableMaxCPU(v *int32) *UserResourceLimitCreate
SetNillableMaxCPU sets the "max_cpu" field if the given value is not nil.
func (*UserResourceLimitCreate) SetNillableMaxMemory ¶
func (_c *UserResourceLimitCreate) SetNillableMaxMemory(v *int32) *UserResourceLimitCreate
SetNillableMaxMemory sets the "max_memory" field if the given value is not nil.
func (*UserResourceLimitCreate) SetNillableMaxNetworkMapping ¶
func (_c *UserResourceLimitCreate) SetNillableMaxNetworkMapping(v *int32) *UserResourceLimitCreate
SetNillableMaxNetworkMapping sets the "max_network_mapping" field if the given value is not nil.
type UserResourceLimitCreateBulk ¶
type UserResourceLimitCreateBulk struct {
// contains filtered or unexported fields
}
UserResourceLimitCreateBulk is the builder for creating many UserResourceLimit entities in bulk.
func (*UserResourceLimitCreateBulk) Exec ¶
func (_c *UserResourceLimitCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserResourceLimitCreateBulk) ExecX ¶
func (_c *UserResourceLimitCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserResourceLimitCreateBulk) Save ¶
func (_c *UserResourceLimitCreateBulk) Save(ctx context.Context) ([]*UserResourceLimit, error)
Save creates the UserResourceLimit entities in the database.
func (*UserResourceLimitCreateBulk) SaveX ¶
func (_c *UserResourceLimitCreateBulk) SaveX(ctx context.Context) []*UserResourceLimit
SaveX is like Save, but panics if an error occurs.
type UserResourceLimitDelete ¶
type UserResourceLimitDelete struct {
// contains filtered or unexported fields
}
UserResourceLimitDelete is the builder for deleting a UserResourceLimit entity.
func (*UserResourceLimitDelete) Exec ¶
func (_d *UserResourceLimitDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserResourceLimitDelete) ExecX ¶
func (_d *UserResourceLimitDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserResourceLimitDelete) Where ¶
func (_d *UserResourceLimitDelete) Where(ps ...predicate.UserResourceLimit) *UserResourceLimitDelete
Where appends a list predicates to the UserResourceLimitDelete builder.
type UserResourceLimitDeleteOne ¶
type UserResourceLimitDeleteOne struct {
// contains filtered or unexported fields
}
UserResourceLimitDeleteOne is the builder for deleting a single UserResourceLimit entity.
func (*UserResourceLimitDeleteOne) Exec ¶
func (_d *UserResourceLimitDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserResourceLimitDeleteOne) ExecX ¶
func (_d *UserResourceLimitDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserResourceLimitDeleteOne) Where ¶
func (_d *UserResourceLimitDeleteOne) Where(ps ...predicate.UserResourceLimit) *UserResourceLimitDeleteOne
Where appends a list predicates to the UserResourceLimitDelete builder.
type UserResourceLimitGroupBy ¶
type UserResourceLimitGroupBy struct {
// contains filtered or unexported fields
}
UserResourceLimitGroupBy is the group-by builder for UserResourceLimit entities.
func (*UserResourceLimitGroupBy) Aggregate ¶
func (_g *UserResourceLimitGroupBy) Aggregate(fns ...AggregateFunc) *UserResourceLimitGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserResourceLimitGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*UserResourceLimitGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*UserResourceLimitGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitGroupBy) Scan ¶
func (_g *UserResourceLimitGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserResourceLimitGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserResourceLimitMutation ¶
type UserResourceLimitMutation struct {
// contains filtered or unexported fields
}
UserResourceLimitMutation represents an operation that mutates the UserResourceLimit nodes in the graph.
func (*UserResourceLimitMutation) AddField ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) AddMaxCPU ¶
func (m *UserResourceLimitMutation) AddMaxCPU(i int32)
AddMaxCPU adds i to the "max_cpu" field.
func (*UserResourceLimitMutation) AddMaxMemory ¶
func (m *UserResourceLimitMutation) AddMaxMemory(i int32)
AddMaxMemory adds i to the "max_memory" field.
func (*UserResourceLimitMutation) AddMaxNetworkMapping ¶
func (m *UserResourceLimitMutation) AddMaxNetworkMapping(i int32)
AddMaxNetworkMapping adds i to the "max_network_mapping" field.
func (*UserResourceLimitMutation) AddedEdges ¶
func (m *UserResourceLimitMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserResourceLimitMutation) AddedField ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) AddedFields ¶
func (m *UserResourceLimitMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserResourceLimitMutation) AddedIDs ¶
func (m *UserResourceLimitMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserResourceLimitMutation) AddedMaxCPU ¶
func (m *UserResourceLimitMutation) AddedMaxCPU() (r int32, exists bool)
AddedMaxCPU returns the value that was added to the "max_cpu" field in this mutation.
func (*UserResourceLimitMutation) AddedMaxMemory ¶
func (m *UserResourceLimitMutation) AddedMaxMemory() (r int32, exists bool)
AddedMaxMemory returns the value that was added to the "max_memory" field in this mutation.
func (*UserResourceLimitMutation) AddedMaxNetworkMapping ¶
func (m *UserResourceLimitMutation) AddedMaxNetworkMapping() (r int32, exists bool)
AddedMaxNetworkMapping returns the value that was added to the "max_network_mapping" field in this mutation.
func (*UserResourceLimitMutation) ClearEdge ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) ClearField ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) ClearedEdges ¶
func (m *UserResourceLimitMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserResourceLimitMutation) ClearedFields ¶
func (m *UserResourceLimitMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserResourceLimitMutation) Client ¶
func (m UserResourceLimitMutation) 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 (*UserResourceLimitMutation) EdgeCleared ¶
func (m *UserResourceLimitMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserResourceLimitMutation) Field ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) FieldCleared ¶
func (m *UserResourceLimitMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserResourceLimitMutation) Fields ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) FkUserID ¶
func (m *UserResourceLimitMutation) FkUserID() (r uuid.UUID, exists bool)
FkUserID returns the value of the "fk_user_id" field in the mutation.
func (*UserResourceLimitMutation) ID ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) 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 (*UserResourceLimitMutation) MaxCPU ¶
func (m *UserResourceLimitMutation) MaxCPU() (r int32, exists bool)
MaxCPU returns the value of the "max_cpu" field in the mutation.
func (*UserResourceLimitMutation) MaxMemory ¶
func (m *UserResourceLimitMutation) MaxMemory() (r int32, exists bool)
MaxMemory returns the value of the "max_memory" field in the mutation.
func (*UserResourceLimitMutation) MaxNetworkMapping ¶
func (m *UserResourceLimitMutation) MaxNetworkMapping() (r int32, exists bool)
MaxNetworkMapping returns the value of the "max_network_mapping" field in the mutation.
func (*UserResourceLimitMutation) 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 (*UserResourceLimitMutation) OldFkUserID ¶
OldFkUserID returns the old "fk_user_id" field's value of the UserResourceLimit entity. If the UserResourceLimit 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 (*UserResourceLimitMutation) OldMaxCPU ¶
func (m *UserResourceLimitMutation) OldMaxCPU(ctx context.Context) (v int32, err error)
OldMaxCPU returns the old "max_cpu" field's value of the UserResourceLimit entity. If the UserResourceLimit 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 (*UserResourceLimitMutation) OldMaxMemory ¶
func (m *UserResourceLimitMutation) OldMaxMemory(ctx context.Context) (v int32, err error)
OldMaxMemory returns the old "max_memory" field's value of the UserResourceLimit entity. If the UserResourceLimit 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 (*UserResourceLimitMutation) OldMaxNetworkMapping ¶
func (m *UserResourceLimitMutation) OldMaxNetworkMapping(ctx context.Context) (v int32, err error)
OldMaxNetworkMapping returns the old "max_network_mapping" field's value of the UserResourceLimit entity. If the UserResourceLimit 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 (*UserResourceLimitMutation) Op ¶
func (m *UserResourceLimitMutation) Op() Op
Op returns the operation name.
func (*UserResourceLimitMutation) RemovedEdges ¶
func (m *UserResourceLimitMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserResourceLimitMutation) RemovedIDs ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) ResetEdge ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) ResetField ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) ResetFkUserID ¶
func (m *UserResourceLimitMutation) ResetFkUserID()
ResetFkUserID resets all changes to the "fk_user_id" field.
func (*UserResourceLimitMutation) ResetMaxCPU ¶
func (m *UserResourceLimitMutation) ResetMaxCPU()
ResetMaxCPU resets all changes to the "max_cpu" field.
func (*UserResourceLimitMutation) ResetMaxMemory ¶
func (m *UserResourceLimitMutation) ResetMaxMemory()
ResetMaxMemory resets all changes to the "max_memory" field.
func (*UserResourceLimitMutation) ResetMaxNetworkMapping ¶
func (m *UserResourceLimitMutation) ResetMaxNetworkMapping()
ResetMaxNetworkMapping resets all changes to the "max_network_mapping" field.
func (*UserResourceLimitMutation) SetField ¶
func (m *UserResourceLimitMutation) 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 (*UserResourceLimitMutation) SetFkUserID ¶
func (m *UserResourceLimitMutation) SetFkUserID(u uuid.UUID)
SetFkUserID sets the "fk_user_id" field.
func (*UserResourceLimitMutation) SetID ¶
func (m *UserResourceLimitMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserResourceLimit entities.
func (*UserResourceLimitMutation) SetMaxCPU ¶
func (m *UserResourceLimitMutation) SetMaxCPU(i int32)
SetMaxCPU sets the "max_cpu" field.
func (*UserResourceLimitMutation) SetMaxMemory ¶
func (m *UserResourceLimitMutation) SetMaxMemory(i int32)
SetMaxMemory sets the "max_memory" field.
func (*UserResourceLimitMutation) SetMaxNetworkMapping ¶
func (m *UserResourceLimitMutation) SetMaxNetworkMapping(i int32)
SetMaxNetworkMapping sets the "max_network_mapping" field.
func (*UserResourceLimitMutation) SetOp ¶
func (m *UserResourceLimitMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (UserResourceLimitMutation) Tx ¶
func (m UserResourceLimitMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserResourceLimitMutation) Type ¶
func (m *UserResourceLimitMutation) Type() string
Type returns the node type of this mutation (UserResourceLimit).
func (*UserResourceLimitMutation) Where ¶
func (m *UserResourceLimitMutation) Where(ps ...predicate.UserResourceLimit)
Where appends a list predicates to the UserResourceLimitMutation builder.
func (*UserResourceLimitMutation) WhereP ¶
func (m *UserResourceLimitMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserResourceLimitMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserResourceLimitQuery ¶
type UserResourceLimitQuery struct {
// contains filtered or unexported fields
}
UserResourceLimitQuery is the builder for querying UserResourceLimit entities.
func (*UserResourceLimitQuery) Aggregate ¶
func (_q *UserResourceLimitQuery) Aggregate(fns ...AggregateFunc) *UserResourceLimitSelect
Aggregate returns a UserResourceLimitSelect configured with the given aggregations.
func (*UserResourceLimitQuery) All ¶
func (_q *UserResourceLimitQuery) All(ctx context.Context) ([]*UserResourceLimit, error)
All executes the query and returns a list of UserResourceLimits.
func (*UserResourceLimitQuery) AllX ¶
func (_q *UserResourceLimitQuery) AllX(ctx context.Context) []*UserResourceLimit
AllX is like All, but panics if an error occurs.
func (*UserResourceLimitQuery) Clone ¶
func (_q *UserResourceLimitQuery) Clone() *UserResourceLimitQuery
Clone returns a duplicate of the UserResourceLimitQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserResourceLimitQuery) Count ¶
func (_q *UserResourceLimitQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserResourceLimitQuery) CountX ¶
func (_q *UserResourceLimitQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserResourceLimitQuery) Exist ¶
func (_q *UserResourceLimitQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserResourceLimitQuery) ExistX ¶
func (_q *UserResourceLimitQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserResourceLimitQuery) First ¶
func (_q *UserResourceLimitQuery) First(ctx context.Context) (*UserResourceLimit, error)
First returns the first UserResourceLimit entity from the query. Returns a *NotFoundError when no UserResourceLimit was found.
func (*UserResourceLimitQuery) FirstID ¶
FirstID returns the first UserResourceLimit ID from the query. Returns a *NotFoundError when no UserResourceLimit ID was found.
func (*UserResourceLimitQuery) FirstIDX ¶
func (_q *UserResourceLimitQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserResourceLimitQuery) FirstX ¶
func (_q *UserResourceLimitQuery) FirstX(ctx context.Context) *UserResourceLimit
FirstX is like First, but panics if an error occurs.
func (*UserResourceLimitQuery) GroupBy ¶
func (_q *UserResourceLimitQuery) GroupBy(field string, fields ...string) *UserResourceLimitGroupBy
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.UserResourceLimit.Query().
GroupBy(userresourcelimit.FieldFkUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*UserResourceLimitQuery) IDs ¶
IDs executes the query and returns a list of UserResourceLimit IDs.
func (*UserResourceLimitQuery) IDsX ¶
func (_q *UserResourceLimitQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*UserResourceLimitQuery) Limit ¶
func (_q *UserResourceLimitQuery) Limit(limit int) *UserResourceLimitQuery
Limit the number of records to be returned by this query.
func (*UserResourceLimitQuery) Offset ¶
func (_q *UserResourceLimitQuery) Offset(offset int) *UserResourceLimitQuery
Offset to start from.
func (*UserResourceLimitQuery) Only ¶
func (_q *UserResourceLimitQuery) Only(ctx context.Context) (*UserResourceLimit, error)
Only returns a single UserResourceLimit entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserResourceLimit entity is found. Returns a *NotFoundError when no UserResourceLimit entities are found.
func (*UserResourceLimitQuery) OnlyID ¶
OnlyID is like Only, but returns the only UserResourceLimit ID in the query. Returns a *NotSingularError when more than one UserResourceLimit ID is found. Returns a *NotFoundError when no entities are found.
func (*UserResourceLimitQuery) OnlyIDX ¶
func (_q *UserResourceLimitQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserResourceLimitQuery) OnlyX ¶
func (_q *UserResourceLimitQuery) OnlyX(ctx context.Context) *UserResourceLimit
OnlyX is like Only, but panics if an error occurs.
func (*UserResourceLimitQuery) Order ¶
func (_q *UserResourceLimitQuery) Order(o ...userresourcelimit.OrderOption) *UserResourceLimitQuery
Order specifies how the records should be ordered.
func (*UserResourceLimitQuery) Select ¶
func (_q *UserResourceLimitQuery) Select(fields ...string) *UserResourceLimitSelect
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 {
FkUserID uuid.UUID `json:"fk_user_id,omitempty"`
}
client.UserResourceLimit.Query().
Select(userresourcelimit.FieldFkUserID).
Scan(ctx, &v)
func (*UserResourceLimitQuery) Unique ¶
func (_q *UserResourceLimitQuery) Unique(unique bool) *UserResourceLimitQuery
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 (*UserResourceLimitQuery) Where ¶
func (_q *UserResourceLimitQuery) Where(ps ...predicate.UserResourceLimit) *UserResourceLimitQuery
Where adds a new predicate for the UserResourceLimitQuery builder.
type UserResourceLimitSelect ¶
type UserResourceLimitSelect struct {
*UserResourceLimitQuery
// contains filtered or unexported fields
}
UserResourceLimitSelect is the builder for selecting fields of UserResourceLimit entities.
func (*UserResourceLimitSelect) Aggregate ¶
func (_s *UserResourceLimitSelect) Aggregate(fns ...AggregateFunc) *UserResourceLimitSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserResourceLimitSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*UserResourceLimitSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserResourceLimitSelect) Scan ¶
func (_s *UserResourceLimitSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserResourceLimitSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserResourceLimitUpdate ¶
type UserResourceLimitUpdate struct {
// contains filtered or unexported fields
}
UserResourceLimitUpdate is the builder for updating UserResourceLimit entities.
func (*UserResourceLimitUpdate) AddMaxCPU ¶
func (_u *UserResourceLimitUpdate) AddMaxCPU(v int32) *UserResourceLimitUpdate
AddMaxCPU adds value to the "max_cpu" field.
func (*UserResourceLimitUpdate) AddMaxMemory ¶
func (_u *UserResourceLimitUpdate) AddMaxMemory(v int32) *UserResourceLimitUpdate
AddMaxMemory adds value to the "max_memory" field.
func (*UserResourceLimitUpdate) AddMaxNetworkMapping ¶
func (_u *UserResourceLimitUpdate) AddMaxNetworkMapping(v int32) *UserResourceLimitUpdate
AddMaxNetworkMapping adds value to the "max_network_mapping" field.
func (*UserResourceLimitUpdate) Exec ¶
func (_u *UserResourceLimitUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserResourceLimitUpdate) ExecX ¶
func (_u *UserResourceLimitUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserResourceLimitUpdate) Mutation ¶
func (_u *UserResourceLimitUpdate) Mutation() *UserResourceLimitMutation
Mutation returns the UserResourceLimitMutation object of the builder.
func (*UserResourceLimitUpdate) Save ¶
func (_u *UserResourceLimitUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserResourceLimitUpdate) SaveX ¶
func (_u *UserResourceLimitUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserResourceLimitUpdate) SetFkUserID ¶
func (_u *UserResourceLimitUpdate) SetFkUserID(v uuid.UUID) *UserResourceLimitUpdate
SetFkUserID sets the "fk_user_id" field.
func (*UserResourceLimitUpdate) SetMaxCPU ¶
func (_u *UserResourceLimitUpdate) SetMaxCPU(v int32) *UserResourceLimitUpdate
SetMaxCPU sets the "max_cpu" field.
func (*UserResourceLimitUpdate) SetMaxMemory ¶
func (_u *UserResourceLimitUpdate) SetMaxMemory(v int32) *UserResourceLimitUpdate
SetMaxMemory sets the "max_memory" field.
func (*UserResourceLimitUpdate) SetMaxNetworkMapping ¶
func (_u *UserResourceLimitUpdate) SetMaxNetworkMapping(v int32) *UserResourceLimitUpdate
SetMaxNetworkMapping sets the "max_network_mapping" field.
func (*UserResourceLimitUpdate) SetNillableFkUserID ¶
func (_u *UserResourceLimitUpdate) SetNillableFkUserID(v *uuid.UUID) *UserResourceLimitUpdate
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*UserResourceLimitUpdate) SetNillableMaxCPU ¶
func (_u *UserResourceLimitUpdate) SetNillableMaxCPU(v *int32) *UserResourceLimitUpdate
SetNillableMaxCPU sets the "max_cpu" field if the given value is not nil.
func (*UserResourceLimitUpdate) SetNillableMaxMemory ¶
func (_u *UserResourceLimitUpdate) SetNillableMaxMemory(v *int32) *UserResourceLimitUpdate
SetNillableMaxMemory sets the "max_memory" field if the given value is not nil.
func (*UserResourceLimitUpdate) SetNillableMaxNetworkMapping ¶
func (_u *UserResourceLimitUpdate) SetNillableMaxNetworkMapping(v *int32) *UserResourceLimitUpdate
SetNillableMaxNetworkMapping sets the "max_network_mapping" field if the given value is not nil.
func (*UserResourceLimitUpdate) Where ¶
func (_u *UserResourceLimitUpdate) Where(ps ...predicate.UserResourceLimit) *UserResourceLimitUpdate
Where appends a list predicates to the UserResourceLimitUpdate builder.
type UserResourceLimitUpdateOne ¶
type UserResourceLimitUpdateOne struct {
// contains filtered or unexported fields
}
UserResourceLimitUpdateOne is the builder for updating a single UserResourceLimit entity.
func (*UserResourceLimitUpdateOne) AddMaxCPU ¶
func (_u *UserResourceLimitUpdateOne) AddMaxCPU(v int32) *UserResourceLimitUpdateOne
AddMaxCPU adds value to the "max_cpu" field.
func (*UserResourceLimitUpdateOne) AddMaxMemory ¶
func (_u *UserResourceLimitUpdateOne) AddMaxMemory(v int32) *UserResourceLimitUpdateOne
AddMaxMemory adds value to the "max_memory" field.
func (*UserResourceLimitUpdateOne) AddMaxNetworkMapping ¶
func (_u *UserResourceLimitUpdateOne) AddMaxNetworkMapping(v int32) *UserResourceLimitUpdateOne
AddMaxNetworkMapping adds value to the "max_network_mapping" field.
func (*UserResourceLimitUpdateOne) Exec ¶
func (_u *UserResourceLimitUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserResourceLimitUpdateOne) ExecX ¶
func (_u *UserResourceLimitUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserResourceLimitUpdateOne) Mutation ¶
func (_u *UserResourceLimitUpdateOne) Mutation() *UserResourceLimitMutation
Mutation returns the UserResourceLimitMutation object of the builder.
func (*UserResourceLimitUpdateOne) Save ¶
func (_u *UserResourceLimitUpdateOne) Save(ctx context.Context) (*UserResourceLimit, error)
Save executes the query and returns the updated UserResourceLimit entity.
func (*UserResourceLimitUpdateOne) SaveX ¶
func (_u *UserResourceLimitUpdateOne) SaveX(ctx context.Context) *UserResourceLimit
SaveX is like Save, but panics if an error occurs.
func (*UserResourceLimitUpdateOne) Select ¶
func (_u *UserResourceLimitUpdateOne) Select(field string, fields ...string) *UserResourceLimitUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserResourceLimitUpdateOne) SetFkUserID ¶
func (_u *UserResourceLimitUpdateOne) SetFkUserID(v uuid.UUID) *UserResourceLimitUpdateOne
SetFkUserID sets the "fk_user_id" field.
func (*UserResourceLimitUpdateOne) SetMaxCPU ¶
func (_u *UserResourceLimitUpdateOne) SetMaxCPU(v int32) *UserResourceLimitUpdateOne
SetMaxCPU sets the "max_cpu" field.
func (*UserResourceLimitUpdateOne) SetMaxMemory ¶
func (_u *UserResourceLimitUpdateOne) SetMaxMemory(v int32) *UserResourceLimitUpdateOne
SetMaxMemory sets the "max_memory" field.
func (*UserResourceLimitUpdateOne) SetMaxNetworkMapping ¶
func (_u *UserResourceLimitUpdateOne) SetMaxNetworkMapping(v int32) *UserResourceLimitUpdateOne
SetMaxNetworkMapping sets the "max_network_mapping" field.
func (*UserResourceLimitUpdateOne) SetNillableFkUserID ¶
func (_u *UserResourceLimitUpdateOne) SetNillableFkUserID(v *uuid.UUID) *UserResourceLimitUpdateOne
SetNillableFkUserID sets the "fk_user_id" field if the given value is not nil.
func (*UserResourceLimitUpdateOne) SetNillableMaxCPU ¶
func (_u *UserResourceLimitUpdateOne) SetNillableMaxCPU(v *int32) *UserResourceLimitUpdateOne
SetNillableMaxCPU sets the "max_cpu" field if the given value is not nil.
func (*UserResourceLimitUpdateOne) SetNillableMaxMemory ¶
func (_u *UserResourceLimitUpdateOne) SetNillableMaxMemory(v *int32) *UserResourceLimitUpdateOne
SetNillableMaxMemory sets the "max_memory" field if the given value is not nil.
func (*UserResourceLimitUpdateOne) SetNillableMaxNetworkMapping ¶
func (_u *UserResourceLimitUpdateOne) SetNillableMaxNetworkMapping(v *int32) *UserResourceLimitUpdateOne
SetNillableMaxNetworkMapping sets the "max_network_mapping" field if the given value is not nil.
func (*UserResourceLimitUpdateOne) Where ¶
func (_u *UserResourceLimitUpdateOne) Where(ps ...predicate.UserResourceLimit) *UserResourceLimitUpdateOne
Where appends a list predicates to the UserResourceLimitUpdate builder.
type UserResourceLimits ¶
type UserResourceLimits []*UserResourceLimit
UserResourceLimits is a parsable slice of UserResourceLimit.
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 (_s *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 (_s *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 (_u *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (_u *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (_u *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) Save ¶
func (_u *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 (_u *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetCountryCallCoding ¶
func (_u *UserUpdate) SetCountryCallCoding(v string) *UserUpdate
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserUpdate) SetCreateDate ¶
func (_u *UserUpdate) SetCreateDate(v time.Time) *UserUpdate
SetCreateDate sets the "create_date" field.
func (*UserUpdate) SetIcon ¶
func (_u *UserUpdate) SetIcon(v string) *UserUpdate
SetIcon sets the "icon" field.
func (*UserUpdate) SetLastLoginDate ¶
func (_u *UserUpdate) SetLastLoginDate(v time.Time) *UserUpdate
SetLastLoginDate sets the "last_login_date" field.
func (*UserUpdate) SetName ¶
func (_u *UserUpdate) SetName(v string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableCountryCallCoding ¶
func (_u *UserUpdate) SetNillableCountryCallCoding(v *string) *UserUpdate
SetNillableCountryCallCoding sets the "country_call_coding" field if the given value is not nil.
func (*UserUpdate) SetNillableCreateDate ¶
func (_u *UserUpdate) SetNillableCreateDate(v *time.Time) *UserUpdate
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserUpdate) SetNillableIcon ¶
func (_u *UserUpdate) SetNillableIcon(v *string) *UserUpdate
SetNillableIcon sets the "icon" field if the given value is not nil.
func (*UserUpdate) SetNillableLastLoginDate ¶
func (_u *UserUpdate) SetNillableLastLoginDate(v *time.Time) *UserUpdate
SetNillableLastLoginDate sets the "last_login_date" field if the given value is not nil.
func (*UserUpdate) SetNillableName ¶
func (_u *UserUpdate) SetNillableName(v *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (_u *UserUpdate) SetNillablePassword(v *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillablePwdConfig ¶
func (_u *UserUpdate) SetNillablePwdConfig(v *bool) *UserUpdate
SetNillablePwdConfig sets the "pwd_config" field if the given value is not nil.
func (*UserUpdate) SetNillableTelephoneNumber ¶
func (_u *UserUpdate) SetNillableTelephoneNumber(v *string) *UserUpdate
SetNillableTelephoneNumber sets the "telephone_number" field if the given value is not nil.
func (*UserUpdate) SetNillableUsername ¶
func (_u *UserUpdate) SetNillableUsername(v *string) *UserUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (_u *UserUpdate) SetPassword(v string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetPwdConfig ¶
func (_u *UserUpdate) SetPwdConfig(v bool) *UserUpdate
SetPwdConfig sets the "pwd_config" field.
func (*UserUpdate) SetTelephoneNumber ¶
func (_u *UserUpdate) SetTelephoneNumber(v string) *UserUpdate
SetTelephoneNumber sets the "telephone_number" field.
func (*UserUpdate) SetUsername ¶
func (_u *UserUpdate) SetUsername(v string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (_u *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 (_u *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (_u *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (_u *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) Save ¶
func (_u *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (_u *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (_u *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 (_u *UserUpdateOne) SetCountryCallCoding(v string) *UserUpdateOne
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserUpdateOne) SetCreateDate ¶
func (_u *UserUpdateOne) SetCreateDate(v time.Time) *UserUpdateOne
SetCreateDate sets the "create_date" field.
func (*UserUpdateOne) SetIcon ¶
func (_u *UserUpdateOne) SetIcon(v string) *UserUpdateOne
SetIcon sets the "icon" field.
func (*UserUpdateOne) SetLastLoginDate ¶
func (_u *UserUpdateOne) SetLastLoginDate(v time.Time) *UserUpdateOne
SetLastLoginDate sets the "last_login_date" field.
func (*UserUpdateOne) SetName ¶
func (_u *UserUpdateOne) SetName(v string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableCountryCallCoding ¶
func (_u *UserUpdateOne) SetNillableCountryCallCoding(v *string) *UserUpdateOne
SetNillableCountryCallCoding sets the "country_call_coding" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCreateDate ¶
func (_u *UserUpdateOne) SetNillableCreateDate(v *time.Time) *UserUpdateOne
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIcon ¶
func (_u *UserUpdateOne) SetNillableIcon(v *string) *UserUpdateOne
SetNillableIcon sets the "icon" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastLoginDate ¶
func (_u *UserUpdateOne) SetNillableLastLoginDate(v *time.Time) *UserUpdateOne
SetNillableLastLoginDate sets the "last_login_date" field if the given value is not nil.
func (*UserUpdateOne) SetNillableName ¶
func (_u *UserUpdateOne) SetNillableName(v *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (_u *UserUpdateOne) SetNillablePassword(v *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePwdConfig ¶
func (_u *UserUpdateOne) SetNillablePwdConfig(v *bool) *UserUpdateOne
SetNillablePwdConfig sets the "pwd_config" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTelephoneNumber ¶
func (_u *UserUpdateOne) SetNillableTelephoneNumber(v *string) *UserUpdateOne
SetNillableTelephoneNumber sets the "telephone_number" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUsername ¶
func (_u *UserUpdateOne) SetNillableUsername(v *string) *UserUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (_u *UserUpdateOne) SetPassword(v string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetPwdConfig ¶
func (_u *UserUpdateOne) SetPwdConfig(v bool) *UserUpdateOne
SetPwdConfig sets the "pwd_config" field.
func (*UserUpdateOne) SetTelephoneNumber ¶
func (_u *UserUpdateOne) SetTelephoneNumber(v string) *UserUpdateOne
SetTelephoneNumber sets the "telephone_number" field.
func (*UserUpdateOne) SetUsername ¶
func (_u *UserUpdateOne) SetUsername(v string) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶
func (_u *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
- alipayorderrollback.go
- alipayorderrollback_create.go
- alipayorderrollback_delete.go
- alipayorderrollback_query.go
- alipayorderrollback_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
- computespecprice.go
- computespecprice_create.go
- computespecprice_delete.go
- computespecprice_query.go
- computespecprice_update.go
- cycle.go
- cycle_create.go
- cycle_delete.go
- cycle_query.go
- cycle_update.go
- cycleorder.go
- cycleorder_create.go
- cycleorder_delete.go
- cycleorder_query.go
- cycleorder_update.go
- cyclerecharge.go
- cyclerecharge_create.go
- cyclerecharge_delete.go
- cyclerecharge_query.go
- cyclerecharge_update.go
- cycleredeemcode.go
- cycleredeemcode_create.go
- cycleredeemcode_delete.go
- cycleredeemcode_query.go
- cycleredeemcode_update.go
- cyclerenewal.go
- cyclerenewal_create.go
- cyclerenewal_delete.go
- cyclerenewal_query.go
- cyclerenewal_update.go
- cycletransaction.go
- cycletransaction_create.go
- cycletransaction_delete.go
- cycletransaction_query.go
- cycletransaction_update.go
- domainbinding.go
- domainbinding_create.go
- domainbinding_delete.go
- domainbinding_query.go
- domainbinding_update.go
- employee.go
- employee_create.go
- employee_delete.go
- employee_query.go
- employee_update.go
- ent.go
- gateway.go
- gateway_create.go
- gateway_delete.go
- gateway_query.go
- gateway_update.go
- gatewayport.go
- gatewayport_create.go
- gatewayport_delete.go
- gatewayport_query.go
- gatewayport_update.go
- generate.go
- mutation.go
- networkmapping.go
- networkmapping_create.go
- networkmapping_delete.go
- networkmapping_query.go
- networkmapping_update.go
- runtime.go
- s3bucket.go
- s3bucket_create.go
- s3bucket_delete.go
- s3bucket_query.go
- s3bucket_update.go
- s3user.go
- s3user_create.go
- s3user_delete.go
- s3user_query.go
- s3user_update.go
- script.go
- script_create.go
- script_delete.go
- script_query.go
- script_update.go
- scriptexecutionrecord.go
- scriptexecutionrecord_create.go
- scriptexecutionrecord_delete.go
- scriptexecutionrecord_query.go
- scriptexecutionrecord_update.go
- storage.go
- storage_create.go
- storage_delete.go
- storage_query.go
- storage_update.go
- storageprovider.go
- storageprovider_create.go
- storageprovider_delete.go
- storageprovider_query.go
- storageprovider_update.go
- task.go
- task_create.go
- task_delete.go
- task_query.go
- task_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- userresourcelimit.go
- userresourcelimit_create.go
- userresourcelimit_delete.go
- userresourcelimit_query.go
- userresourcelimit_update.go