Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Noder(ctx context.Context, id gidx.PrefixedID, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []gidx.PrefixedID, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CreateLoadBalancerInput
- type CreateLoadBalancerOriginInput
- type CreateLoadBalancerPoolInput
- type CreateLoadBalancerPortInput
- type CreateLoadBalancerProviderInput
- type Cursor
- type Hook
- type IPAddressable
- type InterceptFunc
- type Interceptor
- type LoadBalancer
- func (lb LoadBalancer) IsEntity()
- func (lb LoadBalancer) IsIPAddressable()
- func (n *LoadBalancer) IsNode()
- func (lb *LoadBalancer) NamedPorts(name string) ([]*Port, error)
- func (lb *LoadBalancer) Ports(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*LoadBalancerPortConnection, error)
- func (lb *LoadBalancer) Provider(ctx context.Context) (*Provider, error)
- func (lb *LoadBalancer) QueryPorts() *PortQuery
- func (lb *LoadBalancer) QueryProvider() *ProviderQuery
- func (lb *LoadBalancer) String() string
- func (lb *LoadBalancer) ToEdge(order *LoadBalancerOrder) *LoadBalancerEdge
- func (lb *LoadBalancer) Unwrap() *LoadBalancer
- func (lb *LoadBalancer) Update() *LoadBalancerUpdateOne
- func (lb *LoadBalancer) Value(name string) (ent.Value, error)
- type LoadBalancerClient
- func (c *LoadBalancerClient) Create() *LoadBalancerCreate
- func (c *LoadBalancerClient) CreateBulk(builders ...*LoadBalancerCreate) *LoadBalancerCreateBulk
- func (c *LoadBalancerClient) Delete() *LoadBalancerDelete
- func (c *LoadBalancerClient) DeleteOne(lb *LoadBalancer) *LoadBalancerDeleteOne
- func (c *LoadBalancerClient) DeleteOneID(id gidx.PrefixedID) *LoadBalancerDeleteOne
- func (c *LoadBalancerClient) Get(ctx context.Context, id gidx.PrefixedID) (*LoadBalancer, error)
- func (c *LoadBalancerClient) GetX(ctx context.Context, id gidx.PrefixedID) *LoadBalancer
- func (c *LoadBalancerClient) Hooks() []Hook
- func (c *LoadBalancerClient) Intercept(interceptors ...Interceptor)
- func (c *LoadBalancerClient) Interceptors() []Interceptor
- func (c *LoadBalancerClient) Query() *LoadBalancerQuery
- func (c *LoadBalancerClient) QueryPorts(lb *LoadBalancer) *PortQuery
- func (c *LoadBalancerClient) QueryProvider(lb *LoadBalancer) *ProviderQuery
- func (c *LoadBalancerClient) Update() *LoadBalancerUpdate
- func (c *LoadBalancerClient) UpdateOne(lb *LoadBalancer) *LoadBalancerUpdateOne
- func (c *LoadBalancerClient) UpdateOneID(id gidx.PrefixedID) *LoadBalancerUpdateOne
- func (c *LoadBalancerClient) Use(hooks ...Hook)
- type LoadBalancerConnection
- type LoadBalancerCreate
- func (lbc *LoadBalancerCreate) AddPortIDs(ids ...gidx.PrefixedID) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) AddPorts(p ...*Port) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) Exec(ctx context.Context) error
- func (lbc *LoadBalancerCreate) ExecX(ctx context.Context)
- func (lbc *LoadBalancerCreate) Mutation() *LoadBalancerMutation
- func (lbc *LoadBalancerCreate) Save(ctx context.Context) (*LoadBalancer, error)
- func (lbc *LoadBalancerCreate) SaveX(ctx context.Context) *LoadBalancer
- func (lbc *LoadBalancerCreate) SetCreatedAt(t time.Time) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetID(gi gidx.PrefixedID) *LoadBalancerCreate
- func (c *LoadBalancerCreate) SetInput(i CreateLoadBalancerInput) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetLocationID(gi gidx.PrefixedID) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetName(s string) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetNillableCreatedAt(t *time.Time) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetNillableID(gi *gidx.PrefixedID) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetNillableUpdatedAt(t *time.Time) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetOwnerID(gi gidx.PrefixedID) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetProvider(p *Provider) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetProviderID(gi gidx.PrefixedID) *LoadBalancerCreate
- func (lbc *LoadBalancerCreate) SetUpdatedAt(t time.Time) *LoadBalancerCreate
- type LoadBalancerCreateBulk
- type LoadBalancerDelete
- type LoadBalancerDeleteOne
- type LoadBalancerEdge
- type LoadBalancerEdges
- type LoadBalancerGroupBy
- func (lbgb *LoadBalancerGroupBy) Aggregate(fns ...AggregateFunc) *LoadBalancerGroupBy
- func (s *LoadBalancerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LoadBalancerGroupBy) BoolX(ctx context.Context) bool
- func (s *LoadBalancerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LoadBalancerGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LoadBalancerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LoadBalancerGroupBy) Float64X(ctx context.Context) float64
- func (s *LoadBalancerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LoadBalancerGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LoadBalancerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LoadBalancerGroupBy) IntX(ctx context.Context) int
- func (s *LoadBalancerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LoadBalancerGroupBy) IntsX(ctx context.Context) []int
- func (lbgb *LoadBalancerGroupBy) Scan(ctx context.Context, v any) error
- func (s *LoadBalancerGroupBy) ScanX(ctx context.Context, v any)
- func (s *LoadBalancerGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LoadBalancerGroupBy) StringX(ctx context.Context) string
- func (s *LoadBalancerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LoadBalancerGroupBy) StringsX(ctx context.Context) []string
- type LoadBalancerMutation
- func (m *LoadBalancerMutation) AddField(name string, value ent.Value) error
- func (m *LoadBalancerMutation) AddPortIDs(ids ...gidx.PrefixedID)
- func (m *LoadBalancerMutation) AddedEdges() []string
- func (m *LoadBalancerMutation) AddedField(name string) (ent.Value, bool)
- func (m *LoadBalancerMutation) AddedFields() []string
- func (m *LoadBalancerMutation) AddedIDs(name string) []ent.Value
- func (m *LoadBalancerMutation) ClearEdge(name string) error
- func (m *LoadBalancerMutation) ClearField(name string) error
- func (m *LoadBalancerMutation) ClearPorts()
- func (m *LoadBalancerMutation) ClearProvider()
- func (m *LoadBalancerMutation) ClearedEdges() []string
- func (m *LoadBalancerMutation) ClearedFields() []string
- func (m LoadBalancerMutation) Client() *Client
- func (m *LoadBalancerMutation) CreatedAt() (r time.Time, exists bool)
- func (m *LoadBalancerMutation) EdgeCleared(name string) bool
- func (m *LoadBalancerMutation) Field(name string) (ent.Value, bool)
- func (m *LoadBalancerMutation) FieldCleared(name string) bool
- func (m *LoadBalancerMutation) Fields() []string
- func (m *LoadBalancerMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *LoadBalancerMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *LoadBalancerMutation) LocationID() (r gidx.PrefixedID, exists bool)
- func (m *LoadBalancerMutation) Name() (r string, exists bool)
- func (m *LoadBalancerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LoadBalancerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LoadBalancerMutation) OldLocationID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *LoadBalancerMutation) OldName(ctx context.Context) (v string, err error)
- func (m *LoadBalancerMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *LoadBalancerMutation) OldProviderID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *LoadBalancerMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LoadBalancerMutation) Op() Op
- func (m *LoadBalancerMutation) OwnerID() (r gidx.PrefixedID, exists bool)
- func (m *LoadBalancerMutation) PortsCleared() bool
- func (m *LoadBalancerMutation) PortsIDs() (ids []gidx.PrefixedID)
- func (m *LoadBalancerMutation) ProviderCleared() bool
- func (m *LoadBalancerMutation) ProviderID() (r gidx.PrefixedID, exists bool)
- func (m *LoadBalancerMutation) ProviderIDs() (ids []gidx.PrefixedID)
- func (m *LoadBalancerMutation) RemovePortIDs(ids ...gidx.PrefixedID)
- func (m *LoadBalancerMutation) RemovedEdges() []string
- func (m *LoadBalancerMutation) RemovedIDs(name string) []ent.Value
- func (m *LoadBalancerMutation) RemovedPortsIDs() (ids []gidx.PrefixedID)
- func (m *LoadBalancerMutation) ResetCreatedAt()
- func (m *LoadBalancerMutation) ResetEdge(name string) error
- func (m *LoadBalancerMutation) ResetField(name string) error
- func (m *LoadBalancerMutation) ResetLocationID()
- func (m *LoadBalancerMutation) ResetName()
- func (m *LoadBalancerMutation) ResetOwnerID()
- func (m *LoadBalancerMutation) ResetPorts()
- func (m *LoadBalancerMutation) ResetProvider()
- func (m *LoadBalancerMutation) ResetProviderID()
- func (m *LoadBalancerMutation) ResetUpdatedAt()
- func (m *LoadBalancerMutation) SetCreatedAt(t time.Time)
- func (m *LoadBalancerMutation) SetField(name string, value ent.Value) error
- func (m *LoadBalancerMutation) SetID(id gidx.PrefixedID)
- func (m *LoadBalancerMutation) SetLocationID(gi gidx.PrefixedID)
- func (m *LoadBalancerMutation) SetName(s string)
- func (m *LoadBalancerMutation) SetOp(op Op)
- func (m *LoadBalancerMutation) SetOwnerID(gi gidx.PrefixedID)
- func (m *LoadBalancerMutation) SetProviderID(gi gidx.PrefixedID)
- func (m *LoadBalancerMutation) SetUpdatedAt(t time.Time)
- func (m LoadBalancerMutation) Tx() (*Tx, error)
- func (m *LoadBalancerMutation) Type() string
- func (m *LoadBalancerMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *LoadBalancerMutation) Where(ps ...predicate.LoadBalancer)
- func (m *LoadBalancerMutation) WhereP(ps ...func(*sql.Selector))
- type LoadBalancerOrder
- type LoadBalancerOrderField
- type LoadBalancerOrigin
- type LoadBalancerOriginConnection
- type LoadBalancerOriginEdge
- type LoadBalancerOriginOrder
- type LoadBalancerOriginOrderField
- type LoadBalancerOriginPaginateOption
- type LoadBalancerOriginWhereInput
- type LoadBalancerPaginateOption
- type LoadBalancerPool
- type LoadBalancerPoolConnection
- type LoadBalancerPoolEdge
- type LoadBalancerPoolOrder
- type LoadBalancerPoolOrderField
- type LoadBalancerPoolPaginateOption
- type LoadBalancerPoolWhereInput
- type LoadBalancerPort
- type LoadBalancerPortConnection
- type LoadBalancerPortEdge
- type LoadBalancerPortOrder
- type LoadBalancerPortOrderField
- type LoadBalancerPortPaginateOption
- type LoadBalancerPortWhereInput
- type LoadBalancerProvider
- type LoadBalancerProviderConnection
- type LoadBalancerProviderEdge
- type LoadBalancerProviderOrder
- type LoadBalancerProviderOrderField
- type LoadBalancerProviderPaginateOption
- type LoadBalancerProviderWhereInput
- type LoadBalancerQuery
- func (lbq *LoadBalancerQuery) Aggregate(fns ...AggregateFunc) *LoadBalancerSelect
- func (lbq *LoadBalancerQuery) All(ctx context.Context) ([]*LoadBalancer, error)
- func (lbq *LoadBalancerQuery) AllX(ctx context.Context) []*LoadBalancer
- func (lbq *LoadBalancerQuery) Clone() *LoadBalancerQuery
- func (lb *LoadBalancerQuery) CollectFields(ctx context.Context, satisfies ...string) (*LoadBalancerQuery, error)
- func (lbq *LoadBalancerQuery) Count(ctx context.Context) (int, error)
- func (lbq *LoadBalancerQuery) CountX(ctx context.Context) int
- func (lbq *LoadBalancerQuery) Exist(ctx context.Context) (bool, error)
- func (lbq *LoadBalancerQuery) ExistX(ctx context.Context) bool
- func (lbq *LoadBalancerQuery) First(ctx context.Context) (*LoadBalancer, error)
- func (lbq *LoadBalancerQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (lbq *LoadBalancerQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (lbq *LoadBalancerQuery) FirstX(ctx context.Context) *LoadBalancer
- func (lbq *LoadBalancerQuery) GroupBy(field string, fields ...string) *LoadBalancerGroupBy
- func (lbq *LoadBalancerQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (lbq *LoadBalancerQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (lbq *LoadBalancerQuery) Limit(limit int) *LoadBalancerQuery
- func (lbq *LoadBalancerQuery) Offset(offset int) *LoadBalancerQuery
- func (lbq *LoadBalancerQuery) Only(ctx context.Context) (*LoadBalancer, error)
- func (lbq *LoadBalancerQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (lbq *LoadBalancerQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (lbq *LoadBalancerQuery) OnlyX(ctx context.Context) *LoadBalancer
- func (lbq *LoadBalancerQuery) Order(o ...loadbalancer.OrderOption) *LoadBalancerQuery
- func (lb *LoadBalancerQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*LoadBalancerConnection, error)
- func (lbq *LoadBalancerQuery) QueryPorts() *PortQuery
- func (lbq *LoadBalancerQuery) QueryProvider() *ProviderQuery
- func (lbq *LoadBalancerQuery) Select(fields ...string) *LoadBalancerSelect
- func (lbq *LoadBalancerQuery) Unique(unique bool) *LoadBalancerQuery
- func (lbq *LoadBalancerQuery) Where(ps ...predicate.LoadBalancer) *LoadBalancerQuery
- func (lbq *LoadBalancerQuery) WithNamedPorts(name string, opts ...func(*PortQuery)) *LoadBalancerQuery
- func (lbq *LoadBalancerQuery) WithPorts(opts ...func(*PortQuery)) *LoadBalancerQuery
- func (lbq *LoadBalancerQuery) WithProvider(opts ...func(*ProviderQuery)) *LoadBalancerQuery
- type LoadBalancerSelect
- func (lbs *LoadBalancerSelect) Aggregate(fns ...AggregateFunc) *LoadBalancerSelect
- func (s *LoadBalancerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LoadBalancerSelect) BoolX(ctx context.Context) bool
- func (s *LoadBalancerSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LoadBalancerSelect) BoolsX(ctx context.Context) []bool
- func (s *LoadBalancerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LoadBalancerSelect) Float64X(ctx context.Context) float64
- func (s *LoadBalancerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LoadBalancerSelect) Float64sX(ctx context.Context) []float64
- func (s *LoadBalancerSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LoadBalancerSelect) IntX(ctx context.Context) int
- func (s *LoadBalancerSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LoadBalancerSelect) IntsX(ctx context.Context) []int
- func (lbs *LoadBalancerSelect) Scan(ctx context.Context, v any) error
- func (s *LoadBalancerSelect) ScanX(ctx context.Context, v any)
- func (s *LoadBalancerSelect) String(ctx context.Context) (_ string, err error)
- func (s *LoadBalancerSelect) StringX(ctx context.Context) string
- func (s *LoadBalancerSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LoadBalancerSelect) StringsX(ctx context.Context) []string
- type LoadBalancerUpdate
- func (lbu *LoadBalancerUpdate) AddPortIDs(ids ...gidx.PrefixedID) *LoadBalancerUpdate
- func (lbu *LoadBalancerUpdate) AddPorts(p ...*Port) *LoadBalancerUpdate
- func (lbu *LoadBalancerUpdate) ClearPorts() *LoadBalancerUpdate
- func (lbu *LoadBalancerUpdate) Exec(ctx context.Context) error
- func (lbu *LoadBalancerUpdate) ExecX(ctx context.Context)
- func (lbu *LoadBalancerUpdate) Mutation() *LoadBalancerMutation
- func (lbu *LoadBalancerUpdate) RemovePortIDs(ids ...gidx.PrefixedID) *LoadBalancerUpdate
- func (lbu *LoadBalancerUpdate) RemovePorts(p ...*Port) *LoadBalancerUpdate
- func (lbu *LoadBalancerUpdate) Save(ctx context.Context) (int, error)
- func (lbu *LoadBalancerUpdate) SaveX(ctx context.Context) int
- func (c *LoadBalancerUpdate) SetInput(i UpdateLoadBalancerInput) *LoadBalancerUpdate
- func (lbu *LoadBalancerUpdate) SetName(s string) *LoadBalancerUpdate
- func (lbu *LoadBalancerUpdate) Where(ps ...predicate.LoadBalancer) *LoadBalancerUpdate
- type LoadBalancerUpdateOne
- func (lbuo *LoadBalancerUpdateOne) AddPortIDs(ids ...gidx.PrefixedID) *LoadBalancerUpdateOne
- func (lbuo *LoadBalancerUpdateOne) AddPorts(p ...*Port) *LoadBalancerUpdateOne
- func (lbuo *LoadBalancerUpdateOne) ClearPorts() *LoadBalancerUpdateOne
- func (lbuo *LoadBalancerUpdateOne) Exec(ctx context.Context) error
- func (lbuo *LoadBalancerUpdateOne) ExecX(ctx context.Context)
- func (lbuo *LoadBalancerUpdateOne) Mutation() *LoadBalancerMutation
- func (lbuo *LoadBalancerUpdateOne) RemovePortIDs(ids ...gidx.PrefixedID) *LoadBalancerUpdateOne
- func (lbuo *LoadBalancerUpdateOne) RemovePorts(p ...*Port) *LoadBalancerUpdateOne
- func (lbuo *LoadBalancerUpdateOne) Save(ctx context.Context) (*LoadBalancer, error)
- func (lbuo *LoadBalancerUpdateOne) SaveX(ctx context.Context) *LoadBalancer
- func (lbuo *LoadBalancerUpdateOne) Select(field string, fields ...string) *LoadBalancerUpdateOne
- func (c *LoadBalancerUpdateOne) SetInput(i UpdateLoadBalancerInput) *LoadBalancerUpdateOne
- func (lbuo *LoadBalancerUpdateOne) SetName(s string) *LoadBalancerUpdateOne
- func (lbuo *LoadBalancerUpdateOne) Where(ps ...predicate.LoadBalancer) *LoadBalancerUpdateOne
- type LoadBalancerWhereInput
- type LoadBalancers
- type MutateFunc
- type Mutation
- type Mutator
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type Origin
- func (o Origin) IsEntity()
- func (n *Origin) IsNode()
- func (o *Origin) Pool(ctx context.Context) (*Pool, error)
- func (o *Origin) QueryPool() *PoolQuery
- func (o *Origin) String() string
- func (o *Origin) Unwrap() *Origin
- func (o *Origin) Update() *OriginUpdateOne
- func (o *Origin) Value(name string) (ent.Value, error)
- type OriginClient
- func (c *OriginClient) Create() *OriginCreate
- func (c *OriginClient) CreateBulk(builders ...*OriginCreate) *OriginCreateBulk
- func (c *OriginClient) Delete() *OriginDelete
- func (c *OriginClient) DeleteOne(o *Origin) *OriginDeleteOne
- func (c *OriginClient) DeleteOneID(id gidx.PrefixedID) *OriginDeleteOne
- func (c *OriginClient) Get(ctx context.Context, id gidx.PrefixedID) (*Origin, error)
- func (c *OriginClient) GetX(ctx context.Context, id gidx.PrefixedID) *Origin
- func (c *OriginClient) Hooks() []Hook
- func (c *OriginClient) Intercept(interceptors ...Interceptor)
- func (c *OriginClient) Interceptors() []Interceptor
- func (c *OriginClient) Query() *OriginQuery
- func (c *OriginClient) QueryPool(o *Origin) *PoolQuery
- func (c *OriginClient) Update() *OriginUpdate
- func (c *OriginClient) UpdateOne(o *Origin) *OriginUpdateOne
- func (c *OriginClient) UpdateOneID(id gidx.PrefixedID) *OriginUpdateOne
- func (c *OriginClient) Use(hooks ...Hook)
- type OriginCreate
- func (oc *OriginCreate) Exec(ctx context.Context) error
- func (oc *OriginCreate) ExecX(ctx context.Context)
- func (oc *OriginCreate) Mutation() *OriginMutation
- func (oc *OriginCreate) Save(ctx context.Context) (*Origin, error)
- func (oc *OriginCreate) SaveX(ctx context.Context) *Origin
- func (oc *OriginCreate) SetActive(b bool) *OriginCreate
- func (oc *OriginCreate) SetCreatedAt(t time.Time) *OriginCreate
- func (oc *OriginCreate) SetID(gi gidx.PrefixedID) *OriginCreate
- func (c *OriginCreate) SetInput(i CreateLoadBalancerOriginInput) *OriginCreate
- func (oc *OriginCreate) SetName(s string) *OriginCreate
- func (oc *OriginCreate) SetNillableActive(b *bool) *OriginCreate
- func (oc *OriginCreate) SetNillableCreatedAt(t *time.Time) *OriginCreate
- func (oc *OriginCreate) SetNillableID(gi *gidx.PrefixedID) *OriginCreate
- func (oc *OriginCreate) SetNillableUpdatedAt(t *time.Time) *OriginCreate
- func (oc *OriginCreate) SetPool(p *Pool) *OriginCreate
- func (oc *OriginCreate) SetPoolID(gi gidx.PrefixedID) *OriginCreate
- func (oc *OriginCreate) SetPortNumber(i int) *OriginCreate
- func (oc *OriginCreate) SetTarget(s string) *OriginCreate
- func (oc *OriginCreate) SetUpdatedAt(t time.Time) *OriginCreate
- type OriginCreateBulk
- type OriginDelete
- type OriginDeleteOne
- type OriginEdges
- type OriginGroupBy
- func (ogb *OriginGroupBy) Aggregate(fns ...AggregateFunc) *OriginGroupBy
- func (s *OriginGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OriginGroupBy) BoolX(ctx context.Context) bool
- func (s *OriginGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OriginGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OriginGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OriginGroupBy) Float64X(ctx context.Context) float64
- func (s *OriginGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OriginGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OriginGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OriginGroupBy) IntX(ctx context.Context) int
- func (s *OriginGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OriginGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OriginGroupBy) Scan(ctx context.Context, v any) error
- func (s *OriginGroupBy) ScanX(ctx context.Context, v any)
- func (s *OriginGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OriginGroupBy) StringX(ctx context.Context) string
- func (s *OriginGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OriginGroupBy) StringsX(ctx context.Context) []string
- type OriginMutation
- func (m *OriginMutation) Active() (r bool, exists bool)
- func (m *OriginMutation) AddField(name string, value ent.Value) error
- func (m *OriginMutation) AddPortNumber(i int)
- func (m *OriginMutation) AddedEdges() []string
- func (m *OriginMutation) AddedField(name string) (ent.Value, bool)
- func (m *OriginMutation) AddedFields() []string
- func (m *OriginMutation) AddedIDs(name string) []ent.Value
- func (m *OriginMutation) AddedPortNumber() (r int, exists bool)
- func (m *OriginMutation) ClearEdge(name string) error
- func (m *OriginMutation) ClearField(name string) error
- func (m *OriginMutation) ClearPool()
- func (m *OriginMutation) ClearedEdges() []string
- func (m *OriginMutation) ClearedFields() []string
- func (m OriginMutation) Client() *Client
- func (m *OriginMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OriginMutation) EdgeCleared(name string) bool
- func (m *OriginMutation) Field(name string) (ent.Value, bool)
- func (m *OriginMutation) FieldCleared(name string) bool
- func (m *OriginMutation) Fields() []string
- func (m *OriginMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *OriginMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *OriginMutation) Name() (r string, exists bool)
- func (m *OriginMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *OriginMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OriginMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OriginMutation) OldName(ctx context.Context) (v string, err error)
- func (m *OriginMutation) OldPoolID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *OriginMutation) OldPortNumber(ctx context.Context) (v int, err error)
- func (m *OriginMutation) OldTarget(ctx context.Context) (v string, err error)
- func (m *OriginMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OriginMutation) Op() Op
- func (m *OriginMutation) PoolCleared() bool
- func (m *OriginMutation) PoolID() (r gidx.PrefixedID, exists bool)
- func (m *OriginMutation) PoolIDs() (ids []gidx.PrefixedID)
- func (m *OriginMutation) PortNumber() (r int, exists bool)
- func (m *OriginMutation) RemovedEdges() []string
- func (m *OriginMutation) RemovedIDs(name string) []ent.Value
- func (m *OriginMutation) ResetActive()
- func (m *OriginMutation) ResetCreatedAt()
- func (m *OriginMutation) ResetEdge(name string) error
- func (m *OriginMutation) ResetField(name string) error
- func (m *OriginMutation) ResetName()
- func (m *OriginMutation) ResetPool()
- func (m *OriginMutation) ResetPoolID()
- func (m *OriginMutation) ResetPortNumber()
- func (m *OriginMutation) ResetTarget()
- func (m *OriginMutation) ResetUpdatedAt()
- func (m *OriginMutation) SetActive(b bool)
- func (m *OriginMutation) SetCreatedAt(t time.Time)
- func (m *OriginMutation) SetField(name string, value ent.Value) error
- func (m *OriginMutation) SetID(id gidx.PrefixedID)
- func (m *OriginMutation) SetName(s string)
- func (m *OriginMutation) SetOp(op Op)
- func (m *OriginMutation) SetPoolID(gi gidx.PrefixedID)
- func (m *OriginMutation) SetPortNumber(i int)
- func (m *OriginMutation) SetTarget(s string)
- func (m *OriginMutation) SetUpdatedAt(t time.Time)
- func (m *OriginMutation) Target() (r string, exists bool)
- func (m OriginMutation) Tx() (*Tx, error)
- func (m *OriginMutation) Type() string
- func (m *OriginMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OriginMutation) Where(ps ...predicate.Origin)
- func (m *OriginMutation) WhereP(ps ...func(*sql.Selector))
- type OriginQuery
- func (oq *OriginQuery) Aggregate(fns ...AggregateFunc) *OriginSelect
- func (oq *OriginQuery) All(ctx context.Context) ([]*Origin, error)
- func (oq *OriginQuery) AllX(ctx context.Context) []*Origin
- func (oq *OriginQuery) Clone() *OriginQuery
- func (o *OriginQuery) CollectFields(ctx context.Context, satisfies ...string) (*OriginQuery, error)
- func (oq *OriginQuery) Count(ctx context.Context) (int, error)
- func (oq *OriginQuery) CountX(ctx context.Context) int
- func (oq *OriginQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OriginQuery) ExistX(ctx context.Context) bool
- func (oq *OriginQuery) First(ctx context.Context) (*Origin, error)
- func (oq *OriginQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (oq *OriginQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (oq *OriginQuery) FirstX(ctx context.Context) *Origin
- func (oq *OriginQuery) GroupBy(field string, fields ...string) *OriginGroupBy
- func (oq *OriginQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (oq *OriginQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (oq *OriginQuery) Limit(limit int) *OriginQuery
- func (oq *OriginQuery) Offset(offset int) *OriginQuery
- func (oq *OriginQuery) Only(ctx context.Context) (*Origin, error)
- func (oq *OriginQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (oq *OriginQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (oq *OriginQuery) OnlyX(ctx context.Context) *Origin
- func (oq *OriginQuery) Order(o ...origin.OrderOption) *OriginQuery
- func (o *OriginQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*LoadBalancerOriginConnection, error)
- func (oq *OriginQuery) QueryPool() *PoolQuery
- func (oq *OriginQuery) Select(fields ...string) *OriginSelect
- func (oq *OriginQuery) Unique(unique bool) *OriginQuery
- func (oq *OriginQuery) Where(ps ...predicate.Origin) *OriginQuery
- func (oq *OriginQuery) WithPool(opts ...func(*PoolQuery)) *OriginQuery
- type OriginSelect
- func (os *OriginSelect) Aggregate(fns ...AggregateFunc) *OriginSelect
- func (s *OriginSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OriginSelect) BoolX(ctx context.Context) bool
- func (s *OriginSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OriginSelect) BoolsX(ctx context.Context) []bool
- func (s *OriginSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OriginSelect) Float64X(ctx context.Context) float64
- func (s *OriginSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OriginSelect) Float64sX(ctx context.Context) []float64
- func (s *OriginSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OriginSelect) IntX(ctx context.Context) int
- func (s *OriginSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OriginSelect) IntsX(ctx context.Context) []int
- func (os *OriginSelect) Scan(ctx context.Context, v any) error
- func (s *OriginSelect) ScanX(ctx context.Context, v any)
- func (s *OriginSelect) String(ctx context.Context) (_ string, err error)
- func (s *OriginSelect) StringX(ctx context.Context) string
- func (s *OriginSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OriginSelect) StringsX(ctx context.Context) []string
- type OriginUpdate
- func (ou *OriginUpdate) AddPortNumber(i int) *OriginUpdate
- func (ou *OriginUpdate) Exec(ctx context.Context) error
- func (ou *OriginUpdate) ExecX(ctx context.Context)
- func (ou *OriginUpdate) Mutation() *OriginMutation
- func (ou *OriginUpdate) Save(ctx context.Context) (int, error)
- func (ou *OriginUpdate) SaveX(ctx context.Context) int
- func (ou *OriginUpdate) SetActive(b bool) *OriginUpdate
- func (c *OriginUpdate) SetInput(i UpdateLoadBalancerOriginInput) *OriginUpdate
- func (ou *OriginUpdate) SetName(s string) *OriginUpdate
- func (ou *OriginUpdate) SetNillableActive(b *bool) *OriginUpdate
- func (ou *OriginUpdate) SetPortNumber(i int) *OriginUpdate
- func (ou *OriginUpdate) SetTarget(s string) *OriginUpdate
- func (ou *OriginUpdate) Where(ps ...predicate.Origin) *OriginUpdate
- type OriginUpdateOne
- func (ouo *OriginUpdateOne) AddPortNumber(i int) *OriginUpdateOne
- func (ouo *OriginUpdateOne) Exec(ctx context.Context) error
- func (ouo *OriginUpdateOne) ExecX(ctx context.Context)
- func (ouo *OriginUpdateOne) Mutation() *OriginMutation
- func (ouo *OriginUpdateOne) Save(ctx context.Context) (*Origin, error)
- func (ouo *OriginUpdateOne) SaveX(ctx context.Context) *Origin
- func (ouo *OriginUpdateOne) Select(field string, fields ...string) *OriginUpdateOne
- func (ouo *OriginUpdateOne) SetActive(b bool) *OriginUpdateOne
- func (c *OriginUpdateOne) SetInput(i UpdateLoadBalancerOriginInput) *OriginUpdateOne
- func (ouo *OriginUpdateOne) SetName(s string) *OriginUpdateOne
- func (ouo *OriginUpdateOne) SetNillableActive(b *bool) *OriginUpdateOne
- func (ouo *OriginUpdateOne) SetPortNumber(i int) *OriginUpdateOne
- func (ouo *OriginUpdateOne) SetTarget(s string) *OriginUpdateOne
- func (ouo *OriginUpdateOne) Where(ps ...predicate.Origin) *OriginUpdateOne
- type Origins
- type PageInfo
- type Policy
- type Pool
- func (po Pool) IsEntity()
- func (n *Pool) IsNode()
- func (po *Pool) NamedOrigins(name string) ([]*Origin, error)
- func (po *Pool) NamedPorts(name string) ([]*Port, error)
- func (po *Pool) Origins(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*LoadBalancerOriginConnection, error)
- func (po *Pool) Ports(ctx context.Context) (result []*Port, err error)
- func (po *Pool) QueryOrigins() *OriginQuery
- func (po *Pool) QueryPorts() *PortQuery
- func (po *Pool) String() string
- func (po *Pool) Unwrap() *Pool
- func (po *Pool) Update() *PoolUpdateOne
- func (po *Pool) Value(name string) (ent.Value, error)
- type PoolClient
- func (c *PoolClient) Create() *PoolCreate
- func (c *PoolClient) CreateBulk(builders ...*PoolCreate) *PoolCreateBulk
- func (c *PoolClient) Delete() *PoolDelete
- func (c *PoolClient) DeleteOne(po *Pool) *PoolDeleteOne
- func (c *PoolClient) DeleteOneID(id gidx.PrefixedID) *PoolDeleteOne
- func (c *PoolClient) Get(ctx context.Context, id gidx.PrefixedID) (*Pool, error)
- func (c *PoolClient) GetX(ctx context.Context, id gidx.PrefixedID) *Pool
- func (c *PoolClient) Hooks() []Hook
- func (c *PoolClient) Intercept(interceptors ...Interceptor)
- func (c *PoolClient) Interceptors() []Interceptor
- func (c *PoolClient) Query() *PoolQuery
- func (c *PoolClient) QueryOrigins(po *Pool) *OriginQuery
- func (c *PoolClient) QueryPorts(po *Pool) *PortQuery
- func (c *PoolClient) Update() *PoolUpdate
- func (c *PoolClient) UpdateOne(po *Pool) *PoolUpdateOne
- func (c *PoolClient) UpdateOneID(id gidx.PrefixedID) *PoolUpdateOne
- func (c *PoolClient) Use(hooks ...Hook)
- type PoolCreate
- func (pc *PoolCreate) AddOriginIDs(ids ...gidx.PrefixedID) *PoolCreate
- func (pc *PoolCreate) AddOrigins(o ...*Origin) *PoolCreate
- func (pc *PoolCreate) AddPortIDs(ids ...gidx.PrefixedID) *PoolCreate
- func (pc *PoolCreate) AddPorts(p ...*Port) *PoolCreate
- func (pc *PoolCreate) Exec(ctx context.Context) error
- func (pc *PoolCreate) ExecX(ctx context.Context)
- func (pc *PoolCreate) Mutation() *PoolMutation
- func (pc *PoolCreate) Save(ctx context.Context) (*Pool, error)
- func (pc *PoolCreate) SaveX(ctx context.Context) *Pool
- func (pc *PoolCreate) SetCreatedAt(t time.Time) *PoolCreate
- func (pc *PoolCreate) SetID(gi gidx.PrefixedID) *PoolCreate
- func (c *PoolCreate) SetInput(i CreateLoadBalancerPoolInput) *PoolCreate
- func (pc *PoolCreate) SetName(s string) *PoolCreate
- func (pc *PoolCreate) SetNillableCreatedAt(t *time.Time) *PoolCreate
- func (pc *PoolCreate) SetNillableID(gi *gidx.PrefixedID) *PoolCreate
- func (pc *PoolCreate) SetNillableUpdatedAt(t *time.Time) *PoolCreate
- func (pc *PoolCreate) SetOwnerID(gi gidx.PrefixedID) *PoolCreate
- func (pc *PoolCreate) SetProtocol(po pool.Protocol) *PoolCreate
- func (pc *PoolCreate) SetUpdatedAt(t time.Time) *PoolCreate
- type PoolCreateBulk
- type PoolDelete
- type PoolDeleteOne
- type PoolEdges
- type PoolGroupBy
- func (pgb *PoolGroupBy) Aggregate(fns ...AggregateFunc) *PoolGroupBy
- func (s *PoolGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PoolGroupBy) BoolX(ctx context.Context) bool
- func (s *PoolGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PoolGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PoolGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PoolGroupBy) Float64X(ctx context.Context) float64
- func (s *PoolGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PoolGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PoolGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PoolGroupBy) IntX(ctx context.Context) int
- func (s *PoolGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PoolGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PoolGroupBy) Scan(ctx context.Context, v any) error
- func (s *PoolGroupBy) ScanX(ctx context.Context, v any)
- func (s *PoolGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PoolGroupBy) StringX(ctx context.Context) string
- func (s *PoolGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PoolGroupBy) StringsX(ctx context.Context) []string
- type PoolMutation
- func (m *PoolMutation) AddField(name string, value ent.Value) error
- func (m *PoolMutation) AddOriginIDs(ids ...gidx.PrefixedID)
- func (m *PoolMutation) AddPortIDs(ids ...gidx.PrefixedID)
- func (m *PoolMutation) AddedEdges() []string
- func (m *PoolMutation) AddedField(name string) (ent.Value, bool)
- func (m *PoolMutation) AddedFields() []string
- func (m *PoolMutation) AddedIDs(name string) []ent.Value
- func (m *PoolMutation) ClearEdge(name string) error
- func (m *PoolMutation) ClearField(name string) error
- func (m *PoolMutation) ClearOrigins()
- func (m *PoolMutation) ClearPorts()
- func (m *PoolMutation) ClearedEdges() []string
- func (m *PoolMutation) ClearedFields() []string
- func (m PoolMutation) Client() *Client
- func (m *PoolMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PoolMutation) EdgeCleared(name string) bool
- func (m *PoolMutation) Field(name string) (ent.Value, bool)
- func (m *PoolMutation) FieldCleared(name string) bool
- func (m *PoolMutation) Fields() []string
- func (m *PoolMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *PoolMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *PoolMutation) Name() (r string, exists bool)
- func (m *PoolMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PoolMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PoolMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PoolMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *PoolMutation) OldProtocol(ctx context.Context) (v pool.Protocol, err error)
- func (m *PoolMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PoolMutation) Op() Op
- func (m *PoolMutation) OriginsCleared() bool
- func (m *PoolMutation) OriginsIDs() (ids []gidx.PrefixedID)
- func (m *PoolMutation) OwnerID() (r gidx.PrefixedID, exists bool)
- func (m *PoolMutation) PortsCleared() bool
- func (m *PoolMutation) PortsIDs() (ids []gidx.PrefixedID)
- func (m *PoolMutation) Protocol() (r pool.Protocol, exists bool)
- func (m *PoolMutation) RemoveOriginIDs(ids ...gidx.PrefixedID)
- func (m *PoolMutation) RemovePortIDs(ids ...gidx.PrefixedID)
- func (m *PoolMutation) RemovedEdges() []string
- func (m *PoolMutation) RemovedIDs(name string) []ent.Value
- func (m *PoolMutation) RemovedOriginsIDs() (ids []gidx.PrefixedID)
- func (m *PoolMutation) RemovedPortsIDs() (ids []gidx.PrefixedID)
- func (m *PoolMutation) ResetCreatedAt()
- func (m *PoolMutation) ResetEdge(name string) error
- func (m *PoolMutation) ResetField(name string) error
- func (m *PoolMutation) ResetName()
- func (m *PoolMutation) ResetOrigins()
- func (m *PoolMutation) ResetOwnerID()
- func (m *PoolMutation) ResetPorts()
- func (m *PoolMutation) ResetProtocol()
- func (m *PoolMutation) ResetUpdatedAt()
- func (m *PoolMutation) SetCreatedAt(t time.Time)
- func (m *PoolMutation) SetField(name string, value ent.Value) error
- func (m *PoolMutation) SetID(id gidx.PrefixedID)
- func (m *PoolMutation) SetName(s string)
- func (m *PoolMutation) SetOp(op Op)
- func (m *PoolMutation) SetOwnerID(gi gidx.PrefixedID)
- func (m *PoolMutation) SetProtocol(po pool.Protocol)
- func (m *PoolMutation) SetUpdatedAt(t time.Time)
- func (m PoolMutation) Tx() (*Tx, error)
- func (m *PoolMutation) Type() string
- func (m *PoolMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PoolMutation) Where(ps ...predicate.Pool)
- func (m *PoolMutation) WhereP(ps ...func(*sql.Selector))
- type PoolQuery
- func (pq *PoolQuery) Aggregate(fns ...AggregateFunc) *PoolSelect
- func (pq *PoolQuery) All(ctx context.Context) ([]*Pool, error)
- func (pq *PoolQuery) AllX(ctx context.Context) []*Pool
- func (pq *PoolQuery) Clone() *PoolQuery
- func (po *PoolQuery) CollectFields(ctx context.Context, satisfies ...string) (*PoolQuery, error)
- func (pq *PoolQuery) Count(ctx context.Context) (int, error)
- func (pq *PoolQuery) CountX(ctx context.Context) int
- func (pq *PoolQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PoolQuery) ExistX(ctx context.Context) bool
- func (pq *PoolQuery) First(ctx context.Context) (*Pool, error)
- func (pq *PoolQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (pq *PoolQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (pq *PoolQuery) FirstX(ctx context.Context) *Pool
- func (pq *PoolQuery) GroupBy(field string, fields ...string) *PoolGroupBy
- func (pq *PoolQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (pq *PoolQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (pq *PoolQuery) Limit(limit int) *PoolQuery
- func (pq *PoolQuery) Offset(offset int) *PoolQuery
- func (pq *PoolQuery) Only(ctx context.Context) (*Pool, error)
- func (pq *PoolQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (pq *PoolQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (pq *PoolQuery) OnlyX(ctx context.Context) *Pool
- func (pq *PoolQuery) Order(o ...pool.OrderOption) *PoolQuery
- func (po *PoolQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*LoadBalancerPoolConnection, error)
- func (pq *PoolQuery) QueryOrigins() *OriginQuery
- func (pq *PoolQuery) QueryPorts() *PortQuery
- func (pq *PoolQuery) Select(fields ...string) *PoolSelect
- func (pq *PoolQuery) Unique(unique bool) *PoolQuery
- func (pq *PoolQuery) Where(ps ...predicate.Pool) *PoolQuery
- func (pq *PoolQuery) WithNamedOrigins(name string, opts ...func(*OriginQuery)) *PoolQuery
- func (pq *PoolQuery) WithNamedPorts(name string, opts ...func(*PortQuery)) *PoolQuery
- func (pq *PoolQuery) WithOrigins(opts ...func(*OriginQuery)) *PoolQuery
- func (pq *PoolQuery) WithPorts(opts ...func(*PortQuery)) *PoolQuery
- type PoolSelect
- func (ps *PoolSelect) Aggregate(fns ...AggregateFunc) *PoolSelect
- func (s *PoolSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PoolSelect) BoolX(ctx context.Context) bool
- func (s *PoolSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PoolSelect) BoolsX(ctx context.Context) []bool
- func (s *PoolSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PoolSelect) Float64X(ctx context.Context) float64
- func (s *PoolSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PoolSelect) Float64sX(ctx context.Context) []float64
- func (s *PoolSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PoolSelect) IntX(ctx context.Context) int
- func (s *PoolSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PoolSelect) IntsX(ctx context.Context) []int
- func (ps *PoolSelect) Scan(ctx context.Context, v any) error
- func (s *PoolSelect) ScanX(ctx context.Context, v any)
- func (s *PoolSelect) String(ctx context.Context) (_ string, err error)
- func (s *PoolSelect) StringX(ctx context.Context) string
- func (s *PoolSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PoolSelect) StringsX(ctx context.Context) []string
- type PoolUpdate
- func (pu *PoolUpdate) AddOriginIDs(ids ...gidx.PrefixedID) *PoolUpdate
- func (pu *PoolUpdate) AddOrigins(o ...*Origin) *PoolUpdate
- func (pu *PoolUpdate) AddPortIDs(ids ...gidx.PrefixedID) *PoolUpdate
- func (pu *PoolUpdate) AddPorts(p ...*Port) *PoolUpdate
- func (pu *PoolUpdate) ClearOrigins() *PoolUpdate
- func (pu *PoolUpdate) ClearPorts() *PoolUpdate
- func (pu *PoolUpdate) Exec(ctx context.Context) error
- func (pu *PoolUpdate) ExecX(ctx context.Context)
- func (pu *PoolUpdate) Mutation() *PoolMutation
- func (pu *PoolUpdate) RemoveOriginIDs(ids ...gidx.PrefixedID) *PoolUpdate
- func (pu *PoolUpdate) RemoveOrigins(o ...*Origin) *PoolUpdate
- func (pu *PoolUpdate) RemovePortIDs(ids ...gidx.PrefixedID) *PoolUpdate
- func (pu *PoolUpdate) RemovePorts(p ...*Port) *PoolUpdate
- func (pu *PoolUpdate) Save(ctx context.Context) (int, error)
- func (pu *PoolUpdate) SaveX(ctx context.Context) int
- func (c *PoolUpdate) SetInput(i UpdateLoadBalancerPoolInput) *PoolUpdate
- func (pu *PoolUpdate) SetName(s string) *PoolUpdate
- func (pu *PoolUpdate) SetProtocol(po pool.Protocol) *PoolUpdate
- func (pu *PoolUpdate) Where(ps ...predicate.Pool) *PoolUpdate
- type PoolUpdateOne
- func (puo *PoolUpdateOne) AddOriginIDs(ids ...gidx.PrefixedID) *PoolUpdateOne
- func (puo *PoolUpdateOne) AddOrigins(o ...*Origin) *PoolUpdateOne
- func (puo *PoolUpdateOne) AddPortIDs(ids ...gidx.PrefixedID) *PoolUpdateOne
- func (puo *PoolUpdateOne) AddPorts(p ...*Port) *PoolUpdateOne
- func (puo *PoolUpdateOne) ClearOrigins() *PoolUpdateOne
- func (puo *PoolUpdateOne) ClearPorts() *PoolUpdateOne
- func (puo *PoolUpdateOne) Exec(ctx context.Context) error
- func (puo *PoolUpdateOne) ExecX(ctx context.Context)
- func (puo *PoolUpdateOne) Mutation() *PoolMutation
- func (puo *PoolUpdateOne) RemoveOriginIDs(ids ...gidx.PrefixedID) *PoolUpdateOne
- func (puo *PoolUpdateOne) RemoveOrigins(o ...*Origin) *PoolUpdateOne
- func (puo *PoolUpdateOne) RemovePortIDs(ids ...gidx.PrefixedID) *PoolUpdateOne
- func (puo *PoolUpdateOne) RemovePorts(p ...*Port) *PoolUpdateOne
- func (puo *PoolUpdateOne) Save(ctx context.Context) (*Pool, error)
- func (puo *PoolUpdateOne) SaveX(ctx context.Context) *Pool
- func (puo *PoolUpdateOne) Select(field string, fields ...string) *PoolUpdateOne
- func (c *PoolUpdateOne) SetInput(i UpdateLoadBalancerPoolInput) *PoolUpdateOne
- func (puo *PoolUpdateOne) SetName(s string) *PoolUpdateOne
- func (puo *PoolUpdateOne) SetProtocol(po pool.Protocol) *PoolUpdateOne
- func (puo *PoolUpdateOne) Where(ps ...predicate.Pool) *PoolUpdateOne
- type Pools
- type Port
- func (po Port) IsEntity()
- func (n *Port) IsNode()
- func (po *Port) LoadBalancer(ctx context.Context) (*LoadBalancer, error)
- func (po *Port) NamedPools(name string) ([]*Pool, error)
- func (po *Port) Pools(ctx context.Context) (result []*Pool, err error)
- func (po *Port) QueryLoadBalancer() *LoadBalancerQuery
- func (po *Port) QueryPools() *PoolQuery
- func (po *Port) String() string
- func (po *Port) Unwrap() *Port
- func (po *Port) Update() *PortUpdateOne
- func (po *Port) Value(name string) (ent.Value, error)
- type PortClient
- func (c *PortClient) Create() *PortCreate
- func (c *PortClient) CreateBulk(builders ...*PortCreate) *PortCreateBulk
- func (c *PortClient) Delete() *PortDelete
- func (c *PortClient) DeleteOne(po *Port) *PortDeleteOne
- func (c *PortClient) DeleteOneID(id gidx.PrefixedID) *PortDeleteOne
- func (c *PortClient) Get(ctx context.Context, id gidx.PrefixedID) (*Port, error)
- func (c *PortClient) GetX(ctx context.Context, id gidx.PrefixedID) *Port
- func (c *PortClient) Hooks() []Hook
- func (c *PortClient) Intercept(interceptors ...Interceptor)
- func (c *PortClient) Interceptors() []Interceptor
- func (c *PortClient) Query() *PortQuery
- func (c *PortClient) QueryLoadBalancer(po *Port) *LoadBalancerQuery
- func (c *PortClient) QueryPools(po *Port) *PoolQuery
- func (c *PortClient) Update() *PortUpdate
- func (c *PortClient) UpdateOne(po *Port) *PortUpdateOne
- func (c *PortClient) UpdateOneID(id gidx.PrefixedID) *PortUpdateOne
- func (c *PortClient) Use(hooks ...Hook)
- type PortCreate
- func (pc *PortCreate) AddPoolIDs(ids ...gidx.PrefixedID) *PortCreate
- func (pc *PortCreate) AddPools(p ...*Pool) *PortCreate
- func (pc *PortCreate) Exec(ctx context.Context) error
- func (pc *PortCreate) ExecX(ctx context.Context)
- func (pc *PortCreate) Mutation() *PortMutation
- func (pc *PortCreate) Save(ctx context.Context) (*Port, error)
- func (pc *PortCreate) SaveX(ctx context.Context) *Port
- func (pc *PortCreate) SetCreatedAt(t time.Time) *PortCreate
- func (pc *PortCreate) SetID(gi gidx.PrefixedID) *PortCreate
- func (c *PortCreate) SetInput(i CreateLoadBalancerPortInput) *PortCreate
- func (pc *PortCreate) SetLoadBalancer(l *LoadBalancer) *PortCreate
- func (pc *PortCreate) SetLoadBalancerID(gi gidx.PrefixedID) *PortCreate
- func (pc *PortCreate) SetName(s string) *PortCreate
- func (pc *PortCreate) SetNillableCreatedAt(t *time.Time) *PortCreate
- func (pc *PortCreate) SetNillableID(gi *gidx.PrefixedID) *PortCreate
- func (pc *PortCreate) SetNillableUpdatedAt(t *time.Time) *PortCreate
- func (pc *PortCreate) SetNumber(i int) *PortCreate
- func (pc *PortCreate) SetUpdatedAt(t time.Time) *PortCreate
- type PortCreateBulk
- type PortDelete
- type PortDeleteOne
- type PortEdges
- type PortGroupBy
- func (pgb *PortGroupBy) Aggregate(fns ...AggregateFunc) *PortGroupBy
- func (s *PortGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PortGroupBy) BoolX(ctx context.Context) bool
- func (s *PortGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PortGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PortGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PortGroupBy) Float64X(ctx context.Context) float64
- func (s *PortGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PortGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PortGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PortGroupBy) IntX(ctx context.Context) int
- func (s *PortGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PortGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PortGroupBy) Scan(ctx context.Context, v any) error
- func (s *PortGroupBy) ScanX(ctx context.Context, v any)
- func (s *PortGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PortGroupBy) StringX(ctx context.Context) string
- func (s *PortGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PortGroupBy) StringsX(ctx context.Context) []string
- type PortMutation
- func (m *PortMutation) AddField(name string, value ent.Value) error
- func (m *PortMutation) AddNumber(i int)
- func (m *PortMutation) AddPoolIDs(ids ...gidx.PrefixedID)
- func (m *PortMutation) AddedEdges() []string
- func (m *PortMutation) AddedField(name string) (ent.Value, bool)
- func (m *PortMutation) AddedFields() []string
- func (m *PortMutation) AddedIDs(name string) []ent.Value
- func (m *PortMutation) AddedNumber() (r int, exists bool)
- func (m *PortMutation) ClearEdge(name string) error
- func (m *PortMutation) ClearField(name string) error
- func (m *PortMutation) ClearLoadBalancer()
- func (m *PortMutation) ClearPools()
- func (m *PortMutation) ClearedEdges() []string
- func (m *PortMutation) ClearedFields() []string
- func (m PortMutation) Client() *Client
- func (m *PortMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PortMutation) EdgeCleared(name string) bool
- func (m *PortMutation) Field(name string) (ent.Value, bool)
- func (m *PortMutation) FieldCleared(name string) bool
- func (m *PortMutation) Fields() []string
- func (m *PortMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *PortMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *PortMutation) LoadBalancerCleared() bool
- func (m *PortMutation) LoadBalancerID() (r gidx.PrefixedID, exists bool)
- func (m *PortMutation) LoadBalancerIDs() (ids []gidx.PrefixedID)
- func (m *PortMutation) Name() (r string, exists bool)
- func (m *PortMutation) Number() (r int, exists bool)
- func (m *PortMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PortMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PortMutation) OldLoadBalancerID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *PortMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PortMutation) OldNumber(ctx context.Context) (v int, err error)
- func (m *PortMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PortMutation) Op() Op
- func (m *PortMutation) PoolsCleared() bool
- func (m *PortMutation) PoolsIDs() (ids []gidx.PrefixedID)
- func (m *PortMutation) RemovePoolIDs(ids ...gidx.PrefixedID)
- func (m *PortMutation) RemovedEdges() []string
- func (m *PortMutation) RemovedIDs(name string) []ent.Value
- func (m *PortMutation) RemovedPoolsIDs() (ids []gidx.PrefixedID)
- func (m *PortMutation) ResetCreatedAt()
- func (m *PortMutation) ResetEdge(name string) error
- func (m *PortMutation) ResetField(name string) error
- func (m *PortMutation) ResetLoadBalancer()
- func (m *PortMutation) ResetLoadBalancerID()
- func (m *PortMutation) ResetName()
- func (m *PortMutation) ResetNumber()
- func (m *PortMutation) ResetPools()
- func (m *PortMutation) ResetUpdatedAt()
- func (m *PortMutation) SetCreatedAt(t time.Time)
- func (m *PortMutation) SetField(name string, value ent.Value) error
- func (m *PortMutation) SetID(id gidx.PrefixedID)
- func (m *PortMutation) SetLoadBalancerID(gi gidx.PrefixedID)
- func (m *PortMutation) SetName(s string)
- func (m *PortMutation) SetNumber(i int)
- func (m *PortMutation) SetOp(op Op)
- func (m *PortMutation) SetUpdatedAt(t time.Time)
- func (m PortMutation) Tx() (*Tx, error)
- func (m *PortMutation) Type() string
- func (m *PortMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PortMutation) Where(ps ...predicate.Port)
- func (m *PortMutation) WhereP(ps ...func(*sql.Selector))
- type PortQuery
- func (pq *PortQuery) Aggregate(fns ...AggregateFunc) *PortSelect
- func (pq *PortQuery) All(ctx context.Context) ([]*Port, error)
- func (pq *PortQuery) AllX(ctx context.Context) []*Port
- func (pq *PortQuery) Clone() *PortQuery
- func (po *PortQuery) CollectFields(ctx context.Context, satisfies ...string) (*PortQuery, error)
- func (pq *PortQuery) Count(ctx context.Context) (int, error)
- func (pq *PortQuery) CountX(ctx context.Context) int
- func (pq *PortQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PortQuery) ExistX(ctx context.Context) bool
- func (pq *PortQuery) First(ctx context.Context) (*Port, error)
- func (pq *PortQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (pq *PortQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (pq *PortQuery) FirstX(ctx context.Context) *Port
- func (pq *PortQuery) GroupBy(field string, fields ...string) *PortGroupBy
- func (pq *PortQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (pq *PortQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (pq *PortQuery) Limit(limit int) *PortQuery
- func (pq *PortQuery) Offset(offset int) *PortQuery
- func (pq *PortQuery) Only(ctx context.Context) (*Port, error)
- func (pq *PortQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (pq *PortQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (pq *PortQuery) OnlyX(ctx context.Context) *Port
- func (pq *PortQuery) Order(o ...port.OrderOption) *PortQuery
- func (po *PortQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*LoadBalancerPortConnection, error)
- func (pq *PortQuery) QueryLoadBalancer() *LoadBalancerQuery
- func (pq *PortQuery) QueryPools() *PoolQuery
- func (pq *PortQuery) Select(fields ...string) *PortSelect
- func (pq *PortQuery) Unique(unique bool) *PortQuery
- func (pq *PortQuery) Where(ps ...predicate.Port) *PortQuery
- func (pq *PortQuery) WithLoadBalancer(opts ...func(*LoadBalancerQuery)) *PortQuery
- func (pq *PortQuery) WithNamedPools(name string, opts ...func(*PoolQuery)) *PortQuery
- func (pq *PortQuery) WithPools(opts ...func(*PoolQuery)) *PortQuery
- type PortSelect
- func (ps *PortSelect) Aggregate(fns ...AggregateFunc) *PortSelect
- func (s *PortSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PortSelect) BoolX(ctx context.Context) bool
- func (s *PortSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PortSelect) BoolsX(ctx context.Context) []bool
- func (s *PortSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PortSelect) Float64X(ctx context.Context) float64
- func (s *PortSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PortSelect) Float64sX(ctx context.Context) []float64
- func (s *PortSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PortSelect) IntX(ctx context.Context) int
- func (s *PortSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PortSelect) IntsX(ctx context.Context) []int
- func (ps *PortSelect) Scan(ctx context.Context, v any) error
- func (s *PortSelect) ScanX(ctx context.Context, v any)
- func (s *PortSelect) String(ctx context.Context) (_ string, err error)
- func (s *PortSelect) StringX(ctx context.Context) string
- func (s *PortSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PortSelect) StringsX(ctx context.Context) []string
- type PortUpdate
- func (pu *PortUpdate) AddNumber(i int) *PortUpdate
- func (pu *PortUpdate) AddPoolIDs(ids ...gidx.PrefixedID) *PortUpdate
- func (pu *PortUpdate) AddPools(p ...*Pool) *PortUpdate
- func (pu *PortUpdate) ClearPools() *PortUpdate
- func (pu *PortUpdate) Exec(ctx context.Context) error
- func (pu *PortUpdate) ExecX(ctx context.Context)
- func (pu *PortUpdate) Mutation() *PortMutation
- func (pu *PortUpdate) RemovePoolIDs(ids ...gidx.PrefixedID) *PortUpdate
- func (pu *PortUpdate) RemovePools(p ...*Pool) *PortUpdate
- func (pu *PortUpdate) Save(ctx context.Context) (int, error)
- func (pu *PortUpdate) SaveX(ctx context.Context) int
- func (c *PortUpdate) SetInput(i UpdateLoadBalancerPortInput) *PortUpdate
- func (pu *PortUpdate) SetName(s string) *PortUpdate
- func (pu *PortUpdate) SetNumber(i int) *PortUpdate
- func (pu *PortUpdate) Where(ps ...predicate.Port) *PortUpdate
- type PortUpdateOne
- func (puo *PortUpdateOne) AddNumber(i int) *PortUpdateOne
- func (puo *PortUpdateOne) AddPoolIDs(ids ...gidx.PrefixedID) *PortUpdateOne
- func (puo *PortUpdateOne) AddPools(p ...*Pool) *PortUpdateOne
- func (puo *PortUpdateOne) ClearPools() *PortUpdateOne
- func (puo *PortUpdateOne) Exec(ctx context.Context) error
- func (puo *PortUpdateOne) ExecX(ctx context.Context)
- func (puo *PortUpdateOne) Mutation() *PortMutation
- func (puo *PortUpdateOne) RemovePoolIDs(ids ...gidx.PrefixedID) *PortUpdateOne
- func (puo *PortUpdateOne) RemovePools(p ...*Pool) *PortUpdateOne
- func (puo *PortUpdateOne) Save(ctx context.Context) (*Port, error)
- func (puo *PortUpdateOne) SaveX(ctx context.Context) *Port
- func (puo *PortUpdateOne) Select(field string, fields ...string) *PortUpdateOne
- func (c *PortUpdateOne) SetInput(i UpdateLoadBalancerPortInput) *PortUpdateOne
- func (puo *PortUpdateOne) SetName(s string) *PortUpdateOne
- func (puo *PortUpdateOne) SetNumber(i int) *PortUpdateOne
- func (puo *PortUpdateOne) Where(ps ...predicate.Port) *PortUpdateOne
- type Ports
- type Provider
- func (pr Provider) IsEntity()
- func (n *Provider) IsNode()
- func (pr *Provider) LoadBalancers(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*LoadBalancerConnection, error)
- func (pr *Provider) NamedLoadBalancers(name string) ([]*LoadBalancer, error)
- func (pr *Provider) QueryLoadBalancers() *LoadBalancerQuery
- func (pr *Provider) String() string
- func (pr *Provider) Unwrap() *Provider
- func (pr *Provider) Update() *ProviderUpdateOne
- func (pr *Provider) Value(name string) (ent.Value, error)
- type ProviderClient
- func (c *ProviderClient) Create() *ProviderCreate
- func (c *ProviderClient) CreateBulk(builders ...*ProviderCreate) *ProviderCreateBulk
- func (c *ProviderClient) Delete() *ProviderDelete
- func (c *ProviderClient) DeleteOne(pr *Provider) *ProviderDeleteOne
- func (c *ProviderClient) DeleteOneID(id gidx.PrefixedID) *ProviderDeleteOne
- func (c *ProviderClient) Get(ctx context.Context, id gidx.PrefixedID) (*Provider, error)
- func (c *ProviderClient) GetX(ctx context.Context, id gidx.PrefixedID) *Provider
- func (c *ProviderClient) Hooks() []Hook
- func (c *ProviderClient) Intercept(interceptors ...Interceptor)
- func (c *ProviderClient) Interceptors() []Interceptor
- func (c *ProviderClient) Query() *ProviderQuery
- func (c *ProviderClient) QueryLoadBalancers(pr *Provider) *LoadBalancerQuery
- func (c *ProviderClient) Update() *ProviderUpdate
- func (c *ProviderClient) UpdateOne(pr *Provider) *ProviderUpdateOne
- func (c *ProviderClient) UpdateOneID(id gidx.PrefixedID) *ProviderUpdateOne
- func (c *ProviderClient) Use(hooks ...Hook)
- type ProviderCreate
- func (pc *ProviderCreate) AddLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderCreate
- func (pc *ProviderCreate) AddLoadBalancers(l ...*LoadBalancer) *ProviderCreate
- func (pc *ProviderCreate) Exec(ctx context.Context) error
- func (pc *ProviderCreate) ExecX(ctx context.Context)
- func (pc *ProviderCreate) Mutation() *ProviderMutation
- func (pc *ProviderCreate) Save(ctx context.Context) (*Provider, error)
- func (pc *ProviderCreate) SaveX(ctx context.Context) *Provider
- func (pc *ProviderCreate) SetCreatedAt(t time.Time) *ProviderCreate
- func (pc *ProviderCreate) SetID(gi gidx.PrefixedID) *ProviderCreate
- func (c *ProviderCreate) SetInput(i CreateLoadBalancerProviderInput) *ProviderCreate
- func (pc *ProviderCreate) SetName(s string) *ProviderCreate
- func (pc *ProviderCreate) SetNillableCreatedAt(t *time.Time) *ProviderCreate
- func (pc *ProviderCreate) SetNillableID(gi *gidx.PrefixedID) *ProviderCreate
- func (pc *ProviderCreate) SetNillableUpdatedAt(t *time.Time) *ProviderCreate
- func (pc *ProviderCreate) SetOwnerID(gi gidx.PrefixedID) *ProviderCreate
- func (pc *ProviderCreate) SetUpdatedAt(t time.Time) *ProviderCreate
- type ProviderCreateBulk
- type ProviderDelete
- type ProviderDeleteOne
- type ProviderEdges
- type ProviderGroupBy
- func (pgb *ProviderGroupBy) Aggregate(fns ...AggregateFunc) *ProviderGroupBy
- func (s *ProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProviderGroupBy) BoolX(ctx context.Context) bool
- func (s *ProviderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProviderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProviderGroupBy) Float64X(ctx context.Context) float64
- func (s *ProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProviderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProviderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProviderGroupBy) IntX(ctx context.Context) int
- func (s *ProviderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProviderGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProviderGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProviderGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProviderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProviderGroupBy) StringX(ctx context.Context) string
- func (s *ProviderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProviderGroupBy) StringsX(ctx context.Context) []string
- type ProviderMutation
- func (m *ProviderMutation) AddField(name string, value ent.Value) error
- func (m *ProviderMutation) AddLoadBalancerIDs(ids ...gidx.PrefixedID)
- func (m *ProviderMutation) AddedEdges() []string
- func (m *ProviderMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProviderMutation) AddedFields() []string
- func (m *ProviderMutation) AddedIDs(name string) []ent.Value
- func (m *ProviderMutation) ClearEdge(name string) error
- func (m *ProviderMutation) ClearField(name string) error
- func (m *ProviderMutation) ClearLoadBalancers()
- func (m *ProviderMutation) ClearedEdges() []string
- func (m *ProviderMutation) ClearedFields() []string
- func (m ProviderMutation) Client() *Client
- func (m *ProviderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProviderMutation) EdgeCleared(name string) bool
- func (m *ProviderMutation) Field(name string) (ent.Value, bool)
- func (m *ProviderMutation) FieldCleared(name string) bool
- func (m *ProviderMutation) Fields() []string
- func (m *ProviderMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *ProviderMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *ProviderMutation) LoadBalancersCleared() bool
- func (m *ProviderMutation) LoadBalancersIDs() (ids []gidx.PrefixedID)
- func (m *ProviderMutation) Name() (r string, exists bool)
- func (m *ProviderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProviderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProviderMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProviderMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *ProviderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProviderMutation) Op() Op
- func (m *ProviderMutation) OwnerID() (r gidx.PrefixedID, exists bool)
- func (m *ProviderMutation) RemoveLoadBalancerIDs(ids ...gidx.PrefixedID)
- func (m *ProviderMutation) RemovedEdges() []string
- func (m *ProviderMutation) RemovedIDs(name string) []ent.Value
- func (m *ProviderMutation) RemovedLoadBalancersIDs() (ids []gidx.PrefixedID)
- func (m *ProviderMutation) ResetCreatedAt()
- func (m *ProviderMutation) ResetEdge(name string) error
- func (m *ProviderMutation) ResetField(name string) error
- func (m *ProviderMutation) ResetLoadBalancers()
- func (m *ProviderMutation) ResetName()
- func (m *ProviderMutation) ResetOwnerID()
- func (m *ProviderMutation) ResetUpdatedAt()
- func (m *ProviderMutation) SetCreatedAt(t time.Time)
- func (m *ProviderMutation) SetField(name string, value ent.Value) error
- func (m *ProviderMutation) SetID(id gidx.PrefixedID)
- func (m *ProviderMutation) SetName(s string)
- func (m *ProviderMutation) SetOp(op Op)
- func (m *ProviderMutation) SetOwnerID(gi gidx.PrefixedID)
- func (m *ProviderMutation) SetUpdatedAt(t time.Time)
- func (m ProviderMutation) Tx() (*Tx, error)
- func (m *ProviderMutation) Type() string
- func (m *ProviderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProviderMutation) Where(ps ...predicate.Provider)
- func (m *ProviderMutation) WhereP(ps ...func(*sql.Selector))
- type ProviderQuery
- func (pq *ProviderQuery) Aggregate(fns ...AggregateFunc) *ProviderSelect
- func (pq *ProviderQuery) All(ctx context.Context) ([]*Provider, error)
- func (pq *ProviderQuery) AllX(ctx context.Context) []*Provider
- func (pq *ProviderQuery) Clone() *ProviderQuery
- func (pr *ProviderQuery) CollectFields(ctx context.Context, satisfies ...string) (*ProviderQuery, error)
- func (pq *ProviderQuery) Count(ctx context.Context) (int, error)
- func (pq *ProviderQuery) CountX(ctx context.Context) int
- func (pq *ProviderQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProviderQuery) ExistX(ctx context.Context) bool
- func (pq *ProviderQuery) First(ctx context.Context) (*Provider, error)
- func (pq *ProviderQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (pq *ProviderQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (pq *ProviderQuery) FirstX(ctx context.Context) *Provider
- func (pq *ProviderQuery) GroupBy(field string, fields ...string) *ProviderGroupBy
- func (pq *ProviderQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (pq *ProviderQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (pq *ProviderQuery) Limit(limit int) *ProviderQuery
- func (pq *ProviderQuery) Offset(offset int) *ProviderQuery
- func (pq *ProviderQuery) Only(ctx context.Context) (*Provider, error)
- func (pq *ProviderQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (pq *ProviderQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (pq *ProviderQuery) OnlyX(ctx context.Context) *Provider
- func (pq *ProviderQuery) Order(o ...provider.OrderOption) *ProviderQuery
- func (pr *ProviderQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*LoadBalancerProviderConnection, error)
- func (pq *ProviderQuery) QueryLoadBalancers() *LoadBalancerQuery
- func (pq *ProviderQuery) Select(fields ...string) *ProviderSelect
- func (pq *ProviderQuery) Unique(unique bool) *ProviderQuery
- func (pq *ProviderQuery) Where(ps ...predicate.Provider) *ProviderQuery
- func (pq *ProviderQuery) WithLoadBalancers(opts ...func(*LoadBalancerQuery)) *ProviderQuery
- func (pq *ProviderQuery) WithNamedLoadBalancers(name string, opts ...func(*LoadBalancerQuery)) *ProviderQuery
- type ProviderSelect
- func (ps *ProviderSelect) Aggregate(fns ...AggregateFunc) *ProviderSelect
- func (s *ProviderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProviderSelect) BoolX(ctx context.Context) bool
- func (s *ProviderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProviderSelect) BoolsX(ctx context.Context) []bool
- func (s *ProviderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProviderSelect) Float64X(ctx context.Context) float64
- func (s *ProviderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProviderSelect) Float64sX(ctx context.Context) []float64
- func (s *ProviderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProviderSelect) IntX(ctx context.Context) int
- func (s *ProviderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProviderSelect) IntsX(ctx context.Context) []int
- func (ps *ProviderSelect) Scan(ctx context.Context, v any) error
- func (s *ProviderSelect) ScanX(ctx context.Context, v any)
- func (s *ProviderSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProviderSelect) StringX(ctx context.Context) string
- func (s *ProviderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProviderSelect) StringsX(ctx context.Context) []string
- type ProviderUpdate
- func (pu *ProviderUpdate) AddLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderUpdate
- func (pu *ProviderUpdate) AddLoadBalancers(l ...*LoadBalancer) *ProviderUpdate
- func (pu *ProviderUpdate) ClearLoadBalancers() *ProviderUpdate
- func (pu *ProviderUpdate) Exec(ctx context.Context) error
- func (pu *ProviderUpdate) ExecX(ctx context.Context)
- func (pu *ProviderUpdate) Mutation() *ProviderMutation
- func (pu *ProviderUpdate) RemoveLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderUpdate
- func (pu *ProviderUpdate) RemoveLoadBalancers(l ...*LoadBalancer) *ProviderUpdate
- func (pu *ProviderUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProviderUpdate) SaveX(ctx context.Context) int
- func (c *ProviderUpdate) SetInput(i UpdateLoadBalancerProviderInput) *ProviderUpdate
- func (pu *ProviderUpdate) SetName(s string) *ProviderUpdate
- func (pu *ProviderUpdate) Where(ps ...predicate.Provider) *ProviderUpdate
- type ProviderUpdateOne
- func (puo *ProviderUpdateOne) AddLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) AddLoadBalancers(l ...*LoadBalancer) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) ClearLoadBalancers() *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Exec(ctx context.Context) error
- func (puo *ProviderUpdateOne) ExecX(ctx context.Context)
- func (puo *ProviderUpdateOne) Mutation() *ProviderMutation
- func (puo *ProviderUpdateOne) RemoveLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) RemoveLoadBalancers(l ...*LoadBalancer) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Save(ctx context.Context) (*Provider, error)
- func (puo *ProviderUpdateOne) SaveX(ctx context.Context) *Provider
- func (puo *ProviderUpdateOne) Select(field string, fields ...string) *ProviderUpdateOne
- func (c *ProviderUpdateOne) SetInput(i UpdateLoadBalancerProviderInput) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetName(s string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Where(ps ...predicate.Provider) *ProviderUpdateOne
- type Providers
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type UpdateLoadBalancerInput
- type UpdateLoadBalancerOriginInput
- type UpdateLoadBalancerPoolInput
- type UpdateLoadBalancerPortInput
- type UpdateLoadBalancerProviderInput
- 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. TypeLoadBalancer = "LoadBalancer" TypeOrigin = "Origin" TypePool = "Pool" TypePort = "Port" TypeProvider = "Provider" )
Variables ¶
var ( // LoadBalancerOrderFieldID orders LoadBalancer by id. LoadBalancerOrderFieldID = &LoadBalancerOrderField{ Value: func(lb *LoadBalancer) (ent.Value, error) { return lb.ID, nil }, column: loadbalancer.FieldID, toTerm: loadbalancer.ByID, toCursor: func(lb *LoadBalancer) Cursor { return Cursor{ ID: lb.ID, Value: lb.ID, } }, } // LoadBalancerOrderFieldCreatedAt orders LoadBalancer by created_at. LoadBalancerOrderFieldCreatedAt = &LoadBalancerOrderField{ Value: func(lb *LoadBalancer) (ent.Value, error) { return lb.CreatedAt, nil }, column: loadbalancer.FieldCreatedAt, toTerm: loadbalancer.ByCreatedAt, toCursor: func(lb *LoadBalancer) Cursor { return Cursor{ ID: lb.ID, Value: lb.CreatedAt, } }, } // LoadBalancerOrderFieldUpdatedAt orders LoadBalancer by updated_at. LoadBalancerOrderFieldUpdatedAt = &LoadBalancerOrderField{ Value: func(lb *LoadBalancer) (ent.Value, error) { return lb.UpdatedAt, nil }, column: loadbalancer.FieldUpdatedAt, toTerm: loadbalancer.ByUpdatedAt, toCursor: func(lb *LoadBalancer) Cursor { return Cursor{ ID: lb.ID, Value: lb.UpdatedAt, } }, } // LoadBalancerOrderFieldName orders LoadBalancer by name. LoadBalancerOrderFieldName = &LoadBalancerOrderField{ Value: func(lb *LoadBalancer) (ent.Value, error) { return lb.Name, nil }, column: loadbalancer.FieldName, toTerm: loadbalancer.ByName, toCursor: func(lb *LoadBalancer) Cursor { return Cursor{ ID: lb.ID, Value: lb.Name, } }, } // LoadBalancerOrderFieldOwnerID orders LoadBalancer by owner_id. LoadBalancerOrderFieldOwnerID = &LoadBalancerOrderField{ Value: func(lb *LoadBalancer) (ent.Value, error) { return lb.OwnerID, nil }, column: loadbalancer.FieldOwnerID, toTerm: loadbalancer.ByOwnerID, toCursor: func(lb *LoadBalancer) Cursor { return Cursor{ ID: lb.ID, Value: lb.OwnerID, } }, } )
var ( // OriginOrderFieldCreatedAt orders Origin by created_at. OriginOrderFieldCreatedAt = &LoadBalancerOriginOrderField{ Value: func(o *LoadBalancerOrigin) (ent.Value, error) { return o.CreatedAt, nil }, column: origin.FieldCreatedAt, toTerm: origin.ByCreatedAt, toCursor: func(o *LoadBalancerOrigin) Cursor { return Cursor{ ID: o.ID, Value: o.CreatedAt, } }, } // OriginOrderFieldUpdatedAt orders Origin by updated_at. OriginOrderFieldUpdatedAt = &LoadBalancerOriginOrderField{ Value: func(o *LoadBalancerOrigin) (ent.Value, error) { return o.UpdatedAt, nil }, column: origin.FieldUpdatedAt, toTerm: origin.ByUpdatedAt, toCursor: func(o *LoadBalancerOrigin) Cursor { return Cursor{ ID: o.ID, Value: o.UpdatedAt, } }, } // OriginOrderFieldName orders Origin by name. OriginOrderFieldName = &LoadBalancerOriginOrderField{ Value: func(o *LoadBalancerOrigin) (ent.Value, error) { return o.Name, nil }, column: origin.FieldName, toTerm: origin.ByName, toCursor: func(o *LoadBalancerOrigin) Cursor { return Cursor{ ID: o.ID, Value: o.Name, } }, } // OriginOrderFieldTarget orders Origin by target. OriginOrderFieldTarget = &LoadBalancerOriginOrderField{ Value: func(o *LoadBalancerOrigin) (ent.Value, error) { return o.Target, nil }, column: origin.FieldTarget, toTerm: origin.ByTarget, toCursor: func(o *LoadBalancerOrigin) Cursor { return Cursor{ ID: o.ID, Value: o.Target, } }, } // OriginOrderFieldPortNumber orders Origin by port_number. OriginOrderFieldPortNumber = &LoadBalancerOriginOrderField{ Value: func(o *LoadBalancerOrigin) (ent.Value, error) { return o.PortNumber, nil }, column: origin.FieldPortNumber, toTerm: origin.ByPortNumber, toCursor: func(o *LoadBalancerOrigin) Cursor { return Cursor{ ID: o.ID, Value: o.PortNumber, } }, } // OriginOrderFieldActive orders Origin by active. OriginOrderFieldActive = &LoadBalancerOriginOrderField{ Value: func(o *LoadBalancerOrigin) (ent.Value, error) { return o.Active, nil }, column: origin.FieldActive, toTerm: origin.ByActive, toCursor: func(o *LoadBalancerOrigin) Cursor { return Cursor{ ID: o.ID, Value: o.Active, } }, } )
var ( // PoolOrderFieldCreatedAt orders Pool by created_at. PoolOrderFieldCreatedAt = &LoadBalancerPoolOrderField{ Value: func(po *LoadBalancerPool) (ent.Value, error) { return po.CreatedAt, nil }, column: pool.FieldCreatedAt, toTerm: pool.ByCreatedAt, toCursor: func(po *LoadBalancerPool) Cursor { return Cursor{ ID: po.ID, Value: po.CreatedAt, } }, } // PoolOrderFieldUpdatedAt orders Pool by updated_at. PoolOrderFieldUpdatedAt = &LoadBalancerPoolOrderField{ Value: func(po *LoadBalancerPool) (ent.Value, error) { return po.UpdatedAt, nil }, column: pool.FieldUpdatedAt, toTerm: pool.ByUpdatedAt, toCursor: func(po *LoadBalancerPool) Cursor { return Cursor{ ID: po.ID, Value: po.UpdatedAt, } }, } // PoolOrderFieldName orders Pool by name. PoolOrderFieldName = &LoadBalancerPoolOrderField{ Value: func(po *LoadBalancerPool) (ent.Value, error) { return po.Name, nil }, column: pool.FieldName, toTerm: pool.ByName, toCursor: func(po *LoadBalancerPool) Cursor { return Cursor{ ID: po.ID, Value: po.Name, } }, } // PoolOrderFieldProtocol orders Pool by protocol. PoolOrderFieldProtocol = &LoadBalancerPoolOrderField{ Value: func(po *LoadBalancerPool) (ent.Value, error) { return po.Protocol, nil }, column: pool.FieldProtocol, toTerm: pool.ByProtocol, toCursor: func(po *LoadBalancerPool) Cursor { return Cursor{ ID: po.ID, Value: po.Protocol, } }, } )
var ( // PortOrderFieldCreatedAt orders Port by created_at. PortOrderFieldCreatedAt = &LoadBalancerPortOrderField{ Value: func(po *LoadBalancerPort) (ent.Value, error) { return po.CreatedAt, nil }, column: port.FieldCreatedAt, toTerm: port.ByCreatedAt, toCursor: func(po *LoadBalancerPort) Cursor { return Cursor{ ID: po.ID, Value: po.CreatedAt, } }, } // PortOrderFieldUpdatedAt orders Port by updated_at. PortOrderFieldUpdatedAt = &LoadBalancerPortOrderField{ Value: func(po *LoadBalancerPort) (ent.Value, error) { return po.UpdatedAt, nil }, column: port.FieldUpdatedAt, toTerm: port.ByUpdatedAt, toCursor: func(po *LoadBalancerPort) Cursor { return Cursor{ ID: po.ID, Value: po.UpdatedAt, } }, } // PortOrderFieldNumber orders Port by number. PortOrderFieldNumber = &LoadBalancerPortOrderField{ Value: func(po *LoadBalancerPort) (ent.Value, error) { return po.Number, nil }, column: port.FieldNumber, toTerm: port.ByNumber, toCursor: func(po *LoadBalancerPort) Cursor { return Cursor{ ID: po.ID, Value: po.Number, } }, } // PortOrderFieldName orders Port by name. PortOrderFieldName = &LoadBalancerPortOrderField{ Value: func(po *LoadBalancerPort) (ent.Value, error) { return po.Name, nil }, column: port.FieldName, toTerm: port.ByName, toCursor: func(po *LoadBalancerPort) Cursor { return Cursor{ ID: po.ID, Value: po.Name, } }, } )
var ( // ProviderOrderFieldID orders Provider by id. ProviderOrderFieldID = &LoadBalancerProviderOrderField{ Value: func(pr *LoadBalancerProvider) (ent.Value, error) { return pr.ID, nil }, column: provider.FieldID, toTerm: provider.ByID, toCursor: func(pr *LoadBalancerProvider) Cursor { return Cursor{ ID: pr.ID, Value: pr.ID, } }, } // ProviderOrderFieldCreatedAt orders Provider by created_at. ProviderOrderFieldCreatedAt = &LoadBalancerProviderOrderField{ Value: func(pr *LoadBalancerProvider) (ent.Value, error) { return pr.CreatedAt, nil }, column: provider.FieldCreatedAt, toTerm: provider.ByCreatedAt, toCursor: func(pr *LoadBalancerProvider) Cursor { return Cursor{ ID: pr.ID, Value: pr.CreatedAt, } }, } // ProviderOrderFieldUpdatedAt orders Provider by updated_at. ProviderOrderFieldUpdatedAt = &LoadBalancerProviderOrderField{ Value: func(pr *LoadBalancerProvider) (ent.Value, error) { return pr.UpdatedAt, nil }, column: provider.FieldUpdatedAt, toTerm: provider.ByUpdatedAt, toCursor: func(pr *LoadBalancerProvider) Cursor { return Cursor{ ID: pr.ID, Value: pr.UpdatedAt, } }, } // ProviderOrderFieldName orders Provider by name. ProviderOrderFieldName = &LoadBalancerProviderOrderField{ Value: func(pr *LoadBalancerProvider) (ent.Value, error) { return pr.Name, nil }, column: provider.FieldName, toTerm: provider.ByName, toCursor: func(pr *LoadBalancerProvider) Cursor { return Cursor{ ID: pr.ID, Value: pr.Name, } }, } // ProviderOrderFieldOwnerID orders Provider by owner_id. ProviderOrderFieldOwnerID = &LoadBalancerProviderOrderField{ Value: func(pr *LoadBalancerProvider) (ent.Value, error) { return pr.OwnerID, nil }, column: provider.FieldOwnerID, toTerm: provider.ByOwnerID, toCursor: func(pr *LoadBalancerProvider) Cursor { return Cursor{ ID: pr.ID, Value: pr.OwnerID, } }, } )
var DefaultLoadBalancerOrder = &LoadBalancerOrder{ Direction: entgql.OrderDirectionAsc, Field: &LoadBalancerOrderField{ Value: func(lb *LoadBalancer) (ent.Value, error) { return lb.ID, nil }, column: loadbalancer.FieldID, toTerm: loadbalancer.ByID, toCursor: func(lb *LoadBalancer) Cursor { return Cursor{ID: lb.ID} }, }, }
DefaultLoadBalancerOrder is the default ordering of LoadBalancer.
var DefaultLoadBalancerOriginOrder = &LoadBalancerOriginOrder{ Direction: entgql.OrderDirectionAsc, Field: &LoadBalancerOriginOrderField{ Value: func(o *LoadBalancerOrigin) (ent.Value, error) { return o.ID, nil }, column: origin.FieldID, toTerm: origin.ByID, toCursor: func(o *LoadBalancerOrigin) Cursor { return Cursor{ID: o.ID} }, }, }
DefaultLoadBalancerOriginOrder is the default ordering of Origin.
var DefaultLoadBalancerPoolOrder = &LoadBalancerPoolOrder{ Direction: entgql.OrderDirectionAsc, Field: &LoadBalancerPoolOrderField{ Value: func(po *LoadBalancerPool) (ent.Value, error) { return po.ID, nil }, column: pool.FieldID, toTerm: pool.ByID, toCursor: func(po *LoadBalancerPool) Cursor { return Cursor{ID: po.ID} }, }, }
DefaultLoadBalancerPoolOrder is the default ordering of Pool.
var DefaultLoadBalancerPortOrder = &LoadBalancerPortOrder{ Direction: entgql.OrderDirectionAsc, Field: &LoadBalancerPortOrderField{ Value: func(po *LoadBalancerPort) (ent.Value, error) { return po.ID, nil }, column: port.FieldID, toTerm: port.ByID, toCursor: func(po *LoadBalancerPort) Cursor { return Cursor{ID: po.ID} }, }, }
DefaultLoadBalancerPortOrder is the default ordering of Port.
var DefaultLoadBalancerProviderOrder = &LoadBalancerProviderOrder{ Direction: entgql.OrderDirectionAsc, Field: &LoadBalancerProviderOrderField{ Value: func(pr *LoadBalancerProvider) (ent.Value, error) { return pr.ID, nil }, column: provider.FieldID, toTerm: provider.ByID, toCursor: func(pr *LoadBalancerProvider) Cursor { return Cursor{ID: pr.ID} }, }, }
DefaultLoadBalancerProviderOrder is the default ordering of Provider.
var ErrEmptyLoadBalancerOriginWhereInput = errors.New("generated: empty predicate LoadBalancerOriginWhereInput")
ErrEmptyLoadBalancerOriginWhereInput is returned in case the LoadBalancerOriginWhereInput is empty.
var ErrEmptyLoadBalancerPoolWhereInput = errors.New("generated: empty predicate LoadBalancerPoolWhereInput")
ErrEmptyLoadBalancerPoolWhereInput is returned in case the LoadBalancerPoolWhereInput is empty.
var ErrEmptyLoadBalancerPortWhereInput = errors.New("generated: empty predicate LoadBalancerPortWhereInput")
ErrEmptyLoadBalancerPortWhereInput is returned in case the LoadBalancerPortWhereInput is empty.
var ErrEmptyLoadBalancerProviderWhereInput = errors.New("generated: empty predicate LoadBalancerProviderWhereInput")
ErrEmptyLoadBalancerProviderWhereInput is returned in case the LoadBalancerProviderWhereInput is empty.
var ErrEmptyLoadBalancerWhereInput = errors.New("generated: empty predicate LoadBalancerWhereInput")
ErrEmptyLoadBalancerWhereInput is returned in case the LoadBalancerWhereInput is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(generated.As(generated.Sum(field1), "sum_field1"), (generated.As(generated.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // LoadBalancer is the client for interacting with the LoadBalancer builders. LoadBalancer *LoadBalancerClient // Origin is the client for interacting with the Origin builders. Origin *OriginClient // Pool is the client for interacting with the Pool builders. Pool *PoolClient // Port is the client for interacting with the Port builders. Port *PortClient // Provider is the client for interacting with the Provider builders. Provider *ProviderClient // 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(). LoadBalancer. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) Noder ¶
func (c *Client) Noder(ctx context.Context, id gidx.PrefixedID, opts ...NodeOption) (_ Noder, err error)
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) Noders ¶
func (c *Client) Noders(ctx context.Context, ids []gidx.PrefixedID, opts ...NodeOption) ([]Noder, error)
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type CreateLoadBalancerInput ¶
type CreateLoadBalancerInput struct { Name string OwnerID gidx.PrefixedID LocationID gidx.PrefixedID PortIDs []gidx.PrefixedID ProviderID gidx.PrefixedID }
CreateLoadBalancerInput represents a mutation input for creating loadbalancers.
func (*CreateLoadBalancerInput) Mutate ¶
func (i *CreateLoadBalancerInput) Mutate(m *LoadBalancerMutation)
Mutate applies the CreateLoadBalancerInput on the LoadBalancerMutation builder.
type CreateLoadBalancerOriginInput ¶
type CreateLoadBalancerOriginInput struct { Name string Target string PortNumber int Active *bool PoolID gidx.PrefixedID }
CreateLoadBalancerOriginInput represents a mutation input for creating loadbalancerorigins.
func (*CreateLoadBalancerOriginInput) Mutate ¶
func (i *CreateLoadBalancerOriginInput) Mutate(m *OriginMutation)
Mutate applies the CreateLoadBalancerOriginInput on the OriginMutation builder.
type CreateLoadBalancerPoolInput ¶
type CreateLoadBalancerPoolInput struct { Name string Protocol pool.Protocol OwnerID gidx.PrefixedID PortIDs []gidx.PrefixedID OriginIDs []gidx.PrefixedID }
CreateLoadBalancerPoolInput represents a mutation input for creating loadbalancerpools.
func (*CreateLoadBalancerPoolInput) Mutate ¶
func (i *CreateLoadBalancerPoolInput) Mutate(m *PoolMutation)
Mutate applies the CreateLoadBalancerPoolInput on the PoolMutation builder.
type CreateLoadBalancerPortInput ¶
type CreateLoadBalancerPortInput struct { Number int Name string PoolIDs []gidx.PrefixedID LoadBalancerID gidx.PrefixedID }
CreateLoadBalancerPortInput represents a mutation input for creating loadbalancerports.
func (*CreateLoadBalancerPortInput) Mutate ¶
func (i *CreateLoadBalancerPortInput) Mutate(m *PortMutation)
Mutate applies the CreateLoadBalancerPortInput on the PortMutation builder.
type CreateLoadBalancerProviderInput ¶
type CreateLoadBalancerProviderInput struct { Name string OwnerID gidx.PrefixedID }
CreateLoadBalancerProviderInput represents a mutation input for creating loadbalancerproviders.
func (*CreateLoadBalancerProviderInput) Mutate ¶
func (i *CreateLoadBalancerProviderInput) Mutate(m *ProviderMutation)
Mutate applies the CreateLoadBalancerProviderInput on the ProviderMutation builder.
type IPAddressable ¶ added in v0.0.20
type IPAddressable interface {
IsIPAddressable()
}
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 LoadBalancer ¶
type LoadBalancer struct { // ID of the ent. // The ID for the load balancer. ID gidx.PrefixedID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // The name of the load balancer. Name string `json:"name,omitempty"` // The ID for the owner for this load balancer. OwnerID gidx.PrefixedID `json:"owner_id,omitempty"` // The ID for the location of this load balancer. LocationID gidx.PrefixedID `json:"location_id,omitempty"` // The ID for the load balancer provider for this load balancer. ProviderID gidx.PrefixedID `json:"provider_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the LoadBalancerQuery when eager-loading is set. Edges LoadBalancerEdges `json:"edges"` // contains filtered or unexported fields }
Representation of a load balancer.
func (LoadBalancer) IsEntity ¶
func (lb LoadBalancer) IsEntity()
IsEntity implement fedruntime.Entity
func (LoadBalancer) IsIPAddressable ¶ added in v0.0.20
func (lb LoadBalancer) IsIPAddressable()
IsIPAddressable implements interface for IPAddressable
func (*LoadBalancer) IsNode ¶
func (n *LoadBalancer) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*LoadBalancer) NamedPorts ¶
func (lb *LoadBalancer) NamedPorts(name string) ([]*Port, error)
NamedPorts returns the Ports named value or an error if the edge was not loaded in eager-loading with this name.
func (*LoadBalancer) Ports ¶
func (lb *LoadBalancer) Ports( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *LoadBalancerPortOrder, where *LoadBalancerPortWhereInput, ) (*LoadBalancerPortConnection, error)
func (*LoadBalancer) Provider ¶
func (lb *LoadBalancer) Provider(ctx context.Context) (*Provider, error)
func (*LoadBalancer) QueryPorts ¶
func (lb *LoadBalancer) QueryPorts() *PortQuery
QueryPorts queries the "ports" edge of the LoadBalancer entity.
func (*LoadBalancer) QueryProvider ¶
func (lb *LoadBalancer) QueryProvider() *ProviderQuery
QueryProvider queries the "provider" edge of the LoadBalancer entity.
func (*LoadBalancer) String ¶
func (lb *LoadBalancer) String() string
String implements the fmt.Stringer.
func (*LoadBalancer) ToEdge ¶
func (lb *LoadBalancer) ToEdge(order *LoadBalancerOrder) *LoadBalancerEdge
ToEdge converts LoadBalancer into LoadBalancerEdge.
func (*LoadBalancer) Unwrap ¶
func (lb *LoadBalancer) Unwrap() *LoadBalancer
Unwrap unwraps the LoadBalancer 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 (*LoadBalancer) Update ¶
func (lb *LoadBalancer) Update() *LoadBalancerUpdateOne
Update returns a builder for updating this LoadBalancer. Note that you need to call LoadBalancer.Unwrap() before calling this method if this LoadBalancer was returned from a transaction, and the transaction was committed or rolled back.
type LoadBalancerClient ¶
type LoadBalancerClient struct {
// contains filtered or unexported fields
}
LoadBalancerClient is a client for the LoadBalancer schema.
func NewLoadBalancerClient ¶
func NewLoadBalancerClient(c config) *LoadBalancerClient
NewLoadBalancerClient returns a client for the LoadBalancer from the given config.
func (*LoadBalancerClient) Create ¶
func (c *LoadBalancerClient) Create() *LoadBalancerCreate
Create returns a builder for creating a LoadBalancer entity.
func (*LoadBalancerClient) CreateBulk ¶
func (c *LoadBalancerClient) CreateBulk(builders ...*LoadBalancerCreate) *LoadBalancerCreateBulk
CreateBulk returns a builder for creating a bulk of LoadBalancer entities.
func (*LoadBalancerClient) Delete ¶
func (c *LoadBalancerClient) Delete() *LoadBalancerDelete
Delete returns a delete builder for LoadBalancer.
func (*LoadBalancerClient) DeleteOne ¶
func (c *LoadBalancerClient) DeleteOne(lb *LoadBalancer) *LoadBalancerDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LoadBalancerClient) DeleteOneID ¶
func (c *LoadBalancerClient) DeleteOneID(id gidx.PrefixedID) *LoadBalancerDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LoadBalancerClient) Get ¶
func (c *LoadBalancerClient) Get(ctx context.Context, id gidx.PrefixedID) (*LoadBalancer, error)
Get returns a LoadBalancer entity by its id.
func (*LoadBalancerClient) GetX ¶
func (c *LoadBalancerClient) GetX(ctx context.Context, id gidx.PrefixedID) *LoadBalancer
GetX is like Get, but panics if an error occurs.
func (*LoadBalancerClient) Hooks ¶
func (c *LoadBalancerClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LoadBalancerClient) Intercept ¶
func (c *LoadBalancerClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `loadbalancer.Intercept(f(g(h())))`.
func (*LoadBalancerClient) Interceptors ¶
func (c *LoadBalancerClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LoadBalancerClient) Query ¶
func (c *LoadBalancerClient) Query() *LoadBalancerQuery
Query returns a query builder for LoadBalancer.
func (*LoadBalancerClient) QueryPorts ¶
func (c *LoadBalancerClient) QueryPorts(lb *LoadBalancer) *PortQuery
QueryPorts queries the ports edge of a LoadBalancer.
func (*LoadBalancerClient) QueryProvider ¶
func (c *LoadBalancerClient) QueryProvider(lb *LoadBalancer) *ProviderQuery
QueryProvider queries the provider edge of a LoadBalancer.
func (*LoadBalancerClient) Update ¶
func (c *LoadBalancerClient) Update() *LoadBalancerUpdate
Update returns an update builder for LoadBalancer.
func (*LoadBalancerClient) UpdateOne ¶
func (c *LoadBalancerClient) UpdateOne(lb *LoadBalancer) *LoadBalancerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LoadBalancerClient) UpdateOneID ¶
func (c *LoadBalancerClient) UpdateOneID(id gidx.PrefixedID) *LoadBalancerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LoadBalancerClient) Use ¶
func (c *LoadBalancerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `loadbalancer.Hooks(f(g(h())))`.
type LoadBalancerConnection ¶
type LoadBalancerConnection struct { Edges []*LoadBalancerEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
LoadBalancerConnection is the connection containing edges to LoadBalancer.
type LoadBalancerCreate ¶
type LoadBalancerCreate struct {
// contains filtered or unexported fields
}
LoadBalancerCreate is the builder for creating a LoadBalancer entity.
func (*LoadBalancerCreate) AddPortIDs ¶
func (lbc *LoadBalancerCreate) AddPortIDs(ids ...gidx.PrefixedID) *LoadBalancerCreate
AddPortIDs adds the "ports" edge to the Port entity by IDs.
func (*LoadBalancerCreate) AddPorts ¶
func (lbc *LoadBalancerCreate) AddPorts(p ...*Port) *LoadBalancerCreate
AddPorts adds the "ports" edges to the Port entity.
func (*LoadBalancerCreate) Exec ¶
func (lbc *LoadBalancerCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LoadBalancerCreate) ExecX ¶
func (lbc *LoadBalancerCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LoadBalancerCreate) Mutation ¶
func (lbc *LoadBalancerCreate) Mutation() *LoadBalancerMutation
Mutation returns the LoadBalancerMutation object of the builder.
func (*LoadBalancerCreate) Save ¶
func (lbc *LoadBalancerCreate) Save(ctx context.Context) (*LoadBalancer, error)
Save creates the LoadBalancer in the database.
func (*LoadBalancerCreate) SaveX ¶
func (lbc *LoadBalancerCreate) SaveX(ctx context.Context) *LoadBalancer
SaveX calls Save and panics if Save returns an error.
func (*LoadBalancerCreate) SetCreatedAt ¶
func (lbc *LoadBalancerCreate) SetCreatedAt(t time.Time) *LoadBalancerCreate
SetCreatedAt sets the "created_at" field.
func (*LoadBalancerCreate) SetID ¶
func (lbc *LoadBalancerCreate) SetID(gi gidx.PrefixedID) *LoadBalancerCreate
SetID sets the "id" field.
func (*LoadBalancerCreate) SetInput ¶
func (c *LoadBalancerCreate) SetInput(i CreateLoadBalancerInput) *LoadBalancerCreate
SetInput applies the change-set in the CreateLoadBalancerInput on the LoadBalancerCreate builder.
func (*LoadBalancerCreate) SetLocationID ¶
func (lbc *LoadBalancerCreate) SetLocationID(gi gidx.PrefixedID) *LoadBalancerCreate
SetLocationID sets the "location_id" field.
func (*LoadBalancerCreate) SetName ¶
func (lbc *LoadBalancerCreate) SetName(s string) *LoadBalancerCreate
SetName sets the "name" field.
func (*LoadBalancerCreate) SetNillableCreatedAt ¶
func (lbc *LoadBalancerCreate) SetNillableCreatedAt(t *time.Time) *LoadBalancerCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LoadBalancerCreate) SetNillableID ¶
func (lbc *LoadBalancerCreate) SetNillableID(gi *gidx.PrefixedID) *LoadBalancerCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*LoadBalancerCreate) SetNillableUpdatedAt ¶
func (lbc *LoadBalancerCreate) SetNillableUpdatedAt(t *time.Time) *LoadBalancerCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*LoadBalancerCreate) SetOwnerID ¶ added in v0.0.18
func (lbc *LoadBalancerCreate) SetOwnerID(gi gidx.PrefixedID) *LoadBalancerCreate
SetOwnerID sets the "owner_id" field.
func (*LoadBalancerCreate) SetProvider ¶
func (lbc *LoadBalancerCreate) SetProvider(p *Provider) *LoadBalancerCreate
SetProvider sets the "provider" edge to the Provider entity.
func (*LoadBalancerCreate) SetProviderID ¶
func (lbc *LoadBalancerCreate) SetProviderID(gi gidx.PrefixedID) *LoadBalancerCreate
SetProviderID sets the "provider_id" field.
func (*LoadBalancerCreate) SetUpdatedAt ¶
func (lbc *LoadBalancerCreate) SetUpdatedAt(t time.Time) *LoadBalancerCreate
SetUpdatedAt sets the "updated_at" field.
type LoadBalancerCreateBulk ¶
type LoadBalancerCreateBulk struct {
// contains filtered or unexported fields
}
LoadBalancerCreateBulk is the builder for creating many LoadBalancer entities in bulk.
func (*LoadBalancerCreateBulk) Exec ¶
func (lbcb *LoadBalancerCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LoadBalancerCreateBulk) ExecX ¶
func (lbcb *LoadBalancerCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LoadBalancerCreateBulk) Save ¶
func (lbcb *LoadBalancerCreateBulk) Save(ctx context.Context) ([]*LoadBalancer, error)
Save creates the LoadBalancer entities in the database.
func (*LoadBalancerCreateBulk) SaveX ¶
func (lbcb *LoadBalancerCreateBulk) SaveX(ctx context.Context) []*LoadBalancer
SaveX is like Save, but panics if an error occurs.
type LoadBalancerDelete ¶
type LoadBalancerDelete struct {
// contains filtered or unexported fields
}
LoadBalancerDelete is the builder for deleting a LoadBalancer entity.
func (*LoadBalancerDelete) Exec ¶
func (lbd *LoadBalancerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LoadBalancerDelete) ExecX ¶
func (lbd *LoadBalancerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LoadBalancerDelete) Where ¶
func (lbd *LoadBalancerDelete) Where(ps ...predicate.LoadBalancer) *LoadBalancerDelete
Where appends a list predicates to the LoadBalancerDelete builder.
type LoadBalancerDeleteOne ¶
type LoadBalancerDeleteOne struct {
// contains filtered or unexported fields
}
LoadBalancerDeleteOne is the builder for deleting a single LoadBalancer entity.
func (*LoadBalancerDeleteOne) Exec ¶
func (lbdo *LoadBalancerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LoadBalancerDeleteOne) ExecX ¶
func (lbdo *LoadBalancerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LoadBalancerDeleteOne) Where ¶
func (lbdo *LoadBalancerDeleteOne) Where(ps ...predicate.LoadBalancer) *LoadBalancerDeleteOne
Where appends a list predicates to the LoadBalancerDelete builder.
type LoadBalancerEdge ¶
type LoadBalancerEdge struct { Node *LoadBalancer `json:"node"` Cursor Cursor `json:"cursor"` }
LoadBalancerEdge is the edge representation of LoadBalancer.
type LoadBalancerEdges ¶
type LoadBalancerEdges struct { // Ports holds the value of the ports edge. Ports []*Port `json:"ports,omitempty"` // The load balancer provider for the load balancer. Provider *Provider `json:"provider,omitempty"` // contains filtered or unexported fields }
LoadBalancerEdges holds the relations/edges for other nodes in the graph.
func (LoadBalancerEdges) PortsOrErr ¶
func (e LoadBalancerEdges) PortsOrErr() ([]*Port, error)
PortsOrErr returns the Ports value or an error if the edge was not loaded in eager-loading.
func (LoadBalancerEdges) ProviderOrErr ¶
func (e LoadBalancerEdges) ProviderOrErr() (*Provider, error)
ProviderOrErr returns the Provider value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type LoadBalancerGroupBy ¶
type LoadBalancerGroupBy struct {
// contains filtered or unexported fields
}
LoadBalancerGroupBy is the group-by builder for LoadBalancer entities.
func (*LoadBalancerGroupBy) Aggregate ¶
func (lbgb *LoadBalancerGroupBy) Aggregate(fns ...AggregateFunc) *LoadBalancerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LoadBalancerGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LoadBalancerGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LoadBalancerGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LoadBalancerGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LoadBalancerGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LoadBalancerGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LoadBalancerGroupBy) Scan ¶
func (lbgb *LoadBalancerGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LoadBalancerGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LoadBalancerMutation ¶
type LoadBalancerMutation struct {
// contains filtered or unexported fields
}
LoadBalancerMutation represents an operation that mutates the LoadBalancer nodes in the graph.
func (*LoadBalancerMutation) AddField ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) AddPortIDs ¶
func (m *LoadBalancerMutation) AddPortIDs(ids ...gidx.PrefixedID)
AddPortIDs adds the "ports" edge to the Port entity by ids.
func (*LoadBalancerMutation) AddedEdges ¶
func (m *LoadBalancerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LoadBalancerMutation) AddedField ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) AddedFields ¶
func (m *LoadBalancerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LoadBalancerMutation) AddedIDs ¶
func (m *LoadBalancerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LoadBalancerMutation) ClearEdge ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) ClearField ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) ClearPorts ¶
func (m *LoadBalancerMutation) ClearPorts()
ClearPorts clears the "ports" edge to the Port entity.
func (*LoadBalancerMutation) ClearProvider ¶
func (m *LoadBalancerMutation) ClearProvider()
ClearProvider clears the "provider" edge to the Provider entity.
func (*LoadBalancerMutation) ClearedEdges ¶
func (m *LoadBalancerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LoadBalancerMutation) ClearedFields ¶
func (m *LoadBalancerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LoadBalancerMutation) Client ¶
func (m LoadBalancerMutation) 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 (*LoadBalancerMutation) CreatedAt ¶
func (m *LoadBalancerMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*LoadBalancerMutation) EdgeCleared ¶
func (m *LoadBalancerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LoadBalancerMutation) Field ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) FieldCleared ¶
func (m *LoadBalancerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LoadBalancerMutation) Fields ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) ID ¶
func (m *LoadBalancerMutation) ID() (id gidx.PrefixedID, 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 (*LoadBalancerMutation) IDs ¶
func (m *LoadBalancerMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, 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 (*LoadBalancerMutation) LocationID ¶
func (m *LoadBalancerMutation) LocationID() (r gidx.PrefixedID, exists bool)
LocationID returns the value of the "location_id" field in the mutation.
func (*LoadBalancerMutation) Name ¶
func (m *LoadBalancerMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*LoadBalancerMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the LoadBalancer entity. If the LoadBalancer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LoadBalancerMutation) 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 (*LoadBalancerMutation) OldLocationID ¶
func (m *LoadBalancerMutation) OldLocationID(ctx context.Context) (v gidx.PrefixedID, err error)
OldLocationID returns the old "location_id" field's value of the LoadBalancer entity. If the LoadBalancer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LoadBalancerMutation) OldName ¶
func (m *LoadBalancerMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the LoadBalancer entity. If the LoadBalancer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LoadBalancerMutation) OldOwnerID ¶ added in v0.0.18
func (m *LoadBalancerMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
OldOwnerID returns the old "owner_id" field's value of the LoadBalancer entity. If the LoadBalancer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LoadBalancerMutation) OldProviderID ¶
func (m *LoadBalancerMutation) OldProviderID(ctx context.Context) (v gidx.PrefixedID, err error)
OldProviderID returns the old "provider_id" field's value of the LoadBalancer entity. If the LoadBalancer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LoadBalancerMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the LoadBalancer entity. If the LoadBalancer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LoadBalancerMutation) Op ¶
func (m *LoadBalancerMutation) Op() Op
Op returns the operation name.
func (*LoadBalancerMutation) OwnerID ¶ added in v0.0.18
func (m *LoadBalancerMutation) OwnerID() (r gidx.PrefixedID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*LoadBalancerMutation) PortsCleared ¶
func (m *LoadBalancerMutation) PortsCleared() bool
PortsCleared reports if the "ports" edge to the Port entity was cleared.
func (*LoadBalancerMutation) PortsIDs ¶
func (m *LoadBalancerMutation) PortsIDs() (ids []gidx.PrefixedID)
PortsIDs returns the "ports" edge IDs in the mutation.
func (*LoadBalancerMutation) ProviderCleared ¶
func (m *LoadBalancerMutation) ProviderCleared() bool
ProviderCleared reports if the "provider" edge to the Provider entity was cleared.
func (*LoadBalancerMutation) ProviderID ¶
func (m *LoadBalancerMutation) ProviderID() (r gidx.PrefixedID, exists bool)
ProviderID returns the value of the "provider_id" field in the mutation.
func (*LoadBalancerMutation) ProviderIDs ¶
func (m *LoadBalancerMutation) ProviderIDs() (ids []gidx.PrefixedID)
ProviderIDs returns the "provider" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProviderID instead. It exists only for internal usage by the builders.
func (*LoadBalancerMutation) RemovePortIDs ¶
func (m *LoadBalancerMutation) RemovePortIDs(ids ...gidx.PrefixedID)
RemovePortIDs removes the "ports" edge to the Port entity by IDs.
func (*LoadBalancerMutation) RemovedEdges ¶
func (m *LoadBalancerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LoadBalancerMutation) RemovedIDs ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) RemovedPortsIDs ¶
func (m *LoadBalancerMutation) RemovedPortsIDs() (ids []gidx.PrefixedID)
RemovedPorts returns the removed IDs of the "ports" edge to the Port entity.
func (*LoadBalancerMutation) ResetCreatedAt ¶
func (m *LoadBalancerMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*LoadBalancerMutation) ResetEdge ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) ResetField ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) ResetLocationID ¶
func (m *LoadBalancerMutation) ResetLocationID()
ResetLocationID resets all changes to the "location_id" field.
func (*LoadBalancerMutation) ResetName ¶
func (m *LoadBalancerMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*LoadBalancerMutation) ResetOwnerID ¶ added in v0.0.18
func (m *LoadBalancerMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*LoadBalancerMutation) ResetPorts ¶
func (m *LoadBalancerMutation) ResetPorts()
ResetPorts resets all changes to the "ports" edge.
func (*LoadBalancerMutation) ResetProvider ¶
func (m *LoadBalancerMutation) ResetProvider()
ResetProvider resets all changes to the "provider" edge.
func (*LoadBalancerMutation) ResetProviderID ¶
func (m *LoadBalancerMutation) ResetProviderID()
ResetProviderID resets all changes to the "provider_id" field.
func (*LoadBalancerMutation) ResetUpdatedAt ¶
func (m *LoadBalancerMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*LoadBalancerMutation) SetCreatedAt ¶
func (m *LoadBalancerMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*LoadBalancerMutation) SetField ¶
func (m *LoadBalancerMutation) 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 (*LoadBalancerMutation) SetID ¶
func (m *LoadBalancerMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of LoadBalancer entities.
func (*LoadBalancerMutation) SetLocationID ¶
func (m *LoadBalancerMutation) SetLocationID(gi gidx.PrefixedID)
SetLocationID sets the "location_id" field.
func (*LoadBalancerMutation) SetName ¶
func (m *LoadBalancerMutation) SetName(s string)
SetName sets the "name" field.
func (*LoadBalancerMutation) SetOp ¶
func (m *LoadBalancerMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LoadBalancerMutation) SetOwnerID ¶ added in v0.0.18
func (m *LoadBalancerMutation) SetOwnerID(gi gidx.PrefixedID)
SetOwnerID sets the "owner_id" field.
func (*LoadBalancerMutation) SetProviderID ¶
func (m *LoadBalancerMutation) SetProviderID(gi gidx.PrefixedID)
SetProviderID sets the "provider_id" field.
func (*LoadBalancerMutation) SetUpdatedAt ¶
func (m *LoadBalancerMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (LoadBalancerMutation) Tx ¶
func (m LoadBalancerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LoadBalancerMutation) Type ¶
func (m *LoadBalancerMutation) Type() string
Type returns the node type of this mutation (LoadBalancer).
func (*LoadBalancerMutation) UpdatedAt ¶
func (m *LoadBalancerMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*LoadBalancerMutation) Where ¶
func (m *LoadBalancerMutation) Where(ps ...predicate.LoadBalancer)
Where appends a list predicates to the LoadBalancerMutation builder.
func (*LoadBalancerMutation) WhereP ¶
func (m *LoadBalancerMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LoadBalancerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LoadBalancerOrder ¶
type LoadBalancerOrder struct { Direction OrderDirection `json:"direction"` Field *LoadBalancerOrderField `json:"field"` }
LoadBalancerOrder defines the ordering of LoadBalancer.
type LoadBalancerOrderField ¶
type LoadBalancerOrderField struct { // Value extracts the ordering value from the given LoadBalancer. Value func(*LoadBalancer) (ent.Value, error) // contains filtered or unexported fields }
LoadBalancerOrderField defines the ordering field of LoadBalancer.
func (LoadBalancerOrderField) MarshalGQL ¶
func (f LoadBalancerOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (LoadBalancerOrderField) String ¶
func (f LoadBalancerOrderField) String() string
String implement fmt.Stringer interface.
func (*LoadBalancerOrderField) UnmarshalGQL ¶
func (f *LoadBalancerOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type LoadBalancerOrigin ¶
type LoadBalancerOrigin = Origin
LoadBalancerOrigin is the type alias for Origin.
func (*LoadBalancerOrigin) ToEdge ¶
func (o *LoadBalancerOrigin) ToEdge(order *LoadBalancerOriginOrder) *LoadBalancerOriginEdge
ToEdge converts LoadBalancerOrigin into LoadBalancerOriginEdge.
type LoadBalancerOriginConnection ¶
type LoadBalancerOriginConnection struct { Edges []*LoadBalancerOriginEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
LoadBalancerOriginConnection is the connection containing edges to LoadBalancerOrigin.
type LoadBalancerOriginEdge ¶
type LoadBalancerOriginEdge struct { Node *LoadBalancerOrigin `json:"node"` Cursor Cursor `json:"cursor"` }
LoadBalancerOriginEdge is the edge representation of LoadBalancerOrigin.
type LoadBalancerOriginOrder ¶
type LoadBalancerOriginOrder struct { Direction OrderDirection `json:"direction"` Field *LoadBalancerOriginOrderField `json:"field"` }
LoadBalancerOriginOrder defines the ordering of Origin.
type LoadBalancerOriginOrderField ¶
type LoadBalancerOriginOrderField struct { // Value extracts the ordering value from the given Origin. Value func(*LoadBalancerOrigin) (ent.Value, error) // contains filtered or unexported fields }
LoadBalancerOriginOrderField defines the ordering field of Origin.
func (LoadBalancerOriginOrderField) MarshalGQL ¶
func (f LoadBalancerOriginOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (LoadBalancerOriginOrderField) String ¶
func (f LoadBalancerOriginOrderField) String() string
String implement fmt.Stringer interface.
func (*LoadBalancerOriginOrderField) UnmarshalGQL ¶
func (f *LoadBalancerOriginOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type LoadBalancerOriginPaginateOption ¶
type LoadBalancerOriginPaginateOption func(*loadbalanceroriginPager) error
LoadBalancerOriginPaginateOption enables pagination customization.
func WithLoadBalancerOriginFilter ¶
func WithLoadBalancerOriginFilter(filter func(*OriginQuery) (*OriginQuery, error)) LoadBalancerOriginPaginateOption
WithLoadBalancerOriginFilter configures pagination filter.
func WithLoadBalancerOriginOrder ¶
func WithLoadBalancerOriginOrder(order *LoadBalancerOriginOrder) LoadBalancerOriginPaginateOption
WithLoadBalancerOriginOrder configures pagination ordering.
type LoadBalancerOriginWhereInput ¶
type LoadBalancerOriginWhereInput struct { Predicates []predicate.Origin `json:"-"` Not *LoadBalancerOriginWhereInput `json:"not,omitempty"` Or []*LoadBalancerOriginWhereInput `json:"or,omitempty"` And []*LoadBalancerOriginWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "target" field predicates. Target *string `json:"target,omitempty"` TargetNEQ *string `json:"targetNEQ,omitempty"` TargetIn []string `json:"targetIn,omitempty"` TargetNotIn []string `json:"targetNotIn,omitempty"` TargetGT *string `json:"targetGT,omitempty"` TargetGTE *string `json:"targetGTE,omitempty"` TargetLT *string `json:"targetLT,omitempty"` TargetLTE *string `json:"targetLTE,omitempty"` TargetContains *string `json:"targetContains,omitempty"` TargetHasPrefix *string `json:"targetHasPrefix,omitempty"` TargetHasSuffix *string `json:"targetHasSuffix,omitempty"` TargetEqualFold *string `json:"targetEqualFold,omitempty"` TargetContainsFold *string `json:"targetContainsFold,omitempty"` // "port_number" field predicates. PortNumber *int `json:"portNumber,omitempty"` PortNumberNEQ *int `json:"portNumberNEQ,omitempty"` PortNumberIn []int `json:"portNumberIn,omitempty"` PortNumberNotIn []int `json:"portNumberNotIn,omitempty"` PortNumberGT *int `json:"portNumberGT,omitempty"` PortNumberGTE *int `json:"portNumberGTE,omitempty"` PortNumberLT *int `json:"portNumberLT,omitempty"` PortNumberLTE *int `json:"portNumberLTE,omitempty"` // "active" field predicates. Active *bool `json:"active,omitempty"` ActiveNEQ *bool `json:"activeNEQ,omitempty"` // "pool" edge predicates. HasPool *bool `json:"hasPool,omitempty"` HasPoolWith []*LoadBalancerPoolWhereInput `json:"hasPoolWith,omitempty"` }
LoadBalancerOriginWhereInput represents a where input for filtering Origin queries.
func (*LoadBalancerOriginWhereInput) AddPredicates ¶
func (i *LoadBalancerOriginWhereInput) AddPredicates(predicates ...predicate.Origin)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*LoadBalancerOriginWhereInput) Filter ¶
func (i *LoadBalancerOriginWhereInput) Filter(q *OriginQuery) (*OriginQuery, error)
Filter applies the LoadBalancerOriginWhereInput filter on the OriginQuery builder.
type LoadBalancerPaginateOption ¶
type LoadBalancerPaginateOption func(*loadbalancerPager) error
LoadBalancerPaginateOption enables pagination customization.
func WithLoadBalancerFilter ¶
func WithLoadBalancerFilter(filter func(*LoadBalancerQuery) (*LoadBalancerQuery, error)) LoadBalancerPaginateOption
WithLoadBalancerFilter configures pagination filter.
func WithLoadBalancerOrder ¶
func WithLoadBalancerOrder(order *LoadBalancerOrder) LoadBalancerPaginateOption
WithLoadBalancerOrder configures pagination ordering.
type LoadBalancerPool ¶
type LoadBalancerPool = Pool
LoadBalancerPool is the type alias for Pool.
func (*LoadBalancerPool) ToEdge ¶
func (po *LoadBalancerPool) ToEdge(order *LoadBalancerPoolOrder) *LoadBalancerPoolEdge
ToEdge converts LoadBalancerPool into LoadBalancerPoolEdge.
type LoadBalancerPoolConnection ¶
type LoadBalancerPoolConnection struct { Edges []*LoadBalancerPoolEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
LoadBalancerPoolConnection is the connection containing edges to LoadBalancerPool.
type LoadBalancerPoolEdge ¶
type LoadBalancerPoolEdge struct { Node *LoadBalancerPool `json:"node"` Cursor Cursor `json:"cursor"` }
LoadBalancerPoolEdge is the edge representation of LoadBalancerPool.
type LoadBalancerPoolOrder ¶
type LoadBalancerPoolOrder struct { Direction OrderDirection `json:"direction"` Field *LoadBalancerPoolOrderField `json:"field"` }
LoadBalancerPoolOrder defines the ordering of Pool.
type LoadBalancerPoolOrderField ¶
type LoadBalancerPoolOrderField struct { // Value extracts the ordering value from the given Pool. Value func(*LoadBalancerPool) (ent.Value, error) // contains filtered or unexported fields }
LoadBalancerPoolOrderField defines the ordering field of Pool.
func (LoadBalancerPoolOrderField) MarshalGQL ¶
func (f LoadBalancerPoolOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (LoadBalancerPoolOrderField) String ¶
func (f LoadBalancerPoolOrderField) String() string
String implement fmt.Stringer interface.
func (*LoadBalancerPoolOrderField) UnmarshalGQL ¶
func (f *LoadBalancerPoolOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type LoadBalancerPoolPaginateOption ¶
type LoadBalancerPoolPaginateOption func(*loadbalancerpoolPager) error
LoadBalancerPoolPaginateOption enables pagination customization.
func WithLoadBalancerPoolFilter ¶
func WithLoadBalancerPoolFilter(filter func(*PoolQuery) (*PoolQuery, error)) LoadBalancerPoolPaginateOption
WithLoadBalancerPoolFilter configures pagination filter.
func WithLoadBalancerPoolOrder ¶
func WithLoadBalancerPoolOrder(order *LoadBalancerPoolOrder) LoadBalancerPoolPaginateOption
WithLoadBalancerPoolOrder configures pagination ordering.
type LoadBalancerPoolWhereInput ¶
type LoadBalancerPoolWhereInput struct { Predicates []predicate.Pool `json:"-"` Not *LoadBalancerPoolWhereInput `json:"not,omitempty"` Or []*LoadBalancerPoolWhereInput `json:"or,omitempty"` And []*LoadBalancerPoolWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "protocol" field predicates. Protocol *pool.Protocol `json:"protocol,omitempty"` ProtocolNEQ *pool.Protocol `json:"protocolNEQ,omitempty"` ProtocolIn []pool.Protocol `json:"protocolIn,omitempty"` ProtocolNotIn []pool.Protocol `json:"protocolNotIn,omitempty"` // "ports" edge predicates. HasPorts *bool `json:"hasPorts,omitempty"` HasPortsWith []*LoadBalancerPortWhereInput `json:"hasPortsWith,omitempty"` // "origins" edge predicates. HasOrigins *bool `json:"hasOrigins,omitempty"` HasOriginsWith []*LoadBalancerOriginWhereInput `json:"hasOriginsWith,omitempty"` }
LoadBalancerPoolWhereInput represents a where input for filtering Pool queries.
func (*LoadBalancerPoolWhereInput) AddPredicates ¶
func (i *LoadBalancerPoolWhereInput) AddPredicates(predicates ...predicate.Pool)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type LoadBalancerPort ¶
type LoadBalancerPort = Port
LoadBalancerPort is the type alias for Port.
func (*LoadBalancerPort) ToEdge ¶
func (po *LoadBalancerPort) ToEdge(order *LoadBalancerPortOrder) *LoadBalancerPortEdge
ToEdge converts LoadBalancerPort into LoadBalancerPortEdge.
type LoadBalancerPortConnection ¶
type LoadBalancerPortConnection struct { Edges []*LoadBalancerPortEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
LoadBalancerPortConnection is the connection containing edges to LoadBalancerPort.
type LoadBalancerPortEdge ¶
type LoadBalancerPortEdge struct { Node *LoadBalancerPort `json:"node"` Cursor Cursor `json:"cursor"` }
LoadBalancerPortEdge is the edge representation of LoadBalancerPort.
type LoadBalancerPortOrder ¶
type LoadBalancerPortOrder struct { Direction OrderDirection `json:"direction"` Field *LoadBalancerPortOrderField `json:"field"` }
LoadBalancerPortOrder defines the ordering of Port.
type LoadBalancerPortOrderField ¶
type LoadBalancerPortOrderField struct { // Value extracts the ordering value from the given Port. Value func(*LoadBalancerPort) (ent.Value, error) // contains filtered or unexported fields }
LoadBalancerPortOrderField defines the ordering field of Port.
func (LoadBalancerPortOrderField) MarshalGQL ¶
func (f LoadBalancerPortOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (LoadBalancerPortOrderField) String ¶
func (f LoadBalancerPortOrderField) String() string
String implement fmt.Stringer interface.
func (*LoadBalancerPortOrderField) UnmarshalGQL ¶
func (f *LoadBalancerPortOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type LoadBalancerPortPaginateOption ¶
type LoadBalancerPortPaginateOption func(*loadbalancerportPager) error
LoadBalancerPortPaginateOption enables pagination customization.
func WithLoadBalancerPortFilter ¶
func WithLoadBalancerPortFilter(filter func(*PortQuery) (*PortQuery, error)) LoadBalancerPortPaginateOption
WithLoadBalancerPortFilter configures pagination filter.
func WithLoadBalancerPortOrder ¶
func WithLoadBalancerPortOrder(order *LoadBalancerPortOrder) LoadBalancerPortPaginateOption
WithLoadBalancerPortOrder configures pagination ordering.
type LoadBalancerPortWhereInput ¶
type LoadBalancerPortWhereInput struct { Predicates []predicate.Port `json:"-"` Not *LoadBalancerPortWhereInput `json:"not,omitempty"` Or []*LoadBalancerPortWhereInput `json:"or,omitempty"` And []*LoadBalancerPortWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "number" field predicates. Number *int `json:"number,omitempty"` NumberNEQ *int `json:"numberNEQ,omitempty"` NumberIn []int `json:"numberIn,omitempty"` NumberNotIn []int `json:"numberNotIn,omitempty"` NumberGT *int `json:"numberGT,omitempty"` NumberGTE *int `json:"numberGTE,omitempty"` NumberLT *int `json:"numberLT,omitempty"` NumberLTE *int `json:"numberLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "pools" edge predicates. HasPools *bool `json:"hasPools,omitempty"` HasPoolsWith []*LoadBalancerPoolWhereInput `json:"hasPoolsWith,omitempty"` // "load_balancer" edge predicates. HasLoadBalancer *bool `json:"hasLoadBalancer,omitempty"` HasLoadBalancerWith []*LoadBalancerWhereInput `json:"hasLoadBalancerWith,omitempty"` }
LoadBalancerPortWhereInput represents a where input for filtering Port queries.
func (*LoadBalancerPortWhereInput) AddPredicates ¶
func (i *LoadBalancerPortWhereInput) AddPredicates(predicates ...predicate.Port)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type LoadBalancerProvider ¶
type LoadBalancerProvider = Provider
LoadBalancerProvider is the type alias for Provider.
func (*LoadBalancerProvider) ToEdge ¶
func (pr *LoadBalancerProvider) ToEdge(order *LoadBalancerProviderOrder) *LoadBalancerProviderEdge
ToEdge converts LoadBalancerProvider into LoadBalancerProviderEdge.
type LoadBalancerProviderConnection ¶
type LoadBalancerProviderConnection struct { Edges []*LoadBalancerProviderEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
LoadBalancerProviderConnection is the connection containing edges to LoadBalancerProvider.
type LoadBalancerProviderEdge ¶
type LoadBalancerProviderEdge struct { Node *LoadBalancerProvider `json:"node"` Cursor Cursor `json:"cursor"` }
LoadBalancerProviderEdge is the edge representation of LoadBalancerProvider.
type LoadBalancerProviderOrder ¶
type LoadBalancerProviderOrder struct { Direction OrderDirection `json:"direction"` Field *LoadBalancerProviderOrderField `json:"field"` }
LoadBalancerProviderOrder defines the ordering of Provider.
type LoadBalancerProviderOrderField ¶
type LoadBalancerProviderOrderField struct { // Value extracts the ordering value from the given Provider. Value func(*LoadBalancerProvider) (ent.Value, error) // contains filtered or unexported fields }
LoadBalancerProviderOrderField defines the ordering field of Provider.
func (LoadBalancerProviderOrderField) MarshalGQL ¶
func (f LoadBalancerProviderOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (LoadBalancerProviderOrderField) String ¶
func (f LoadBalancerProviderOrderField) String() string
String implement fmt.Stringer interface.
func (*LoadBalancerProviderOrderField) UnmarshalGQL ¶
func (f *LoadBalancerProviderOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type LoadBalancerProviderPaginateOption ¶
type LoadBalancerProviderPaginateOption func(*loadbalancerproviderPager) error
LoadBalancerProviderPaginateOption enables pagination customization.
func WithLoadBalancerProviderFilter ¶
func WithLoadBalancerProviderFilter(filter func(*ProviderQuery) (*ProviderQuery, error)) LoadBalancerProviderPaginateOption
WithLoadBalancerProviderFilter configures pagination filter.
func WithLoadBalancerProviderOrder ¶
func WithLoadBalancerProviderOrder(order *LoadBalancerProviderOrder) LoadBalancerProviderPaginateOption
WithLoadBalancerProviderOrder configures pagination ordering.
type LoadBalancerProviderWhereInput ¶
type LoadBalancerProviderWhereInput struct { Predicates []predicate.Provider `json:"-"` Not *LoadBalancerProviderWhereInput `json:"not,omitempty"` Or []*LoadBalancerProviderWhereInput `json:"or,omitempty"` And []*LoadBalancerProviderWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "load_balancers" edge predicates. HasLoadBalancers *bool `json:"hasLoadBalancers,omitempty"` HasLoadBalancersWith []*LoadBalancerWhereInput `json:"hasLoadBalancersWith,omitempty"` }
LoadBalancerProviderWhereInput represents a where input for filtering Provider queries.
func (*LoadBalancerProviderWhereInput) AddPredicates ¶
func (i *LoadBalancerProviderWhereInput) AddPredicates(predicates ...predicate.Provider)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*LoadBalancerProviderWhereInput) Filter ¶
func (i *LoadBalancerProviderWhereInput) Filter(q *ProviderQuery) (*ProviderQuery, error)
Filter applies the LoadBalancerProviderWhereInput filter on the ProviderQuery builder.
type LoadBalancerQuery ¶
type LoadBalancerQuery struct {
// contains filtered or unexported fields
}
LoadBalancerQuery is the builder for querying LoadBalancer entities.
func (*LoadBalancerQuery) Aggregate ¶
func (lbq *LoadBalancerQuery) Aggregate(fns ...AggregateFunc) *LoadBalancerSelect
Aggregate returns a LoadBalancerSelect configured with the given aggregations.
func (*LoadBalancerQuery) All ¶
func (lbq *LoadBalancerQuery) All(ctx context.Context) ([]*LoadBalancer, error)
All executes the query and returns a list of LoadBalancers.
func (*LoadBalancerQuery) AllX ¶
func (lbq *LoadBalancerQuery) AllX(ctx context.Context) []*LoadBalancer
AllX is like All, but panics if an error occurs.
func (*LoadBalancerQuery) Clone ¶
func (lbq *LoadBalancerQuery) Clone() *LoadBalancerQuery
Clone returns a duplicate of the LoadBalancerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LoadBalancerQuery) CollectFields ¶
func (lb *LoadBalancerQuery) CollectFields(ctx context.Context, satisfies ...string) (*LoadBalancerQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*LoadBalancerQuery) Count ¶
func (lbq *LoadBalancerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LoadBalancerQuery) CountX ¶
func (lbq *LoadBalancerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LoadBalancerQuery) Exist ¶
func (lbq *LoadBalancerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LoadBalancerQuery) ExistX ¶
func (lbq *LoadBalancerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LoadBalancerQuery) First ¶
func (lbq *LoadBalancerQuery) First(ctx context.Context) (*LoadBalancer, error)
First returns the first LoadBalancer entity from the query. Returns a *NotFoundError when no LoadBalancer was found.
func (*LoadBalancerQuery) FirstID ¶
func (lbq *LoadBalancerQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first LoadBalancer ID from the query. Returns a *NotFoundError when no LoadBalancer ID was found.
func (*LoadBalancerQuery) FirstIDX ¶
func (lbq *LoadBalancerQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*LoadBalancerQuery) FirstX ¶
func (lbq *LoadBalancerQuery) FirstX(ctx context.Context) *LoadBalancer
FirstX is like First, but panics if an error occurs.
func (*LoadBalancerQuery) GroupBy ¶
func (lbq *LoadBalancerQuery) GroupBy(field string, fields ...string) *LoadBalancerGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.LoadBalancer.Query(). GroupBy(loadbalancer.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*LoadBalancerQuery) IDs ¶
func (lbq *LoadBalancerQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of LoadBalancer IDs.
func (*LoadBalancerQuery) IDsX ¶
func (lbq *LoadBalancerQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*LoadBalancerQuery) Limit ¶
func (lbq *LoadBalancerQuery) Limit(limit int) *LoadBalancerQuery
Limit the number of records to be returned by this query.
func (*LoadBalancerQuery) Offset ¶
func (lbq *LoadBalancerQuery) Offset(offset int) *LoadBalancerQuery
Offset to start from.
func (*LoadBalancerQuery) Only ¶
func (lbq *LoadBalancerQuery) Only(ctx context.Context) (*LoadBalancer, error)
Only returns a single LoadBalancer entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one LoadBalancer entity is found. Returns a *NotFoundError when no LoadBalancer entities are found.
func (*LoadBalancerQuery) OnlyID ¶
func (lbq *LoadBalancerQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only LoadBalancer ID in the query. Returns a *NotSingularError when more than one LoadBalancer ID is found. Returns a *NotFoundError when no entities are found.
func (*LoadBalancerQuery) OnlyIDX ¶
func (lbq *LoadBalancerQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LoadBalancerQuery) OnlyX ¶
func (lbq *LoadBalancerQuery) OnlyX(ctx context.Context) *LoadBalancer
OnlyX is like Only, but panics if an error occurs.
func (*LoadBalancerQuery) Order ¶
func (lbq *LoadBalancerQuery) Order(o ...loadbalancer.OrderOption) *LoadBalancerQuery
Order specifies how the records should be ordered.
func (*LoadBalancerQuery) Paginate ¶
func (lb *LoadBalancerQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...LoadBalancerPaginateOption, ) (*LoadBalancerConnection, error)
Paginate executes the query and returns a relay based cursor connection to LoadBalancer.
func (*LoadBalancerQuery) QueryPorts ¶
func (lbq *LoadBalancerQuery) QueryPorts() *PortQuery
QueryPorts chains the current query on the "ports" edge.
func (*LoadBalancerQuery) QueryProvider ¶
func (lbq *LoadBalancerQuery) QueryProvider() *ProviderQuery
QueryProvider chains the current query on the "provider" edge.
func (*LoadBalancerQuery) Select ¶
func (lbq *LoadBalancerQuery) Select(fields ...string) *LoadBalancerSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.LoadBalancer.Query(). Select(loadbalancer.FieldCreatedAt). Scan(ctx, &v)
func (*LoadBalancerQuery) Unique ¶
func (lbq *LoadBalancerQuery) Unique(unique bool) *LoadBalancerQuery
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 (*LoadBalancerQuery) Where ¶
func (lbq *LoadBalancerQuery) Where(ps ...predicate.LoadBalancer) *LoadBalancerQuery
Where adds a new predicate for the LoadBalancerQuery builder.
func (*LoadBalancerQuery) WithNamedPorts ¶
func (lbq *LoadBalancerQuery) WithNamedPorts(name string, opts ...func(*PortQuery)) *LoadBalancerQuery
WithNamedPorts tells the query-builder to eager-load the nodes that are connected to the "ports" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*LoadBalancerQuery) WithPorts ¶
func (lbq *LoadBalancerQuery) WithPorts(opts ...func(*PortQuery)) *LoadBalancerQuery
WithPorts tells the query-builder to eager-load the nodes that are connected to the "ports" edge. The optional arguments are used to configure the query builder of the edge.
func (*LoadBalancerQuery) WithProvider ¶
func (lbq *LoadBalancerQuery) WithProvider(opts ...func(*ProviderQuery)) *LoadBalancerQuery
WithProvider tells the query-builder to eager-load the nodes that are connected to the "provider" edge. The optional arguments are used to configure the query builder of the edge.
type LoadBalancerSelect ¶
type LoadBalancerSelect struct { *LoadBalancerQuery // contains filtered or unexported fields }
LoadBalancerSelect is the builder for selecting fields of LoadBalancer entities.
func (*LoadBalancerSelect) Aggregate ¶
func (lbs *LoadBalancerSelect) Aggregate(fns ...AggregateFunc) *LoadBalancerSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LoadBalancerSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LoadBalancerSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LoadBalancerSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LoadBalancerSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LoadBalancerSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LoadBalancerSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LoadBalancerSelect) Scan ¶
func (lbs *LoadBalancerSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LoadBalancerSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LoadBalancerUpdate ¶
type LoadBalancerUpdate struct {
// contains filtered or unexported fields
}
LoadBalancerUpdate is the builder for updating LoadBalancer entities.
func (*LoadBalancerUpdate) AddPortIDs ¶
func (lbu *LoadBalancerUpdate) AddPortIDs(ids ...gidx.PrefixedID) *LoadBalancerUpdate
AddPortIDs adds the "ports" edge to the Port entity by IDs.
func (*LoadBalancerUpdate) AddPorts ¶
func (lbu *LoadBalancerUpdate) AddPorts(p ...*Port) *LoadBalancerUpdate
AddPorts adds the "ports" edges to the Port entity.
func (*LoadBalancerUpdate) ClearPorts ¶
func (lbu *LoadBalancerUpdate) ClearPorts() *LoadBalancerUpdate
ClearPorts clears all "ports" edges to the Port entity.
func (*LoadBalancerUpdate) Exec ¶
func (lbu *LoadBalancerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LoadBalancerUpdate) ExecX ¶
func (lbu *LoadBalancerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LoadBalancerUpdate) Mutation ¶
func (lbu *LoadBalancerUpdate) Mutation() *LoadBalancerMutation
Mutation returns the LoadBalancerMutation object of the builder.
func (*LoadBalancerUpdate) RemovePortIDs ¶
func (lbu *LoadBalancerUpdate) RemovePortIDs(ids ...gidx.PrefixedID) *LoadBalancerUpdate
RemovePortIDs removes the "ports" edge to Port entities by IDs.
func (*LoadBalancerUpdate) RemovePorts ¶
func (lbu *LoadBalancerUpdate) RemovePorts(p ...*Port) *LoadBalancerUpdate
RemovePorts removes "ports" edges to Port entities.
func (*LoadBalancerUpdate) Save ¶
func (lbu *LoadBalancerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LoadBalancerUpdate) SaveX ¶
func (lbu *LoadBalancerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LoadBalancerUpdate) SetInput ¶
func (c *LoadBalancerUpdate) SetInput(i UpdateLoadBalancerInput) *LoadBalancerUpdate
SetInput applies the change-set in the UpdateLoadBalancerInput on the LoadBalancerUpdate builder.
func (*LoadBalancerUpdate) SetName ¶
func (lbu *LoadBalancerUpdate) SetName(s string) *LoadBalancerUpdate
SetName sets the "name" field.
func (*LoadBalancerUpdate) Where ¶
func (lbu *LoadBalancerUpdate) Where(ps ...predicate.LoadBalancer) *LoadBalancerUpdate
Where appends a list predicates to the LoadBalancerUpdate builder.
type LoadBalancerUpdateOne ¶
type LoadBalancerUpdateOne struct {
// contains filtered or unexported fields
}
LoadBalancerUpdateOne is the builder for updating a single LoadBalancer entity.
func (*LoadBalancerUpdateOne) AddPortIDs ¶
func (lbuo *LoadBalancerUpdateOne) AddPortIDs(ids ...gidx.PrefixedID) *LoadBalancerUpdateOne
AddPortIDs adds the "ports" edge to the Port entity by IDs.
func (*LoadBalancerUpdateOne) AddPorts ¶
func (lbuo *LoadBalancerUpdateOne) AddPorts(p ...*Port) *LoadBalancerUpdateOne
AddPorts adds the "ports" edges to the Port entity.
func (*LoadBalancerUpdateOne) ClearPorts ¶
func (lbuo *LoadBalancerUpdateOne) ClearPorts() *LoadBalancerUpdateOne
ClearPorts clears all "ports" edges to the Port entity.
func (*LoadBalancerUpdateOne) Exec ¶
func (lbuo *LoadBalancerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LoadBalancerUpdateOne) ExecX ¶
func (lbuo *LoadBalancerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LoadBalancerUpdateOne) Mutation ¶
func (lbuo *LoadBalancerUpdateOne) Mutation() *LoadBalancerMutation
Mutation returns the LoadBalancerMutation object of the builder.
func (*LoadBalancerUpdateOne) RemovePortIDs ¶
func (lbuo *LoadBalancerUpdateOne) RemovePortIDs(ids ...gidx.PrefixedID) *LoadBalancerUpdateOne
RemovePortIDs removes the "ports" edge to Port entities by IDs.
func (*LoadBalancerUpdateOne) RemovePorts ¶
func (lbuo *LoadBalancerUpdateOne) RemovePorts(p ...*Port) *LoadBalancerUpdateOne
RemovePorts removes "ports" edges to Port entities.
func (*LoadBalancerUpdateOne) Save ¶
func (lbuo *LoadBalancerUpdateOne) Save(ctx context.Context) (*LoadBalancer, error)
Save executes the query and returns the updated LoadBalancer entity.
func (*LoadBalancerUpdateOne) SaveX ¶
func (lbuo *LoadBalancerUpdateOne) SaveX(ctx context.Context) *LoadBalancer
SaveX is like Save, but panics if an error occurs.
func (*LoadBalancerUpdateOne) Select ¶
func (lbuo *LoadBalancerUpdateOne) Select(field string, fields ...string) *LoadBalancerUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LoadBalancerUpdateOne) SetInput ¶
func (c *LoadBalancerUpdateOne) SetInput(i UpdateLoadBalancerInput) *LoadBalancerUpdateOne
SetInput applies the change-set in the UpdateLoadBalancerInput on the LoadBalancerUpdateOne builder.
func (*LoadBalancerUpdateOne) SetName ¶
func (lbuo *LoadBalancerUpdateOne) SetName(s string) *LoadBalancerUpdateOne
SetName sets the "name" field.
func (*LoadBalancerUpdateOne) Where ¶
func (lbuo *LoadBalancerUpdateOne) Where(ps ...predicate.LoadBalancer) *LoadBalancerUpdateOne
Where appends a list predicates to the LoadBalancerUpdate builder.
type LoadBalancerWhereInput ¶
type LoadBalancerWhereInput struct { Predicates []predicate.LoadBalancer `json:"-"` Not *LoadBalancerWhereInput `json:"not,omitempty"` Or []*LoadBalancerWhereInput `json:"or,omitempty"` And []*LoadBalancerWhereInput `json:"and,omitempty"` // "id" field predicates. ID *gidx.PrefixedID `json:"id,omitempty"` IDNEQ *gidx.PrefixedID `json:"idNEQ,omitempty"` IDIn []gidx.PrefixedID `json:"idIn,omitempty"` IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"` IDGT *gidx.PrefixedID `json:"idGT,omitempty"` IDGTE *gidx.PrefixedID `json:"idGTE,omitempty"` IDLT *gidx.PrefixedID `json:"idLT,omitempty"` IDLTE *gidx.PrefixedID `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "ports" edge predicates. HasPorts *bool `json:"hasPorts,omitempty"` HasPortsWith []*LoadBalancerPortWhereInput `json:"hasPortsWith,omitempty"` // "provider" edge predicates. HasProvider *bool `json:"hasProvider,omitempty"` HasProviderWith []*LoadBalancerProviderWhereInput `json:"hasProviderWith,omitempty"` }
LoadBalancerWhereInput represents a where input for filtering LoadBalancer queries.
func (*LoadBalancerWhereInput) AddPredicates ¶
func (i *LoadBalancerWhereInput) AddPredicates(predicates ...predicate.LoadBalancer)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*LoadBalancerWhereInput) Filter ¶
func (i *LoadBalancerWhereInput) Filter(q *LoadBalancerQuery) (*LoadBalancerQuery, error)
Filter applies the LoadBalancerWhereInput filter on the LoadBalancerQuery builder.
func (*LoadBalancerWhereInput) P ¶
func (i *LoadBalancerWhereInput) P() (predicate.LoadBalancer, error)
P returns a predicate for filtering loadbalancers. An error is returned if the input is empty or invalid.
type LoadBalancers ¶
type LoadBalancers []*LoadBalancer
LoadBalancers is a parsable slice of LoadBalancer.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
func WithNodeType(f func(context.Context, gidx.PrefixedID) (string, error)) NodeOption
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Option ¶
type Option func(*config)
Option function to configure the client.
func EventsPublisher ¶ added in v0.0.18
EventsPublisher configures the EventsPublisher.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Origin ¶
type Origin struct { // ID of the ent. ID gidx.PrefixedID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Target holds the value of the "target" field. Target string `json:"target,omitempty"` // PortNumber holds the value of the "port_number" field. PortNumber int `json:"port_number,omitempty"` // Active holds the value of the "active" field. Active bool `json:"active,omitempty"` // PoolID holds the value of the "pool_id" field. PoolID gidx.PrefixedID `json:"pool_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OriginQuery when eager-loading is set. Edges OriginEdges `json:"edges"` // contains filtered or unexported fields }
Origin is the model entity for the Origin schema.
func (*Origin) IsNode ¶
func (n *Origin) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Origin) Unwrap ¶
Unwrap unwraps the Origin 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 (*Origin) Update ¶
func (o *Origin) Update() *OriginUpdateOne
Update returns a builder for updating this Origin. Note that you need to call Origin.Unwrap() before calling this method if this Origin was returned from a transaction, and the transaction was committed or rolled back.
type OriginClient ¶
type OriginClient struct {
// contains filtered or unexported fields
}
OriginClient is a client for the Origin schema.
func NewOriginClient ¶
func NewOriginClient(c config) *OriginClient
NewOriginClient returns a client for the Origin from the given config.
func (*OriginClient) Create ¶
func (c *OriginClient) Create() *OriginCreate
Create returns a builder for creating a Origin entity.
func (*OriginClient) CreateBulk ¶
func (c *OriginClient) CreateBulk(builders ...*OriginCreate) *OriginCreateBulk
CreateBulk returns a builder for creating a bulk of Origin entities.
func (*OriginClient) Delete ¶
func (c *OriginClient) Delete() *OriginDelete
Delete returns a delete builder for Origin.
func (*OriginClient) DeleteOne ¶
func (c *OriginClient) DeleteOne(o *Origin) *OriginDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OriginClient) DeleteOneID ¶
func (c *OriginClient) DeleteOneID(id gidx.PrefixedID) *OriginDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OriginClient) Get ¶
func (c *OriginClient) Get(ctx context.Context, id gidx.PrefixedID) (*Origin, error)
Get returns a Origin entity by its id.
func (*OriginClient) GetX ¶
func (c *OriginClient) GetX(ctx context.Context, id gidx.PrefixedID) *Origin
GetX is like Get, but panics if an error occurs.
func (*OriginClient) Intercept ¶
func (c *OriginClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `origin.Intercept(f(g(h())))`.
func (*OriginClient) Interceptors ¶
func (c *OriginClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OriginClient) Query ¶
func (c *OriginClient) Query() *OriginQuery
Query returns a query builder for Origin.
func (*OriginClient) QueryPool ¶
func (c *OriginClient) QueryPool(o *Origin) *PoolQuery
QueryPool queries the pool edge of a Origin.
func (*OriginClient) Update ¶
func (c *OriginClient) Update() *OriginUpdate
Update returns an update builder for Origin.
func (*OriginClient) UpdateOne ¶
func (c *OriginClient) UpdateOne(o *Origin) *OriginUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OriginClient) UpdateOneID ¶
func (c *OriginClient) UpdateOneID(id gidx.PrefixedID) *OriginUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OriginClient) Use ¶
func (c *OriginClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `origin.Hooks(f(g(h())))`.
type OriginCreate ¶
type OriginCreate struct {
// contains filtered or unexported fields
}
OriginCreate is the builder for creating a Origin entity.
func (*OriginCreate) Exec ¶
func (oc *OriginCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OriginCreate) ExecX ¶
func (oc *OriginCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OriginCreate) Mutation ¶
func (oc *OriginCreate) Mutation() *OriginMutation
Mutation returns the OriginMutation object of the builder.
func (*OriginCreate) Save ¶
func (oc *OriginCreate) Save(ctx context.Context) (*Origin, error)
Save creates the Origin in the database.
func (*OriginCreate) SaveX ¶
func (oc *OriginCreate) SaveX(ctx context.Context) *Origin
SaveX calls Save and panics if Save returns an error.
func (*OriginCreate) SetActive ¶
func (oc *OriginCreate) SetActive(b bool) *OriginCreate
SetActive sets the "active" field.
func (*OriginCreate) SetCreatedAt ¶
func (oc *OriginCreate) SetCreatedAt(t time.Time) *OriginCreate
SetCreatedAt sets the "created_at" field.
func (*OriginCreate) SetID ¶
func (oc *OriginCreate) SetID(gi gidx.PrefixedID) *OriginCreate
SetID sets the "id" field.
func (*OriginCreate) SetInput ¶
func (c *OriginCreate) SetInput(i CreateLoadBalancerOriginInput) *OriginCreate
SetInput applies the change-set in the CreateLoadBalancerOriginInput on the OriginCreate builder.
func (*OriginCreate) SetName ¶
func (oc *OriginCreate) SetName(s string) *OriginCreate
SetName sets the "name" field.
func (*OriginCreate) SetNillableActive ¶
func (oc *OriginCreate) SetNillableActive(b *bool) *OriginCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*OriginCreate) SetNillableCreatedAt ¶
func (oc *OriginCreate) SetNillableCreatedAt(t *time.Time) *OriginCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OriginCreate) SetNillableID ¶
func (oc *OriginCreate) SetNillableID(gi *gidx.PrefixedID) *OriginCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*OriginCreate) SetNillableUpdatedAt ¶
func (oc *OriginCreate) SetNillableUpdatedAt(t *time.Time) *OriginCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OriginCreate) SetPool ¶
func (oc *OriginCreate) SetPool(p *Pool) *OriginCreate
SetPool sets the "pool" edge to the Pool entity.
func (*OriginCreate) SetPoolID ¶
func (oc *OriginCreate) SetPoolID(gi gidx.PrefixedID) *OriginCreate
SetPoolID sets the "pool_id" field.
func (*OriginCreate) SetPortNumber ¶
func (oc *OriginCreate) SetPortNumber(i int) *OriginCreate
SetPortNumber sets the "port_number" field.
func (*OriginCreate) SetTarget ¶
func (oc *OriginCreate) SetTarget(s string) *OriginCreate
SetTarget sets the "target" field.
func (*OriginCreate) SetUpdatedAt ¶
func (oc *OriginCreate) SetUpdatedAt(t time.Time) *OriginCreate
SetUpdatedAt sets the "updated_at" field.
type OriginCreateBulk ¶
type OriginCreateBulk struct {
// contains filtered or unexported fields
}
OriginCreateBulk is the builder for creating many Origin entities in bulk.
func (*OriginCreateBulk) Exec ¶
func (ocb *OriginCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OriginCreateBulk) ExecX ¶
func (ocb *OriginCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OriginDelete ¶
type OriginDelete struct {
// contains filtered or unexported fields
}
OriginDelete is the builder for deleting a Origin entity.
func (*OriginDelete) Exec ¶
func (od *OriginDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OriginDelete) ExecX ¶
func (od *OriginDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OriginDelete) Where ¶
func (od *OriginDelete) Where(ps ...predicate.Origin) *OriginDelete
Where appends a list predicates to the OriginDelete builder.
type OriginDeleteOne ¶
type OriginDeleteOne struct {
// contains filtered or unexported fields
}
OriginDeleteOne is the builder for deleting a single Origin entity.
func (*OriginDeleteOne) Exec ¶
func (odo *OriginDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OriginDeleteOne) ExecX ¶
func (odo *OriginDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OriginDeleteOne) Where ¶
func (odo *OriginDeleteOne) Where(ps ...predicate.Origin) *OriginDeleteOne
Where appends a list predicates to the OriginDelete builder.
type OriginEdges ¶
type OriginEdges struct { // Pool holds the value of the pool edge. Pool *Pool `json:"pool,omitempty"` // contains filtered or unexported fields }
OriginEdges holds the relations/edges for other nodes in the graph.
func (OriginEdges) PoolOrErr ¶
func (e OriginEdges) PoolOrErr() (*Pool, error)
PoolOrErr returns the Pool value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type OriginGroupBy ¶
type OriginGroupBy struct {
// contains filtered or unexported fields
}
OriginGroupBy is the group-by builder for Origin entities.
func (*OriginGroupBy) Aggregate ¶
func (ogb *OriginGroupBy) Aggregate(fns ...AggregateFunc) *OriginGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OriginGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OriginGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OriginGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OriginGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OriginGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OriginGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OriginGroupBy) Scan ¶
func (ogb *OriginGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OriginGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OriginMutation ¶
type OriginMutation struct {
// contains filtered or unexported fields
}
OriginMutation represents an operation that mutates the Origin nodes in the graph.
func (*OriginMutation) Active ¶
func (m *OriginMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*OriginMutation) AddField ¶
func (m *OriginMutation) 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 (*OriginMutation) AddPortNumber ¶
func (m *OriginMutation) AddPortNumber(i int)
AddPortNumber adds i to the "port_number" field.
func (*OriginMutation) AddedEdges ¶
func (m *OriginMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OriginMutation) AddedField ¶
func (m *OriginMutation) 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 (*OriginMutation) AddedFields ¶
func (m *OriginMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OriginMutation) AddedIDs ¶
func (m *OriginMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OriginMutation) AddedPortNumber ¶
func (m *OriginMutation) AddedPortNumber() (r int, exists bool)
AddedPortNumber returns the value that was added to the "port_number" field in this mutation.
func (*OriginMutation) ClearEdge ¶
func (m *OriginMutation) 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 (*OriginMutation) ClearField ¶
func (m *OriginMutation) 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 (*OriginMutation) ClearPool ¶
func (m *OriginMutation) ClearPool()
ClearPool clears the "pool" edge to the Pool entity.
func (*OriginMutation) ClearedEdges ¶
func (m *OriginMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OriginMutation) ClearedFields ¶
func (m *OriginMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OriginMutation) Client ¶
func (m OriginMutation) 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 (*OriginMutation) CreatedAt ¶
func (m *OriginMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OriginMutation) EdgeCleared ¶
func (m *OriginMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OriginMutation) Field ¶
func (m *OriginMutation) 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 (*OriginMutation) FieldCleared ¶
func (m *OriginMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OriginMutation) Fields ¶
func (m *OriginMutation) 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 (*OriginMutation) ID ¶
func (m *OriginMutation) ID() (id gidx.PrefixedID, 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 (*OriginMutation) IDs ¶
func (m *OriginMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, 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 (*OriginMutation) Name ¶
func (m *OriginMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*OriginMutation) OldActive ¶
func (m *OriginMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the Origin entity. If the Origin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OriginMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Origin entity. If the Origin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OriginMutation) 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 (*OriginMutation) OldName ¶
func (m *OriginMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Origin entity. If the Origin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OriginMutation) OldPoolID ¶
func (m *OriginMutation) OldPoolID(ctx context.Context) (v gidx.PrefixedID, err error)
OldPoolID returns the old "pool_id" field's value of the Origin entity. If the Origin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OriginMutation) OldPortNumber ¶
func (m *OriginMutation) OldPortNumber(ctx context.Context) (v int, err error)
OldPortNumber returns the old "port_number" field's value of the Origin entity. If the Origin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OriginMutation) OldTarget ¶
func (m *OriginMutation) OldTarget(ctx context.Context) (v string, err error)
OldTarget returns the old "target" field's value of the Origin entity. If the Origin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OriginMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Origin entity. If the Origin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OriginMutation) PoolCleared ¶
func (m *OriginMutation) PoolCleared() bool
PoolCleared reports if the "pool" edge to the Pool entity was cleared.
func (*OriginMutation) PoolID ¶
func (m *OriginMutation) PoolID() (r gidx.PrefixedID, exists bool)
PoolID returns the value of the "pool_id" field in the mutation.
func (*OriginMutation) PoolIDs ¶
func (m *OriginMutation) PoolIDs() (ids []gidx.PrefixedID)
PoolIDs returns the "pool" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PoolID instead. It exists only for internal usage by the builders.
func (*OriginMutation) PortNumber ¶
func (m *OriginMutation) PortNumber() (r int, exists bool)
PortNumber returns the value of the "port_number" field in the mutation.
func (*OriginMutation) RemovedEdges ¶
func (m *OriginMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OriginMutation) RemovedIDs ¶
func (m *OriginMutation) 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 (*OriginMutation) ResetActive ¶
func (m *OriginMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*OriginMutation) ResetCreatedAt ¶
func (m *OriginMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OriginMutation) ResetEdge ¶
func (m *OriginMutation) 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 (*OriginMutation) ResetField ¶
func (m *OriginMutation) 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 (*OriginMutation) ResetName ¶
func (m *OriginMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*OriginMutation) ResetPool ¶
func (m *OriginMutation) ResetPool()
ResetPool resets all changes to the "pool" edge.
func (*OriginMutation) ResetPoolID ¶
func (m *OriginMutation) ResetPoolID()
ResetPoolID resets all changes to the "pool_id" field.
func (*OriginMutation) ResetPortNumber ¶
func (m *OriginMutation) ResetPortNumber()
ResetPortNumber resets all changes to the "port_number" field.
func (*OriginMutation) ResetTarget ¶
func (m *OriginMutation) ResetTarget()
ResetTarget resets all changes to the "target" field.
func (*OriginMutation) ResetUpdatedAt ¶
func (m *OriginMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OriginMutation) SetActive ¶
func (m *OriginMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*OriginMutation) SetCreatedAt ¶
func (m *OriginMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OriginMutation) SetField ¶
func (m *OriginMutation) 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 (*OriginMutation) SetID ¶
func (m *OriginMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Origin entities.
func (*OriginMutation) SetName ¶
func (m *OriginMutation) SetName(s string)
SetName sets the "name" field.
func (*OriginMutation) SetOp ¶
func (m *OriginMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OriginMutation) SetPoolID ¶
func (m *OriginMutation) SetPoolID(gi gidx.PrefixedID)
SetPoolID sets the "pool_id" field.
func (*OriginMutation) SetPortNumber ¶
func (m *OriginMutation) SetPortNumber(i int)
SetPortNumber sets the "port_number" field.
func (*OriginMutation) SetTarget ¶
func (m *OriginMutation) SetTarget(s string)
SetTarget sets the "target" field.
func (*OriginMutation) SetUpdatedAt ¶
func (m *OriginMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OriginMutation) Target ¶
func (m *OriginMutation) Target() (r string, exists bool)
Target returns the value of the "target" field in the mutation.
func (OriginMutation) Tx ¶
func (m OriginMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OriginMutation) Type ¶
func (m *OriginMutation) Type() string
Type returns the node type of this mutation (Origin).
func (*OriginMutation) UpdatedAt ¶
func (m *OriginMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OriginMutation) Where ¶
func (m *OriginMutation) Where(ps ...predicate.Origin)
Where appends a list predicates to the OriginMutation builder.
func (*OriginMutation) WhereP ¶
func (m *OriginMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OriginMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OriginQuery ¶
type OriginQuery struct {
// contains filtered or unexported fields
}
OriginQuery is the builder for querying Origin entities.
func (*OriginQuery) Aggregate ¶
func (oq *OriginQuery) Aggregate(fns ...AggregateFunc) *OriginSelect
Aggregate returns a OriginSelect configured with the given aggregations.
func (*OriginQuery) All ¶
func (oq *OriginQuery) All(ctx context.Context) ([]*Origin, error)
All executes the query and returns a list of Origins.
func (*OriginQuery) AllX ¶
func (oq *OriginQuery) AllX(ctx context.Context) []*Origin
AllX is like All, but panics if an error occurs.
func (*OriginQuery) Clone ¶
func (oq *OriginQuery) Clone() *OriginQuery
Clone returns a duplicate of the OriginQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OriginQuery) CollectFields ¶
func (o *OriginQuery) CollectFields(ctx context.Context, satisfies ...string) (*OriginQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*OriginQuery) Count ¶
func (oq *OriginQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OriginQuery) CountX ¶
func (oq *OriginQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OriginQuery) Exist ¶
func (oq *OriginQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OriginQuery) ExistX ¶
func (oq *OriginQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OriginQuery) First ¶
func (oq *OriginQuery) First(ctx context.Context) (*Origin, error)
First returns the first Origin entity from the query. Returns a *NotFoundError when no Origin was found.
func (*OriginQuery) FirstID ¶
func (oq *OriginQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first Origin ID from the query. Returns a *NotFoundError when no Origin ID was found.
func (*OriginQuery) FirstIDX ¶
func (oq *OriginQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*OriginQuery) FirstX ¶
func (oq *OriginQuery) FirstX(ctx context.Context) *Origin
FirstX is like First, but panics if an error occurs.
func (*OriginQuery) GroupBy ¶
func (oq *OriginQuery) GroupBy(field string, fields ...string) *OriginGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Origin.Query(). GroupBy(origin.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*OriginQuery) IDs ¶
func (oq *OriginQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of Origin IDs.
func (*OriginQuery) IDsX ¶
func (oq *OriginQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*OriginQuery) Limit ¶
func (oq *OriginQuery) Limit(limit int) *OriginQuery
Limit the number of records to be returned by this query.
func (*OriginQuery) Offset ¶
func (oq *OriginQuery) Offset(offset int) *OriginQuery
Offset to start from.
func (*OriginQuery) Only ¶
func (oq *OriginQuery) Only(ctx context.Context) (*Origin, error)
Only returns a single Origin entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Origin entity is found. Returns a *NotFoundError when no Origin entities are found.
func (*OriginQuery) OnlyID ¶
func (oq *OriginQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only Origin ID in the query. Returns a *NotSingularError when more than one Origin ID is found. Returns a *NotFoundError when no entities are found.
func (*OriginQuery) OnlyIDX ¶
func (oq *OriginQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OriginQuery) OnlyX ¶
func (oq *OriginQuery) OnlyX(ctx context.Context) *Origin
OnlyX is like Only, but panics if an error occurs.
func (*OriginQuery) Order ¶
func (oq *OriginQuery) Order(o ...origin.OrderOption) *OriginQuery
Order specifies how the records should be ordered.
func (*OriginQuery) Paginate ¶
func (o *OriginQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...LoadBalancerOriginPaginateOption, ) (*LoadBalancerOriginConnection, error)
Paginate executes the query and returns a relay based cursor connection to LoadBalancerOrigin.
func (*OriginQuery) QueryPool ¶
func (oq *OriginQuery) QueryPool() *PoolQuery
QueryPool chains the current query on the "pool" edge.
func (*OriginQuery) Select ¶
func (oq *OriginQuery) Select(fields ...string) *OriginSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Origin.Query(). Select(origin.FieldCreatedAt). Scan(ctx, &v)
func (*OriginQuery) Unique ¶
func (oq *OriginQuery) Unique(unique bool) *OriginQuery
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 (*OriginQuery) Where ¶
func (oq *OriginQuery) Where(ps ...predicate.Origin) *OriginQuery
Where adds a new predicate for the OriginQuery builder.
func (*OriginQuery) WithPool ¶
func (oq *OriginQuery) WithPool(opts ...func(*PoolQuery)) *OriginQuery
WithPool tells the query-builder to eager-load the nodes that are connected to the "pool" edge. The optional arguments are used to configure the query builder of the edge.
type OriginSelect ¶
type OriginSelect struct { *OriginQuery // contains filtered or unexported fields }
OriginSelect is the builder for selecting fields of Origin entities.
func (*OriginSelect) Aggregate ¶
func (os *OriginSelect) Aggregate(fns ...AggregateFunc) *OriginSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OriginSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OriginSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OriginSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OriginSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OriginSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OriginSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OriginSelect) Scan ¶
func (os *OriginSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OriginSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OriginUpdate ¶
type OriginUpdate struct {
// contains filtered or unexported fields
}
OriginUpdate is the builder for updating Origin entities.
func (*OriginUpdate) AddPortNumber ¶
func (ou *OriginUpdate) AddPortNumber(i int) *OriginUpdate
AddPortNumber adds i to the "port_number" field.
func (*OriginUpdate) Exec ¶
func (ou *OriginUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OriginUpdate) ExecX ¶
func (ou *OriginUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OriginUpdate) Mutation ¶
func (ou *OriginUpdate) Mutation() *OriginMutation
Mutation returns the OriginMutation object of the builder.
func (*OriginUpdate) Save ¶
func (ou *OriginUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OriginUpdate) SaveX ¶
func (ou *OriginUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OriginUpdate) SetActive ¶
func (ou *OriginUpdate) SetActive(b bool) *OriginUpdate
SetActive sets the "active" field.
func (*OriginUpdate) SetInput ¶
func (c *OriginUpdate) SetInput(i UpdateLoadBalancerOriginInput) *OriginUpdate
SetInput applies the change-set in the UpdateLoadBalancerOriginInput on the OriginUpdate builder.
func (*OriginUpdate) SetName ¶
func (ou *OriginUpdate) SetName(s string) *OriginUpdate
SetName sets the "name" field.
func (*OriginUpdate) SetNillableActive ¶
func (ou *OriginUpdate) SetNillableActive(b *bool) *OriginUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*OriginUpdate) SetPortNumber ¶
func (ou *OriginUpdate) SetPortNumber(i int) *OriginUpdate
SetPortNumber sets the "port_number" field.
func (*OriginUpdate) SetTarget ¶
func (ou *OriginUpdate) SetTarget(s string) *OriginUpdate
SetTarget sets the "target" field.
func (*OriginUpdate) Where ¶
func (ou *OriginUpdate) Where(ps ...predicate.Origin) *OriginUpdate
Where appends a list predicates to the OriginUpdate builder.
type OriginUpdateOne ¶
type OriginUpdateOne struct {
// contains filtered or unexported fields
}
OriginUpdateOne is the builder for updating a single Origin entity.
func (*OriginUpdateOne) AddPortNumber ¶
func (ouo *OriginUpdateOne) AddPortNumber(i int) *OriginUpdateOne
AddPortNumber adds i to the "port_number" field.
func (*OriginUpdateOne) Exec ¶
func (ouo *OriginUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OriginUpdateOne) ExecX ¶
func (ouo *OriginUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OriginUpdateOne) Mutation ¶
func (ouo *OriginUpdateOne) Mutation() *OriginMutation
Mutation returns the OriginMutation object of the builder.
func (*OriginUpdateOne) Save ¶
func (ouo *OriginUpdateOne) Save(ctx context.Context) (*Origin, error)
Save executes the query and returns the updated Origin entity.
func (*OriginUpdateOne) SaveX ¶
func (ouo *OriginUpdateOne) SaveX(ctx context.Context) *Origin
SaveX is like Save, but panics if an error occurs.
func (*OriginUpdateOne) Select ¶
func (ouo *OriginUpdateOne) Select(field string, fields ...string) *OriginUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OriginUpdateOne) SetActive ¶
func (ouo *OriginUpdateOne) SetActive(b bool) *OriginUpdateOne
SetActive sets the "active" field.
func (*OriginUpdateOne) SetInput ¶
func (c *OriginUpdateOne) SetInput(i UpdateLoadBalancerOriginInput) *OriginUpdateOne
SetInput applies the change-set in the UpdateLoadBalancerOriginInput on the OriginUpdateOne builder.
func (*OriginUpdateOne) SetName ¶
func (ouo *OriginUpdateOne) SetName(s string) *OriginUpdateOne
SetName sets the "name" field.
func (*OriginUpdateOne) SetNillableActive ¶
func (ouo *OriginUpdateOne) SetNillableActive(b *bool) *OriginUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*OriginUpdateOne) SetPortNumber ¶
func (ouo *OriginUpdateOne) SetPortNumber(i int) *OriginUpdateOne
SetPortNumber sets the "port_number" field.
func (*OriginUpdateOne) SetTarget ¶
func (ouo *OriginUpdateOne) SetTarget(s string) *OriginUpdateOne
SetTarget sets the "target" field.
func (*OriginUpdateOne) Where ¶
func (ouo *OriginUpdateOne) Where(ps ...predicate.Origin) *OriginUpdateOne
Where appends a list predicates to the OriginUpdate builder.
type Pool ¶
type Pool struct { // ID of the ent. ID gidx.PrefixedID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Protocol holds the value of the "protocol" field. Protocol pool.Protocol `json:"protocol,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID gidx.PrefixedID `json:"owner_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PoolQuery when eager-loading is set. Edges PoolEdges `json:"edges"` // contains filtered or unexported fields }
Pool is the model entity for the Pool schema.
func (*Pool) IsNode ¶
func (n *Pool) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Pool) NamedOrigins ¶
NamedOrigins returns the Origins named value or an error if the edge was not loaded in eager-loading with this name.
func (*Pool) NamedPorts ¶
NamedPorts returns the Ports named value or an error if the edge was not loaded in eager-loading with this name.
func (*Pool) Origins ¶
func (po *Pool) Origins( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *LoadBalancerOriginOrder, where *LoadBalancerOriginWhereInput, ) (*LoadBalancerOriginConnection, error)
func (*Pool) QueryOrigins ¶
func (po *Pool) QueryOrigins() *OriginQuery
QueryOrigins queries the "origins" edge of the Pool entity.
func (*Pool) QueryPorts ¶
QueryPorts queries the "ports" edge of the Pool entity.
func (*Pool) Unwrap ¶
Unwrap unwraps the Pool 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 (*Pool) Update ¶
func (po *Pool) Update() *PoolUpdateOne
Update returns a builder for updating this Pool. Note that you need to call Pool.Unwrap() before calling this method if this Pool was returned from a transaction, and the transaction was committed or rolled back.
type PoolClient ¶
type PoolClient struct {
// contains filtered or unexported fields
}
PoolClient is a client for the Pool schema.
func NewPoolClient ¶
func NewPoolClient(c config) *PoolClient
NewPoolClient returns a client for the Pool from the given config.
func (*PoolClient) Create ¶
func (c *PoolClient) Create() *PoolCreate
Create returns a builder for creating a Pool entity.
func (*PoolClient) CreateBulk ¶
func (c *PoolClient) CreateBulk(builders ...*PoolCreate) *PoolCreateBulk
CreateBulk returns a builder for creating a bulk of Pool entities.
func (*PoolClient) Delete ¶
func (c *PoolClient) Delete() *PoolDelete
Delete returns a delete builder for Pool.
func (*PoolClient) DeleteOne ¶
func (c *PoolClient) DeleteOne(po *Pool) *PoolDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PoolClient) DeleteOneID ¶
func (c *PoolClient) DeleteOneID(id gidx.PrefixedID) *PoolDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PoolClient) Get ¶
func (c *PoolClient) Get(ctx context.Context, id gidx.PrefixedID) (*Pool, error)
Get returns a Pool entity by its id.
func (*PoolClient) GetX ¶
func (c *PoolClient) GetX(ctx context.Context, id gidx.PrefixedID) *Pool
GetX is like Get, but panics if an error occurs.
func (*PoolClient) Intercept ¶
func (c *PoolClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `pool.Intercept(f(g(h())))`.
func (*PoolClient) Interceptors ¶
func (c *PoolClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PoolClient) Query ¶
func (c *PoolClient) Query() *PoolQuery
Query returns a query builder for Pool.
func (*PoolClient) QueryOrigins ¶
func (c *PoolClient) QueryOrigins(po *Pool) *OriginQuery
QueryOrigins queries the origins edge of a Pool.
func (*PoolClient) QueryPorts ¶
func (c *PoolClient) QueryPorts(po *Pool) *PortQuery
QueryPorts queries the ports edge of a Pool.
func (*PoolClient) Update ¶
func (c *PoolClient) Update() *PoolUpdate
Update returns an update builder for Pool.
func (*PoolClient) UpdateOne ¶
func (c *PoolClient) UpdateOne(po *Pool) *PoolUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PoolClient) UpdateOneID ¶
func (c *PoolClient) UpdateOneID(id gidx.PrefixedID) *PoolUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PoolClient) Use ¶
func (c *PoolClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `pool.Hooks(f(g(h())))`.
type PoolCreate ¶
type PoolCreate struct {
// contains filtered or unexported fields
}
PoolCreate is the builder for creating a Pool entity.
func (*PoolCreate) AddOriginIDs ¶
func (pc *PoolCreate) AddOriginIDs(ids ...gidx.PrefixedID) *PoolCreate
AddOriginIDs adds the "origins" edge to the Origin entity by IDs.
func (*PoolCreate) AddOrigins ¶
func (pc *PoolCreate) AddOrigins(o ...*Origin) *PoolCreate
AddOrigins adds the "origins" edges to the Origin entity.
func (*PoolCreate) AddPortIDs ¶
func (pc *PoolCreate) AddPortIDs(ids ...gidx.PrefixedID) *PoolCreate
AddPortIDs adds the "ports" edge to the Port entity by IDs.
func (*PoolCreate) AddPorts ¶
func (pc *PoolCreate) AddPorts(p ...*Port) *PoolCreate
AddPorts adds the "ports" edges to the Port entity.
func (*PoolCreate) Exec ¶
func (pc *PoolCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PoolCreate) ExecX ¶
func (pc *PoolCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolCreate) Mutation ¶
func (pc *PoolCreate) Mutation() *PoolMutation
Mutation returns the PoolMutation object of the builder.
func (*PoolCreate) Save ¶
func (pc *PoolCreate) Save(ctx context.Context) (*Pool, error)
Save creates the Pool in the database.
func (*PoolCreate) SaveX ¶
func (pc *PoolCreate) SaveX(ctx context.Context) *Pool
SaveX calls Save and panics if Save returns an error.
func (*PoolCreate) SetCreatedAt ¶
func (pc *PoolCreate) SetCreatedAt(t time.Time) *PoolCreate
SetCreatedAt sets the "created_at" field.
func (*PoolCreate) SetID ¶
func (pc *PoolCreate) SetID(gi gidx.PrefixedID) *PoolCreate
SetID sets the "id" field.
func (*PoolCreate) SetInput ¶
func (c *PoolCreate) SetInput(i CreateLoadBalancerPoolInput) *PoolCreate
SetInput applies the change-set in the CreateLoadBalancerPoolInput on the PoolCreate builder.
func (*PoolCreate) SetName ¶
func (pc *PoolCreate) SetName(s string) *PoolCreate
SetName sets the "name" field.
func (*PoolCreate) SetNillableCreatedAt ¶
func (pc *PoolCreate) SetNillableCreatedAt(t *time.Time) *PoolCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PoolCreate) SetNillableID ¶
func (pc *PoolCreate) SetNillableID(gi *gidx.PrefixedID) *PoolCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PoolCreate) SetNillableUpdatedAt ¶
func (pc *PoolCreate) SetNillableUpdatedAt(t *time.Time) *PoolCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PoolCreate) SetOwnerID ¶ added in v0.0.18
func (pc *PoolCreate) SetOwnerID(gi gidx.PrefixedID) *PoolCreate
SetOwnerID sets the "owner_id" field.
func (*PoolCreate) SetProtocol ¶
func (pc *PoolCreate) SetProtocol(po pool.Protocol) *PoolCreate
SetProtocol sets the "protocol" field.
func (*PoolCreate) SetUpdatedAt ¶
func (pc *PoolCreate) SetUpdatedAt(t time.Time) *PoolCreate
SetUpdatedAt sets the "updated_at" field.
type PoolCreateBulk ¶
type PoolCreateBulk struct {
// contains filtered or unexported fields
}
PoolCreateBulk is the builder for creating many Pool entities in bulk.
func (*PoolCreateBulk) Exec ¶
func (pcb *PoolCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PoolCreateBulk) ExecX ¶
func (pcb *PoolCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PoolDelete ¶
type PoolDelete struct {
// contains filtered or unexported fields
}
PoolDelete is the builder for deleting a Pool entity.
func (*PoolDelete) Exec ¶
func (pd *PoolDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PoolDelete) ExecX ¶
func (pd *PoolDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PoolDelete) Where ¶
func (pd *PoolDelete) Where(ps ...predicate.Pool) *PoolDelete
Where appends a list predicates to the PoolDelete builder.
type PoolDeleteOne ¶
type PoolDeleteOne struct {
// contains filtered or unexported fields
}
PoolDeleteOne is the builder for deleting a single Pool entity.
func (*PoolDeleteOne) Exec ¶
func (pdo *PoolDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PoolDeleteOne) ExecX ¶
func (pdo *PoolDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolDeleteOne) Where ¶
func (pdo *PoolDeleteOne) Where(ps ...predicate.Pool) *PoolDeleteOne
Where appends a list predicates to the PoolDelete builder.
type PoolEdges ¶
type PoolEdges struct { // Ports holds the value of the ports edge. Ports []*Port `json:"ports,omitempty"` // Origins holds the value of the origins edge. Origins []*Origin `json:"origins,omitempty"` // contains filtered or unexported fields }
PoolEdges holds the relations/edges for other nodes in the graph.
func (PoolEdges) OriginsOrErr ¶
OriginsOrErr returns the Origins value or an error if the edge was not loaded in eager-loading.
func (PoolEdges) PortsOrErr ¶
PortsOrErr returns the Ports value or an error if the edge was not loaded in eager-loading.
type PoolGroupBy ¶
type PoolGroupBy struct {
// contains filtered or unexported fields
}
PoolGroupBy is the group-by builder for Pool entities.
func (*PoolGroupBy) Aggregate ¶
func (pgb *PoolGroupBy) Aggregate(fns ...AggregateFunc) *PoolGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PoolGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PoolGroupBy) Scan ¶
func (pgb *PoolGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PoolGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PoolMutation ¶
type PoolMutation struct {
// contains filtered or unexported fields
}
PoolMutation represents an operation that mutates the Pool nodes in the graph.
func (*PoolMutation) AddField ¶
func (m *PoolMutation) 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 (*PoolMutation) AddOriginIDs ¶
func (m *PoolMutation) AddOriginIDs(ids ...gidx.PrefixedID)
AddOriginIDs adds the "origins" edge to the Origin entity by ids.
func (*PoolMutation) AddPortIDs ¶
func (m *PoolMutation) AddPortIDs(ids ...gidx.PrefixedID)
AddPortIDs adds the "ports" edge to the Port entity by ids.
func (*PoolMutation) AddedEdges ¶
func (m *PoolMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PoolMutation) AddedField ¶
func (m *PoolMutation) 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 (*PoolMutation) AddedFields ¶
func (m *PoolMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PoolMutation) AddedIDs ¶
func (m *PoolMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PoolMutation) ClearEdge ¶
func (m *PoolMutation) 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 (*PoolMutation) ClearField ¶
func (m *PoolMutation) 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 (*PoolMutation) ClearOrigins ¶
func (m *PoolMutation) ClearOrigins()
ClearOrigins clears the "origins" edge to the Origin entity.
func (*PoolMutation) ClearPorts ¶
func (m *PoolMutation) ClearPorts()
ClearPorts clears the "ports" edge to the Port entity.
func (*PoolMutation) ClearedEdges ¶
func (m *PoolMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PoolMutation) ClearedFields ¶
func (m *PoolMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PoolMutation) Client ¶
func (m PoolMutation) 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 (*PoolMutation) CreatedAt ¶
func (m *PoolMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PoolMutation) EdgeCleared ¶
func (m *PoolMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PoolMutation) Field ¶
func (m *PoolMutation) 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 (*PoolMutation) FieldCleared ¶
func (m *PoolMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PoolMutation) Fields ¶
func (m *PoolMutation) 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 (*PoolMutation) ID ¶
func (m *PoolMutation) ID() (id gidx.PrefixedID, 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 (*PoolMutation) IDs ¶
func (m *PoolMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, 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 (*PoolMutation) Name ¶
func (m *PoolMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PoolMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) 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 (*PoolMutation) OldName ¶
func (m *PoolMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) OldOwnerID ¶ added in v0.0.18
func (m *PoolMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
OldOwnerID returns the old "owner_id" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) OldProtocol ¶
OldProtocol returns the old "protocol" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Pool entity. If the Pool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PoolMutation) OriginsCleared ¶
func (m *PoolMutation) OriginsCleared() bool
OriginsCleared reports if the "origins" edge to the Origin entity was cleared.
func (*PoolMutation) OriginsIDs ¶
func (m *PoolMutation) OriginsIDs() (ids []gidx.PrefixedID)
OriginsIDs returns the "origins" edge IDs in the mutation.
func (*PoolMutation) OwnerID ¶ added in v0.0.18
func (m *PoolMutation) OwnerID() (r gidx.PrefixedID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*PoolMutation) PortsCleared ¶
func (m *PoolMutation) PortsCleared() bool
PortsCleared reports if the "ports" edge to the Port entity was cleared.
func (*PoolMutation) PortsIDs ¶
func (m *PoolMutation) PortsIDs() (ids []gidx.PrefixedID)
PortsIDs returns the "ports" edge IDs in the mutation.
func (*PoolMutation) Protocol ¶
func (m *PoolMutation) Protocol() (r pool.Protocol, exists bool)
Protocol returns the value of the "protocol" field in the mutation.
func (*PoolMutation) RemoveOriginIDs ¶
func (m *PoolMutation) RemoveOriginIDs(ids ...gidx.PrefixedID)
RemoveOriginIDs removes the "origins" edge to the Origin entity by IDs.
func (*PoolMutation) RemovePortIDs ¶
func (m *PoolMutation) RemovePortIDs(ids ...gidx.PrefixedID)
RemovePortIDs removes the "ports" edge to the Port entity by IDs.
func (*PoolMutation) RemovedEdges ¶
func (m *PoolMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PoolMutation) RemovedIDs ¶
func (m *PoolMutation) 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 (*PoolMutation) RemovedOriginsIDs ¶
func (m *PoolMutation) RemovedOriginsIDs() (ids []gidx.PrefixedID)
RemovedOrigins returns the removed IDs of the "origins" edge to the Origin entity.
func (*PoolMutation) RemovedPortsIDs ¶
func (m *PoolMutation) RemovedPortsIDs() (ids []gidx.PrefixedID)
RemovedPorts returns the removed IDs of the "ports" edge to the Port entity.
func (*PoolMutation) ResetCreatedAt ¶
func (m *PoolMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PoolMutation) ResetEdge ¶
func (m *PoolMutation) 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 (*PoolMutation) ResetField ¶
func (m *PoolMutation) 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 (*PoolMutation) ResetName ¶
func (m *PoolMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PoolMutation) ResetOrigins ¶
func (m *PoolMutation) ResetOrigins()
ResetOrigins resets all changes to the "origins" edge.
func (*PoolMutation) ResetOwnerID ¶ added in v0.0.18
func (m *PoolMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*PoolMutation) ResetPorts ¶
func (m *PoolMutation) ResetPorts()
ResetPorts resets all changes to the "ports" edge.
func (*PoolMutation) ResetProtocol ¶
func (m *PoolMutation) ResetProtocol()
ResetProtocol resets all changes to the "protocol" field.
func (*PoolMutation) ResetUpdatedAt ¶
func (m *PoolMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PoolMutation) SetCreatedAt ¶
func (m *PoolMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PoolMutation) SetField ¶
func (m *PoolMutation) 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 (*PoolMutation) SetID ¶
func (m *PoolMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Pool entities.
func (*PoolMutation) SetName ¶
func (m *PoolMutation) SetName(s string)
SetName sets the "name" field.
func (*PoolMutation) SetOp ¶
func (m *PoolMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PoolMutation) SetOwnerID ¶ added in v0.0.18
func (m *PoolMutation) SetOwnerID(gi gidx.PrefixedID)
SetOwnerID sets the "owner_id" field.
func (*PoolMutation) SetProtocol ¶
func (m *PoolMutation) SetProtocol(po pool.Protocol)
SetProtocol sets the "protocol" field.
func (*PoolMutation) SetUpdatedAt ¶
func (m *PoolMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (PoolMutation) Tx ¶
func (m PoolMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PoolMutation) Type ¶
func (m *PoolMutation) Type() string
Type returns the node type of this mutation (Pool).
func (*PoolMutation) UpdatedAt ¶
func (m *PoolMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PoolMutation) Where ¶
func (m *PoolMutation) Where(ps ...predicate.Pool)
Where appends a list predicates to the PoolMutation builder.
func (*PoolMutation) WhereP ¶
func (m *PoolMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PoolMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PoolQuery ¶
type PoolQuery struct {
// contains filtered or unexported fields
}
PoolQuery is the builder for querying Pool entities.
func (*PoolQuery) Aggregate ¶
func (pq *PoolQuery) Aggregate(fns ...AggregateFunc) *PoolSelect
Aggregate returns a PoolSelect configured with the given aggregations.
func (*PoolQuery) Clone ¶
Clone returns a duplicate of the PoolQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PoolQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*PoolQuery) First ¶
First returns the first Pool entity from the query. Returns a *NotFoundError when no Pool was found.
func (*PoolQuery) FirstID ¶
FirstID returns the first Pool ID from the query. Returns a *NotFoundError when no Pool ID was found.
func (*PoolQuery) FirstIDX ¶
func (pq *PoolQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*PoolQuery) GroupBy ¶
func (pq *PoolQuery) GroupBy(field string, fields ...string) *PoolGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Pool.Query(). GroupBy(pool.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*PoolQuery) IDsX ¶
func (pq *PoolQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*PoolQuery) Only ¶
Only returns a single Pool entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Pool entity is found. Returns a *NotFoundError when no Pool entities are found.
func (*PoolQuery) OnlyID ¶
OnlyID is like Only, but returns the only Pool ID in the query. Returns a *NotSingularError when more than one Pool ID is found. Returns a *NotFoundError when no entities are found.
func (*PoolQuery) OnlyIDX ¶
func (pq *PoolQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PoolQuery) Order ¶
func (pq *PoolQuery) Order(o ...pool.OrderOption) *PoolQuery
Order specifies how the records should be ordered.
func (*PoolQuery) Paginate ¶
func (po *PoolQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...LoadBalancerPoolPaginateOption, ) (*LoadBalancerPoolConnection, error)
Paginate executes the query and returns a relay based cursor connection to LoadBalancerPool.
func (*PoolQuery) QueryOrigins ¶
func (pq *PoolQuery) QueryOrigins() *OriginQuery
QueryOrigins chains the current query on the "origins" edge.
func (*PoolQuery) QueryPorts ¶
QueryPorts chains the current query on the "ports" edge.
func (*PoolQuery) Select ¶
func (pq *PoolQuery) Select(fields ...string) *PoolSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Pool.Query(). Select(pool.FieldCreatedAt). Scan(ctx, &v)
func (*PoolQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PoolQuery) WithNamedOrigins ¶
func (pq *PoolQuery) WithNamedOrigins(name string, opts ...func(*OriginQuery)) *PoolQuery
WithNamedOrigins tells the query-builder to eager-load the nodes that are connected to the "origins" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*PoolQuery) WithNamedPorts ¶
WithNamedPorts tells the query-builder to eager-load the nodes that are connected to the "ports" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*PoolQuery) WithOrigins ¶
func (pq *PoolQuery) WithOrigins(opts ...func(*OriginQuery)) *PoolQuery
WithOrigins tells the query-builder to eager-load the nodes that are connected to the "origins" edge. The optional arguments are used to configure the query builder of the edge.
type PoolSelect ¶
type PoolSelect struct { *PoolQuery // contains filtered or unexported fields }
PoolSelect is the builder for selecting fields of Pool entities.
func (*PoolSelect) Aggregate ¶
func (ps *PoolSelect) Aggregate(fns ...AggregateFunc) *PoolSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PoolSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PoolSelect) Scan ¶
func (ps *PoolSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PoolSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PoolUpdate ¶
type PoolUpdate struct {
// contains filtered or unexported fields
}
PoolUpdate is the builder for updating Pool entities.
func (*PoolUpdate) AddOriginIDs ¶
func (pu *PoolUpdate) AddOriginIDs(ids ...gidx.PrefixedID) *PoolUpdate
AddOriginIDs adds the "origins" edge to the Origin entity by IDs.
func (*PoolUpdate) AddOrigins ¶
func (pu *PoolUpdate) AddOrigins(o ...*Origin) *PoolUpdate
AddOrigins adds the "origins" edges to the Origin entity.
func (*PoolUpdate) AddPortIDs ¶
func (pu *PoolUpdate) AddPortIDs(ids ...gidx.PrefixedID) *PoolUpdate
AddPortIDs adds the "ports" edge to the Port entity by IDs.
func (*PoolUpdate) AddPorts ¶
func (pu *PoolUpdate) AddPorts(p ...*Port) *PoolUpdate
AddPorts adds the "ports" edges to the Port entity.
func (*PoolUpdate) ClearOrigins ¶
func (pu *PoolUpdate) ClearOrigins() *PoolUpdate
ClearOrigins clears all "origins" edges to the Origin entity.
func (*PoolUpdate) ClearPorts ¶
func (pu *PoolUpdate) ClearPorts() *PoolUpdate
ClearPorts clears all "ports" edges to the Port entity.
func (*PoolUpdate) Exec ¶
func (pu *PoolUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PoolUpdate) ExecX ¶
func (pu *PoolUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolUpdate) Mutation ¶
func (pu *PoolUpdate) Mutation() *PoolMutation
Mutation returns the PoolMutation object of the builder.
func (*PoolUpdate) RemoveOriginIDs ¶
func (pu *PoolUpdate) RemoveOriginIDs(ids ...gidx.PrefixedID) *PoolUpdate
RemoveOriginIDs removes the "origins" edge to Origin entities by IDs.
func (*PoolUpdate) RemoveOrigins ¶
func (pu *PoolUpdate) RemoveOrigins(o ...*Origin) *PoolUpdate
RemoveOrigins removes "origins" edges to Origin entities.
func (*PoolUpdate) RemovePortIDs ¶
func (pu *PoolUpdate) RemovePortIDs(ids ...gidx.PrefixedID) *PoolUpdate
RemovePortIDs removes the "ports" edge to Port entities by IDs.
func (*PoolUpdate) RemovePorts ¶
func (pu *PoolUpdate) RemovePorts(p ...*Port) *PoolUpdate
RemovePorts removes "ports" edges to Port entities.
func (*PoolUpdate) Save ¶
func (pu *PoolUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PoolUpdate) SaveX ¶
func (pu *PoolUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PoolUpdate) SetInput ¶
func (c *PoolUpdate) SetInput(i UpdateLoadBalancerPoolInput) *PoolUpdate
SetInput applies the change-set in the UpdateLoadBalancerPoolInput on the PoolUpdate builder.
func (*PoolUpdate) SetName ¶
func (pu *PoolUpdate) SetName(s string) *PoolUpdate
SetName sets the "name" field.
func (*PoolUpdate) SetProtocol ¶
func (pu *PoolUpdate) SetProtocol(po pool.Protocol) *PoolUpdate
SetProtocol sets the "protocol" field.
func (*PoolUpdate) Where ¶
func (pu *PoolUpdate) Where(ps ...predicate.Pool) *PoolUpdate
Where appends a list predicates to the PoolUpdate builder.
type PoolUpdateOne ¶
type PoolUpdateOne struct {
// contains filtered or unexported fields
}
PoolUpdateOne is the builder for updating a single Pool entity.
func (*PoolUpdateOne) AddOriginIDs ¶
func (puo *PoolUpdateOne) AddOriginIDs(ids ...gidx.PrefixedID) *PoolUpdateOne
AddOriginIDs adds the "origins" edge to the Origin entity by IDs.
func (*PoolUpdateOne) AddOrigins ¶
func (puo *PoolUpdateOne) AddOrigins(o ...*Origin) *PoolUpdateOne
AddOrigins adds the "origins" edges to the Origin entity.
func (*PoolUpdateOne) AddPortIDs ¶
func (puo *PoolUpdateOne) AddPortIDs(ids ...gidx.PrefixedID) *PoolUpdateOne
AddPortIDs adds the "ports" edge to the Port entity by IDs.
func (*PoolUpdateOne) AddPorts ¶
func (puo *PoolUpdateOne) AddPorts(p ...*Port) *PoolUpdateOne
AddPorts adds the "ports" edges to the Port entity.
func (*PoolUpdateOne) ClearOrigins ¶
func (puo *PoolUpdateOne) ClearOrigins() *PoolUpdateOne
ClearOrigins clears all "origins" edges to the Origin entity.
func (*PoolUpdateOne) ClearPorts ¶
func (puo *PoolUpdateOne) ClearPorts() *PoolUpdateOne
ClearPorts clears all "ports" edges to the Port entity.
func (*PoolUpdateOne) Exec ¶
func (puo *PoolUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PoolUpdateOne) ExecX ¶
func (puo *PoolUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PoolUpdateOne) Mutation ¶
func (puo *PoolUpdateOne) Mutation() *PoolMutation
Mutation returns the PoolMutation object of the builder.
func (*PoolUpdateOne) RemoveOriginIDs ¶
func (puo *PoolUpdateOne) RemoveOriginIDs(ids ...gidx.PrefixedID) *PoolUpdateOne
RemoveOriginIDs removes the "origins" edge to Origin entities by IDs.
func (*PoolUpdateOne) RemoveOrigins ¶
func (puo *PoolUpdateOne) RemoveOrigins(o ...*Origin) *PoolUpdateOne
RemoveOrigins removes "origins" edges to Origin entities.
func (*PoolUpdateOne) RemovePortIDs ¶
func (puo *PoolUpdateOne) RemovePortIDs(ids ...gidx.PrefixedID) *PoolUpdateOne
RemovePortIDs removes the "ports" edge to Port entities by IDs.
func (*PoolUpdateOne) RemovePorts ¶
func (puo *PoolUpdateOne) RemovePorts(p ...*Port) *PoolUpdateOne
RemovePorts removes "ports" edges to Port entities.
func (*PoolUpdateOne) Save ¶
func (puo *PoolUpdateOne) Save(ctx context.Context) (*Pool, error)
Save executes the query and returns the updated Pool entity.
func (*PoolUpdateOne) SaveX ¶
func (puo *PoolUpdateOne) SaveX(ctx context.Context) *Pool
SaveX is like Save, but panics if an error occurs.
func (*PoolUpdateOne) Select ¶
func (puo *PoolUpdateOne) Select(field string, fields ...string) *PoolUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PoolUpdateOne) SetInput ¶
func (c *PoolUpdateOne) SetInput(i UpdateLoadBalancerPoolInput) *PoolUpdateOne
SetInput applies the change-set in the UpdateLoadBalancerPoolInput on the PoolUpdateOne builder.
func (*PoolUpdateOne) SetName ¶
func (puo *PoolUpdateOne) SetName(s string) *PoolUpdateOne
SetName sets the "name" field.
func (*PoolUpdateOne) SetProtocol ¶
func (puo *PoolUpdateOne) SetProtocol(po pool.Protocol) *PoolUpdateOne
SetProtocol sets the "protocol" field.
func (*PoolUpdateOne) Where ¶
func (puo *PoolUpdateOne) Where(ps ...predicate.Pool) *PoolUpdateOne
Where appends a list predicates to the PoolUpdate builder.
type Port ¶
type Port struct { // ID of the ent. ID gidx.PrefixedID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Number holds the value of the "number" field. Number int `json:"number,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // LoadBalancerID holds the value of the "load_balancer_id" field. LoadBalancerID gidx.PrefixedID `json:"load_balancer_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PortQuery when eager-loading is set. Edges PortEdges `json:"edges"` // contains filtered or unexported fields }
Port is the model entity for the Port schema.
func (*Port) IsNode ¶
func (n *Port) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Port) LoadBalancer ¶
func (po *Port) LoadBalancer(ctx context.Context) (*LoadBalancer, error)
func (*Port) NamedPools ¶
NamedPools returns the Pools named value or an error if the edge was not loaded in eager-loading with this name.
func (*Port) QueryLoadBalancer ¶
func (po *Port) QueryLoadBalancer() *LoadBalancerQuery
QueryLoadBalancer queries the "load_balancer" edge of the Port entity.
func (*Port) QueryPools ¶
QueryPools queries the "pools" edge of the Port entity.
func (*Port) Unwrap ¶
Unwrap unwraps the Port entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Port) Update ¶
func (po *Port) Update() *PortUpdateOne
Update returns a builder for updating this Port. Note that you need to call Port.Unwrap() before calling this method if this Port was returned from a transaction, and the transaction was committed or rolled back.
type PortClient ¶
type PortClient struct {
// contains filtered or unexported fields
}
PortClient is a client for the Port schema.
func NewPortClient ¶
func NewPortClient(c config) *PortClient
NewPortClient returns a client for the Port from the given config.
func (*PortClient) Create ¶
func (c *PortClient) Create() *PortCreate
Create returns a builder for creating a Port entity.
func (*PortClient) CreateBulk ¶
func (c *PortClient) CreateBulk(builders ...*PortCreate) *PortCreateBulk
CreateBulk returns a builder for creating a bulk of Port entities.
func (*PortClient) Delete ¶
func (c *PortClient) Delete() *PortDelete
Delete returns a delete builder for Port.
func (*PortClient) DeleteOne ¶
func (c *PortClient) DeleteOne(po *Port) *PortDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PortClient) DeleteOneID ¶
func (c *PortClient) DeleteOneID(id gidx.PrefixedID) *PortDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PortClient) Get ¶
func (c *PortClient) Get(ctx context.Context, id gidx.PrefixedID) (*Port, error)
Get returns a Port entity by its id.
func (*PortClient) GetX ¶
func (c *PortClient) GetX(ctx context.Context, id gidx.PrefixedID) *Port
GetX is like Get, but panics if an error occurs.
func (*PortClient) Intercept ¶
func (c *PortClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `port.Intercept(f(g(h())))`.
func (*PortClient) Interceptors ¶
func (c *PortClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PortClient) Query ¶
func (c *PortClient) Query() *PortQuery
Query returns a query builder for Port.
func (*PortClient) QueryLoadBalancer ¶
func (c *PortClient) QueryLoadBalancer(po *Port) *LoadBalancerQuery
QueryLoadBalancer queries the load_balancer edge of a Port.
func (*PortClient) QueryPools ¶
func (c *PortClient) QueryPools(po *Port) *PoolQuery
QueryPools queries the pools edge of a Port.
func (*PortClient) Update ¶
func (c *PortClient) Update() *PortUpdate
Update returns an update builder for Port.
func (*PortClient) UpdateOne ¶
func (c *PortClient) UpdateOne(po *Port) *PortUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PortClient) UpdateOneID ¶
func (c *PortClient) UpdateOneID(id gidx.PrefixedID) *PortUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PortClient) Use ¶
func (c *PortClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `port.Hooks(f(g(h())))`.
type PortCreate ¶
type PortCreate struct {
// contains filtered or unexported fields
}
PortCreate is the builder for creating a Port entity.
func (*PortCreate) AddPoolIDs ¶
func (pc *PortCreate) AddPoolIDs(ids ...gidx.PrefixedID) *PortCreate
AddPoolIDs adds the "pools" edge to the Pool entity by IDs.
func (*PortCreate) AddPools ¶
func (pc *PortCreate) AddPools(p ...*Pool) *PortCreate
AddPools adds the "pools" edges to the Pool entity.
func (*PortCreate) Exec ¶
func (pc *PortCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PortCreate) ExecX ¶
func (pc *PortCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortCreate) Mutation ¶
func (pc *PortCreate) Mutation() *PortMutation
Mutation returns the PortMutation object of the builder.
func (*PortCreate) Save ¶
func (pc *PortCreate) Save(ctx context.Context) (*Port, error)
Save creates the Port in the database.
func (*PortCreate) SaveX ¶
func (pc *PortCreate) SaveX(ctx context.Context) *Port
SaveX calls Save and panics if Save returns an error.
func (*PortCreate) SetCreatedAt ¶
func (pc *PortCreate) SetCreatedAt(t time.Time) *PortCreate
SetCreatedAt sets the "created_at" field.
func (*PortCreate) SetID ¶
func (pc *PortCreate) SetID(gi gidx.PrefixedID) *PortCreate
SetID sets the "id" field.
func (*PortCreate) SetInput ¶
func (c *PortCreate) SetInput(i CreateLoadBalancerPortInput) *PortCreate
SetInput applies the change-set in the CreateLoadBalancerPortInput on the PortCreate builder.
func (*PortCreate) SetLoadBalancer ¶
func (pc *PortCreate) SetLoadBalancer(l *LoadBalancer) *PortCreate
SetLoadBalancer sets the "load_balancer" edge to the LoadBalancer entity.
func (*PortCreate) SetLoadBalancerID ¶
func (pc *PortCreate) SetLoadBalancerID(gi gidx.PrefixedID) *PortCreate
SetLoadBalancerID sets the "load_balancer_id" field.
func (*PortCreate) SetName ¶
func (pc *PortCreate) SetName(s string) *PortCreate
SetName sets the "name" field.
func (*PortCreate) SetNillableCreatedAt ¶
func (pc *PortCreate) SetNillableCreatedAt(t *time.Time) *PortCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PortCreate) SetNillableID ¶
func (pc *PortCreate) SetNillableID(gi *gidx.PrefixedID) *PortCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PortCreate) SetNillableUpdatedAt ¶
func (pc *PortCreate) SetNillableUpdatedAt(t *time.Time) *PortCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PortCreate) SetNumber ¶
func (pc *PortCreate) SetNumber(i int) *PortCreate
SetNumber sets the "number" field.
func (*PortCreate) SetUpdatedAt ¶
func (pc *PortCreate) SetUpdatedAt(t time.Time) *PortCreate
SetUpdatedAt sets the "updated_at" field.
type PortCreateBulk ¶
type PortCreateBulk struct {
// contains filtered or unexported fields
}
PortCreateBulk is the builder for creating many Port entities in bulk.
func (*PortCreateBulk) Exec ¶
func (pcb *PortCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PortCreateBulk) ExecX ¶
func (pcb *PortCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PortDelete ¶
type PortDelete struct {
// contains filtered or unexported fields
}
PortDelete is the builder for deleting a Port entity.
func (*PortDelete) Exec ¶
func (pd *PortDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PortDelete) ExecX ¶
func (pd *PortDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PortDelete) Where ¶
func (pd *PortDelete) Where(ps ...predicate.Port) *PortDelete
Where appends a list predicates to the PortDelete builder.
type PortDeleteOne ¶
type PortDeleteOne struct {
// contains filtered or unexported fields
}
PortDeleteOne is the builder for deleting a single Port entity.
func (*PortDeleteOne) Exec ¶
func (pdo *PortDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PortDeleteOne) ExecX ¶
func (pdo *PortDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortDeleteOne) Where ¶
func (pdo *PortDeleteOne) Where(ps ...predicate.Port) *PortDeleteOne
Where appends a list predicates to the PortDelete builder.
type PortEdges ¶
type PortEdges struct { // Pools holds the value of the pools edge. Pools []*Pool `json:"pools,omitempty"` // LoadBalancer holds the value of the load_balancer edge. LoadBalancer *LoadBalancer `json:"load_balancer,omitempty"` // contains filtered or unexported fields }
PortEdges holds the relations/edges for other nodes in the graph.
func (PortEdges) LoadBalancerOrErr ¶
func (e PortEdges) LoadBalancerOrErr() (*LoadBalancer, error)
LoadBalancerOrErr returns the LoadBalancer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PortEdges) PoolsOrErr ¶
PoolsOrErr returns the Pools value or an error if the edge was not loaded in eager-loading.
type PortGroupBy ¶
type PortGroupBy struct {
// contains filtered or unexported fields
}
PortGroupBy is the group-by builder for Port entities.
func (*PortGroupBy) Aggregate ¶
func (pgb *PortGroupBy) Aggregate(fns ...AggregateFunc) *PortGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PortGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Scan ¶
func (pgb *PortGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PortGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PortMutation ¶
type PortMutation struct {
// contains filtered or unexported fields
}
PortMutation represents an operation that mutates the Port nodes in the graph.
func (*PortMutation) AddField ¶
func (m *PortMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PortMutation) AddNumber ¶
func (m *PortMutation) AddNumber(i int)
AddNumber adds i to the "number" field.
func (*PortMutation) AddPoolIDs ¶
func (m *PortMutation) AddPoolIDs(ids ...gidx.PrefixedID)
AddPoolIDs adds the "pools" edge to the Pool entity by ids.
func (*PortMutation) AddedEdges ¶
func (m *PortMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PortMutation) AddedField ¶
func (m *PortMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PortMutation) AddedFields ¶
func (m *PortMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PortMutation) AddedIDs ¶
func (m *PortMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PortMutation) AddedNumber ¶
func (m *PortMutation) AddedNumber() (r int, exists bool)
AddedNumber returns the value that was added to the "number" field in this mutation.
func (*PortMutation) ClearEdge ¶
func (m *PortMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*PortMutation) ClearField ¶
func (m *PortMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*PortMutation) ClearLoadBalancer ¶
func (m *PortMutation) ClearLoadBalancer()
ClearLoadBalancer clears the "load_balancer" edge to the LoadBalancer entity.
func (*PortMutation) ClearPools ¶
func (m *PortMutation) ClearPools()
ClearPools clears the "pools" edge to the Pool entity.
func (*PortMutation) ClearedEdges ¶
func (m *PortMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PortMutation) ClearedFields ¶
func (m *PortMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PortMutation) Client ¶
func (m PortMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*PortMutation) CreatedAt ¶
func (m *PortMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PortMutation) EdgeCleared ¶
func (m *PortMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PortMutation) Field ¶
func (m *PortMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PortMutation) FieldCleared ¶
func (m *PortMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PortMutation) Fields ¶
func (m *PortMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*PortMutation) ID ¶
func (m *PortMutation) ID() (id gidx.PrefixedID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PortMutation) IDs ¶
func (m *PortMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PortMutation) LoadBalancerCleared ¶
func (m *PortMutation) LoadBalancerCleared() bool
LoadBalancerCleared reports if the "load_balancer" edge to the LoadBalancer entity was cleared.
func (*PortMutation) LoadBalancerID ¶
func (m *PortMutation) LoadBalancerID() (r gidx.PrefixedID, exists bool)
LoadBalancerID returns the value of the "load_balancer_id" field in the mutation.
func (*PortMutation) LoadBalancerIDs ¶
func (m *PortMutation) LoadBalancerIDs() (ids []gidx.PrefixedID)
LoadBalancerIDs returns the "load_balancer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LoadBalancerID instead. It exists only for internal usage by the builders.
func (*PortMutation) Name ¶
func (m *PortMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PortMutation) Number ¶
func (m *PortMutation) Number() (r int, exists bool)
Number returns the value of the "number" field in the mutation.
func (*PortMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Port entity. If the Port object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PortMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*PortMutation) OldLoadBalancerID ¶
func (m *PortMutation) OldLoadBalancerID(ctx context.Context) (v gidx.PrefixedID, err error)
OldLoadBalancerID returns the old "load_balancer_id" field's value of the Port entity. If the Port object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PortMutation) OldName ¶
func (m *PortMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Port entity. If the Port object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PortMutation) OldNumber ¶
func (m *PortMutation) OldNumber(ctx context.Context) (v int, err error)
OldNumber returns the old "number" field's value of the Port entity. If the Port object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PortMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Port entity. If the Port object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PortMutation) PoolsCleared ¶
func (m *PortMutation) PoolsCleared() bool
PoolsCleared reports if the "pools" edge to the Pool entity was cleared.
func (*PortMutation) PoolsIDs ¶
func (m *PortMutation) PoolsIDs() (ids []gidx.PrefixedID)
PoolsIDs returns the "pools" edge IDs in the mutation.
func (*PortMutation) RemovePoolIDs ¶
func (m *PortMutation) RemovePoolIDs(ids ...gidx.PrefixedID)
RemovePoolIDs removes the "pools" edge to the Pool entity by IDs.
func (*PortMutation) RemovedEdges ¶
func (m *PortMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PortMutation) RemovedIDs ¶
func (m *PortMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*PortMutation) RemovedPoolsIDs ¶
func (m *PortMutation) RemovedPoolsIDs() (ids []gidx.PrefixedID)
RemovedPools returns the removed IDs of the "pools" edge to the Pool entity.
func (*PortMutation) ResetCreatedAt ¶
func (m *PortMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PortMutation) ResetEdge ¶
func (m *PortMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*PortMutation) ResetField ¶
func (m *PortMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*PortMutation) ResetLoadBalancer ¶
func (m *PortMutation) ResetLoadBalancer()
ResetLoadBalancer resets all changes to the "load_balancer" edge.
func (*PortMutation) ResetLoadBalancerID ¶
func (m *PortMutation) ResetLoadBalancerID()
ResetLoadBalancerID resets all changes to the "load_balancer_id" field.
func (*PortMutation) ResetName ¶
func (m *PortMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PortMutation) ResetNumber ¶
func (m *PortMutation) ResetNumber()
ResetNumber resets all changes to the "number" field.
func (*PortMutation) ResetPools ¶
func (m *PortMutation) ResetPools()
ResetPools resets all changes to the "pools" edge.
func (*PortMutation) ResetUpdatedAt ¶
func (m *PortMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PortMutation) SetCreatedAt ¶
func (m *PortMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PortMutation) SetField ¶
func (m *PortMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PortMutation) SetID ¶
func (m *PortMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Port entities.
func (*PortMutation) SetLoadBalancerID ¶
func (m *PortMutation) SetLoadBalancerID(gi gidx.PrefixedID)
SetLoadBalancerID sets the "load_balancer_id" field.
func (*PortMutation) SetName ¶
func (m *PortMutation) SetName(s string)
SetName sets the "name" field.
func (*PortMutation) SetNumber ¶
func (m *PortMutation) SetNumber(i int)
SetNumber sets the "number" field.
func (*PortMutation) SetOp ¶
func (m *PortMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PortMutation) SetUpdatedAt ¶
func (m *PortMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (PortMutation) Tx ¶
func (m PortMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PortMutation) Type ¶
func (m *PortMutation) Type() string
Type returns the node type of this mutation (Port).
func (*PortMutation) UpdatedAt ¶
func (m *PortMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PortMutation) Where ¶
func (m *PortMutation) Where(ps ...predicate.Port)
Where appends a list predicates to the PortMutation builder.
func (*PortMutation) WhereP ¶
func (m *PortMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PortMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PortQuery ¶
type PortQuery struct {
// contains filtered or unexported fields
}
PortQuery is the builder for querying Port entities.
func (*PortQuery) Aggregate ¶
func (pq *PortQuery) Aggregate(fns ...AggregateFunc) *PortSelect
Aggregate returns a PortSelect configured with the given aggregations.
func (*PortQuery) Clone ¶
Clone returns a duplicate of the PortQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PortQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*PortQuery) First ¶
First returns the first Port entity from the query. Returns a *NotFoundError when no Port was found.
func (*PortQuery) FirstID ¶
FirstID returns the first Port ID from the query. Returns a *NotFoundError when no Port ID was found.
func (*PortQuery) FirstIDX ¶
func (pq *PortQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*PortQuery) GroupBy ¶
func (pq *PortQuery) GroupBy(field string, fields ...string) *PortGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Port.Query(). GroupBy(port.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*PortQuery) IDsX ¶
func (pq *PortQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*PortQuery) Only ¶
Only returns a single Port entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Port entity is found. Returns a *NotFoundError when no Port entities are found.
func (*PortQuery) OnlyID ¶
OnlyID is like Only, but returns the only Port ID in the query. Returns a *NotSingularError when more than one Port ID is found. Returns a *NotFoundError when no entities are found.
func (*PortQuery) OnlyIDX ¶
func (pq *PortQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PortQuery) Order ¶
func (pq *PortQuery) Order(o ...port.OrderOption) *PortQuery
Order specifies how the records should be ordered.
func (*PortQuery) Paginate ¶
func (po *PortQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...LoadBalancerPortPaginateOption, ) (*LoadBalancerPortConnection, error)
Paginate executes the query and returns a relay based cursor connection to LoadBalancerPort.
func (*PortQuery) QueryLoadBalancer ¶
func (pq *PortQuery) QueryLoadBalancer() *LoadBalancerQuery
QueryLoadBalancer chains the current query on the "load_balancer" edge.
func (*PortQuery) QueryPools ¶
QueryPools chains the current query on the "pools" edge.
func (*PortQuery) Select ¶
func (pq *PortQuery) Select(fields ...string) *PortSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Port.Query(). Select(port.FieldCreatedAt). Scan(ctx, &v)
func (*PortQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PortQuery) WithLoadBalancer ¶
func (pq *PortQuery) WithLoadBalancer(opts ...func(*LoadBalancerQuery)) *PortQuery
WithLoadBalancer tells the query-builder to eager-load the nodes that are connected to the "load_balancer" edge. The optional arguments are used to configure the query builder of the edge.
func (*PortQuery) WithNamedPools ¶
WithNamedPools tells the query-builder to eager-load the nodes that are connected to the "pools" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type PortSelect ¶
type PortSelect struct { *PortQuery // contains filtered or unexported fields }
PortSelect is the builder for selecting fields of Port entities.
func (*PortSelect) Aggregate ¶
func (ps *PortSelect) Aggregate(fns ...AggregateFunc) *PortSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PortSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PortSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PortSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PortSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PortSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PortSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PortSelect) Scan ¶
func (ps *PortSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PortSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PortUpdate ¶
type PortUpdate struct {
// contains filtered or unexported fields
}
PortUpdate is the builder for updating Port entities.
func (*PortUpdate) AddNumber ¶
func (pu *PortUpdate) AddNumber(i int) *PortUpdate
AddNumber adds i to the "number" field.
func (*PortUpdate) AddPoolIDs ¶
func (pu *PortUpdate) AddPoolIDs(ids ...gidx.PrefixedID) *PortUpdate
AddPoolIDs adds the "pools" edge to the Pool entity by IDs.
func (*PortUpdate) AddPools ¶
func (pu *PortUpdate) AddPools(p ...*Pool) *PortUpdate
AddPools adds the "pools" edges to the Pool entity.
func (*PortUpdate) ClearPools ¶
func (pu *PortUpdate) ClearPools() *PortUpdate
ClearPools clears all "pools" edges to the Pool entity.
func (*PortUpdate) Exec ¶
func (pu *PortUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PortUpdate) ExecX ¶
func (pu *PortUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortUpdate) Mutation ¶
func (pu *PortUpdate) Mutation() *PortMutation
Mutation returns the PortMutation object of the builder.
func (*PortUpdate) RemovePoolIDs ¶
func (pu *PortUpdate) RemovePoolIDs(ids ...gidx.PrefixedID) *PortUpdate
RemovePoolIDs removes the "pools" edge to Pool entities by IDs.
func (*PortUpdate) RemovePools ¶
func (pu *PortUpdate) RemovePools(p ...*Pool) *PortUpdate
RemovePools removes "pools" edges to Pool entities.
func (*PortUpdate) Save ¶
func (pu *PortUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PortUpdate) SaveX ¶
func (pu *PortUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PortUpdate) SetInput ¶
func (c *PortUpdate) SetInput(i UpdateLoadBalancerPortInput) *PortUpdate
SetInput applies the change-set in the UpdateLoadBalancerPortInput on the PortUpdate builder.
func (*PortUpdate) SetName ¶
func (pu *PortUpdate) SetName(s string) *PortUpdate
SetName sets the "name" field.
func (*PortUpdate) SetNumber ¶
func (pu *PortUpdate) SetNumber(i int) *PortUpdate
SetNumber sets the "number" field.
func (*PortUpdate) Where ¶
func (pu *PortUpdate) Where(ps ...predicate.Port) *PortUpdate
Where appends a list predicates to the PortUpdate builder.
type PortUpdateOne ¶
type PortUpdateOne struct {
// contains filtered or unexported fields
}
PortUpdateOne is the builder for updating a single Port entity.
func (*PortUpdateOne) AddNumber ¶
func (puo *PortUpdateOne) AddNumber(i int) *PortUpdateOne
AddNumber adds i to the "number" field.
func (*PortUpdateOne) AddPoolIDs ¶
func (puo *PortUpdateOne) AddPoolIDs(ids ...gidx.PrefixedID) *PortUpdateOne
AddPoolIDs adds the "pools" edge to the Pool entity by IDs.
func (*PortUpdateOne) AddPools ¶
func (puo *PortUpdateOne) AddPools(p ...*Pool) *PortUpdateOne
AddPools adds the "pools" edges to the Pool entity.
func (*PortUpdateOne) ClearPools ¶
func (puo *PortUpdateOne) ClearPools() *PortUpdateOne
ClearPools clears all "pools" edges to the Pool entity.
func (*PortUpdateOne) Exec ¶
func (puo *PortUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PortUpdateOne) ExecX ¶
func (puo *PortUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortUpdateOne) Mutation ¶
func (puo *PortUpdateOne) Mutation() *PortMutation
Mutation returns the PortMutation object of the builder.
func (*PortUpdateOne) RemovePoolIDs ¶
func (puo *PortUpdateOne) RemovePoolIDs(ids ...gidx.PrefixedID) *PortUpdateOne
RemovePoolIDs removes the "pools" edge to Pool entities by IDs.
func (*PortUpdateOne) RemovePools ¶
func (puo *PortUpdateOne) RemovePools(p ...*Pool) *PortUpdateOne
RemovePools removes "pools" edges to Pool entities.
func (*PortUpdateOne) Save ¶
func (puo *PortUpdateOne) Save(ctx context.Context) (*Port, error)
Save executes the query and returns the updated Port entity.
func (*PortUpdateOne) SaveX ¶
func (puo *PortUpdateOne) SaveX(ctx context.Context) *Port
SaveX is like Save, but panics if an error occurs.
func (*PortUpdateOne) Select ¶
func (puo *PortUpdateOne) Select(field string, fields ...string) *PortUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PortUpdateOne) SetInput ¶
func (c *PortUpdateOne) SetInput(i UpdateLoadBalancerPortInput) *PortUpdateOne
SetInput applies the change-set in the UpdateLoadBalancerPortInput on the PortUpdateOne builder.
func (*PortUpdateOne) SetName ¶
func (puo *PortUpdateOne) SetName(s string) *PortUpdateOne
SetName sets the "name" field.
func (*PortUpdateOne) SetNumber ¶
func (puo *PortUpdateOne) SetNumber(i int) *PortUpdateOne
SetNumber sets the "number" field.
func (*PortUpdateOne) Where ¶
func (puo *PortUpdateOne) Where(ps ...predicate.Port) *PortUpdateOne
Where appends a list predicates to the PortUpdate builder.
type Provider ¶
type Provider struct { // ID of the ent. // The ID for the load balancer provider. ID gidx.PrefixedID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // The name of the load balancer provider. Name string `json:"name,omitempty"` // The ID for the owner for this load balancer. OwnerID gidx.PrefixedID `json:"owner_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProviderQuery when eager-loading is set. Edges ProviderEdges `json:"edges"` // contains filtered or unexported fields }
Representation of a load balancer provider. Load balancer providers are responsible for provisioning and managing load balancers
func (*Provider) IsNode ¶
func (n *Provider) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Provider) LoadBalancers ¶
func (pr *Provider) LoadBalancers( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *LoadBalancerOrder, where *LoadBalancerWhereInput, ) (*LoadBalancerConnection, error)
func (*Provider) NamedLoadBalancers ¶
func (pr *Provider) NamedLoadBalancers(name string) ([]*LoadBalancer, error)
NamedLoadBalancers returns the LoadBalancers named value or an error if the edge was not loaded in eager-loading with this name.
func (*Provider) QueryLoadBalancers ¶
func (pr *Provider) QueryLoadBalancers() *LoadBalancerQuery
QueryLoadBalancers queries the "load_balancers" edge of the Provider entity.
func (*Provider) Unwrap ¶
Unwrap unwraps the Provider entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Provider) Update ¶
func (pr *Provider) Update() *ProviderUpdateOne
Update returns a builder for updating this Provider. Note that you need to call Provider.Unwrap() before calling this method if this Provider was returned from a transaction, and the transaction was committed or rolled back.
type ProviderClient ¶
type ProviderClient struct {
// contains filtered or unexported fields
}
ProviderClient is a client for the Provider schema.
func NewProviderClient ¶
func NewProviderClient(c config) *ProviderClient
NewProviderClient returns a client for the Provider from the given config.
func (*ProviderClient) Create ¶
func (c *ProviderClient) Create() *ProviderCreate
Create returns a builder for creating a Provider entity.
func (*ProviderClient) CreateBulk ¶
func (c *ProviderClient) CreateBulk(builders ...*ProviderCreate) *ProviderCreateBulk
CreateBulk returns a builder for creating a bulk of Provider entities.
func (*ProviderClient) Delete ¶
func (c *ProviderClient) Delete() *ProviderDelete
Delete returns a delete builder for Provider.
func (*ProviderClient) DeleteOne ¶
func (c *ProviderClient) DeleteOne(pr *Provider) *ProviderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProviderClient) DeleteOneID ¶
func (c *ProviderClient) DeleteOneID(id gidx.PrefixedID) *ProviderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProviderClient) Get ¶
func (c *ProviderClient) Get(ctx context.Context, id gidx.PrefixedID) (*Provider, error)
Get returns a Provider entity by its id.
func (*ProviderClient) GetX ¶
func (c *ProviderClient) GetX(ctx context.Context, id gidx.PrefixedID) *Provider
GetX is like Get, but panics if an error occurs.
func (*ProviderClient) Hooks ¶
func (c *ProviderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProviderClient) Intercept ¶
func (c *ProviderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `provider.Intercept(f(g(h())))`.
func (*ProviderClient) Interceptors ¶
func (c *ProviderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProviderClient) Query ¶
func (c *ProviderClient) Query() *ProviderQuery
Query returns a query builder for Provider.
func (*ProviderClient) QueryLoadBalancers ¶
func (c *ProviderClient) QueryLoadBalancers(pr *Provider) *LoadBalancerQuery
QueryLoadBalancers queries the load_balancers edge of a Provider.
func (*ProviderClient) Update ¶
func (c *ProviderClient) Update() *ProviderUpdate
Update returns an update builder for Provider.
func (*ProviderClient) UpdateOne ¶
func (c *ProviderClient) UpdateOne(pr *Provider) *ProviderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProviderClient) UpdateOneID ¶
func (c *ProviderClient) UpdateOneID(id gidx.PrefixedID) *ProviderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProviderClient) Use ¶
func (c *ProviderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `provider.Hooks(f(g(h())))`.
type ProviderCreate ¶
type ProviderCreate struct {
// contains filtered or unexported fields
}
ProviderCreate is the builder for creating a Provider entity.
func (*ProviderCreate) AddLoadBalancerIDs ¶
func (pc *ProviderCreate) AddLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderCreate
AddLoadBalancerIDs adds the "load_balancers" edge to the LoadBalancer entity by IDs.
func (*ProviderCreate) AddLoadBalancers ¶
func (pc *ProviderCreate) AddLoadBalancers(l ...*LoadBalancer) *ProviderCreate
AddLoadBalancers adds the "load_balancers" edges to the LoadBalancer entity.
func (*ProviderCreate) Exec ¶
func (pc *ProviderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderCreate) ExecX ¶
func (pc *ProviderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderCreate) Mutation ¶
func (pc *ProviderCreate) Mutation() *ProviderMutation
Mutation returns the ProviderMutation object of the builder.
func (*ProviderCreate) Save ¶
func (pc *ProviderCreate) Save(ctx context.Context) (*Provider, error)
Save creates the Provider in the database.
func (*ProviderCreate) SaveX ¶
func (pc *ProviderCreate) SaveX(ctx context.Context) *Provider
SaveX calls Save and panics if Save returns an error.
func (*ProviderCreate) SetCreatedAt ¶
func (pc *ProviderCreate) SetCreatedAt(t time.Time) *ProviderCreate
SetCreatedAt sets the "created_at" field.
func (*ProviderCreate) SetID ¶
func (pc *ProviderCreate) SetID(gi gidx.PrefixedID) *ProviderCreate
SetID sets the "id" field.
func (*ProviderCreate) SetInput ¶
func (c *ProviderCreate) SetInput(i CreateLoadBalancerProviderInput) *ProviderCreate
SetInput applies the change-set in the CreateLoadBalancerProviderInput on the ProviderCreate builder.
func (*ProviderCreate) SetName ¶
func (pc *ProviderCreate) SetName(s string) *ProviderCreate
SetName sets the "name" field.
func (*ProviderCreate) SetNillableCreatedAt ¶
func (pc *ProviderCreate) SetNillableCreatedAt(t *time.Time) *ProviderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProviderCreate) SetNillableID ¶
func (pc *ProviderCreate) SetNillableID(gi *gidx.PrefixedID) *ProviderCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ProviderCreate) SetNillableUpdatedAt ¶
func (pc *ProviderCreate) SetNillableUpdatedAt(t *time.Time) *ProviderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProviderCreate) SetOwnerID ¶ added in v0.0.18
func (pc *ProviderCreate) SetOwnerID(gi gidx.PrefixedID) *ProviderCreate
SetOwnerID sets the "owner_id" field.
func (*ProviderCreate) SetUpdatedAt ¶
func (pc *ProviderCreate) SetUpdatedAt(t time.Time) *ProviderCreate
SetUpdatedAt sets the "updated_at" field.
type ProviderCreateBulk ¶
type ProviderCreateBulk struct {
// contains filtered or unexported fields
}
ProviderCreateBulk is the builder for creating many Provider entities in bulk.
func (*ProviderCreateBulk) Exec ¶
func (pcb *ProviderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderCreateBulk) ExecX ¶
func (pcb *ProviderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProviderDelete ¶
type ProviderDelete struct {
// contains filtered or unexported fields
}
ProviderDelete is the builder for deleting a Provider entity.
func (*ProviderDelete) Exec ¶
func (pd *ProviderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProviderDelete) ExecX ¶
func (pd *ProviderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProviderDelete) Where ¶
func (pd *ProviderDelete) Where(ps ...predicate.Provider) *ProviderDelete
Where appends a list predicates to the ProviderDelete builder.
type ProviderDeleteOne ¶
type ProviderDeleteOne struct {
// contains filtered or unexported fields
}
ProviderDeleteOne is the builder for deleting a single Provider entity.
func (*ProviderDeleteOne) Exec ¶
func (pdo *ProviderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProviderDeleteOne) ExecX ¶
func (pdo *ProviderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderDeleteOne) Where ¶
func (pdo *ProviderDeleteOne) Where(ps ...predicate.Provider) *ProviderDeleteOne
Where appends a list predicates to the ProviderDelete builder.
type ProviderEdges ¶
type ProviderEdges struct { // LoadBalancers holds the value of the load_balancers edge. LoadBalancers []*LoadBalancer `json:"load_balancers,omitempty"` // contains filtered or unexported fields }
ProviderEdges holds the relations/edges for other nodes in the graph.
func (ProviderEdges) LoadBalancersOrErr ¶
func (e ProviderEdges) LoadBalancersOrErr() ([]*LoadBalancer, error)
LoadBalancersOrErr returns the LoadBalancers value or an error if the edge was not loaded in eager-loading.
type ProviderGroupBy ¶
type ProviderGroupBy struct {
// contains filtered or unexported fields
}
ProviderGroupBy is the group-by builder for Provider entities.
func (*ProviderGroupBy) Aggregate ¶
func (pgb *ProviderGroupBy) Aggregate(fns ...AggregateFunc) *ProviderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProviderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Scan ¶
func (pgb *ProviderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProviderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProviderMutation ¶
type ProviderMutation struct {
// contains filtered or unexported fields
}
ProviderMutation represents an operation that mutates the Provider nodes in the graph.
func (*ProviderMutation) AddField ¶
func (m *ProviderMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ProviderMutation) AddLoadBalancerIDs ¶
func (m *ProviderMutation) AddLoadBalancerIDs(ids ...gidx.PrefixedID)
AddLoadBalancerIDs adds the "load_balancers" edge to the LoadBalancer entity by ids.
func (*ProviderMutation) AddedEdges ¶
func (m *ProviderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProviderMutation) AddedField ¶
func (m *ProviderMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ProviderMutation) AddedFields ¶
func (m *ProviderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProviderMutation) AddedIDs ¶
func (m *ProviderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProviderMutation) ClearEdge ¶
func (m *ProviderMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*ProviderMutation) ClearField ¶
func (m *ProviderMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*ProviderMutation) ClearLoadBalancers ¶
func (m *ProviderMutation) ClearLoadBalancers()
ClearLoadBalancers clears the "load_balancers" edge to the LoadBalancer entity.
func (*ProviderMutation) ClearedEdges ¶
func (m *ProviderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProviderMutation) ClearedFields ¶
func (m *ProviderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProviderMutation) Client ¶
func (m ProviderMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*ProviderMutation) CreatedAt ¶
func (m *ProviderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProviderMutation) EdgeCleared ¶
func (m *ProviderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProviderMutation) Field ¶
func (m *ProviderMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*ProviderMutation) FieldCleared ¶
func (m *ProviderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProviderMutation) Fields ¶
func (m *ProviderMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*ProviderMutation) ID ¶
func (m *ProviderMutation) ID() (id gidx.PrefixedID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ProviderMutation) IDs ¶
func (m *ProviderMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProviderMutation) LoadBalancersCleared ¶
func (m *ProviderMutation) LoadBalancersCleared() bool
LoadBalancersCleared reports if the "load_balancers" edge to the LoadBalancer entity was cleared.
func (*ProviderMutation) LoadBalancersIDs ¶
func (m *ProviderMutation) LoadBalancersIDs() (ids []gidx.PrefixedID)
LoadBalancersIDs returns the "load_balancers" edge IDs in the mutation.
func (*ProviderMutation) Name ¶
func (m *ProviderMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProviderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProviderMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ProviderMutation) OldName ¶
func (m *ProviderMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProviderMutation) OldOwnerID ¶ added in v0.0.18
func (m *ProviderMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
OldOwnerID returns the old "owner_id" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProviderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProviderMutation) OwnerID ¶ added in v0.0.18
func (m *ProviderMutation) OwnerID() (r gidx.PrefixedID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*ProviderMutation) RemoveLoadBalancerIDs ¶
func (m *ProviderMutation) RemoveLoadBalancerIDs(ids ...gidx.PrefixedID)
RemoveLoadBalancerIDs removes the "load_balancers" edge to the LoadBalancer entity by IDs.
func (*ProviderMutation) RemovedEdges ¶
func (m *ProviderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProviderMutation) RemovedIDs ¶
func (m *ProviderMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*ProviderMutation) RemovedLoadBalancersIDs ¶
func (m *ProviderMutation) RemovedLoadBalancersIDs() (ids []gidx.PrefixedID)
RemovedLoadBalancers returns the removed IDs of the "load_balancers" edge to the LoadBalancer entity.
func (*ProviderMutation) ResetCreatedAt ¶
func (m *ProviderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProviderMutation) ResetEdge ¶
func (m *ProviderMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*ProviderMutation) ResetField ¶
func (m *ProviderMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*ProviderMutation) ResetLoadBalancers ¶
func (m *ProviderMutation) ResetLoadBalancers()
ResetLoadBalancers resets all changes to the "load_balancers" edge.
func (*ProviderMutation) ResetName ¶
func (m *ProviderMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProviderMutation) ResetOwnerID ¶ added in v0.0.18
func (m *ProviderMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*ProviderMutation) ResetUpdatedAt ¶
func (m *ProviderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProviderMutation) SetCreatedAt ¶
func (m *ProviderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProviderMutation) SetField ¶
func (m *ProviderMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ProviderMutation) SetID ¶
func (m *ProviderMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Provider entities.
func (*ProviderMutation) SetName ¶
func (m *ProviderMutation) SetName(s string)
SetName sets the "name" field.
func (*ProviderMutation) SetOp ¶
func (m *ProviderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProviderMutation) SetOwnerID ¶ added in v0.0.18
func (m *ProviderMutation) SetOwnerID(gi gidx.PrefixedID)
SetOwnerID sets the "owner_id" field.
func (*ProviderMutation) SetUpdatedAt ¶
func (m *ProviderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ProviderMutation) Tx ¶
func (m ProviderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProviderMutation) Type ¶
func (m *ProviderMutation) Type() string
Type returns the node type of this mutation (Provider).
func (*ProviderMutation) UpdatedAt ¶
func (m *ProviderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProviderMutation) Where ¶
func (m *ProviderMutation) Where(ps ...predicate.Provider)
Where appends a list predicates to the ProviderMutation builder.
func (*ProviderMutation) WhereP ¶
func (m *ProviderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProviderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProviderQuery ¶
type ProviderQuery struct {
// contains filtered or unexported fields
}
ProviderQuery is the builder for querying Provider entities.
func (*ProviderQuery) Aggregate ¶
func (pq *ProviderQuery) Aggregate(fns ...AggregateFunc) *ProviderSelect
Aggregate returns a ProviderSelect configured with the given aggregations.
func (*ProviderQuery) All ¶
func (pq *ProviderQuery) All(ctx context.Context) ([]*Provider, error)
All executes the query and returns a list of Providers.
func (*ProviderQuery) AllX ¶
func (pq *ProviderQuery) AllX(ctx context.Context) []*Provider
AllX is like All, but panics if an error occurs.
func (*ProviderQuery) Clone ¶
func (pq *ProviderQuery) Clone() *ProviderQuery
Clone returns a duplicate of the ProviderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProviderQuery) CollectFields ¶
func (pr *ProviderQuery) CollectFields(ctx context.Context, satisfies ...string) (*ProviderQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*ProviderQuery) Count ¶
func (pq *ProviderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProviderQuery) CountX ¶
func (pq *ProviderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProviderQuery) Exist ¶
func (pq *ProviderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProviderQuery) ExistX ¶
func (pq *ProviderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProviderQuery) First ¶
func (pq *ProviderQuery) First(ctx context.Context) (*Provider, error)
First returns the first Provider entity from the query. Returns a *NotFoundError when no Provider was found.
func (*ProviderQuery) FirstID ¶
func (pq *ProviderQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first Provider ID from the query. Returns a *NotFoundError when no Provider ID was found.
func (*ProviderQuery) FirstIDX ¶
func (pq *ProviderQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProviderQuery) FirstX ¶
func (pq *ProviderQuery) FirstX(ctx context.Context) *Provider
FirstX is like First, but panics if an error occurs.
func (*ProviderQuery) GroupBy ¶
func (pq *ProviderQuery) GroupBy(field string, fields ...string) *ProviderGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Provider.Query(). GroupBy(provider.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*ProviderQuery) IDs ¶
func (pq *ProviderQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of Provider IDs.
func (*ProviderQuery) IDsX ¶
func (pq *ProviderQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*ProviderQuery) Limit ¶
func (pq *ProviderQuery) Limit(limit int) *ProviderQuery
Limit the number of records to be returned by this query.
func (*ProviderQuery) Offset ¶
func (pq *ProviderQuery) Offset(offset int) *ProviderQuery
Offset to start from.
func (*ProviderQuery) Only ¶
func (pq *ProviderQuery) Only(ctx context.Context) (*Provider, error)
Only returns a single Provider entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Provider entity is found. Returns a *NotFoundError when no Provider entities are found.
func (*ProviderQuery) OnlyID ¶
func (pq *ProviderQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only Provider ID in the query. Returns a *NotSingularError when more than one Provider ID is found. Returns a *NotFoundError when no entities are found.
func (*ProviderQuery) OnlyIDX ¶
func (pq *ProviderQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProviderQuery) OnlyX ¶
func (pq *ProviderQuery) OnlyX(ctx context.Context) *Provider
OnlyX is like Only, but panics if an error occurs.
func (*ProviderQuery) Order ¶
func (pq *ProviderQuery) Order(o ...provider.OrderOption) *ProviderQuery
Order specifies how the records should be ordered.
func (*ProviderQuery) Paginate ¶
func (pr *ProviderQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...LoadBalancerProviderPaginateOption, ) (*LoadBalancerProviderConnection, error)
Paginate executes the query and returns a relay based cursor connection to LoadBalancerProvider.
func (*ProviderQuery) QueryLoadBalancers ¶
func (pq *ProviderQuery) QueryLoadBalancers() *LoadBalancerQuery
QueryLoadBalancers chains the current query on the "load_balancers" edge.
func (*ProviderQuery) Select ¶
func (pq *ProviderQuery) Select(fields ...string) *ProviderSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Provider.Query(). Select(provider.FieldCreatedAt). Scan(ctx, &v)
func (*ProviderQuery) Unique ¶
func (pq *ProviderQuery) Unique(unique bool) *ProviderQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ProviderQuery) Where ¶
func (pq *ProviderQuery) Where(ps ...predicate.Provider) *ProviderQuery
Where adds a new predicate for the ProviderQuery builder.
func (*ProviderQuery) WithLoadBalancers ¶
func (pq *ProviderQuery) WithLoadBalancers(opts ...func(*LoadBalancerQuery)) *ProviderQuery
WithLoadBalancers tells the query-builder to eager-load the nodes that are connected to the "load_balancers" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProviderQuery) WithNamedLoadBalancers ¶
func (pq *ProviderQuery) WithNamedLoadBalancers(name string, opts ...func(*LoadBalancerQuery)) *ProviderQuery
WithNamedLoadBalancers tells the query-builder to eager-load the nodes that are connected to the "load_balancers" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type ProviderSelect ¶
type ProviderSelect struct { *ProviderQuery // contains filtered or unexported fields }
ProviderSelect is the builder for selecting fields of Provider entities.
func (*ProviderSelect) Aggregate ¶
func (ps *ProviderSelect) Aggregate(fns ...AggregateFunc) *ProviderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProviderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Scan ¶
func (ps *ProviderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProviderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProviderUpdate ¶
type ProviderUpdate struct {
// contains filtered or unexported fields
}
ProviderUpdate is the builder for updating Provider entities.
func (*ProviderUpdate) AddLoadBalancerIDs ¶
func (pu *ProviderUpdate) AddLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderUpdate
AddLoadBalancerIDs adds the "load_balancers" edge to the LoadBalancer entity by IDs.
func (*ProviderUpdate) AddLoadBalancers ¶
func (pu *ProviderUpdate) AddLoadBalancers(l ...*LoadBalancer) *ProviderUpdate
AddLoadBalancers adds the "load_balancers" edges to the LoadBalancer entity.
func (*ProviderUpdate) ClearLoadBalancers ¶
func (pu *ProviderUpdate) ClearLoadBalancers() *ProviderUpdate
ClearLoadBalancers clears all "load_balancers" edges to the LoadBalancer entity.
func (*ProviderUpdate) Exec ¶
func (pu *ProviderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderUpdate) ExecX ¶
func (pu *ProviderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderUpdate) Mutation ¶
func (pu *ProviderUpdate) Mutation() *ProviderMutation
Mutation returns the ProviderMutation object of the builder.
func (*ProviderUpdate) RemoveLoadBalancerIDs ¶
func (pu *ProviderUpdate) RemoveLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderUpdate
RemoveLoadBalancerIDs removes the "load_balancers" edge to LoadBalancer entities by IDs.
func (*ProviderUpdate) RemoveLoadBalancers ¶
func (pu *ProviderUpdate) RemoveLoadBalancers(l ...*LoadBalancer) *ProviderUpdate
RemoveLoadBalancers removes "load_balancers" edges to LoadBalancer entities.
func (*ProviderUpdate) Save ¶
func (pu *ProviderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProviderUpdate) SaveX ¶
func (pu *ProviderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProviderUpdate) SetInput ¶
func (c *ProviderUpdate) SetInput(i UpdateLoadBalancerProviderInput) *ProviderUpdate
SetInput applies the change-set in the UpdateLoadBalancerProviderInput on the ProviderUpdate builder.
func (*ProviderUpdate) SetName ¶
func (pu *ProviderUpdate) SetName(s string) *ProviderUpdate
SetName sets the "name" field.
func (*ProviderUpdate) Where ¶
func (pu *ProviderUpdate) Where(ps ...predicate.Provider) *ProviderUpdate
Where appends a list predicates to the ProviderUpdate builder.
type ProviderUpdateOne ¶
type ProviderUpdateOne struct {
// contains filtered or unexported fields
}
ProviderUpdateOne is the builder for updating a single Provider entity.
func (*ProviderUpdateOne) AddLoadBalancerIDs ¶
func (puo *ProviderUpdateOne) AddLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderUpdateOne
AddLoadBalancerIDs adds the "load_balancers" edge to the LoadBalancer entity by IDs.
func (*ProviderUpdateOne) AddLoadBalancers ¶
func (puo *ProviderUpdateOne) AddLoadBalancers(l ...*LoadBalancer) *ProviderUpdateOne
AddLoadBalancers adds the "load_balancers" edges to the LoadBalancer entity.
func (*ProviderUpdateOne) ClearLoadBalancers ¶
func (puo *ProviderUpdateOne) ClearLoadBalancers() *ProviderUpdateOne
ClearLoadBalancers clears all "load_balancers" edges to the LoadBalancer entity.
func (*ProviderUpdateOne) Exec ¶
func (puo *ProviderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProviderUpdateOne) ExecX ¶
func (puo *ProviderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderUpdateOne) Mutation ¶
func (puo *ProviderUpdateOne) Mutation() *ProviderMutation
Mutation returns the ProviderMutation object of the builder.
func (*ProviderUpdateOne) RemoveLoadBalancerIDs ¶
func (puo *ProviderUpdateOne) RemoveLoadBalancerIDs(ids ...gidx.PrefixedID) *ProviderUpdateOne
RemoveLoadBalancerIDs removes the "load_balancers" edge to LoadBalancer entities by IDs.
func (*ProviderUpdateOne) RemoveLoadBalancers ¶
func (puo *ProviderUpdateOne) RemoveLoadBalancers(l ...*LoadBalancer) *ProviderUpdateOne
RemoveLoadBalancers removes "load_balancers" edges to LoadBalancer entities.
func (*ProviderUpdateOne) Save ¶
func (puo *ProviderUpdateOne) Save(ctx context.Context) (*Provider, error)
Save executes the query and returns the updated Provider entity.
func (*ProviderUpdateOne) SaveX ¶
func (puo *ProviderUpdateOne) SaveX(ctx context.Context) *Provider
SaveX is like Save, but panics if an error occurs.
func (*ProviderUpdateOne) Select ¶
func (puo *ProviderUpdateOne) Select(field string, fields ...string) *ProviderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProviderUpdateOne) SetInput ¶
func (c *ProviderUpdateOne) SetInput(i UpdateLoadBalancerProviderInput) *ProviderUpdateOne
SetInput applies the change-set in the UpdateLoadBalancerProviderInput on the ProviderUpdateOne builder.
func (*ProviderUpdateOne) SetName ¶
func (puo *ProviderUpdateOne) SetName(s string) *ProviderUpdateOne
SetName sets the "name" field.
func (*ProviderUpdateOne) Where ¶
func (puo *ProviderUpdateOne) Where(ps ...predicate.Provider) *ProviderUpdateOne
Where appends a list predicates to the ProviderUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // LoadBalancer is the client for interacting with the LoadBalancer builders. LoadBalancer *LoadBalancerClient // Origin is the client for interacting with the Origin builders. Origin *OriginClient // Pool is the client for interacting with the Pool builders. Pool *PoolClient // Port is the client for interacting with the Port builders. Port *PortClient // Provider is the client for interacting with the Provider builders. Provider *ProviderClient // 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 UpdateLoadBalancerInput ¶
type UpdateLoadBalancerInput struct { Name *string ClearPorts bool AddPortIDs []gidx.PrefixedID RemovePortIDs []gidx.PrefixedID }
UpdateLoadBalancerInput represents a mutation input for updating loadbalancers.
func (*UpdateLoadBalancerInput) Mutate ¶
func (i *UpdateLoadBalancerInput) Mutate(m *LoadBalancerMutation)
Mutate applies the UpdateLoadBalancerInput on the LoadBalancerMutation builder.
type UpdateLoadBalancerOriginInput ¶
type UpdateLoadBalancerOriginInput struct { Name *string Target *string PortNumber *int Active *bool }
UpdateLoadBalancerOriginInput represents a mutation input for updating loadbalancerorigins.
func (*UpdateLoadBalancerOriginInput) Mutate ¶
func (i *UpdateLoadBalancerOriginInput) Mutate(m *OriginMutation)
Mutate applies the UpdateLoadBalancerOriginInput on the OriginMutation builder.
type UpdateLoadBalancerPoolInput ¶
type UpdateLoadBalancerPoolInput struct { Name *string Protocol *pool.Protocol ClearPorts bool AddPortIDs []gidx.PrefixedID RemovePortIDs []gidx.PrefixedID ClearOrigins bool AddOriginIDs []gidx.PrefixedID RemoveOriginIDs []gidx.PrefixedID }
UpdateLoadBalancerPoolInput represents a mutation input for updating loadbalancerpools.
func (*UpdateLoadBalancerPoolInput) Mutate ¶
func (i *UpdateLoadBalancerPoolInput) Mutate(m *PoolMutation)
Mutate applies the UpdateLoadBalancerPoolInput on the PoolMutation builder.
type UpdateLoadBalancerPortInput ¶
type UpdateLoadBalancerPortInput struct { Number *int Name *string ClearPools bool AddPoolIDs []gidx.PrefixedID RemovePoolIDs []gidx.PrefixedID }
UpdateLoadBalancerPortInput represents a mutation input for updating loadbalancerports.
func (*UpdateLoadBalancerPortInput) Mutate ¶
func (i *UpdateLoadBalancerPortInput) Mutate(m *PortMutation)
Mutate applies the UpdateLoadBalancerPortInput on the PortMutation builder.
type UpdateLoadBalancerProviderInput ¶
type UpdateLoadBalancerProviderInput struct {
Name *string
}
UpdateLoadBalancerProviderInput represents a mutation input for updating loadbalancerproviders.
func (*UpdateLoadBalancerProviderInput) Mutate ¶
func (i *UpdateLoadBalancerProviderInput) Mutate(m *ProviderMutation)
Mutate applies the UpdateLoadBalancerProviderInput on the ProviderMutation builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- ent.go
- gql_collection.go
- gql_edge.go
- gql_mutation_input.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- ip_addressable.go
- loadbalancer.go
- loadbalancer_create.go
- loadbalancer_delete.go
- loadbalancer_query.go
- loadbalancer_update.go
- mutation.go
- origin.go
- origin_create.go
- origin_delete.go
- origin_query.go
- origin_update.go
- pool.go
- pool_create.go
- pool_delete.go
- pool_query.go
- pool_update.go
- port.go
- port_create.go
- port_delete.go
- port_query.go
- port_update.go
- provider.go
- provider_create.go
- provider_delete.go
- provider_query.go
- provider_update.go
- runtime.go
- tx.go