Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Noder(ctx context.Context, id gidx.PrefixedID, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []gidx.PrefixedID, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CreateIPAddressInput
- type CreateIPBlockInput
- type CreateIPBlockTypeInput
- type Cursor
- type Hook
- type IPAddress
- func (ia *IPAddress) IPBlock(ctx context.Context) (*IPBlock, error)
- func (ia IPAddress) IsEntity()
- func (n *IPAddress) IsNode()
- func (ia *IPAddress) QueryIPBlock() *IPBlockQuery
- func (ia *IPAddress) String() string
- func (ia *IPAddress) ToEdge(order *IPAddressOrder) *IPAddressEdge
- func (ia *IPAddress) Unwrap() *IPAddress
- func (ia *IPAddress) Update() *IPAddressUpdateOne
- func (ia *IPAddress) Value(name string) (ent.Value, error)
- type IPAddressClient
- func (c *IPAddressClient) Create() *IPAddressCreate
- func (c *IPAddressClient) CreateBulk(builders ...*IPAddressCreate) *IPAddressCreateBulk
- func (c *IPAddressClient) Delete() *IPAddressDelete
- func (c *IPAddressClient) DeleteOne(ia *IPAddress) *IPAddressDeleteOne
- func (c *IPAddressClient) DeleteOneID(id gidx.PrefixedID) *IPAddressDeleteOne
- func (c *IPAddressClient) Get(ctx context.Context, id gidx.PrefixedID) (*IPAddress, error)
- func (c *IPAddressClient) GetX(ctx context.Context, id gidx.PrefixedID) *IPAddress
- func (c *IPAddressClient) Hooks() []Hook
- func (c *IPAddressClient) Intercept(interceptors ...Interceptor)
- func (c *IPAddressClient) Interceptors() []Interceptor
- func (c *IPAddressClient) MapCreateBulk(slice any, setFunc func(*IPAddressCreate, int)) *IPAddressCreateBulk
- func (c *IPAddressClient) Query() *IPAddressQuery
- func (c *IPAddressClient) QueryIPBlock(ia *IPAddress) *IPBlockQuery
- func (c *IPAddressClient) Update() *IPAddressUpdate
- func (c *IPAddressClient) UpdateOne(ia *IPAddress) *IPAddressUpdateOne
- func (c *IPAddressClient) UpdateOneID(id gidx.PrefixedID) *IPAddressUpdateOne
- func (c *IPAddressClient) Use(hooks ...Hook)
- type IPAddressConnection
- type IPAddressCreate
- func (iac *IPAddressCreate) Exec(ctx context.Context) error
- func (iac *IPAddressCreate) ExecX(ctx context.Context)
- func (iac *IPAddressCreate) Mutation() *IPAddressMutation
- func (iac *IPAddressCreate) Save(ctx context.Context) (*IPAddress, error)
- func (iac *IPAddressCreate) SaveX(ctx context.Context) *IPAddress
- func (iac *IPAddressCreate) SetBlockID(gi gidx.PrefixedID) *IPAddressCreate
- func (iac *IPAddressCreate) SetCreatedAt(t time.Time) *IPAddressCreate
- func (iac *IPAddressCreate) SetID(gi gidx.PrefixedID) *IPAddressCreate
- func (iac *IPAddressCreate) SetIP(s string) *IPAddressCreate
- func (iac *IPAddressCreate) SetIPBlock(i *IPBlock) *IPAddressCreate
- func (iac *IPAddressCreate) SetIPBlockID(id gidx.PrefixedID) *IPAddressCreate
- func (c *IPAddressCreate) SetInput(i CreateIPAddressInput) *IPAddressCreate
- func (iac *IPAddressCreate) SetNillableCreatedAt(t *time.Time) *IPAddressCreate
- func (iac *IPAddressCreate) SetNillableID(gi *gidx.PrefixedID) *IPAddressCreate
- func (iac *IPAddressCreate) SetNillableReserved(b *bool) *IPAddressCreate
- func (iac *IPAddressCreate) SetNillableUpdatedAt(t *time.Time) *IPAddressCreate
- func (iac *IPAddressCreate) SetNodeID(gi gidx.PrefixedID) *IPAddressCreate
- func (iac *IPAddressCreate) SetNodeOwnerID(gi gidx.PrefixedID) *IPAddressCreate
- func (iac *IPAddressCreate) SetReserved(b bool) *IPAddressCreate
- func (iac *IPAddressCreate) SetUpdatedAt(t time.Time) *IPAddressCreate
- type IPAddressCreateBulk
- type IPAddressDelete
- type IPAddressDeleteOne
- type IPAddressEdge
- type IPAddressEdges
- type IPAddressGroupBy
- func (iagb *IPAddressGroupBy) Aggregate(fns ...AggregateFunc) *IPAddressGroupBy
- func (s *IPAddressGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *IPAddressGroupBy) BoolX(ctx context.Context) bool
- func (s *IPAddressGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *IPAddressGroupBy) BoolsX(ctx context.Context) []bool
- func (s *IPAddressGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *IPAddressGroupBy) Float64X(ctx context.Context) float64
- func (s *IPAddressGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *IPAddressGroupBy) Float64sX(ctx context.Context) []float64
- func (s *IPAddressGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *IPAddressGroupBy) IntX(ctx context.Context) int
- func (s *IPAddressGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *IPAddressGroupBy) IntsX(ctx context.Context) []int
- func (iagb *IPAddressGroupBy) Scan(ctx context.Context, v any) error
- func (s *IPAddressGroupBy) ScanX(ctx context.Context, v any)
- func (s *IPAddressGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *IPAddressGroupBy) StringX(ctx context.Context) string
- func (s *IPAddressGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *IPAddressGroupBy) StringsX(ctx context.Context) []string
- type IPAddressMutation
- func (m *IPAddressMutation) AddField(name string, value ent.Value) error
- func (m *IPAddressMutation) AddedEdges() []string
- func (m *IPAddressMutation) AddedField(name string) (ent.Value, bool)
- func (m *IPAddressMutation) AddedFields() []string
- func (m *IPAddressMutation) AddedIDs(name string) []ent.Value
- func (m *IPAddressMutation) BlockID() (r gidx.PrefixedID, exists bool)
- func (m *IPAddressMutation) ClearEdge(name string) error
- func (m *IPAddressMutation) ClearField(name string) error
- func (m *IPAddressMutation) ClearIPBlock()
- func (m *IPAddressMutation) ClearedEdges() []string
- func (m *IPAddressMutation) ClearedFields() []string
- func (m IPAddressMutation) Client() *Client
- func (m *IPAddressMutation) CreatedAt() (r time.Time, exists bool)
- func (m *IPAddressMutation) EdgeCleared(name string) bool
- func (m *IPAddressMutation) Field(name string) (ent.Value, bool)
- func (m *IPAddressMutation) FieldCleared(name string) bool
- func (m *IPAddressMutation) Fields() []string
- func (m *IPAddressMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *IPAddressMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *IPAddressMutation) IP() (r string, exists bool)
- func (m *IPAddressMutation) IPBlockCleared() bool
- func (m *IPAddressMutation) IPBlockID() (id gidx.PrefixedID, exists bool)
- func (m *IPAddressMutation) IPBlockIDs() (ids []gidx.PrefixedID)
- func (m *IPAddressMutation) NodeID() (r gidx.PrefixedID, exists bool)
- func (m *IPAddressMutation) NodeOwnerID() (r gidx.PrefixedID, exists bool)
- func (m *IPAddressMutation) OldBlockID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *IPAddressMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *IPAddressMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IPAddressMutation) OldIP(ctx context.Context) (v string, err error)
- func (m *IPAddressMutation) OldNodeID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *IPAddressMutation) OldNodeOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *IPAddressMutation) OldReserved(ctx context.Context) (v bool, err error)
- func (m *IPAddressMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *IPAddressMutation) Op() Op
- func (m *IPAddressMutation) RemovedEdges() []string
- func (m *IPAddressMutation) RemovedIDs(name string) []ent.Value
- func (m *IPAddressMutation) Reserved() (r bool, exists bool)
- func (m *IPAddressMutation) ResetBlockID()
- func (m *IPAddressMutation) ResetCreatedAt()
- func (m *IPAddressMutation) ResetEdge(name string) error
- func (m *IPAddressMutation) ResetField(name string) error
- func (m *IPAddressMutation) ResetIP()
- func (m *IPAddressMutation) ResetIPBlock()
- func (m *IPAddressMutation) ResetNodeID()
- func (m *IPAddressMutation) ResetNodeOwnerID()
- func (m *IPAddressMutation) ResetReserved()
- func (m *IPAddressMutation) ResetUpdatedAt()
- func (m *IPAddressMutation) SetBlockID(gi gidx.PrefixedID)
- func (m *IPAddressMutation) SetCreatedAt(t time.Time)
- func (m *IPAddressMutation) SetField(name string, value ent.Value) error
- func (m *IPAddressMutation) SetID(id gidx.PrefixedID)
- func (m *IPAddressMutation) SetIP(s string)
- func (m *IPAddressMutation) SetIPBlockID(id gidx.PrefixedID)
- func (m *IPAddressMutation) SetNodeID(gi gidx.PrefixedID)
- func (m *IPAddressMutation) SetNodeOwnerID(gi gidx.PrefixedID)
- func (m *IPAddressMutation) SetOp(op Op)
- func (m *IPAddressMutation) SetReserved(b bool)
- func (m *IPAddressMutation) SetUpdatedAt(t time.Time)
- func (m IPAddressMutation) Tx() (*Tx, error)
- func (m *IPAddressMutation) Type() string
- func (m *IPAddressMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *IPAddressMutation) Where(ps ...predicate.IPAddress)
- func (m *IPAddressMutation) WhereP(ps ...func(*sql.Selector))
- type IPAddressOrder
- type IPAddressOrderField
- type IPAddressPaginateOption
- type IPAddressQuery
- func (iaq *IPAddressQuery) Aggregate(fns ...AggregateFunc) *IPAddressSelect
- func (iaq *IPAddressQuery) All(ctx context.Context) ([]*IPAddress, error)
- func (iaq *IPAddressQuery) AllX(ctx context.Context) []*IPAddress
- func (iaq *IPAddressQuery) Clone() *IPAddressQuery
- func (ia *IPAddressQuery) CollectFields(ctx context.Context, satisfies ...string) (*IPAddressQuery, error)
- func (iaq *IPAddressQuery) Count(ctx context.Context) (int, error)
- func (iaq *IPAddressQuery) CountX(ctx context.Context) int
- func (iaq *IPAddressQuery) Exist(ctx context.Context) (bool, error)
- func (iaq *IPAddressQuery) ExistX(ctx context.Context) bool
- func (iaq *IPAddressQuery) First(ctx context.Context) (*IPAddress, error)
- func (iaq *IPAddressQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (iaq *IPAddressQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (iaq *IPAddressQuery) FirstX(ctx context.Context) *IPAddress
- func (iaq *IPAddressQuery) GroupBy(field string, fields ...string) *IPAddressGroupBy
- func (iaq *IPAddressQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (iaq *IPAddressQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (iaq *IPAddressQuery) Limit(limit int) *IPAddressQuery
- func (iaq *IPAddressQuery) Offset(offset int) *IPAddressQuery
- func (iaq *IPAddressQuery) Only(ctx context.Context) (*IPAddress, error)
- func (iaq *IPAddressQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (iaq *IPAddressQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (iaq *IPAddressQuery) OnlyX(ctx context.Context) *IPAddress
- func (iaq *IPAddressQuery) Order(o ...ipaddress.OrderOption) *IPAddressQuery
- func (ia *IPAddressQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*IPAddressConnection, error)
- func (iaq *IPAddressQuery) QueryIPBlock() *IPBlockQuery
- func (iaq *IPAddressQuery) Select(fields ...string) *IPAddressSelect
- func (iaq *IPAddressQuery) Unique(unique bool) *IPAddressQuery
- func (iaq *IPAddressQuery) Where(ps ...predicate.IPAddress) *IPAddressQuery
- func (iaq *IPAddressQuery) WithIPBlock(opts ...func(*IPBlockQuery)) *IPAddressQuery
- type IPAddressSelect
- func (ias *IPAddressSelect) Aggregate(fns ...AggregateFunc) *IPAddressSelect
- func (s *IPAddressSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *IPAddressSelect) BoolX(ctx context.Context) bool
- func (s *IPAddressSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *IPAddressSelect) BoolsX(ctx context.Context) []bool
- func (s *IPAddressSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *IPAddressSelect) Float64X(ctx context.Context) float64
- func (s *IPAddressSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *IPAddressSelect) Float64sX(ctx context.Context) []float64
- func (s *IPAddressSelect) Int(ctx context.Context) (_ int, err error)
- func (s *IPAddressSelect) IntX(ctx context.Context) int
- func (s *IPAddressSelect) Ints(ctx context.Context) ([]int, error)
- func (s *IPAddressSelect) IntsX(ctx context.Context) []int
- func (ias *IPAddressSelect) Scan(ctx context.Context, v any) error
- func (s *IPAddressSelect) ScanX(ctx context.Context, v any)
- func (s *IPAddressSelect) String(ctx context.Context) (_ string, err error)
- func (s *IPAddressSelect) StringX(ctx context.Context) string
- func (s *IPAddressSelect) Strings(ctx context.Context) ([]string, error)
- func (s *IPAddressSelect) StringsX(ctx context.Context) []string
- type IPAddressUpdate
- func (iau *IPAddressUpdate) Exec(ctx context.Context) error
- func (iau *IPAddressUpdate) ExecX(ctx context.Context)
- func (iau *IPAddressUpdate) Mutation() *IPAddressMutation
- func (iau *IPAddressUpdate) Save(ctx context.Context) (int, error)
- func (iau *IPAddressUpdate) SaveX(ctx context.Context) int
- func (iau *IPAddressUpdate) SetIP(s string) *IPAddressUpdate
- func (c *IPAddressUpdate) SetInput(i UpdateIPAddressInput) *IPAddressUpdate
- func (iau *IPAddressUpdate) SetNillableReserved(b *bool) *IPAddressUpdate
- func (iau *IPAddressUpdate) SetReserved(b bool) *IPAddressUpdate
- func (iau *IPAddressUpdate) Where(ps ...predicate.IPAddress) *IPAddressUpdate
- type IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) Exec(ctx context.Context) error
- func (iauo *IPAddressUpdateOne) ExecX(ctx context.Context)
- func (iauo *IPAddressUpdateOne) Mutation() *IPAddressMutation
- func (iauo *IPAddressUpdateOne) Save(ctx context.Context) (*IPAddress, error)
- func (iauo *IPAddressUpdateOne) SaveX(ctx context.Context) *IPAddress
- func (iauo *IPAddressUpdateOne) Select(field string, fields ...string) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) SetIP(s string) *IPAddressUpdateOne
- func (c *IPAddressUpdateOne) SetInput(i UpdateIPAddressInput) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) SetNillableReserved(b *bool) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) SetReserved(b bool) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) Where(ps ...predicate.IPAddress) *IPAddressUpdateOne
- type IPAddressWhereInput
- type IPAddresses
- type IPBlock
- func (ib *IPBlock) IPAddress(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*IPAddressConnection, error)
- func (ib *IPBlock) IPBlockType(ctx context.Context) (*IPBlockType, error)
- func (ib IPBlock) IsEntity()
- func (n *IPBlock) IsNode()
- func (ib *IPBlock) NamedIPAddress(name string) ([]*IPAddress, error)
- func (ib *IPBlock) QueryIPAddress() *IPAddressQuery
- func (ib *IPBlock) QueryIPBlockType() *IPBlockTypeQuery
- func (ib *IPBlock) String() string
- func (ib *IPBlock) ToEdge(order *IPBlockOrder) *IPBlockEdge
- func (ib *IPBlock) Unwrap() *IPBlock
- func (ib *IPBlock) Update() *IPBlockUpdateOne
- func (ib *IPBlock) Value(name string) (ent.Value, error)
- type IPBlockClient
- func (c *IPBlockClient) Create() *IPBlockCreate
- func (c *IPBlockClient) CreateBulk(builders ...*IPBlockCreate) *IPBlockCreateBulk
- func (c *IPBlockClient) Delete() *IPBlockDelete
- func (c *IPBlockClient) DeleteOne(ib *IPBlock) *IPBlockDeleteOne
- func (c *IPBlockClient) DeleteOneID(id gidx.PrefixedID) *IPBlockDeleteOne
- func (c *IPBlockClient) Get(ctx context.Context, id gidx.PrefixedID) (*IPBlock, error)
- func (c *IPBlockClient) GetX(ctx context.Context, id gidx.PrefixedID) *IPBlock
- func (c *IPBlockClient) Hooks() []Hook
- func (c *IPBlockClient) Intercept(interceptors ...Interceptor)
- func (c *IPBlockClient) Interceptors() []Interceptor
- func (c *IPBlockClient) MapCreateBulk(slice any, setFunc func(*IPBlockCreate, int)) *IPBlockCreateBulk
- func (c *IPBlockClient) Query() *IPBlockQuery
- func (c *IPBlockClient) QueryIPAddress(ib *IPBlock) *IPAddressQuery
- func (c *IPBlockClient) QueryIPBlockType(ib *IPBlock) *IPBlockTypeQuery
- func (c *IPBlockClient) Update() *IPBlockUpdate
- func (c *IPBlockClient) UpdateOne(ib *IPBlock) *IPBlockUpdateOne
- func (c *IPBlockClient) UpdateOneID(id gidx.PrefixedID) *IPBlockUpdateOne
- func (c *IPBlockClient) Use(hooks ...Hook)
- type IPBlockConnection
- type IPBlockCreate
- func (ibc *IPBlockCreate) AddIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockCreate
- func (ibc *IPBlockCreate) AddIPAddress(i ...*IPAddress) *IPBlockCreate
- func (ibc *IPBlockCreate) Exec(ctx context.Context) error
- func (ibc *IPBlockCreate) ExecX(ctx context.Context)
- func (ibc *IPBlockCreate) Mutation() *IPBlockMutation
- func (ibc *IPBlockCreate) Save(ctx context.Context) (*IPBlock, error)
- func (ibc *IPBlockCreate) SaveX(ctx context.Context) *IPBlock
- func (ibc *IPBlockCreate) SetAllowAutoAllocate(b bool) *IPBlockCreate
- func (ibc *IPBlockCreate) SetAllowAutoSubnet(b bool) *IPBlockCreate
- func (ibc *IPBlockCreate) SetBlockTypeID(gi gidx.PrefixedID) *IPBlockCreate
- func (ibc *IPBlockCreate) SetCreatedAt(t time.Time) *IPBlockCreate
- func (ibc *IPBlockCreate) SetID(gi gidx.PrefixedID) *IPBlockCreate
- func (ibc *IPBlockCreate) SetIPBlockType(i *IPBlockType) *IPBlockCreate
- func (ibc *IPBlockCreate) SetIPBlockTypeID(id gidx.PrefixedID) *IPBlockCreate
- func (c *IPBlockCreate) SetInput(i CreateIPBlockInput) *IPBlockCreate
- func (ibc *IPBlockCreate) SetLocationID(gi gidx.PrefixedID) *IPBlockCreate
- func (ibc *IPBlockCreate) SetNillableAllowAutoAllocate(b *bool) *IPBlockCreate
- func (ibc *IPBlockCreate) SetNillableAllowAutoSubnet(b *bool) *IPBlockCreate
- func (ibc *IPBlockCreate) SetNillableCreatedAt(t *time.Time) *IPBlockCreate
- func (ibc *IPBlockCreate) SetNillableID(gi *gidx.PrefixedID) *IPBlockCreate
- func (ibc *IPBlockCreate) SetNillableUpdatedAt(t *time.Time) *IPBlockCreate
- func (ibc *IPBlockCreate) SetParentBlockID(gi gidx.PrefixedID) *IPBlockCreate
- func (ibc *IPBlockCreate) SetPrefix(s string) *IPBlockCreate
- func (ibc *IPBlockCreate) SetUpdatedAt(t time.Time) *IPBlockCreate
- type IPBlockCreateBulk
- type IPBlockDelete
- type IPBlockDeleteOne
- type IPBlockEdge
- type IPBlockEdges
- type IPBlockGroupBy
- func (ibgb *IPBlockGroupBy) Aggregate(fns ...AggregateFunc) *IPBlockGroupBy
- func (s *IPBlockGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *IPBlockGroupBy) BoolX(ctx context.Context) bool
- func (s *IPBlockGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *IPBlockGroupBy) BoolsX(ctx context.Context) []bool
- func (s *IPBlockGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *IPBlockGroupBy) Float64X(ctx context.Context) float64
- func (s *IPBlockGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *IPBlockGroupBy) Float64sX(ctx context.Context) []float64
- func (s *IPBlockGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *IPBlockGroupBy) IntX(ctx context.Context) int
- func (s *IPBlockGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *IPBlockGroupBy) IntsX(ctx context.Context) []int
- func (ibgb *IPBlockGroupBy) Scan(ctx context.Context, v any) error
- func (s *IPBlockGroupBy) ScanX(ctx context.Context, v any)
- func (s *IPBlockGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *IPBlockGroupBy) StringX(ctx context.Context) string
- func (s *IPBlockGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *IPBlockGroupBy) StringsX(ctx context.Context) []string
- type IPBlockMutation
- func (m *IPBlockMutation) AddField(name string, value ent.Value) error
- func (m *IPBlockMutation) AddIPAddresIDs(ids ...gidx.PrefixedID)
- func (m *IPBlockMutation) AddedEdges() []string
- func (m *IPBlockMutation) AddedField(name string) (ent.Value, bool)
- func (m *IPBlockMutation) AddedFields() []string
- func (m *IPBlockMutation) AddedIDs(name string) []ent.Value
- func (m *IPBlockMutation) AllowAutoAllocate() (r bool, exists bool)
- func (m *IPBlockMutation) AllowAutoSubnet() (r bool, exists bool)
- func (m *IPBlockMutation) BlockTypeID() (r gidx.PrefixedID, exists bool)
- func (m *IPBlockMutation) ClearEdge(name string) error
- func (m *IPBlockMutation) ClearField(name string) error
- func (m *IPBlockMutation) ClearIPAddress()
- func (m *IPBlockMutation) ClearIPBlockType()
- func (m *IPBlockMutation) ClearedEdges() []string
- func (m *IPBlockMutation) ClearedFields() []string
- func (m IPBlockMutation) Client() *Client
- func (m *IPBlockMutation) CreatedAt() (r time.Time, exists bool)
- func (m *IPBlockMutation) EdgeCleared(name string) bool
- func (m *IPBlockMutation) Field(name string) (ent.Value, bool)
- func (m *IPBlockMutation) FieldCleared(name string) bool
- func (m *IPBlockMutation) Fields() []string
- func (m *IPBlockMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *IPBlockMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *IPBlockMutation) IPAddressCleared() bool
- func (m *IPBlockMutation) IPAddressIDs() (ids []gidx.PrefixedID)
- func (m *IPBlockMutation) IPBlockTypeCleared() bool
- func (m *IPBlockMutation) IPBlockTypeID() (id gidx.PrefixedID, exists bool)
- func (m *IPBlockMutation) IPBlockTypeIDs() (ids []gidx.PrefixedID)
- func (m *IPBlockMutation) LocationID() (r gidx.PrefixedID, exists bool)
- func (m *IPBlockMutation) OldAllowAutoAllocate(ctx context.Context) (v bool, err error)
- func (m *IPBlockMutation) OldAllowAutoSubnet(ctx context.Context) (v bool, err error)
- func (m *IPBlockMutation) OldBlockTypeID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *IPBlockMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *IPBlockMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IPBlockMutation) OldLocationID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *IPBlockMutation) OldParentBlockID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *IPBlockMutation) OldPrefix(ctx context.Context) (v string, err error)
- func (m *IPBlockMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *IPBlockMutation) Op() Op
- func (m *IPBlockMutation) ParentBlockID() (r gidx.PrefixedID, exists bool)
- func (m *IPBlockMutation) Prefix() (r string, exists bool)
- func (m *IPBlockMutation) RemoveIPAddresIDs(ids ...gidx.PrefixedID)
- func (m *IPBlockMutation) RemovedEdges() []string
- func (m *IPBlockMutation) RemovedIDs(name string) []ent.Value
- func (m *IPBlockMutation) RemovedIPAddressIDs() (ids []gidx.PrefixedID)
- func (m *IPBlockMutation) ResetAllowAutoAllocate()
- func (m *IPBlockMutation) ResetAllowAutoSubnet()
- func (m *IPBlockMutation) ResetBlockTypeID()
- func (m *IPBlockMutation) ResetCreatedAt()
- func (m *IPBlockMutation) ResetEdge(name string) error
- func (m *IPBlockMutation) ResetField(name string) error
- func (m *IPBlockMutation) ResetIPAddress()
- func (m *IPBlockMutation) ResetIPBlockType()
- func (m *IPBlockMutation) ResetLocationID()
- func (m *IPBlockMutation) ResetParentBlockID()
- func (m *IPBlockMutation) ResetPrefix()
- func (m *IPBlockMutation) ResetUpdatedAt()
- func (m *IPBlockMutation) SetAllowAutoAllocate(b bool)
- func (m *IPBlockMutation) SetAllowAutoSubnet(b bool)
- func (m *IPBlockMutation) SetBlockTypeID(gi gidx.PrefixedID)
- func (m *IPBlockMutation) SetCreatedAt(t time.Time)
- func (m *IPBlockMutation) SetField(name string, value ent.Value) error
- func (m *IPBlockMutation) SetID(id gidx.PrefixedID)
- func (m *IPBlockMutation) SetIPBlockTypeID(id gidx.PrefixedID)
- func (m *IPBlockMutation) SetLocationID(gi gidx.PrefixedID)
- func (m *IPBlockMutation) SetOp(op Op)
- func (m *IPBlockMutation) SetParentBlockID(gi gidx.PrefixedID)
- func (m *IPBlockMutation) SetPrefix(s string)
- func (m *IPBlockMutation) SetUpdatedAt(t time.Time)
- func (m IPBlockMutation) Tx() (*Tx, error)
- func (m *IPBlockMutation) Type() string
- func (m *IPBlockMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *IPBlockMutation) Where(ps ...predicate.IPBlock)
- func (m *IPBlockMutation) WhereP(ps ...func(*sql.Selector))
- type IPBlockOrder
- type IPBlockOrderField
- type IPBlockPaginateOption
- type IPBlockQuery
- func (ibq *IPBlockQuery) Aggregate(fns ...AggregateFunc) *IPBlockSelect
- func (ibq *IPBlockQuery) All(ctx context.Context) ([]*IPBlock, error)
- func (ibq *IPBlockQuery) AllX(ctx context.Context) []*IPBlock
- func (ibq *IPBlockQuery) Clone() *IPBlockQuery
- func (ib *IPBlockQuery) CollectFields(ctx context.Context, satisfies ...string) (*IPBlockQuery, error)
- func (ibq *IPBlockQuery) Count(ctx context.Context) (int, error)
- func (ibq *IPBlockQuery) CountX(ctx context.Context) int
- func (ibq *IPBlockQuery) Exist(ctx context.Context) (bool, error)
- func (ibq *IPBlockQuery) ExistX(ctx context.Context) bool
- func (ibq *IPBlockQuery) First(ctx context.Context) (*IPBlock, error)
- func (ibq *IPBlockQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (ibq *IPBlockQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (ibq *IPBlockQuery) FirstX(ctx context.Context) *IPBlock
- func (ibq *IPBlockQuery) GroupBy(field string, fields ...string) *IPBlockGroupBy
- func (ibq *IPBlockQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (ibq *IPBlockQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (ibq *IPBlockQuery) Limit(limit int) *IPBlockQuery
- func (ibq *IPBlockQuery) Offset(offset int) *IPBlockQuery
- func (ibq *IPBlockQuery) Only(ctx context.Context) (*IPBlock, error)
- func (ibq *IPBlockQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (ibq *IPBlockQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (ibq *IPBlockQuery) OnlyX(ctx context.Context) *IPBlock
- func (ibq *IPBlockQuery) Order(o ...ipblock.OrderOption) *IPBlockQuery
- func (ib *IPBlockQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*IPBlockConnection, error)
- func (ibq *IPBlockQuery) QueryIPAddress() *IPAddressQuery
- func (ibq *IPBlockQuery) QueryIPBlockType() *IPBlockTypeQuery
- func (ibq *IPBlockQuery) Select(fields ...string) *IPBlockSelect
- func (ibq *IPBlockQuery) Unique(unique bool) *IPBlockQuery
- func (ibq *IPBlockQuery) Where(ps ...predicate.IPBlock) *IPBlockQuery
- func (ibq *IPBlockQuery) WithIPAddress(opts ...func(*IPAddressQuery)) *IPBlockQuery
- func (ibq *IPBlockQuery) WithIPBlockType(opts ...func(*IPBlockTypeQuery)) *IPBlockQuery
- func (ibq *IPBlockQuery) WithNamedIPAddress(name string, opts ...func(*IPAddressQuery)) *IPBlockQuery
- type IPBlockSelect
- func (ibs *IPBlockSelect) Aggregate(fns ...AggregateFunc) *IPBlockSelect
- func (s *IPBlockSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *IPBlockSelect) BoolX(ctx context.Context) bool
- func (s *IPBlockSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *IPBlockSelect) BoolsX(ctx context.Context) []bool
- func (s *IPBlockSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *IPBlockSelect) Float64X(ctx context.Context) float64
- func (s *IPBlockSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *IPBlockSelect) Float64sX(ctx context.Context) []float64
- func (s *IPBlockSelect) Int(ctx context.Context) (_ int, err error)
- func (s *IPBlockSelect) IntX(ctx context.Context) int
- func (s *IPBlockSelect) Ints(ctx context.Context) ([]int, error)
- func (s *IPBlockSelect) IntsX(ctx context.Context) []int
- func (ibs *IPBlockSelect) Scan(ctx context.Context, v any) error
- func (s *IPBlockSelect) ScanX(ctx context.Context, v any)
- func (s *IPBlockSelect) String(ctx context.Context) (_ string, err error)
- func (s *IPBlockSelect) StringX(ctx context.Context) string
- func (s *IPBlockSelect) Strings(ctx context.Context) ([]string, error)
- func (s *IPBlockSelect) StringsX(ctx context.Context) []string
- type IPBlockType
- func (ibt *IPBlockType) IPBlock(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*IPBlockConnection, error)
- func (ibt IPBlockType) IsEntity()
- func (n *IPBlockType) IsNode()
- func (ibt *IPBlockType) NamedIPBlock(name string) ([]*IPBlock, error)
- func (ibt *IPBlockType) QueryIPBlock() *IPBlockQuery
- func (ibt *IPBlockType) String() string
- func (ibt *IPBlockType) ToEdge(order *IPBlockTypeOrder) *IPBlockTypeEdge
- func (ibt *IPBlockType) Unwrap() *IPBlockType
- func (ibt *IPBlockType) Update() *IPBlockTypeUpdateOne
- func (ibt *IPBlockType) Value(name string) (ent.Value, error)
- type IPBlockTypeClient
- func (c *IPBlockTypeClient) Create() *IPBlockTypeCreate
- func (c *IPBlockTypeClient) CreateBulk(builders ...*IPBlockTypeCreate) *IPBlockTypeCreateBulk
- func (c *IPBlockTypeClient) Delete() *IPBlockTypeDelete
- func (c *IPBlockTypeClient) DeleteOne(ibt *IPBlockType) *IPBlockTypeDeleteOne
- func (c *IPBlockTypeClient) DeleteOneID(id gidx.PrefixedID) *IPBlockTypeDeleteOne
- func (c *IPBlockTypeClient) Get(ctx context.Context, id gidx.PrefixedID) (*IPBlockType, error)
- func (c *IPBlockTypeClient) GetX(ctx context.Context, id gidx.PrefixedID) *IPBlockType
- func (c *IPBlockTypeClient) Hooks() []Hook
- func (c *IPBlockTypeClient) Intercept(interceptors ...Interceptor)
- func (c *IPBlockTypeClient) Interceptors() []Interceptor
- func (c *IPBlockTypeClient) MapCreateBulk(slice any, setFunc func(*IPBlockTypeCreate, int)) *IPBlockTypeCreateBulk
- func (c *IPBlockTypeClient) Query() *IPBlockTypeQuery
- func (c *IPBlockTypeClient) QueryIPBlock(ibt *IPBlockType) *IPBlockQuery
- func (c *IPBlockTypeClient) Update() *IPBlockTypeUpdate
- func (c *IPBlockTypeClient) UpdateOne(ibt *IPBlockType) *IPBlockTypeUpdateOne
- func (c *IPBlockTypeClient) UpdateOneID(id gidx.PrefixedID) *IPBlockTypeUpdateOne
- func (c *IPBlockTypeClient) Use(hooks ...Hook)
- type IPBlockTypeConnection
- type IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) AddIPBlock(i ...*IPBlock) *IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) AddIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) Exec(ctx context.Context) error
- func (ibtc *IPBlockTypeCreate) ExecX(ctx context.Context)
- func (ibtc *IPBlockTypeCreate) Mutation() *IPBlockTypeMutation
- func (ibtc *IPBlockTypeCreate) Save(ctx context.Context) (*IPBlockType, error)
- func (ibtc *IPBlockTypeCreate) SaveX(ctx context.Context) *IPBlockType
- func (ibtc *IPBlockTypeCreate) SetCreatedAt(t time.Time) *IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) SetID(gi gidx.PrefixedID) *IPBlockTypeCreate
- func (c *IPBlockTypeCreate) SetInput(i CreateIPBlockTypeInput) *IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) SetName(s string) *IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) SetNillableCreatedAt(t *time.Time) *IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) SetNillableID(gi *gidx.PrefixedID) *IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) SetNillableUpdatedAt(t *time.Time) *IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) SetOwnerID(gi gidx.PrefixedID) *IPBlockTypeCreate
- func (ibtc *IPBlockTypeCreate) SetUpdatedAt(t time.Time) *IPBlockTypeCreate
- type IPBlockTypeCreateBulk
- type IPBlockTypeDelete
- type IPBlockTypeDeleteOne
- type IPBlockTypeEdge
- type IPBlockTypeEdges
- type IPBlockTypeGroupBy
- func (ibtgb *IPBlockTypeGroupBy) Aggregate(fns ...AggregateFunc) *IPBlockTypeGroupBy
- func (s *IPBlockTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *IPBlockTypeGroupBy) BoolX(ctx context.Context) bool
- func (s *IPBlockTypeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *IPBlockTypeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *IPBlockTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *IPBlockTypeGroupBy) Float64X(ctx context.Context) float64
- func (s *IPBlockTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *IPBlockTypeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *IPBlockTypeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *IPBlockTypeGroupBy) IntX(ctx context.Context) int
- func (s *IPBlockTypeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *IPBlockTypeGroupBy) IntsX(ctx context.Context) []int
- func (ibtgb *IPBlockTypeGroupBy) Scan(ctx context.Context, v any) error
- func (s *IPBlockTypeGroupBy) ScanX(ctx context.Context, v any)
- func (s *IPBlockTypeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *IPBlockTypeGroupBy) StringX(ctx context.Context) string
- func (s *IPBlockTypeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *IPBlockTypeGroupBy) StringsX(ctx context.Context) []string
- type IPBlockTypeMutation
- func (m *IPBlockTypeMutation) AddField(name string, value ent.Value) error
- func (m *IPBlockTypeMutation) AddIPBlockIDs(ids ...gidx.PrefixedID)
- func (m *IPBlockTypeMutation) AddedEdges() []string
- func (m *IPBlockTypeMutation) AddedField(name string) (ent.Value, bool)
- func (m *IPBlockTypeMutation) AddedFields() []string
- func (m *IPBlockTypeMutation) AddedIDs(name string) []ent.Value
- func (m *IPBlockTypeMutation) ClearEdge(name string) error
- func (m *IPBlockTypeMutation) ClearField(name string) error
- func (m *IPBlockTypeMutation) ClearIPBlock()
- func (m *IPBlockTypeMutation) ClearedEdges() []string
- func (m *IPBlockTypeMutation) ClearedFields() []string
- func (m IPBlockTypeMutation) Client() *Client
- func (m *IPBlockTypeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *IPBlockTypeMutation) EdgeCleared(name string) bool
- func (m *IPBlockTypeMutation) Field(name string) (ent.Value, bool)
- func (m *IPBlockTypeMutation) FieldCleared(name string) bool
- func (m *IPBlockTypeMutation) Fields() []string
- func (m *IPBlockTypeMutation) ID() (id gidx.PrefixedID, exists bool)
- func (m *IPBlockTypeMutation) IDs(ctx context.Context) ([]gidx.PrefixedID, error)
- func (m *IPBlockTypeMutation) IPBlockCleared() bool
- func (m *IPBlockTypeMutation) IPBlockIDs() (ids []gidx.PrefixedID)
- func (m *IPBlockTypeMutation) Name() (r string, exists bool)
- func (m *IPBlockTypeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *IPBlockTypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IPBlockTypeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *IPBlockTypeMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
- func (m *IPBlockTypeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *IPBlockTypeMutation) Op() Op
- func (m *IPBlockTypeMutation) OwnerID() (r gidx.PrefixedID, exists bool)
- func (m *IPBlockTypeMutation) RemoveIPBlockIDs(ids ...gidx.PrefixedID)
- func (m *IPBlockTypeMutation) RemovedEdges() []string
- func (m *IPBlockTypeMutation) RemovedIDs(name string) []ent.Value
- func (m *IPBlockTypeMutation) RemovedIPBlockIDs() (ids []gidx.PrefixedID)
- func (m *IPBlockTypeMutation) ResetCreatedAt()
- func (m *IPBlockTypeMutation) ResetEdge(name string) error
- func (m *IPBlockTypeMutation) ResetField(name string) error
- func (m *IPBlockTypeMutation) ResetIPBlock()
- func (m *IPBlockTypeMutation) ResetName()
- func (m *IPBlockTypeMutation) ResetOwnerID()
- func (m *IPBlockTypeMutation) ResetUpdatedAt()
- func (m *IPBlockTypeMutation) SetCreatedAt(t time.Time)
- func (m *IPBlockTypeMutation) SetField(name string, value ent.Value) error
- func (m *IPBlockTypeMutation) SetID(id gidx.PrefixedID)
- func (m *IPBlockTypeMutation) SetName(s string)
- func (m *IPBlockTypeMutation) SetOp(op Op)
- func (m *IPBlockTypeMutation) SetOwnerID(gi gidx.PrefixedID)
- func (m *IPBlockTypeMutation) SetUpdatedAt(t time.Time)
- func (m IPBlockTypeMutation) Tx() (*Tx, error)
- func (m *IPBlockTypeMutation) Type() string
- func (m *IPBlockTypeMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *IPBlockTypeMutation) Where(ps ...predicate.IPBlockType)
- func (m *IPBlockTypeMutation) WhereP(ps ...func(*sql.Selector))
- type IPBlockTypeOrder
- type IPBlockTypeOrderField
- type IPBlockTypePaginateOption
- type IPBlockTypeQuery
- func (ibtq *IPBlockTypeQuery) Aggregate(fns ...AggregateFunc) *IPBlockTypeSelect
- func (ibtq *IPBlockTypeQuery) All(ctx context.Context) ([]*IPBlockType, error)
- func (ibtq *IPBlockTypeQuery) AllX(ctx context.Context) []*IPBlockType
- func (ibtq *IPBlockTypeQuery) Clone() *IPBlockTypeQuery
- func (ibt *IPBlockTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*IPBlockTypeQuery, error)
- func (ibtq *IPBlockTypeQuery) Count(ctx context.Context) (int, error)
- func (ibtq *IPBlockTypeQuery) CountX(ctx context.Context) int
- func (ibtq *IPBlockTypeQuery) Exist(ctx context.Context) (bool, error)
- func (ibtq *IPBlockTypeQuery) ExistX(ctx context.Context) bool
- func (ibtq *IPBlockTypeQuery) First(ctx context.Context) (*IPBlockType, error)
- func (ibtq *IPBlockTypeQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (ibtq *IPBlockTypeQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
- func (ibtq *IPBlockTypeQuery) FirstX(ctx context.Context) *IPBlockType
- func (ibtq *IPBlockTypeQuery) GroupBy(field string, fields ...string) *IPBlockTypeGroupBy
- func (ibtq *IPBlockTypeQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
- func (ibtq *IPBlockTypeQuery) IDsX(ctx context.Context) []gidx.PrefixedID
- func (ibtq *IPBlockTypeQuery) Limit(limit int) *IPBlockTypeQuery
- func (ibtq *IPBlockTypeQuery) Offset(offset int) *IPBlockTypeQuery
- func (ibtq *IPBlockTypeQuery) Only(ctx context.Context) (*IPBlockType, error)
- func (ibtq *IPBlockTypeQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
- func (ibtq *IPBlockTypeQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
- func (ibtq *IPBlockTypeQuery) OnlyX(ctx context.Context) *IPBlockType
- func (ibtq *IPBlockTypeQuery) Order(o ...ipblocktype.OrderOption) *IPBlockTypeQuery
- func (ibt *IPBlockTypeQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*IPBlockTypeConnection, error)
- func (ibtq *IPBlockTypeQuery) QueryIPBlock() *IPBlockQuery
- func (ibtq *IPBlockTypeQuery) Select(fields ...string) *IPBlockTypeSelect
- func (ibtq *IPBlockTypeQuery) Unique(unique bool) *IPBlockTypeQuery
- func (ibtq *IPBlockTypeQuery) Where(ps ...predicate.IPBlockType) *IPBlockTypeQuery
- func (ibtq *IPBlockTypeQuery) WithIPBlock(opts ...func(*IPBlockQuery)) *IPBlockTypeQuery
- func (ibtq *IPBlockTypeQuery) WithNamedIPBlock(name string, opts ...func(*IPBlockQuery)) *IPBlockTypeQuery
- type IPBlockTypeSelect
- func (ibts *IPBlockTypeSelect) Aggregate(fns ...AggregateFunc) *IPBlockTypeSelect
- func (s *IPBlockTypeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *IPBlockTypeSelect) BoolX(ctx context.Context) bool
- func (s *IPBlockTypeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *IPBlockTypeSelect) BoolsX(ctx context.Context) []bool
- func (s *IPBlockTypeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *IPBlockTypeSelect) Float64X(ctx context.Context) float64
- func (s *IPBlockTypeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *IPBlockTypeSelect) Float64sX(ctx context.Context) []float64
- func (s *IPBlockTypeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *IPBlockTypeSelect) IntX(ctx context.Context) int
- func (s *IPBlockTypeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *IPBlockTypeSelect) IntsX(ctx context.Context) []int
- func (ibts *IPBlockTypeSelect) Scan(ctx context.Context, v any) error
- func (s *IPBlockTypeSelect) ScanX(ctx context.Context, v any)
- func (s *IPBlockTypeSelect) String(ctx context.Context) (_ string, err error)
- func (s *IPBlockTypeSelect) StringX(ctx context.Context) string
- func (s *IPBlockTypeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *IPBlockTypeSelect) StringsX(ctx context.Context) []string
- type IPBlockTypeUpdate
- func (ibtu *IPBlockTypeUpdate) AddIPBlock(i ...*IPBlock) *IPBlockTypeUpdate
- func (ibtu *IPBlockTypeUpdate) AddIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeUpdate
- func (ibtu *IPBlockTypeUpdate) ClearIPBlock() *IPBlockTypeUpdate
- func (ibtu *IPBlockTypeUpdate) Exec(ctx context.Context) error
- func (ibtu *IPBlockTypeUpdate) ExecX(ctx context.Context)
- func (ibtu *IPBlockTypeUpdate) Mutation() *IPBlockTypeMutation
- func (ibtu *IPBlockTypeUpdate) RemoveIPBlock(i ...*IPBlock) *IPBlockTypeUpdate
- func (ibtu *IPBlockTypeUpdate) RemoveIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeUpdate
- func (ibtu *IPBlockTypeUpdate) Save(ctx context.Context) (int, error)
- func (ibtu *IPBlockTypeUpdate) SaveX(ctx context.Context) int
- func (c *IPBlockTypeUpdate) SetInput(i UpdateIPBlockTypeInput) *IPBlockTypeUpdate
- func (ibtu *IPBlockTypeUpdate) SetName(s string) *IPBlockTypeUpdate
- func (ibtu *IPBlockTypeUpdate) Where(ps ...predicate.IPBlockType) *IPBlockTypeUpdate
- type IPBlockTypeUpdateOne
- func (ibtuo *IPBlockTypeUpdateOne) AddIPBlock(i ...*IPBlock) *IPBlockTypeUpdateOne
- func (ibtuo *IPBlockTypeUpdateOne) AddIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeUpdateOne
- func (ibtuo *IPBlockTypeUpdateOne) ClearIPBlock() *IPBlockTypeUpdateOne
- func (ibtuo *IPBlockTypeUpdateOne) Exec(ctx context.Context) error
- func (ibtuo *IPBlockTypeUpdateOne) ExecX(ctx context.Context)
- func (ibtuo *IPBlockTypeUpdateOne) Mutation() *IPBlockTypeMutation
- func (ibtuo *IPBlockTypeUpdateOne) RemoveIPBlock(i ...*IPBlock) *IPBlockTypeUpdateOne
- func (ibtuo *IPBlockTypeUpdateOne) RemoveIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeUpdateOne
- func (ibtuo *IPBlockTypeUpdateOne) Save(ctx context.Context) (*IPBlockType, error)
- func (ibtuo *IPBlockTypeUpdateOne) SaveX(ctx context.Context) *IPBlockType
- func (ibtuo *IPBlockTypeUpdateOne) Select(field string, fields ...string) *IPBlockTypeUpdateOne
- func (c *IPBlockTypeUpdateOne) SetInput(i UpdateIPBlockTypeInput) *IPBlockTypeUpdateOne
- func (ibtuo *IPBlockTypeUpdateOne) SetName(s string) *IPBlockTypeUpdateOne
- func (ibtuo *IPBlockTypeUpdateOne) Where(ps ...predicate.IPBlockType) *IPBlockTypeUpdateOne
- type IPBlockTypeWhereInput
- type IPBlockTypes
- type IPBlockUpdate
- func (ibu *IPBlockUpdate) AddIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockUpdate
- func (ibu *IPBlockUpdate) AddIPAddress(i ...*IPAddress) *IPBlockUpdate
- func (ibu *IPBlockUpdate) ClearIPAddress() *IPBlockUpdate
- func (ibu *IPBlockUpdate) Exec(ctx context.Context) error
- func (ibu *IPBlockUpdate) ExecX(ctx context.Context)
- func (ibu *IPBlockUpdate) Mutation() *IPBlockMutation
- func (ibu *IPBlockUpdate) RemoveIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockUpdate
- func (ibu *IPBlockUpdate) RemoveIPAddress(i ...*IPAddress) *IPBlockUpdate
- func (ibu *IPBlockUpdate) Save(ctx context.Context) (int, error)
- func (ibu *IPBlockUpdate) SaveX(ctx context.Context) int
- func (ibu *IPBlockUpdate) SetAllowAutoAllocate(b bool) *IPBlockUpdate
- func (ibu *IPBlockUpdate) SetAllowAutoSubnet(b bool) *IPBlockUpdate
- func (c *IPBlockUpdate) SetInput(i UpdateIPBlockInput) *IPBlockUpdate
- func (ibu *IPBlockUpdate) SetNillableAllowAutoAllocate(b *bool) *IPBlockUpdate
- func (ibu *IPBlockUpdate) SetNillableAllowAutoSubnet(b *bool) *IPBlockUpdate
- func (ibu *IPBlockUpdate) SetPrefix(s string) *IPBlockUpdate
- func (ibu *IPBlockUpdate) Where(ps ...predicate.IPBlock) *IPBlockUpdate
- type IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) AddIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) AddIPAddress(i ...*IPAddress) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) ClearIPAddress() *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) Exec(ctx context.Context) error
- func (ibuo *IPBlockUpdateOne) ExecX(ctx context.Context)
- func (ibuo *IPBlockUpdateOne) Mutation() *IPBlockMutation
- func (ibuo *IPBlockUpdateOne) RemoveIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) RemoveIPAddress(i ...*IPAddress) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) Save(ctx context.Context) (*IPBlock, error)
- func (ibuo *IPBlockUpdateOne) SaveX(ctx context.Context) *IPBlock
- func (ibuo *IPBlockUpdateOne) Select(field string, fields ...string) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) SetAllowAutoAllocate(b bool) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) SetAllowAutoSubnet(b bool) *IPBlockUpdateOne
- func (c *IPBlockUpdateOne) SetInput(i UpdateIPBlockInput) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) SetNillableAllowAutoAllocate(b *bool) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) SetNillableAllowAutoSubnet(b *bool) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) SetPrefix(s string) *IPBlockUpdateOne
- func (ibuo *IPBlockUpdateOne) Where(ps ...predicate.IPBlock) *IPBlockUpdateOne
- type IPBlockWhereInput
- type IPBlocks
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type UpdateIPAddressInput
- type UpdateIPBlockInput
- type UpdateIPBlockTypeInput
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeIPAddress = "IPAddress" TypeIPBlock = "IPBlock" TypeIPBlockType = "IPBlockType" )
Variables ¶
var ( // IPAddressOrderFieldID orders IPAddress by id. IPAddressOrderFieldID = &IPAddressOrderField{ Value: func(ia *IPAddress) (ent.Value, error) { return ia.ID, nil }, column: ipaddress.FieldID, toTerm: ipaddress.ByID, toCursor: func(ia *IPAddress) Cursor { return Cursor{ ID: ia.ID, Value: ia.ID, } }, } // IPAddressOrderFieldCreatedAt orders IPAddress by created_at. IPAddressOrderFieldCreatedAt = &IPAddressOrderField{ Value: func(ia *IPAddress) (ent.Value, error) { return ia.CreatedAt, nil }, column: ipaddress.FieldCreatedAt, toTerm: ipaddress.ByCreatedAt, toCursor: func(ia *IPAddress) Cursor { return Cursor{ ID: ia.ID, Value: ia.CreatedAt, } }, } // IPAddressOrderFieldUpdatedAt orders IPAddress by updated_at. IPAddressOrderFieldUpdatedAt = &IPAddressOrderField{ Value: func(ia *IPAddress) (ent.Value, error) { return ia.UpdatedAt, nil }, column: ipaddress.FieldUpdatedAt, toTerm: ipaddress.ByUpdatedAt, toCursor: func(ia *IPAddress) Cursor { return Cursor{ ID: ia.ID, Value: ia.UpdatedAt, } }, } // IPAddressOrderFieldIP orders IPAddress by IP. IPAddressOrderFieldIP = &IPAddressOrderField{ Value: func(ia *IPAddress) (ent.Value, error) { return ia.IP, nil }, column: ipaddress.FieldIP, toTerm: ipaddress.ByIP, toCursor: func(ia *IPAddress) Cursor { return Cursor{ ID: ia.ID, Value: ia.IP, } }, } // IPAddressOrderFieldBlockID orders IPAddress by block_id. IPAddressOrderFieldBlockID = &IPAddressOrderField{ Value: func(ia *IPAddress) (ent.Value, error) { return ia.BlockID, nil }, column: ipaddress.FieldBlockID, toTerm: ipaddress.ByBlockID, toCursor: func(ia *IPAddress) Cursor { return Cursor{ ID: ia.ID, Value: ia.BlockID, } }, } // IPAddressOrderFieldNodeID orders IPAddress by node_id. IPAddressOrderFieldNodeID = &IPAddressOrderField{ Value: func(ia *IPAddress) (ent.Value, error) { return ia.NodeID, nil }, column: ipaddress.FieldNodeID, toTerm: ipaddress.ByNodeID, toCursor: func(ia *IPAddress) Cursor { return Cursor{ ID: ia.ID, Value: ia.NodeID, } }, } // IPAddressOrderFieldNodeOwnerID orders IPAddress by node_owner_id. IPAddressOrderFieldNodeOwnerID = &IPAddressOrderField{ Value: func(ia *IPAddress) (ent.Value, error) { return ia.NodeOwnerID, nil }, column: ipaddress.FieldNodeOwnerID, toTerm: ipaddress.ByNodeOwnerID, toCursor: func(ia *IPAddress) Cursor { return Cursor{ ID: ia.ID, Value: ia.NodeOwnerID, } }, } // IPAddressOrderFieldReserved orders IPAddress by reserved. IPAddressOrderFieldReserved = &IPAddressOrderField{ Value: func(ia *IPAddress) (ent.Value, error) { return ia.Reserved, nil }, column: ipaddress.FieldReserved, toTerm: ipaddress.ByReserved, toCursor: func(ia *IPAddress) Cursor { return Cursor{ ID: ia.ID, Value: ia.Reserved, } }, } )
var ( // IPBlockOrderFieldID orders IPBlock by id. IPBlockOrderFieldID = &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.ID, nil }, column: ipblock.FieldID, toTerm: ipblock.ByID, toCursor: func(ib *IPBlock) Cursor { return Cursor{ ID: ib.ID, Value: ib.ID, } }, } // IPBlockOrderFieldCreatedAt orders IPBlock by created_at. IPBlockOrderFieldCreatedAt = &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.CreatedAt, nil }, column: ipblock.FieldCreatedAt, toTerm: ipblock.ByCreatedAt, toCursor: func(ib *IPBlock) Cursor { return Cursor{ ID: ib.ID, Value: ib.CreatedAt, } }, } // IPBlockOrderFieldUpdatedAt orders IPBlock by updated_at. IPBlockOrderFieldUpdatedAt = &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.UpdatedAt, nil }, column: ipblock.FieldUpdatedAt, toTerm: ipblock.ByUpdatedAt, toCursor: func(ib *IPBlock) Cursor { return Cursor{ ID: ib.ID, Value: ib.UpdatedAt, } }, } // IPBlockOrderFieldPrefix orders IPBlock by prefix. IPBlockOrderFieldPrefix = &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.Prefix, nil }, column: ipblock.FieldPrefix, toTerm: ipblock.ByPrefix, toCursor: func(ib *IPBlock) Cursor { return Cursor{ ID: ib.ID, Value: ib.Prefix, } }, } // IPBlockOrderFieldBlockTypeID orders IPBlock by block_type_id. IPBlockOrderFieldBlockTypeID = &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.BlockTypeID, nil }, column: ipblock.FieldBlockTypeID, toTerm: ipblock.ByBlockTypeID, toCursor: func(ib *IPBlock) Cursor { return Cursor{ ID: ib.ID, Value: ib.BlockTypeID, } }, } // IPBlockOrderFieldLocationID orders IPBlock by location_id. IPBlockOrderFieldLocationID = &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.LocationID, nil }, column: ipblock.FieldLocationID, toTerm: ipblock.ByLocationID, toCursor: func(ib *IPBlock) Cursor { return Cursor{ ID: ib.ID, Value: ib.LocationID, } }, } // IPBlockOrderFieldParentBlockID orders IPBlock by parent_block_id. IPBlockOrderFieldParentBlockID = &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.ParentBlockID, nil }, column: ipblock.FieldParentBlockID, toTerm: ipblock.ByParentBlockID, toCursor: func(ib *IPBlock) Cursor { return Cursor{ ID: ib.ID, Value: ib.ParentBlockID, } }, } // IPBlockOrderFieldAllowAutoSubnet orders IPBlock by allow_auto_subnet. IPBlockOrderFieldAllowAutoSubnet = &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.AllowAutoSubnet, nil }, column: ipblock.FieldAllowAutoSubnet, toTerm: ipblock.ByAllowAutoSubnet, toCursor: func(ib *IPBlock) Cursor { return Cursor{ ID: ib.ID, Value: ib.AllowAutoSubnet, } }, } // IPBlockOrderFieldAllowAutoAllocate orders IPBlock by allow_auto_allocate. IPBlockOrderFieldAllowAutoAllocate = &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.AllowAutoAllocate, nil }, column: ipblock.FieldAllowAutoAllocate, toTerm: ipblock.ByAllowAutoAllocate, toCursor: func(ib *IPBlock) Cursor { return Cursor{ ID: ib.ID, Value: ib.AllowAutoAllocate, } }, } )
var ( // IPBlockTypeOrderFieldID orders IPBlockType by id. IPBlockTypeOrderFieldID = &IPBlockTypeOrderField{ Value: func(ibt *IPBlockType) (ent.Value, error) { return ibt.ID, nil }, column: ipblocktype.FieldID, toTerm: ipblocktype.ByID, toCursor: func(ibt *IPBlockType) Cursor { return Cursor{ ID: ibt.ID, Value: ibt.ID, } }, } // IPBlockTypeOrderFieldCreatedAt orders IPBlockType by created_at. IPBlockTypeOrderFieldCreatedAt = &IPBlockTypeOrderField{ Value: func(ibt *IPBlockType) (ent.Value, error) { return ibt.CreatedAt, nil }, column: ipblocktype.FieldCreatedAt, toTerm: ipblocktype.ByCreatedAt, toCursor: func(ibt *IPBlockType) Cursor { return Cursor{ ID: ibt.ID, Value: ibt.CreatedAt, } }, } // IPBlockTypeOrderFieldUpdatedAt orders IPBlockType by updated_at. IPBlockTypeOrderFieldUpdatedAt = &IPBlockTypeOrderField{ Value: func(ibt *IPBlockType) (ent.Value, error) { return ibt.UpdatedAt, nil }, column: ipblocktype.FieldUpdatedAt, toTerm: ipblocktype.ByUpdatedAt, toCursor: func(ibt *IPBlockType) Cursor { return Cursor{ ID: ibt.ID, Value: ibt.UpdatedAt, } }, } // IPBlockTypeOrderFieldName orders IPBlockType by name. IPBlockTypeOrderFieldName = &IPBlockTypeOrderField{ Value: func(ibt *IPBlockType) (ent.Value, error) { return ibt.Name, nil }, column: ipblocktype.FieldName, toTerm: ipblocktype.ByName, toCursor: func(ibt *IPBlockType) Cursor { return Cursor{ ID: ibt.ID, Value: ibt.Name, } }, } // IPBlockTypeOrderFieldOwnerID orders IPBlockType by owner_id. IPBlockTypeOrderFieldOwnerID = &IPBlockTypeOrderField{ Value: func(ibt *IPBlockType) (ent.Value, error) { return ibt.OwnerID, nil }, column: ipblocktype.FieldOwnerID, toTerm: ipblocktype.ByOwnerID, toCursor: func(ibt *IPBlockType) Cursor { return Cursor{ ID: ibt.ID, Value: ibt.OwnerID, } }, } )
var DefaultIPAddressOrder = &IPAddressOrder{ Direction: entgql.OrderDirectionAsc, Field: &IPAddressOrderField{ Value: func(ia *IPAddress) (ent.Value, error) { return ia.ID, nil }, column: ipaddress.FieldID, toTerm: ipaddress.ByID, toCursor: func(ia *IPAddress) Cursor { return Cursor{ID: ia.ID} }, }, }
DefaultIPAddressOrder is the default ordering of IPAddress.
var DefaultIPBlockOrder = &IPBlockOrder{ Direction: entgql.OrderDirectionAsc, Field: &IPBlockOrderField{ Value: func(ib *IPBlock) (ent.Value, error) { return ib.ID, nil }, column: ipblock.FieldID, toTerm: ipblock.ByID, toCursor: func(ib *IPBlock) Cursor { return Cursor{ID: ib.ID} }, }, }
DefaultIPBlockOrder is the default ordering of IPBlock.
var DefaultIPBlockTypeOrder = &IPBlockTypeOrder{ Direction: entgql.OrderDirectionAsc, Field: &IPBlockTypeOrderField{ Value: func(ibt *IPBlockType) (ent.Value, error) { return ibt.ID, nil }, column: ipblocktype.FieldID, toTerm: ipblocktype.ByID, toCursor: func(ibt *IPBlockType) Cursor { return Cursor{ID: ibt.ID} }, }, }
DefaultIPBlockTypeOrder is the default ordering of IPBlockType.
var ErrEmptyIPAddressWhereInput = errors.New("generated: empty predicate IPAddressWhereInput")
ErrEmptyIPAddressWhereInput is returned in case the IPAddressWhereInput is empty.
var ErrEmptyIPBlockTypeWhereInput = errors.New("generated: empty predicate IPBlockTypeWhereInput")
ErrEmptyIPBlockTypeWhereInput is returned in case the IPBlockTypeWhereInput is empty.
var ErrEmptyIPBlockWhereInput = errors.New("generated: empty predicate IPBlockWhereInput")
ErrEmptyIPBlockWhereInput is returned in case the IPBlockWhereInput is empty.
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 IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(generated.As(generated.Sum(field1), "sum_field1"), (generated.As(generated.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // IPAddress is the client for interacting with the IPAddress builders. IPAddress *IPAddressClient // IPBlock is the client for interacting with the IPBlock builders. IPBlock *IPBlockClient // IPBlockType is the client for interacting with the IPBlockType builders. IPBlockType *IPBlockTypeClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). IPAddress. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) Noder ¶
func (c *Client) Noder(ctx context.Context, id gidx.PrefixedID, opts ...NodeOption) (_ Noder, err error)
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) Noders ¶
func (c *Client) Noders(ctx context.Context, ids []gidx.PrefixedID, opts ...NodeOption) ([]Noder, error)
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type CreateIPAddressInput ¶
type CreateIPAddressInput struct { IP string NodeID gidx.PrefixedID NodeOwnerID gidx.PrefixedID Reserved *bool IPBlockID gidx.PrefixedID }
CreateIPAddressInput represents a mutation input for creating ipaddresses.
func (*CreateIPAddressInput) Mutate ¶
func (i *CreateIPAddressInput) Mutate(m *IPAddressMutation)
Mutate applies the CreateIPAddressInput on the IPAddressMutation builder.
type CreateIPBlockInput ¶
type CreateIPBlockInput struct { Prefix string LocationID gidx.PrefixedID ParentBlockID gidx.PrefixedID AllowAutoSubnet *bool AllowAutoAllocate *bool IPBlockTypeID gidx.PrefixedID }
CreateIPBlockInput represents a mutation input for creating ipblocks.
func (*CreateIPBlockInput) Mutate ¶
func (i *CreateIPBlockInput) Mutate(m *IPBlockMutation)
Mutate applies the CreateIPBlockInput on the IPBlockMutation builder.
type CreateIPBlockTypeInput ¶
type CreateIPBlockTypeInput struct { Name string OwnerID gidx.PrefixedID }
CreateIPBlockTypeInput represents a mutation input for creating ipblocktypes.
func (*CreateIPBlockTypeInput) Mutate ¶
func (i *CreateIPBlockTypeInput) Mutate(m *IPBlockTypeMutation)
Mutate applies the CreateIPBlockTypeInput on the IPBlockTypeMutation builder.
type IPAddress ¶
type IPAddress struct { // ID of the ent. // The ID of the IP Address. 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 ip address. IP string `json:"IP,omitempty"` // The ID for the ip block for this ip address. BlockID gidx.PrefixedID `json:"block_id,omitempty"` // The ID for the node this is assigned to. NodeID gidx.PrefixedID `json:"node_id,omitempty"` // Owner ID of the node this is assigned to. NodeOwnerID gidx.PrefixedID `json:"node_owner_id,omitempty"` // Reserve the IP without it being assigned. Reserved bool `json:"reserved,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the IPAddressQuery when eager-loading is set. Edges IPAddressEdges `json:"edges"` // contains filtered or unexported fields }
Represents an ip address node on the graph.
func (*IPAddress) IsNode ¶
func (n *IPAddress) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*IPAddress) QueryIPBlock ¶
func (ia *IPAddress) QueryIPBlock() *IPBlockQuery
QueryIPBlock queries the "ip_block" edge of the IPAddress entity.
func (*IPAddress) ToEdge ¶
func (ia *IPAddress) ToEdge(order *IPAddressOrder) *IPAddressEdge
ToEdge converts IPAddress into IPAddressEdge.
func (*IPAddress) Unwrap ¶
Unwrap unwraps the IPAddress 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 (*IPAddress) Update ¶
func (ia *IPAddress) Update() *IPAddressUpdateOne
Update returns a builder for updating this IPAddress. Note that you need to call IPAddress.Unwrap() before calling this method if this IPAddress was returned from a transaction, and the transaction was committed or rolled back.
type IPAddressClient ¶
type IPAddressClient struct {
// contains filtered or unexported fields
}
IPAddressClient is a client for the IPAddress schema.
func NewIPAddressClient ¶
func NewIPAddressClient(c config) *IPAddressClient
NewIPAddressClient returns a client for the IPAddress from the given config.
func (*IPAddressClient) Create ¶
func (c *IPAddressClient) Create() *IPAddressCreate
Create returns a builder for creating a IPAddress entity.
func (*IPAddressClient) CreateBulk ¶
func (c *IPAddressClient) CreateBulk(builders ...*IPAddressCreate) *IPAddressCreateBulk
CreateBulk returns a builder for creating a bulk of IPAddress entities.
func (*IPAddressClient) Delete ¶
func (c *IPAddressClient) Delete() *IPAddressDelete
Delete returns a delete builder for IPAddress.
func (*IPAddressClient) DeleteOne ¶
func (c *IPAddressClient) DeleteOne(ia *IPAddress) *IPAddressDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*IPAddressClient) DeleteOneID ¶
func (c *IPAddressClient) DeleteOneID(id gidx.PrefixedID) *IPAddressDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*IPAddressClient) Get ¶
func (c *IPAddressClient) Get(ctx context.Context, id gidx.PrefixedID) (*IPAddress, error)
Get returns a IPAddress entity by its id.
func (*IPAddressClient) GetX ¶
func (c *IPAddressClient) GetX(ctx context.Context, id gidx.PrefixedID) *IPAddress
GetX is like Get, but panics if an error occurs.
func (*IPAddressClient) Hooks ¶
func (c *IPAddressClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IPAddressClient) Intercept ¶
func (c *IPAddressClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ipaddress.Intercept(f(g(h())))`.
func (*IPAddressClient) Interceptors ¶
func (c *IPAddressClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*IPAddressClient) MapCreateBulk ¶ added in v0.2.0
func (c *IPAddressClient) MapCreateBulk(slice any, setFunc func(*IPAddressCreate, int)) *IPAddressCreateBulk
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 (*IPAddressClient) Query ¶
func (c *IPAddressClient) Query() *IPAddressQuery
Query returns a query builder for IPAddress.
func (*IPAddressClient) QueryIPBlock ¶
func (c *IPAddressClient) QueryIPBlock(ia *IPAddress) *IPBlockQuery
QueryIPBlock queries the ip_block edge of a IPAddress.
func (*IPAddressClient) Update ¶
func (c *IPAddressClient) Update() *IPAddressUpdate
Update returns an update builder for IPAddress.
func (*IPAddressClient) UpdateOne ¶
func (c *IPAddressClient) UpdateOne(ia *IPAddress) *IPAddressUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IPAddressClient) UpdateOneID ¶
func (c *IPAddressClient) UpdateOneID(id gidx.PrefixedID) *IPAddressUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IPAddressClient) Use ¶
func (c *IPAddressClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ipaddress.Hooks(f(g(h())))`.
type IPAddressConnection ¶
type IPAddressConnection struct { Edges []*IPAddressEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
IPAddressConnection is the connection containing edges to IPAddress.
type IPAddressCreate ¶
type IPAddressCreate struct {
// contains filtered or unexported fields
}
IPAddressCreate is the builder for creating a IPAddress entity.
func (*IPAddressCreate) Exec ¶
func (iac *IPAddressCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*IPAddressCreate) ExecX ¶
func (iac *IPAddressCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPAddressCreate) Mutation ¶
func (iac *IPAddressCreate) Mutation() *IPAddressMutation
Mutation returns the IPAddressMutation object of the builder.
func (*IPAddressCreate) Save ¶
func (iac *IPAddressCreate) Save(ctx context.Context) (*IPAddress, error)
Save creates the IPAddress in the database.
func (*IPAddressCreate) SaveX ¶
func (iac *IPAddressCreate) SaveX(ctx context.Context) *IPAddress
SaveX calls Save and panics if Save returns an error.
func (*IPAddressCreate) SetBlockID ¶
func (iac *IPAddressCreate) SetBlockID(gi gidx.PrefixedID) *IPAddressCreate
SetBlockID sets the "block_id" field.
func (*IPAddressCreate) SetCreatedAt ¶
func (iac *IPAddressCreate) SetCreatedAt(t time.Time) *IPAddressCreate
SetCreatedAt sets the "created_at" field.
func (*IPAddressCreate) SetID ¶
func (iac *IPAddressCreate) SetID(gi gidx.PrefixedID) *IPAddressCreate
SetID sets the "id" field.
func (*IPAddressCreate) SetIP ¶
func (iac *IPAddressCreate) SetIP(s string) *IPAddressCreate
SetIP sets the "IP" field.
func (*IPAddressCreate) SetIPBlock ¶
func (iac *IPAddressCreate) SetIPBlock(i *IPBlock) *IPAddressCreate
SetIPBlock sets the "ip_block" edge to the IPBlock entity.
func (*IPAddressCreate) SetIPBlockID ¶
func (iac *IPAddressCreate) SetIPBlockID(id gidx.PrefixedID) *IPAddressCreate
SetIPBlockID sets the "ip_block" edge to the IPBlock entity by ID.
func (*IPAddressCreate) SetInput ¶
func (c *IPAddressCreate) SetInput(i CreateIPAddressInput) *IPAddressCreate
SetInput applies the change-set in the CreateIPAddressInput on the IPAddressCreate builder.
func (*IPAddressCreate) SetNillableCreatedAt ¶
func (iac *IPAddressCreate) SetNillableCreatedAt(t *time.Time) *IPAddressCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*IPAddressCreate) SetNillableID ¶
func (iac *IPAddressCreate) SetNillableID(gi *gidx.PrefixedID) *IPAddressCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*IPAddressCreate) SetNillableReserved ¶
func (iac *IPAddressCreate) SetNillableReserved(b *bool) *IPAddressCreate
SetNillableReserved sets the "reserved" field if the given value is not nil.
func (*IPAddressCreate) SetNillableUpdatedAt ¶
func (iac *IPAddressCreate) SetNillableUpdatedAt(t *time.Time) *IPAddressCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*IPAddressCreate) SetNodeID ¶
func (iac *IPAddressCreate) SetNodeID(gi gidx.PrefixedID) *IPAddressCreate
SetNodeID sets the "node_id" field.
func (*IPAddressCreate) SetNodeOwnerID ¶
func (iac *IPAddressCreate) SetNodeOwnerID(gi gidx.PrefixedID) *IPAddressCreate
SetNodeOwnerID sets the "node_owner_id" field.
func (*IPAddressCreate) SetReserved ¶
func (iac *IPAddressCreate) SetReserved(b bool) *IPAddressCreate
SetReserved sets the "reserved" field.
func (*IPAddressCreate) SetUpdatedAt ¶
func (iac *IPAddressCreate) SetUpdatedAt(t time.Time) *IPAddressCreate
SetUpdatedAt sets the "updated_at" field.
type IPAddressCreateBulk ¶
type IPAddressCreateBulk struct {
// contains filtered or unexported fields
}
IPAddressCreateBulk is the builder for creating many IPAddress entities in bulk.
func (*IPAddressCreateBulk) Exec ¶
func (iacb *IPAddressCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*IPAddressCreateBulk) ExecX ¶
func (iacb *IPAddressCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IPAddressDelete ¶
type IPAddressDelete struct {
// contains filtered or unexported fields
}
IPAddressDelete is the builder for deleting a IPAddress entity.
func (*IPAddressDelete) Exec ¶
func (iad *IPAddressDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IPAddressDelete) ExecX ¶
func (iad *IPAddressDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IPAddressDelete) Where ¶
func (iad *IPAddressDelete) Where(ps ...predicate.IPAddress) *IPAddressDelete
Where appends a list predicates to the IPAddressDelete builder.
type IPAddressDeleteOne ¶
type IPAddressDeleteOne struct {
// contains filtered or unexported fields
}
IPAddressDeleteOne is the builder for deleting a single IPAddress entity.
func (*IPAddressDeleteOne) Exec ¶
func (iado *IPAddressDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IPAddressDeleteOne) ExecX ¶
func (iado *IPAddressDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPAddressDeleteOne) Where ¶
func (iado *IPAddressDeleteOne) Where(ps ...predicate.IPAddress) *IPAddressDeleteOne
Where appends a list predicates to the IPAddressDelete builder.
type IPAddressEdge ¶
IPAddressEdge is the edge representation of IPAddress.
type IPAddressEdges ¶
type IPAddressEdges struct { // IPBlock holds the value of the ip_block edge. IPBlock *IPBlock `json:"ip_block,omitempty"` // contains filtered or unexported fields }
IPAddressEdges holds the relations/edges for other nodes in the graph.
func (IPAddressEdges) IPBlockOrErr ¶
func (e IPAddressEdges) IPBlockOrErr() (*IPBlock, error)
IPBlockOrErr returns the IPBlock value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type IPAddressGroupBy ¶
type IPAddressGroupBy struct {
// contains filtered or unexported fields
}
IPAddressGroupBy is the group-by builder for IPAddress entities.
func (*IPAddressGroupBy) Aggregate ¶
func (iagb *IPAddressGroupBy) Aggregate(fns ...AggregateFunc) *IPAddressGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IPAddressGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IPAddressGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IPAddressGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IPAddressGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IPAddressGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IPAddressGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IPAddressGroupBy) Scan ¶
func (iagb *IPAddressGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IPAddressGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IPAddressMutation ¶
type IPAddressMutation struct {
// contains filtered or unexported fields
}
IPAddressMutation represents an operation that mutates the IPAddress nodes in the graph.
func (*IPAddressMutation) AddField ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) AddedEdges ¶
func (m *IPAddressMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IPAddressMutation) AddedField ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) AddedFields ¶
func (m *IPAddressMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IPAddressMutation) AddedIDs ¶
func (m *IPAddressMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IPAddressMutation) BlockID ¶
func (m *IPAddressMutation) BlockID() (r gidx.PrefixedID, exists bool)
BlockID returns the value of the "block_id" field in the mutation.
func (*IPAddressMutation) ClearEdge ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) ClearField ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) ClearIPBlock ¶
func (m *IPAddressMutation) ClearIPBlock()
ClearIPBlock clears the "ip_block" edge to the IPBlock entity.
func (*IPAddressMutation) ClearedEdges ¶
func (m *IPAddressMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IPAddressMutation) ClearedFields ¶
func (m *IPAddressMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IPAddressMutation) Client ¶
func (m IPAddressMutation) 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 (*IPAddressMutation) CreatedAt ¶
func (m *IPAddressMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*IPAddressMutation) EdgeCleared ¶
func (m *IPAddressMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IPAddressMutation) Field ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) FieldCleared ¶
func (m *IPAddressMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IPAddressMutation) Fields ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) ID ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) IDs ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) IP ¶
func (m *IPAddressMutation) IP() (r string, exists bool)
IP returns the value of the "IP" field in the mutation.
func (*IPAddressMutation) IPBlockCleared ¶
func (m *IPAddressMutation) IPBlockCleared() bool
IPBlockCleared reports if the "ip_block" edge to the IPBlock entity was cleared.
func (*IPAddressMutation) IPBlockID ¶
func (m *IPAddressMutation) IPBlockID() (id gidx.PrefixedID, exists bool)
IPBlockID returns the "ip_block" edge ID in the mutation.
func (*IPAddressMutation) IPBlockIDs ¶
func (m *IPAddressMutation) IPBlockIDs() (ids []gidx.PrefixedID)
IPBlockIDs returns the "ip_block" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IPBlockID instead. It exists only for internal usage by the builders.
func (*IPAddressMutation) NodeID ¶
func (m *IPAddressMutation) NodeID() (r gidx.PrefixedID, exists bool)
NodeID returns the value of the "node_id" field in the mutation.
func (*IPAddressMutation) NodeOwnerID ¶
func (m *IPAddressMutation) NodeOwnerID() (r gidx.PrefixedID, exists bool)
NodeOwnerID returns the value of the "node_owner_id" field in the mutation.
func (*IPAddressMutation) OldBlockID ¶
func (m *IPAddressMutation) OldBlockID(ctx context.Context) (v gidx.PrefixedID, err error)
OldBlockID returns the old "block_id" field's value of the IPAddress entity. If the IPAddress object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPAddressMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the IPAddress entity. If the IPAddress object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPAddressMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*IPAddressMutation) OldIP ¶
func (m *IPAddressMutation) OldIP(ctx context.Context) (v string, err error)
OldIP returns the old "IP" field's value of the IPAddress entity. If the IPAddress object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPAddressMutation) OldNodeID ¶
func (m *IPAddressMutation) OldNodeID(ctx context.Context) (v gidx.PrefixedID, err error)
OldNodeID returns the old "node_id" field's value of the IPAddress entity. If the IPAddress object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPAddressMutation) OldNodeOwnerID ¶
func (m *IPAddressMutation) OldNodeOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
OldNodeOwnerID returns the old "node_owner_id" field's value of the IPAddress entity. If the IPAddress object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPAddressMutation) OldReserved ¶
func (m *IPAddressMutation) OldReserved(ctx context.Context) (v bool, err error)
OldReserved returns the old "reserved" field's value of the IPAddress entity. If the IPAddress object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPAddressMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the IPAddress entity. If the IPAddress object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPAddressMutation) RemovedEdges ¶
func (m *IPAddressMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IPAddressMutation) RemovedIDs ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) Reserved ¶
func (m *IPAddressMutation) Reserved() (r bool, exists bool)
Reserved returns the value of the "reserved" field in the mutation.
func (*IPAddressMutation) ResetBlockID ¶
func (m *IPAddressMutation) ResetBlockID()
ResetBlockID resets all changes to the "block_id" field.
func (*IPAddressMutation) ResetCreatedAt ¶
func (m *IPAddressMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*IPAddressMutation) ResetEdge ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) ResetField ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) ResetIP ¶
func (m *IPAddressMutation) ResetIP()
ResetIP resets all changes to the "IP" field.
func (*IPAddressMutation) ResetIPBlock ¶
func (m *IPAddressMutation) ResetIPBlock()
ResetIPBlock resets all changes to the "ip_block" edge.
func (*IPAddressMutation) ResetNodeID ¶
func (m *IPAddressMutation) ResetNodeID()
ResetNodeID resets all changes to the "node_id" field.
func (*IPAddressMutation) ResetNodeOwnerID ¶
func (m *IPAddressMutation) ResetNodeOwnerID()
ResetNodeOwnerID resets all changes to the "node_owner_id" field.
func (*IPAddressMutation) ResetReserved ¶
func (m *IPAddressMutation) ResetReserved()
ResetReserved resets all changes to the "reserved" field.
func (*IPAddressMutation) ResetUpdatedAt ¶
func (m *IPAddressMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*IPAddressMutation) SetBlockID ¶
func (m *IPAddressMutation) SetBlockID(gi gidx.PrefixedID)
SetBlockID sets the "block_id" field.
func (*IPAddressMutation) SetCreatedAt ¶
func (m *IPAddressMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*IPAddressMutation) SetField ¶
func (m *IPAddressMutation) 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 (*IPAddressMutation) SetID ¶
func (m *IPAddressMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of IPAddress entities.
func (*IPAddressMutation) SetIP ¶
func (m *IPAddressMutation) SetIP(s string)
SetIP sets the "IP" field.
func (*IPAddressMutation) SetIPBlockID ¶
func (m *IPAddressMutation) SetIPBlockID(id gidx.PrefixedID)
SetIPBlockID sets the "ip_block" edge to the IPBlock entity by id.
func (*IPAddressMutation) SetNodeID ¶
func (m *IPAddressMutation) SetNodeID(gi gidx.PrefixedID)
SetNodeID sets the "node_id" field.
func (*IPAddressMutation) SetNodeOwnerID ¶
func (m *IPAddressMutation) SetNodeOwnerID(gi gidx.PrefixedID)
SetNodeOwnerID sets the "node_owner_id" field.
func (*IPAddressMutation) SetOp ¶
func (m *IPAddressMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*IPAddressMutation) SetReserved ¶
func (m *IPAddressMutation) SetReserved(b bool)
SetReserved sets the "reserved" field.
func (*IPAddressMutation) SetUpdatedAt ¶
func (m *IPAddressMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (IPAddressMutation) Tx ¶
func (m IPAddressMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IPAddressMutation) Type ¶
func (m *IPAddressMutation) Type() string
Type returns the node type of this mutation (IPAddress).
func (*IPAddressMutation) UpdatedAt ¶
func (m *IPAddressMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*IPAddressMutation) Where ¶
func (m *IPAddressMutation) Where(ps ...predicate.IPAddress)
Where appends a list predicates to the IPAddressMutation builder.
func (*IPAddressMutation) WhereP ¶
func (m *IPAddressMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the IPAddressMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type IPAddressOrder ¶
type IPAddressOrder struct { Direction OrderDirection `json:"direction"` Field *IPAddressOrderField `json:"field"` }
IPAddressOrder defines the ordering of IPAddress.
type IPAddressOrderField ¶
type IPAddressOrderField struct { // Value extracts the ordering value from the given IPAddress. Value func(*IPAddress) (ent.Value, error) // contains filtered or unexported fields }
IPAddressOrderField defines the ordering field of IPAddress.
func (IPAddressOrderField) MarshalGQL ¶
func (f IPAddressOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (IPAddressOrderField) String ¶
func (f IPAddressOrderField) String() string
String implement fmt.Stringer interface.
func (*IPAddressOrderField) UnmarshalGQL ¶
func (f *IPAddressOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type IPAddressPaginateOption ¶
type IPAddressPaginateOption func(*ipaddressPager) error
IPAddressPaginateOption enables pagination customization.
func WithIPAddressFilter ¶
func WithIPAddressFilter(filter func(*IPAddressQuery) (*IPAddressQuery, error)) IPAddressPaginateOption
WithIPAddressFilter configures pagination filter.
func WithIPAddressOrder ¶
func WithIPAddressOrder(order *IPAddressOrder) IPAddressPaginateOption
WithIPAddressOrder configures pagination ordering.
type IPAddressQuery ¶
type IPAddressQuery struct {
// contains filtered or unexported fields
}
IPAddressQuery is the builder for querying IPAddress entities.
func (*IPAddressQuery) Aggregate ¶
func (iaq *IPAddressQuery) Aggregate(fns ...AggregateFunc) *IPAddressSelect
Aggregate returns a IPAddressSelect configured with the given aggregations.
func (*IPAddressQuery) All ¶
func (iaq *IPAddressQuery) All(ctx context.Context) ([]*IPAddress, error)
All executes the query and returns a list of IPAddresses.
func (*IPAddressQuery) AllX ¶
func (iaq *IPAddressQuery) AllX(ctx context.Context) []*IPAddress
AllX is like All, but panics if an error occurs.
func (*IPAddressQuery) Clone ¶
func (iaq *IPAddressQuery) Clone() *IPAddressQuery
Clone returns a duplicate of the IPAddressQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IPAddressQuery) CollectFields ¶
func (ia *IPAddressQuery) CollectFields(ctx context.Context, satisfies ...string) (*IPAddressQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*IPAddressQuery) Count ¶
func (iaq *IPAddressQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IPAddressQuery) CountX ¶
func (iaq *IPAddressQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IPAddressQuery) Exist ¶
func (iaq *IPAddressQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IPAddressQuery) ExistX ¶
func (iaq *IPAddressQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IPAddressQuery) First ¶
func (iaq *IPAddressQuery) First(ctx context.Context) (*IPAddress, error)
First returns the first IPAddress entity from the query. Returns a *NotFoundError when no IPAddress was found.
func (*IPAddressQuery) FirstID ¶
func (iaq *IPAddressQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first IPAddress ID from the query. Returns a *NotFoundError when no IPAddress ID was found.
func (*IPAddressQuery) FirstIDX ¶
func (iaq *IPAddressQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*IPAddressQuery) FirstX ¶
func (iaq *IPAddressQuery) FirstX(ctx context.Context) *IPAddress
FirstX is like First, but panics if an error occurs.
func (*IPAddressQuery) GroupBy ¶
func (iaq *IPAddressQuery) GroupBy(field string, fields ...string) *IPAddressGroupBy
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.IPAddress.Query(). GroupBy(ipaddress.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*IPAddressQuery) IDs ¶
func (iaq *IPAddressQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of IPAddress IDs.
func (*IPAddressQuery) IDsX ¶
func (iaq *IPAddressQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*IPAddressQuery) Limit ¶
func (iaq *IPAddressQuery) Limit(limit int) *IPAddressQuery
Limit the number of records to be returned by this query.
func (*IPAddressQuery) Offset ¶
func (iaq *IPAddressQuery) Offset(offset int) *IPAddressQuery
Offset to start from.
func (*IPAddressQuery) Only ¶
func (iaq *IPAddressQuery) Only(ctx context.Context) (*IPAddress, error)
Only returns a single IPAddress entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one IPAddress entity is found. Returns a *NotFoundError when no IPAddress entities are found.
func (*IPAddressQuery) OnlyID ¶
func (iaq *IPAddressQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only IPAddress ID in the query. Returns a *NotSingularError when more than one IPAddress ID is found. Returns a *NotFoundError when no entities are found.
func (*IPAddressQuery) OnlyIDX ¶
func (iaq *IPAddressQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IPAddressQuery) OnlyX ¶
func (iaq *IPAddressQuery) OnlyX(ctx context.Context) *IPAddress
OnlyX is like Only, but panics if an error occurs.
func (*IPAddressQuery) Order ¶
func (iaq *IPAddressQuery) Order(o ...ipaddress.OrderOption) *IPAddressQuery
Order specifies how the records should be ordered.
func (*IPAddressQuery) Paginate ¶
func (ia *IPAddressQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...IPAddressPaginateOption, ) (*IPAddressConnection, error)
Paginate executes the query and returns a relay based cursor connection to IPAddress.
func (*IPAddressQuery) QueryIPBlock ¶
func (iaq *IPAddressQuery) QueryIPBlock() *IPBlockQuery
QueryIPBlock chains the current query on the "ip_block" edge.
func (*IPAddressQuery) Select ¶
func (iaq *IPAddressQuery) Select(fields ...string) *IPAddressSelect
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.IPAddress.Query(). Select(ipaddress.FieldCreatedAt). Scan(ctx, &v)
func (*IPAddressQuery) Unique ¶
func (iaq *IPAddressQuery) Unique(unique bool) *IPAddressQuery
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 (*IPAddressQuery) Where ¶
func (iaq *IPAddressQuery) Where(ps ...predicate.IPAddress) *IPAddressQuery
Where adds a new predicate for the IPAddressQuery builder.
func (*IPAddressQuery) WithIPBlock ¶
func (iaq *IPAddressQuery) WithIPBlock(opts ...func(*IPBlockQuery)) *IPAddressQuery
WithIPBlock tells the query-builder to eager-load the nodes that are connected to the "ip_block" edge. The optional arguments are used to configure the query builder of the edge.
type IPAddressSelect ¶
type IPAddressSelect struct { *IPAddressQuery // contains filtered or unexported fields }
IPAddressSelect is the builder for selecting fields of IPAddress entities.
func (*IPAddressSelect) Aggregate ¶
func (ias *IPAddressSelect) Aggregate(fns ...AggregateFunc) *IPAddressSelect
Aggregate adds the given aggregation functions to the selector query.
func (*IPAddressSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) Scan ¶
func (ias *IPAddressSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IPAddressSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IPAddressUpdate ¶
type IPAddressUpdate struct {
// contains filtered or unexported fields
}
IPAddressUpdate is the builder for updating IPAddress entities.
func (*IPAddressUpdate) Exec ¶
func (iau *IPAddressUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IPAddressUpdate) ExecX ¶
func (iau *IPAddressUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPAddressUpdate) Mutation ¶
func (iau *IPAddressUpdate) Mutation() *IPAddressMutation
Mutation returns the IPAddressMutation object of the builder.
func (*IPAddressUpdate) Save ¶
func (iau *IPAddressUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IPAddressUpdate) SaveX ¶
func (iau *IPAddressUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IPAddressUpdate) SetIP ¶
func (iau *IPAddressUpdate) SetIP(s string) *IPAddressUpdate
SetIP sets the "IP" field.
func (*IPAddressUpdate) SetInput ¶
func (c *IPAddressUpdate) SetInput(i UpdateIPAddressInput) *IPAddressUpdate
SetInput applies the change-set in the UpdateIPAddressInput on the IPAddressUpdate builder.
func (*IPAddressUpdate) SetNillableReserved ¶
func (iau *IPAddressUpdate) SetNillableReserved(b *bool) *IPAddressUpdate
SetNillableReserved sets the "reserved" field if the given value is not nil.
func (*IPAddressUpdate) SetReserved ¶
func (iau *IPAddressUpdate) SetReserved(b bool) *IPAddressUpdate
SetReserved sets the "reserved" field.
func (*IPAddressUpdate) Where ¶
func (iau *IPAddressUpdate) Where(ps ...predicate.IPAddress) *IPAddressUpdate
Where appends a list predicates to the IPAddressUpdate builder.
type IPAddressUpdateOne ¶
type IPAddressUpdateOne struct {
// contains filtered or unexported fields
}
IPAddressUpdateOne is the builder for updating a single IPAddress entity.
func (*IPAddressUpdateOne) Exec ¶
func (iauo *IPAddressUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IPAddressUpdateOne) ExecX ¶
func (iauo *IPAddressUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPAddressUpdateOne) Mutation ¶
func (iauo *IPAddressUpdateOne) Mutation() *IPAddressMutation
Mutation returns the IPAddressMutation object of the builder.
func (*IPAddressUpdateOne) Save ¶
func (iauo *IPAddressUpdateOne) Save(ctx context.Context) (*IPAddress, error)
Save executes the query and returns the updated IPAddress entity.
func (*IPAddressUpdateOne) SaveX ¶
func (iauo *IPAddressUpdateOne) SaveX(ctx context.Context) *IPAddress
SaveX is like Save, but panics if an error occurs.
func (*IPAddressUpdateOne) Select ¶
func (iauo *IPAddressUpdateOne) Select(field string, fields ...string) *IPAddressUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*IPAddressUpdateOne) SetIP ¶
func (iauo *IPAddressUpdateOne) SetIP(s string) *IPAddressUpdateOne
SetIP sets the "IP" field.
func (*IPAddressUpdateOne) SetInput ¶
func (c *IPAddressUpdateOne) SetInput(i UpdateIPAddressInput) *IPAddressUpdateOne
SetInput applies the change-set in the UpdateIPAddressInput on the IPAddressUpdateOne builder.
func (*IPAddressUpdateOne) SetNillableReserved ¶
func (iauo *IPAddressUpdateOne) SetNillableReserved(b *bool) *IPAddressUpdateOne
SetNillableReserved sets the "reserved" field if the given value is not nil.
func (*IPAddressUpdateOne) SetReserved ¶
func (iauo *IPAddressUpdateOne) SetReserved(b bool) *IPAddressUpdateOne
SetReserved sets the "reserved" field.
func (*IPAddressUpdateOne) Where ¶
func (iauo *IPAddressUpdateOne) Where(ps ...predicate.IPAddress) *IPAddressUpdateOne
Where appends a list predicates to the IPAddressUpdate builder.
type IPAddressWhereInput ¶
type IPAddressWhereInput struct { Predicates []predicate.IPAddress `json:"-"` Not *IPAddressWhereInput `json:"not,omitempty"` Or []*IPAddressWhereInput `json:"or,omitempty"` And []*IPAddressWhereInput `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"` // "IP" field predicates. IP *string `json:"ip,omitempty"` IPNEQ *string `json:"ipNEQ,omitempty"` IPIn []string `json:"ipIn,omitempty"` IPNotIn []string `json:"ipNotIn,omitempty"` IPGT *string `json:"ipGT,omitempty"` IPGTE *string `json:"ipGTE,omitempty"` IPLT *string `json:"ipLT,omitempty"` IPLTE *string `json:"ipLTE,omitempty"` IPContains *string `json:"ipContains,omitempty"` IPHasPrefix *string `json:"ipHasPrefix,omitempty"` IPHasSuffix *string `json:"ipHasSuffix,omitempty"` IPEqualFold *string `json:"ipEqualFold,omitempty"` IPContainsFold *string `json:"ipContainsFold,omitempty"` // "reserved" field predicates. Reserved *bool `json:"reserved,omitempty"` ReservedNEQ *bool `json:"reservedNEQ,omitempty"` // "ip_block" edge predicates. HasIPBlock *bool `json:"hasIPBlock,omitempty"` HasIPBlockWith []*IPBlockWhereInput `json:"hasIPBlockWith,omitempty"` }
IPAddressWhereInput represents a where input for filtering IPAddress queries.
func (*IPAddressWhereInput) AddPredicates ¶
func (i *IPAddressWhereInput) AddPredicates(predicates ...predicate.IPAddress)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*IPAddressWhereInput) Filter ¶
func (i *IPAddressWhereInput) Filter(q *IPAddressQuery) (*IPAddressQuery, error)
Filter applies the IPAddressWhereInput filter on the IPAddressQuery builder.
type IPBlock ¶
type IPBlock struct { // ID of the ent. // The ID of the IP Block. 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 prefix of the ip block. Prefix string `json:"prefix,omitempty"` // The ID for the block type for this ip block. BlockTypeID gidx.PrefixedID `json:"block_type_id,omitempty"` // The ID for the location for this ip block. LocationID gidx.PrefixedID `json:"location_id,omitempty"` // The ID for the parent of this ip block. ParentBlockID gidx.PrefixedID `json:"parent_block_id,omitempty"` // Allow carving this block into smaller subnets. AllowAutoSubnet bool `json:"allow_auto_subnet,omitempty"` // Allow automatically assigning IPs directly from this block. AllowAutoAllocate bool `json:"allow_auto_allocate,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the IPBlockQuery when eager-loading is set. Edges IPBlockEdges `json:"edges"` // contains filtered or unexported fields }
Represents an ip block node on the graph.
func (*IPBlock) IPAddress ¶
func (ib *IPBlock) IPAddress( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *IPAddressOrder, where *IPAddressWhereInput, ) (*IPAddressConnection, error)
func (*IPBlock) IPBlockType ¶
func (ib *IPBlock) IPBlockType(ctx context.Context) (*IPBlockType, error)
func (*IPBlock) IsNode ¶
func (n *IPBlock) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*IPBlock) NamedIPAddress ¶
NamedIPAddress returns the IPAddress named value or an error if the edge was not loaded in eager-loading with this name.
func (*IPBlock) QueryIPAddress ¶
func (ib *IPBlock) QueryIPAddress() *IPAddressQuery
QueryIPAddress queries the "ip_address" edge of the IPBlock entity.
func (*IPBlock) QueryIPBlockType ¶
func (ib *IPBlock) QueryIPBlockType() *IPBlockTypeQuery
QueryIPBlockType queries the "ip_block_type" edge of the IPBlock entity.
func (*IPBlock) ToEdge ¶
func (ib *IPBlock) ToEdge(order *IPBlockOrder) *IPBlockEdge
ToEdge converts IPBlock into IPBlockEdge.
func (*IPBlock) Unwrap ¶
Unwrap unwraps the IPBlock 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 (*IPBlock) Update ¶
func (ib *IPBlock) Update() *IPBlockUpdateOne
Update returns a builder for updating this IPBlock. Note that you need to call IPBlock.Unwrap() before calling this method if this IPBlock was returned from a transaction, and the transaction was committed or rolled back.
type IPBlockClient ¶
type IPBlockClient struct {
// contains filtered or unexported fields
}
IPBlockClient is a client for the IPBlock schema.
func NewIPBlockClient ¶
func NewIPBlockClient(c config) *IPBlockClient
NewIPBlockClient returns a client for the IPBlock from the given config.
func (*IPBlockClient) Create ¶
func (c *IPBlockClient) Create() *IPBlockCreate
Create returns a builder for creating a IPBlock entity.
func (*IPBlockClient) CreateBulk ¶
func (c *IPBlockClient) CreateBulk(builders ...*IPBlockCreate) *IPBlockCreateBulk
CreateBulk returns a builder for creating a bulk of IPBlock entities.
func (*IPBlockClient) Delete ¶
func (c *IPBlockClient) Delete() *IPBlockDelete
Delete returns a delete builder for IPBlock.
func (*IPBlockClient) DeleteOne ¶
func (c *IPBlockClient) DeleteOne(ib *IPBlock) *IPBlockDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*IPBlockClient) DeleteOneID ¶
func (c *IPBlockClient) DeleteOneID(id gidx.PrefixedID) *IPBlockDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*IPBlockClient) Get ¶
func (c *IPBlockClient) Get(ctx context.Context, id gidx.PrefixedID) (*IPBlock, error)
Get returns a IPBlock entity by its id.
func (*IPBlockClient) GetX ¶
func (c *IPBlockClient) GetX(ctx context.Context, id gidx.PrefixedID) *IPBlock
GetX is like Get, but panics if an error occurs.
func (*IPBlockClient) Hooks ¶
func (c *IPBlockClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IPBlockClient) Intercept ¶
func (c *IPBlockClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ipblock.Intercept(f(g(h())))`.
func (*IPBlockClient) Interceptors ¶
func (c *IPBlockClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*IPBlockClient) MapCreateBulk ¶ added in v0.2.0
func (c *IPBlockClient) MapCreateBulk(slice any, setFunc func(*IPBlockCreate, int)) *IPBlockCreateBulk
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 (*IPBlockClient) Query ¶
func (c *IPBlockClient) Query() *IPBlockQuery
Query returns a query builder for IPBlock.
func (*IPBlockClient) QueryIPAddress ¶
func (c *IPBlockClient) QueryIPAddress(ib *IPBlock) *IPAddressQuery
QueryIPAddress queries the ip_address edge of a IPBlock.
func (*IPBlockClient) QueryIPBlockType ¶
func (c *IPBlockClient) QueryIPBlockType(ib *IPBlock) *IPBlockTypeQuery
QueryIPBlockType queries the ip_block_type edge of a IPBlock.
func (*IPBlockClient) Update ¶
func (c *IPBlockClient) Update() *IPBlockUpdate
Update returns an update builder for IPBlock.
func (*IPBlockClient) UpdateOne ¶
func (c *IPBlockClient) UpdateOne(ib *IPBlock) *IPBlockUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IPBlockClient) UpdateOneID ¶
func (c *IPBlockClient) UpdateOneID(id gidx.PrefixedID) *IPBlockUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IPBlockClient) Use ¶
func (c *IPBlockClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ipblock.Hooks(f(g(h())))`.
type IPBlockConnection ¶
type IPBlockConnection struct { Edges []*IPBlockEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
IPBlockConnection is the connection containing edges to IPBlock.
type IPBlockCreate ¶
type IPBlockCreate struct {
// contains filtered or unexported fields
}
IPBlockCreate is the builder for creating a IPBlock entity.
func (*IPBlockCreate) AddIPAddresIDs ¶
func (ibc *IPBlockCreate) AddIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockCreate
AddIPAddresIDs adds the "ip_address" edge to the IPAddress entity by IDs.
func (*IPBlockCreate) AddIPAddress ¶
func (ibc *IPBlockCreate) AddIPAddress(i ...*IPAddress) *IPBlockCreate
AddIPAddress adds the "ip_address" edges to the IPAddress entity.
func (*IPBlockCreate) Exec ¶
func (ibc *IPBlockCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*IPBlockCreate) ExecX ¶
func (ibc *IPBlockCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockCreate) Mutation ¶
func (ibc *IPBlockCreate) Mutation() *IPBlockMutation
Mutation returns the IPBlockMutation object of the builder.
func (*IPBlockCreate) Save ¶
func (ibc *IPBlockCreate) Save(ctx context.Context) (*IPBlock, error)
Save creates the IPBlock in the database.
func (*IPBlockCreate) SaveX ¶
func (ibc *IPBlockCreate) SaveX(ctx context.Context) *IPBlock
SaveX calls Save and panics if Save returns an error.
func (*IPBlockCreate) SetAllowAutoAllocate ¶
func (ibc *IPBlockCreate) SetAllowAutoAllocate(b bool) *IPBlockCreate
SetAllowAutoAllocate sets the "allow_auto_allocate" field.
func (*IPBlockCreate) SetAllowAutoSubnet ¶
func (ibc *IPBlockCreate) SetAllowAutoSubnet(b bool) *IPBlockCreate
SetAllowAutoSubnet sets the "allow_auto_subnet" field.
func (*IPBlockCreate) SetBlockTypeID ¶
func (ibc *IPBlockCreate) SetBlockTypeID(gi gidx.PrefixedID) *IPBlockCreate
SetBlockTypeID sets the "block_type_id" field.
func (*IPBlockCreate) SetCreatedAt ¶
func (ibc *IPBlockCreate) SetCreatedAt(t time.Time) *IPBlockCreate
SetCreatedAt sets the "created_at" field.
func (*IPBlockCreate) SetID ¶
func (ibc *IPBlockCreate) SetID(gi gidx.PrefixedID) *IPBlockCreate
SetID sets the "id" field.
func (*IPBlockCreate) SetIPBlockType ¶
func (ibc *IPBlockCreate) SetIPBlockType(i *IPBlockType) *IPBlockCreate
SetIPBlockType sets the "ip_block_type" edge to the IPBlockType entity.
func (*IPBlockCreate) SetIPBlockTypeID ¶
func (ibc *IPBlockCreate) SetIPBlockTypeID(id gidx.PrefixedID) *IPBlockCreate
SetIPBlockTypeID sets the "ip_block_type" edge to the IPBlockType entity by ID.
func (*IPBlockCreate) SetInput ¶
func (c *IPBlockCreate) SetInput(i CreateIPBlockInput) *IPBlockCreate
SetInput applies the change-set in the CreateIPBlockInput on the IPBlockCreate builder.
func (*IPBlockCreate) SetLocationID ¶
func (ibc *IPBlockCreate) SetLocationID(gi gidx.PrefixedID) *IPBlockCreate
SetLocationID sets the "location_id" field.
func (*IPBlockCreate) SetNillableAllowAutoAllocate ¶
func (ibc *IPBlockCreate) SetNillableAllowAutoAllocate(b *bool) *IPBlockCreate
SetNillableAllowAutoAllocate sets the "allow_auto_allocate" field if the given value is not nil.
func (*IPBlockCreate) SetNillableAllowAutoSubnet ¶
func (ibc *IPBlockCreate) SetNillableAllowAutoSubnet(b *bool) *IPBlockCreate
SetNillableAllowAutoSubnet sets the "allow_auto_subnet" field if the given value is not nil.
func (*IPBlockCreate) SetNillableCreatedAt ¶
func (ibc *IPBlockCreate) SetNillableCreatedAt(t *time.Time) *IPBlockCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*IPBlockCreate) SetNillableID ¶
func (ibc *IPBlockCreate) SetNillableID(gi *gidx.PrefixedID) *IPBlockCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*IPBlockCreate) SetNillableUpdatedAt ¶
func (ibc *IPBlockCreate) SetNillableUpdatedAt(t *time.Time) *IPBlockCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*IPBlockCreate) SetParentBlockID ¶
func (ibc *IPBlockCreate) SetParentBlockID(gi gidx.PrefixedID) *IPBlockCreate
SetParentBlockID sets the "parent_block_id" field.
func (*IPBlockCreate) SetPrefix ¶
func (ibc *IPBlockCreate) SetPrefix(s string) *IPBlockCreate
SetPrefix sets the "prefix" field.
func (*IPBlockCreate) SetUpdatedAt ¶
func (ibc *IPBlockCreate) SetUpdatedAt(t time.Time) *IPBlockCreate
SetUpdatedAt sets the "updated_at" field.
type IPBlockCreateBulk ¶
type IPBlockCreateBulk struct {
// contains filtered or unexported fields
}
IPBlockCreateBulk is the builder for creating many IPBlock entities in bulk.
func (*IPBlockCreateBulk) Exec ¶
func (ibcb *IPBlockCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*IPBlockCreateBulk) ExecX ¶
func (ibcb *IPBlockCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IPBlockDelete ¶
type IPBlockDelete struct {
// contains filtered or unexported fields
}
IPBlockDelete is the builder for deleting a IPBlock entity.
func (*IPBlockDelete) Exec ¶
func (ibd *IPBlockDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IPBlockDelete) ExecX ¶
func (ibd *IPBlockDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockDelete) Where ¶
func (ibd *IPBlockDelete) Where(ps ...predicate.IPBlock) *IPBlockDelete
Where appends a list predicates to the IPBlockDelete builder.
type IPBlockDeleteOne ¶
type IPBlockDeleteOne struct {
// contains filtered or unexported fields
}
IPBlockDeleteOne is the builder for deleting a single IPBlock entity.
func (*IPBlockDeleteOne) Exec ¶
func (ibdo *IPBlockDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IPBlockDeleteOne) ExecX ¶
func (ibdo *IPBlockDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockDeleteOne) Where ¶
func (ibdo *IPBlockDeleteOne) Where(ps ...predicate.IPBlock) *IPBlockDeleteOne
Where appends a list predicates to the IPBlockDelete builder.
type IPBlockEdge ¶
IPBlockEdge is the edge representation of IPBlock.
type IPBlockEdges ¶
type IPBlockEdges struct { // IPBlockType holds the value of the ip_block_type edge. IPBlockType *IPBlockType `json:"ip_block_type,omitempty"` // IPAddress holds the value of the ip_address edge. IPAddress []*IPAddress `json:"ip_address,omitempty"` // contains filtered or unexported fields }
IPBlockEdges holds the relations/edges for other nodes in the graph.
func (IPBlockEdges) IPAddressOrErr ¶
func (e IPBlockEdges) IPAddressOrErr() ([]*IPAddress, error)
IPAddressOrErr returns the IPAddress value or an error if the edge was not loaded in eager-loading.
func (IPBlockEdges) IPBlockTypeOrErr ¶
func (e IPBlockEdges) IPBlockTypeOrErr() (*IPBlockType, error)
IPBlockTypeOrErr returns the IPBlockType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type IPBlockGroupBy ¶
type IPBlockGroupBy struct {
// contains filtered or unexported fields
}
IPBlockGroupBy is the group-by builder for IPBlock entities.
func (*IPBlockGroupBy) Aggregate ¶
func (ibgb *IPBlockGroupBy) Aggregate(fns ...AggregateFunc) *IPBlockGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IPBlockGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IPBlockGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IPBlockGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IPBlockGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IPBlockGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IPBlockGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IPBlockGroupBy) Scan ¶
func (ibgb *IPBlockGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IPBlockGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IPBlockMutation ¶
type IPBlockMutation struct {
// contains filtered or unexported fields
}
IPBlockMutation represents an operation that mutates the IPBlock nodes in the graph.
func (*IPBlockMutation) AddField ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) AddIPAddresIDs ¶
func (m *IPBlockMutation) AddIPAddresIDs(ids ...gidx.PrefixedID)
AddIPAddresIDs adds the "ip_address" edge to the IPAddress entity by ids.
func (*IPBlockMutation) AddedEdges ¶
func (m *IPBlockMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IPBlockMutation) AddedField ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) AddedFields ¶
func (m *IPBlockMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IPBlockMutation) AddedIDs ¶
func (m *IPBlockMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IPBlockMutation) AllowAutoAllocate ¶
func (m *IPBlockMutation) AllowAutoAllocate() (r bool, exists bool)
AllowAutoAllocate returns the value of the "allow_auto_allocate" field in the mutation.
func (*IPBlockMutation) AllowAutoSubnet ¶
func (m *IPBlockMutation) AllowAutoSubnet() (r bool, exists bool)
AllowAutoSubnet returns the value of the "allow_auto_subnet" field in the mutation.
func (*IPBlockMutation) BlockTypeID ¶
func (m *IPBlockMutation) BlockTypeID() (r gidx.PrefixedID, exists bool)
BlockTypeID returns the value of the "block_type_id" field in the mutation.
func (*IPBlockMutation) ClearEdge ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) ClearField ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) ClearIPAddress ¶
func (m *IPBlockMutation) ClearIPAddress()
ClearIPAddress clears the "ip_address" edge to the IPAddress entity.
func (*IPBlockMutation) ClearIPBlockType ¶
func (m *IPBlockMutation) ClearIPBlockType()
ClearIPBlockType clears the "ip_block_type" edge to the IPBlockType entity.
func (*IPBlockMutation) ClearedEdges ¶
func (m *IPBlockMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IPBlockMutation) ClearedFields ¶
func (m *IPBlockMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IPBlockMutation) Client ¶
func (m IPBlockMutation) 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 (*IPBlockMutation) CreatedAt ¶
func (m *IPBlockMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*IPBlockMutation) EdgeCleared ¶
func (m *IPBlockMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IPBlockMutation) Field ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) FieldCleared ¶
func (m *IPBlockMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IPBlockMutation) Fields ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) ID ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) IDs ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) IPAddressCleared ¶
func (m *IPBlockMutation) IPAddressCleared() bool
IPAddressCleared reports if the "ip_address" edge to the IPAddress entity was cleared.
func (*IPBlockMutation) IPAddressIDs ¶
func (m *IPBlockMutation) IPAddressIDs() (ids []gidx.PrefixedID)
IPAddressIDs returns the "ip_address" edge IDs in the mutation.
func (*IPBlockMutation) IPBlockTypeCleared ¶
func (m *IPBlockMutation) IPBlockTypeCleared() bool
IPBlockTypeCleared reports if the "ip_block_type" edge to the IPBlockType entity was cleared.
func (*IPBlockMutation) IPBlockTypeID ¶
func (m *IPBlockMutation) IPBlockTypeID() (id gidx.PrefixedID, exists bool)
IPBlockTypeID returns the "ip_block_type" edge ID in the mutation.
func (*IPBlockMutation) IPBlockTypeIDs ¶
func (m *IPBlockMutation) IPBlockTypeIDs() (ids []gidx.PrefixedID)
IPBlockTypeIDs returns the "ip_block_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IPBlockTypeID instead. It exists only for internal usage by the builders.
func (*IPBlockMutation) LocationID ¶
func (m *IPBlockMutation) LocationID() (r gidx.PrefixedID, exists bool)
LocationID returns the value of the "location_id" field in the mutation.
func (*IPBlockMutation) OldAllowAutoAllocate ¶
func (m *IPBlockMutation) OldAllowAutoAllocate(ctx context.Context) (v bool, err error)
OldAllowAutoAllocate returns the old "allow_auto_allocate" field's value of the IPBlock entity. If the IPBlock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockMutation) OldAllowAutoSubnet ¶
func (m *IPBlockMutation) OldAllowAutoSubnet(ctx context.Context) (v bool, err error)
OldAllowAutoSubnet returns the old "allow_auto_subnet" field's value of the IPBlock entity. If the IPBlock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockMutation) OldBlockTypeID ¶
func (m *IPBlockMutation) OldBlockTypeID(ctx context.Context) (v gidx.PrefixedID, err error)
OldBlockTypeID returns the old "block_type_id" field's value of the IPBlock entity. If the IPBlock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the IPBlock entity. If the IPBlock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*IPBlockMutation) OldLocationID ¶
func (m *IPBlockMutation) OldLocationID(ctx context.Context) (v gidx.PrefixedID, err error)
OldLocationID returns the old "location_id" field's value of the IPBlock entity. If the IPBlock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockMutation) OldParentBlockID ¶
func (m *IPBlockMutation) OldParentBlockID(ctx context.Context) (v gidx.PrefixedID, err error)
OldParentBlockID returns the old "parent_block_id" field's value of the IPBlock entity. If the IPBlock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockMutation) OldPrefix ¶
func (m *IPBlockMutation) OldPrefix(ctx context.Context) (v string, err error)
OldPrefix returns the old "prefix" field's value of the IPBlock entity. If the IPBlock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the IPBlock entity. If the IPBlock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockMutation) ParentBlockID ¶
func (m *IPBlockMutation) ParentBlockID() (r gidx.PrefixedID, exists bool)
ParentBlockID returns the value of the "parent_block_id" field in the mutation.
func (*IPBlockMutation) Prefix ¶
func (m *IPBlockMutation) Prefix() (r string, exists bool)
Prefix returns the value of the "prefix" field in the mutation.
func (*IPBlockMutation) RemoveIPAddresIDs ¶
func (m *IPBlockMutation) RemoveIPAddresIDs(ids ...gidx.PrefixedID)
RemoveIPAddresIDs removes the "ip_address" edge to the IPAddress entity by IDs.
func (*IPBlockMutation) RemovedEdges ¶
func (m *IPBlockMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IPBlockMutation) RemovedIDs ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) RemovedIPAddressIDs ¶
func (m *IPBlockMutation) RemovedIPAddressIDs() (ids []gidx.PrefixedID)
RemovedIPAddress returns the removed IDs of the "ip_address" edge to the IPAddress entity.
func (*IPBlockMutation) ResetAllowAutoAllocate ¶
func (m *IPBlockMutation) ResetAllowAutoAllocate()
ResetAllowAutoAllocate resets all changes to the "allow_auto_allocate" field.
func (*IPBlockMutation) ResetAllowAutoSubnet ¶
func (m *IPBlockMutation) ResetAllowAutoSubnet()
ResetAllowAutoSubnet resets all changes to the "allow_auto_subnet" field.
func (*IPBlockMutation) ResetBlockTypeID ¶
func (m *IPBlockMutation) ResetBlockTypeID()
ResetBlockTypeID resets all changes to the "block_type_id" field.
func (*IPBlockMutation) ResetCreatedAt ¶
func (m *IPBlockMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*IPBlockMutation) ResetEdge ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) ResetField ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) ResetIPAddress ¶
func (m *IPBlockMutation) ResetIPAddress()
ResetIPAddress resets all changes to the "ip_address" edge.
func (*IPBlockMutation) ResetIPBlockType ¶
func (m *IPBlockMutation) ResetIPBlockType()
ResetIPBlockType resets all changes to the "ip_block_type" edge.
func (*IPBlockMutation) ResetLocationID ¶
func (m *IPBlockMutation) ResetLocationID()
ResetLocationID resets all changes to the "location_id" field.
func (*IPBlockMutation) ResetParentBlockID ¶
func (m *IPBlockMutation) ResetParentBlockID()
ResetParentBlockID resets all changes to the "parent_block_id" field.
func (*IPBlockMutation) ResetPrefix ¶
func (m *IPBlockMutation) ResetPrefix()
ResetPrefix resets all changes to the "prefix" field.
func (*IPBlockMutation) ResetUpdatedAt ¶
func (m *IPBlockMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*IPBlockMutation) SetAllowAutoAllocate ¶
func (m *IPBlockMutation) SetAllowAutoAllocate(b bool)
SetAllowAutoAllocate sets the "allow_auto_allocate" field.
func (*IPBlockMutation) SetAllowAutoSubnet ¶
func (m *IPBlockMutation) SetAllowAutoSubnet(b bool)
SetAllowAutoSubnet sets the "allow_auto_subnet" field.
func (*IPBlockMutation) SetBlockTypeID ¶
func (m *IPBlockMutation) SetBlockTypeID(gi gidx.PrefixedID)
SetBlockTypeID sets the "block_type_id" field.
func (*IPBlockMutation) SetCreatedAt ¶
func (m *IPBlockMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*IPBlockMutation) SetField ¶
func (m *IPBlockMutation) 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 (*IPBlockMutation) SetID ¶
func (m *IPBlockMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of IPBlock entities.
func (*IPBlockMutation) SetIPBlockTypeID ¶
func (m *IPBlockMutation) SetIPBlockTypeID(id gidx.PrefixedID)
SetIPBlockTypeID sets the "ip_block_type" edge to the IPBlockType entity by id.
func (*IPBlockMutation) SetLocationID ¶
func (m *IPBlockMutation) SetLocationID(gi gidx.PrefixedID)
SetLocationID sets the "location_id" field.
func (*IPBlockMutation) SetOp ¶
func (m *IPBlockMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*IPBlockMutation) SetParentBlockID ¶
func (m *IPBlockMutation) SetParentBlockID(gi gidx.PrefixedID)
SetParentBlockID sets the "parent_block_id" field.
func (*IPBlockMutation) SetPrefix ¶
func (m *IPBlockMutation) SetPrefix(s string)
SetPrefix sets the "prefix" field.
func (*IPBlockMutation) SetUpdatedAt ¶
func (m *IPBlockMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (IPBlockMutation) Tx ¶
func (m IPBlockMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IPBlockMutation) Type ¶
func (m *IPBlockMutation) Type() string
Type returns the node type of this mutation (IPBlock).
func (*IPBlockMutation) UpdatedAt ¶
func (m *IPBlockMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*IPBlockMutation) Where ¶
func (m *IPBlockMutation) Where(ps ...predicate.IPBlock)
Where appends a list predicates to the IPBlockMutation builder.
func (*IPBlockMutation) WhereP ¶
func (m *IPBlockMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the IPBlockMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type IPBlockOrder ¶
type IPBlockOrder struct { Direction OrderDirection `json:"direction"` Field *IPBlockOrderField `json:"field"` }
IPBlockOrder defines the ordering of IPBlock.
type IPBlockOrderField ¶
type IPBlockOrderField struct { // Value extracts the ordering value from the given IPBlock. Value func(*IPBlock) (ent.Value, error) // contains filtered or unexported fields }
IPBlockOrderField defines the ordering field of IPBlock.
func (IPBlockOrderField) MarshalGQL ¶
func (f IPBlockOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (IPBlockOrderField) String ¶
func (f IPBlockOrderField) String() string
String implement fmt.Stringer interface.
func (*IPBlockOrderField) UnmarshalGQL ¶
func (f *IPBlockOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type IPBlockPaginateOption ¶
type IPBlockPaginateOption func(*ipblockPager) error
IPBlockPaginateOption enables pagination customization.
func WithIPBlockFilter ¶
func WithIPBlockFilter(filter func(*IPBlockQuery) (*IPBlockQuery, error)) IPBlockPaginateOption
WithIPBlockFilter configures pagination filter.
func WithIPBlockOrder ¶
func WithIPBlockOrder(order *IPBlockOrder) IPBlockPaginateOption
WithIPBlockOrder configures pagination ordering.
type IPBlockQuery ¶
type IPBlockQuery struct {
// contains filtered or unexported fields
}
IPBlockQuery is the builder for querying IPBlock entities.
func (*IPBlockQuery) Aggregate ¶
func (ibq *IPBlockQuery) Aggregate(fns ...AggregateFunc) *IPBlockSelect
Aggregate returns a IPBlockSelect configured with the given aggregations.
func (*IPBlockQuery) All ¶
func (ibq *IPBlockQuery) All(ctx context.Context) ([]*IPBlock, error)
All executes the query and returns a list of IPBlocks.
func (*IPBlockQuery) AllX ¶
func (ibq *IPBlockQuery) AllX(ctx context.Context) []*IPBlock
AllX is like All, but panics if an error occurs.
func (*IPBlockQuery) Clone ¶
func (ibq *IPBlockQuery) Clone() *IPBlockQuery
Clone returns a duplicate of the IPBlockQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IPBlockQuery) CollectFields ¶
func (ib *IPBlockQuery) CollectFields(ctx context.Context, satisfies ...string) (*IPBlockQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*IPBlockQuery) Count ¶
func (ibq *IPBlockQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IPBlockQuery) CountX ¶
func (ibq *IPBlockQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IPBlockQuery) Exist ¶
func (ibq *IPBlockQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IPBlockQuery) ExistX ¶
func (ibq *IPBlockQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IPBlockQuery) First ¶
func (ibq *IPBlockQuery) First(ctx context.Context) (*IPBlock, error)
First returns the first IPBlock entity from the query. Returns a *NotFoundError when no IPBlock was found.
func (*IPBlockQuery) FirstID ¶
func (ibq *IPBlockQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first IPBlock ID from the query. Returns a *NotFoundError when no IPBlock ID was found.
func (*IPBlockQuery) FirstIDX ¶
func (ibq *IPBlockQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*IPBlockQuery) FirstX ¶
func (ibq *IPBlockQuery) FirstX(ctx context.Context) *IPBlock
FirstX is like First, but panics if an error occurs.
func (*IPBlockQuery) GroupBy ¶
func (ibq *IPBlockQuery) GroupBy(field string, fields ...string) *IPBlockGroupBy
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.IPBlock.Query(). GroupBy(ipblock.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*IPBlockQuery) IDs ¶
func (ibq *IPBlockQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of IPBlock IDs.
func (*IPBlockQuery) IDsX ¶
func (ibq *IPBlockQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*IPBlockQuery) Limit ¶
func (ibq *IPBlockQuery) Limit(limit int) *IPBlockQuery
Limit the number of records to be returned by this query.
func (*IPBlockQuery) Offset ¶
func (ibq *IPBlockQuery) Offset(offset int) *IPBlockQuery
Offset to start from.
func (*IPBlockQuery) Only ¶
func (ibq *IPBlockQuery) Only(ctx context.Context) (*IPBlock, error)
Only returns a single IPBlock entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one IPBlock entity is found. Returns a *NotFoundError when no IPBlock entities are found.
func (*IPBlockQuery) OnlyID ¶
func (ibq *IPBlockQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only IPBlock ID in the query. Returns a *NotSingularError when more than one IPBlock ID is found. Returns a *NotFoundError when no entities are found.
func (*IPBlockQuery) OnlyIDX ¶
func (ibq *IPBlockQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IPBlockQuery) OnlyX ¶
func (ibq *IPBlockQuery) OnlyX(ctx context.Context) *IPBlock
OnlyX is like Only, but panics if an error occurs.
func (*IPBlockQuery) Order ¶
func (ibq *IPBlockQuery) Order(o ...ipblock.OrderOption) *IPBlockQuery
Order specifies how the records should be ordered.
func (*IPBlockQuery) Paginate ¶
func (ib *IPBlockQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...IPBlockPaginateOption, ) (*IPBlockConnection, error)
Paginate executes the query and returns a relay based cursor connection to IPBlock.
func (*IPBlockQuery) QueryIPAddress ¶
func (ibq *IPBlockQuery) QueryIPAddress() *IPAddressQuery
QueryIPAddress chains the current query on the "ip_address" edge.
func (*IPBlockQuery) QueryIPBlockType ¶
func (ibq *IPBlockQuery) QueryIPBlockType() *IPBlockTypeQuery
QueryIPBlockType chains the current query on the "ip_block_type" edge.
func (*IPBlockQuery) Select ¶
func (ibq *IPBlockQuery) Select(fields ...string) *IPBlockSelect
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.IPBlock.Query(). Select(ipblock.FieldCreatedAt). Scan(ctx, &v)
func (*IPBlockQuery) Unique ¶
func (ibq *IPBlockQuery) Unique(unique bool) *IPBlockQuery
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 (*IPBlockQuery) Where ¶
func (ibq *IPBlockQuery) Where(ps ...predicate.IPBlock) *IPBlockQuery
Where adds a new predicate for the IPBlockQuery builder.
func (*IPBlockQuery) WithIPAddress ¶
func (ibq *IPBlockQuery) WithIPAddress(opts ...func(*IPAddressQuery)) *IPBlockQuery
WithIPAddress tells the query-builder to eager-load the nodes that are connected to the "ip_address" edge. The optional arguments are used to configure the query builder of the edge.
func (*IPBlockQuery) WithIPBlockType ¶
func (ibq *IPBlockQuery) WithIPBlockType(opts ...func(*IPBlockTypeQuery)) *IPBlockQuery
WithIPBlockType tells the query-builder to eager-load the nodes that are connected to the "ip_block_type" edge. The optional arguments are used to configure the query builder of the edge.
func (*IPBlockQuery) WithNamedIPAddress ¶
func (ibq *IPBlockQuery) WithNamedIPAddress(name string, opts ...func(*IPAddressQuery)) *IPBlockQuery
WithNamedIPAddress tells the query-builder to eager-load the nodes that are connected to the "ip_address" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type IPBlockSelect ¶
type IPBlockSelect struct { *IPBlockQuery // contains filtered or unexported fields }
IPBlockSelect is the builder for selecting fields of IPBlock entities.
func (*IPBlockSelect) Aggregate ¶
func (ibs *IPBlockSelect) Aggregate(fns ...AggregateFunc) *IPBlockSelect
Aggregate adds the given aggregation functions to the selector query.
func (*IPBlockSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IPBlockSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IPBlockSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IPBlockSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IPBlockSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IPBlockSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IPBlockSelect) Scan ¶
func (ibs *IPBlockSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IPBlockSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IPBlockType ¶
type IPBlockType struct { // ID of the ent. // The ID of the IP Block Type. 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 ip block type. Name string `json:"name,omitempty"` // The ID for the owner for this ip block type. 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 IPBlockTypeQuery when eager-loading is set. Edges IPBlockTypeEdges `json:"edges"` // contains filtered or unexported fields }
Represents an ip block type node on the graph.
func (*IPBlockType) IPBlock ¶
func (ibt *IPBlockType) IPBlock( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *IPBlockOrder, where *IPBlockWhereInput, ) (*IPBlockConnection, error)
func (IPBlockType) IsEntity ¶
func (ibt IPBlockType) IsEntity()
IsEntity implement fedruntime.Entity
func (*IPBlockType) IsNode ¶
func (n *IPBlockType) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*IPBlockType) NamedIPBlock ¶
func (ibt *IPBlockType) NamedIPBlock(name string) ([]*IPBlock, error)
NamedIPBlock returns the IPBlock named value or an error if the edge was not loaded in eager-loading with this name.
func (*IPBlockType) QueryIPBlock ¶
func (ibt *IPBlockType) QueryIPBlock() *IPBlockQuery
QueryIPBlock queries the "ip_block" edge of the IPBlockType entity.
func (*IPBlockType) String ¶
func (ibt *IPBlockType) String() string
String implements the fmt.Stringer.
func (*IPBlockType) ToEdge ¶
func (ibt *IPBlockType) ToEdge(order *IPBlockTypeOrder) *IPBlockTypeEdge
ToEdge converts IPBlockType into IPBlockTypeEdge.
func (*IPBlockType) Unwrap ¶
func (ibt *IPBlockType) Unwrap() *IPBlockType
Unwrap unwraps the IPBlockType 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 (*IPBlockType) Update ¶
func (ibt *IPBlockType) Update() *IPBlockTypeUpdateOne
Update returns a builder for updating this IPBlockType. Note that you need to call IPBlockType.Unwrap() before calling this method if this IPBlockType was returned from a transaction, and the transaction was committed or rolled back.
type IPBlockTypeClient ¶
type IPBlockTypeClient struct {
// contains filtered or unexported fields
}
IPBlockTypeClient is a client for the IPBlockType schema.
func NewIPBlockTypeClient ¶
func NewIPBlockTypeClient(c config) *IPBlockTypeClient
NewIPBlockTypeClient returns a client for the IPBlockType from the given config.
func (*IPBlockTypeClient) Create ¶
func (c *IPBlockTypeClient) Create() *IPBlockTypeCreate
Create returns a builder for creating a IPBlockType entity.
func (*IPBlockTypeClient) CreateBulk ¶
func (c *IPBlockTypeClient) CreateBulk(builders ...*IPBlockTypeCreate) *IPBlockTypeCreateBulk
CreateBulk returns a builder for creating a bulk of IPBlockType entities.
func (*IPBlockTypeClient) Delete ¶
func (c *IPBlockTypeClient) Delete() *IPBlockTypeDelete
Delete returns a delete builder for IPBlockType.
func (*IPBlockTypeClient) DeleteOne ¶
func (c *IPBlockTypeClient) DeleteOne(ibt *IPBlockType) *IPBlockTypeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*IPBlockTypeClient) DeleteOneID ¶
func (c *IPBlockTypeClient) DeleteOneID(id gidx.PrefixedID) *IPBlockTypeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*IPBlockTypeClient) Get ¶
func (c *IPBlockTypeClient) Get(ctx context.Context, id gidx.PrefixedID) (*IPBlockType, error)
Get returns a IPBlockType entity by its id.
func (*IPBlockTypeClient) GetX ¶
func (c *IPBlockTypeClient) GetX(ctx context.Context, id gidx.PrefixedID) *IPBlockType
GetX is like Get, but panics if an error occurs.
func (*IPBlockTypeClient) Hooks ¶
func (c *IPBlockTypeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IPBlockTypeClient) Intercept ¶
func (c *IPBlockTypeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ipblocktype.Intercept(f(g(h())))`.
func (*IPBlockTypeClient) Interceptors ¶
func (c *IPBlockTypeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*IPBlockTypeClient) MapCreateBulk ¶ added in v0.2.0
func (c *IPBlockTypeClient) MapCreateBulk(slice any, setFunc func(*IPBlockTypeCreate, int)) *IPBlockTypeCreateBulk
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 (*IPBlockTypeClient) Query ¶
func (c *IPBlockTypeClient) Query() *IPBlockTypeQuery
Query returns a query builder for IPBlockType.
func (*IPBlockTypeClient) QueryIPBlock ¶
func (c *IPBlockTypeClient) QueryIPBlock(ibt *IPBlockType) *IPBlockQuery
QueryIPBlock queries the ip_block edge of a IPBlockType.
func (*IPBlockTypeClient) Update ¶
func (c *IPBlockTypeClient) Update() *IPBlockTypeUpdate
Update returns an update builder for IPBlockType.
func (*IPBlockTypeClient) UpdateOne ¶
func (c *IPBlockTypeClient) UpdateOne(ibt *IPBlockType) *IPBlockTypeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IPBlockTypeClient) UpdateOneID ¶
func (c *IPBlockTypeClient) UpdateOneID(id gidx.PrefixedID) *IPBlockTypeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IPBlockTypeClient) Use ¶
func (c *IPBlockTypeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ipblocktype.Hooks(f(g(h())))`.
type IPBlockTypeConnection ¶
type IPBlockTypeConnection struct { Edges []*IPBlockTypeEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
IPBlockTypeConnection is the connection containing edges to IPBlockType.
type IPBlockTypeCreate ¶
type IPBlockTypeCreate struct {
// contains filtered or unexported fields
}
IPBlockTypeCreate is the builder for creating a IPBlockType entity.
func (*IPBlockTypeCreate) AddIPBlock ¶
func (ibtc *IPBlockTypeCreate) AddIPBlock(i ...*IPBlock) *IPBlockTypeCreate
AddIPBlock adds the "ip_block" edges to the IPBlock entity.
func (*IPBlockTypeCreate) AddIPBlockIDs ¶
func (ibtc *IPBlockTypeCreate) AddIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeCreate
AddIPBlockIDs adds the "ip_block" edge to the IPBlock entity by IDs.
func (*IPBlockTypeCreate) Exec ¶
func (ibtc *IPBlockTypeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*IPBlockTypeCreate) ExecX ¶
func (ibtc *IPBlockTypeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockTypeCreate) Mutation ¶
func (ibtc *IPBlockTypeCreate) Mutation() *IPBlockTypeMutation
Mutation returns the IPBlockTypeMutation object of the builder.
func (*IPBlockTypeCreate) Save ¶
func (ibtc *IPBlockTypeCreate) Save(ctx context.Context) (*IPBlockType, error)
Save creates the IPBlockType in the database.
func (*IPBlockTypeCreate) SaveX ¶
func (ibtc *IPBlockTypeCreate) SaveX(ctx context.Context) *IPBlockType
SaveX calls Save and panics if Save returns an error.
func (*IPBlockTypeCreate) SetCreatedAt ¶
func (ibtc *IPBlockTypeCreate) SetCreatedAt(t time.Time) *IPBlockTypeCreate
SetCreatedAt sets the "created_at" field.
func (*IPBlockTypeCreate) SetID ¶
func (ibtc *IPBlockTypeCreate) SetID(gi gidx.PrefixedID) *IPBlockTypeCreate
SetID sets the "id" field.
func (*IPBlockTypeCreate) SetInput ¶
func (c *IPBlockTypeCreate) SetInput(i CreateIPBlockTypeInput) *IPBlockTypeCreate
SetInput applies the change-set in the CreateIPBlockTypeInput on the IPBlockTypeCreate builder.
func (*IPBlockTypeCreate) SetName ¶
func (ibtc *IPBlockTypeCreate) SetName(s string) *IPBlockTypeCreate
SetName sets the "name" field.
func (*IPBlockTypeCreate) SetNillableCreatedAt ¶
func (ibtc *IPBlockTypeCreate) SetNillableCreatedAt(t *time.Time) *IPBlockTypeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*IPBlockTypeCreate) SetNillableID ¶
func (ibtc *IPBlockTypeCreate) SetNillableID(gi *gidx.PrefixedID) *IPBlockTypeCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*IPBlockTypeCreate) SetNillableUpdatedAt ¶
func (ibtc *IPBlockTypeCreate) SetNillableUpdatedAt(t *time.Time) *IPBlockTypeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*IPBlockTypeCreate) SetOwnerID ¶
func (ibtc *IPBlockTypeCreate) SetOwnerID(gi gidx.PrefixedID) *IPBlockTypeCreate
SetOwnerID sets the "owner_id" field.
func (*IPBlockTypeCreate) SetUpdatedAt ¶
func (ibtc *IPBlockTypeCreate) SetUpdatedAt(t time.Time) *IPBlockTypeCreate
SetUpdatedAt sets the "updated_at" field.
type IPBlockTypeCreateBulk ¶
type IPBlockTypeCreateBulk struct {
// contains filtered or unexported fields
}
IPBlockTypeCreateBulk is the builder for creating many IPBlockType entities in bulk.
func (*IPBlockTypeCreateBulk) Exec ¶
func (ibtcb *IPBlockTypeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*IPBlockTypeCreateBulk) ExecX ¶
func (ibtcb *IPBlockTypeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockTypeCreateBulk) Save ¶
func (ibtcb *IPBlockTypeCreateBulk) Save(ctx context.Context) ([]*IPBlockType, error)
Save creates the IPBlockType entities in the database.
func (*IPBlockTypeCreateBulk) SaveX ¶
func (ibtcb *IPBlockTypeCreateBulk) SaveX(ctx context.Context) []*IPBlockType
SaveX is like Save, but panics if an error occurs.
type IPBlockTypeDelete ¶
type IPBlockTypeDelete struct {
// contains filtered or unexported fields
}
IPBlockTypeDelete is the builder for deleting a IPBlockType entity.
func (*IPBlockTypeDelete) Exec ¶
func (ibtd *IPBlockTypeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IPBlockTypeDelete) ExecX ¶
func (ibtd *IPBlockTypeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockTypeDelete) Where ¶
func (ibtd *IPBlockTypeDelete) Where(ps ...predicate.IPBlockType) *IPBlockTypeDelete
Where appends a list predicates to the IPBlockTypeDelete builder.
type IPBlockTypeDeleteOne ¶
type IPBlockTypeDeleteOne struct {
// contains filtered or unexported fields
}
IPBlockTypeDeleteOne is the builder for deleting a single IPBlockType entity.
func (*IPBlockTypeDeleteOne) Exec ¶
func (ibtdo *IPBlockTypeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IPBlockTypeDeleteOne) ExecX ¶
func (ibtdo *IPBlockTypeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockTypeDeleteOne) Where ¶
func (ibtdo *IPBlockTypeDeleteOne) Where(ps ...predicate.IPBlockType) *IPBlockTypeDeleteOne
Where appends a list predicates to the IPBlockTypeDelete builder.
type IPBlockTypeEdge ¶
type IPBlockTypeEdge struct { Node *IPBlockType `json:"node"` Cursor Cursor `json:"cursor"` }
IPBlockTypeEdge is the edge representation of IPBlockType.
type IPBlockTypeEdges ¶
type IPBlockTypeEdges struct { // IPBlock holds the value of the ip_block edge. IPBlock []*IPBlock `json:"ip_block,omitempty"` // contains filtered or unexported fields }
IPBlockTypeEdges holds the relations/edges for other nodes in the graph.
func (IPBlockTypeEdges) IPBlockOrErr ¶
func (e IPBlockTypeEdges) IPBlockOrErr() ([]*IPBlock, error)
IPBlockOrErr returns the IPBlock value or an error if the edge was not loaded in eager-loading.
type IPBlockTypeGroupBy ¶
type IPBlockTypeGroupBy struct {
// contains filtered or unexported fields
}
IPBlockTypeGroupBy is the group-by builder for IPBlockType entities.
func (*IPBlockTypeGroupBy) Aggregate ¶
func (ibtgb *IPBlockTypeGroupBy) Aggregate(fns ...AggregateFunc) *IPBlockTypeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IPBlockTypeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeGroupBy) Scan ¶
func (ibtgb *IPBlockTypeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IPBlockTypeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IPBlockTypeMutation ¶
type IPBlockTypeMutation struct {
// contains filtered or unexported fields
}
IPBlockTypeMutation represents an operation that mutates the IPBlockType nodes in the graph.
func (*IPBlockTypeMutation) AddField ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) AddIPBlockIDs ¶
func (m *IPBlockTypeMutation) AddIPBlockIDs(ids ...gidx.PrefixedID)
AddIPBlockIDs adds the "ip_block" edge to the IPBlock entity by ids.
func (*IPBlockTypeMutation) AddedEdges ¶
func (m *IPBlockTypeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IPBlockTypeMutation) AddedField ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) AddedFields ¶
func (m *IPBlockTypeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IPBlockTypeMutation) AddedIDs ¶
func (m *IPBlockTypeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IPBlockTypeMutation) ClearEdge ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) ClearField ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) ClearIPBlock ¶
func (m *IPBlockTypeMutation) ClearIPBlock()
ClearIPBlock clears the "ip_block" edge to the IPBlock entity.
func (*IPBlockTypeMutation) ClearedEdges ¶
func (m *IPBlockTypeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IPBlockTypeMutation) ClearedFields ¶
func (m *IPBlockTypeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IPBlockTypeMutation) Client ¶
func (m IPBlockTypeMutation) 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 (*IPBlockTypeMutation) CreatedAt ¶
func (m *IPBlockTypeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*IPBlockTypeMutation) EdgeCleared ¶
func (m *IPBlockTypeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IPBlockTypeMutation) Field ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) FieldCleared ¶
func (m *IPBlockTypeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IPBlockTypeMutation) Fields ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) ID ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) IDs ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) IPBlockCleared ¶
func (m *IPBlockTypeMutation) IPBlockCleared() bool
IPBlockCleared reports if the "ip_block" edge to the IPBlock entity was cleared.
func (*IPBlockTypeMutation) IPBlockIDs ¶
func (m *IPBlockTypeMutation) IPBlockIDs() (ids []gidx.PrefixedID)
IPBlockIDs returns the "ip_block" edge IDs in the mutation.
func (*IPBlockTypeMutation) Name ¶
func (m *IPBlockTypeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*IPBlockTypeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the IPBlockType entity. If the IPBlockType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockTypeMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*IPBlockTypeMutation) OldName ¶
func (m *IPBlockTypeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the IPBlockType entity. If the IPBlockType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockTypeMutation) OldOwnerID ¶
func (m *IPBlockTypeMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)
OldOwnerID returns the old "owner_id" field's value of the IPBlockType entity. If the IPBlockType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockTypeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the IPBlockType entity. If the IPBlockType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPBlockTypeMutation) Op ¶
func (m *IPBlockTypeMutation) Op() Op
Op returns the operation name.
func (*IPBlockTypeMutation) OwnerID ¶
func (m *IPBlockTypeMutation) OwnerID() (r gidx.PrefixedID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*IPBlockTypeMutation) RemoveIPBlockIDs ¶
func (m *IPBlockTypeMutation) RemoveIPBlockIDs(ids ...gidx.PrefixedID)
RemoveIPBlockIDs removes the "ip_block" edge to the IPBlock entity by IDs.
func (*IPBlockTypeMutation) RemovedEdges ¶
func (m *IPBlockTypeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IPBlockTypeMutation) RemovedIDs ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) RemovedIPBlockIDs ¶
func (m *IPBlockTypeMutation) RemovedIPBlockIDs() (ids []gidx.PrefixedID)
RemovedIPBlock returns the removed IDs of the "ip_block" edge to the IPBlock entity.
func (*IPBlockTypeMutation) ResetCreatedAt ¶
func (m *IPBlockTypeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*IPBlockTypeMutation) ResetEdge ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) ResetField ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) ResetIPBlock ¶
func (m *IPBlockTypeMutation) ResetIPBlock()
ResetIPBlock resets all changes to the "ip_block" edge.
func (*IPBlockTypeMutation) ResetName ¶
func (m *IPBlockTypeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*IPBlockTypeMutation) ResetOwnerID ¶
func (m *IPBlockTypeMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*IPBlockTypeMutation) ResetUpdatedAt ¶
func (m *IPBlockTypeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*IPBlockTypeMutation) SetCreatedAt ¶
func (m *IPBlockTypeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*IPBlockTypeMutation) SetField ¶
func (m *IPBlockTypeMutation) 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 (*IPBlockTypeMutation) SetID ¶
func (m *IPBlockTypeMutation) SetID(id gidx.PrefixedID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of IPBlockType entities.
func (*IPBlockTypeMutation) SetName ¶
func (m *IPBlockTypeMutation) SetName(s string)
SetName sets the "name" field.
func (*IPBlockTypeMutation) SetOp ¶
func (m *IPBlockTypeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*IPBlockTypeMutation) SetOwnerID ¶
func (m *IPBlockTypeMutation) SetOwnerID(gi gidx.PrefixedID)
SetOwnerID sets the "owner_id" field.
func (*IPBlockTypeMutation) SetUpdatedAt ¶
func (m *IPBlockTypeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (IPBlockTypeMutation) Tx ¶
func (m IPBlockTypeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IPBlockTypeMutation) Type ¶
func (m *IPBlockTypeMutation) Type() string
Type returns the node type of this mutation (IPBlockType).
func (*IPBlockTypeMutation) UpdatedAt ¶
func (m *IPBlockTypeMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*IPBlockTypeMutation) Where ¶
func (m *IPBlockTypeMutation) Where(ps ...predicate.IPBlockType)
Where appends a list predicates to the IPBlockTypeMutation builder.
func (*IPBlockTypeMutation) WhereP ¶
func (m *IPBlockTypeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the IPBlockTypeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type IPBlockTypeOrder ¶
type IPBlockTypeOrder struct { Direction OrderDirection `json:"direction"` Field *IPBlockTypeOrderField `json:"field"` }
IPBlockTypeOrder defines the ordering of IPBlockType.
type IPBlockTypeOrderField ¶
type IPBlockTypeOrderField struct { // Value extracts the ordering value from the given IPBlockType. Value func(*IPBlockType) (ent.Value, error) // contains filtered or unexported fields }
IPBlockTypeOrderField defines the ordering field of IPBlockType.
func (IPBlockTypeOrderField) MarshalGQL ¶
func (f IPBlockTypeOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (IPBlockTypeOrderField) String ¶
func (f IPBlockTypeOrderField) String() string
String implement fmt.Stringer interface.
func (*IPBlockTypeOrderField) UnmarshalGQL ¶
func (f *IPBlockTypeOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type IPBlockTypePaginateOption ¶
type IPBlockTypePaginateOption func(*ipblocktypePager) error
IPBlockTypePaginateOption enables pagination customization.
func WithIPBlockTypeFilter ¶
func WithIPBlockTypeFilter(filter func(*IPBlockTypeQuery) (*IPBlockTypeQuery, error)) IPBlockTypePaginateOption
WithIPBlockTypeFilter configures pagination filter.
func WithIPBlockTypeOrder ¶
func WithIPBlockTypeOrder(order *IPBlockTypeOrder) IPBlockTypePaginateOption
WithIPBlockTypeOrder configures pagination ordering.
type IPBlockTypeQuery ¶
type IPBlockTypeQuery struct {
// contains filtered or unexported fields
}
IPBlockTypeQuery is the builder for querying IPBlockType entities.
func (*IPBlockTypeQuery) Aggregate ¶
func (ibtq *IPBlockTypeQuery) Aggregate(fns ...AggregateFunc) *IPBlockTypeSelect
Aggregate returns a IPBlockTypeSelect configured with the given aggregations.
func (*IPBlockTypeQuery) All ¶
func (ibtq *IPBlockTypeQuery) All(ctx context.Context) ([]*IPBlockType, error)
All executes the query and returns a list of IPBlockTypes.
func (*IPBlockTypeQuery) AllX ¶
func (ibtq *IPBlockTypeQuery) AllX(ctx context.Context) []*IPBlockType
AllX is like All, but panics if an error occurs.
func (*IPBlockTypeQuery) Clone ¶
func (ibtq *IPBlockTypeQuery) Clone() *IPBlockTypeQuery
Clone returns a duplicate of the IPBlockTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IPBlockTypeQuery) CollectFields ¶
func (ibt *IPBlockTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*IPBlockTypeQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*IPBlockTypeQuery) Count ¶
func (ibtq *IPBlockTypeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IPBlockTypeQuery) CountX ¶
func (ibtq *IPBlockTypeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IPBlockTypeQuery) Exist ¶
func (ibtq *IPBlockTypeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IPBlockTypeQuery) ExistX ¶
func (ibtq *IPBlockTypeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IPBlockTypeQuery) First ¶
func (ibtq *IPBlockTypeQuery) First(ctx context.Context) (*IPBlockType, error)
First returns the first IPBlockType entity from the query. Returns a *NotFoundError when no IPBlockType was found.
func (*IPBlockTypeQuery) FirstID ¶
func (ibtq *IPBlockTypeQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)
FirstID returns the first IPBlockType ID from the query. Returns a *NotFoundError when no IPBlockType ID was found.
func (*IPBlockTypeQuery) FirstIDX ¶
func (ibtq *IPBlockTypeQuery) FirstIDX(ctx context.Context) gidx.PrefixedID
FirstIDX is like FirstID, but panics if an error occurs.
func (*IPBlockTypeQuery) FirstX ¶
func (ibtq *IPBlockTypeQuery) FirstX(ctx context.Context) *IPBlockType
FirstX is like First, but panics if an error occurs.
func (*IPBlockTypeQuery) GroupBy ¶
func (ibtq *IPBlockTypeQuery) GroupBy(field string, fields ...string) *IPBlockTypeGroupBy
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.IPBlockType.Query(). GroupBy(ipblocktype.FieldCreatedAt). Aggregate(generated.Count()). Scan(ctx, &v)
func (*IPBlockTypeQuery) IDs ¶
func (ibtq *IPBlockTypeQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)
IDs executes the query and returns a list of IPBlockType IDs.
func (*IPBlockTypeQuery) IDsX ¶
func (ibtq *IPBlockTypeQuery) IDsX(ctx context.Context) []gidx.PrefixedID
IDsX is like IDs, but panics if an error occurs.
func (*IPBlockTypeQuery) Limit ¶
func (ibtq *IPBlockTypeQuery) Limit(limit int) *IPBlockTypeQuery
Limit the number of records to be returned by this query.
func (*IPBlockTypeQuery) Offset ¶
func (ibtq *IPBlockTypeQuery) Offset(offset int) *IPBlockTypeQuery
Offset to start from.
func (*IPBlockTypeQuery) Only ¶
func (ibtq *IPBlockTypeQuery) Only(ctx context.Context) (*IPBlockType, error)
Only returns a single IPBlockType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one IPBlockType entity is found. Returns a *NotFoundError when no IPBlockType entities are found.
func (*IPBlockTypeQuery) OnlyID ¶
func (ibtq *IPBlockTypeQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)
OnlyID is like Only, but returns the only IPBlockType ID in the query. Returns a *NotSingularError when more than one IPBlockType ID is found. Returns a *NotFoundError when no entities are found.
func (*IPBlockTypeQuery) OnlyIDX ¶
func (ibtq *IPBlockTypeQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IPBlockTypeQuery) OnlyX ¶
func (ibtq *IPBlockTypeQuery) OnlyX(ctx context.Context) *IPBlockType
OnlyX is like Only, but panics if an error occurs.
func (*IPBlockTypeQuery) Order ¶
func (ibtq *IPBlockTypeQuery) Order(o ...ipblocktype.OrderOption) *IPBlockTypeQuery
Order specifies how the records should be ordered.
func (*IPBlockTypeQuery) Paginate ¶
func (ibt *IPBlockTypeQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...IPBlockTypePaginateOption, ) (*IPBlockTypeConnection, error)
Paginate executes the query and returns a relay based cursor connection to IPBlockType.
func (*IPBlockTypeQuery) QueryIPBlock ¶
func (ibtq *IPBlockTypeQuery) QueryIPBlock() *IPBlockQuery
QueryIPBlock chains the current query on the "ip_block" edge.
func (*IPBlockTypeQuery) Select ¶
func (ibtq *IPBlockTypeQuery) Select(fields ...string) *IPBlockTypeSelect
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.IPBlockType.Query(). Select(ipblocktype.FieldCreatedAt). Scan(ctx, &v)
func (*IPBlockTypeQuery) Unique ¶
func (ibtq *IPBlockTypeQuery) Unique(unique bool) *IPBlockTypeQuery
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 (*IPBlockTypeQuery) Where ¶
func (ibtq *IPBlockTypeQuery) Where(ps ...predicate.IPBlockType) *IPBlockTypeQuery
Where adds a new predicate for the IPBlockTypeQuery builder.
func (*IPBlockTypeQuery) WithIPBlock ¶
func (ibtq *IPBlockTypeQuery) WithIPBlock(opts ...func(*IPBlockQuery)) *IPBlockTypeQuery
WithIPBlock tells the query-builder to eager-load the nodes that are connected to the "ip_block" edge. The optional arguments are used to configure the query builder of the edge.
func (*IPBlockTypeQuery) WithNamedIPBlock ¶
func (ibtq *IPBlockTypeQuery) WithNamedIPBlock(name string, opts ...func(*IPBlockQuery)) *IPBlockTypeQuery
WithNamedIPBlock tells the query-builder to eager-load the nodes that are connected to the "ip_block" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type IPBlockTypeSelect ¶
type IPBlockTypeSelect struct { *IPBlockTypeQuery // contains filtered or unexported fields }
IPBlockTypeSelect is the builder for selecting fields of IPBlockType entities.
func (*IPBlockTypeSelect) Aggregate ¶
func (ibts *IPBlockTypeSelect) Aggregate(fns ...AggregateFunc) *IPBlockTypeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*IPBlockTypeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IPBlockTypeSelect) Scan ¶
func (ibts *IPBlockTypeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IPBlockTypeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IPBlockTypeUpdate ¶
type IPBlockTypeUpdate struct {
// contains filtered or unexported fields
}
IPBlockTypeUpdate is the builder for updating IPBlockType entities.
func (*IPBlockTypeUpdate) AddIPBlock ¶
func (ibtu *IPBlockTypeUpdate) AddIPBlock(i ...*IPBlock) *IPBlockTypeUpdate
AddIPBlock adds the "ip_block" edges to the IPBlock entity.
func (*IPBlockTypeUpdate) AddIPBlockIDs ¶
func (ibtu *IPBlockTypeUpdate) AddIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeUpdate
AddIPBlockIDs adds the "ip_block" edge to the IPBlock entity by IDs.
func (*IPBlockTypeUpdate) ClearIPBlock ¶
func (ibtu *IPBlockTypeUpdate) ClearIPBlock() *IPBlockTypeUpdate
ClearIPBlock clears all "ip_block" edges to the IPBlock entity.
func (*IPBlockTypeUpdate) Exec ¶
func (ibtu *IPBlockTypeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IPBlockTypeUpdate) ExecX ¶
func (ibtu *IPBlockTypeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockTypeUpdate) Mutation ¶
func (ibtu *IPBlockTypeUpdate) Mutation() *IPBlockTypeMutation
Mutation returns the IPBlockTypeMutation object of the builder.
func (*IPBlockTypeUpdate) RemoveIPBlock ¶
func (ibtu *IPBlockTypeUpdate) RemoveIPBlock(i ...*IPBlock) *IPBlockTypeUpdate
RemoveIPBlock removes "ip_block" edges to IPBlock entities.
func (*IPBlockTypeUpdate) RemoveIPBlockIDs ¶
func (ibtu *IPBlockTypeUpdate) RemoveIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeUpdate
RemoveIPBlockIDs removes the "ip_block" edge to IPBlock entities by IDs.
func (*IPBlockTypeUpdate) Save ¶
func (ibtu *IPBlockTypeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IPBlockTypeUpdate) SaveX ¶
func (ibtu *IPBlockTypeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IPBlockTypeUpdate) SetInput ¶
func (c *IPBlockTypeUpdate) SetInput(i UpdateIPBlockTypeInput) *IPBlockTypeUpdate
SetInput applies the change-set in the UpdateIPBlockTypeInput on the IPBlockTypeUpdate builder.
func (*IPBlockTypeUpdate) SetName ¶
func (ibtu *IPBlockTypeUpdate) SetName(s string) *IPBlockTypeUpdate
SetName sets the "name" field.
func (*IPBlockTypeUpdate) Where ¶
func (ibtu *IPBlockTypeUpdate) Where(ps ...predicate.IPBlockType) *IPBlockTypeUpdate
Where appends a list predicates to the IPBlockTypeUpdate builder.
type IPBlockTypeUpdateOne ¶
type IPBlockTypeUpdateOne struct {
// contains filtered or unexported fields
}
IPBlockTypeUpdateOne is the builder for updating a single IPBlockType entity.
func (*IPBlockTypeUpdateOne) AddIPBlock ¶
func (ibtuo *IPBlockTypeUpdateOne) AddIPBlock(i ...*IPBlock) *IPBlockTypeUpdateOne
AddIPBlock adds the "ip_block" edges to the IPBlock entity.
func (*IPBlockTypeUpdateOne) AddIPBlockIDs ¶
func (ibtuo *IPBlockTypeUpdateOne) AddIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeUpdateOne
AddIPBlockIDs adds the "ip_block" edge to the IPBlock entity by IDs.
func (*IPBlockTypeUpdateOne) ClearIPBlock ¶
func (ibtuo *IPBlockTypeUpdateOne) ClearIPBlock() *IPBlockTypeUpdateOne
ClearIPBlock clears all "ip_block" edges to the IPBlock entity.
func (*IPBlockTypeUpdateOne) Exec ¶
func (ibtuo *IPBlockTypeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IPBlockTypeUpdateOne) ExecX ¶
func (ibtuo *IPBlockTypeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockTypeUpdateOne) Mutation ¶
func (ibtuo *IPBlockTypeUpdateOne) Mutation() *IPBlockTypeMutation
Mutation returns the IPBlockTypeMutation object of the builder.
func (*IPBlockTypeUpdateOne) RemoveIPBlock ¶
func (ibtuo *IPBlockTypeUpdateOne) RemoveIPBlock(i ...*IPBlock) *IPBlockTypeUpdateOne
RemoveIPBlock removes "ip_block" edges to IPBlock entities.
func (*IPBlockTypeUpdateOne) RemoveIPBlockIDs ¶
func (ibtuo *IPBlockTypeUpdateOne) RemoveIPBlockIDs(ids ...gidx.PrefixedID) *IPBlockTypeUpdateOne
RemoveIPBlockIDs removes the "ip_block" edge to IPBlock entities by IDs.
func (*IPBlockTypeUpdateOne) Save ¶
func (ibtuo *IPBlockTypeUpdateOne) Save(ctx context.Context) (*IPBlockType, error)
Save executes the query and returns the updated IPBlockType entity.
func (*IPBlockTypeUpdateOne) SaveX ¶
func (ibtuo *IPBlockTypeUpdateOne) SaveX(ctx context.Context) *IPBlockType
SaveX is like Save, but panics if an error occurs.
func (*IPBlockTypeUpdateOne) Select ¶
func (ibtuo *IPBlockTypeUpdateOne) Select(field string, fields ...string) *IPBlockTypeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*IPBlockTypeUpdateOne) SetInput ¶
func (c *IPBlockTypeUpdateOne) SetInput(i UpdateIPBlockTypeInput) *IPBlockTypeUpdateOne
SetInput applies the change-set in the UpdateIPBlockTypeInput on the IPBlockTypeUpdateOne builder.
func (*IPBlockTypeUpdateOne) SetName ¶
func (ibtuo *IPBlockTypeUpdateOne) SetName(s string) *IPBlockTypeUpdateOne
SetName sets the "name" field.
func (*IPBlockTypeUpdateOne) Where ¶
func (ibtuo *IPBlockTypeUpdateOne) Where(ps ...predicate.IPBlockType) *IPBlockTypeUpdateOne
Where appends a list predicates to the IPBlockTypeUpdate builder.
type IPBlockTypeWhereInput ¶
type IPBlockTypeWhereInput struct { Predicates []predicate.IPBlockType `json:"-"` Not *IPBlockTypeWhereInput `json:"not,omitempty"` Or []*IPBlockTypeWhereInput `json:"or,omitempty"` And []*IPBlockTypeWhereInput `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"` // "ip_block" edge predicates. HasIPBlock *bool `json:"hasIPBlock,omitempty"` HasIPBlockWith []*IPBlockWhereInput `json:"hasIPBlockWith,omitempty"` }
IPBlockTypeWhereInput represents a where input for filtering IPBlockType queries.
func (*IPBlockTypeWhereInput) AddPredicates ¶
func (i *IPBlockTypeWhereInput) AddPredicates(predicates ...predicate.IPBlockType)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*IPBlockTypeWhereInput) Filter ¶
func (i *IPBlockTypeWhereInput) Filter(q *IPBlockTypeQuery) (*IPBlockTypeQuery, error)
Filter applies the IPBlockTypeWhereInput filter on the IPBlockTypeQuery builder.
func (*IPBlockTypeWhereInput) P ¶
func (i *IPBlockTypeWhereInput) P() (predicate.IPBlockType, error)
P returns a predicate for filtering ipblocktypes. An error is returned if the input is empty or invalid.
type IPBlockTypes ¶
type IPBlockTypes []*IPBlockType
IPBlockTypes is a parsable slice of IPBlockType.
type IPBlockUpdate ¶
type IPBlockUpdate struct {
// contains filtered or unexported fields
}
IPBlockUpdate is the builder for updating IPBlock entities.
func (*IPBlockUpdate) AddIPAddresIDs ¶
func (ibu *IPBlockUpdate) AddIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockUpdate
AddIPAddresIDs adds the "ip_address" edge to the IPAddress entity by IDs.
func (*IPBlockUpdate) AddIPAddress ¶
func (ibu *IPBlockUpdate) AddIPAddress(i ...*IPAddress) *IPBlockUpdate
AddIPAddress adds the "ip_address" edges to the IPAddress entity.
func (*IPBlockUpdate) ClearIPAddress ¶
func (ibu *IPBlockUpdate) ClearIPAddress() *IPBlockUpdate
ClearIPAddress clears all "ip_address" edges to the IPAddress entity.
func (*IPBlockUpdate) Exec ¶
func (ibu *IPBlockUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IPBlockUpdate) ExecX ¶
func (ibu *IPBlockUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockUpdate) Mutation ¶
func (ibu *IPBlockUpdate) Mutation() *IPBlockMutation
Mutation returns the IPBlockMutation object of the builder.
func (*IPBlockUpdate) RemoveIPAddresIDs ¶
func (ibu *IPBlockUpdate) RemoveIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockUpdate
RemoveIPAddresIDs removes the "ip_address" edge to IPAddress entities by IDs.
func (*IPBlockUpdate) RemoveIPAddress ¶
func (ibu *IPBlockUpdate) RemoveIPAddress(i ...*IPAddress) *IPBlockUpdate
RemoveIPAddress removes "ip_address" edges to IPAddress entities.
func (*IPBlockUpdate) Save ¶
func (ibu *IPBlockUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IPBlockUpdate) SaveX ¶
func (ibu *IPBlockUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IPBlockUpdate) SetAllowAutoAllocate ¶
func (ibu *IPBlockUpdate) SetAllowAutoAllocate(b bool) *IPBlockUpdate
SetAllowAutoAllocate sets the "allow_auto_allocate" field.
func (*IPBlockUpdate) SetAllowAutoSubnet ¶
func (ibu *IPBlockUpdate) SetAllowAutoSubnet(b bool) *IPBlockUpdate
SetAllowAutoSubnet sets the "allow_auto_subnet" field.
func (*IPBlockUpdate) SetInput ¶
func (c *IPBlockUpdate) SetInput(i UpdateIPBlockInput) *IPBlockUpdate
SetInput applies the change-set in the UpdateIPBlockInput on the IPBlockUpdate builder.
func (*IPBlockUpdate) SetNillableAllowAutoAllocate ¶
func (ibu *IPBlockUpdate) SetNillableAllowAutoAllocate(b *bool) *IPBlockUpdate
SetNillableAllowAutoAllocate sets the "allow_auto_allocate" field if the given value is not nil.
func (*IPBlockUpdate) SetNillableAllowAutoSubnet ¶
func (ibu *IPBlockUpdate) SetNillableAllowAutoSubnet(b *bool) *IPBlockUpdate
SetNillableAllowAutoSubnet sets the "allow_auto_subnet" field if the given value is not nil.
func (*IPBlockUpdate) SetPrefix ¶
func (ibu *IPBlockUpdate) SetPrefix(s string) *IPBlockUpdate
SetPrefix sets the "prefix" field.
func (*IPBlockUpdate) Where ¶
func (ibu *IPBlockUpdate) Where(ps ...predicate.IPBlock) *IPBlockUpdate
Where appends a list predicates to the IPBlockUpdate builder.
type IPBlockUpdateOne ¶
type IPBlockUpdateOne struct {
// contains filtered or unexported fields
}
IPBlockUpdateOne is the builder for updating a single IPBlock entity.
func (*IPBlockUpdateOne) AddIPAddresIDs ¶
func (ibuo *IPBlockUpdateOne) AddIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockUpdateOne
AddIPAddresIDs adds the "ip_address" edge to the IPAddress entity by IDs.
func (*IPBlockUpdateOne) AddIPAddress ¶
func (ibuo *IPBlockUpdateOne) AddIPAddress(i ...*IPAddress) *IPBlockUpdateOne
AddIPAddress adds the "ip_address" edges to the IPAddress entity.
func (*IPBlockUpdateOne) ClearIPAddress ¶
func (ibuo *IPBlockUpdateOne) ClearIPAddress() *IPBlockUpdateOne
ClearIPAddress clears all "ip_address" edges to the IPAddress entity.
func (*IPBlockUpdateOne) Exec ¶
func (ibuo *IPBlockUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IPBlockUpdateOne) ExecX ¶
func (ibuo *IPBlockUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPBlockUpdateOne) Mutation ¶
func (ibuo *IPBlockUpdateOne) Mutation() *IPBlockMutation
Mutation returns the IPBlockMutation object of the builder.
func (*IPBlockUpdateOne) RemoveIPAddresIDs ¶
func (ibuo *IPBlockUpdateOne) RemoveIPAddresIDs(ids ...gidx.PrefixedID) *IPBlockUpdateOne
RemoveIPAddresIDs removes the "ip_address" edge to IPAddress entities by IDs.
func (*IPBlockUpdateOne) RemoveIPAddress ¶
func (ibuo *IPBlockUpdateOne) RemoveIPAddress(i ...*IPAddress) *IPBlockUpdateOne
RemoveIPAddress removes "ip_address" edges to IPAddress entities.
func (*IPBlockUpdateOne) Save ¶
func (ibuo *IPBlockUpdateOne) Save(ctx context.Context) (*IPBlock, error)
Save executes the query and returns the updated IPBlock entity.
func (*IPBlockUpdateOne) SaveX ¶
func (ibuo *IPBlockUpdateOne) SaveX(ctx context.Context) *IPBlock
SaveX is like Save, but panics if an error occurs.
func (*IPBlockUpdateOne) Select ¶
func (ibuo *IPBlockUpdateOne) Select(field string, fields ...string) *IPBlockUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*IPBlockUpdateOne) SetAllowAutoAllocate ¶
func (ibuo *IPBlockUpdateOne) SetAllowAutoAllocate(b bool) *IPBlockUpdateOne
SetAllowAutoAllocate sets the "allow_auto_allocate" field.
func (*IPBlockUpdateOne) SetAllowAutoSubnet ¶
func (ibuo *IPBlockUpdateOne) SetAllowAutoSubnet(b bool) *IPBlockUpdateOne
SetAllowAutoSubnet sets the "allow_auto_subnet" field.
func (*IPBlockUpdateOne) SetInput ¶
func (c *IPBlockUpdateOne) SetInput(i UpdateIPBlockInput) *IPBlockUpdateOne
SetInput applies the change-set in the UpdateIPBlockInput on the IPBlockUpdateOne builder.
func (*IPBlockUpdateOne) SetNillableAllowAutoAllocate ¶
func (ibuo *IPBlockUpdateOne) SetNillableAllowAutoAllocate(b *bool) *IPBlockUpdateOne
SetNillableAllowAutoAllocate sets the "allow_auto_allocate" field if the given value is not nil.
func (*IPBlockUpdateOne) SetNillableAllowAutoSubnet ¶
func (ibuo *IPBlockUpdateOne) SetNillableAllowAutoSubnet(b *bool) *IPBlockUpdateOne
SetNillableAllowAutoSubnet sets the "allow_auto_subnet" field if the given value is not nil.
func (*IPBlockUpdateOne) SetPrefix ¶
func (ibuo *IPBlockUpdateOne) SetPrefix(s string) *IPBlockUpdateOne
SetPrefix sets the "prefix" field.
func (*IPBlockUpdateOne) Where ¶
func (ibuo *IPBlockUpdateOne) Where(ps ...predicate.IPBlock) *IPBlockUpdateOne
Where appends a list predicates to the IPBlockUpdate builder.
type IPBlockWhereInput ¶
type IPBlockWhereInput struct { Predicates []predicate.IPBlock `json:"-"` Not *IPBlockWhereInput `json:"not,omitempty"` Or []*IPBlockWhereInput `json:"or,omitempty"` And []*IPBlockWhereInput `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"` // "prefix" field predicates. Prefix *string `json:"prefix,omitempty"` PrefixNEQ *string `json:"prefixNEQ,omitempty"` PrefixIn []string `json:"prefixIn,omitempty"` PrefixNotIn []string `json:"prefixNotIn,omitempty"` PrefixGT *string `json:"prefixGT,omitempty"` PrefixGTE *string `json:"prefixGTE,omitempty"` PrefixLT *string `json:"prefixLT,omitempty"` PrefixLTE *string `json:"prefixLTE,omitempty"` PrefixContains *string `json:"prefixContains,omitempty"` PrefixHasPrefix *string `json:"prefixHasPrefix,omitempty"` PrefixHasSuffix *string `json:"prefixHasSuffix,omitempty"` PrefixEqualFold *string `json:"prefixEqualFold,omitempty"` PrefixContainsFold *string `json:"prefixContainsFold,omitempty"` // "allow_auto_subnet" field predicates. AllowAutoSubnet *bool `json:"allowAutoSubnet,omitempty"` AllowAutoSubnetNEQ *bool `json:"allowAutoSubnetNEQ,omitempty"` // "allow_auto_allocate" field predicates. AllowAutoAllocate *bool `json:"allowAutoAllocate,omitempty"` AllowAutoAllocateNEQ *bool `json:"allowAutoAllocateNEQ,omitempty"` // "ip_block_type" edge predicates. HasIPBlockType *bool `json:"hasIPBlockType,omitempty"` HasIPBlockTypeWith []*IPBlockTypeWhereInput `json:"hasIPBlockTypeWith,omitempty"` // "ip_address" edge predicates. HasIPAddress *bool `json:"hasIPAddress,omitempty"` HasIPAddressWith []*IPAddressWhereInput `json:"hasIPAddressWith,omitempty"` }
IPBlockWhereInput represents a where input for filtering IPBlock queries.
func (*IPBlockWhereInput) AddPredicates ¶
func (i *IPBlockWhereInput) AddPredicates(predicates ...predicate.IPBlock)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*IPBlockWhereInput) Filter ¶
func (i *IPBlockWhereInput) Filter(q *IPBlockQuery) (*IPBlockQuery, error)
Filter applies the IPBlockWhereInput filter on the IPBlockQuery builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
func WithNodeType(f func(context.Context, gidx.PrefixedID) (string, error)) NodeOption
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Option ¶
type Option func(*config)
Option function to configure the client.
func EventsPublisher ¶
func EventsPublisher(v events.Connection) Option
EventsPublisher configures the EventsPublisher.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // IPAddress is the client for interacting with the IPAddress builders. IPAddress *IPAddressClient // IPBlock is the client for interacting with the IPBlock builders. IPBlock *IPBlockClient // IPBlockType is the client for interacting with the IPBlockType builders. IPBlockType *IPBlockTypeClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type UpdateIPAddressInput ¶
UpdateIPAddressInput represents a mutation input for updating ipaddresses.
func (*UpdateIPAddressInput) Mutate ¶
func (i *UpdateIPAddressInput) Mutate(m *IPAddressMutation)
Mutate applies the UpdateIPAddressInput on the IPAddressMutation builder.
type UpdateIPBlockInput ¶
UpdateIPBlockInput represents a mutation input for updating ipblocks.
func (*UpdateIPBlockInput) Mutate ¶
func (i *UpdateIPBlockInput) Mutate(m *IPBlockMutation)
Mutate applies the UpdateIPBlockInput on the IPBlockMutation builder.
type UpdateIPBlockTypeInput ¶
type UpdateIPBlockTypeInput struct {
Name *string
}
UpdateIPBlockTypeInput represents a mutation input for updating ipblocktypes.
func (*UpdateIPBlockTypeInput) Mutate ¶
func (i *UpdateIPBlockTypeInput) Mutate(m *IPBlockTypeMutation)
Mutate applies the UpdateIPBlockTypeInput on the IPBlockTypeMutation builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- ent.go
- gql_collection.go
- gql_edge.go
- gql_mutation_input.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- ipaddress.go
- ipaddress_create.go
- ipaddress_delete.go
- ipaddress_query.go
- ipaddress_update.go
- ipblock.go
- ipblock_create.go
- ipblock_delete.go
- ipblock_query.go
- ipblock_update.go
- ipblocktype.go
- ipblocktype_create.go
- ipblocktype_delete.go
- ipblocktype_query.go
- ipblocktype_update.go
- mutation.go
- runtime.go
- tx.go