generated

package
v0.0.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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,
			}
		},
	}
)
View Source
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,
			}
		},
	}
)
View Source
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,
			}
		},
	}
)
View Source
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,
			}
		},
	}
)
View Source
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,
			}
		},
	}
)
View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
var ErrEmptyLoadBalancerOriginWhereInput = errors.New("generated: empty predicate LoadBalancerOriginWhereInput")

ErrEmptyLoadBalancerOriginWhereInput is returned in case the LoadBalancerOriginWhereInput is empty.

View Source
var ErrEmptyLoadBalancerPoolWhereInput = errors.New("generated: empty predicate LoadBalancerPoolWhereInput")

ErrEmptyLoadBalancerPoolWhereInput is returned in case the LoadBalancerPoolWhereInput is empty.

View Source
var ErrEmptyLoadBalancerPortWhereInput = errors.New("generated: empty predicate LoadBalancerPortWhereInput")

ErrEmptyLoadBalancerPortWhereInput is returned in case the LoadBalancerPortWhereInput is empty.

View Source
var ErrEmptyLoadBalancerProviderWhereInput = errors.New("generated: empty predicate LoadBalancerProviderWhereInput")

ErrEmptyLoadBalancerProviderWhereInput is returned in case the LoadBalancerProviderWhereInput is empty.

View Source
var ErrEmptyLoadBalancerWhereInput = errors.New("generated: empty predicate LoadBalancerWhereInput")

ErrEmptyLoadBalancerWhereInput is returned in case the LoadBalancerWhereInput is empty.

View Source
var ErrTxStarted = errors.New("generated: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

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) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

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

func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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 Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

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

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

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

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

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

Mutate applies the CreateLoadBalancerProviderInput on the ProviderMutation builder.

type Cursor

type Cursor = entgql.Cursor[gidx.PrefixedID]

Common entgql types.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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) IsMetadataNode added in v0.0.27

func (lb LoadBalancer) IsMetadataNode()

IsMetadataNode implements interface for MetadataNode

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.

func (*LoadBalancer) Value

func (lb *LoadBalancer) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the LoadBalancer. This includes values selected through modifiers, order, etc.

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

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

Delete returns a delete builder for LoadBalancer.

func (*LoadBalancerClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*LoadBalancerClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*LoadBalancerClient) Get

Get returns a LoadBalancer entity by its id.

func (*LoadBalancerClient) GetX

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) MapCreateBulk added in v0.0.29

func (c *LoadBalancerClient) MapCreateBulk(slice any, setFunc func(*LoadBalancerCreate, int)) *LoadBalancerCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*LoadBalancerClient) Query

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

Update returns an update builder for LoadBalancer.

func (*LoadBalancerClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*LoadBalancerClient) UpdateOneID

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

Save creates the LoadBalancer in the database.

func (*LoadBalancerCreate) SaveX

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

SetID sets the "id" field.

func (*LoadBalancerCreate) SetInput

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

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

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

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

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

func (s *LoadBalancerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*LoadBalancerGroupBy) BoolX

func (s *LoadBalancerGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*LoadBalancerGroupBy) Bools

func (s *LoadBalancerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*LoadBalancerGroupBy) BoolsX

func (s *LoadBalancerGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*LoadBalancerGroupBy) Float64

func (s *LoadBalancerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*LoadBalancerGroupBy) Float64X

func (s *LoadBalancerGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*LoadBalancerGroupBy) Float64s

func (s *LoadBalancerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*LoadBalancerGroupBy) Float64sX

func (s *LoadBalancerGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*LoadBalancerGroupBy) Int

func (s *LoadBalancerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*LoadBalancerGroupBy) IntX

func (s *LoadBalancerGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*LoadBalancerGroupBy) Ints

func (s *LoadBalancerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*LoadBalancerGroupBy) IntsX

func (s *LoadBalancerGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *LoadBalancerGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*LoadBalancerGroupBy) String

func (s *LoadBalancerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*LoadBalancerGroupBy) StringX

func (s *LoadBalancerGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*LoadBalancerGroupBy) Strings

func (s *LoadBalancerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*LoadBalancerGroupBy) StringsX

func (s *LoadBalancerGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

func (m *LoadBalancerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *LoadBalancerMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *LoadBalancerMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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

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

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

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

Filter applies the LoadBalancerOriginWhereInput filter on the OriginQuery builder.

func (*LoadBalancerOriginWhereInput) P

P returns a predicate for filtering origins. An error is returned if the input is empty or invalid.

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

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

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.

func (*LoadBalancerPoolWhereInput) Filter

Filter applies the LoadBalancerPoolWhereInput filter on the PoolQuery builder.

func (*LoadBalancerPoolWhereInput) P

P returns a predicate for filtering pools. An error is returned if the input is empty or invalid.

type LoadBalancerPort

type LoadBalancerPort = Port

LoadBalancerPort is the type alias for Port.

func (*LoadBalancerPort) ToEdge

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

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.

func (*LoadBalancerPortWhereInput) Filter

Filter applies the LoadBalancerPortWhereInput filter on the PortQuery builder.

func (*LoadBalancerPortWhereInput) P

P returns a predicate for filtering ports. An error is returned if the input is empty or invalid.

type LoadBalancerProvider

type LoadBalancerProvider = Provider

LoadBalancerProvider is the type alias for Provider.

func (*LoadBalancerProvider) ToEdge

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

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

Filter applies the LoadBalancerProviderWhereInput filter on the ProviderQuery builder.

func (*LoadBalancerProviderWhereInput) P

P returns a predicate for filtering providers. An error is returned if the input is empty or invalid.

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

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

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

func (s *LoadBalancerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*LoadBalancerSelect) BoolX

func (s *LoadBalancerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*LoadBalancerSelect) Bools

func (s *LoadBalancerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*LoadBalancerSelect) BoolsX

func (s *LoadBalancerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*LoadBalancerSelect) Float64

func (s *LoadBalancerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*LoadBalancerSelect) Float64X

func (s *LoadBalancerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*LoadBalancerSelect) Float64s

func (s *LoadBalancerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*LoadBalancerSelect) Float64sX

func (s *LoadBalancerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*LoadBalancerSelect) Int

func (s *LoadBalancerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*LoadBalancerSelect) IntX

func (s *LoadBalancerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*LoadBalancerSelect) Ints

func (s *LoadBalancerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*LoadBalancerSelect) IntsX

func (s *LoadBalancerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *LoadBalancerSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*LoadBalancerSelect) String

func (s *LoadBalancerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*LoadBalancerSelect) StringX

func (s *LoadBalancerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*LoadBalancerSelect) Strings

func (s *LoadBalancerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*LoadBalancerSelect) StringsX

func (s *LoadBalancerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

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

Save executes the query and returns the updated LoadBalancer entity.

func (*LoadBalancerUpdateOne) SaveX

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

SetInput applies the change-set in the UpdateLoadBalancerInput on the LoadBalancerUpdateOne builder.

func (*LoadBalancerUpdateOne) SetName

SetName sets the "name" field.

func (*LoadBalancerUpdateOne) Where

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

Filter applies the LoadBalancerWhereInput filter on the LoadBalancerQuery builder.

func (*LoadBalancerWhereInput) P

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 MetadataNode added in v0.0.27

type MetadataNode interface {
	IsMetadataNode()
}

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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 Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

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 Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func EventsPublisher added in v0.0.18

func EventsPublisher(v events.Connection) Option

EventsPublisher configures the EventsPublisher.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

type OrderFunc

type OrderFunc func(*sql.Selector)

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) IsEntity

func (o Origin) IsEntity()

IsEntity implement fedruntime.Entity

func (*Origin) IsNode

func (n *Origin) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Origin) Pool

func (o *Origin) Pool(ctx context.Context) (*Pool, error)

func (*Origin) QueryPool

func (o *Origin) QueryPool() *PoolQuery

QueryPool queries the "pool" edge of the Origin entity.

func (*Origin) String

func (o *Origin) String() string

String implements the fmt.Stringer.

func (*Origin) Unwrap

func (o *Origin) Unwrap() *Origin

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.

func (*Origin) Value

func (o *Origin) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Origin. This includes values selected through modifiers, order, etc.

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) Hooks

func (c *OriginClient) Hooks() []Hook

Hooks returns the client hooks.

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) MapCreateBulk added in v0.0.29

func (c *OriginClient) MapCreateBulk(slice any, setFunc func(*OriginCreate, int)) *OriginCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*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

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.

func (*OriginCreateBulk) Save

func (ocb *OriginCreateBulk) Save(ctx context.Context) ([]*Origin, error)

Save creates the Origin entities in the database.

func (*OriginCreateBulk) SaveX

func (ocb *OriginCreateBulk) SaveX(ctx context.Context) []*Origin

SaveX is like Save, 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

func (s *OriginGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OriginGroupBy) BoolX

func (s *OriginGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OriginGroupBy) Bools

func (s *OriginGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OriginGroupBy) BoolsX

func (s *OriginGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OriginGroupBy) Float64

func (s *OriginGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OriginGroupBy) Float64X

func (s *OriginGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OriginGroupBy) Float64s

func (s *OriginGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OriginGroupBy) Float64sX

func (s *OriginGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OriginGroupBy) Int

func (s *OriginGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OriginGroupBy) IntX

func (s *OriginGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OriginGroupBy) Ints

func (s *OriginGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OriginGroupBy) IntsX

func (s *OriginGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *OriginGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OriginGroupBy) String

func (s *OriginGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OriginGroupBy) StringX

func (s *OriginGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OriginGroupBy) Strings

func (s *OriginGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OriginGroupBy) StringsX

func (s *OriginGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

func (m *OriginMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *OriginMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *OriginMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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) Op

func (m *OriginMutation) Op() Op

Op returns the operation name.

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

func (s *OriginSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OriginSelect) BoolX

func (s *OriginSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OriginSelect) Bools

func (s *OriginSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OriginSelect) BoolsX

func (s *OriginSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OriginSelect) Float64

func (s *OriginSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OriginSelect) Float64X

func (s *OriginSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OriginSelect) Float64s

func (s *OriginSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OriginSelect) Float64sX

func (s *OriginSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OriginSelect) Int

func (s *OriginSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OriginSelect) IntX

func (s *OriginSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OriginSelect) Ints

func (s *OriginSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OriginSelect) IntsX

func (s *OriginSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *OriginSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OriginSelect) String

func (s *OriginSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OriginSelect) StringX

func (s *OriginSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OriginSelect) Strings

func (s *OriginSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OriginSelect) StringsX

func (s *OriginSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

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 Origins

type Origins []*Origin

Origins is a parsable slice of Origin.

type PageInfo

type PageInfo = entgql.PageInfo[gidx.PrefixedID]

Common entgql types.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

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) IsEntity

func (po Pool) IsEntity()

IsEntity implement fedruntime.Entity

func (*Pool) IsNode

func (n *Pool) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Pool) NamedOrigins

func (po *Pool) NamedOrigins(name string) ([]*Origin, error)

NamedOrigins returns the Origins named value or an error if the edge was not loaded in eager-loading with this name.

func (*Pool) NamedPorts

func (po *Pool) 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 (*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) Ports

func (po *Pool) Ports(ctx context.Context) (result []*Port, err error)

func (*Pool) QueryOrigins

func (po *Pool) QueryOrigins() *OriginQuery

QueryOrigins queries the "origins" edge of the Pool entity.

func (*Pool) QueryPorts

func (po *Pool) QueryPorts() *PortQuery

QueryPorts queries the "ports" edge of the Pool entity.

func (*Pool) String

func (po *Pool) String() string

String implements the fmt.Stringer.

func (*Pool) Unwrap

func (po *Pool) Unwrap() *Pool

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.

func (*Pool) Value

func (po *Pool) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Pool. This includes values selected through modifiers, order, etc.

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) Hooks

func (c *PoolClient) Hooks() []Hook

Hooks returns the client hooks.

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) MapCreateBulk added in v0.0.29

func (c *PoolClient) MapCreateBulk(slice any, setFunc func(*PoolCreate, int)) *PoolCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*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

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.

func (*PoolCreateBulk) Save

func (pcb *PoolCreateBulk) Save(ctx context.Context) ([]*Pool, error)

Save creates the Pool entities in the database.

func (*PoolCreateBulk) SaveX

func (pcb *PoolCreateBulk) SaveX(ctx context.Context) []*Pool

SaveX is like Save, 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

func (e PoolEdges) OriginsOrErr() ([]*Origin, error)

OriginsOrErr returns the Origins value or an error if the edge was not loaded in eager-loading.

func (PoolEdges) PortsOrErr

func (e PoolEdges) PortsOrErr() ([]*Port, error)

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

func (s *PoolGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PoolGroupBy) BoolX

func (s *PoolGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PoolGroupBy) Bools

func (s *PoolGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PoolGroupBy) BoolsX

func (s *PoolGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PoolGroupBy) Float64

func (s *PoolGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PoolGroupBy) Float64X

func (s *PoolGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PoolGroupBy) Float64s

func (s *PoolGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PoolGroupBy) Float64sX

func (s *PoolGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PoolGroupBy) Int

func (s *PoolGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PoolGroupBy) IntX

func (s *PoolGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PoolGroupBy) Ints

func (s *PoolGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PoolGroupBy) IntsX

func (s *PoolGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *PoolGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PoolGroupBy) String

func (s *PoolGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PoolGroupBy) StringX

func (s *PoolGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PoolGroupBy) Strings

func (s *PoolGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PoolGroupBy) StringsX

func (s *PoolGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *PoolMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *PoolMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *PoolMutation) OldProtocol(ctx context.Context) (v pool.Protocol, err error)

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

func (m *PoolMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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) Op

func (m *PoolMutation) Op() Op

Op returns the operation name.

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) All

func (pq *PoolQuery) All(ctx context.Context) ([]*Pool, error)

All executes the query and returns a list of Pools.

func (*PoolQuery) AllX

func (pq *PoolQuery) AllX(ctx context.Context) []*Pool

AllX is like All, but panics if an error occurs.

func (*PoolQuery) Clone

func (pq *PoolQuery) Clone() *PoolQuery

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

func (po *PoolQuery) CollectFields(ctx context.Context, satisfies ...string) (*PoolQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*PoolQuery) Count

func (pq *PoolQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PoolQuery) CountX

func (pq *PoolQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PoolQuery) Exist

func (pq *PoolQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PoolQuery) ExistX

func (pq *PoolQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PoolQuery) First

func (pq *PoolQuery) First(ctx context.Context) (*Pool, error)

First returns the first Pool entity from the query. Returns a *NotFoundError when no Pool was found.

func (*PoolQuery) FirstID

func (pq *PoolQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)

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) FirstX

func (pq *PoolQuery) FirstX(ctx context.Context) *Pool

FirstX is like First, 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) IDs

func (pq *PoolQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)

IDs executes the query and returns a list of Pool IDs.

func (*PoolQuery) IDsX

func (pq *PoolQuery) IDsX(ctx context.Context) []gidx.PrefixedID

IDsX is like IDs, but panics if an error occurs.

func (*PoolQuery) Limit

func (pq *PoolQuery) Limit(limit int) *PoolQuery

Limit the number of records to be returned by this query.

func (*PoolQuery) Offset

func (pq *PoolQuery) Offset(offset int) *PoolQuery

Offset to start from.

func (*PoolQuery) Only

func (pq *PoolQuery) Only(ctx context.Context) (*Pool, error)

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

func (pq *PoolQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)

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) OnlyX

func (pq *PoolQuery) OnlyX(ctx context.Context) *Pool

OnlyX is like Only, 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

func (pq *PoolQuery) QueryPorts() *PortQuery

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

func (pq *PoolQuery) Unique(unique bool) *PoolQuery

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) Where

func (pq *PoolQuery) Where(ps ...predicate.Pool) *PoolQuery

Where adds a new predicate for the PoolQuery builder.

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

func (pq *PoolQuery) WithNamedPorts(name string, opts ...func(*PortQuery)) *PoolQuery

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.

func (*PoolQuery) WithPorts

func (pq *PoolQuery) WithPorts(opts ...func(*PortQuery)) *PoolQuery

WithPorts tells the query-builder to eager-load the nodes that are connected to the "ports" edge. The optional arguments are used to configure the query builder of the edge.

type 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

func (s *PoolSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PoolSelect) BoolX

func (s *PoolSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PoolSelect) Bools

func (s *PoolSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PoolSelect) BoolsX

func (s *PoolSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PoolSelect) Float64

func (s *PoolSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PoolSelect) Float64X

func (s *PoolSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PoolSelect) Float64s

func (s *PoolSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PoolSelect) Float64sX

func (s *PoolSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PoolSelect) Int

func (s *PoolSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PoolSelect) IntX

func (s *PoolSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PoolSelect) Ints

func (s *PoolSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PoolSelect) IntsX

func (s *PoolSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *PoolSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PoolSelect) String

func (s *PoolSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PoolSelect) StringX

func (s *PoolSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PoolSelect) Strings

func (s *PoolSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PoolSelect) StringsX

func (s *PoolSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

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 Pools

type Pools []*Pool

Pools is a parsable slice of Pool.

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) IsEntity

func (po Port) IsEntity()

IsEntity implement fedruntime.Entity

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

func (po *Port) NamedPools(name string) ([]*Pool, error)

NamedPools returns the Pools named value or an error if the edge was not loaded in eager-loading with this name.

func (*Port) Pools

func (po *Port) Pools(ctx context.Context) (result []*Pool, err error)

func (*Port) QueryLoadBalancer

func (po *Port) QueryLoadBalancer() *LoadBalancerQuery

QueryLoadBalancer queries the "load_balancer" edge of the Port entity.

func (*Port) QueryPools

func (po *Port) QueryPools() *PoolQuery

QueryPools queries the "pools" edge of the Port entity.

func (*Port) String

func (po *Port) String() string

String implements the fmt.Stringer.

func (*Port) Unwrap

func (po *Port) Unwrap() *Port

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.

func (*Port) Value

func (po *Port) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Port. This includes values selected through modifiers, order, etc.

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) Hooks

func (c *PortClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PortClient) Intercept

func (c *PortClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `port.Intercept(f(g(h())))`.

func (*PortClient) Interceptors

func (c *PortClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PortClient) MapCreateBulk added in v0.0.29

func (c *PortClient) MapCreateBulk(slice any, setFunc func(*PortCreate, int)) *PortCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*PortClient) Query

func (c *PortClient) Query() *PortQuery

Query returns a query builder for Port.

func (*PortClient) 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

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.

func (*PortCreateBulk) Save

func (pcb *PortCreateBulk) Save(ctx context.Context) ([]*Port, error)

Save creates the Port entities in the database.

func (*PortCreateBulk) SaveX

func (pcb *PortCreateBulk) SaveX(ctx context.Context) []*Port

SaveX is like Save, 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

func (e PortEdges) PoolsOrErr() ([]*Pool, error)

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

func (s *PortGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PortGroupBy) BoolX

func (s *PortGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PortGroupBy) Bools

func (s *PortGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PortGroupBy) BoolsX

func (s *PortGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PortGroupBy) Float64

func (s *PortGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PortGroupBy) Float64X

func (s *PortGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PortGroupBy) Float64s

func (s *PortGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PortGroupBy) Float64sX

func (s *PortGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PortGroupBy) Int

func (s *PortGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PortGroupBy) IntX

func (s *PortGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PortGroupBy) Ints

func (s *PortGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PortGroupBy) IntsX

func (s *PortGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *PortGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PortGroupBy) String

func (s *PortGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PortGroupBy) StringX

func (s *PortGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PortGroupBy) Strings

func (s *PortGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PortGroupBy) StringsX

func (s *PortGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *PortMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Port entity. If the Port object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PortMutation) OldField

func (m *PortMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *PortMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Port entity. If the Port object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PortMutation) Op

func (m *PortMutation) Op() Op

Op returns the operation name.

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) All

func (pq *PortQuery) All(ctx context.Context) ([]*Port, error)

All executes the query and returns a list of Ports.

func (*PortQuery) AllX

func (pq *PortQuery) AllX(ctx context.Context) []*Port

AllX is like All, but panics if an error occurs.

func (*PortQuery) Clone

func (pq *PortQuery) Clone() *PortQuery

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

func (po *PortQuery) CollectFields(ctx context.Context, satisfies ...string) (*PortQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*PortQuery) Count

func (pq *PortQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PortQuery) CountX

func (pq *PortQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PortQuery) Exist

func (pq *PortQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PortQuery) ExistX

func (pq *PortQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PortQuery) First

func (pq *PortQuery) First(ctx context.Context) (*Port, error)

First returns the first Port entity from the query. Returns a *NotFoundError when no Port was found.

func (*PortQuery) FirstID

func (pq *PortQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)

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) FirstX

func (pq *PortQuery) FirstX(ctx context.Context) *Port

FirstX is like First, 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) IDs

func (pq *PortQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)

IDs executes the query and returns a list of Port IDs.

func (*PortQuery) IDsX

func (pq *PortQuery) IDsX(ctx context.Context) []gidx.PrefixedID

IDsX is like IDs, but panics if an error occurs.

func (*PortQuery) Limit

func (pq *PortQuery) Limit(limit int) *PortQuery

Limit the number of records to be returned by this query.

func (*PortQuery) Offset

func (pq *PortQuery) Offset(offset int) *PortQuery

Offset to start from.

func (*PortQuery) Only

func (pq *PortQuery) Only(ctx context.Context) (*Port, error)

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

func (pq *PortQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)

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) OnlyX

func (pq *PortQuery) OnlyX(ctx context.Context) *Port

OnlyX is like Only, 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

func (pq *PortQuery) QueryPools() *PoolQuery

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

func (pq *PortQuery) Unique(unique bool) *PortQuery

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) Where

func (pq *PortQuery) Where(ps ...predicate.Port) *PortQuery

Where adds a new predicate for the PortQuery builder.

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

func (pq *PortQuery) WithNamedPools(name string, opts ...func(*PoolQuery)) *PortQuery

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.

func (*PortQuery) WithPools

func (pq *PortQuery) WithPools(opts ...func(*PoolQuery)) *PortQuery

WithPools tells the query-builder to eager-load the nodes that are connected to the "pools" edge. The optional arguments are used to configure the query builder of the edge.

type PortSelect

type PortSelect struct {
	*PortQuery
	// contains filtered or unexported fields
}

PortSelect is the builder for selecting fields of Port entities.

func (*PortSelect) Aggregate

func (ps *PortSelect) Aggregate(fns ...AggregateFunc) *PortSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PortSelect) Bool

func (s *PortSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PortSelect) BoolX

func (s *PortSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PortSelect) Bools

func (s *PortSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PortSelect) BoolsX

func (s *PortSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PortSelect) Float64

func (s *PortSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PortSelect) Float64X

func (s *PortSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PortSelect) Float64s

func (s *PortSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PortSelect) Float64sX

func (s *PortSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PortSelect) Int

func (s *PortSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PortSelect) IntX

func (s *PortSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PortSelect) Ints

func (s *PortSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PortSelect) IntsX

func (s *PortSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *PortSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PortSelect) String

func (s *PortSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PortSelect) StringX

func (s *PortSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PortSelect) Strings

func (s *PortSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PortSelect) StringsX

func (s *PortSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

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 Ports

type Ports []*Port

Ports is a parsable slice of Port.

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) IsEntity

func (pr Provider) IsEntity()

IsEntity implement fedruntime.Entity

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) String

func (pr *Provider) String() string

String implements the fmt.Stringer.

func (*Provider) Unwrap

func (pr *Provider) Unwrap() *Provider

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.

func (*Provider) Value

func (pr *Provider) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Provider. This includes values selected through modifiers, order, etc.

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

Get returns a Provider entity by its id.

func (*ProviderClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ProviderClient) Hooks

func (c *ProviderClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProviderClient) Intercept

func (c *ProviderClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `provider.Intercept(f(g(h())))`.

func (*ProviderClient) Interceptors

func (c *ProviderClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProviderClient) MapCreateBulk added in v0.0.29

func (c *ProviderClient) MapCreateBulk(slice any, setFunc func(*ProviderCreate, int)) *ProviderCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ProviderClient) Query

func (c *ProviderClient) Query() *ProviderQuery

Query returns a query builder for Provider.

func (*ProviderClient) 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

SetID sets the "id" field.

func (*ProviderCreate) SetInput

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.

func (*ProviderCreateBulk) Save

func (pcb *ProviderCreateBulk) Save(ctx context.Context) ([]*Provider, error)

Save creates the Provider entities in the database.

func (*ProviderCreateBulk) SaveX

func (pcb *ProviderCreateBulk) SaveX(ctx context.Context) []*Provider

SaveX is like Save, 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

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

func (s *ProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) BoolX

func (s *ProviderGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProviderGroupBy) Bools

func (s *ProviderGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) BoolsX

func (s *ProviderGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProviderGroupBy) Float64

func (s *ProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) Float64X

func (s *ProviderGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProviderGroupBy) Float64s

func (s *ProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) Float64sX

func (s *ProviderGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProviderGroupBy) Int

func (s *ProviderGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) IntX

func (s *ProviderGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProviderGroupBy) Ints

func (s *ProviderGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) IntsX

func (s *ProviderGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *ProviderGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProviderGroupBy) String

func (s *ProviderGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) StringX

func (s *ProviderGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProviderGroupBy) Strings

func (s *ProviderGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) StringsX

func (s *ProviderGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

func (m *ProviderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *ProviderMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *ProviderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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) Op

func (m *ProviderMutation) Op() Op

Op returns the operation name.

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

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

func (s *ProviderSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) BoolX

func (s *ProviderSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProviderSelect) Bools

func (s *ProviderSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) BoolsX

func (s *ProviderSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProviderSelect) Float64

func (s *ProviderSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) Float64X

func (s *ProviderSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProviderSelect) Float64s

func (s *ProviderSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) Float64sX

func (s *ProviderSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProviderSelect) Int

func (s *ProviderSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) IntX

func (s *ProviderSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProviderSelect) Ints

func (s *ProviderSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) IntsX

func (s *ProviderSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *ProviderSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProviderSelect) String

func (s *ProviderSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) StringX

func (s *ProviderSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProviderSelect) Strings

func (s *ProviderSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) StringsX

func (s *ProviderSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

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

Where appends a list predicates to the ProviderUpdate builder.

type Providers

type Providers []*Provider

Providers is a parsable slice of Provider.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

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

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

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

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

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 Traverser

type Traverser = ent.Traverser

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

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

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

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

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

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

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

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.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL