Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Administrator
- type AdministratorClient
- func (c *AdministratorClient) Create() *AdministratorCreate
- func (c *AdministratorClient) CreateBulk(builders ...*AdministratorCreate) *AdministratorCreateBulk
- func (c *AdministratorClient) Delete() *AdministratorDelete
- func (c *AdministratorClient) DeleteOne(a *Administrator) *AdministratorDeleteOne
- func (c *AdministratorClient) DeleteOneID(id int) *AdministratorDeleteOne
- func (c *AdministratorClient) Get(ctx context.Context, id int) (*Administrator, error)
- func (c *AdministratorClient) GetX(ctx context.Context, id int) *Administrator
- func (c *AdministratorClient) Hooks() []Hook
- func (c *AdministratorClient) Query() *AdministratorQuery
- func (c *AdministratorClient) Update() *AdministratorUpdate
- func (c *AdministratorClient) UpdateOne(a *Administrator) *AdministratorUpdateOne
- func (c *AdministratorClient) UpdateOneID(id int) *AdministratorUpdateOne
- func (c *AdministratorClient) Use(hooks ...Hook)
- type AdministratorCreate
- func (ac *AdministratorCreate) Mutation() *AdministratorMutation
- func (ac *AdministratorCreate) Save(ctx context.Context) (*Administrator, error)
- func (ac *AdministratorCreate) SaveX(ctx context.Context) *Administrator
- func (ac *AdministratorCreate) SetPassword(s string) *AdministratorCreate
- func (ac *AdministratorCreate) SetUsername(s string) *AdministratorCreate
- type AdministratorCreateBulk
- type AdministratorDelete
- type AdministratorDeleteOne
- type AdministratorGroupBy
- func (agb *AdministratorGroupBy) Aggregate(fns ...AggregateFunc) *AdministratorGroupBy
- func (agb *AdministratorGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (agb *AdministratorGroupBy) BoolX(ctx context.Context) bool
- func (agb *AdministratorGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (agb *AdministratorGroupBy) BoolsX(ctx context.Context) []bool
- func (agb *AdministratorGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (agb *AdministratorGroupBy) Float64X(ctx context.Context) float64
- func (agb *AdministratorGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (agb *AdministratorGroupBy) Float64sX(ctx context.Context) []float64
- func (agb *AdministratorGroupBy) Int(ctx context.Context) (_ int, err error)
- func (agb *AdministratorGroupBy) IntX(ctx context.Context) int
- func (agb *AdministratorGroupBy) Ints(ctx context.Context) ([]int, error)
- func (agb *AdministratorGroupBy) IntsX(ctx context.Context) []int
- func (agb *AdministratorGroupBy) Scan(ctx context.Context, v interface{}) error
- func (agb *AdministratorGroupBy) ScanX(ctx context.Context, v interface{})
- func (agb *AdministratorGroupBy) String(ctx context.Context) (_ string, err error)
- func (agb *AdministratorGroupBy) StringX(ctx context.Context) string
- func (agb *AdministratorGroupBy) Strings(ctx context.Context) ([]string, error)
- func (agb *AdministratorGroupBy) StringsX(ctx context.Context) []string
- type AdministratorMutation
- func (m *AdministratorMutation) AddField(name string, value ent.Value) error
- func (m *AdministratorMutation) AddedEdges() []string
- func (m *AdministratorMutation) AddedField(name string) (ent.Value, bool)
- func (m *AdministratorMutation) AddedFields() []string
- func (m *AdministratorMutation) AddedIDs(name string) []ent.Value
- func (m *AdministratorMutation) ClearEdge(name string) error
- func (m *AdministratorMutation) ClearField(name string) error
- func (m *AdministratorMutation) ClearedEdges() []string
- func (m *AdministratorMutation) ClearedFields() []string
- func (m AdministratorMutation) Client() *Client
- func (m *AdministratorMutation) EdgeCleared(name string) bool
- func (m *AdministratorMutation) Field(name string) (ent.Value, bool)
- func (m *AdministratorMutation) FieldCleared(name string) bool
- func (m *AdministratorMutation) Fields() []string
- func (m *AdministratorMutation) ID() (id int, exists bool)
- func (m *AdministratorMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AdministratorMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *AdministratorMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *AdministratorMutation) Op() Op
- func (m *AdministratorMutation) Password() (r string, exists bool)
- func (m *AdministratorMutation) RemovedEdges() []string
- func (m *AdministratorMutation) RemovedIDs(name string) []ent.Value
- func (m *AdministratorMutation) ResetEdge(name string) error
- func (m *AdministratorMutation) ResetField(name string) error
- func (m *AdministratorMutation) ResetPassword()
- func (m *AdministratorMutation) ResetUsername()
- func (m *AdministratorMutation) SetField(name string, value ent.Value) error
- func (m *AdministratorMutation) SetPassword(s string)
- func (m *AdministratorMutation) SetUsername(s string)
- func (m AdministratorMutation) Tx() (*Tx, error)
- func (m *AdministratorMutation) Type() string
- func (m *AdministratorMutation) Username() (r string, exists bool)
- type AdministratorQuery
- func (aq *AdministratorQuery) All(ctx context.Context) ([]*Administrator, error)
- func (aq *AdministratorQuery) AllX(ctx context.Context) []*Administrator
- func (aq *AdministratorQuery) Clone() *AdministratorQuery
- func (aq *AdministratorQuery) Count(ctx context.Context) (int, error)
- func (aq *AdministratorQuery) CountX(ctx context.Context) int
- func (aq *AdministratorQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AdministratorQuery) ExistX(ctx context.Context) bool
- func (aq *AdministratorQuery) First(ctx context.Context) (*Administrator, error)
- func (aq *AdministratorQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AdministratorQuery) FirstIDX(ctx context.Context) int
- func (aq *AdministratorQuery) FirstX(ctx context.Context) *Administrator
- func (aq *AdministratorQuery) GroupBy(field string, fields ...string) *AdministratorGroupBy
- func (aq *AdministratorQuery) IDs(ctx context.Context) ([]int, error)
- func (aq *AdministratorQuery) IDsX(ctx context.Context) []int
- func (aq *AdministratorQuery) Limit(limit int) *AdministratorQuery
- func (aq *AdministratorQuery) Offset(offset int) *AdministratorQuery
- func (aq *AdministratorQuery) Only(ctx context.Context) (*Administrator, error)
- func (aq *AdministratorQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AdministratorQuery) OnlyIDX(ctx context.Context) int
- func (aq *AdministratorQuery) OnlyX(ctx context.Context) *Administrator
- func (aq *AdministratorQuery) Order(o ...OrderFunc) *AdministratorQuery
- func (aq *AdministratorQuery) Select(field string, fields ...string) *AdministratorSelect
- func (aq *AdministratorQuery) Unique(unique bool) *AdministratorQuery
- func (aq *AdministratorQuery) Where(ps ...predicate.Administrator) *AdministratorQuery
- type AdministratorSelect
- func (as *AdministratorSelect) Bool(ctx context.Context) (_ bool, err error)
- func (as *AdministratorSelect) BoolX(ctx context.Context) bool
- func (as *AdministratorSelect) Bools(ctx context.Context) ([]bool, error)
- func (as *AdministratorSelect) BoolsX(ctx context.Context) []bool
- func (as *AdministratorSelect) Float64(ctx context.Context) (_ float64, err error)
- func (as *AdministratorSelect) Float64X(ctx context.Context) float64
- func (as *AdministratorSelect) Float64s(ctx context.Context) ([]float64, error)
- func (as *AdministratorSelect) Float64sX(ctx context.Context) []float64
- func (as *AdministratorSelect) Int(ctx context.Context) (_ int, err error)
- func (as *AdministratorSelect) IntX(ctx context.Context) int
- func (as *AdministratorSelect) Ints(ctx context.Context) ([]int, error)
- func (as *AdministratorSelect) IntsX(ctx context.Context) []int
- func (as *AdministratorSelect) Scan(ctx context.Context, v interface{}) error
- func (as *AdministratorSelect) ScanX(ctx context.Context, v interface{})
- func (as *AdministratorSelect) String(ctx context.Context) (_ string, err error)
- func (as *AdministratorSelect) StringX(ctx context.Context) string
- func (as *AdministratorSelect) Strings(ctx context.Context) ([]string, error)
- func (as *AdministratorSelect) StringsX(ctx context.Context) []string
- type AdministratorUpdate
- func (au *AdministratorUpdate) Exec(ctx context.Context) error
- func (au *AdministratorUpdate) ExecX(ctx context.Context)
- func (au *AdministratorUpdate) Mutation() *AdministratorMutation
- func (au *AdministratorUpdate) Save(ctx context.Context) (int, error)
- func (au *AdministratorUpdate) SaveX(ctx context.Context) int
- func (au *AdministratorUpdate) SetPassword(s string) *AdministratorUpdate
- func (au *AdministratorUpdate) SetUsername(s string) *AdministratorUpdate
- func (au *AdministratorUpdate) Where(ps ...predicate.Administrator) *AdministratorUpdate
- type AdministratorUpdateOne
- func (auo *AdministratorUpdateOne) Exec(ctx context.Context) error
- func (auo *AdministratorUpdateOne) ExecX(ctx context.Context)
- func (auo *AdministratorUpdateOne) Mutation() *AdministratorMutation
- func (auo *AdministratorUpdateOne) Save(ctx context.Context) (*Administrator, error)
- func (auo *AdministratorUpdateOne) SaveX(ctx context.Context) *Administrator
- func (auo *AdministratorUpdateOne) Select(field string, fields ...string) *AdministratorUpdateOne
- func (auo *AdministratorUpdateOne) SetPassword(s string) *AdministratorUpdateOne
- func (auo *AdministratorUpdateOne) SetUsername(s string) *AdministratorUpdateOne
- type Administrators
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type DeletedVlanLog
- type DeletedVlanLogClient
- func (c *DeletedVlanLogClient) Create() *DeletedVlanLogCreate
- func (c *DeletedVlanLogClient) CreateBulk(builders ...*DeletedVlanLogCreate) *DeletedVlanLogCreateBulk
- func (c *DeletedVlanLogClient) Delete() *DeletedVlanLogDelete
- func (c *DeletedVlanLogClient) DeleteOne(dvl *DeletedVlanLog) *DeletedVlanLogDeleteOne
- func (c *DeletedVlanLogClient) DeleteOneID(id int) *DeletedVlanLogDeleteOne
- func (c *DeletedVlanLogClient) Get(ctx context.Context, id int) (*DeletedVlanLog, error)
- func (c *DeletedVlanLogClient) GetX(ctx context.Context, id int) *DeletedVlanLog
- func (c *DeletedVlanLogClient) Hooks() []Hook
- func (c *DeletedVlanLogClient) Query() *DeletedVlanLogQuery
- func (c *DeletedVlanLogClient) QueryOnDevice(dvl *DeletedVlanLog) *DeviceQuery
- func (c *DeletedVlanLogClient) Update() *DeletedVlanLogUpdate
- func (c *DeletedVlanLogClient) UpdateOne(dvl *DeletedVlanLog) *DeletedVlanLogUpdateOne
- func (c *DeletedVlanLogClient) UpdateOneID(id int) *DeletedVlanLogUpdateOne
- func (c *DeletedVlanLogClient) Use(hooks ...Hook)
- type DeletedVlanLogCreate
- func (dvlc *DeletedVlanLogCreate) Mutation() *DeletedVlanLogMutation
- func (dvlc *DeletedVlanLogCreate) Save(ctx context.Context) (*DeletedVlanLog, error)
- func (dvlc *DeletedVlanLogCreate) SaveX(ctx context.Context) *DeletedVlanLog
- func (dvlc *DeletedVlanLogCreate) SetDeleted(b bool) *DeletedVlanLogCreate
- func (dvlc *DeletedVlanLogCreate) SetNillableDeleted(b *bool) *DeletedVlanLogCreate
- func (dvlc *DeletedVlanLogCreate) SetNillableOnDeviceID(id *int) *DeletedVlanLogCreate
- func (dvlc *DeletedVlanLogCreate) SetOnDevice(d *Device) *DeletedVlanLogCreate
- func (dvlc *DeletedVlanLogCreate) SetOnDeviceID(id int) *DeletedVlanLogCreate
- func (dvlc *DeletedVlanLogCreate) SetVlanID(i int) *DeletedVlanLogCreate
- type DeletedVlanLogCreateBulk
- type DeletedVlanLogDelete
- type DeletedVlanLogDeleteOne
- type DeletedVlanLogEdges
- type DeletedVlanLogGroupBy
- func (dvlgb *DeletedVlanLogGroupBy) Aggregate(fns ...AggregateFunc) *DeletedVlanLogGroupBy
- func (dvlgb *DeletedVlanLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (dvlgb *DeletedVlanLogGroupBy) BoolX(ctx context.Context) bool
- func (dvlgb *DeletedVlanLogGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dvlgb *DeletedVlanLogGroupBy) BoolsX(ctx context.Context) []bool
- func (dvlgb *DeletedVlanLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (dvlgb *DeletedVlanLogGroupBy) Float64X(ctx context.Context) float64
- func (dvlgb *DeletedVlanLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dvlgb *DeletedVlanLogGroupBy) Float64sX(ctx context.Context) []float64
- func (dvlgb *DeletedVlanLogGroupBy) Int(ctx context.Context) (_ int, err error)
- func (dvlgb *DeletedVlanLogGroupBy) IntX(ctx context.Context) int
- func (dvlgb *DeletedVlanLogGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dvlgb *DeletedVlanLogGroupBy) IntsX(ctx context.Context) []int
- func (dvlgb *DeletedVlanLogGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dvlgb *DeletedVlanLogGroupBy) ScanX(ctx context.Context, v interface{})
- func (dvlgb *DeletedVlanLogGroupBy) String(ctx context.Context) (_ string, err error)
- func (dvlgb *DeletedVlanLogGroupBy) StringX(ctx context.Context) string
- func (dvlgb *DeletedVlanLogGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dvlgb *DeletedVlanLogGroupBy) StringsX(ctx context.Context) []string
- type DeletedVlanLogMutation
- func (m *DeletedVlanLogMutation) AddField(name string, value ent.Value) error
- func (m *DeletedVlanLogMutation) AddVlanID(i int)
- func (m *DeletedVlanLogMutation) AddedEdges() []string
- func (m *DeletedVlanLogMutation) AddedField(name string) (ent.Value, bool)
- func (m *DeletedVlanLogMutation) AddedFields() []string
- func (m *DeletedVlanLogMutation) AddedIDs(name string) []ent.Value
- func (m *DeletedVlanLogMutation) AddedVlanID() (r int, exists bool)
- func (m *DeletedVlanLogMutation) ClearEdge(name string) error
- func (m *DeletedVlanLogMutation) ClearField(name string) error
- func (m *DeletedVlanLogMutation) ClearOnDevice()
- func (m *DeletedVlanLogMutation) ClearedEdges() []string
- func (m *DeletedVlanLogMutation) ClearedFields() []string
- func (m DeletedVlanLogMutation) Client() *Client
- func (m *DeletedVlanLogMutation) Deleted() (r bool, exists bool)
- func (m *DeletedVlanLogMutation) EdgeCleared(name string) bool
- func (m *DeletedVlanLogMutation) Field(name string) (ent.Value, bool)
- func (m *DeletedVlanLogMutation) FieldCleared(name string) bool
- func (m *DeletedVlanLogMutation) Fields() []string
- func (m *DeletedVlanLogMutation) ID() (id int, exists bool)
- func (m *DeletedVlanLogMutation) OldDeleted(ctx context.Context) (v bool, err error)
- func (m *DeletedVlanLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DeletedVlanLogMutation) OldVlanID(ctx context.Context) (v int, err error)
- func (m *DeletedVlanLogMutation) OnDeviceCleared() bool
- func (m *DeletedVlanLogMutation) OnDeviceID() (id int, exists bool)
- func (m *DeletedVlanLogMutation) OnDeviceIDs() (ids []int)
- func (m *DeletedVlanLogMutation) Op() Op
- func (m *DeletedVlanLogMutation) RemovedEdges() []string
- func (m *DeletedVlanLogMutation) RemovedIDs(name string) []ent.Value
- func (m *DeletedVlanLogMutation) ResetDeleted()
- func (m *DeletedVlanLogMutation) ResetEdge(name string) error
- func (m *DeletedVlanLogMutation) ResetField(name string) error
- func (m *DeletedVlanLogMutation) ResetOnDevice()
- func (m *DeletedVlanLogMutation) ResetVlanID()
- func (m *DeletedVlanLogMutation) SetDeleted(b bool)
- func (m *DeletedVlanLogMutation) SetField(name string, value ent.Value) error
- func (m *DeletedVlanLogMutation) SetOnDeviceID(id int)
- func (m *DeletedVlanLogMutation) SetVlanID(i int)
- func (m DeletedVlanLogMutation) Tx() (*Tx, error)
- func (m *DeletedVlanLogMutation) Type() string
- func (m *DeletedVlanLogMutation) VlanID() (r int, exists bool)
- type DeletedVlanLogQuery
- func (dvlq *DeletedVlanLogQuery) All(ctx context.Context) ([]*DeletedVlanLog, error)
- func (dvlq *DeletedVlanLogQuery) AllX(ctx context.Context) []*DeletedVlanLog
- func (dvlq *DeletedVlanLogQuery) Clone() *DeletedVlanLogQuery
- func (dvlq *DeletedVlanLogQuery) Count(ctx context.Context) (int, error)
- func (dvlq *DeletedVlanLogQuery) CountX(ctx context.Context) int
- func (dvlq *DeletedVlanLogQuery) Exist(ctx context.Context) (bool, error)
- func (dvlq *DeletedVlanLogQuery) ExistX(ctx context.Context) bool
- func (dvlq *DeletedVlanLogQuery) First(ctx context.Context) (*DeletedVlanLog, error)
- func (dvlq *DeletedVlanLogQuery) FirstID(ctx context.Context) (id int, err error)
- func (dvlq *DeletedVlanLogQuery) FirstIDX(ctx context.Context) int
- func (dvlq *DeletedVlanLogQuery) FirstX(ctx context.Context) *DeletedVlanLog
- func (dvlq *DeletedVlanLogQuery) GroupBy(field string, fields ...string) *DeletedVlanLogGroupBy
- func (dvlq *DeletedVlanLogQuery) IDs(ctx context.Context) ([]int, error)
- func (dvlq *DeletedVlanLogQuery) IDsX(ctx context.Context) []int
- func (dvlq *DeletedVlanLogQuery) Limit(limit int) *DeletedVlanLogQuery
- func (dvlq *DeletedVlanLogQuery) Offset(offset int) *DeletedVlanLogQuery
- func (dvlq *DeletedVlanLogQuery) Only(ctx context.Context) (*DeletedVlanLog, error)
- func (dvlq *DeletedVlanLogQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dvlq *DeletedVlanLogQuery) OnlyIDX(ctx context.Context) int
- func (dvlq *DeletedVlanLogQuery) OnlyX(ctx context.Context) *DeletedVlanLog
- func (dvlq *DeletedVlanLogQuery) Order(o ...OrderFunc) *DeletedVlanLogQuery
- func (dvlq *DeletedVlanLogQuery) QueryOnDevice() *DeviceQuery
- func (dvlq *DeletedVlanLogQuery) Select(field string, fields ...string) *DeletedVlanLogSelect
- func (dvlq *DeletedVlanLogQuery) Unique(unique bool) *DeletedVlanLogQuery
- func (dvlq *DeletedVlanLogQuery) Where(ps ...predicate.DeletedVlanLog) *DeletedVlanLogQuery
- func (dvlq *DeletedVlanLogQuery) WithOnDevice(opts ...func(*DeviceQuery)) *DeletedVlanLogQuery
- type DeletedVlanLogSelect
- func (dvls *DeletedVlanLogSelect) Bool(ctx context.Context) (_ bool, err error)
- func (dvls *DeletedVlanLogSelect) BoolX(ctx context.Context) bool
- func (dvls *DeletedVlanLogSelect) Bools(ctx context.Context) ([]bool, error)
- func (dvls *DeletedVlanLogSelect) BoolsX(ctx context.Context) []bool
- func (dvls *DeletedVlanLogSelect) Float64(ctx context.Context) (_ float64, err error)
- func (dvls *DeletedVlanLogSelect) Float64X(ctx context.Context) float64
- func (dvls *DeletedVlanLogSelect) Float64s(ctx context.Context) ([]float64, error)
- func (dvls *DeletedVlanLogSelect) Float64sX(ctx context.Context) []float64
- func (dvls *DeletedVlanLogSelect) Int(ctx context.Context) (_ int, err error)
- func (dvls *DeletedVlanLogSelect) IntX(ctx context.Context) int
- func (dvls *DeletedVlanLogSelect) Ints(ctx context.Context) ([]int, error)
- func (dvls *DeletedVlanLogSelect) IntsX(ctx context.Context) []int
- func (dvls *DeletedVlanLogSelect) Scan(ctx context.Context, v interface{}) error
- func (dvls *DeletedVlanLogSelect) ScanX(ctx context.Context, v interface{})
- func (dvls *DeletedVlanLogSelect) String(ctx context.Context) (_ string, err error)
- func (dvls *DeletedVlanLogSelect) StringX(ctx context.Context) string
- func (dvls *DeletedVlanLogSelect) Strings(ctx context.Context) ([]string, error)
- func (dvls *DeletedVlanLogSelect) StringsX(ctx context.Context) []string
- type DeletedVlanLogUpdate
- func (dvlu *DeletedVlanLogUpdate) AddVlanID(i int) *DeletedVlanLogUpdate
- func (dvlu *DeletedVlanLogUpdate) ClearOnDevice() *DeletedVlanLogUpdate
- func (dvlu *DeletedVlanLogUpdate) Exec(ctx context.Context) error
- func (dvlu *DeletedVlanLogUpdate) ExecX(ctx context.Context)
- func (dvlu *DeletedVlanLogUpdate) Mutation() *DeletedVlanLogMutation
- func (dvlu *DeletedVlanLogUpdate) Save(ctx context.Context) (int, error)
- func (dvlu *DeletedVlanLogUpdate) SaveX(ctx context.Context) int
- func (dvlu *DeletedVlanLogUpdate) SetDeleted(b bool) *DeletedVlanLogUpdate
- func (dvlu *DeletedVlanLogUpdate) SetNillableDeleted(b *bool) *DeletedVlanLogUpdate
- func (dvlu *DeletedVlanLogUpdate) SetNillableOnDeviceID(id *int) *DeletedVlanLogUpdate
- func (dvlu *DeletedVlanLogUpdate) SetOnDevice(d *Device) *DeletedVlanLogUpdate
- func (dvlu *DeletedVlanLogUpdate) SetOnDeviceID(id int) *DeletedVlanLogUpdate
- func (dvlu *DeletedVlanLogUpdate) SetVlanID(i int) *DeletedVlanLogUpdate
- func (dvlu *DeletedVlanLogUpdate) Where(ps ...predicate.DeletedVlanLog) *DeletedVlanLogUpdate
- type DeletedVlanLogUpdateOne
- func (dvluo *DeletedVlanLogUpdateOne) AddVlanID(i int) *DeletedVlanLogUpdateOne
- func (dvluo *DeletedVlanLogUpdateOne) ClearOnDevice() *DeletedVlanLogUpdateOne
- func (dvluo *DeletedVlanLogUpdateOne) Exec(ctx context.Context) error
- func (dvluo *DeletedVlanLogUpdateOne) ExecX(ctx context.Context)
- func (dvluo *DeletedVlanLogUpdateOne) Mutation() *DeletedVlanLogMutation
- func (dvluo *DeletedVlanLogUpdateOne) Save(ctx context.Context) (*DeletedVlanLog, error)
- func (dvluo *DeletedVlanLogUpdateOne) SaveX(ctx context.Context) *DeletedVlanLog
- func (dvluo *DeletedVlanLogUpdateOne) Select(field string, fields ...string) *DeletedVlanLogUpdateOne
- func (dvluo *DeletedVlanLogUpdateOne) SetDeleted(b bool) *DeletedVlanLogUpdateOne
- func (dvluo *DeletedVlanLogUpdateOne) SetNillableDeleted(b *bool) *DeletedVlanLogUpdateOne
- func (dvluo *DeletedVlanLogUpdateOne) SetNillableOnDeviceID(id *int) *DeletedVlanLogUpdateOne
- func (dvluo *DeletedVlanLogUpdateOne) SetOnDevice(d *Device) *DeletedVlanLogUpdateOne
- func (dvluo *DeletedVlanLogUpdateOne) SetOnDeviceID(id int) *DeletedVlanLogUpdateOne
- func (dvluo *DeletedVlanLogUpdateOne) SetVlanID(i int) *DeletedVlanLogUpdateOne
- type DeletedVlanLogs
- type Device
- func (d *Device) QueryDeletedVlans() *DeletedVlanLogQuery
- func (d *Device) QueryHaveIPAddresses() *IPAddressQuery
- func (d *Device) QueryIPStaticRouting() *IPStaticRoutingTableQuery
- func (d *Device) QueryInPlatform() *DevicePlatformQuery
- func (d *Device) QueryInTopology() *NetTopologyDeviceMapQuery
- func (d *Device) QueryInType() *DeviceTypeQuery
- func (d *Device) QueryInterfaces() *NetInterfaceQuery
- func (d *Device) QueryPoInterfaces() *PortChannelInterfaceQuery
- func (d *Device) QueryStoreVlans() *VlanQuery
- func (d *Device) String() string
- func (d *Device) Unwrap() *Device
- func (d *Device) Update() *DeviceUpdateOne
- type DeviceClient
- func (c *DeviceClient) Create() *DeviceCreate
- func (c *DeviceClient) CreateBulk(builders ...*DeviceCreate) *DeviceCreateBulk
- func (c *DeviceClient) Delete() *DeviceDelete
- func (c *DeviceClient) DeleteOne(d *Device) *DeviceDeleteOne
- func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne
- func (c *DeviceClient) Get(ctx context.Context, id int) (*Device, error)
- func (c *DeviceClient) GetX(ctx context.Context, id int) *Device
- func (c *DeviceClient) Hooks() []Hook
- func (c *DeviceClient) Query() *DeviceQuery
- func (c *DeviceClient) QueryDeletedVlans(d *Device) *DeletedVlanLogQuery
- func (c *DeviceClient) QueryHaveIPAddresses(d *Device) *IPAddressQuery
- func (c *DeviceClient) QueryIPStaticRouting(d *Device) *IPStaticRoutingTableQuery
- func (c *DeviceClient) QueryInPlatform(d *Device) *DevicePlatformQuery
- func (c *DeviceClient) QueryInTopology(d *Device) *NetTopologyDeviceMapQuery
- func (c *DeviceClient) QueryInType(d *Device) *DeviceTypeQuery
- func (c *DeviceClient) QueryInterfaces(d *Device) *NetInterfaceQuery
- func (c *DeviceClient) QueryPoInterfaces(d *Device) *PortChannelInterfaceQuery
- func (c *DeviceClient) QueryStoreVlans(d *Device) *VlanQuery
- func (c *DeviceClient) Update() *DeviceUpdate
- func (c *DeviceClient) UpdateOne(d *Device) *DeviceUpdateOne
- func (c *DeviceClient) UpdateOneID(id int) *DeviceUpdateOne
- func (c *DeviceClient) Use(hooks ...Hook)
- type DeviceCreate
- func (dc *DeviceCreate) AddDeletedVlanIDs(ids ...int) *DeviceCreate
- func (dc *DeviceCreate) AddDeletedVlans(d ...*DeletedVlanLog) *DeviceCreate
- func (dc *DeviceCreate) AddHaveIPAddressIDs(ids ...int) *DeviceCreate
- func (dc *DeviceCreate) AddHaveIPAddresses(i ...*IPAddress) *DeviceCreate
- func (dc *DeviceCreate) AddIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceCreate
- func (dc *DeviceCreate) AddIPStaticRoutingIDs(ids ...int) *DeviceCreate
- func (dc *DeviceCreate) AddInTopology(n ...*NetTopologyDeviceMap) *DeviceCreate
- func (dc *DeviceCreate) AddInTopologyIDs(ids ...int) *DeviceCreate
- func (dc *DeviceCreate) AddInterfaceIDs(ids ...int) *DeviceCreate
- func (dc *DeviceCreate) AddInterfaces(n ...*NetInterface) *DeviceCreate
- func (dc *DeviceCreate) AddPoInterfaceIDs(ids ...int) *DeviceCreate
- func (dc *DeviceCreate) AddPoInterfaces(p ...*PortChannelInterface) *DeviceCreate
- func (dc *DeviceCreate) AddStoreVlanIDs(ids ...int) *DeviceCreate
- func (dc *DeviceCreate) AddStoreVlans(v ...*Vlan) *DeviceCreate
- func (dc *DeviceCreate) Mutation() *DeviceMutation
- func (dc *DeviceCreate) Save(ctx context.Context) (*Device, error)
- func (dc *DeviceCreate) SaveX(ctx context.Context) *Device
- func (dc *DeviceCreate) SetDeviceCommitConfig(b bool) *DeviceCreate
- func (dc *DeviceCreate) SetDeviceHostname(s string) *DeviceCreate
- func (dc *DeviceCreate) SetDeviceName(s string) *DeviceCreate
- func (dc *DeviceCreate) SetDevicePassword(s string) *DeviceCreate
- func (dc *DeviceCreate) SetDeviceSSHPort(i int) *DeviceCreate
- func (dc *DeviceCreate) SetDeviceSecret(s string) *DeviceCreate
- func (dc *DeviceCreate) SetDeviceUsername(s string) *DeviceCreate
- func (dc *DeviceCreate) SetInPlatform(d *DevicePlatform) *DeviceCreate
- func (dc *DeviceCreate) SetInPlatformID(id int) *DeviceCreate
- func (dc *DeviceCreate) SetInType(d *DeviceType) *DeviceCreate
- func (dc *DeviceCreate) SetInTypeID(id int) *DeviceCreate
- func (dc *DeviceCreate) SetNillableDeviceCommitConfig(b *bool) *DeviceCreate
- func (dc *DeviceCreate) SetNillableDevicePassword(s *string) *DeviceCreate
- func (dc *DeviceCreate) SetNillableDeviceSSHPort(i *int) *DeviceCreate
- func (dc *DeviceCreate) SetNillableDeviceSecret(s *string) *DeviceCreate
- func (dc *DeviceCreate) SetNillableDeviceUsername(s *string) *DeviceCreate
- func (dc *DeviceCreate) SetNillableInPlatformID(id *int) *DeviceCreate
- func (dc *DeviceCreate) SetNillableInTypeID(id *int) *DeviceCreate
- type DeviceCreateBulk
- type DeviceDelete
- type DeviceDeleteOne
- type DeviceEdges
- func (e DeviceEdges) DeletedVlansOrErr() ([]*DeletedVlanLog, error)
- func (e DeviceEdges) HaveIPAddressesOrErr() ([]*IPAddress, error)
- func (e DeviceEdges) IPStaticRoutingOrErr() ([]*IPStaticRoutingTable, error)
- func (e DeviceEdges) InPlatformOrErr() (*DevicePlatform, error)
- func (e DeviceEdges) InTopologyOrErr() ([]*NetTopologyDeviceMap, error)
- func (e DeviceEdges) InTypeOrErr() (*DeviceType, error)
- func (e DeviceEdges) InterfacesOrErr() ([]*NetInterface, error)
- func (e DeviceEdges) PoInterfacesOrErr() ([]*PortChannelInterface, error)
- func (e DeviceEdges) StoreVlansOrErr() ([]*Vlan, error)
- type DeviceGroupBy
- func (dgb *DeviceGroupBy) Aggregate(fns ...AggregateFunc) *DeviceGroupBy
- func (dgb *DeviceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (dgb *DeviceGroupBy) BoolX(ctx context.Context) bool
- func (dgb *DeviceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dgb *DeviceGroupBy) BoolsX(ctx context.Context) []bool
- func (dgb *DeviceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (dgb *DeviceGroupBy) Float64X(ctx context.Context) float64
- func (dgb *DeviceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dgb *DeviceGroupBy) Float64sX(ctx context.Context) []float64
- func (dgb *DeviceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (dgb *DeviceGroupBy) IntX(ctx context.Context) int
- func (dgb *DeviceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dgb *DeviceGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DeviceGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dgb *DeviceGroupBy) ScanX(ctx context.Context, v interface{})
- func (dgb *DeviceGroupBy) String(ctx context.Context) (_ string, err error)
- func (dgb *DeviceGroupBy) StringX(ctx context.Context) string
- func (dgb *DeviceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dgb *DeviceGroupBy) StringsX(ctx context.Context) []string
- type DeviceMutation
- func (m *DeviceMutation) AddDeletedVlanIDs(ids ...int)
- func (m *DeviceMutation) AddDeviceSSHPort(i int)
- func (m *DeviceMutation) AddField(name string, value ent.Value) error
- func (m *DeviceMutation) AddHaveIPAddressIDs(ids ...int)
- func (m *DeviceMutation) AddIPStaticRoutingIDs(ids ...int)
- func (m *DeviceMutation) AddInTopologyIDs(ids ...int)
- func (m *DeviceMutation) AddInterfaceIDs(ids ...int)
- func (m *DeviceMutation) AddPoInterfaceIDs(ids ...int)
- func (m *DeviceMutation) AddStoreVlanIDs(ids ...int)
- func (m *DeviceMutation) AddedDeviceSSHPort() (r int, exists bool)
- func (m *DeviceMutation) AddedEdges() []string
- func (m *DeviceMutation) AddedField(name string) (ent.Value, bool)
- func (m *DeviceMutation) AddedFields() []string
- func (m *DeviceMutation) AddedIDs(name string) []ent.Value
- func (m *DeviceMutation) ClearDeletedVlans()
- func (m *DeviceMutation) ClearDevicePassword()
- func (m *DeviceMutation) ClearDeviceSecret()
- func (m *DeviceMutation) ClearDeviceUsername()
- func (m *DeviceMutation) ClearEdge(name string) error
- func (m *DeviceMutation) ClearField(name string) error
- func (m *DeviceMutation) ClearHaveIPAddresses()
- func (m *DeviceMutation) ClearIPStaticRouting()
- func (m *DeviceMutation) ClearInPlatform()
- func (m *DeviceMutation) ClearInTopology()
- func (m *DeviceMutation) ClearInType()
- func (m *DeviceMutation) ClearInterfaces()
- func (m *DeviceMutation) ClearPoInterfaces()
- func (m *DeviceMutation) ClearStoreVlans()
- func (m *DeviceMutation) ClearedEdges() []string
- func (m *DeviceMutation) ClearedFields() []string
- func (m DeviceMutation) Client() *Client
- func (m *DeviceMutation) DeletedVlansCleared() bool
- func (m *DeviceMutation) DeletedVlansIDs() (ids []int)
- func (m *DeviceMutation) DeviceCommitConfig() (r bool, exists bool)
- func (m *DeviceMutation) DeviceHostname() (r string, exists bool)
- func (m *DeviceMutation) DeviceName() (r string, exists bool)
- func (m *DeviceMutation) DevicePassword() (r string, exists bool)
- func (m *DeviceMutation) DevicePasswordCleared() bool
- func (m *DeviceMutation) DeviceSSHPort() (r int, exists bool)
- func (m *DeviceMutation) DeviceSecret() (r string, exists bool)
- func (m *DeviceMutation) DeviceSecretCleared() bool
- func (m *DeviceMutation) DeviceUsername() (r string, exists bool)
- func (m *DeviceMutation) DeviceUsernameCleared() bool
- func (m *DeviceMutation) EdgeCleared(name string) bool
- func (m *DeviceMutation) Field(name string) (ent.Value, bool)
- func (m *DeviceMutation) FieldCleared(name string) bool
- func (m *DeviceMutation) Fields() []string
- func (m *DeviceMutation) HaveIPAddressesCleared() bool
- func (m *DeviceMutation) HaveIPAddressesIDs() (ids []int)
- func (m *DeviceMutation) ID() (id int, exists bool)
- func (m *DeviceMutation) IPStaticRoutingCleared() bool
- func (m *DeviceMutation) IPStaticRoutingIDs() (ids []int)
- func (m *DeviceMutation) InPlatformCleared() bool
- func (m *DeviceMutation) InPlatformID() (id int, exists bool)
- func (m *DeviceMutation) InPlatformIDs() (ids []int)
- func (m *DeviceMutation) InTopologyCleared() bool
- func (m *DeviceMutation) InTopologyIDs() (ids []int)
- func (m *DeviceMutation) InTypeCleared() bool
- func (m *DeviceMutation) InTypeID() (id int, exists bool)
- func (m *DeviceMutation) InTypeIDs() (ids []int)
- func (m *DeviceMutation) InterfacesCleared() bool
- func (m *DeviceMutation) InterfacesIDs() (ids []int)
- func (m *DeviceMutation) OldDeviceCommitConfig(ctx context.Context) (v bool, err error)
- func (m *DeviceMutation) OldDeviceHostname(ctx context.Context) (v string, err error)
- func (m *DeviceMutation) OldDeviceName(ctx context.Context) (v string, err error)
- func (m *DeviceMutation) OldDevicePassword(ctx context.Context) (v string, err error)
- func (m *DeviceMutation) OldDeviceSSHPort(ctx context.Context) (v int, err error)
- func (m *DeviceMutation) OldDeviceSecret(ctx context.Context) (v string, err error)
- func (m *DeviceMutation) OldDeviceUsername(ctx context.Context) (v string, err error)
- func (m *DeviceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DeviceMutation) Op() Op
- func (m *DeviceMutation) PoInterfacesCleared() bool
- func (m *DeviceMutation) PoInterfacesIDs() (ids []int)
- func (m *DeviceMutation) RemoveDeletedVlanIDs(ids ...int)
- func (m *DeviceMutation) RemoveHaveIPAddressIDs(ids ...int)
- func (m *DeviceMutation) RemoveIPStaticRoutingIDs(ids ...int)
- func (m *DeviceMutation) RemoveInTopologyIDs(ids ...int)
- func (m *DeviceMutation) RemoveInterfaceIDs(ids ...int)
- func (m *DeviceMutation) RemovePoInterfaceIDs(ids ...int)
- func (m *DeviceMutation) RemoveStoreVlanIDs(ids ...int)
- func (m *DeviceMutation) RemovedDeletedVlansIDs() (ids []int)
- func (m *DeviceMutation) RemovedEdges() []string
- func (m *DeviceMutation) RemovedHaveIPAddressesIDs() (ids []int)
- func (m *DeviceMutation) RemovedIDs(name string) []ent.Value
- func (m *DeviceMutation) RemovedIPStaticRoutingIDs() (ids []int)
- func (m *DeviceMutation) RemovedInTopologyIDs() (ids []int)
- func (m *DeviceMutation) RemovedInterfacesIDs() (ids []int)
- func (m *DeviceMutation) RemovedPoInterfacesIDs() (ids []int)
- func (m *DeviceMutation) RemovedStoreVlansIDs() (ids []int)
- func (m *DeviceMutation) ResetDeletedVlans()
- func (m *DeviceMutation) ResetDeviceCommitConfig()
- func (m *DeviceMutation) ResetDeviceHostname()
- func (m *DeviceMutation) ResetDeviceName()
- func (m *DeviceMutation) ResetDevicePassword()
- func (m *DeviceMutation) ResetDeviceSSHPort()
- func (m *DeviceMutation) ResetDeviceSecret()
- func (m *DeviceMutation) ResetDeviceUsername()
- func (m *DeviceMutation) ResetEdge(name string) error
- func (m *DeviceMutation) ResetField(name string) error
- func (m *DeviceMutation) ResetHaveIPAddresses()
- func (m *DeviceMutation) ResetIPStaticRouting()
- func (m *DeviceMutation) ResetInPlatform()
- func (m *DeviceMutation) ResetInTopology()
- func (m *DeviceMutation) ResetInType()
- func (m *DeviceMutation) ResetInterfaces()
- func (m *DeviceMutation) ResetPoInterfaces()
- func (m *DeviceMutation) ResetStoreVlans()
- func (m *DeviceMutation) SetDeviceCommitConfig(b bool)
- func (m *DeviceMutation) SetDeviceHostname(s string)
- func (m *DeviceMutation) SetDeviceName(s string)
- func (m *DeviceMutation) SetDevicePassword(s string)
- func (m *DeviceMutation) SetDeviceSSHPort(i int)
- func (m *DeviceMutation) SetDeviceSecret(s string)
- func (m *DeviceMutation) SetDeviceUsername(s string)
- func (m *DeviceMutation) SetField(name string, value ent.Value) error
- func (m *DeviceMutation) SetInPlatformID(id int)
- func (m *DeviceMutation) SetInTypeID(id int)
- func (m *DeviceMutation) StoreVlansCleared() bool
- func (m *DeviceMutation) StoreVlansIDs() (ids []int)
- func (m DeviceMutation) Tx() (*Tx, error)
- func (m *DeviceMutation) Type() string
- type DevicePlatform
- type DevicePlatformClient
- func (c *DevicePlatformClient) Create() *DevicePlatformCreate
- func (c *DevicePlatformClient) CreateBulk(builders ...*DevicePlatformCreate) *DevicePlatformCreateBulk
- func (c *DevicePlatformClient) Delete() *DevicePlatformDelete
- func (c *DevicePlatformClient) DeleteOne(dp *DevicePlatform) *DevicePlatformDeleteOne
- func (c *DevicePlatformClient) DeleteOneID(id int) *DevicePlatformDeleteOne
- func (c *DevicePlatformClient) Get(ctx context.Context, id int) (*DevicePlatform, error)
- func (c *DevicePlatformClient) GetX(ctx context.Context, id int) *DevicePlatform
- func (c *DevicePlatformClient) Hooks() []Hook
- func (c *DevicePlatformClient) Query() *DevicePlatformQuery
- func (c *DevicePlatformClient) QueryPlatforms(dp *DevicePlatform) *DeviceQuery
- func (c *DevicePlatformClient) Update() *DevicePlatformUpdate
- func (c *DevicePlatformClient) UpdateOne(dp *DevicePlatform) *DevicePlatformUpdateOne
- func (c *DevicePlatformClient) UpdateOneID(id int) *DevicePlatformUpdateOne
- func (c *DevicePlatformClient) Use(hooks ...Hook)
- type DevicePlatformCreate
- func (dpc *DevicePlatformCreate) AddPlatformIDs(ids ...int) *DevicePlatformCreate
- func (dpc *DevicePlatformCreate) AddPlatforms(d ...*Device) *DevicePlatformCreate
- func (dpc *DevicePlatformCreate) Mutation() *DevicePlatformMutation
- func (dpc *DevicePlatformCreate) Save(ctx context.Context) (*DevicePlatform, error)
- func (dpc *DevicePlatformCreate) SaveX(ctx context.Context) *DevicePlatform
- func (dpc *DevicePlatformCreate) SetDevicePlatformName(s string) *DevicePlatformCreate
- type DevicePlatformCreateBulk
- type DevicePlatformDelete
- type DevicePlatformDeleteOne
- type DevicePlatformEdges
- type DevicePlatformGroupBy
- func (dpgb *DevicePlatformGroupBy) Aggregate(fns ...AggregateFunc) *DevicePlatformGroupBy
- func (dpgb *DevicePlatformGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (dpgb *DevicePlatformGroupBy) BoolX(ctx context.Context) bool
- func (dpgb *DevicePlatformGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dpgb *DevicePlatformGroupBy) BoolsX(ctx context.Context) []bool
- func (dpgb *DevicePlatformGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (dpgb *DevicePlatformGroupBy) Float64X(ctx context.Context) float64
- func (dpgb *DevicePlatformGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dpgb *DevicePlatformGroupBy) Float64sX(ctx context.Context) []float64
- func (dpgb *DevicePlatformGroupBy) Int(ctx context.Context) (_ int, err error)
- func (dpgb *DevicePlatformGroupBy) IntX(ctx context.Context) int
- func (dpgb *DevicePlatformGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dpgb *DevicePlatformGroupBy) IntsX(ctx context.Context) []int
- func (dpgb *DevicePlatformGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dpgb *DevicePlatformGroupBy) ScanX(ctx context.Context, v interface{})
- func (dpgb *DevicePlatformGroupBy) String(ctx context.Context) (_ string, err error)
- func (dpgb *DevicePlatformGroupBy) StringX(ctx context.Context) string
- func (dpgb *DevicePlatformGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dpgb *DevicePlatformGroupBy) StringsX(ctx context.Context) []string
- type DevicePlatformMutation
- func (m *DevicePlatformMutation) AddField(name string, value ent.Value) error
- func (m *DevicePlatformMutation) AddPlatformIDs(ids ...int)
- func (m *DevicePlatformMutation) AddedEdges() []string
- func (m *DevicePlatformMutation) AddedField(name string) (ent.Value, bool)
- func (m *DevicePlatformMutation) AddedFields() []string
- func (m *DevicePlatformMutation) AddedIDs(name string) []ent.Value
- func (m *DevicePlatformMutation) ClearEdge(name string) error
- func (m *DevicePlatformMutation) ClearField(name string) error
- func (m *DevicePlatformMutation) ClearPlatforms()
- func (m *DevicePlatformMutation) ClearedEdges() []string
- func (m *DevicePlatformMutation) ClearedFields() []string
- func (m DevicePlatformMutation) Client() *Client
- func (m *DevicePlatformMutation) DevicePlatformName() (r string, exists bool)
- func (m *DevicePlatformMutation) EdgeCleared(name string) bool
- func (m *DevicePlatformMutation) Field(name string) (ent.Value, bool)
- func (m *DevicePlatformMutation) FieldCleared(name string) bool
- func (m *DevicePlatformMutation) Fields() []string
- func (m *DevicePlatformMutation) ID() (id int, exists bool)
- func (m *DevicePlatformMutation) OldDevicePlatformName(ctx context.Context) (v string, err error)
- func (m *DevicePlatformMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DevicePlatformMutation) Op() Op
- func (m *DevicePlatformMutation) PlatformsCleared() bool
- func (m *DevicePlatformMutation) PlatformsIDs() (ids []int)
- func (m *DevicePlatformMutation) RemovePlatformIDs(ids ...int)
- func (m *DevicePlatformMutation) RemovedEdges() []string
- func (m *DevicePlatformMutation) RemovedIDs(name string) []ent.Value
- func (m *DevicePlatformMutation) RemovedPlatformsIDs() (ids []int)
- func (m *DevicePlatformMutation) ResetDevicePlatformName()
- func (m *DevicePlatformMutation) ResetEdge(name string) error
- func (m *DevicePlatformMutation) ResetField(name string) error
- func (m *DevicePlatformMutation) ResetPlatforms()
- func (m *DevicePlatformMutation) SetDevicePlatformName(s string)
- func (m *DevicePlatformMutation) SetField(name string, value ent.Value) error
- func (m DevicePlatformMutation) Tx() (*Tx, error)
- func (m *DevicePlatformMutation) Type() string
- type DevicePlatformQuery
- func (dpq *DevicePlatformQuery) All(ctx context.Context) ([]*DevicePlatform, error)
- func (dpq *DevicePlatformQuery) AllX(ctx context.Context) []*DevicePlatform
- func (dpq *DevicePlatformQuery) Clone() *DevicePlatformQuery
- func (dpq *DevicePlatformQuery) Count(ctx context.Context) (int, error)
- func (dpq *DevicePlatformQuery) CountX(ctx context.Context) int
- func (dpq *DevicePlatformQuery) Exist(ctx context.Context) (bool, error)
- func (dpq *DevicePlatformQuery) ExistX(ctx context.Context) bool
- func (dpq *DevicePlatformQuery) First(ctx context.Context) (*DevicePlatform, error)
- func (dpq *DevicePlatformQuery) FirstID(ctx context.Context) (id int, err error)
- func (dpq *DevicePlatformQuery) FirstIDX(ctx context.Context) int
- func (dpq *DevicePlatformQuery) FirstX(ctx context.Context) *DevicePlatform
- func (dpq *DevicePlatformQuery) GroupBy(field string, fields ...string) *DevicePlatformGroupBy
- func (dpq *DevicePlatformQuery) IDs(ctx context.Context) ([]int, error)
- func (dpq *DevicePlatformQuery) IDsX(ctx context.Context) []int
- func (dpq *DevicePlatformQuery) Limit(limit int) *DevicePlatformQuery
- func (dpq *DevicePlatformQuery) Offset(offset int) *DevicePlatformQuery
- func (dpq *DevicePlatformQuery) Only(ctx context.Context) (*DevicePlatform, error)
- func (dpq *DevicePlatformQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dpq *DevicePlatformQuery) OnlyIDX(ctx context.Context) int
- func (dpq *DevicePlatformQuery) OnlyX(ctx context.Context) *DevicePlatform
- func (dpq *DevicePlatformQuery) Order(o ...OrderFunc) *DevicePlatformQuery
- func (dpq *DevicePlatformQuery) QueryPlatforms() *DeviceQuery
- func (dpq *DevicePlatformQuery) Select(field string, fields ...string) *DevicePlatformSelect
- func (dpq *DevicePlatformQuery) Unique(unique bool) *DevicePlatformQuery
- func (dpq *DevicePlatformQuery) Where(ps ...predicate.DevicePlatform) *DevicePlatformQuery
- func (dpq *DevicePlatformQuery) WithPlatforms(opts ...func(*DeviceQuery)) *DevicePlatformQuery
- type DevicePlatformSelect
- func (dps *DevicePlatformSelect) Bool(ctx context.Context) (_ bool, err error)
- func (dps *DevicePlatformSelect) BoolX(ctx context.Context) bool
- func (dps *DevicePlatformSelect) Bools(ctx context.Context) ([]bool, error)
- func (dps *DevicePlatformSelect) BoolsX(ctx context.Context) []bool
- func (dps *DevicePlatformSelect) Float64(ctx context.Context) (_ float64, err error)
- func (dps *DevicePlatformSelect) Float64X(ctx context.Context) float64
- func (dps *DevicePlatformSelect) Float64s(ctx context.Context) ([]float64, error)
- func (dps *DevicePlatformSelect) Float64sX(ctx context.Context) []float64
- func (dps *DevicePlatformSelect) Int(ctx context.Context) (_ int, err error)
- func (dps *DevicePlatformSelect) IntX(ctx context.Context) int
- func (dps *DevicePlatformSelect) Ints(ctx context.Context) ([]int, error)
- func (dps *DevicePlatformSelect) IntsX(ctx context.Context) []int
- func (dps *DevicePlatformSelect) Scan(ctx context.Context, v interface{}) error
- func (dps *DevicePlatformSelect) ScanX(ctx context.Context, v interface{})
- func (dps *DevicePlatformSelect) String(ctx context.Context) (_ string, err error)
- func (dps *DevicePlatformSelect) StringX(ctx context.Context) string
- func (dps *DevicePlatformSelect) Strings(ctx context.Context) ([]string, error)
- func (dps *DevicePlatformSelect) StringsX(ctx context.Context) []string
- type DevicePlatformUpdate
- func (dpu *DevicePlatformUpdate) AddPlatformIDs(ids ...int) *DevicePlatformUpdate
- func (dpu *DevicePlatformUpdate) AddPlatforms(d ...*Device) *DevicePlatformUpdate
- func (dpu *DevicePlatformUpdate) ClearPlatforms() *DevicePlatformUpdate
- func (dpu *DevicePlatformUpdate) Exec(ctx context.Context) error
- func (dpu *DevicePlatformUpdate) ExecX(ctx context.Context)
- func (dpu *DevicePlatformUpdate) Mutation() *DevicePlatformMutation
- func (dpu *DevicePlatformUpdate) RemovePlatformIDs(ids ...int) *DevicePlatformUpdate
- func (dpu *DevicePlatformUpdate) RemovePlatforms(d ...*Device) *DevicePlatformUpdate
- func (dpu *DevicePlatformUpdate) Save(ctx context.Context) (int, error)
- func (dpu *DevicePlatformUpdate) SaveX(ctx context.Context) int
- func (dpu *DevicePlatformUpdate) SetDevicePlatformName(s string) *DevicePlatformUpdate
- func (dpu *DevicePlatformUpdate) Where(ps ...predicate.DevicePlatform) *DevicePlatformUpdate
- type DevicePlatformUpdateOne
- func (dpuo *DevicePlatformUpdateOne) AddPlatformIDs(ids ...int) *DevicePlatformUpdateOne
- func (dpuo *DevicePlatformUpdateOne) AddPlatforms(d ...*Device) *DevicePlatformUpdateOne
- func (dpuo *DevicePlatformUpdateOne) ClearPlatforms() *DevicePlatformUpdateOne
- func (dpuo *DevicePlatformUpdateOne) Exec(ctx context.Context) error
- func (dpuo *DevicePlatformUpdateOne) ExecX(ctx context.Context)
- func (dpuo *DevicePlatformUpdateOne) Mutation() *DevicePlatformMutation
- func (dpuo *DevicePlatformUpdateOne) RemovePlatformIDs(ids ...int) *DevicePlatformUpdateOne
- func (dpuo *DevicePlatformUpdateOne) RemovePlatforms(d ...*Device) *DevicePlatformUpdateOne
- func (dpuo *DevicePlatformUpdateOne) Save(ctx context.Context) (*DevicePlatform, error)
- func (dpuo *DevicePlatformUpdateOne) SaveX(ctx context.Context) *DevicePlatform
- func (dpuo *DevicePlatformUpdateOne) Select(field string, fields ...string) *DevicePlatformUpdateOne
- func (dpuo *DevicePlatformUpdateOne) SetDevicePlatformName(s string) *DevicePlatformUpdateOne
- type DevicePlatforms
- type DeviceQuery
- func (dq *DeviceQuery) All(ctx context.Context) ([]*Device, error)
- func (dq *DeviceQuery) AllX(ctx context.Context) []*Device
- func (dq *DeviceQuery) Clone() *DeviceQuery
- func (dq *DeviceQuery) Count(ctx context.Context) (int, error)
- func (dq *DeviceQuery) CountX(ctx context.Context) int
- func (dq *DeviceQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DeviceQuery) ExistX(ctx context.Context) bool
- func (dq *DeviceQuery) First(ctx context.Context) (*Device, error)
- func (dq *DeviceQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DeviceQuery) FirstIDX(ctx context.Context) int
- func (dq *DeviceQuery) FirstX(ctx context.Context) *Device
- func (dq *DeviceQuery) GroupBy(field string, fields ...string) *DeviceGroupBy
- func (dq *DeviceQuery) IDs(ctx context.Context) ([]int, error)
- func (dq *DeviceQuery) IDsX(ctx context.Context) []int
- func (dq *DeviceQuery) Limit(limit int) *DeviceQuery
- func (dq *DeviceQuery) Offset(offset int) *DeviceQuery
- func (dq *DeviceQuery) Only(ctx context.Context) (*Device, error)
- func (dq *DeviceQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DeviceQuery) OnlyIDX(ctx context.Context) int
- func (dq *DeviceQuery) OnlyX(ctx context.Context) *Device
- func (dq *DeviceQuery) Order(o ...OrderFunc) *DeviceQuery
- func (dq *DeviceQuery) QueryDeletedVlans() *DeletedVlanLogQuery
- func (dq *DeviceQuery) QueryHaveIPAddresses() *IPAddressQuery
- func (dq *DeviceQuery) QueryIPStaticRouting() *IPStaticRoutingTableQuery
- func (dq *DeviceQuery) QueryInPlatform() *DevicePlatformQuery
- func (dq *DeviceQuery) QueryInTopology() *NetTopologyDeviceMapQuery
- func (dq *DeviceQuery) QueryInType() *DeviceTypeQuery
- func (dq *DeviceQuery) QueryInterfaces() *NetInterfaceQuery
- func (dq *DeviceQuery) QueryPoInterfaces() *PortChannelInterfaceQuery
- func (dq *DeviceQuery) QueryStoreVlans() *VlanQuery
- func (dq *DeviceQuery) Select(field string, fields ...string) *DeviceSelect
- func (dq *DeviceQuery) Unique(unique bool) *DeviceQuery
- func (dq *DeviceQuery) Where(ps ...predicate.Device) *DeviceQuery
- func (dq *DeviceQuery) WithDeletedVlans(opts ...func(*DeletedVlanLogQuery)) *DeviceQuery
- func (dq *DeviceQuery) WithHaveIPAddresses(opts ...func(*IPAddressQuery)) *DeviceQuery
- func (dq *DeviceQuery) WithIPStaticRouting(opts ...func(*IPStaticRoutingTableQuery)) *DeviceQuery
- func (dq *DeviceQuery) WithInPlatform(opts ...func(*DevicePlatformQuery)) *DeviceQuery
- func (dq *DeviceQuery) WithInTopology(opts ...func(*NetTopologyDeviceMapQuery)) *DeviceQuery
- func (dq *DeviceQuery) WithInType(opts ...func(*DeviceTypeQuery)) *DeviceQuery
- func (dq *DeviceQuery) WithInterfaces(opts ...func(*NetInterfaceQuery)) *DeviceQuery
- func (dq *DeviceQuery) WithPoInterfaces(opts ...func(*PortChannelInterfaceQuery)) *DeviceQuery
- func (dq *DeviceQuery) WithStoreVlans(opts ...func(*VlanQuery)) *DeviceQuery
- type DeviceSelect
- func (ds *DeviceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ds *DeviceSelect) BoolX(ctx context.Context) bool
- func (ds *DeviceSelect) Bools(ctx context.Context) ([]bool, error)
- func (ds *DeviceSelect) BoolsX(ctx context.Context) []bool
- func (ds *DeviceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ds *DeviceSelect) Float64X(ctx context.Context) float64
- func (ds *DeviceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ds *DeviceSelect) Float64sX(ctx context.Context) []float64
- func (ds *DeviceSelect) Int(ctx context.Context) (_ int, err error)
- func (ds *DeviceSelect) IntX(ctx context.Context) int
- func (ds *DeviceSelect) Ints(ctx context.Context) ([]int, error)
- func (ds *DeviceSelect) IntsX(ctx context.Context) []int
- func (ds *DeviceSelect) Scan(ctx context.Context, v interface{}) error
- func (ds *DeviceSelect) ScanX(ctx context.Context, v interface{})
- func (ds *DeviceSelect) String(ctx context.Context) (_ string, err error)
- func (ds *DeviceSelect) StringX(ctx context.Context) string
- func (ds *DeviceSelect) Strings(ctx context.Context) ([]string, error)
- func (ds *DeviceSelect) StringsX(ctx context.Context) []string
- type DeviceType
- type DeviceTypeClient
- func (c *DeviceTypeClient) Create() *DeviceTypeCreate
- func (c *DeviceTypeClient) CreateBulk(builders ...*DeviceTypeCreate) *DeviceTypeCreateBulk
- func (c *DeviceTypeClient) Delete() *DeviceTypeDelete
- func (c *DeviceTypeClient) DeleteOne(dt *DeviceType) *DeviceTypeDeleteOne
- func (c *DeviceTypeClient) DeleteOneID(id int) *DeviceTypeDeleteOne
- func (c *DeviceTypeClient) Get(ctx context.Context, id int) (*DeviceType, error)
- func (c *DeviceTypeClient) GetX(ctx context.Context, id int) *DeviceType
- func (c *DeviceTypeClient) Hooks() []Hook
- func (c *DeviceTypeClient) Query() *DeviceTypeQuery
- func (c *DeviceTypeClient) QueryTypes(dt *DeviceType) *DeviceQuery
- func (c *DeviceTypeClient) Update() *DeviceTypeUpdate
- func (c *DeviceTypeClient) UpdateOne(dt *DeviceType) *DeviceTypeUpdateOne
- func (c *DeviceTypeClient) UpdateOneID(id int) *DeviceTypeUpdateOne
- func (c *DeviceTypeClient) Use(hooks ...Hook)
- type DeviceTypeCreate
- func (dtc *DeviceTypeCreate) AddTypeIDs(ids ...int) *DeviceTypeCreate
- func (dtc *DeviceTypeCreate) AddTypes(d ...*Device) *DeviceTypeCreate
- func (dtc *DeviceTypeCreate) Mutation() *DeviceTypeMutation
- func (dtc *DeviceTypeCreate) Save(ctx context.Context) (*DeviceType, error)
- func (dtc *DeviceTypeCreate) SaveX(ctx context.Context) *DeviceType
- func (dtc *DeviceTypeCreate) SetDeviceTypeName(s string) *DeviceTypeCreate
- type DeviceTypeCreateBulk
- type DeviceTypeDelete
- type DeviceTypeDeleteOne
- type DeviceTypeEdges
- type DeviceTypeGroupBy
- func (dtgb *DeviceTypeGroupBy) Aggregate(fns ...AggregateFunc) *DeviceTypeGroupBy
- func (dtgb *DeviceTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (dtgb *DeviceTypeGroupBy) BoolX(ctx context.Context) bool
- func (dtgb *DeviceTypeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dtgb *DeviceTypeGroupBy) BoolsX(ctx context.Context) []bool
- func (dtgb *DeviceTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (dtgb *DeviceTypeGroupBy) Float64X(ctx context.Context) float64
- func (dtgb *DeviceTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dtgb *DeviceTypeGroupBy) Float64sX(ctx context.Context) []float64
- func (dtgb *DeviceTypeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (dtgb *DeviceTypeGroupBy) IntX(ctx context.Context) int
- func (dtgb *DeviceTypeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dtgb *DeviceTypeGroupBy) IntsX(ctx context.Context) []int
- func (dtgb *DeviceTypeGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dtgb *DeviceTypeGroupBy) ScanX(ctx context.Context, v interface{})
- func (dtgb *DeviceTypeGroupBy) String(ctx context.Context) (_ string, err error)
- func (dtgb *DeviceTypeGroupBy) StringX(ctx context.Context) string
- func (dtgb *DeviceTypeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dtgb *DeviceTypeGroupBy) StringsX(ctx context.Context) []string
- type DeviceTypeMutation
- func (m *DeviceTypeMutation) AddField(name string, value ent.Value) error
- func (m *DeviceTypeMutation) AddTypeIDs(ids ...int)
- func (m *DeviceTypeMutation) AddedEdges() []string
- func (m *DeviceTypeMutation) AddedField(name string) (ent.Value, bool)
- func (m *DeviceTypeMutation) AddedFields() []string
- func (m *DeviceTypeMutation) AddedIDs(name string) []ent.Value
- func (m *DeviceTypeMutation) ClearEdge(name string) error
- func (m *DeviceTypeMutation) ClearField(name string) error
- func (m *DeviceTypeMutation) ClearTypes()
- func (m *DeviceTypeMutation) ClearedEdges() []string
- func (m *DeviceTypeMutation) ClearedFields() []string
- func (m DeviceTypeMutation) Client() *Client
- func (m *DeviceTypeMutation) DeviceTypeName() (r string, exists bool)
- func (m *DeviceTypeMutation) EdgeCleared(name string) bool
- func (m *DeviceTypeMutation) Field(name string) (ent.Value, bool)
- func (m *DeviceTypeMutation) FieldCleared(name string) bool
- func (m *DeviceTypeMutation) Fields() []string
- func (m *DeviceTypeMutation) ID() (id int, exists bool)
- func (m *DeviceTypeMutation) OldDeviceTypeName(ctx context.Context) (v string, err error)
- func (m *DeviceTypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DeviceTypeMutation) Op() Op
- func (m *DeviceTypeMutation) RemoveTypeIDs(ids ...int)
- func (m *DeviceTypeMutation) RemovedEdges() []string
- func (m *DeviceTypeMutation) RemovedIDs(name string) []ent.Value
- func (m *DeviceTypeMutation) RemovedTypesIDs() (ids []int)
- func (m *DeviceTypeMutation) ResetDeviceTypeName()
- func (m *DeviceTypeMutation) ResetEdge(name string) error
- func (m *DeviceTypeMutation) ResetField(name string) error
- func (m *DeviceTypeMutation) ResetTypes()
- func (m *DeviceTypeMutation) SetDeviceTypeName(s string)
- func (m *DeviceTypeMutation) SetField(name string, value ent.Value) error
- func (m DeviceTypeMutation) Tx() (*Tx, error)
- func (m *DeviceTypeMutation) Type() string
- func (m *DeviceTypeMutation) TypesCleared() bool
- func (m *DeviceTypeMutation) TypesIDs() (ids []int)
- type DeviceTypeQuery
- func (dtq *DeviceTypeQuery) All(ctx context.Context) ([]*DeviceType, error)
- func (dtq *DeviceTypeQuery) AllX(ctx context.Context) []*DeviceType
- func (dtq *DeviceTypeQuery) Clone() *DeviceTypeQuery
- func (dtq *DeviceTypeQuery) Count(ctx context.Context) (int, error)
- func (dtq *DeviceTypeQuery) CountX(ctx context.Context) int
- func (dtq *DeviceTypeQuery) Exist(ctx context.Context) (bool, error)
- func (dtq *DeviceTypeQuery) ExistX(ctx context.Context) bool
- func (dtq *DeviceTypeQuery) First(ctx context.Context) (*DeviceType, error)
- func (dtq *DeviceTypeQuery) FirstID(ctx context.Context) (id int, err error)
- func (dtq *DeviceTypeQuery) FirstIDX(ctx context.Context) int
- func (dtq *DeviceTypeQuery) FirstX(ctx context.Context) *DeviceType
- func (dtq *DeviceTypeQuery) GroupBy(field string, fields ...string) *DeviceTypeGroupBy
- func (dtq *DeviceTypeQuery) IDs(ctx context.Context) ([]int, error)
- func (dtq *DeviceTypeQuery) IDsX(ctx context.Context) []int
- func (dtq *DeviceTypeQuery) Limit(limit int) *DeviceTypeQuery
- func (dtq *DeviceTypeQuery) Offset(offset int) *DeviceTypeQuery
- func (dtq *DeviceTypeQuery) Only(ctx context.Context) (*DeviceType, error)
- func (dtq *DeviceTypeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dtq *DeviceTypeQuery) OnlyIDX(ctx context.Context) int
- func (dtq *DeviceTypeQuery) OnlyX(ctx context.Context) *DeviceType
- func (dtq *DeviceTypeQuery) Order(o ...OrderFunc) *DeviceTypeQuery
- func (dtq *DeviceTypeQuery) QueryTypes() *DeviceQuery
- func (dtq *DeviceTypeQuery) Select(field string, fields ...string) *DeviceTypeSelect
- func (dtq *DeviceTypeQuery) Unique(unique bool) *DeviceTypeQuery
- func (dtq *DeviceTypeQuery) Where(ps ...predicate.DeviceType) *DeviceTypeQuery
- func (dtq *DeviceTypeQuery) WithTypes(opts ...func(*DeviceQuery)) *DeviceTypeQuery
- type DeviceTypeSelect
- func (dts *DeviceTypeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (dts *DeviceTypeSelect) BoolX(ctx context.Context) bool
- func (dts *DeviceTypeSelect) Bools(ctx context.Context) ([]bool, error)
- func (dts *DeviceTypeSelect) BoolsX(ctx context.Context) []bool
- func (dts *DeviceTypeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (dts *DeviceTypeSelect) Float64X(ctx context.Context) float64
- func (dts *DeviceTypeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (dts *DeviceTypeSelect) Float64sX(ctx context.Context) []float64
- func (dts *DeviceTypeSelect) Int(ctx context.Context) (_ int, err error)
- func (dts *DeviceTypeSelect) IntX(ctx context.Context) int
- func (dts *DeviceTypeSelect) Ints(ctx context.Context) ([]int, error)
- func (dts *DeviceTypeSelect) IntsX(ctx context.Context) []int
- func (dts *DeviceTypeSelect) Scan(ctx context.Context, v interface{}) error
- func (dts *DeviceTypeSelect) ScanX(ctx context.Context, v interface{})
- func (dts *DeviceTypeSelect) String(ctx context.Context) (_ string, err error)
- func (dts *DeviceTypeSelect) StringX(ctx context.Context) string
- func (dts *DeviceTypeSelect) Strings(ctx context.Context) ([]string, error)
- func (dts *DeviceTypeSelect) StringsX(ctx context.Context) []string
- type DeviceTypeUpdate
- func (dtu *DeviceTypeUpdate) AddTypeIDs(ids ...int) *DeviceTypeUpdate
- func (dtu *DeviceTypeUpdate) AddTypes(d ...*Device) *DeviceTypeUpdate
- func (dtu *DeviceTypeUpdate) ClearTypes() *DeviceTypeUpdate
- func (dtu *DeviceTypeUpdate) Exec(ctx context.Context) error
- func (dtu *DeviceTypeUpdate) ExecX(ctx context.Context)
- func (dtu *DeviceTypeUpdate) Mutation() *DeviceTypeMutation
- func (dtu *DeviceTypeUpdate) RemoveTypeIDs(ids ...int) *DeviceTypeUpdate
- func (dtu *DeviceTypeUpdate) RemoveTypes(d ...*Device) *DeviceTypeUpdate
- func (dtu *DeviceTypeUpdate) Save(ctx context.Context) (int, error)
- func (dtu *DeviceTypeUpdate) SaveX(ctx context.Context) int
- func (dtu *DeviceTypeUpdate) SetDeviceTypeName(s string) *DeviceTypeUpdate
- func (dtu *DeviceTypeUpdate) Where(ps ...predicate.DeviceType) *DeviceTypeUpdate
- type DeviceTypeUpdateOne
- func (dtuo *DeviceTypeUpdateOne) AddTypeIDs(ids ...int) *DeviceTypeUpdateOne
- func (dtuo *DeviceTypeUpdateOne) AddTypes(d ...*Device) *DeviceTypeUpdateOne
- func (dtuo *DeviceTypeUpdateOne) ClearTypes() *DeviceTypeUpdateOne
- func (dtuo *DeviceTypeUpdateOne) Exec(ctx context.Context) error
- func (dtuo *DeviceTypeUpdateOne) ExecX(ctx context.Context)
- func (dtuo *DeviceTypeUpdateOne) Mutation() *DeviceTypeMutation
- func (dtuo *DeviceTypeUpdateOne) RemoveTypeIDs(ids ...int) *DeviceTypeUpdateOne
- func (dtuo *DeviceTypeUpdateOne) RemoveTypes(d ...*Device) *DeviceTypeUpdateOne
- func (dtuo *DeviceTypeUpdateOne) Save(ctx context.Context) (*DeviceType, error)
- func (dtuo *DeviceTypeUpdateOne) SaveX(ctx context.Context) *DeviceType
- func (dtuo *DeviceTypeUpdateOne) Select(field string, fields ...string) *DeviceTypeUpdateOne
- func (dtuo *DeviceTypeUpdateOne) SetDeviceTypeName(s string) *DeviceTypeUpdateOne
- type DeviceTypes
- type DeviceUpdate
- func (du *DeviceUpdate) AddDeletedVlanIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) AddDeletedVlans(d ...*DeletedVlanLog) *DeviceUpdate
- func (du *DeviceUpdate) AddDeviceSSHPort(i int) *DeviceUpdate
- func (du *DeviceUpdate) AddHaveIPAddressIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) AddHaveIPAddresses(i ...*IPAddress) *DeviceUpdate
- func (du *DeviceUpdate) AddIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceUpdate
- func (du *DeviceUpdate) AddIPStaticRoutingIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) AddInTopology(n ...*NetTopologyDeviceMap) *DeviceUpdate
- func (du *DeviceUpdate) AddInTopologyIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) AddInterfaceIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) AddInterfaces(n ...*NetInterface) *DeviceUpdate
- func (du *DeviceUpdate) AddPoInterfaceIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) AddPoInterfaces(p ...*PortChannelInterface) *DeviceUpdate
- func (du *DeviceUpdate) AddStoreVlanIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) AddStoreVlans(v ...*Vlan) *DeviceUpdate
- func (du *DeviceUpdate) ClearDeletedVlans() *DeviceUpdate
- func (du *DeviceUpdate) ClearDevicePassword() *DeviceUpdate
- func (du *DeviceUpdate) ClearDeviceSecret() *DeviceUpdate
- func (du *DeviceUpdate) ClearDeviceUsername() *DeviceUpdate
- func (du *DeviceUpdate) ClearHaveIPAddresses() *DeviceUpdate
- func (du *DeviceUpdate) ClearIPStaticRouting() *DeviceUpdate
- func (du *DeviceUpdate) ClearInPlatform() *DeviceUpdate
- func (du *DeviceUpdate) ClearInTopology() *DeviceUpdate
- func (du *DeviceUpdate) ClearInType() *DeviceUpdate
- func (du *DeviceUpdate) ClearInterfaces() *DeviceUpdate
- func (du *DeviceUpdate) ClearPoInterfaces() *DeviceUpdate
- func (du *DeviceUpdate) ClearStoreVlans() *DeviceUpdate
- func (du *DeviceUpdate) Exec(ctx context.Context) error
- func (du *DeviceUpdate) ExecX(ctx context.Context)
- func (du *DeviceUpdate) Mutation() *DeviceMutation
- func (du *DeviceUpdate) RemoveDeletedVlanIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) RemoveDeletedVlans(d ...*DeletedVlanLog) *DeviceUpdate
- func (du *DeviceUpdate) RemoveHaveIPAddressIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) RemoveHaveIPAddresses(i ...*IPAddress) *DeviceUpdate
- func (du *DeviceUpdate) RemoveIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceUpdate
- func (du *DeviceUpdate) RemoveIPStaticRoutingIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) RemoveInTopology(n ...*NetTopologyDeviceMap) *DeviceUpdate
- func (du *DeviceUpdate) RemoveInTopologyIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) RemoveInterfaceIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) RemoveInterfaces(n ...*NetInterface) *DeviceUpdate
- func (du *DeviceUpdate) RemovePoInterfaceIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) RemovePoInterfaces(p ...*PortChannelInterface) *DeviceUpdate
- func (du *DeviceUpdate) RemoveStoreVlanIDs(ids ...int) *DeviceUpdate
- func (du *DeviceUpdate) RemoveStoreVlans(v ...*Vlan) *DeviceUpdate
- func (du *DeviceUpdate) Save(ctx context.Context) (int, error)
- func (du *DeviceUpdate) SaveX(ctx context.Context) int
- func (du *DeviceUpdate) SetDeviceCommitConfig(b bool) *DeviceUpdate
- func (du *DeviceUpdate) SetDeviceHostname(s string) *DeviceUpdate
- func (du *DeviceUpdate) SetDeviceName(s string) *DeviceUpdate
- func (du *DeviceUpdate) SetDevicePassword(s string) *DeviceUpdate
- func (du *DeviceUpdate) SetDeviceSSHPort(i int) *DeviceUpdate
- func (du *DeviceUpdate) SetDeviceSecret(s string) *DeviceUpdate
- func (du *DeviceUpdate) SetDeviceUsername(s string) *DeviceUpdate
- func (du *DeviceUpdate) SetInPlatform(d *DevicePlatform) *DeviceUpdate
- func (du *DeviceUpdate) SetInPlatformID(id int) *DeviceUpdate
- func (du *DeviceUpdate) SetInType(d *DeviceType) *DeviceUpdate
- func (du *DeviceUpdate) SetInTypeID(id int) *DeviceUpdate
- func (du *DeviceUpdate) SetNillableDeviceCommitConfig(b *bool) *DeviceUpdate
- func (du *DeviceUpdate) SetNillableDevicePassword(s *string) *DeviceUpdate
- func (du *DeviceUpdate) SetNillableDeviceSSHPort(i *int) *DeviceUpdate
- func (du *DeviceUpdate) SetNillableDeviceSecret(s *string) *DeviceUpdate
- func (du *DeviceUpdate) SetNillableDeviceUsername(s *string) *DeviceUpdate
- func (du *DeviceUpdate) SetNillableInPlatformID(id *int) *DeviceUpdate
- func (du *DeviceUpdate) SetNillableInTypeID(id *int) *DeviceUpdate
- func (du *DeviceUpdate) Where(ps ...predicate.Device) *DeviceUpdate
- type DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddDeletedVlanIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddDeletedVlans(d ...*DeletedVlanLog) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddDeviceSSHPort(i int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddHaveIPAddressIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddHaveIPAddresses(i ...*IPAddress) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddIPStaticRoutingIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddInTopology(n ...*NetTopologyDeviceMap) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddInTopologyIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddInterfaceIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddInterfaces(n ...*NetInterface) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddPoInterfaceIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddPoInterfaces(p ...*PortChannelInterface) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddStoreVlanIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) AddStoreVlans(v ...*Vlan) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearDeletedVlans() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearDevicePassword() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearDeviceSecret() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearDeviceUsername() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearHaveIPAddresses() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearIPStaticRouting() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearInPlatform() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearInTopology() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearInType() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearInterfaces() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearPoInterfaces() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearStoreVlans() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) Exec(ctx context.Context) error
- func (duo *DeviceUpdateOne) ExecX(ctx context.Context)
- func (duo *DeviceUpdateOne) Mutation() *DeviceMutation
- func (duo *DeviceUpdateOne) RemoveDeletedVlanIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveDeletedVlans(d ...*DeletedVlanLog) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveHaveIPAddressIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveHaveIPAddresses(i ...*IPAddress) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveIPStaticRoutingIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveInTopology(n ...*NetTopologyDeviceMap) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveInTopologyIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveInterfaceIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveInterfaces(n ...*NetInterface) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemovePoInterfaceIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemovePoInterfaces(p ...*PortChannelInterface) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveStoreVlanIDs(ids ...int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) RemoveStoreVlans(v ...*Vlan) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) Save(ctx context.Context) (*Device, error)
- func (duo *DeviceUpdateOne) SaveX(ctx context.Context) *Device
- func (duo *DeviceUpdateOne) Select(field string, fields ...string) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetDeviceCommitConfig(b bool) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetDeviceHostname(s string) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetDeviceName(s string) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetDevicePassword(s string) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetDeviceSSHPort(i int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetDeviceSecret(s string) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetDeviceUsername(s string) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetInPlatform(d *DevicePlatform) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetInPlatformID(id int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetInType(d *DeviceType) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetInTypeID(id int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetNillableDeviceCommitConfig(b *bool) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetNillableDevicePassword(s *string) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetNillableDeviceSSHPort(i *int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetNillableDeviceSecret(s *string) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetNillableDeviceUsername(s *string) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetNillableInPlatformID(id *int) *DeviceUpdateOne
- func (duo *DeviceUpdateOne) SetNillableInTypeID(id *int) *DeviceUpdateOne
- type Devices
- type Hook
- type IPAddress
- func (ia *IPAddress) QueryInterfaces() *NetInterfaceQuery
- func (ia *IPAddress) QueryOnDevice() *DeviceQuery
- func (ia *IPAddress) QueryPoInterfaces() *PortChannelInterfaceQuery
- func (ia *IPAddress) String() string
- func (ia *IPAddress) Unwrap() *IPAddress
- func (ia *IPAddress) Update() *IPAddressUpdateOne
- 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 int) *IPAddressDeleteOne
- func (c *IPAddressClient) Get(ctx context.Context, id int) (*IPAddress, error)
- func (c *IPAddressClient) GetX(ctx context.Context, id int) *IPAddress
- func (c *IPAddressClient) Hooks() []Hook
- func (c *IPAddressClient) Query() *IPAddressQuery
- func (c *IPAddressClient) QueryInterfaces(ia *IPAddress) *NetInterfaceQuery
- func (c *IPAddressClient) QueryOnDevice(ia *IPAddress) *DeviceQuery
- func (c *IPAddressClient) QueryPoInterfaces(ia *IPAddress) *PortChannelInterfaceQuery
- func (c *IPAddressClient) Update() *IPAddressUpdate
- func (c *IPAddressClient) UpdateOne(ia *IPAddress) *IPAddressUpdateOne
- func (c *IPAddressClient) UpdateOneID(id int) *IPAddressUpdateOne
- func (c *IPAddressClient) Use(hooks ...Hook)
- type IPAddressCreate
- func (iac *IPAddressCreate) AddInterfaceIDs(ids ...int) *IPAddressCreate
- func (iac *IPAddressCreate) AddInterfaces(n ...*NetInterface) *IPAddressCreate
- func (iac *IPAddressCreate) AddPoInterfaceIDs(ids ...int) *IPAddressCreate
- func (iac *IPAddressCreate) AddPoInterfaces(p ...*PortChannelInterface) *IPAddressCreate
- 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) SetIPAddress(s string) *IPAddressCreate
- func (iac *IPAddressCreate) SetNillableOnDeviceID(id *int) *IPAddressCreate
- func (iac *IPAddressCreate) SetOnDevice(d *Device) *IPAddressCreate
- func (iac *IPAddressCreate) SetOnDeviceID(id int) *IPAddressCreate
- func (iac *IPAddressCreate) SetSubnetMask(s string) *IPAddressCreate
- type IPAddressCreateBulk
- type IPAddressDelete
- type IPAddressDeleteOne
- type IPAddressEdges
- type IPAddressGroupBy
- func (iagb *IPAddressGroupBy) Aggregate(fns ...AggregateFunc) *IPAddressGroupBy
- func (iagb *IPAddressGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (iagb *IPAddressGroupBy) BoolX(ctx context.Context) bool
- func (iagb *IPAddressGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (iagb *IPAddressGroupBy) BoolsX(ctx context.Context) []bool
- func (iagb *IPAddressGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (iagb *IPAddressGroupBy) Float64X(ctx context.Context) float64
- func (iagb *IPAddressGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (iagb *IPAddressGroupBy) Float64sX(ctx context.Context) []float64
- func (iagb *IPAddressGroupBy) Int(ctx context.Context) (_ int, err error)
- func (iagb *IPAddressGroupBy) IntX(ctx context.Context) int
- func (iagb *IPAddressGroupBy) Ints(ctx context.Context) ([]int, error)
- func (iagb *IPAddressGroupBy) IntsX(ctx context.Context) []int
- func (iagb *IPAddressGroupBy) Scan(ctx context.Context, v interface{}) error
- func (iagb *IPAddressGroupBy) ScanX(ctx context.Context, v interface{})
- func (iagb *IPAddressGroupBy) String(ctx context.Context) (_ string, err error)
- func (iagb *IPAddressGroupBy) StringX(ctx context.Context) string
- func (iagb *IPAddressGroupBy) Strings(ctx context.Context) ([]string, error)
- func (iagb *IPAddressGroupBy) StringsX(ctx context.Context) []string
- type IPAddressMutation
- func (m *IPAddressMutation) AddField(name string, value ent.Value) error
- func (m *IPAddressMutation) AddInterfaceIDs(ids ...int)
- func (m *IPAddressMutation) AddPoInterfaceIDs(ids ...int)
- 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) ClearEdge(name string) error
- func (m *IPAddressMutation) ClearField(name string) error
- func (m *IPAddressMutation) ClearInterfaces()
- func (m *IPAddressMutation) ClearOnDevice()
- func (m *IPAddressMutation) ClearPoInterfaces()
- func (m *IPAddressMutation) ClearedEdges() []string
- func (m *IPAddressMutation) ClearedFields() []string
- func (m IPAddressMutation) Client() *Client
- 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 int, exists bool)
- func (m *IPAddressMutation) IPAddress() (r string, exists bool)
- func (m *IPAddressMutation) InterfacesCleared() bool
- func (m *IPAddressMutation) InterfacesIDs() (ids []int)
- func (m *IPAddressMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IPAddressMutation) OldIPAddress(ctx context.Context) (v string, err error)
- func (m *IPAddressMutation) OldSubnetMask(ctx context.Context) (v string, err error)
- func (m *IPAddressMutation) OnDeviceCleared() bool
- func (m *IPAddressMutation) OnDeviceID() (id int, exists bool)
- func (m *IPAddressMutation) OnDeviceIDs() (ids []int)
- func (m *IPAddressMutation) Op() Op
- func (m *IPAddressMutation) PoInterfacesCleared() bool
- func (m *IPAddressMutation) PoInterfacesIDs() (ids []int)
- func (m *IPAddressMutation) RemoveInterfaceIDs(ids ...int)
- func (m *IPAddressMutation) RemovePoInterfaceIDs(ids ...int)
- func (m *IPAddressMutation) RemovedEdges() []string
- func (m *IPAddressMutation) RemovedIDs(name string) []ent.Value
- func (m *IPAddressMutation) RemovedInterfacesIDs() (ids []int)
- func (m *IPAddressMutation) RemovedPoInterfacesIDs() (ids []int)
- func (m *IPAddressMutation) ResetEdge(name string) error
- func (m *IPAddressMutation) ResetField(name string) error
- func (m *IPAddressMutation) ResetIPAddress()
- func (m *IPAddressMutation) ResetInterfaces()
- func (m *IPAddressMutation) ResetOnDevice()
- func (m *IPAddressMutation) ResetPoInterfaces()
- func (m *IPAddressMutation) ResetSubnetMask()
- func (m *IPAddressMutation) SetField(name string, value ent.Value) error
- func (m *IPAddressMutation) SetIPAddress(s string)
- func (m *IPAddressMutation) SetOnDeviceID(id int)
- func (m *IPAddressMutation) SetSubnetMask(s string)
- func (m *IPAddressMutation) SubnetMask() (r string, exists bool)
- func (m IPAddressMutation) Tx() (*Tx, error)
- func (m *IPAddressMutation) Type() string
- type IPAddressQuery
- func (iaq *IPAddressQuery) All(ctx context.Context) ([]*IPAddress, error)
- func (iaq *IPAddressQuery) AllX(ctx context.Context) []*IPAddress
- func (iaq *IPAddressQuery) Clone() *IPAddressQuery
- 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 int, err error)
- func (iaq *IPAddressQuery) FirstIDX(ctx context.Context) int
- func (iaq *IPAddressQuery) FirstX(ctx context.Context) *IPAddress
- func (iaq *IPAddressQuery) GroupBy(field string, fields ...string) *IPAddressGroupBy
- func (iaq *IPAddressQuery) IDs(ctx context.Context) ([]int, error)
- func (iaq *IPAddressQuery) IDsX(ctx context.Context) []int
- 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 int, err error)
- func (iaq *IPAddressQuery) OnlyIDX(ctx context.Context) int
- func (iaq *IPAddressQuery) OnlyX(ctx context.Context) *IPAddress
- func (iaq *IPAddressQuery) Order(o ...OrderFunc) *IPAddressQuery
- func (iaq *IPAddressQuery) QueryInterfaces() *NetInterfaceQuery
- func (iaq *IPAddressQuery) QueryOnDevice() *DeviceQuery
- func (iaq *IPAddressQuery) QueryPoInterfaces() *PortChannelInterfaceQuery
- func (iaq *IPAddressQuery) Select(field string, fields ...string) *IPAddressSelect
- func (iaq *IPAddressQuery) Unique(unique bool) *IPAddressQuery
- func (iaq *IPAddressQuery) Where(ps ...predicate.IPAddress) *IPAddressQuery
- func (iaq *IPAddressQuery) WithInterfaces(opts ...func(*NetInterfaceQuery)) *IPAddressQuery
- func (iaq *IPAddressQuery) WithOnDevice(opts ...func(*DeviceQuery)) *IPAddressQuery
- func (iaq *IPAddressQuery) WithPoInterfaces(opts ...func(*PortChannelInterfaceQuery)) *IPAddressQuery
- type IPAddressSelect
- func (ias *IPAddressSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ias *IPAddressSelect) BoolX(ctx context.Context) bool
- func (ias *IPAddressSelect) Bools(ctx context.Context) ([]bool, error)
- func (ias *IPAddressSelect) BoolsX(ctx context.Context) []bool
- func (ias *IPAddressSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ias *IPAddressSelect) Float64X(ctx context.Context) float64
- func (ias *IPAddressSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ias *IPAddressSelect) Float64sX(ctx context.Context) []float64
- func (ias *IPAddressSelect) Int(ctx context.Context) (_ int, err error)
- func (ias *IPAddressSelect) IntX(ctx context.Context) int
- func (ias *IPAddressSelect) Ints(ctx context.Context) ([]int, error)
- func (ias *IPAddressSelect) IntsX(ctx context.Context) []int
- func (ias *IPAddressSelect) Scan(ctx context.Context, v interface{}) error
- func (ias *IPAddressSelect) ScanX(ctx context.Context, v interface{})
- func (ias *IPAddressSelect) String(ctx context.Context) (_ string, err error)
- func (ias *IPAddressSelect) StringX(ctx context.Context) string
- func (ias *IPAddressSelect) Strings(ctx context.Context) ([]string, error)
- func (ias *IPAddressSelect) StringsX(ctx context.Context) []string
- type IPAddressUpdate
- func (iau *IPAddressUpdate) AddInterfaceIDs(ids ...int) *IPAddressUpdate
- func (iau *IPAddressUpdate) AddInterfaces(n ...*NetInterface) *IPAddressUpdate
- func (iau *IPAddressUpdate) AddPoInterfaceIDs(ids ...int) *IPAddressUpdate
- func (iau *IPAddressUpdate) AddPoInterfaces(p ...*PortChannelInterface) *IPAddressUpdate
- func (iau *IPAddressUpdate) ClearInterfaces() *IPAddressUpdate
- func (iau *IPAddressUpdate) ClearOnDevice() *IPAddressUpdate
- func (iau *IPAddressUpdate) ClearPoInterfaces() *IPAddressUpdate
- func (iau *IPAddressUpdate) Exec(ctx context.Context) error
- func (iau *IPAddressUpdate) ExecX(ctx context.Context)
- func (iau *IPAddressUpdate) Mutation() *IPAddressMutation
- func (iau *IPAddressUpdate) RemoveInterfaceIDs(ids ...int) *IPAddressUpdate
- func (iau *IPAddressUpdate) RemoveInterfaces(n ...*NetInterface) *IPAddressUpdate
- func (iau *IPAddressUpdate) RemovePoInterfaceIDs(ids ...int) *IPAddressUpdate
- func (iau *IPAddressUpdate) RemovePoInterfaces(p ...*PortChannelInterface) *IPAddressUpdate
- func (iau *IPAddressUpdate) Save(ctx context.Context) (int, error)
- func (iau *IPAddressUpdate) SaveX(ctx context.Context) int
- func (iau *IPAddressUpdate) SetIPAddress(s string) *IPAddressUpdate
- func (iau *IPAddressUpdate) SetNillableOnDeviceID(id *int) *IPAddressUpdate
- func (iau *IPAddressUpdate) SetOnDevice(d *Device) *IPAddressUpdate
- func (iau *IPAddressUpdate) SetOnDeviceID(id int) *IPAddressUpdate
- func (iau *IPAddressUpdate) SetSubnetMask(s string) *IPAddressUpdate
- func (iau *IPAddressUpdate) Where(ps ...predicate.IPAddress) *IPAddressUpdate
- type IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) AddInterfaceIDs(ids ...int) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) AddInterfaces(n ...*NetInterface) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) AddPoInterfaceIDs(ids ...int) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) AddPoInterfaces(p ...*PortChannelInterface) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) ClearInterfaces() *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) ClearOnDevice() *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) ClearPoInterfaces() *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) Exec(ctx context.Context) error
- func (iauo *IPAddressUpdateOne) ExecX(ctx context.Context)
- func (iauo *IPAddressUpdateOne) Mutation() *IPAddressMutation
- func (iauo *IPAddressUpdateOne) RemoveInterfaceIDs(ids ...int) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) RemoveInterfaces(n ...*NetInterface) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) RemovePoInterfaceIDs(ids ...int) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) RemovePoInterfaces(p ...*PortChannelInterface) *IPAddressUpdateOne
- 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) SetIPAddress(s string) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) SetNillableOnDeviceID(id *int) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) SetOnDevice(d *Device) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) SetOnDeviceID(id int) *IPAddressUpdateOne
- func (iauo *IPAddressUpdateOne) SetSubnetMask(s string) *IPAddressUpdateOne
- type IPAddresses
- type IPStaticRoutingTable
- func (isrt *IPStaticRoutingTable) QueryOnDevice() *DeviceQuery
- func (isrt *IPStaticRoutingTable) QueryOnInterface() *NetInterfaceQuery
- func (isrt *IPStaticRoutingTable) String() string
- func (isrt *IPStaticRoutingTable) Unwrap() *IPStaticRoutingTable
- func (isrt *IPStaticRoutingTable) Update() *IPStaticRoutingTableUpdateOne
- type IPStaticRoutingTableClient
- func (c *IPStaticRoutingTableClient) Create() *IPStaticRoutingTableCreate
- func (c *IPStaticRoutingTableClient) CreateBulk(builders ...*IPStaticRoutingTableCreate) *IPStaticRoutingTableCreateBulk
- func (c *IPStaticRoutingTableClient) Delete() *IPStaticRoutingTableDelete
- func (c *IPStaticRoutingTableClient) DeleteOne(isrt *IPStaticRoutingTable) *IPStaticRoutingTableDeleteOne
- func (c *IPStaticRoutingTableClient) DeleteOneID(id int) *IPStaticRoutingTableDeleteOne
- func (c *IPStaticRoutingTableClient) Get(ctx context.Context, id int) (*IPStaticRoutingTable, error)
- func (c *IPStaticRoutingTableClient) GetX(ctx context.Context, id int) *IPStaticRoutingTable
- func (c *IPStaticRoutingTableClient) Hooks() []Hook
- func (c *IPStaticRoutingTableClient) Query() *IPStaticRoutingTableQuery
- func (c *IPStaticRoutingTableClient) QueryOnDevice(isrt *IPStaticRoutingTable) *DeviceQuery
- func (c *IPStaticRoutingTableClient) QueryOnInterface(isrt *IPStaticRoutingTable) *NetInterfaceQuery
- func (c *IPStaticRoutingTableClient) Update() *IPStaticRoutingTableUpdate
- func (c *IPStaticRoutingTableClient) UpdateOne(isrt *IPStaticRoutingTable) *IPStaticRoutingTableUpdateOne
- func (c *IPStaticRoutingTableClient) UpdateOneID(id int) *IPStaticRoutingTableUpdateOne
- func (c *IPStaticRoutingTableClient) Use(hooks ...Hook)
- type IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) Mutation() *IPStaticRoutingTableMutation
- func (isrtc *IPStaticRoutingTableCreate) Save(ctx context.Context) (*IPStaticRoutingTable, error)
- func (isrtc *IPStaticRoutingTableCreate) SaveX(ctx context.Context) *IPStaticRoutingTable
- func (isrtc *IPStaticRoutingTableCreate) SetBrdInterface(b bool) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetNetworkAddress(s string) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetNextHop(s string) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetNillableBrdInterface(b *bool) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetNillableOnDeviceID(id *int) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetNillableOnInterfaceID(id *int) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetOnDevice(d *Device) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetOnDeviceID(id int) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetOnInterface(n *NetInterface) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetOnInterfaceID(id int) *IPStaticRoutingTableCreate
- func (isrtc *IPStaticRoutingTableCreate) SetSubnetMask(s string) *IPStaticRoutingTableCreate
- type IPStaticRoutingTableCreateBulk
- type IPStaticRoutingTableDelete
- type IPStaticRoutingTableDeleteOne
- type IPStaticRoutingTableEdges
- type IPStaticRoutingTableGroupBy
- func (isrtgb *IPStaticRoutingTableGroupBy) Aggregate(fns ...AggregateFunc) *IPStaticRoutingTableGroupBy
- func (isrtgb *IPStaticRoutingTableGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (isrtgb *IPStaticRoutingTableGroupBy) BoolX(ctx context.Context) bool
- func (isrtgb *IPStaticRoutingTableGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (isrtgb *IPStaticRoutingTableGroupBy) BoolsX(ctx context.Context) []bool
- func (isrtgb *IPStaticRoutingTableGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (isrtgb *IPStaticRoutingTableGroupBy) Float64X(ctx context.Context) float64
- func (isrtgb *IPStaticRoutingTableGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (isrtgb *IPStaticRoutingTableGroupBy) Float64sX(ctx context.Context) []float64
- func (isrtgb *IPStaticRoutingTableGroupBy) Int(ctx context.Context) (_ int, err error)
- func (isrtgb *IPStaticRoutingTableGroupBy) IntX(ctx context.Context) int
- func (isrtgb *IPStaticRoutingTableGroupBy) Ints(ctx context.Context) ([]int, error)
- func (isrtgb *IPStaticRoutingTableGroupBy) IntsX(ctx context.Context) []int
- func (isrtgb *IPStaticRoutingTableGroupBy) Scan(ctx context.Context, v interface{}) error
- func (isrtgb *IPStaticRoutingTableGroupBy) ScanX(ctx context.Context, v interface{})
- func (isrtgb *IPStaticRoutingTableGroupBy) String(ctx context.Context) (_ string, err error)
- func (isrtgb *IPStaticRoutingTableGroupBy) StringX(ctx context.Context) string
- func (isrtgb *IPStaticRoutingTableGroupBy) Strings(ctx context.Context) ([]string, error)
- func (isrtgb *IPStaticRoutingTableGroupBy) StringsX(ctx context.Context) []string
- type IPStaticRoutingTableMutation
- func (m *IPStaticRoutingTableMutation) AddField(name string, value ent.Value) error
- func (m *IPStaticRoutingTableMutation) AddedEdges() []string
- func (m *IPStaticRoutingTableMutation) AddedField(name string) (ent.Value, bool)
- func (m *IPStaticRoutingTableMutation) AddedFields() []string
- func (m *IPStaticRoutingTableMutation) AddedIDs(name string) []ent.Value
- func (m *IPStaticRoutingTableMutation) BrdInterface() (r bool, exists bool)
- func (m *IPStaticRoutingTableMutation) ClearEdge(name string) error
- func (m *IPStaticRoutingTableMutation) ClearField(name string) error
- func (m *IPStaticRoutingTableMutation) ClearOnDevice()
- func (m *IPStaticRoutingTableMutation) ClearOnInterface()
- func (m *IPStaticRoutingTableMutation) ClearedEdges() []string
- func (m *IPStaticRoutingTableMutation) ClearedFields() []string
- func (m IPStaticRoutingTableMutation) Client() *Client
- func (m *IPStaticRoutingTableMutation) EdgeCleared(name string) bool
- func (m *IPStaticRoutingTableMutation) Field(name string) (ent.Value, bool)
- func (m *IPStaticRoutingTableMutation) FieldCleared(name string) bool
- func (m *IPStaticRoutingTableMutation) Fields() []string
- func (m *IPStaticRoutingTableMutation) ID() (id int, exists bool)
- func (m *IPStaticRoutingTableMutation) NetworkAddress() (r string, exists bool)
- func (m *IPStaticRoutingTableMutation) NextHop() (r string, exists bool)
- func (m *IPStaticRoutingTableMutation) OldBrdInterface(ctx context.Context) (v bool, err error)
- func (m *IPStaticRoutingTableMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IPStaticRoutingTableMutation) OldNetworkAddress(ctx context.Context) (v string, err error)
- func (m *IPStaticRoutingTableMutation) OldNextHop(ctx context.Context) (v string, err error)
- func (m *IPStaticRoutingTableMutation) OldSubnetMask(ctx context.Context) (v string, err error)
- func (m *IPStaticRoutingTableMutation) OnDeviceCleared() bool
- func (m *IPStaticRoutingTableMutation) OnDeviceID() (id int, exists bool)
- func (m *IPStaticRoutingTableMutation) OnDeviceIDs() (ids []int)
- func (m *IPStaticRoutingTableMutation) OnInterfaceCleared() bool
- func (m *IPStaticRoutingTableMutation) OnInterfaceID() (id int, exists bool)
- func (m *IPStaticRoutingTableMutation) OnInterfaceIDs() (ids []int)
- func (m *IPStaticRoutingTableMutation) Op() Op
- func (m *IPStaticRoutingTableMutation) RemovedEdges() []string
- func (m *IPStaticRoutingTableMutation) RemovedIDs(name string) []ent.Value
- func (m *IPStaticRoutingTableMutation) ResetBrdInterface()
- func (m *IPStaticRoutingTableMutation) ResetEdge(name string) error
- func (m *IPStaticRoutingTableMutation) ResetField(name string) error
- func (m *IPStaticRoutingTableMutation) ResetNetworkAddress()
- func (m *IPStaticRoutingTableMutation) ResetNextHop()
- func (m *IPStaticRoutingTableMutation) ResetOnDevice()
- func (m *IPStaticRoutingTableMutation) ResetOnInterface()
- func (m *IPStaticRoutingTableMutation) ResetSubnetMask()
- func (m *IPStaticRoutingTableMutation) SetBrdInterface(b bool)
- func (m *IPStaticRoutingTableMutation) SetField(name string, value ent.Value) error
- func (m *IPStaticRoutingTableMutation) SetNetworkAddress(s string)
- func (m *IPStaticRoutingTableMutation) SetNextHop(s string)
- func (m *IPStaticRoutingTableMutation) SetOnDeviceID(id int)
- func (m *IPStaticRoutingTableMutation) SetOnInterfaceID(id int)
- func (m *IPStaticRoutingTableMutation) SetSubnetMask(s string)
- func (m *IPStaticRoutingTableMutation) SubnetMask() (r string, exists bool)
- func (m IPStaticRoutingTableMutation) Tx() (*Tx, error)
- func (m *IPStaticRoutingTableMutation) Type() string
- type IPStaticRoutingTableQuery
- func (isrtq *IPStaticRoutingTableQuery) All(ctx context.Context) ([]*IPStaticRoutingTable, error)
- func (isrtq *IPStaticRoutingTableQuery) AllX(ctx context.Context) []*IPStaticRoutingTable
- func (isrtq *IPStaticRoutingTableQuery) Clone() *IPStaticRoutingTableQuery
- func (isrtq *IPStaticRoutingTableQuery) Count(ctx context.Context) (int, error)
- func (isrtq *IPStaticRoutingTableQuery) CountX(ctx context.Context) int
- func (isrtq *IPStaticRoutingTableQuery) Exist(ctx context.Context) (bool, error)
- func (isrtq *IPStaticRoutingTableQuery) ExistX(ctx context.Context) bool
- func (isrtq *IPStaticRoutingTableQuery) First(ctx context.Context) (*IPStaticRoutingTable, error)
- func (isrtq *IPStaticRoutingTableQuery) FirstID(ctx context.Context) (id int, err error)
- func (isrtq *IPStaticRoutingTableQuery) FirstIDX(ctx context.Context) int
- func (isrtq *IPStaticRoutingTableQuery) FirstX(ctx context.Context) *IPStaticRoutingTable
- func (isrtq *IPStaticRoutingTableQuery) GroupBy(field string, fields ...string) *IPStaticRoutingTableGroupBy
- func (isrtq *IPStaticRoutingTableQuery) IDs(ctx context.Context) ([]int, error)
- func (isrtq *IPStaticRoutingTableQuery) IDsX(ctx context.Context) []int
- func (isrtq *IPStaticRoutingTableQuery) Limit(limit int) *IPStaticRoutingTableQuery
- func (isrtq *IPStaticRoutingTableQuery) Offset(offset int) *IPStaticRoutingTableQuery
- func (isrtq *IPStaticRoutingTableQuery) Only(ctx context.Context) (*IPStaticRoutingTable, error)
- func (isrtq *IPStaticRoutingTableQuery) OnlyID(ctx context.Context) (id int, err error)
- func (isrtq *IPStaticRoutingTableQuery) OnlyIDX(ctx context.Context) int
- func (isrtq *IPStaticRoutingTableQuery) OnlyX(ctx context.Context) *IPStaticRoutingTable
- func (isrtq *IPStaticRoutingTableQuery) Order(o ...OrderFunc) *IPStaticRoutingTableQuery
- func (isrtq *IPStaticRoutingTableQuery) QueryOnDevice() *DeviceQuery
- func (isrtq *IPStaticRoutingTableQuery) QueryOnInterface() *NetInterfaceQuery
- func (isrtq *IPStaticRoutingTableQuery) Select(field string, fields ...string) *IPStaticRoutingTableSelect
- func (isrtq *IPStaticRoutingTableQuery) Unique(unique bool) *IPStaticRoutingTableQuery
- func (isrtq *IPStaticRoutingTableQuery) Where(ps ...predicate.IPStaticRoutingTable) *IPStaticRoutingTableQuery
- func (isrtq *IPStaticRoutingTableQuery) WithOnDevice(opts ...func(*DeviceQuery)) *IPStaticRoutingTableQuery
- func (isrtq *IPStaticRoutingTableQuery) WithOnInterface(opts ...func(*NetInterfaceQuery)) *IPStaticRoutingTableQuery
- type IPStaticRoutingTableSelect
- func (isrts *IPStaticRoutingTableSelect) Bool(ctx context.Context) (_ bool, err error)
- func (isrts *IPStaticRoutingTableSelect) BoolX(ctx context.Context) bool
- func (isrts *IPStaticRoutingTableSelect) Bools(ctx context.Context) ([]bool, error)
- func (isrts *IPStaticRoutingTableSelect) BoolsX(ctx context.Context) []bool
- func (isrts *IPStaticRoutingTableSelect) Float64(ctx context.Context) (_ float64, err error)
- func (isrts *IPStaticRoutingTableSelect) Float64X(ctx context.Context) float64
- func (isrts *IPStaticRoutingTableSelect) Float64s(ctx context.Context) ([]float64, error)
- func (isrts *IPStaticRoutingTableSelect) Float64sX(ctx context.Context) []float64
- func (isrts *IPStaticRoutingTableSelect) Int(ctx context.Context) (_ int, err error)
- func (isrts *IPStaticRoutingTableSelect) IntX(ctx context.Context) int
- func (isrts *IPStaticRoutingTableSelect) Ints(ctx context.Context) ([]int, error)
- func (isrts *IPStaticRoutingTableSelect) IntsX(ctx context.Context) []int
- func (isrts *IPStaticRoutingTableSelect) Scan(ctx context.Context, v interface{}) error
- func (isrts *IPStaticRoutingTableSelect) ScanX(ctx context.Context, v interface{})
- func (isrts *IPStaticRoutingTableSelect) String(ctx context.Context) (_ string, err error)
- func (isrts *IPStaticRoutingTableSelect) StringX(ctx context.Context) string
- func (isrts *IPStaticRoutingTableSelect) Strings(ctx context.Context) ([]string, error)
- func (isrts *IPStaticRoutingTableSelect) StringsX(ctx context.Context) []string
- type IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) ClearOnDevice() *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) ClearOnInterface() *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) Exec(ctx context.Context) error
- func (isrtu *IPStaticRoutingTableUpdate) ExecX(ctx context.Context)
- func (isrtu *IPStaticRoutingTableUpdate) Mutation() *IPStaticRoutingTableMutation
- func (isrtu *IPStaticRoutingTableUpdate) Save(ctx context.Context) (int, error)
- func (isrtu *IPStaticRoutingTableUpdate) SaveX(ctx context.Context) int
- func (isrtu *IPStaticRoutingTableUpdate) SetBrdInterface(b bool) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetNetworkAddress(s string) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetNextHop(s string) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetNillableBrdInterface(b *bool) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetNillableOnDeviceID(id *int) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetNillableOnInterfaceID(id *int) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetOnDevice(d *Device) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetOnDeviceID(id int) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetOnInterface(n *NetInterface) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetOnInterfaceID(id int) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) SetSubnetMask(s string) *IPStaticRoutingTableUpdate
- func (isrtu *IPStaticRoutingTableUpdate) Where(ps ...predicate.IPStaticRoutingTable) *IPStaticRoutingTableUpdate
- type IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) ClearOnDevice() *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) ClearOnInterface() *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) Exec(ctx context.Context) error
- func (isrtuo *IPStaticRoutingTableUpdateOne) ExecX(ctx context.Context)
- func (isrtuo *IPStaticRoutingTableUpdateOne) Mutation() *IPStaticRoutingTableMutation
- func (isrtuo *IPStaticRoutingTableUpdateOne) Save(ctx context.Context) (*IPStaticRoutingTable, error)
- func (isrtuo *IPStaticRoutingTableUpdateOne) SaveX(ctx context.Context) *IPStaticRoutingTable
- func (isrtuo *IPStaticRoutingTableUpdateOne) Select(field string, fields ...string) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetBrdInterface(b bool) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetNetworkAddress(s string) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetNextHop(s string) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetNillableBrdInterface(b *bool) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetNillableOnDeviceID(id *int) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetNillableOnInterfaceID(id *int) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetOnDevice(d *Device) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetOnDeviceID(id int) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetOnInterface(n *NetInterface) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetOnInterfaceID(id int) *IPStaticRoutingTableUpdateOne
- func (isrtuo *IPStaticRoutingTableUpdateOne) SetSubnetMask(s string) *IPStaticRoutingTableUpdateOne
- type IPStaticRoutingTables
- type MutateFunc
- type Mutation
- type Mutator
- type NetInterface
- func (ni *NetInterface) QueryHaveVlans() *VlanQuery
- func (ni *NetInterface) QueryIPStaticRouting() *IPStaticRoutingTableQuery
- func (ni *NetInterface) QueryMode() *NetInterfaceModeQuery
- func (ni *NetInterface) QueryNativeOnVlan() *VlanQuery
- func (ni *NetInterface) QueryOnDevice() *DeviceQuery
- func (ni *NetInterface) QueryOnIPAddress() *IPAddressQuery
- func (ni *NetInterface) QueryOnLayer() *NetInterfaceLayerQuery
- func (ni *NetInterface) QueryOnPoInterface() *PortChannelInterfaceQuery
- func (ni *NetInterface) String() string
- func (ni *NetInterface) Unwrap() *NetInterface
- func (ni *NetInterface) Update() *NetInterfaceUpdateOne
- type NetInterfaceClient
- func (c *NetInterfaceClient) Create() *NetInterfaceCreate
- func (c *NetInterfaceClient) CreateBulk(builders ...*NetInterfaceCreate) *NetInterfaceCreateBulk
- func (c *NetInterfaceClient) Delete() *NetInterfaceDelete
- func (c *NetInterfaceClient) DeleteOne(ni *NetInterface) *NetInterfaceDeleteOne
- func (c *NetInterfaceClient) DeleteOneID(id int) *NetInterfaceDeleteOne
- func (c *NetInterfaceClient) Get(ctx context.Context, id int) (*NetInterface, error)
- func (c *NetInterfaceClient) GetX(ctx context.Context, id int) *NetInterface
- func (c *NetInterfaceClient) Hooks() []Hook
- func (c *NetInterfaceClient) Query() *NetInterfaceQuery
- func (c *NetInterfaceClient) QueryHaveVlans(ni *NetInterface) *VlanQuery
- func (c *NetInterfaceClient) QueryIPStaticRouting(ni *NetInterface) *IPStaticRoutingTableQuery
- func (c *NetInterfaceClient) QueryMode(ni *NetInterface) *NetInterfaceModeQuery
- func (c *NetInterfaceClient) QueryNativeOnVlan(ni *NetInterface) *VlanQuery
- func (c *NetInterfaceClient) QueryOnDevice(ni *NetInterface) *DeviceQuery
- func (c *NetInterfaceClient) QueryOnIPAddress(ni *NetInterface) *IPAddressQuery
- func (c *NetInterfaceClient) QueryOnLayer(ni *NetInterface) *NetInterfaceLayerQuery
- func (c *NetInterfaceClient) QueryOnPoInterface(ni *NetInterface) *PortChannelInterfaceQuery
- func (c *NetInterfaceClient) Update() *NetInterfaceUpdate
- func (c *NetInterfaceClient) UpdateOne(ni *NetInterface) *NetInterfaceUpdateOne
- func (c *NetInterfaceClient) UpdateOneID(id int) *NetInterfaceUpdateOne
- func (c *NetInterfaceClient) Use(hooks ...Hook)
- type NetInterfaceCreate
- func (nic *NetInterfaceCreate) AddHaveVlanIDs(ids ...int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) AddHaveVlans(v ...*Vlan) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) AddIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) AddIPStaticRoutingIDs(ids ...int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) Mutation() *NetInterfaceMutation
- func (nic *NetInterfaceCreate) Save(ctx context.Context) (*NetInterface, error)
- func (nic *NetInterfaceCreate) SaveX(ctx context.Context) *NetInterface
- func (nic *NetInterfaceCreate) SetInterfaceName(s string) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetInterfaceShutdown(b bool) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetMode(n *NetInterfaceMode) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetModeID(id int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetNativeOnVlan(v *Vlan) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetNativeOnVlanID(id int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetNillableInterfaceShutdown(b *bool) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetNillableModeID(id *int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetNillableNativeOnVlanID(id *int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetNillableOnDeviceID(id *int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetNillableOnIPAddressID(id *int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetNillableOnLayerID(id *int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetNillableOnPoInterfaceID(id *int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetOnDevice(d *Device) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetOnDeviceID(id int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetOnIPAddress(i *IPAddress) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetOnIPAddressID(id int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetOnLayer(n *NetInterfaceLayer) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetOnLayerID(id int) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetOnPoInterface(p *PortChannelInterface) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetOnPoInterfaceID(id int) *NetInterfaceCreate
- type NetInterfaceCreateBulk
- type NetInterfaceDelete
- type NetInterfaceDeleteOne
- type NetInterfaceEdges
- func (e NetInterfaceEdges) HaveVlansOrErr() ([]*Vlan, error)
- func (e NetInterfaceEdges) IPStaticRoutingOrErr() ([]*IPStaticRoutingTable, error)
- func (e NetInterfaceEdges) ModeOrErr() (*NetInterfaceMode, error)
- func (e NetInterfaceEdges) NativeOnVlanOrErr() (*Vlan, error)
- func (e NetInterfaceEdges) OnDeviceOrErr() (*Device, error)
- func (e NetInterfaceEdges) OnIPAddressOrErr() (*IPAddress, error)
- func (e NetInterfaceEdges) OnLayerOrErr() (*NetInterfaceLayer, error)
- func (e NetInterfaceEdges) OnPoInterfaceOrErr() (*PortChannelInterface, error)
- type NetInterfaceGroupBy
- func (nigb *NetInterfaceGroupBy) Aggregate(fns ...AggregateFunc) *NetInterfaceGroupBy
- func (nigb *NetInterfaceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (nigb *NetInterfaceGroupBy) BoolX(ctx context.Context) bool
- func (nigb *NetInterfaceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (nigb *NetInterfaceGroupBy) BoolsX(ctx context.Context) []bool
- func (nigb *NetInterfaceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (nigb *NetInterfaceGroupBy) Float64X(ctx context.Context) float64
- func (nigb *NetInterfaceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (nigb *NetInterfaceGroupBy) Float64sX(ctx context.Context) []float64
- func (nigb *NetInterfaceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (nigb *NetInterfaceGroupBy) IntX(ctx context.Context) int
- func (nigb *NetInterfaceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (nigb *NetInterfaceGroupBy) IntsX(ctx context.Context) []int
- func (nigb *NetInterfaceGroupBy) Scan(ctx context.Context, v interface{}) error
- func (nigb *NetInterfaceGroupBy) ScanX(ctx context.Context, v interface{})
- func (nigb *NetInterfaceGroupBy) String(ctx context.Context) (_ string, err error)
- func (nigb *NetInterfaceGroupBy) StringX(ctx context.Context) string
- func (nigb *NetInterfaceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (nigb *NetInterfaceGroupBy) StringsX(ctx context.Context) []string
- type NetInterfaceLayer
- func (nil *NetInterfaceLayer) QueryLayers() *NetInterfaceQuery
- func (nil *NetInterfaceLayer) QueryPoLayers() *PortChannelInterfaceQuery
- func (nil *NetInterfaceLayer) String() string
- func (nil *NetInterfaceLayer) Unwrap() *NetInterfaceLayer
- func (nil *NetInterfaceLayer) Update() *NetInterfaceLayerUpdateOne
- type NetInterfaceLayerClient
- func (c *NetInterfaceLayerClient) Create() *NetInterfaceLayerCreate
- func (c *NetInterfaceLayerClient) CreateBulk(builders ...*NetInterfaceLayerCreate) *NetInterfaceLayerCreateBulk
- func (c *NetInterfaceLayerClient) Delete() *NetInterfaceLayerDelete
- func (c *NetInterfaceLayerClient) DeleteOne(nil *NetInterfaceLayer) *NetInterfaceLayerDeleteOne
- func (c *NetInterfaceLayerClient) DeleteOneID(id int) *NetInterfaceLayerDeleteOne
- func (c *NetInterfaceLayerClient) Get(ctx context.Context, id int) (*NetInterfaceLayer, error)
- func (c *NetInterfaceLayerClient) GetX(ctx context.Context, id int) *NetInterfaceLayer
- func (c *NetInterfaceLayerClient) Hooks() []Hook
- func (c *NetInterfaceLayerClient) Query() *NetInterfaceLayerQuery
- func (c *NetInterfaceLayerClient) QueryLayers(nly *NetInterfaceLayer) *NetInterfaceQuery
- func (c *NetInterfaceLayerClient) QueryPoLayers(nly *NetInterfaceLayer) *PortChannelInterfaceQuery
- func (c *NetInterfaceLayerClient) Update() *NetInterfaceLayerUpdate
- func (c *NetInterfaceLayerClient) UpdateOne(nil *NetInterfaceLayer) *NetInterfaceLayerUpdateOne
- func (c *NetInterfaceLayerClient) UpdateOneID(id int) *NetInterfaceLayerUpdateOne
- func (c *NetInterfaceLayerClient) Use(hooks ...Hook)
- type NetInterfaceLayerCreate
- func (nilc *NetInterfaceLayerCreate) AddLayerIDs(ids ...int) *NetInterfaceLayerCreate
- func (nilc *NetInterfaceLayerCreate) AddLayers(n ...*NetInterface) *NetInterfaceLayerCreate
- func (nilc *NetInterfaceLayerCreate) AddPoLayerIDs(ids ...int) *NetInterfaceLayerCreate
- func (nilc *NetInterfaceLayerCreate) AddPoLayers(p ...*PortChannelInterface) *NetInterfaceLayerCreate
- func (nilc *NetInterfaceLayerCreate) Mutation() *NetInterfaceLayerMutation
- func (nilc *NetInterfaceLayerCreate) Save(ctx context.Context) (*NetInterfaceLayer, error)
- func (nilc *NetInterfaceLayerCreate) SaveX(ctx context.Context) *NetInterfaceLayer
- func (nilc *NetInterfaceLayerCreate) SetInterfaceLayer(i int) *NetInterfaceLayerCreate
- type NetInterfaceLayerCreateBulk
- type NetInterfaceLayerDelete
- type NetInterfaceLayerDeleteOne
- type NetInterfaceLayerEdges
- type NetInterfaceLayerGroupBy
- func (nilgb *NetInterfaceLayerGroupBy) Aggregate(fns ...AggregateFunc) *NetInterfaceLayerGroupBy
- func (nilgb *NetInterfaceLayerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (nilgb *NetInterfaceLayerGroupBy) BoolX(ctx context.Context) bool
- func (nilgb *NetInterfaceLayerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (nilgb *NetInterfaceLayerGroupBy) BoolsX(ctx context.Context) []bool
- func (nilgb *NetInterfaceLayerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (nilgb *NetInterfaceLayerGroupBy) Float64X(ctx context.Context) float64
- func (nilgb *NetInterfaceLayerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (nilgb *NetInterfaceLayerGroupBy) Float64sX(ctx context.Context) []float64
- func (nilgb *NetInterfaceLayerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (nilgb *NetInterfaceLayerGroupBy) IntX(ctx context.Context) int
- func (nilgb *NetInterfaceLayerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (nilgb *NetInterfaceLayerGroupBy) IntsX(ctx context.Context) []int
- func (nilgb *NetInterfaceLayerGroupBy) Scan(ctx context.Context, v interface{}) error
- func (nilgb *NetInterfaceLayerGroupBy) ScanX(ctx context.Context, v interface{})
- func (nilgb *NetInterfaceLayerGroupBy) String(ctx context.Context) (_ string, err error)
- func (nilgb *NetInterfaceLayerGroupBy) StringX(ctx context.Context) string
- func (nilgb *NetInterfaceLayerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (nilgb *NetInterfaceLayerGroupBy) StringsX(ctx context.Context) []string
- type NetInterfaceLayerMutation
- func (m *NetInterfaceLayerMutation) AddField(name string, value ent.Value) error
- func (m *NetInterfaceLayerMutation) AddInterfaceLayer(i int)
- func (m *NetInterfaceLayerMutation) AddLayerIDs(ids ...int)
- func (m *NetInterfaceLayerMutation) AddPoLayerIDs(ids ...int)
- func (m *NetInterfaceLayerMutation) AddedEdges() []string
- func (m *NetInterfaceLayerMutation) AddedField(name string) (ent.Value, bool)
- func (m *NetInterfaceLayerMutation) AddedFields() []string
- func (m *NetInterfaceLayerMutation) AddedIDs(name string) []ent.Value
- func (m *NetInterfaceLayerMutation) AddedInterfaceLayer() (r int, exists bool)
- func (m *NetInterfaceLayerMutation) ClearEdge(name string) error
- func (m *NetInterfaceLayerMutation) ClearField(name string) error
- func (m *NetInterfaceLayerMutation) ClearLayers()
- func (m *NetInterfaceLayerMutation) ClearPoLayers()
- func (m *NetInterfaceLayerMutation) ClearedEdges() []string
- func (m *NetInterfaceLayerMutation) ClearedFields() []string
- func (m NetInterfaceLayerMutation) Client() *Client
- func (m *NetInterfaceLayerMutation) EdgeCleared(name string) bool
- func (m *NetInterfaceLayerMutation) Field(name string) (ent.Value, bool)
- func (m *NetInterfaceLayerMutation) FieldCleared(name string) bool
- func (m *NetInterfaceLayerMutation) Fields() []string
- func (m *NetInterfaceLayerMutation) ID() (id int, exists bool)
- func (m *NetInterfaceLayerMutation) InterfaceLayer() (r int, exists bool)
- func (m *NetInterfaceLayerMutation) LayersCleared() bool
- func (m *NetInterfaceLayerMutation) LayersIDs() (ids []int)
- func (m *NetInterfaceLayerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NetInterfaceLayerMutation) OldInterfaceLayer(ctx context.Context) (v int, err error)
- func (m *NetInterfaceLayerMutation) Op() Op
- func (m *NetInterfaceLayerMutation) PoLayersCleared() bool
- func (m *NetInterfaceLayerMutation) PoLayersIDs() (ids []int)
- func (m *NetInterfaceLayerMutation) RemoveLayerIDs(ids ...int)
- func (m *NetInterfaceLayerMutation) RemovePoLayerIDs(ids ...int)
- func (m *NetInterfaceLayerMutation) RemovedEdges() []string
- func (m *NetInterfaceLayerMutation) RemovedIDs(name string) []ent.Value
- func (m *NetInterfaceLayerMutation) RemovedLayersIDs() (ids []int)
- func (m *NetInterfaceLayerMutation) RemovedPoLayersIDs() (ids []int)
- func (m *NetInterfaceLayerMutation) ResetEdge(name string) error
- func (m *NetInterfaceLayerMutation) ResetField(name string) error
- func (m *NetInterfaceLayerMutation) ResetInterfaceLayer()
- func (m *NetInterfaceLayerMutation) ResetLayers()
- func (m *NetInterfaceLayerMutation) ResetPoLayers()
- func (m *NetInterfaceLayerMutation) SetField(name string, value ent.Value) error
- func (m *NetInterfaceLayerMutation) SetInterfaceLayer(i int)
- func (m NetInterfaceLayerMutation) Tx() (*Tx, error)
- func (m *NetInterfaceLayerMutation) Type() string
- type NetInterfaceLayerQuery
- func (nilq *NetInterfaceLayerQuery) All(ctx context.Context) ([]*NetInterfaceLayer, error)
- func (nilq *NetInterfaceLayerQuery) AllX(ctx context.Context) []*NetInterfaceLayer
- func (nilq *NetInterfaceLayerQuery) Clone() *NetInterfaceLayerQuery
- func (nilq *NetInterfaceLayerQuery) Count(ctx context.Context) (int, error)
- func (nilq *NetInterfaceLayerQuery) CountX(ctx context.Context) int
- func (nilq *NetInterfaceLayerQuery) Exist(ctx context.Context) (bool, error)
- func (nilq *NetInterfaceLayerQuery) ExistX(ctx context.Context) bool
- func (nilq *NetInterfaceLayerQuery) First(ctx context.Context) (*NetInterfaceLayer, error)
- func (nilq *NetInterfaceLayerQuery) FirstID(ctx context.Context) (id int, err error)
- func (nilq *NetInterfaceLayerQuery) FirstIDX(ctx context.Context) int
- func (nilq *NetInterfaceLayerQuery) FirstX(ctx context.Context) *NetInterfaceLayer
- func (nilq *NetInterfaceLayerQuery) GroupBy(field string, fields ...string) *NetInterfaceLayerGroupBy
- func (nilq *NetInterfaceLayerQuery) IDs(ctx context.Context) ([]int, error)
- func (nilq *NetInterfaceLayerQuery) IDsX(ctx context.Context) []int
- func (nilq *NetInterfaceLayerQuery) Limit(limit int) *NetInterfaceLayerQuery
- func (nilq *NetInterfaceLayerQuery) Offset(offset int) *NetInterfaceLayerQuery
- func (nilq *NetInterfaceLayerQuery) Only(ctx context.Context) (*NetInterfaceLayer, error)
- func (nilq *NetInterfaceLayerQuery) OnlyID(ctx context.Context) (id int, err error)
- func (nilq *NetInterfaceLayerQuery) OnlyIDX(ctx context.Context) int
- func (nilq *NetInterfaceLayerQuery) OnlyX(ctx context.Context) *NetInterfaceLayer
- func (nilq *NetInterfaceLayerQuery) Order(o ...OrderFunc) *NetInterfaceLayerQuery
- func (nilq *NetInterfaceLayerQuery) QueryLayers() *NetInterfaceQuery
- func (nilq *NetInterfaceLayerQuery) QueryPoLayers() *PortChannelInterfaceQuery
- func (nilq *NetInterfaceLayerQuery) Select(field string, fields ...string) *NetInterfaceLayerSelect
- func (nilq *NetInterfaceLayerQuery) Unique(unique bool) *NetInterfaceLayerQuery
- func (nilq *NetInterfaceLayerQuery) Where(ps ...predicate.NetInterfaceLayer) *NetInterfaceLayerQuery
- func (nilq *NetInterfaceLayerQuery) WithLayers(opts ...func(*NetInterfaceQuery)) *NetInterfaceLayerQuery
- func (nilq *NetInterfaceLayerQuery) WithPoLayers(opts ...func(*PortChannelInterfaceQuery)) *NetInterfaceLayerQuery
- type NetInterfaceLayerSelect
- func (nils *NetInterfaceLayerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (nils *NetInterfaceLayerSelect) BoolX(ctx context.Context) bool
- func (nils *NetInterfaceLayerSelect) Bools(ctx context.Context) ([]bool, error)
- func (nils *NetInterfaceLayerSelect) BoolsX(ctx context.Context) []bool
- func (nils *NetInterfaceLayerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (nils *NetInterfaceLayerSelect) Float64X(ctx context.Context) float64
- func (nils *NetInterfaceLayerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (nils *NetInterfaceLayerSelect) Float64sX(ctx context.Context) []float64
- func (nils *NetInterfaceLayerSelect) Int(ctx context.Context) (_ int, err error)
- func (nils *NetInterfaceLayerSelect) IntX(ctx context.Context) int
- func (nils *NetInterfaceLayerSelect) Ints(ctx context.Context) ([]int, error)
- func (nils *NetInterfaceLayerSelect) IntsX(ctx context.Context) []int
- func (nils *NetInterfaceLayerSelect) Scan(ctx context.Context, v interface{}) error
- func (nils *NetInterfaceLayerSelect) ScanX(ctx context.Context, v interface{})
- func (nils *NetInterfaceLayerSelect) String(ctx context.Context) (_ string, err error)
- func (nils *NetInterfaceLayerSelect) StringX(ctx context.Context) string
- func (nils *NetInterfaceLayerSelect) Strings(ctx context.Context) ([]string, error)
- func (nils *NetInterfaceLayerSelect) StringsX(ctx context.Context) []string
- type NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) AddInterfaceLayer(i int) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) AddLayerIDs(ids ...int) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) AddLayers(n ...*NetInterface) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) AddPoLayerIDs(ids ...int) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) AddPoLayers(p ...*PortChannelInterface) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) ClearLayers() *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) ClearPoLayers() *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) Exec(ctx context.Context) error
- func (nilu *NetInterfaceLayerUpdate) ExecX(ctx context.Context)
- func (nilu *NetInterfaceLayerUpdate) Mutation() *NetInterfaceLayerMutation
- func (nilu *NetInterfaceLayerUpdate) RemoveLayerIDs(ids ...int) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) RemoveLayers(n ...*NetInterface) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) RemovePoLayerIDs(ids ...int) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) RemovePoLayers(p ...*PortChannelInterface) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) Save(ctx context.Context) (int, error)
- func (nilu *NetInterfaceLayerUpdate) SaveX(ctx context.Context) int
- func (nilu *NetInterfaceLayerUpdate) SetInterfaceLayer(i int) *NetInterfaceLayerUpdate
- func (nilu *NetInterfaceLayerUpdate) Where(ps ...predicate.NetInterfaceLayer) *NetInterfaceLayerUpdate
- type NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) AddInterfaceLayer(i int) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) AddLayerIDs(ids ...int) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) AddLayers(n ...*NetInterface) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) AddPoLayerIDs(ids ...int) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) AddPoLayers(p ...*PortChannelInterface) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) ClearLayers() *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) ClearPoLayers() *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) Exec(ctx context.Context) error
- func (niluo *NetInterfaceLayerUpdateOne) ExecX(ctx context.Context)
- func (niluo *NetInterfaceLayerUpdateOne) Mutation() *NetInterfaceLayerMutation
- func (niluo *NetInterfaceLayerUpdateOne) RemoveLayerIDs(ids ...int) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) RemoveLayers(n ...*NetInterface) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) RemovePoLayerIDs(ids ...int) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) RemovePoLayers(p ...*PortChannelInterface) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) Save(ctx context.Context) (*NetInterfaceLayer, error)
- func (niluo *NetInterfaceLayerUpdateOne) SaveX(ctx context.Context) *NetInterfaceLayer
- func (niluo *NetInterfaceLayerUpdateOne) Select(field string, fields ...string) *NetInterfaceLayerUpdateOne
- func (niluo *NetInterfaceLayerUpdateOne) SetInterfaceLayer(i int) *NetInterfaceLayerUpdateOne
- type NetInterfaceLayers
- type NetInterfaceMode
- type NetInterfaceModeClient
- func (c *NetInterfaceModeClient) Create() *NetInterfaceModeCreate
- func (c *NetInterfaceModeClient) CreateBulk(builders ...*NetInterfaceModeCreate) *NetInterfaceModeCreateBulk
- func (c *NetInterfaceModeClient) Delete() *NetInterfaceModeDelete
- func (c *NetInterfaceModeClient) DeleteOne(nim *NetInterfaceMode) *NetInterfaceModeDeleteOne
- func (c *NetInterfaceModeClient) DeleteOneID(id int) *NetInterfaceModeDeleteOne
- func (c *NetInterfaceModeClient) Get(ctx context.Context, id int) (*NetInterfaceMode, error)
- func (c *NetInterfaceModeClient) GetX(ctx context.Context, id int) *NetInterfaceMode
- func (c *NetInterfaceModeClient) Hooks() []Hook
- func (c *NetInterfaceModeClient) Query() *NetInterfaceModeQuery
- func (c *NetInterfaceModeClient) QueryModes(nim *NetInterfaceMode) *NetInterfaceQuery
- func (c *NetInterfaceModeClient) QueryPoModes(nim *NetInterfaceMode) *PortChannelInterfaceQuery
- func (c *NetInterfaceModeClient) Update() *NetInterfaceModeUpdate
- func (c *NetInterfaceModeClient) UpdateOne(nim *NetInterfaceMode) *NetInterfaceModeUpdateOne
- func (c *NetInterfaceModeClient) UpdateOneID(id int) *NetInterfaceModeUpdateOne
- func (c *NetInterfaceModeClient) Use(hooks ...Hook)
- type NetInterfaceModeCreate
- func (nimc *NetInterfaceModeCreate) AddModeIDs(ids ...int) *NetInterfaceModeCreate
- func (nimc *NetInterfaceModeCreate) AddModes(n ...*NetInterface) *NetInterfaceModeCreate
- func (nimc *NetInterfaceModeCreate) AddPoModeIDs(ids ...int) *NetInterfaceModeCreate
- func (nimc *NetInterfaceModeCreate) AddPoModes(p ...*PortChannelInterface) *NetInterfaceModeCreate
- func (nimc *NetInterfaceModeCreate) Mutation() *NetInterfaceModeMutation
- func (nimc *NetInterfaceModeCreate) Save(ctx context.Context) (*NetInterfaceMode, error)
- func (nimc *NetInterfaceModeCreate) SaveX(ctx context.Context) *NetInterfaceMode
- func (nimc *NetInterfaceModeCreate) SetInterfaceMode(s string) *NetInterfaceModeCreate
- type NetInterfaceModeCreateBulk
- type NetInterfaceModeDelete
- type NetInterfaceModeDeleteOne
- type NetInterfaceModeEdges
- type NetInterfaceModeGroupBy
- func (nimgb *NetInterfaceModeGroupBy) Aggregate(fns ...AggregateFunc) *NetInterfaceModeGroupBy
- func (nimgb *NetInterfaceModeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (nimgb *NetInterfaceModeGroupBy) BoolX(ctx context.Context) bool
- func (nimgb *NetInterfaceModeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (nimgb *NetInterfaceModeGroupBy) BoolsX(ctx context.Context) []bool
- func (nimgb *NetInterfaceModeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (nimgb *NetInterfaceModeGroupBy) Float64X(ctx context.Context) float64
- func (nimgb *NetInterfaceModeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (nimgb *NetInterfaceModeGroupBy) Float64sX(ctx context.Context) []float64
- func (nimgb *NetInterfaceModeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (nimgb *NetInterfaceModeGroupBy) IntX(ctx context.Context) int
- func (nimgb *NetInterfaceModeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (nimgb *NetInterfaceModeGroupBy) IntsX(ctx context.Context) []int
- func (nimgb *NetInterfaceModeGroupBy) Scan(ctx context.Context, v interface{}) error
- func (nimgb *NetInterfaceModeGroupBy) ScanX(ctx context.Context, v interface{})
- func (nimgb *NetInterfaceModeGroupBy) String(ctx context.Context) (_ string, err error)
- func (nimgb *NetInterfaceModeGroupBy) StringX(ctx context.Context) string
- func (nimgb *NetInterfaceModeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (nimgb *NetInterfaceModeGroupBy) StringsX(ctx context.Context) []string
- type NetInterfaceModeMutation
- func (m *NetInterfaceModeMutation) AddField(name string, value ent.Value) error
- func (m *NetInterfaceModeMutation) AddModeIDs(ids ...int)
- func (m *NetInterfaceModeMutation) AddPoModeIDs(ids ...int)
- func (m *NetInterfaceModeMutation) AddedEdges() []string
- func (m *NetInterfaceModeMutation) AddedField(name string) (ent.Value, bool)
- func (m *NetInterfaceModeMutation) AddedFields() []string
- func (m *NetInterfaceModeMutation) AddedIDs(name string) []ent.Value
- func (m *NetInterfaceModeMutation) ClearEdge(name string) error
- func (m *NetInterfaceModeMutation) ClearField(name string) error
- func (m *NetInterfaceModeMutation) ClearModes()
- func (m *NetInterfaceModeMutation) ClearPoModes()
- func (m *NetInterfaceModeMutation) ClearedEdges() []string
- func (m *NetInterfaceModeMutation) ClearedFields() []string
- func (m NetInterfaceModeMutation) Client() *Client
- func (m *NetInterfaceModeMutation) EdgeCleared(name string) bool
- func (m *NetInterfaceModeMutation) Field(name string) (ent.Value, bool)
- func (m *NetInterfaceModeMutation) FieldCleared(name string) bool
- func (m *NetInterfaceModeMutation) Fields() []string
- func (m *NetInterfaceModeMutation) ID() (id int, exists bool)
- func (m *NetInterfaceModeMutation) InterfaceMode() (r string, exists bool)
- func (m *NetInterfaceModeMutation) ModesCleared() bool
- func (m *NetInterfaceModeMutation) ModesIDs() (ids []int)
- func (m *NetInterfaceModeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NetInterfaceModeMutation) OldInterfaceMode(ctx context.Context) (v string, err error)
- func (m *NetInterfaceModeMutation) Op() Op
- func (m *NetInterfaceModeMutation) PoModesCleared() bool
- func (m *NetInterfaceModeMutation) PoModesIDs() (ids []int)
- func (m *NetInterfaceModeMutation) RemoveModeIDs(ids ...int)
- func (m *NetInterfaceModeMutation) RemovePoModeIDs(ids ...int)
- func (m *NetInterfaceModeMutation) RemovedEdges() []string
- func (m *NetInterfaceModeMutation) RemovedIDs(name string) []ent.Value
- func (m *NetInterfaceModeMutation) RemovedModesIDs() (ids []int)
- func (m *NetInterfaceModeMutation) RemovedPoModesIDs() (ids []int)
- func (m *NetInterfaceModeMutation) ResetEdge(name string) error
- func (m *NetInterfaceModeMutation) ResetField(name string) error
- func (m *NetInterfaceModeMutation) ResetInterfaceMode()
- func (m *NetInterfaceModeMutation) ResetModes()
- func (m *NetInterfaceModeMutation) ResetPoModes()
- func (m *NetInterfaceModeMutation) SetField(name string, value ent.Value) error
- func (m *NetInterfaceModeMutation) SetInterfaceMode(s string)
- func (m NetInterfaceModeMutation) Tx() (*Tx, error)
- func (m *NetInterfaceModeMutation) Type() string
- type NetInterfaceModeQuery
- func (nimq *NetInterfaceModeQuery) All(ctx context.Context) ([]*NetInterfaceMode, error)
- func (nimq *NetInterfaceModeQuery) AllX(ctx context.Context) []*NetInterfaceMode
- func (nimq *NetInterfaceModeQuery) Clone() *NetInterfaceModeQuery
- func (nimq *NetInterfaceModeQuery) Count(ctx context.Context) (int, error)
- func (nimq *NetInterfaceModeQuery) CountX(ctx context.Context) int
- func (nimq *NetInterfaceModeQuery) Exist(ctx context.Context) (bool, error)
- func (nimq *NetInterfaceModeQuery) ExistX(ctx context.Context) bool
- func (nimq *NetInterfaceModeQuery) First(ctx context.Context) (*NetInterfaceMode, error)
- func (nimq *NetInterfaceModeQuery) FirstID(ctx context.Context) (id int, err error)
- func (nimq *NetInterfaceModeQuery) FirstIDX(ctx context.Context) int
- func (nimq *NetInterfaceModeQuery) FirstX(ctx context.Context) *NetInterfaceMode
- func (nimq *NetInterfaceModeQuery) GroupBy(field string, fields ...string) *NetInterfaceModeGroupBy
- func (nimq *NetInterfaceModeQuery) IDs(ctx context.Context) ([]int, error)
- func (nimq *NetInterfaceModeQuery) IDsX(ctx context.Context) []int
- func (nimq *NetInterfaceModeQuery) Limit(limit int) *NetInterfaceModeQuery
- func (nimq *NetInterfaceModeQuery) Offset(offset int) *NetInterfaceModeQuery
- func (nimq *NetInterfaceModeQuery) Only(ctx context.Context) (*NetInterfaceMode, error)
- func (nimq *NetInterfaceModeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (nimq *NetInterfaceModeQuery) OnlyIDX(ctx context.Context) int
- func (nimq *NetInterfaceModeQuery) OnlyX(ctx context.Context) *NetInterfaceMode
- func (nimq *NetInterfaceModeQuery) Order(o ...OrderFunc) *NetInterfaceModeQuery
- func (nimq *NetInterfaceModeQuery) QueryModes() *NetInterfaceQuery
- func (nimq *NetInterfaceModeQuery) QueryPoModes() *PortChannelInterfaceQuery
- func (nimq *NetInterfaceModeQuery) Select(field string, fields ...string) *NetInterfaceModeSelect
- func (nimq *NetInterfaceModeQuery) Unique(unique bool) *NetInterfaceModeQuery
- func (nimq *NetInterfaceModeQuery) Where(ps ...predicate.NetInterfaceMode) *NetInterfaceModeQuery
- func (nimq *NetInterfaceModeQuery) WithModes(opts ...func(*NetInterfaceQuery)) *NetInterfaceModeQuery
- func (nimq *NetInterfaceModeQuery) WithPoModes(opts ...func(*PortChannelInterfaceQuery)) *NetInterfaceModeQuery
- type NetInterfaceModeSelect
- func (nims *NetInterfaceModeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (nims *NetInterfaceModeSelect) BoolX(ctx context.Context) bool
- func (nims *NetInterfaceModeSelect) Bools(ctx context.Context) ([]bool, error)
- func (nims *NetInterfaceModeSelect) BoolsX(ctx context.Context) []bool
- func (nims *NetInterfaceModeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (nims *NetInterfaceModeSelect) Float64X(ctx context.Context) float64
- func (nims *NetInterfaceModeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (nims *NetInterfaceModeSelect) Float64sX(ctx context.Context) []float64
- func (nims *NetInterfaceModeSelect) Int(ctx context.Context) (_ int, err error)
- func (nims *NetInterfaceModeSelect) IntX(ctx context.Context) int
- func (nims *NetInterfaceModeSelect) Ints(ctx context.Context) ([]int, error)
- func (nims *NetInterfaceModeSelect) IntsX(ctx context.Context) []int
- func (nims *NetInterfaceModeSelect) Scan(ctx context.Context, v interface{}) error
- func (nims *NetInterfaceModeSelect) ScanX(ctx context.Context, v interface{})
- func (nims *NetInterfaceModeSelect) String(ctx context.Context) (_ string, err error)
- func (nims *NetInterfaceModeSelect) StringX(ctx context.Context) string
- func (nims *NetInterfaceModeSelect) Strings(ctx context.Context) ([]string, error)
- func (nims *NetInterfaceModeSelect) StringsX(ctx context.Context) []string
- type NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) AddModeIDs(ids ...int) *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) AddModes(n ...*NetInterface) *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) AddPoModeIDs(ids ...int) *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) AddPoModes(p ...*PortChannelInterface) *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) ClearModes() *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) ClearPoModes() *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) Exec(ctx context.Context) error
- func (nimu *NetInterfaceModeUpdate) ExecX(ctx context.Context)
- func (nimu *NetInterfaceModeUpdate) Mutation() *NetInterfaceModeMutation
- func (nimu *NetInterfaceModeUpdate) RemoveModeIDs(ids ...int) *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) RemoveModes(n ...*NetInterface) *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) RemovePoModeIDs(ids ...int) *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) RemovePoModes(p ...*PortChannelInterface) *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) Save(ctx context.Context) (int, error)
- func (nimu *NetInterfaceModeUpdate) SaveX(ctx context.Context) int
- func (nimu *NetInterfaceModeUpdate) SetInterfaceMode(s string) *NetInterfaceModeUpdate
- func (nimu *NetInterfaceModeUpdate) Where(ps ...predicate.NetInterfaceMode) *NetInterfaceModeUpdate
- type NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) AddModeIDs(ids ...int) *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) AddModes(n ...*NetInterface) *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) AddPoModeIDs(ids ...int) *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) AddPoModes(p ...*PortChannelInterface) *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) ClearModes() *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) ClearPoModes() *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) Exec(ctx context.Context) error
- func (nimuo *NetInterfaceModeUpdateOne) ExecX(ctx context.Context)
- func (nimuo *NetInterfaceModeUpdateOne) Mutation() *NetInterfaceModeMutation
- func (nimuo *NetInterfaceModeUpdateOne) RemoveModeIDs(ids ...int) *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) RemoveModes(n ...*NetInterface) *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) RemovePoModeIDs(ids ...int) *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) RemovePoModes(p ...*PortChannelInterface) *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) Save(ctx context.Context) (*NetInterfaceMode, error)
- func (nimuo *NetInterfaceModeUpdateOne) SaveX(ctx context.Context) *NetInterfaceMode
- func (nimuo *NetInterfaceModeUpdateOne) Select(field string, fields ...string) *NetInterfaceModeUpdateOne
- func (nimuo *NetInterfaceModeUpdateOne) SetInterfaceMode(s string) *NetInterfaceModeUpdateOne
- type NetInterfaceModes
- type NetInterfaceMutation
- func (m *NetInterfaceMutation) AddField(name string, value ent.Value) error
- func (m *NetInterfaceMutation) AddHaveVlanIDs(ids ...int)
- func (m *NetInterfaceMutation) AddIPStaticRoutingIDs(ids ...int)
- func (m *NetInterfaceMutation) AddedEdges() []string
- func (m *NetInterfaceMutation) AddedField(name string) (ent.Value, bool)
- func (m *NetInterfaceMutation) AddedFields() []string
- func (m *NetInterfaceMutation) AddedIDs(name string) []ent.Value
- func (m *NetInterfaceMutation) ClearEdge(name string) error
- func (m *NetInterfaceMutation) ClearField(name string) error
- func (m *NetInterfaceMutation) ClearHaveVlans()
- func (m *NetInterfaceMutation) ClearIPStaticRouting()
- func (m *NetInterfaceMutation) ClearMode()
- func (m *NetInterfaceMutation) ClearNativeOnVlan()
- func (m *NetInterfaceMutation) ClearOnDevice()
- func (m *NetInterfaceMutation) ClearOnIPAddress()
- func (m *NetInterfaceMutation) ClearOnLayer()
- func (m *NetInterfaceMutation) ClearOnPoInterface()
- func (m *NetInterfaceMutation) ClearedEdges() []string
- func (m *NetInterfaceMutation) ClearedFields() []string
- func (m NetInterfaceMutation) Client() *Client
- func (m *NetInterfaceMutation) EdgeCleared(name string) bool
- func (m *NetInterfaceMutation) Field(name string) (ent.Value, bool)
- func (m *NetInterfaceMutation) FieldCleared(name string) bool
- func (m *NetInterfaceMutation) Fields() []string
- func (m *NetInterfaceMutation) HaveVlansCleared() bool
- func (m *NetInterfaceMutation) HaveVlansIDs() (ids []int)
- func (m *NetInterfaceMutation) ID() (id int, exists bool)
- func (m *NetInterfaceMutation) IPStaticRoutingCleared() bool
- func (m *NetInterfaceMutation) IPStaticRoutingIDs() (ids []int)
- func (m *NetInterfaceMutation) InterfaceName() (r string, exists bool)
- func (m *NetInterfaceMutation) InterfaceShutdown() (r bool, exists bool)
- func (m *NetInterfaceMutation) ModeCleared() bool
- func (m *NetInterfaceMutation) ModeID() (id int, exists bool)
- func (m *NetInterfaceMutation) ModeIDs() (ids []int)
- func (m *NetInterfaceMutation) NativeOnVlanCleared() bool
- func (m *NetInterfaceMutation) NativeOnVlanID() (id int, exists bool)
- func (m *NetInterfaceMutation) NativeOnVlanIDs() (ids []int)
- func (m *NetInterfaceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NetInterfaceMutation) OldInterfaceName(ctx context.Context) (v string, err error)
- func (m *NetInterfaceMutation) OldInterfaceShutdown(ctx context.Context) (v bool, err error)
- func (m *NetInterfaceMutation) OnDeviceCleared() bool
- func (m *NetInterfaceMutation) OnDeviceID() (id int, exists bool)
- func (m *NetInterfaceMutation) OnDeviceIDs() (ids []int)
- func (m *NetInterfaceMutation) OnIPAddressCleared() bool
- func (m *NetInterfaceMutation) OnIPAddressID() (id int, exists bool)
- func (m *NetInterfaceMutation) OnIPAddressIDs() (ids []int)
- func (m *NetInterfaceMutation) OnLayerCleared() bool
- func (m *NetInterfaceMutation) OnLayerID() (id int, exists bool)
- func (m *NetInterfaceMutation) OnLayerIDs() (ids []int)
- func (m *NetInterfaceMutation) OnPoInterfaceCleared() bool
- func (m *NetInterfaceMutation) OnPoInterfaceID() (id int, exists bool)
- func (m *NetInterfaceMutation) OnPoInterfaceIDs() (ids []int)
- func (m *NetInterfaceMutation) Op() Op
- func (m *NetInterfaceMutation) RemoveHaveVlanIDs(ids ...int)
- func (m *NetInterfaceMutation) RemoveIPStaticRoutingIDs(ids ...int)
- func (m *NetInterfaceMutation) RemovedEdges() []string
- func (m *NetInterfaceMutation) RemovedHaveVlansIDs() (ids []int)
- func (m *NetInterfaceMutation) RemovedIDs(name string) []ent.Value
- func (m *NetInterfaceMutation) RemovedIPStaticRoutingIDs() (ids []int)
- func (m *NetInterfaceMutation) ResetEdge(name string) error
- func (m *NetInterfaceMutation) ResetField(name string) error
- func (m *NetInterfaceMutation) ResetHaveVlans()
- func (m *NetInterfaceMutation) ResetIPStaticRouting()
- func (m *NetInterfaceMutation) ResetInterfaceName()
- func (m *NetInterfaceMutation) ResetInterfaceShutdown()
- func (m *NetInterfaceMutation) ResetMode()
- func (m *NetInterfaceMutation) ResetNativeOnVlan()
- func (m *NetInterfaceMutation) ResetOnDevice()
- func (m *NetInterfaceMutation) ResetOnIPAddress()
- func (m *NetInterfaceMutation) ResetOnLayer()
- func (m *NetInterfaceMutation) ResetOnPoInterface()
- func (m *NetInterfaceMutation) SetField(name string, value ent.Value) error
- func (m *NetInterfaceMutation) SetInterfaceName(s string)
- func (m *NetInterfaceMutation) SetInterfaceShutdown(b bool)
- func (m *NetInterfaceMutation) SetModeID(id int)
- func (m *NetInterfaceMutation) SetNativeOnVlanID(id int)
- func (m *NetInterfaceMutation) SetOnDeviceID(id int)
- func (m *NetInterfaceMutation) SetOnIPAddressID(id int)
- func (m *NetInterfaceMutation) SetOnLayerID(id int)
- func (m *NetInterfaceMutation) SetOnPoInterfaceID(id int)
- func (m NetInterfaceMutation) Tx() (*Tx, error)
- func (m *NetInterfaceMutation) Type() string
- type NetInterfaceQuery
- func (niq *NetInterfaceQuery) All(ctx context.Context) ([]*NetInterface, error)
- func (niq *NetInterfaceQuery) AllX(ctx context.Context) []*NetInterface
- func (niq *NetInterfaceQuery) Clone() *NetInterfaceQuery
- func (niq *NetInterfaceQuery) Count(ctx context.Context) (int, error)
- func (niq *NetInterfaceQuery) CountX(ctx context.Context) int
- func (niq *NetInterfaceQuery) Exist(ctx context.Context) (bool, error)
- func (niq *NetInterfaceQuery) ExistX(ctx context.Context) bool
- func (niq *NetInterfaceQuery) First(ctx context.Context) (*NetInterface, error)
- func (niq *NetInterfaceQuery) FirstID(ctx context.Context) (id int, err error)
- func (niq *NetInterfaceQuery) FirstIDX(ctx context.Context) int
- func (niq *NetInterfaceQuery) FirstX(ctx context.Context) *NetInterface
- func (niq *NetInterfaceQuery) GroupBy(field string, fields ...string) *NetInterfaceGroupBy
- func (niq *NetInterfaceQuery) IDs(ctx context.Context) ([]int, error)
- func (niq *NetInterfaceQuery) IDsX(ctx context.Context) []int
- func (niq *NetInterfaceQuery) Limit(limit int) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) Offset(offset int) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) Only(ctx context.Context) (*NetInterface, error)
- func (niq *NetInterfaceQuery) OnlyID(ctx context.Context) (id int, err error)
- func (niq *NetInterfaceQuery) OnlyIDX(ctx context.Context) int
- func (niq *NetInterfaceQuery) OnlyX(ctx context.Context) *NetInterface
- func (niq *NetInterfaceQuery) Order(o ...OrderFunc) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) QueryHaveVlans() *VlanQuery
- func (niq *NetInterfaceQuery) QueryIPStaticRouting() *IPStaticRoutingTableQuery
- func (niq *NetInterfaceQuery) QueryMode() *NetInterfaceModeQuery
- func (niq *NetInterfaceQuery) QueryNativeOnVlan() *VlanQuery
- func (niq *NetInterfaceQuery) QueryOnDevice() *DeviceQuery
- func (niq *NetInterfaceQuery) QueryOnIPAddress() *IPAddressQuery
- func (niq *NetInterfaceQuery) QueryOnLayer() *NetInterfaceLayerQuery
- func (niq *NetInterfaceQuery) QueryOnPoInterface() *PortChannelInterfaceQuery
- func (niq *NetInterfaceQuery) Select(field string, fields ...string) *NetInterfaceSelect
- func (niq *NetInterfaceQuery) Unique(unique bool) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) Where(ps ...predicate.NetInterface) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithHaveVlans(opts ...func(*VlanQuery)) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithIPStaticRouting(opts ...func(*IPStaticRoutingTableQuery)) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithMode(opts ...func(*NetInterfaceModeQuery)) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithNativeOnVlan(opts ...func(*VlanQuery)) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithOnDevice(opts ...func(*DeviceQuery)) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithOnIPAddress(opts ...func(*IPAddressQuery)) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithOnLayer(opts ...func(*NetInterfaceLayerQuery)) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithOnPoInterface(opts ...func(*PortChannelInterfaceQuery)) *NetInterfaceQuery
- type NetInterfaceSelect
- func (nis *NetInterfaceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (nis *NetInterfaceSelect) BoolX(ctx context.Context) bool
- func (nis *NetInterfaceSelect) Bools(ctx context.Context) ([]bool, error)
- func (nis *NetInterfaceSelect) BoolsX(ctx context.Context) []bool
- func (nis *NetInterfaceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (nis *NetInterfaceSelect) Float64X(ctx context.Context) float64
- func (nis *NetInterfaceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (nis *NetInterfaceSelect) Float64sX(ctx context.Context) []float64
- func (nis *NetInterfaceSelect) Int(ctx context.Context) (_ int, err error)
- func (nis *NetInterfaceSelect) IntX(ctx context.Context) int
- func (nis *NetInterfaceSelect) Ints(ctx context.Context) ([]int, error)
- func (nis *NetInterfaceSelect) IntsX(ctx context.Context) []int
- func (nis *NetInterfaceSelect) Scan(ctx context.Context, v interface{}) error
- func (nis *NetInterfaceSelect) ScanX(ctx context.Context, v interface{})
- func (nis *NetInterfaceSelect) String(ctx context.Context) (_ string, err error)
- func (nis *NetInterfaceSelect) StringX(ctx context.Context) string
- func (nis *NetInterfaceSelect) Strings(ctx context.Context) ([]string, error)
- func (nis *NetInterfaceSelect) StringsX(ctx context.Context) []string
- type NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) AddHaveVlanIDs(ids ...int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) AddHaveVlans(v ...*Vlan) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) AddIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) AddIPStaticRoutingIDs(ids ...int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearHaveVlans() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearIPStaticRouting() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearMode() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearNativeOnVlan() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearOnDevice() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearOnIPAddress() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearOnLayer() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearOnPoInterface() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) Exec(ctx context.Context) error
- func (niu *NetInterfaceUpdate) ExecX(ctx context.Context)
- func (niu *NetInterfaceUpdate) Mutation() *NetInterfaceMutation
- func (niu *NetInterfaceUpdate) RemoveHaveVlanIDs(ids ...int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) RemoveHaveVlans(v ...*Vlan) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) RemoveIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) RemoveIPStaticRoutingIDs(ids ...int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) Save(ctx context.Context) (int, error)
- func (niu *NetInterfaceUpdate) SaveX(ctx context.Context) int
- func (niu *NetInterfaceUpdate) SetInterfaceName(s string) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetInterfaceShutdown(b bool) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetMode(n *NetInterfaceMode) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetModeID(id int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetNativeOnVlan(v *Vlan) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetNativeOnVlanID(id int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetNillableInterfaceShutdown(b *bool) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetNillableModeID(id *int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetNillableNativeOnVlanID(id *int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetNillableOnDeviceID(id *int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetNillableOnIPAddressID(id *int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetNillableOnLayerID(id *int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetNillableOnPoInterfaceID(id *int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetOnDevice(d *Device) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetOnDeviceID(id int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetOnIPAddress(i *IPAddress) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetOnIPAddressID(id int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetOnLayer(n *NetInterfaceLayer) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetOnLayerID(id int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetOnPoInterface(p *PortChannelInterface) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetOnPoInterfaceID(id int) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) Where(ps ...predicate.NetInterface) *NetInterfaceUpdate
- type NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) AddHaveVlanIDs(ids ...int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) AddHaveVlans(v ...*Vlan) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) AddIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) AddIPStaticRoutingIDs(ids ...int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearHaveVlans() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearIPStaticRouting() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearMode() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearNativeOnVlan() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearOnDevice() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearOnIPAddress() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearOnLayer() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearOnPoInterface() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) Exec(ctx context.Context) error
- func (niuo *NetInterfaceUpdateOne) ExecX(ctx context.Context)
- func (niuo *NetInterfaceUpdateOne) Mutation() *NetInterfaceMutation
- func (niuo *NetInterfaceUpdateOne) RemoveHaveVlanIDs(ids ...int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) RemoveHaveVlans(v ...*Vlan) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) RemoveIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) RemoveIPStaticRoutingIDs(ids ...int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) Save(ctx context.Context) (*NetInterface, error)
- func (niuo *NetInterfaceUpdateOne) SaveX(ctx context.Context) *NetInterface
- func (niuo *NetInterfaceUpdateOne) Select(field string, fields ...string) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetInterfaceName(s string) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetInterfaceShutdown(b bool) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetMode(n *NetInterfaceMode) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetModeID(id int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetNativeOnVlan(v *Vlan) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetNativeOnVlanID(id int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetNillableInterfaceShutdown(b *bool) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetNillableModeID(id *int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetNillableNativeOnVlanID(id *int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetNillableOnDeviceID(id *int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetNillableOnIPAddressID(id *int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetNillableOnLayerID(id *int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetNillableOnPoInterfaceID(id *int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetOnDevice(d *Device) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetOnDeviceID(id int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetOnIPAddress(i *IPAddress) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetOnIPAddressID(id int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetOnLayer(n *NetInterfaceLayer) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetOnLayerID(id int) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetOnPoInterface(p *PortChannelInterface) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetOnPoInterfaceID(id int) *NetInterfaceUpdateOne
- type NetInterfaces
- type NetTopologies
- type NetTopology
- type NetTopologyClient
- func (c *NetTopologyClient) Create() *NetTopologyCreate
- func (c *NetTopologyClient) CreateBulk(builders ...*NetTopologyCreate) *NetTopologyCreateBulk
- func (c *NetTopologyClient) Delete() *NetTopologyDelete
- func (c *NetTopologyClient) DeleteOne(nt *NetTopology) *NetTopologyDeleteOne
- func (c *NetTopologyClient) DeleteOneID(id int) *NetTopologyDeleteOne
- func (c *NetTopologyClient) Get(ctx context.Context, id int) (*NetTopology, error)
- func (c *NetTopologyClient) GetX(ctx context.Context, id int) *NetTopology
- func (c *NetTopologyClient) Hooks() []Hook
- func (c *NetTopologyClient) Query() *NetTopologyQuery
- func (c *NetTopologyClient) QueryTopology(nt *NetTopology) *NetTopologyDeviceMapQuery
- func (c *NetTopologyClient) Update() *NetTopologyUpdate
- func (c *NetTopologyClient) UpdateOne(nt *NetTopology) *NetTopologyUpdateOne
- func (c *NetTopologyClient) UpdateOneID(id int) *NetTopologyUpdateOne
- func (c *NetTopologyClient) Use(hooks ...Hook)
- type NetTopologyCreate
- func (ntc *NetTopologyCreate) AddTopology(n ...*NetTopologyDeviceMap) *NetTopologyCreate
- func (ntc *NetTopologyCreate) AddTopologyIDs(ids ...int) *NetTopologyCreate
- func (ntc *NetTopologyCreate) Mutation() *NetTopologyMutation
- func (ntc *NetTopologyCreate) Save(ctx context.Context) (*NetTopology, error)
- func (ntc *NetTopologyCreate) SaveX(ctx context.Context) *NetTopology
- func (ntc *NetTopologyCreate) SetTopologyDescription(s string) *NetTopologyCreate
- func (ntc *NetTopologyCreate) SetTopologyName(s string) *NetTopologyCreate
- type NetTopologyCreateBulk
- type NetTopologyDelete
- type NetTopologyDeleteOne
- type NetTopologyDeviceMap
- func (ntdm *NetTopologyDeviceMap) QueryDevice() *DeviceQuery
- func (ntdm *NetTopologyDeviceMap) QueryEdge() *NetTopologyDeviceMapQuery
- func (ntdm *NetTopologyDeviceMap) QueryOnTopology() *NetTopologyQuery
- func (ntdm *NetTopologyDeviceMap) String() string
- func (ntdm *NetTopologyDeviceMap) Unwrap() *NetTopologyDeviceMap
- func (ntdm *NetTopologyDeviceMap) Update() *NetTopologyDeviceMapUpdateOne
- type NetTopologyDeviceMapClient
- func (c *NetTopologyDeviceMapClient) Create() *NetTopologyDeviceMapCreate
- func (c *NetTopologyDeviceMapClient) CreateBulk(builders ...*NetTopologyDeviceMapCreate) *NetTopologyDeviceMapCreateBulk
- func (c *NetTopologyDeviceMapClient) Delete() *NetTopologyDeviceMapDelete
- func (c *NetTopologyDeviceMapClient) DeleteOne(ntdm *NetTopologyDeviceMap) *NetTopologyDeviceMapDeleteOne
- func (c *NetTopologyDeviceMapClient) DeleteOneID(id int) *NetTopologyDeviceMapDeleteOne
- func (c *NetTopologyDeviceMapClient) Get(ctx context.Context, id int) (*NetTopologyDeviceMap, error)
- func (c *NetTopologyDeviceMapClient) GetX(ctx context.Context, id int) *NetTopologyDeviceMap
- func (c *NetTopologyDeviceMapClient) Hooks() []Hook
- func (c *NetTopologyDeviceMapClient) Query() *NetTopologyDeviceMapQuery
- func (c *NetTopologyDeviceMapClient) QueryDevice(ntdm *NetTopologyDeviceMap) *DeviceQuery
- func (c *NetTopologyDeviceMapClient) QueryEdge(ntdm *NetTopologyDeviceMap) *NetTopologyDeviceMapQuery
- func (c *NetTopologyDeviceMapClient) QueryOnTopology(ntdm *NetTopologyDeviceMap) *NetTopologyQuery
- func (c *NetTopologyDeviceMapClient) Update() *NetTopologyDeviceMapUpdate
- func (c *NetTopologyDeviceMapClient) UpdateOne(ntdm *NetTopologyDeviceMap) *NetTopologyDeviceMapUpdateOne
- func (c *NetTopologyDeviceMapClient) UpdateOneID(id int) *NetTopologyDeviceMapUpdateOne
- func (c *NetTopologyDeviceMapClient) Use(hooks ...Hook)
- type NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) AddEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) AddEdgeIDs(ids ...int) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) Mutation() *NetTopologyDeviceMapMutation
- func (ntdmc *NetTopologyDeviceMapCreate) Save(ctx context.Context) (*NetTopologyDeviceMap, error)
- func (ntdmc *NetTopologyDeviceMapCreate) SaveX(ctx context.Context) *NetTopologyDeviceMap
- func (ntdmc *NetTopologyDeviceMapCreate) SetDevice(d *Device) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) SetDeviceID(id int) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) SetNillableDeviceID(id *int) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) SetNillableOnTopologyID(id *int) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) SetNillablePositionX(i *int) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) SetNillablePositionY(i *int) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) SetOnTopology(n *NetTopology) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) SetOnTopologyID(id int) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) SetPositionX(i int) *NetTopologyDeviceMapCreate
- func (ntdmc *NetTopologyDeviceMapCreate) SetPositionY(i int) *NetTopologyDeviceMapCreate
- type NetTopologyDeviceMapCreateBulk
- type NetTopologyDeviceMapDelete
- type NetTopologyDeviceMapDeleteOne
- type NetTopologyDeviceMapEdges
- type NetTopologyDeviceMapGroupBy
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Aggregate(fns ...AggregateFunc) *NetTopologyDeviceMapGroupBy
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ntdmgb *NetTopologyDeviceMapGroupBy) BoolX(ctx context.Context) bool
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ntdmgb *NetTopologyDeviceMapGroupBy) BoolsX(ctx context.Context) []bool
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Float64X(ctx context.Context) float64
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Float64sX(ctx context.Context) []float64
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ntdmgb *NetTopologyDeviceMapGroupBy) IntX(ctx context.Context) int
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ntdmgb *NetTopologyDeviceMapGroupBy) IntsX(ctx context.Context) []int
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ntdmgb *NetTopologyDeviceMapGroupBy) ScanX(ctx context.Context, v interface{})
- func (ntdmgb *NetTopologyDeviceMapGroupBy) String(ctx context.Context) (_ string, err error)
- func (ntdmgb *NetTopologyDeviceMapGroupBy) StringX(ctx context.Context) string
- func (ntdmgb *NetTopologyDeviceMapGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ntdmgb *NetTopologyDeviceMapGroupBy) StringsX(ctx context.Context) []string
- type NetTopologyDeviceMapMutation
- func (m *NetTopologyDeviceMapMutation) AddEdgeIDs(ids ...int)
- func (m *NetTopologyDeviceMapMutation) AddField(name string, value ent.Value) error
- func (m *NetTopologyDeviceMapMutation) AddPositionX(i int)
- func (m *NetTopologyDeviceMapMutation) AddPositionY(i int)
- func (m *NetTopologyDeviceMapMutation) AddedEdges() []string
- func (m *NetTopologyDeviceMapMutation) AddedField(name string) (ent.Value, bool)
- func (m *NetTopologyDeviceMapMutation) AddedFields() []string
- func (m *NetTopologyDeviceMapMutation) AddedIDs(name string) []ent.Value
- func (m *NetTopologyDeviceMapMutation) AddedPositionX() (r int, exists bool)
- func (m *NetTopologyDeviceMapMutation) AddedPositionY() (r int, exists bool)
- func (m *NetTopologyDeviceMapMutation) ClearDevice()
- func (m *NetTopologyDeviceMapMutation) ClearEdge(name string) error
- func (m *NetTopologyDeviceMapMutation) ClearEdgeEdge()
- func (m *NetTopologyDeviceMapMutation) ClearField(name string) error
- func (m *NetTopologyDeviceMapMutation) ClearOnTopology()
- func (m *NetTopologyDeviceMapMutation) ClearedEdges() []string
- func (m *NetTopologyDeviceMapMutation) ClearedFields() []string
- func (m NetTopologyDeviceMapMutation) Client() *Client
- func (m *NetTopologyDeviceMapMutation) DeviceCleared() bool
- func (m *NetTopologyDeviceMapMutation) DeviceID() (id int, exists bool)
- func (m *NetTopologyDeviceMapMutation) DeviceIDs() (ids []int)
- func (m *NetTopologyDeviceMapMutation) EdgeCleared(name string) bool
- func (m *NetTopologyDeviceMapMutation) EdgeEdgeCleared() bool
- func (m *NetTopologyDeviceMapMutation) EdgeIDs() (ids []int)
- func (m *NetTopologyDeviceMapMutation) Field(name string) (ent.Value, bool)
- func (m *NetTopologyDeviceMapMutation) FieldCleared(name string) bool
- func (m *NetTopologyDeviceMapMutation) Fields() []string
- func (m *NetTopologyDeviceMapMutation) ID() (id int, exists bool)
- func (m *NetTopologyDeviceMapMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NetTopologyDeviceMapMutation) OldPositionX(ctx context.Context) (v int, err error)
- func (m *NetTopologyDeviceMapMutation) OldPositionY(ctx context.Context) (v int, err error)
- func (m *NetTopologyDeviceMapMutation) OnTopologyCleared() bool
- func (m *NetTopologyDeviceMapMutation) OnTopologyID() (id int, exists bool)
- func (m *NetTopologyDeviceMapMutation) OnTopologyIDs() (ids []int)
- func (m *NetTopologyDeviceMapMutation) Op() Op
- func (m *NetTopologyDeviceMapMutation) PositionX() (r int, exists bool)
- func (m *NetTopologyDeviceMapMutation) PositionY() (r int, exists bool)
- func (m *NetTopologyDeviceMapMutation) RemoveEdgeIDs(ids ...int)
- func (m *NetTopologyDeviceMapMutation) RemovedEdgeIDs() (ids []int)
- func (m *NetTopologyDeviceMapMutation) RemovedEdges() []string
- func (m *NetTopologyDeviceMapMutation) RemovedIDs(name string) []ent.Value
- func (m *NetTopologyDeviceMapMutation) ResetDevice()
- func (m *NetTopologyDeviceMapMutation) ResetEdge(name string) error
- func (m *NetTopologyDeviceMapMutation) ResetEdgeEdge()
- func (m *NetTopologyDeviceMapMutation) ResetField(name string) error
- func (m *NetTopologyDeviceMapMutation) ResetOnTopology()
- func (m *NetTopologyDeviceMapMutation) ResetPositionX()
- func (m *NetTopologyDeviceMapMutation) ResetPositionY()
- func (m *NetTopologyDeviceMapMutation) SetDeviceID(id int)
- func (m *NetTopologyDeviceMapMutation) SetField(name string, value ent.Value) error
- func (m *NetTopologyDeviceMapMutation) SetOnTopologyID(id int)
- func (m *NetTopologyDeviceMapMutation) SetPositionX(i int)
- func (m *NetTopologyDeviceMapMutation) SetPositionY(i int)
- func (m NetTopologyDeviceMapMutation) Tx() (*Tx, error)
- func (m *NetTopologyDeviceMapMutation) Type() string
- type NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) All(ctx context.Context) ([]*NetTopologyDeviceMap, error)
- func (ntdmq *NetTopologyDeviceMapQuery) AllX(ctx context.Context) []*NetTopologyDeviceMap
- func (ntdmq *NetTopologyDeviceMapQuery) Clone() *NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) Count(ctx context.Context) (int, error)
- func (ntdmq *NetTopologyDeviceMapQuery) CountX(ctx context.Context) int
- func (ntdmq *NetTopologyDeviceMapQuery) Exist(ctx context.Context) (bool, error)
- func (ntdmq *NetTopologyDeviceMapQuery) ExistX(ctx context.Context) bool
- func (ntdmq *NetTopologyDeviceMapQuery) First(ctx context.Context) (*NetTopologyDeviceMap, error)
- func (ntdmq *NetTopologyDeviceMapQuery) FirstID(ctx context.Context) (id int, err error)
- func (ntdmq *NetTopologyDeviceMapQuery) FirstIDX(ctx context.Context) int
- func (ntdmq *NetTopologyDeviceMapQuery) FirstX(ctx context.Context) *NetTopologyDeviceMap
- func (ntdmq *NetTopologyDeviceMapQuery) GroupBy(field string, fields ...string) *NetTopologyDeviceMapGroupBy
- func (ntdmq *NetTopologyDeviceMapQuery) IDs(ctx context.Context) ([]int, error)
- func (ntdmq *NetTopologyDeviceMapQuery) IDsX(ctx context.Context) []int
- func (ntdmq *NetTopologyDeviceMapQuery) Limit(limit int) *NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) Offset(offset int) *NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) Only(ctx context.Context) (*NetTopologyDeviceMap, error)
- func (ntdmq *NetTopologyDeviceMapQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ntdmq *NetTopologyDeviceMapQuery) OnlyIDX(ctx context.Context) int
- func (ntdmq *NetTopologyDeviceMapQuery) OnlyX(ctx context.Context) *NetTopologyDeviceMap
- func (ntdmq *NetTopologyDeviceMapQuery) Order(o ...OrderFunc) *NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) QueryDevice() *DeviceQuery
- func (ntdmq *NetTopologyDeviceMapQuery) QueryEdge() *NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) QueryOnTopology() *NetTopologyQuery
- func (ntdmq *NetTopologyDeviceMapQuery) Select(field string, fields ...string) *NetTopologyDeviceMapSelect
- func (ntdmq *NetTopologyDeviceMapQuery) Unique(unique bool) *NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) Where(ps ...predicate.NetTopologyDeviceMap) *NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) WithDevice(opts ...func(*DeviceQuery)) *NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) WithEdge(opts ...func(*NetTopologyDeviceMapQuery)) *NetTopologyDeviceMapQuery
- func (ntdmq *NetTopologyDeviceMapQuery) WithOnTopology(opts ...func(*NetTopologyQuery)) *NetTopologyDeviceMapQuery
- type NetTopologyDeviceMapSelect
- func (ntdms *NetTopologyDeviceMapSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ntdms *NetTopologyDeviceMapSelect) BoolX(ctx context.Context) bool
- func (ntdms *NetTopologyDeviceMapSelect) Bools(ctx context.Context) ([]bool, error)
- func (ntdms *NetTopologyDeviceMapSelect) BoolsX(ctx context.Context) []bool
- func (ntdms *NetTopologyDeviceMapSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ntdms *NetTopologyDeviceMapSelect) Float64X(ctx context.Context) float64
- func (ntdms *NetTopologyDeviceMapSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ntdms *NetTopologyDeviceMapSelect) Float64sX(ctx context.Context) []float64
- func (ntdms *NetTopologyDeviceMapSelect) Int(ctx context.Context) (_ int, err error)
- func (ntdms *NetTopologyDeviceMapSelect) IntX(ctx context.Context) int
- func (ntdms *NetTopologyDeviceMapSelect) Ints(ctx context.Context) ([]int, error)
- func (ntdms *NetTopologyDeviceMapSelect) IntsX(ctx context.Context) []int
- func (ntdms *NetTopologyDeviceMapSelect) Scan(ctx context.Context, v interface{}) error
- func (ntdms *NetTopologyDeviceMapSelect) ScanX(ctx context.Context, v interface{})
- func (ntdms *NetTopologyDeviceMapSelect) String(ctx context.Context) (_ string, err error)
- func (ntdms *NetTopologyDeviceMapSelect) StringX(ctx context.Context) string
- func (ntdms *NetTopologyDeviceMapSelect) Strings(ctx context.Context) ([]string, error)
- func (ntdms *NetTopologyDeviceMapSelect) StringsX(ctx context.Context) []string
- type NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) AddEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) AddEdgeIDs(ids ...int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) AddPositionX(i int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) AddPositionY(i int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) ClearDevice() *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) ClearEdgeEdge() *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) ClearOnTopology() *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) Exec(ctx context.Context) error
- func (ntdmu *NetTopologyDeviceMapUpdate) ExecX(ctx context.Context)
- func (ntdmu *NetTopologyDeviceMapUpdate) Mutation() *NetTopologyDeviceMapMutation
- func (ntdmu *NetTopologyDeviceMapUpdate) RemoveEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) RemoveEdgeIDs(ids ...int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) Save(ctx context.Context) (int, error)
- func (ntdmu *NetTopologyDeviceMapUpdate) SaveX(ctx context.Context) int
- func (ntdmu *NetTopologyDeviceMapUpdate) SetDevice(d *Device) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) SetDeviceID(id int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) SetNillableDeviceID(id *int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) SetNillableOnTopologyID(id *int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) SetNillablePositionX(i *int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) SetNillablePositionY(i *int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) SetOnTopology(n *NetTopology) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) SetOnTopologyID(id int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) SetPositionX(i int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) SetPositionY(i int) *NetTopologyDeviceMapUpdate
- func (ntdmu *NetTopologyDeviceMapUpdate) Where(ps ...predicate.NetTopologyDeviceMap) *NetTopologyDeviceMapUpdate
- type NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) AddEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) AddEdgeIDs(ids ...int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) AddPositionX(i int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) AddPositionY(i int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) ClearDevice() *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) ClearEdgeEdge() *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) ClearOnTopology() *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) Exec(ctx context.Context) error
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) ExecX(ctx context.Context)
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) Mutation() *NetTopologyDeviceMapMutation
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) RemoveEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) RemoveEdgeIDs(ids ...int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) Save(ctx context.Context) (*NetTopologyDeviceMap, error)
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SaveX(ctx context.Context) *NetTopologyDeviceMap
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) Select(field string, fields ...string) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetDevice(d *Device) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetDeviceID(id int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetNillableDeviceID(id *int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetNillableOnTopologyID(id *int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetNillablePositionX(i *int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetNillablePositionY(i *int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetOnTopology(n *NetTopology) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetOnTopologyID(id int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetPositionX(i int) *NetTopologyDeviceMapUpdateOne
- func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetPositionY(i int) *NetTopologyDeviceMapUpdateOne
- type NetTopologyDeviceMaps
- type NetTopologyEdges
- type NetTopologyGroupBy
- func (ntgb *NetTopologyGroupBy) Aggregate(fns ...AggregateFunc) *NetTopologyGroupBy
- func (ntgb *NetTopologyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ntgb *NetTopologyGroupBy) BoolX(ctx context.Context) bool
- func (ntgb *NetTopologyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ntgb *NetTopologyGroupBy) BoolsX(ctx context.Context) []bool
- func (ntgb *NetTopologyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ntgb *NetTopologyGroupBy) Float64X(ctx context.Context) float64
- func (ntgb *NetTopologyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ntgb *NetTopologyGroupBy) Float64sX(ctx context.Context) []float64
- func (ntgb *NetTopologyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ntgb *NetTopologyGroupBy) IntX(ctx context.Context) int
- func (ntgb *NetTopologyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ntgb *NetTopologyGroupBy) IntsX(ctx context.Context) []int
- func (ntgb *NetTopologyGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ntgb *NetTopologyGroupBy) ScanX(ctx context.Context, v interface{})
- func (ntgb *NetTopologyGroupBy) String(ctx context.Context) (_ string, err error)
- func (ntgb *NetTopologyGroupBy) StringX(ctx context.Context) string
- func (ntgb *NetTopologyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ntgb *NetTopologyGroupBy) StringsX(ctx context.Context) []string
- type NetTopologyMutation
- func (m *NetTopologyMutation) AddField(name string, value ent.Value) error
- func (m *NetTopologyMutation) AddTopologyIDs(ids ...int)
- func (m *NetTopologyMutation) AddedEdges() []string
- func (m *NetTopologyMutation) AddedField(name string) (ent.Value, bool)
- func (m *NetTopologyMutation) AddedFields() []string
- func (m *NetTopologyMutation) AddedIDs(name string) []ent.Value
- func (m *NetTopologyMutation) ClearEdge(name string) error
- func (m *NetTopologyMutation) ClearField(name string) error
- func (m *NetTopologyMutation) ClearTopology()
- func (m *NetTopologyMutation) ClearedEdges() []string
- func (m *NetTopologyMutation) ClearedFields() []string
- func (m NetTopologyMutation) Client() *Client
- func (m *NetTopologyMutation) EdgeCleared(name string) bool
- func (m *NetTopologyMutation) Field(name string) (ent.Value, bool)
- func (m *NetTopologyMutation) FieldCleared(name string) bool
- func (m *NetTopologyMutation) Fields() []string
- func (m *NetTopologyMutation) ID() (id int, exists bool)
- func (m *NetTopologyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NetTopologyMutation) OldTopologyDescription(ctx context.Context) (v string, err error)
- func (m *NetTopologyMutation) OldTopologyName(ctx context.Context) (v string, err error)
- func (m *NetTopologyMutation) Op() Op
- func (m *NetTopologyMutation) RemoveTopologyIDs(ids ...int)
- func (m *NetTopologyMutation) RemovedEdges() []string
- func (m *NetTopologyMutation) RemovedIDs(name string) []ent.Value
- func (m *NetTopologyMutation) RemovedTopologyIDs() (ids []int)
- func (m *NetTopologyMutation) ResetEdge(name string) error
- func (m *NetTopologyMutation) ResetField(name string) error
- func (m *NetTopologyMutation) ResetTopology()
- func (m *NetTopologyMutation) ResetTopologyDescription()
- func (m *NetTopologyMutation) ResetTopologyName()
- func (m *NetTopologyMutation) SetField(name string, value ent.Value) error
- func (m *NetTopologyMutation) SetTopologyDescription(s string)
- func (m *NetTopologyMutation) SetTopologyName(s string)
- func (m *NetTopologyMutation) TopologyCleared() bool
- func (m *NetTopologyMutation) TopologyDescription() (r string, exists bool)
- func (m *NetTopologyMutation) TopologyIDs() (ids []int)
- func (m *NetTopologyMutation) TopologyName() (r string, exists bool)
- func (m NetTopologyMutation) Tx() (*Tx, error)
- func (m *NetTopologyMutation) Type() string
- type NetTopologyQuery
- func (ntq *NetTopologyQuery) All(ctx context.Context) ([]*NetTopology, error)
- func (ntq *NetTopologyQuery) AllX(ctx context.Context) []*NetTopology
- func (ntq *NetTopologyQuery) Clone() *NetTopologyQuery
- func (ntq *NetTopologyQuery) Count(ctx context.Context) (int, error)
- func (ntq *NetTopologyQuery) CountX(ctx context.Context) int
- func (ntq *NetTopologyQuery) Exist(ctx context.Context) (bool, error)
- func (ntq *NetTopologyQuery) ExistX(ctx context.Context) bool
- func (ntq *NetTopologyQuery) First(ctx context.Context) (*NetTopology, error)
- func (ntq *NetTopologyQuery) FirstID(ctx context.Context) (id int, err error)
- func (ntq *NetTopologyQuery) FirstIDX(ctx context.Context) int
- func (ntq *NetTopologyQuery) FirstX(ctx context.Context) *NetTopology
- func (ntq *NetTopologyQuery) GroupBy(field string, fields ...string) *NetTopologyGroupBy
- func (ntq *NetTopologyQuery) IDs(ctx context.Context) ([]int, error)
- func (ntq *NetTopologyQuery) IDsX(ctx context.Context) []int
- func (ntq *NetTopologyQuery) Limit(limit int) *NetTopologyQuery
- func (ntq *NetTopologyQuery) Offset(offset int) *NetTopologyQuery
- func (ntq *NetTopologyQuery) Only(ctx context.Context) (*NetTopology, error)
- func (ntq *NetTopologyQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ntq *NetTopologyQuery) OnlyIDX(ctx context.Context) int
- func (ntq *NetTopologyQuery) OnlyX(ctx context.Context) *NetTopology
- func (ntq *NetTopologyQuery) Order(o ...OrderFunc) *NetTopologyQuery
- func (ntq *NetTopologyQuery) QueryTopology() *NetTopologyDeviceMapQuery
- func (ntq *NetTopologyQuery) Select(field string, fields ...string) *NetTopologySelect
- func (ntq *NetTopologyQuery) Unique(unique bool) *NetTopologyQuery
- func (ntq *NetTopologyQuery) Where(ps ...predicate.NetTopology) *NetTopologyQuery
- func (ntq *NetTopologyQuery) WithTopology(opts ...func(*NetTopologyDeviceMapQuery)) *NetTopologyQuery
- type NetTopologySelect
- func (nts *NetTopologySelect) Bool(ctx context.Context) (_ bool, err error)
- func (nts *NetTopologySelect) BoolX(ctx context.Context) bool
- func (nts *NetTopologySelect) Bools(ctx context.Context) ([]bool, error)
- func (nts *NetTopologySelect) BoolsX(ctx context.Context) []bool
- func (nts *NetTopologySelect) Float64(ctx context.Context) (_ float64, err error)
- func (nts *NetTopologySelect) Float64X(ctx context.Context) float64
- func (nts *NetTopologySelect) Float64s(ctx context.Context) ([]float64, error)
- func (nts *NetTopologySelect) Float64sX(ctx context.Context) []float64
- func (nts *NetTopologySelect) Int(ctx context.Context) (_ int, err error)
- func (nts *NetTopologySelect) IntX(ctx context.Context) int
- func (nts *NetTopologySelect) Ints(ctx context.Context) ([]int, error)
- func (nts *NetTopologySelect) IntsX(ctx context.Context) []int
- func (nts *NetTopologySelect) Scan(ctx context.Context, v interface{}) error
- func (nts *NetTopologySelect) ScanX(ctx context.Context, v interface{})
- func (nts *NetTopologySelect) String(ctx context.Context) (_ string, err error)
- func (nts *NetTopologySelect) StringX(ctx context.Context) string
- func (nts *NetTopologySelect) Strings(ctx context.Context) ([]string, error)
- func (nts *NetTopologySelect) StringsX(ctx context.Context) []string
- type NetTopologyUpdate
- func (ntu *NetTopologyUpdate) AddTopology(n ...*NetTopologyDeviceMap) *NetTopologyUpdate
- func (ntu *NetTopologyUpdate) AddTopologyIDs(ids ...int) *NetTopologyUpdate
- func (ntu *NetTopologyUpdate) ClearTopology() *NetTopologyUpdate
- func (ntu *NetTopologyUpdate) Exec(ctx context.Context) error
- func (ntu *NetTopologyUpdate) ExecX(ctx context.Context)
- func (ntu *NetTopologyUpdate) Mutation() *NetTopologyMutation
- func (ntu *NetTopologyUpdate) RemoveTopology(n ...*NetTopologyDeviceMap) *NetTopologyUpdate
- func (ntu *NetTopologyUpdate) RemoveTopologyIDs(ids ...int) *NetTopologyUpdate
- func (ntu *NetTopologyUpdate) Save(ctx context.Context) (int, error)
- func (ntu *NetTopologyUpdate) SaveX(ctx context.Context) int
- func (ntu *NetTopologyUpdate) SetTopologyDescription(s string) *NetTopologyUpdate
- func (ntu *NetTopologyUpdate) SetTopologyName(s string) *NetTopologyUpdate
- func (ntu *NetTopologyUpdate) Where(ps ...predicate.NetTopology) *NetTopologyUpdate
- type NetTopologyUpdateOne
- func (ntuo *NetTopologyUpdateOne) AddTopology(n ...*NetTopologyDeviceMap) *NetTopologyUpdateOne
- func (ntuo *NetTopologyUpdateOne) AddTopologyIDs(ids ...int) *NetTopologyUpdateOne
- func (ntuo *NetTopologyUpdateOne) ClearTopology() *NetTopologyUpdateOne
- func (ntuo *NetTopologyUpdateOne) Exec(ctx context.Context) error
- func (ntuo *NetTopologyUpdateOne) ExecX(ctx context.Context)
- func (ntuo *NetTopologyUpdateOne) Mutation() *NetTopologyMutation
- func (ntuo *NetTopologyUpdateOne) RemoveTopology(n ...*NetTopologyDeviceMap) *NetTopologyUpdateOne
- func (ntuo *NetTopologyUpdateOne) RemoveTopologyIDs(ids ...int) *NetTopologyUpdateOne
- func (ntuo *NetTopologyUpdateOne) Save(ctx context.Context) (*NetTopology, error)
- func (ntuo *NetTopologyUpdateOne) SaveX(ctx context.Context) *NetTopology
- func (ntuo *NetTopologyUpdateOne) Select(field string, fields ...string) *NetTopologyUpdateOne
- func (ntuo *NetTopologyUpdateOne) SetTopologyDescription(s string) *NetTopologyUpdateOne
- func (ntuo *NetTopologyUpdateOne) SetTopologyName(s string) *NetTopologyUpdateOne
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type PortChannelInterface
- func (pci *PortChannelInterface) QueryHaveVlans() *VlanQuery
- func (pci *PortChannelInterface) QueryInterfaces() *NetInterfaceQuery
- func (pci *PortChannelInterface) QueryMode() *NetInterfaceModeQuery
- func (pci *PortChannelInterface) QueryNativeOnVlan() *VlanQuery
- func (pci *PortChannelInterface) QueryOnDevice() *DeviceQuery
- func (pci *PortChannelInterface) QueryOnIPAddress() *IPAddressQuery
- func (pci *PortChannelInterface) QueryOnLayer() *NetInterfaceLayerQuery
- func (pci *PortChannelInterface) String() string
- func (pci *PortChannelInterface) Unwrap() *PortChannelInterface
- func (pci *PortChannelInterface) Update() *PortChannelInterfaceUpdateOne
- type PortChannelInterfaceClient
- func (c *PortChannelInterfaceClient) Create() *PortChannelInterfaceCreate
- func (c *PortChannelInterfaceClient) CreateBulk(builders ...*PortChannelInterfaceCreate) *PortChannelInterfaceCreateBulk
- func (c *PortChannelInterfaceClient) Delete() *PortChannelInterfaceDelete
- func (c *PortChannelInterfaceClient) DeleteOne(pci *PortChannelInterface) *PortChannelInterfaceDeleteOne
- func (c *PortChannelInterfaceClient) DeleteOneID(id int) *PortChannelInterfaceDeleteOne
- func (c *PortChannelInterfaceClient) Get(ctx context.Context, id int) (*PortChannelInterface, error)
- func (c *PortChannelInterfaceClient) GetX(ctx context.Context, id int) *PortChannelInterface
- func (c *PortChannelInterfaceClient) Hooks() []Hook
- func (c *PortChannelInterfaceClient) Query() *PortChannelInterfaceQuery
- func (c *PortChannelInterfaceClient) QueryHaveVlans(pci *PortChannelInterface) *VlanQuery
- func (c *PortChannelInterfaceClient) QueryInterfaces(pci *PortChannelInterface) *NetInterfaceQuery
- func (c *PortChannelInterfaceClient) QueryMode(pci *PortChannelInterface) *NetInterfaceModeQuery
- func (c *PortChannelInterfaceClient) QueryNativeOnVlan(pci *PortChannelInterface) *VlanQuery
- func (c *PortChannelInterfaceClient) QueryOnDevice(pci *PortChannelInterface) *DeviceQuery
- func (c *PortChannelInterfaceClient) QueryOnIPAddress(pci *PortChannelInterface) *IPAddressQuery
- func (c *PortChannelInterfaceClient) QueryOnLayer(pci *PortChannelInterface) *NetInterfaceLayerQuery
- func (c *PortChannelInterfaceClient) Update() *PortChannelInterfaceUpdate
- func (c *PortChannelInterfaceClient) UpdateOne(pci *PortChannelInterface) *PortChannelInterfaceUpdateOne
- func (c *PortChannelInterfaceClient) UpdateOneID(id int) *PortChannelInterfaceUpdateOne
- func (c *PortChannelInterfaceClient) Use(hooks ...Hook)
- type PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) AddHaveVlanIDs(ids ...int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) AddHaveVlans(v ...*Vlan) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) AddInterfaceIDs(ids ...int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) AddInterfaces(n ...*NetInterface) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) Mutation() *PortChannelInterfaceMutation
- func (pcic *PortChannelInterfaceCreate) Save(ctx context.Context) (*PortChannelInterface, error)
- func (pcic *PortChannelInterfaceCreate) SaveX(ctx context.Context) *PortChannelInterface
- func (pcic *PortChannelInterfaceCreate) SetMode(n *NetInterfaceMode) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetModeID(id int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetNativeOnVlan(v *Vlan) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetNativeOnVlanID(id int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetNillableModeID(id *int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetNillableNativeOnVlanID(id *int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetNillableOnDeviceID(id *int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetNillableOnIPAddressID(id *int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetNillableOnLayerID(id *int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetNillablePoInterfaceShutdown(b *bool) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetOnDevice(d *Device) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetOnDeviceID(id int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetOnIPAddress(i *IPAddress) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetOnIPAddressID(id int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetOnLayer(n *NetInterfaceLayer) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetOnLayerID(id int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetPoInterfaceID(i int) *PortChannelInterfaceCreate
- func (pcic *PortChannelInterfaceCreate) SetPoInterfaceShutdown(b bool) *PortChannelInterfaceCreate
- type PortChannelInterfaceCreateBulk
- type PortChannelInterfaceDelete
- type PortChannelInterfaceDeleteOne
- type PortChannelInterfaceEdges
- func (e PortChannelInterfaceEdges) HaveVlansOrErr() ([]*Vlan, error)
- func (e PortChannelInterfaceEdges) InterfacesOrErr() ([]*NetInterface, error)
- func (e PortChannelInterfaceEdges) ModeOrErr() (*NetInterfaceMode, error)
- func (e PortChannelInterfaceEdges) NativeOnVlanOrErr() (*Vlan, error)
- func (e PortChannelInterfaceEdges) OnDeviceOrErr() (*Device, error)
- func (e PortChannelInterfaceEdges) OnIPAddressOrErr() (*IPAddress, error)
- func (e PortChannelInterfaceEdges) OnLayerOrErr() (*NetInterfaceLayer, error)
- type PortChannelInterfaceGroupBy
- func (pcigb *PortChannelInterfaceGroupBy) Aggregate(fns ...AggregateFunc) *PortChannelInterfaceGroupBy
- func (pcigb *PortChannelInterfaceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (pcigb *PortChannelInterfaceGroupBy) BoolX(ctx context.Context) bool
- func (pcigb *PortChannelInterfaceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (pcigb *PortChannelInterfaceGroupBy) BoolsX(ctx context.Context) []bool
- func (pcigb *PortChannelInterfaceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (pcigb *PortChannelInterfaceGroupBy) Float64X(ctx context.Context) float64
- func (pcigb *PortChannelInterfaceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (pcigb *PortChannelInterfaceGroupBy) Float64sX(ctx context.Context) []float64
- func (pcigb *PortChannelInterfaceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (pcigb *PortChannelInterfaceGroupBy) IntX(ctx context.Context) int
- func (pcigb *PortChannelInterfaceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (pcigb *PortChannelInterfaceGroupBy) IntsX(ctx context.Context) []int
- func (pcigb *PortChannelInterfaceGroupBy) Scan(ctx context.Context, v interface{}) error
- func (pcigb *PortChannelInterfaceGroupBy) ScanX(ctx context.Context, v interface{})
- func (pcigb *PortChannelInterfaceGroupBy) String(ctx context.Context) (_ string, err error)
- func (pcigb *PortChannelInterfaceGroupBy) StringX(ctx context.Context) string
- func (pcigb *PortChannelInterfaceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (pcigb *PortChannelInterfaceGroupBy) StringsX(ctx context.Context) []string
- type PortChannelInterfaceMutation
- func (m *PortChannelInterfaceMutation) AddField(name string, value ent.Value) error
- func (m *PortChannelInterfaceMutation) AddHaveVlanIDs(ids ...int)
- func (m *PortChannelInterfaceMutation) AddInterfaceIDs(ids ...int)
- func (m *PortChannelInterfaceMutation) AddPoInterfaceID(i int)
- func (m *PortChannelInterfaceMutation) AddedEdges() []string
- func (m *PortChannelInterfaceMutation) AddedField(name string) (ent.Value, bool)
- func (m *PortChannelInterfaceMutation) AddedFields() []string
- func (m *PortChannelInterfaceMutation) AddedIDs(name string) []ent.Value
- func (m *PortChannelInterfaceMutation) AddedPoInterfaceID() (r int, exists bool)
- func (m *PortChannelInterfaceMutation) ClearEdge(name string) error
- func (m *PortChannelInterfaceMutation) ClearField(name string) error
- func (m *PortChannelInterfaceMutation) ClearHaveVlans()
- func (m *PortChannelInterfaceMutation) ClearInterfaces()
- func (m *PortChannelInterfaceMutation) ClearMode()
- func (m *PortChannelInterfaceMutation) ClearNativeOnVlan()
- func (m *PortChannelInterfaceMutation) ClearOnDevice()
- func (m *PortChannelInterfaceMutation) ClearOnIPAddress()
- func (m *PortChannelInterfaceMutation) ClearOnLayer()
- func (m *PortChannelInterfaceMutation) ClearedEdges() []string
- func (m *PortChannelInterfaceMutation) ClearedFields() []string
- func (m PortChannelInterfaceMutation) Client() *Client
- func (m *PortChannelInterfaceMutation) EdgeCleared(name string) bool
- func (m *PortChannelInterfaceMutation) Field(name string) (ent.Value, bool)
- func (m *PortChannelInterfaceMutation) FieldCleared(name string) bool
- func (m *PortChannelInterfaceMutation) Fields() []string
- func (m *PortChannelInterfaceMutation) HaveVlansCleared() bool
- func (m *PortChannelInterfaceMutation) HaveVlansIDs() (ids []int)
- func (m *PortChannelInterfaceMutation) ID() (id int, exists bool)
- func (m *PortChannelInterfaceMutation) InterfacesCleared() bool
- func (m *PortChannelInterfaceMutation) InterfacesIDs() (ids []int)
- func (m *PortChannelInterfaceMutation) ModeCleared() bool
- func (m *PortChannelInterfaceMutation) ModeID() (id int, exists bool)
- func (m *PortChannelInterfaceMutation) ModeIDs() (ids []int)
- func (m *PortChannelInterfaceMutation) NativeOnVlanCleared() bool
- func (m *PortChannelInterfaceMutation) NativeOnVlanID() (id int, exists bool)
- func (m *PortChannelInterfaceMutation) NativeOnVlanIDs() (ids []int)
- func (m *PortChannelInterfaceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PortChannelInterfaceMutation) OldPoInterfaceID(ctx context.Context) (v int, err error)
- func (m *PortChannelInterfaceMutation) OldPoInterfaceShutdown(ctx context.Context) (v bool, err error)
- func (m *PortChannelInterfaceMutation) OnDeviceCleared() bool
- func (m *PortChannelInterfaceMutation) OnDeviceID() (id int, exists bool)
- func (m *PortChannelInterfaceMutation) OnDeviceIDs() (ids []int)
- func (m *PortChannelInterfaceMutation) OnIPAddressCleared() bool
- func (m *PortChannelInterfaceMutation) OnIPAddressID() (id int, exists bool)
- func (m *PortChannelInterfaceMutation) OnIPAddressIDs() (ids []int)
- func (m *PortChannelInterfaceMutation) OnLayerCleared() bool
- func (m *PortChannelInterfaceMutation) OnLayerID() (id int, exists bool)
- func (m *PortChannelInterfaceMutation) OnLayerIDs() (ids []int)
- func (m *PortChannelInterfaceMutation) Op() Op
- func (m *PortChannelInterfaceMutation) PoInterfaceID() (r int, exists bool)
- func (m *PortChannelInterfaceMutation) PoInterfaceShutdown() (r bool, exists bool)
- func (m *PortChannelInterfaceMutation) RemoveHaveVlanIDs(ids ...int)
- func (m *PortChannelInterfaceMutation) RemoveInterfaceIDs(ids ...int)
- func (m *PortChannelInterfaceMutation) RemovedEdges() []string
- func (m *PortChannelInterfaceMutation) RemovedHaveVlansIDs() (ids []int)
- func (m *PortChannelInterfaceMutation) RemovedIDs(name string) []ent.Value
- func (m *PortChannelInterfaceMutation) RemovedInterfacesIDs() (ids []int)
- func (m *PortChannelInterfaceMutation) ResetEdge(name string) error
- func (m *PortChannelInterfaceMutation) ResetField(name string) error
- func (m *PortChannelInterfaceMutation) ResetHaveVlans()
- func (m *PortChannelInterfaceMutation) ResetInterfaces()
- func (m *PortChannelInterfaceMutation) ResetMode()
- func (m *PortChannelInterfaceMutation) ResetNativeOnVlan()
- func (m *PortChannelInterfaceMutation) ResetOnDevice()
- func (m *PortChannelInterfaceMutation) ResetOnIPAddress()
- func (m *PortChannelInterfaceMutation) ResetOnLayer()
- func (m *PortChannelInterfaceMutation) ResetPoInterfaceID()
- func (m *PortChannelInterfaceMutation) ResetPoInterfaceShutdown()
- func (m *PortChannelInterfaceMutation) SetField(name string, value ent.Value) error
- func (m *PortChannelInterfaceMutation) SetModeID(id int)
- func (m *PortChannelInterfaceMutation) SetNativeOnVlanID(id int)
- func (m *PortChannelInterfaceMutation) SetOnDeviceID(id int)
- func (m *PortChannelInterfaceMutation) SetOnIPAddressID(id int)
- func (m *PortChannelInterfaceMutation) SetOnLayerID(id int)
- func (m *PortChannelInterfaceMutation) SetPoInterfaceID(i int)
- func (m *PortChannelInterfaceMutation) SetPoInterfaceShutdown(b bool)
- func (m PortChannelInterfaceMutation) Tx() (*Tx, error)
- func (m *PortChannelInterfaceMutation) Type() string
- type PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) All(ctx context.Context) ([]*PortChannelInterface, error)
- func (pciq *PortChannelInterfaceQuery) AllX(ctx context.Context) []*PortChannelInterface
- func (pciq *PortChannelInterfaceQuery) Clone() *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) Count(ctx context.Context) (int, error)
- func (pciq *PortChannelInterfaceQuery) CountX(ctx context.Context) int
- func (pciq *PortChannelInterfaceQuery) Exist(ctx context.Context) (bool, error)
- func (pciq *PortChannelInterfaceQuery) ExistX(ctx context.Context) bool
- func (pciq *PortChannelInterfaceQuery) First(ctx context.Context) (*PortChannelInterface, error)
- func (pciq *PortChannelInterfaceQuery) FirstID(ctx context.Context) (id int, err error)
- func (pciq *PortChannelInterfaceQuery) FirstIDX(ctx context.Context) int
- func (pciq *PortChannelInterfaceQuery) FirstX(ctx context.Context) *PortChannelInterface
- func (pciq *PortChannelInterfaceQuery) GroupBy(field string, fields ...string) *PortChannelInterfaceGroupBy
- func (pciq *PortChannelInterfaceQuery) IDs(ctx context.Context) ([]int, error)
- func (pciq *PortChannelInterfaceQuery) IDsX(ctx context.Context) []int
- func (pciq *PortChannelInterfaceQuery) Limit(limit int) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) Offset(offset int) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) Only(ctx context.Context) (*PortChannelInterface, error)
- func (pciq *PortChannelInterfaceQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pciq *PortChannelInterfaceQuery) OnlyIDX(ctx context.Context) int
- func (pciq *PortChannelInterfaceQuery) OnlyX(ctx context.Context) *PortChannelInterface
- func (pciq *PortChannelInterfaceQuery) Order(o ...OrderFunc) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) QueryHaveVlans() *VlanQuery
- func (pciq *PortChannelInterfaceQuery) QueryInterfaces() *NetInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) QueryMode() *NetInterfaceModeQuery
- func (pciq *PortChannelInterfaceQuery) QueryNativeOnVlan() *VlanQuery
- func (pciq *PortChannelInterfaceQuery) QueryOnDevice() *DeviceQuery
- func (pciq *PortChannelInterfaceQuery) QueryOnIPAddress() *IPAddressQuery
- func (pciq *PortChannelInterfaceQuery) QueryOnLayer() *NetInterfaceLayerQuery
- func (pciq *PortChannelInterfaceQuery) Select(field string, fields ...string) *PortChannelInterfaceSelect
- func (pciq *PortChannelInterfaceQuery) Unique(unique bool) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) Where(ps ...predicate.PortChannelInterface) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) WithHaveVlans(opts ...func(*VlanQuery)) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) WithInterfaces(opts ...func(*NetInterfaceQuery)) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) WithMode(opts ...func(*NetInterfaceModeQuery)) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) WithNativeOnVlan(opts ...func(*VlanQuery)) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) WithOnDevice(opts ...func(*DeviceQuery)) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) WithOnIPAddress(opts ...func(*IPAddressQuery)) *PortChannelInterfaceQuery
- func (pciq *PortChannelInterfaceQuery) WithOnLayer(opts ...func(*NetInterfaceLayerQuery)) *PortChannelInterfaceQuery
- type PortChannelInterfaceSelect
- func (pcis *PortChannelInterfaceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (pcis *PortChannelInterfaceSelect) BoolX(ctx context.Context) bool
- func (pcis *PortChannelInterfaceSelect) Bools(ctx context.Context) ([]bool, error)
- func (pcis *PortChannelInterfaceSelect) BoolsX(ctx context.Context) []bool
- func (pcis *PortChannelInterfaceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (pcis *PortChannelInterfaceSelect) Float64X(ctx context.Context) float64
- func (pcis *PortChannelInterfaceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (pcis *PortChannelInterfaceSelect) Float64sX(ctx context.Context) []float64
- func (pcis *PortChannelInterfaceSelect) Int(ctx context.Context) (_ int, err error)
- func (pcis *PortChannelInterfaceSelect) IntX(ctx context.Context) int
- func (pcis *PortChannelInterfaceSelect) Ints(ctx context.Context) ([]int, error)
- func (pcis *PortChannelInterfaceSelect) IntsX(ctx context.Context) []int
- func (pcis *PortChannelInterfaceSelect) Scan(ctx context.Context, v interface{}) error
- func (pcis *PortChannelInterfaceSelect) ScanX(ctx context.Context, v interface{})
- func (pcis *PortChannelInterfaceSelect) String(ctx context.Context) (_ string, err error)
- func (pcis *PortChannelInterfaceSelect) StringX(ctx context.Context) string
- func (pcis *PortChannelInterfaceSelect) Strings(ctx context.Context) ([]string, error)
- func (pcis *PortChannelInterfaceSelect) StringsX(ctx context.Context) []string
- type PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) AddHaveVlanIDs(ids ...int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) AddHaveVlans(v ...*Vlan) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) AddInterfaceIDs(ids ...int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) AddInterfaces(n ...*NetInterface) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) AddPoInterfaceID(i int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) ClearHaveVlans() *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) ClearInterfaces() *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) ClearMode() *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) ClearNativeOnVlan() *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) ClearOnDevice() *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) ClearOnIPAddress() *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) ClearOnLayer() *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) Exec(ctx context.Context) error
- func (pciu *PortChannelInterfaceUpdate) ExecX(ctx context.Context)
- func (pciu *PortChannelInterfaceUpdate) Mutation() *PortChannelInterfaceMutation
- func (pciu *PortChannelInterfaceUpdate) RemoveHaveVlanIDs(ids ...int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) RemoveHaveVlans(v ...*Vlan) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) RemoveInterfaceIDs(ids ...int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) RemoveInterfaces(n ...*NetInterface) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) Save(ctx context.Context) (int, error)
- func (pciu *PortChannelInterfaceUpdate) SaveX(ctx context.Context) int
- func (pciu *PortChannelInterfaceUpdate) SetMode(n *NetInterfaceMode) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetModeID(id int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetNativeOnVlan(v *Vlan) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetNativeOnVlanID(id int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetNillableModeID(id *int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetNillableNativeOnVlanID(id *int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetNillableOnDeviceID(id *int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetNillableOnIPAddressID(id *int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetNillableOnLayerID(id *int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetNillablePoInterfaceShutdown(b *bool) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetOnDevice(d *Device) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetOnDeviceID(id int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetOnIPAddress(i *IPAddress) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetOnIPAddressID(id int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetOnLayer(n *NetInterfaceLayer) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetOnLayerID(id int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetPoInterfaceID(i int) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) SetPoInterfaceShutdown(b bool) *PortChannelInterfaceUpdate
- func (pciu *PortChannelInterfaceUpdate) Where(ps ...predicate.PortChannelInterface) *PortChannelInterfaceUpdate
- type PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) AddHaveVlanIDs(ids ...int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) AddHaveVlans(v ...*Vlan) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) AddInterfaceIDs(ids ...int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) AddInterfaces(n ...*NetInterface) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) AddPoInterfaceID(i int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) ClearHaveVlans() *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) ClearInterfaces() *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) ClearMode() *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) ClearNativeOnVlan() *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) ClearOnDevice() *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) ClearOnIPAddress() *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) ClearOnLayer() *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) Exec(ctx context.Context) error
- func (pciuo *PortChannelInterfaceUpdateOne) ExecX(ctx context.Context)
- func (pciuo *PortChannelInterfaceUpdateOne) Mutation() *PortChannelInterfaceMutation
- func (pciuo *PortChannelInterfaceUpdateOne) RemoveHaveVlanIDs(ids ...int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) RemoveHaveVlans(v ...*Vlan) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) RemoveInterfaceIDs(ids ...int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) RemoveInterfaces(n ...*NetInterface) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) Save(ctx context.Context) (*PortChannelInterface, error)
- func (pciuo *PortChannelInterfaceUpdateOne) SaveX(ctx context.Context) *PortChannelInterface
- func (pciuo *PortChannelInterfaceUpdateOne) Select(field string, fields ...string) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetMode(n *NetInterfaceMode) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetModeID(id int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetNativeOnVlan(v *Vlan) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetNativeOnVlanID(id int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetNillableModeID(id *int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetNillableNativeOnVlanID(id *int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetNillableOnDeviceID(id *int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetNillableOnIPAddressID(id *int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetNillableOnLayerID(id *int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetNillablePoInterfaceShutdown(b *bool) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetOnDevice(d *Device) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetOnDeviceID(id int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetOnIPAddress(i *IPAddress) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetOnIPAddressID(id int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetOnLayer(n *NetInterfaceLayer) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetOnLayerID(id int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetPoInterfaceID(i int) *PortChannelInterfaceUpdateOne
- func (pciuo *PortChannelInterfaceUpdateOne) SetPoInterfaceShutdown(b bool) *PortChannelInterfaceUpdateOne
- type PortChannelInterfaces
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tx
- type ValidationError
- type Value
- type Vlan
- func (v *Vlan) QueryNativeVlan() *NetInterfaceQuery
- func (v *Vlan) QueryOnDevice() *DeviceQuery
- func (v *Vlan) QueryPoNativeVlan() *PortChannelInterfaceQuery
- func (v *Vlan) QueryPoVlans() *PortChannelInterfaceQuery
- func (v *Vlan) QueryVlans() *NetInterfaceQuery
- func (v *Vlan) String() string
- func (v *Vlan) Unwrap() *Vlan
- func (v *Vlan) Update() *VlanUpdateOne
- type VlanClient
- func (c *VlanClient) Create() *VlanCreate
- func (c *VlanClient) CreateBulk(builders ...*VlanCreate) *VlanCreateBulk
- func (c *VlanClient) Delete() *VlanDelete
- func (c *VlanClient) DeleteOne(v *Vlan) *VlanDeleteOne
- func (c *VlanClient) DeleteOneID(id int) *VlanDeleteOne
- func (c *VlanClient) Get(ctx context.Context, id int) (*Vlan, error)
- func (c *VlanClient) GetX(ctx context.Context, id int) *Vlan
- func (c *VlanClient) Hooks() []Hook
- func (c *VlanClient) Query() *VlanQuery
- func (c *VlanClient) QueryNativeVlan(v *Vlan) *NetInterfaceQuery
- func (c *VlanClient) QueryOnDevice(v *Vlan) *DeviceQuery
- func (c *VlanClient) QueryPoNativeVlan(v *Vlan) *PortChannelInterfaceQuery
- func (c *VlanClient) QueryPoVlans(v *Vlan) *PortChannelInterfaceQuery
- func (c *VlanClient) QueryVlans(v *Vlan) *NetInterfaceQuery
- func (c *VlanClient) Update() *VlanUpdate
- func (c *VlanClient) UpdateOne(v *Vlan) *VlanUpdateOne
- func (c *VlanClient) UpdateOneID(id int) *VlanUpdateOne
- func (c *VlanClient) Use(hooks ...Hook)
- type VlanCreate
- func (vc *VlanCreate) AddNativeVlan(n ...*NetInterface) *VlanCreate
- func (vc *VlanCreate) AddNativeVlanIDs(ids ...int) *VlanCreate
- func (vc *VlanCreate) AddOnDevice(d ...*Device) *VlanCreate
- func (vc *VlanCreate) AddOnDeviceIDs(ids ...int) *VlanCreate
- func (vc *VlanCreate) AddPoNativeVlan(p ...*PortChannelInterface) *VlanCreate
- func (vc *VlanCreate) AddPoNativeVlanIDs(ids ...int) *VlanCreate
- func (vc *VlanCreate) AddPoVlanIDs(ids ...int) *VlanCreate
- func (vc *VlanCreate) AddPoVlans(p ...*PortChannelInterface) *VlanCreate
- func (vc *VlanCreate) AddVlanIDs(ids ...int) *VlanCreate
- func (vc *VlanCreate) AddVlans(n ...*NetInterface) *VlanCreate
- func (vc *VlanCreate) Mutation() *VlanMutation
- func (vc *VlanCreate) Save(ctx context.Context) (*Vlan, error)
- func (vc *VlanCreate) SaveX(ctx context.Context) *Vlan
- func (vc *VlanCreate) SetVlanID(i int) *VlanCreate
- type VlanCreateBulk
- type VlanDelete
- type VlanDeleteOne
- type VlanEdges
- func (e VlanEdges) NativeVlanOrErr() ([]*NetInterface, error)
- func (e VlanEdges) OnDeviceOrErr() ([]*Device, error)
- func (e VlanEdges) PoNativeVlanOrErr() ([]*PortChannelInterface, error)
- func (e VlanEdges) PoVlansOrErr() ([]*PortChannelInterface, error)
- func (e VlanEdges) VlansOrErr() ([]*NetInterface, error)
- type VlanGroupBy
- func (vgb *VlanGroupBy) Aggregate(fns ...AggregateFunc) *VlanGroupBy
- func (vgb *VlanGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (vgb *VlanGroupBy) BoolX(ctx context.Context) bool
- func (vgb *VlanGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (vgb *VlanGroupBy) BoolsX(ctx context.Context) []bool
- func (vgb *VlanGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (vgb *VlanGroupBy) Float64X(ctx context.Context) float64
- func (vgb *VlanGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (vgb *VlanGroupBy) Float64sX(ctx context.Context) []float64
- func (vgb *VlanGroupBy) Int(ctx context.Context) (_ int, err error)
- func (vgb *VlanGroupBy) IntX(ctx context.Context) int
- func (vgb *VlanGroupBy) Ints(ctx context.Context) ([]int, error)
- func (vgb *VlanGroupBy) IntsX(ctx context.Context) []int
- func (vgb *VlanGroupBy) Scan(ctx context.Context, v interface{}) error
- func (vgb *VlanGroupBy) ScanX(ctx context.Context, v interface{})
- func (vgb *VlanGroupBy) String(ctx context.Context) (_ string, err error)
- func (vgb *VlanGroupBy) StringX(ctx context.Context) string
- func (vgb *VlanGroupBy) Strings(ctx context.Context) ([]string, error)
- func (vgb *VlanGroupBy) StringsX(ctx context.Context) []string
- type VlanMutation
- func (m *VlanMutation) AddField(name string, value ent.Value) error
- func (m *VlanMutation) AddNativeVlanIDs(ids ...int)
- func (m *VlanMutation) AddOnDeviceIDs(ids ...int)
- func (m *VlanMutation) AddPoNativeVlanIDs(ids ...int)
- func (m *VlanMutation) AddPoVlanIDs(ids ...int)
- func (m *VlanMutation) AddVlanID(i int)
- func (m *VlanMutation) AddVlanIDs(ids ...int)
- func (m *VlanMutation) AddedEdges() []string
- func (m *VlanMutation) AddedField(name string) (ent.Value, bool)
- func (m *VlanMutation) AddedFields() []string
- func (m *VlanMutation) AddedIDs(name string) []ent.Value
- func (m *VlanMutation) AddedVlanID() (r int, exists bool)
- func (m *VlanMutation) ClearEdge(name string) error
- func (m *VlanMutation) ClearField(name string) error
- func (m *VlanMutation) ClearNativeVlan()
- func (m *VlanMutation) ClearOnDevice()
- func (m *VlanMutation) ClearPoNativeVlan()
- func (m *VlanMutation) ClearPoVlans()
- func (m *VlanMutation) ClearVlans()
- func (m *VlanMutation) ClearedEdges() []string
- func (m *VlanMutation) ClearedFields() []string
- func (m VlanMutation) Client() *Client
- func (m *VlanMutation) EdgeCleared(name string) bool
- func (m *VlanMutation) Field(name string) (ent.Value, bool)
- func (m *VlanMutation) FieldCleared(name string) bool
- func (m *VlanMutation) Fields() []string
- func (m *VlanMutation) ID() (id int, exists bool)
- func (m *VlanMutation) NativeVlanCleared() bool
- func (m *VlanMutation) NativeVlanIDs() (ids []int)
- func (m *VlanMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *VlanMutation) OldVlanID(ctx context.Context) (v int, err error)
- func (m *VlanMutation) OnDeviceCleared() bool
- func (m *VlanMutation) OnDeviceIDs() (ids []int)
- func (m *VlanMutation) Op() Op
- func (m *VlanMutation) PoNativeVlanCleared() bool
- func (m *VlanMutation) PoNativeVlanIDs() (ids []int)
- func (m *VlanMutation) PoVlansCleared() bool
- func (m *VlanMutation) PoVlansIDs() (ids []int)
- func (m *VlanMutation) RemoveNativeVlanIDs(ids ...int)
- func (m *VlanMutation) RemoveOnDeviceIDs(ids ...int)
- func (m *VlanMutation) RemovePoNativeVlanIDs(ids ...int)
- func (m *VlanMutation) RemovePoVlanIDs(ids ...int)
- func (m *VlanMutation) RemoveVlanIDs(ids ...int)
- func (m *VlanMutation) RemovedEdges() []string
- func (m *VlanMutation) RemovedIDs(name string) []ent.Value
- func (m *VlanMutation) RemovedNativeVlanIDs() (ids []int)
- func (m *VlanMutation) RemovedOnDeviceIDs() (ids []int)
- func (m *VlanMutation) RemovedPoNativeVlanIDs() (ids []int)
- func (m *VlanMutation) RemovedPoVlansIDs() (ids []int)
- func (m *VlanMutation) RemovedVlansIDs() (ids []int)
- func (m *VlanMutation) ResetEdge(name string) error
- func (m *VlanMutation) ResetField(name string) error
- func (m *VlanMutation) ResetNativeVlan()
- func (m *VlanMutation) ResetOnDevice()
- func (m *VlanMutation) ResetPoNativeVlan()
- func (m *VlanMutation) ResetPoVlans()
- func (m *VlanMutation) ResetVlanID()
- func (m *VlanMutation) ResetVlans()
- func (m *VlanMutation) SetField(name string, value ent.Value) error
- func (m *VlanMutation) SetVlanID(i int)
- func (m VlanMutation) Tx() (*Tx, error)
- func (m *VlanMutation) Type() string
- func (m *VlanMutation) VlanID() (r int, exists bool)
- func (m *VlanMutation) VlansCleared() bool
- func (m *VlanMutation) VlansIDs() (ids []int)
- type VlanQuery
- func (vq *VlanQuery) All(ctx context.Context) ([]*Vlan, error)
- func (vq *VlanQuery) AllX(ctx context.Context) []*Vlan
- func (vq *VlanQuery) Clone() *VlanQuery
- func (vq *VlanQuery) Count(ctx context.Context) (int, error)
- func (vq *VlanQuery) CountX(ctx context.Context) int
- func (vq *VlanQuery) Exist(ctx context.Context) (bool, error)
- func (vq *VlanQuery) ExistX(ctx context.Context) bool
- func (vq *VlanQuery) First(ctx context.Context) (*Vlan, error)
- func (vq *VlanQuery) FirstID(ctx context.Context) (id int, err error)
- func (vq *VlanQuery) FirstIDX(ctx context.Context) int
- func (vq *VlanQuery) FirstX(ctx context.Context) *Vlan
- func (vq *VlanQuery) GroupBy(field string, fields ...string) *VlanGroupBy
- func (vq *VlanQuery) IDs(ctx context.Context) ([]int, error)
- func (vq *VlanQuery) IDsX(ctx context.Context) []int
- func (vq *VlanQuery) Limit(limit int) *VlanQuery
- func (vq *VlanQuery) Offset(offset int) *VlanQuery
- func (vq *VlanQuery) Only(ctx context.Context) (*Vlan, error)
- func (vq *VlanQuery) OnlyID(ctx context.Context) (id int, err error)
- func (vq *VlanQuery) OnlyIDX(ctx context.Context) int
- func (vq *VlanQuery) OnlyX(ctx context.Context) *Vlan
- func (vq *VlanQuery) Order(o ...OrderFunc) *VlanQuery
- func (vq *VlanQuery) QueryNativeVlan() *NetInterfaceQuery
- func (vq *VlanQuery) QueryOnDevice() *DeviceQuery
- func (vq *VlanQuery) QueryPoNativeVlan() *PortChannelInterfaceQuery
- func (vq *VlanQuery) QueryPoVlans() *PortChannelInterfaceQuery
- func (vq *VlanQuery) QueryVlans() *NetInterfaceQuery
- func (vq *VlanQuery) Select(field string, fields ...string) *VlanSelect
- func (vq *VlanQuery) Unique(unique bool) *VlanQuery
- func (vq *VlanQuery) Where(ps ...predicate.Vlan) *VlanQuery
- func (vq *VlanQuery) WithNativeVlan(opts ...func(*NetInterfaceQuery)) *VlanQuery
- func (vq *VlanQuery) WithOnDevice(opts ...func(*DeviceQuery)) *VlanQuery
- func (vq *VlanQuery) WithPoNativeVlan(opts ...func(*PortChannelInterfaceQuery)) *VlanQuery
- func (vq *VlanQuery) WithPoVlans(opts ...func(*PortChannelInterfaceQuery)) *VlanQuery
- func (vq *VlanQuery) WithVlans(opts ...func(*NetInterfaceQuery)) *VlanQuery
- type VlanSelect
- func (vs *VlanSelect) Bool(ctx context.Context) (_ bool, err error)
- func (vs *VlanSelect) BoolX(ctx context.Context) bool
- func (vs *VlanSelect) Bools(ctx context.Context) ([]bool, error)
- func (vs *VlanSelect) BoolsX(ctx context.Context) []bool
- func (vs *VlanSelect) Float64(ctx context.Context) (_ float64, err error)
- func (vs *VlanSelect) Float64X(ctx context.Context) float64
- func (vs *VlanSelect) Float64s(ctx context.Context) ([]float64, error)
- func (vs *VlanSelect) Float64sX(ctx context.Context) []float64
- func (vs *VlanSelect) Int(ctx context.Context) (_ int, err error)
- func (vs *VlanSelect) IntX(ctx context.Context) int
- func (vs *VlanSelect) Ints(ctx context.Context) ([]int, error)
- func (vs *VlanSelect) IntsX(ctx context.Context) []int
- func (vs *VlanSelect) Scan(ctx context.Context, v interface{}) error
- func (vs *VlanSelect) ScanX(ctx context.Context, v interface{})
- func (vs *VlanSelect) String(ctx context.Context) (_ string, err error)
- func (vs *VlanSelect) StringX(ctx context.Context) string
- func (vs *VlanSelect) Strings(ctx context.Context) ([]string, error)
- func (vs *VlanSelect) StringsX(ctx context.Context) []string
- type VlanUpdate
- func (vu *VlanUpdate) AddNativeVlan(n ...*NetInterface) *VlanUpdate
- func (vu *VlanUpdate) AddNativeVlanIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) AddOnDevice(d ...*Device) *VlanUpdate
- func (vu *VlanUpdate) AddOnDeviceIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) AddPoNativeVlan(p ...*PortChannelInterface) *VlanUpdate
- func (vu *VlanUpdate) AddPoNativeVlanIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) AddPoVlanIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) AddPoVlans(p ...*PortChannelInterface) *VlanUpdate
- func (vu *VlanUpdate) AddVlanID(i int) *VlanUpdate
- func (vu *VlanUpdate) AddVlanIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) AddVlans(n ...*NetInterface) *VlanUpdate
- func (vu *VlanUpdate) ClearNativeVlan() *VlanUpdate
- func (vu *VlanUpdate) ClearOnDevice() *VlanUpdate
- func (vu *VlanUpdate) ClearPoNativeVlan() *VlanUpdate
- func (vu *VlanUpdate) ClearPoVlans() *VlanUpdate
- func (vu *VlanUpdate) ClearVlans() *VlanUpdate
- func (vu *VlanUpdate) Exec(ctx context.Context) error
- func (vu *VlanUpdate) ExecX(ctx context.Context)
- func (vu *VlanUpdate) Mutation() *VlanMutation
- func (vu *VlanUpdate) RemoveNativeVlan(n ...*NetInterface) *VlanUpdate
- func (vu *VlanUpdate) RemoveNativeVlanIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) RemoveOnDevice(d ...*Device) *VlanUpdate
- func (vu *VlanUpdate) RemoveOnDeviceIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) RemovePoNativeVlan(p ...*PortChannelInterface) *VlanUpdate
- func (vu *VlanUpdate) RemovePoNativeVlanIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) RemovePoVlanIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) RemovePoVlans(p ...*PortChannelInterface) *VlanUpdate
- func (vu *VlanUpdate) RemoveVlanIDs(ids ...int) *VlanUpdate
- func (vu *VlanUpdate) RemoveVlans(n ...*NetInterface) *VlanUpdate
- func (vu *VlanUpdate) Save(ctx context.Context) (int, error)
- func (vu *VlanUpdate) SaveX(ctx context.Context) int
- func (vu *VlanUpdate) SetVlanID(i int) *VlanUpdate
- func (vu *VlanUpdate) Where(ps ...predicate.Vlan) *VlanUpdate
- type VlanUpdateOne
- func (vuo *VlanUpdateOne) AddNativeVlan(n ...*NetInterface) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddNativeVlanIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddOnDevice(d ...*Device) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddOnDeviceIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddPoNativeVlan(p ...*PortChannelInterface) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddPoNativeVlanIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddPoVlanIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddPoVlans(p ...*PortChannelInterface) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddVlanID(i int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddVlanIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) AddVlans(n ...*NetInterface) *VlanUpdateOne
- func (vuo *VlanUpdateOne) ClearNativeVlan() *VlanUpdateOne
- func (vuo *VlanUpdateOne) ClearOnDevice() *VlanUpdateOne
- func (vuo *VlanUpdateOne) ClearPoNativeVlan() *VlanUpdateOne
- func (vuo *VlanUpdateOne) ClearPoVlans() *VlanUpdateOne
- func (vuo *VlanUpdateOne) ClearVlans() *VlanUpdateOne
- func (vuo *VlanUpdateOne) Exec(ctx context.Context) error
- func (vuo *VlanUpdateOne) ExecX(ctx context.Context)
- func (vuo *VlanUpdateOne) Mutation() *VlanMutation
- func (vuo *VlanUpdateOne) RemoveNativeVlan(n ...*NetInterface) *VlanUpdateOne
- func (vuo *VlanUpdateOne) RemoveNativeVlanIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) RemoveOnDevice(d ...*Device) *VlanUpdateOne
- func (vuo *VlanUpdateOne) RemoveOnDeviceIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) RemovePoNativeVlan(p ...*PortChannelInterface) *VlanUpdateOne
- func (vuo *VlanUpdateOne) RemovePoNativeVlanIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) RemovePoVlanIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) RemovePoVlans(p ...*PortChannelInterface) *VlanUpdateOne
- func (vuo *VlanUpdateOne) RemoveVlanIDs(ids ...int) *VlanUpdateOne
- func (vuo *VlanUpdateOne) RemoveVlans(n ...*NetInterface) *VlanUpdateOne
- func (vuo *VlanUpdateOne) Save(ctx context.Context) (*Vlan, error)
- func (vuo *VlanUpdateOne) SaveX(ctx context.Context) *Vlan
- func (vuo *VlanUpdateOne) Select(field string, fields ...string) *VlanUpdateOne
- func (vuo *VlanUpdateOne) SetVlanID(i int) *VlanUpdateOne
- type Vlans
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAdministrator = "Administrator" TypeDeletedVlanLog = "DeletedVlanLog" TypeDevice = "Device" TypeDevicePlatform = "DevicePlatform" TypeDeviceType = "DeviceType" TypeIPAddress = "IPAddress" TypeIPStaticRoutingTable = "IPStaticRoutingTable" TypeNetInterface = "NetInterface" TypeNetInterfaceLayer = "NetInterfaceLayer" TypeNetInterfaceMode = "NetInterfaceMode" TypeNetTopology = "NetTopology" TypeNetTopologyDeviceMap = "NetTopologyDeviceMap" TypePortChannelInterface = "PortChannelInterface" TypeVlan = "Vlan" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Administrator ¶
type Administrator struct { // ID of the ent. ID int `json:"id,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // contains filtered or unexported fields }
Administrator is the model entity for the Administrator schema.
func (*Administrator) String ¶
func (a *Administrator) String() string
String implements the fmt.Stringer.
func (*Administrator) Unwrap ¶
func (a *Administrator) Unwrap() *Administrator
Unwrap unwraps the Administrator 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 (*Administrator) Update ¶
func (a *Administrator) Update() *AdministratorUpdateOne
Update returns a builder for updating this Administrator. Note that you need to call Administrator.Unwrap() before calling this method if this Administrator was returned from a transaction, and the transaction was committed or rolled back.
type AdministratorClient ¶
type AdministratorClient struct {
// contains filtered or unexported fields
}
AdministratorClient is a client for the Administrator schema.
func NewAdministratorClient ¶
func NewAdministratorClient(c config) *AdministratorClient
NewAdministratorClient returns a client for the Administrator from the given config.
func (*AdministratorClient) Create ¶
func (c *AdministratorClient) Create() *AdministratorCreate
Create returns a create builder for Administrator.
func (*AdministratorClient) CreateBulk ¶
func (c *AdministratorClient) CreateBulk(builders ...*AdministratorCreate) *AdministratorCreateBulk
CreateBulk returns a builder for creating a bulk of Administrator entities.
func (*AdministratorClient) Delete ¶
func (c *AdministratorClient) Delete() *AdministratorDelete
Delete returns a delete builder for Administrator.
func (*AdministratorClient) DeleteOne ¶
func (c *AdministratorClient) DeleteOne(a *Administrator) *AdministratorDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*AdministratorClient) DeleteOneID ¶
func (c *AdministratorClient) DeleteOneID(id int) *AdministratorDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*AdministratorClient) Get ¶
func (c *AdministratorClient) Get(ctx context.Context, id int) (*Administrator, error)
Get returns a Administrator entity by its id.
func (*AdministratorClient) GetX ¶
func (c *AdministratorClient) GetX(ctx context.Context, id int) *Administrator
GetX is like Get, but panics if an error occurs.
func (*AdministratorClient) Hooks ¶
func (c *AdministratorClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AdministratorClient) Query ¶
func (c *AdministratorClient) Query() *AdministratorQuery
Query returns a query builder for Administrator.
func (*AdministratorClient) Update ¶
func (c *AdministratorClient) Update() *AdministratorUpdate
Update returns an update builder for Administrator.
func (*AdministratorClient) UpdateOne ¶
func (c *AdministratorClient) UpdateOne(a *Administrator) *AdministratorUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AdministratorClient) UpdateOneID ¶
func (c *AdministratorClient) UpdateOneID(id int) *AdministratorUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AdministratorClient) Use ¶
func (c *AdministratorClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `administrator.Hooks(f(g(h())))`.
type AdministratorCreate ¶
type AdministratorCreate struct {
// contains filtered or unexported fields
}
AdministratorCreate is the builder for creating a Administrator entity.
func (*AdministratorCreate) Mutation ¶
func (ac *AdministratorCreate) Mutation() *AdministratorMutation
Mutation returns the AdministratorMutation object of the builder.
func (*AdministratorCreate) Save ¶
func (ac *AdministratorCreate) Save(ctx context.Context) (*Administrator, error)
Save creates the Administrator in the database.
func (*AdministratorCreate) SaveX ¶
func (ac *AdministratorCreate) SaveX(ctx context.Context) *Administrator
SaveX calls Save and panics if Save returns an error.
func (*AdministratorCreate) SetPassword ¶
func (ac *AdministratorCreate) SetPassword(s string) *AdministratorCreate
SetPassword sets the "password" field.
func (*AdministratorCreate) SetUsername ¶
func (ac *AdministratorCreate) SetUsername(s string) *AdministratorCreate
SetUsername sets the "username" field.
type AdministratorCreateBulk ¶
type AdministratorCreateBulk struct {
// contains filtered or unexported fields
}
AdministratorCreateBulk is the builder for creating many Administrator entities in bulk.
func (*AdministratorCreateBulk) Save ¶
func (acb *AdministratorCreateBulk) Save(ctx context.Context) ([]*Administrator, error)
Save creates the Administrator entities in the database.
func (*AdministratorCreateBulk) SaveX ¶
func (acb *AdministratorCreateBulk) SaveX(ctx context.Context) []*Administrator
SaveX is like Save, but panics if an error occurs.
type AdministratorDelete ¶
type AdministratorDelete struct {
// contains filtered or unexported fields
}
AdministratorDelete is the builder for deleting a Administrator entity.
func (*AdministratorDelete) Exec ¶
func (ad *AdministratorDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AdministratorDelete) ExecX ¶
func (ad *AdministratorDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AdministratorDelete) Where ¶
func (ad *AdministratorDelete) Where(ps ...predicate.Administrator) *AdministratorDelete
Where adds a new predicate to the AdministratorDelete builder.
type AdministratorDeleteOne ¶
type AdministratorDeleteOne struct {
// contains filtered or unexported fields
}
AdministratorDeleteOne is the builder for deleting a single Administrator entity.
func (*AdministratorDeleteOne) Exec ¶
func (ado *AdministratorDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AdministratorDeleteOne) ExecX ¶
func (ado *AdministratorDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AdministratorGroupBy ¶
type AdministratorGroupBy struct {
// contains filtered or unexported fields
}
AdministratorGroupBy is the group-by builder for Administrator entities.
func (*AdministratorGroupBy) Aggregate ¶
func (agb *AdministratorGroupBy) Aggregate(fns ...AggregateFunc) *AdministratorGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AdministratorGroupBy) Bool ¶
func (agb *AdministratorGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AdministratorGroupBy) BoolX ¶
func (agb *AdministratorGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AdministratorGroupBy) Bools ¶
func (agb *AdministratorGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*AdministratorGroupBy) BoolsX ¶
func (agb *AdministratorGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AdministratorGroupBy) Float64 ¶
func (agb *AdministratorGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AdministratorGroupBy) Float64X ¶
func (agb *AdministratorGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AdministratorGroupBy) Float64s ¶
func (agb *AdministratorGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*AdministratorGroupBy) Float64sX ¶
func (agb *AdministratorGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AdministratorGroupBy) Int ¶
func (agb *AdministratorGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AdministratorGroupBy) IntX ¶
func (agb *AdministratorGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AdministratorGroupBy) Ints ¶
func (agb *AdministratorGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*AdministratorGroupBy) IntsX ¶
func (agb *AdministratorGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AdministratorGroupBy) Scan ¶
func (agb *AdministratorGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*AdministratorGroupBy) ScanX ¶
func (agb *AdministratorGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AdministratorGroupBy) String ¶
func (agb *AdministratorGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*AdministratorGroupBy) StringX ¶
func (agb *AdministratorGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AdministratorMutation ¶
type AdministratorMutation struct {
// contains filtered or unexported fields
}
AdministratorMutation represents an operation that mutates the Administrator nodes in the graph.
func (*AdministratorMutation) AddField ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) AddedEdges ¶
func (m *AdministratorMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AdministratorMutation) AddedField ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) AddedFields ¶
func (m *AdministratorMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AdministratorMutation) AddedIDs ¶
func (m *AdministratorMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AdministratorMutation) ClearEdge ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) ClearField ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) ClearedEdges ¶
func (m *AdministratorMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AdministratorMutation) ClearedFields ¶
func (m *AdministratorMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AdministratorMutation) Client ¶
func (m AdministratorMutation) 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 (*AdministratorMutation) EdgeCleared ¶
func (m *AdministratorMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AdministratorMutation) Field ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) FieldCleared ¶
func (m *AdministratorMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AdministratorMutation) Fields ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) ID ¶
func (m *AdministratorMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*AdministratorMutation) 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 (*AdministratorMutation) OldPassword ¶
func (m *AdministratorMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the Administrator entity. If the Administrator object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdministratorMutation) OldUsername ¶
func (m *AdministratorMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the Administrator entity. If the Administrator object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdministratorMutation) Op ¶
func (m *AdministratorMutation) Op() Op
Op returns the operation name.
func (*AdministratorMutation) Password ¶
func (m *AdministratorMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*AdministratorMutation) RemovedEdges ¶
func (m *AdministratorMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AdministratorMutation) RemovedIDs ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) ResetEdge ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) ResetField ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) ResetPassword ¶
func (m *AdministratorMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*AdministratorMutation) ResetUsername ¶
func (m *AdministratorMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*AdministratorMutation) SetField ¶
func (m *AdministratorMutation) 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 (*AdministratorMutation) SetPassword ¶
func (m *AdministratorMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*AdministratorMutation) SetUsername ¶
func (m *AdministratorMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (AdministratorMutation) Tx ¶
func (m AdministratorMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AdministratorMutation) Type ¶
func (m *AdministratorMutation) Type() string
Type returns the node type of this mutation (Administrator).
func (*AdministratorMutation) Username ¶
func (m *AdministratorMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
type AdministratorQuery ¶
type AdministratorQuery struct {
// contains filtered or unexported fields
}
AdministratorQuery is the builder for querying Administrator entities.
func (*AdministratorQuery) All ¶
func (aq *AdministratorQuery) All(ctx context.Context) ([]*Administrator, error)
All executes the query and returns a list of Administrators.
func (*AdministratorQuery) AllX ¶
func (aq *AdministratorQuery) AllX(ctx context.Context) []*Administrator
AllX is like All, but panics if an error occurs.
func (*AdministratorQuery) Clone ¶
func (aq *AdministratorQuery) Clone() *AdministratorQuery
Clone returns a duplicate of the AdministratorQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AdministratorQuery) Count ¶
func (aq *AdministratorQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AdministratorQuery) CountX ¶
func (aq *AdministratorQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AdministratorQuery) Exist ¶
func (aq *AdministratorQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AdministratorQuery) ExistX ¶
func (aq *AdministratorQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AdministratorQuery) First ¶
func (aq *AdministratorQuery) First(ctx context.Context) (*Administrator, error)
First returns the first Administrator entity from the query. Returns a *NotFoundError when no Administrator was found.
func (*AdministratorQuery) FirstID ¶
func (aq *AdministratorQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Administrator ID from the query. Returns a *NotFoundError when no Administrator ID was found.
func (*AdministratorQuery) FirstIDX ¶
func (aq *AdministratorQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AdministratorQuery) FirstX ¶
func (aq *AdministratorQuery) FirstX(ctx context.Context) *Administrator
FirstX is like First, but panics if an error occurs.
func (*AdministratorQuery) GroupBy ¶
func (aq *AdministratorQuery) GroupBy(field string, fields ...string) *AdministratorGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Username string `json:"username,omitempty"` Count int `json:"count,omitempty"` } client.Administrator.Query(). GroupBy(administrator.FieldUsername). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AdministratorQuery) IDs ¶
func (aq *AdministratorQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Administrator IDs.
func (*AdministratorQuery) IDsX ¶
func (aq *AdministratorQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AdministratorQuery) Limit ¶
func (aq *AdministratorQuery) Limit(limit int) *AdministratorQuery
Limit adds a limit step to the query.
func (*AdministratorQuery) Offset ¶
func (aq *AdministratorQuery) Offset(offset int) *AdministratorQuery
Offset adds an offset step to the query.
func (*AdministratorQuery) Only ¶
func (aq *AdministratorQuery) Only(ctx context.Context) (*Administrator, error)
Only returns a single Administrator entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Administrator entity is not found. Returns a *NotFoundError when no Administrator entities are found.
func (*AdministratorQuery) OnlyID ¶
func (aq *AdministratorQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Administrator ID in the query. Returns a *NotSingularError when exactly one Administrator ID is not found. Returns a *NotFoundError when no entities are found.
func (*AdministratorQuery) OnlyIDX ¶
func (aq *AdministratorQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AdministratorQuery) OnlyX ¶
func (aq *AdministratorQuery) OnlyX(ctx context.Context) *Administrator
OnlyX is like Only, but panics if an error occurs.
func (*AdministratorQuery) Order ¶
func (aq *AdministratorQuery) Order(o ...OrderFunc) *AdministratorQuery
Order adds an order step to the query.
func (*AdministratorQuery) Select ¶
func (aq *AdministratorQuery) Select(field string, fields ...string) *AdministratorSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Username string `json:"username,omitempty"` } client.Administrator.Query(). Select(administrator.FieldUsername). Scan(ctx, &v)
func (*AdministratorQuery) Unique ¶
func (aq *AdministratorQuery) Unique(unique bool) *AdministratorQuery
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 (*AdministratorQuery) Where ¶
func (aq *AdministratorQuery) Where(ps ...predicate.Administrator) *AdministratorQuery
Where adds a new predicate for the AdministratorQuery builder.
type AdministratorSelect ¶
type AdministratorSelect struct { *AdministratorQuery // contains filtered or unexported fields }
AdministratorSelect is the builder for selecting fields of Administrator entities.
func (*AdministratorSelect) Bool ¶
func (as *AdministratorSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AdministratorSelect) BoolX ¶
func (as *AdministratorSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AdministratorSelect) Bools ¶
func (as *AdministratorSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AdministratorSelect) BoolsX ¶
func (as *AdministratorSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AdministratorSelect) Float64 ¶
func (as *AdministratorSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AdministratorSelect) Float64X ¶
func (as *AdministratorSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AdministratorSelect) Float64s ¶
func (as *AdministratorSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AdministratorSelect) Float64sX ¶
func (as *AdministratorSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AdministratorSelect) Int ¶
func (as *AdministratorSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AdministratorSelect) IntX ¶
func (as *AdministratorSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AdministratorSelect) Ints ¶
func (as *AdministratorSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AdministratorSelect) IntsX ¶
func (as *AdministratorSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AdministratorSelect) Scan ¶
func (as *AdministratorSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*AdministratorSelect) ScanX ¶
func (as *AdministratorSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AdministratorSelect) String ¶
func (as *AdministratorSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AdministratorSelect) StringX ¶
func (as *AdministratorSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AdministratorUpdate ¶
type AdministratorUpdate struct {
// contains filtered or unexported fields
}
AdministratorUpdate is the builder for updating Administrator entities.
func (*AdministratorUpdate) Exec ¶
func (au *AdministratorUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AdministratorUpdate) ExecX ¶
func (au *AdministratorUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdministratorUpdate) Mutation ¶
func (au *AdministratorUpdate) Mutation() *AdministratorMutation
Mutation returns the AdministratorMutation object of the builder.
func (*AdministratorUpdate) Save ¶
func (au *AdministratorUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AdministratorUpdate) SaveX ¶
func (au *AdministratorUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AdministratorUpdate) SetPassword ¶
func (au *AdministratorUpdate) SetPassword(s string) *AdministratorUpdate
SetPassword sets the "password" field.
func (*AdministratorUpdate) SetUsername ¶
func (au *AdministratorUpdate) SetUsername(s string) *AdministratorUpdate
SetUsername sets the "username" field.
func (*AdministratorUpdate) Where ¶
func (au *AdministratorUpdate) Where(ps ...predicate.Administrator) *AdministratorUpdate
Where adds a new predicate for the AdministratorUpdate builder.
type AdministratorUpdateOne ¶
type AdministratorUpdateOne struct {
// contains filtered or unexported fields
}
AdministratorUpdateOne is the builder for updating a single Administrator entity.
func (*AdministratorUpdateOne) Exec ¶
func (auo *AdministratorUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AdministratorUpdateOne) ExecX ¶
func (auo *AdministratorUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdministratorUpdateOne) Mutation ¶
func (auo *AdministratorUpdateOne) Mutation() *AdministratorMutation
Mutation returns the AdministratorMutation object of the builder.
func (*AdministratorUpdateOne) Save ¶
func (auo *AdministratorUpdateOne) Save(ctx context.Context) (*Administrator, error)
Save executes the query and returns the updated Administrator entity.
func (*AdministratorUpdateOne) SaveX ¶
func (auo *AdministratorUpdateOne) SaveX(ctx context.Context) *Administrator
SaveX is like Save, but panics if an error occurs.
func (*AdministratorUpdateOne) Select ¶
func (auo *AdministratorUpdateOne) Select(field string, fields ...string) *AdministratorUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AdministratorUpdateOne) SetPassword ¶
func (auo *AdministratorUpdateOne) SetPassword(s string) *AdministratorUpdateOne
SetPassword sets the "password" field.
func (*AdministratorUpdateOne) SetUsername ¶
func (auo *AdministratorUpdateOne) SetUsername(s string) *AdministratorUpdateOne
SetUsername sets the "username" field.
type Administrators ¶
type Administrators []*Administrator
Administrators is a parsable slice of Administrator.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Administrator is the client for interacting with the Administrator builders. Administrator *AdministratorClient // DeletedVlanLog is the client for interacting with the DeletedVlanLog builders. DeletedVlanLog *DeletedVlanLogClient // Device is the client for interacting with the Device builders. Device *DeviceClient // DevicePlatform is the client for interacting with the DevicePlatform builders. DevicePlatform *DevicePlatformClient // DeviceType is the client for interacting with the DeviceType builders. DeviceType *DeviceTypeClient // IPAddress is the client for interacting with the IPAddress builders. IPAddress *IPAddressClient // IPStaticRoutingTable is the client for interacting with the IPStaticRoutingTable builders. IPStaticRoutingTable *IPStaticRoutingTableClient // NetInterface is the client for interacting with the NetInterface builders. NetInterface *NetInterfaceClient // NetInterfaceLayer is the client for interacting with the NetInterfaceLayer builders. NetInterfaceLayer *NetInterfaceLayerClient // NetInterfaceMode is the client for interacting with the NetInterfaceMode builders. NetInterfaceMode *NetInterfaceModeClient // NetTopology is the client for interacting with the NetTopology builders. NetTopology *NetTopologyClient // NetTopologyDeviceMap is the client for interacting with the NetTopologyDeviceMap builders. NetTopologyDeviceMap *NetTopologyDeviceMapClient // PortChannelInterface is the client for interacting with the PortChannelInterface builders. PortChannelInterface *PortChannelInterfaceClient // Vlan is the client for interacting with the Vlan builders. Vlan *VlanClient // 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(). Administrator. Query(). Count(ctx)
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(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 DeletedVlanLog ¶
type DeletedVlanLog struct { // ID of the ent. ID int `json:"id,omitempty"` // VlanID holds the value of the "vlan_id" field. VlanID int `json:"vlan_id,omitempty"` // Deleted holds the value of the "deleted" field. Deleted bool `json:"deleted,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DeletedVlanLogQuery when eager-loading is set. Edges DeletedVlanLogEdges `json:"edges"` // contains filtered or unexported fields }
DeletedVlanLog is the model entity for the DeletedVlanLog schema.
func (*DeletedVlanLog) QueryOnDevice ¶
func (dvl *DeletedVlanLog) QueryOnDevice() *DeviceQuery
QueryOnDevice queries the "on_device" edge of the DeletedVlanLog entity.
func (*DeletedVlanLog) String ¶
func (dvl *DeletedVlanLog) String() string
String implements the fmt.Stringer.
func (*DeletedVlanLog) Unwrap ¶
func (dvl *DeletedVlanLog) Unwrap() *DeletedVlanLog
Unwrap unwraps the DeletedVlanLog 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 (*DeletedVlanLog) Update ¶
func (dvl *DeletedVlanLog) Update() *DeletedVlanLogUpdateOne
Update returns a builder for updating this DeletedVlanLog. Note that you need to call DeletedVlanLog.Unwrap() before calling this method if this DeletedVlanLog was returned from a transaction, and the transaction was committed or rolled back.
type DeletedVlanLogClient ¶
type DeletedVlanLogClient struct {
// contains filtered or unexported fields
}
DeletedVlanLogClient is a client for the DeletedVlanLog schema.
func NewDeletedVlanLogClient ¶
func NewDeletedVlanLogClient(c config) *DeletedVlanLogClient
NewDeletedVlanLogClient returns a client for the DeletedVlanLog from the given config.
func (*DeletedVlanLogClient) Create ¶
func (c *DeletedVlanLogClient) Create() *DeletedVlanLogCreate
Create returns a create builder for DeletedVlanLog.
func (*DeletedVlanLogClient) CreateBulk ¶
func (c *DeletedVlanLogClient) CreateBulk(builders ...*DeletedVlanLogCreate) *DeletedVlanLogCreateBulk
CreateBulk returns a builder for creating a bulk of DeletedVlanLog entities.
func (*DeletedVlanLogClient) Delete ¶
func (c *DeletedVlanLogClient) Delete() *DeletedVlanLogDelete
Delete returns a delete builder for DeletedVlanLog.
func (*DeletedVlanLogClient) DeleteOne ¶
func (c *DeletedVlanLogClient) DeleteOne(dvl *DeletedVlanLog) *DeletedVlanLogDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DeletedVlanLogClient) DeleteOneID ¶
func (c *DeletedVlanLogClient) DeleteOneID(id int) *DeletedVlanLogDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DeletedVlanLogClient) Get ¶
func (c *DeletedVlanLogClient) Get(ctx context.Context, id int) (*DeletedVlanLog, error)
Get returns a DeletedVlanLog entity by its id.
func (*DeletedVlanLogClient) GetX ¶
func (c *DeletedVlanLogClient) GetX(ctx context.Context, id int) *DeletedVlanLog
GetX is like Get, but panics if an error occurs.
func (*DeletedVlanLogClient) Hooks ¶
func (c *DeletedVlanLogClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DeletedVlanLogClient) Query ¶
func (c *DeletedVlanLogClient) Query() *DeletedVlanLogQuery
Query returns a query builder for DeletedVlanLog.
func (*DeletedVlanLogClient) QueryOnDevice ¶
func (c *DeletedVlanLogClient) QueryOnDevice(dvl *DeletedVlanLog) *DeviceQuery
QueryOnDevice queries the on_device edge of a DeletedVlanLog.
func (*DeletedVlanLogClient) Update ¶
func (c *DeletedVlanLogClient) Update() *DeletedVlanLogUpdate
Update returns an update builder for DeletedVlanLog.
func (*DeletedVlanLogClient) UpdateOne ¶
func (c *DeletedVlanLogClient) UpdateOne(dvl *DeletedVlanLog) *DeletedVlanLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DeletedVlanLogClient) UpdateOneID ¶
func (c *DeletedVlanLogClient) UpdateOneID(id int) *DeletedVlanLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DeletedVlanLogClient) Use ¶
func (c *DeletedVlanLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deletedvlanlog.Hooks(f(g(h())))`.
type DeletedVlanLogCreate ¶
type DeletedVlanLogCreate struct {
// contains filtered or unexported fields
}
DeletedVlanLogCreate is the builder for creating a DeletedVlanLog entity.
func (*DeletedVlanLogCreate) Mutation ¶
func (dvlc *DeletedVlanLogCreate) Mutation() *DeletedVlanLogMutation
Mutation returns the DeletedVlanLogMutation object of the builder.
func (*DeletedVlanLogCreate) Save ¶
func (dvlc *DeletedVlanLogCreate) Save(ctx context.Context) (*DeletedVlanLog, error)
Save creates the DeletedVlanLog in the database.
func (*DeletedVlanLogCreate) SaveX ¶
func (dvlc *DeletedVlanLogCreate) SaveX(ctx context.Context) *DeletedVlanLog
SaveX calls Save and panics if Save returns an error.
func (*DeletedVlanLogCreate) SetDeleted ¶
func (dvlc *DeletedVlanLogCreate) SetDeleted(b bool) *DeletedVlanLogCreate
SetDeleted sets the "deleted" field.
func (*DeletedVlanLogCreate) SetNillableDeleted ¶
func (dvlc *DeletedVlanLogCreate) SetNillableDeleted(b *bool) *DeletedVlanLogCreate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*DeletedVlanLogCreate) SetNillableOnDeviceID ¶
func (dvlc *DeletedVlanLogCreate) SetNillableOnDeviceID(id *int) *DeletedVlanLogCreate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*DeletedVlanLogCreate) SetOnDevice ¶
func (dvlc *DeletedVlanLogCreate) SetOnDevice(d *Device) *DeletedVlanLogCreate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*DeletedVlanLogCreate) SetOnDeviceID ¶
func (dvlc *DeletedVlanLogCreate) SetOnDeviceID(id int) *DeletedVlanLogCreate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*DeletedVlanLogCreate) SetVlanID ¶
func (dvlc *DeletedVlanLogCreate) SetVlanID(i int) *DeletedVlanLogCreate
SetVlanID sets the "vlan_id" field.
type DeletedVlanLogCreateBulk ¶
type DeletedVlanLogCreateBulk struct {
// contains filtered or unexported fields
}
DeletedVlanLogCreateBulk is the builder for creating many DeletedVlanLog entities in bulk.
func (*DeletedVlanLogCreateBulk) Save ¶
func (dvlcb *DeletedVlanLogCreateBulk) Save(ctx context.Context) ([]*DeletedVlanLog, error)
Save creates the DeletedVlanLog entities in the database.
func (*DeletedVlanLogCreateBulk) SaveX ¶
func (dvlcb *DeletedVlanLogCreateBulk) SaveX(ctx context.Context) []*DeletedVlanLog
SaveX is like Save, but panics if an error occurs.
type DeletedVlanLogDelete ¶
type DeletedVlanLogDelete struct {
// contains filtered or unexported fields
}
DeletedVlanLogDelete is the builder for deleting a DeletedVlanLog entity.
func (*DeletedVlanLogDelete) Exec ¶
func (dvld *DeletedVlanLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DeletedVlanLogDelete) ExecX ¶
func (dvld *DeletedVlanLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DeletedVlanLogDelete) Where ¶
func (dvld *DeletedVlanLogDelete) Where(ps ...predicate.DeletedVlanLog) *DeletedVlanLogDelete
Where adds a new predicate to the DeletedVlanLogDelete builder.
type DeletedVlanLogDeleteOne ¶
type DeletedVlanLogDeleteOne struct {
// contains filtered or unexported fields
}
DeletedVlanLogDeleteOne is the builder for deleting a single DeletedVlanLog entity.
func (*DeletedVlanLogDeleteOne) Exec ¶
func (dvldo *DeletedVlanLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DeletedVlanLogDeleteOne) ExecX ¶
func (dvldo *DeletedVlanLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DeletedVlanLogEdges ¶
type DeletedVlanLogEdges struct { // OnDevice holds the value of the on_device edge. OnDevice *Device `json:"on_device,omitempty"` // contains filtered or unexported fields }
DeletedVlanLogEdges holds the relations/edges for other nodes in the graph.
func (DeletedVlanLogEdges) OnDeviceOrErr ¶
func (e DeletedVlanLogEdges) OnDeviceOrErr() (*Device, error)
OnDeviceOrErr returns the OnDevice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DeletedVlanLogGroupBy ¶
type DeletedVlanLogGroupBy struct {
// contains filtered or unexported fields
}
DeletedVlanLogGroupBy is the group-by builder for DeletedVlanLog entities.
func (*DeletedVlanLogGroupBy) Aggregate ¶
func (dvlgb *DeletedVlanLogGroupBy) Aggregate(fns ...AggregateFunc) *DeletedVlanLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DeletedVlanLogGroupBy) Bool ¶
func (dvlgb *DeletedVlanLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeletedVlanLogGroupBy) BoolX ¶
func (dvlgb *DeletedVlanLogGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DeletedVlanLogGroupBy) Bools ¶
func (dvlgb *DeletedVlanLogGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*DeletedVlanLogGroupBy) BoolsX ¶
func (dvlgb *DeletedVlanLogGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DeletedVlanLogGroupBy) Float64 ¶
func (dvlgb *DeletedVlanLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeletedVlanLogGroupBy) Float64X ¶
func (dvlgb *DeletedVlanLogGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DeletedVlanLogGroupBy) Float64s ¶
func (dvlgb *DeletedVlanLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*DeletedVlanLogGroupBy) Float64sX ¶
func (dvlgb *DeletedVlanLogGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DeletedVlanLogGroupBy) Int ¶
func (dvlgb *DeletedVlanLogGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeletedVlanLogGroupBy) IntX ¶
func (dvlgb *DeletedVlanLogGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DeletedVlanLogGroupBy) Ints ¶
func (dvlgb *DeletedVlanLogGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*DeletedVlanLogGroupBy) IntsX ¶
func (dvlgb *DeletedVlanLogGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DeletedVlanLogGroupBy) Scan ¶
func (dvlgb *DeletedVlanLogGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DeletedVlanLogGroupBy) ScanX ¶
func (dvlgb *DeletedVlanLogGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DeletedVlanLogGroupBy) String ¶
func (dvlgb *DeletedVlanLogGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeletedVlanLogGroupBy) StringX ¶
func (dvlgb *DeletedVlanLogGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DeletedVlanLogMutation ¶
type DeletedVlanLogMutation struct {
// contains filtered or unexported fields
}
DeletedVlanLogMutation represents an operation that mutates the DeletedVlanLog nodes in the graph.
func (*DeletedVlanLogMutation) AddField ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) AddVlanID ¶
func (m *DeletedVlanLogMutation) AddVlanID(i int)
AddVlanID adds i to the "vlan_id" field.
func (*DeletedVlanLogMutation) AddedEdges ¶
func (m *DeletedVlanLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DeletedVlanLogMutation) AddedField ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) AddedFields ¶
func (m *DeletedVlanLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DeletedVlanLogMutation) AddedIDs ¶
func (m *DeletedVlanLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DeletedVlanLogMutation) AddedVlanID ¶
func (m *DeletedVlanLogMutation) AddedVlanID() (r int, exists bool)
AddedVlanID returns the value that was added to the "vlan_id" field in this mutation.
func (*DeletedVlanLogMutation) ClearEdge ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) ClearField ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) ClearOnDevice ¶
func (m *DeletedVlanLogMutation) ClearOnDevice()
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*DeletedVlanLogMutation) ClearedEdges ¶
func (m *DeletedVlanLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DeletedVlanLogMutation) ClearedFields ¶
func (m *DeletedVlanLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DeletedVlanLogMutation) Client ¶
func (m DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) Deleted ¶
func (m *DeletedVlanLogMutation) Deleted() (r bool, exists bool)
Deleted returns the value of the "deleted" field in the mutation.
func (*DeletedVlanLogMutation) EdgeCleared ¶
func (m *DeletedVlanLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DeletedVlanLogMutation) Field ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) FieldCleared ¶
func (m *DeletedVlanLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DeletedVlanLogMutation) Fields ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) ID ¶
func (m *DeletedVlanLogMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*DeletedVlanLogMutation) OldDeleted ¶
func (m *DeletedVlanLogMutation) OldDeleted(ctx context.Context) (v bool, err error)
OldDeleted returns the old "deleted" field's value of the DeletedVlanLog entity. If the DeletedVlanLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) OldVlanID ¶
func (m *DeletedVlanLogMutation) OldVlanID(ctx context.Context) (v int, err error)
OldVlanID returns the old "vlan_id" field's value of the DeletedVlanLog entity. If the DeletedVlanLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeletedVlanLogMutation) OnDeviceCleared ¶
func (m *DeletedVlanLogMutation) OnDeviceCleared() bool
OnDeviceCleared reports if the "on_device" edge to the Device entity was cleared.
func (*DeletedVlanLogMutation) OnDeviceID ¶
func (m *DeletedVlanLogMutation) OnDeviceID() (id int, exists bool)
OnDeviceID returns the "on_device" edge ID in the mutation.
func (*DeletedVlanLogMutation) OnDeviceIDs ¶
func (m *DeletedVlanLogMutation) OnDeviceIDs() (ids []int)
OnDeviceIDs returns the "on_device" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnDeviceID instead. It exists only for internal usage by the builders.
func (*DeletedVlanLogMutation) Op ¶
func (m *DeletedVlanLogMutation) Op() Op
Op returns the operation name.
func (*DeletedVlanLogMutation) RemovedEdges ¶
func (m *DeletedVlanLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DeletedVlanLogMutation) RemovedIDs ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) ResetDeleted ¶
func (m *DeletedVlanLogMutation) ResetDeleted()
ResetDeleted resets all changes to the "deleted" field.
func (*DeletedVlanLogMutation) ResetEdge ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) ResetField ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) ResetOnDevice ¶
func (m *DeletedVlanLogMutation) ResetOnDevice()
ResetOnDevice resets all changes to the "on_device" edge.
func (*DeletedVlanLogMutation) ResetVlanID ¶
func (m *DeletedVlanLogMutation) ResetVlanID()
ResetVlanID resets all changes to the "vlan_id" field.
func (*DeletedVlanLogMutation) SetDeleted ¶
func (m *DeletedVlanLogMutation) SetDeleted(b bool)
SetDeleted sets the "deleted" field.
func (*DeletedVlanLogMutation) SetField ¶
func (m *DeletedVlanLogMutation) 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 (*DeletedVlanLogMutation) SetOnDeviceID ¶
func (m *DeletedVlanLogMutation) SetOnDeviceID(id int)
SetOnDeviceID sets the "on_device" edge to the Device entity by id.
func (*DeletedVlanLogMutation) SetVlanID ¶
func (m *DeletedVlanLogMutation) SetVlanID(i int)
SetVlanID sets the "vlan_id" field.
func (DeletedVlanLogMutation) Tx ¶
func (m DeletedVlanLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DeletedVlanLogMutation) Type ¶
func (m *DeletedVlanLogMutation) Type() string
Type returns the node type of this mutation (DeletedVlanLog).
func (*DeletedVlanLogMutation) VlanID ¶
func (m *DeletedVlanLogMutation) VlanID() (r int, exists bool)
VlanID returns the value of the "vlan_id" field in the mutation.
type DeletedVlanLogQuery ¶
type DeletedVlanLogQuery struct {
// contains filtered or unexported fields
}
DeletedVlanLogQuery is the builder for querying DeletedVlanLog entities.
func (*DeletedVlanLogQuery) All ¶
func (dvlq *DeletedVlanLogQuery) All(ctx context.Context) ([]*DeletedVlanLog, error)
All executes the query and returns a list of DeletedVlanLogs.
func (*DeletedVlanLogQuery) AllX ¶
func (dvlq *DeletedVlanLogQuery) AllX(ctx context.Context) []*DeletedVlanLog
AllX is like All, but panics if an error occurs.
func (*DeletedVlanLogQuery) Clone ¶
func (dvlq *DeletedVlanLogQuery) Clone() *DeletedVlanLogQuery
Clone returns a duplicate of the DeletedVlanLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DeletedVlanLogQuery) Count ¶
func (dvlq *DeletedVlanLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DeletedVlanLogQuery) CountX ¶
func (dvlq *DeletedVlanLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DeletedVlanLogQuery) Exist ¶
func (dvlq *DeletedVlanLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DeletedVlanLogQuery) ExistX ¶
func (dvlq *DeletedVlanLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DeletedVlanLogQuery) First ¶
func (dvlq *DeletedVlanLogQuery) First(ctx context.Context) (*DeletedVlanLog, error)
First returns the first DeletedVlanLog entity from the query. Returns a *NotFoundError when no DeletedVlanLog was found.
func (*DeletedVlanLogQuery) FirstID ¶
func (dvlq *DeletedVlanLogQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DeletedVlanLog ID from the query. Returns a *NotFoundError when no DeletedVlanLog ID was found.
func (*DeletedVlanLogQuery) FirstIDX ¶
func (dvlq *DeletedVlanLogQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DeletedVlanLogQuery) FirstX ¶
func (dvlq *DeletedVlanLogQuery) FirstX(ctx context.Context) *DeletedVlanLog
FirstX is like First, but panics if an error occurs.
func (*DeletedVlanLogQuery) GroupBy ¶
func (dvlq *DeletedVlanLogQuery) GroupBy(field string, fields ...string) *DeletedVlanLogGroupBy
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 { VlanID int `json:"vlan_id,omitempty"` Count int `json:"count,omitempty"` } client.DeletedVlanLog.Query(). GroupBy(deletedvlanlog.FieldVlanID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DeletedVlanLogQuery) IDs ¶
func (dvlq *DeletedVlanLogQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of DeletedVlanLog IDs.
func (*DeletedVlanLogQuery) IDsX ¶
func (dvlq *DeletedVlanLogQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DeletedVlanLogQuery) Limit ¶
func (dvlq *DeletedVlanLogQuery) Limit(limit int) *DeletedVlanLogQuery
Limit adds a limit step to the query.
func (*DeletedVlanLogQuery) Offset ¶
func (dvlq *DeletedVlanLogQuery) Offset(offset int) *DeletedVlanLogQuery
Offset adds an offset step to the query.
func (*DeletedVlanLogQuery) Only ¶
func (dvlq *DeletedVlanLogQuery) Only(ctx context.Context) (*DeletedVlanLog, error)
Only returns a single DeletedVlanLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one DeletedVlanLog entity is not found. Returns a *NotFoundError when no DeletedVlanLog entities are found.
func (*DeletedVlanLogQuery) OnlyID ¶
func (dvlq *DeletedVlanLogQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DeletedVlanLog ID in the query. Returns a *NotSingularError when exactly one DeletedVlanLog ID is not found. Returns a *NotFoundError when no entities are found.
func (*DeletedVlanLogQuery) OnlyIDX ¶
func (dvlq *DeletedVlanLogQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DeletedVlanLogQuery) OnlyX ¶
func (dvlq *DeletedVlanLogQuery) OnlyX(ctx context.Context) *DeletedVlanLog
OnlyX is like Only, but panics if an error occurs.
func (*DeletedVlanLogQuery) Order ¶
func (dvlq *DeletedVlanLogQuery) Order(o ...OrderFunc) *DeletedVlanLogQuery
Order adds an order step to the query.
func (*DeletedVlanLogQuery) QueryOnDevice ¶
func (dvlq *DeletedVlanLogQuery) QueryOnDevice() *DeviceQuery
QueryOnDevice chains the current query on the "on_device" edge.
func (*DeletedVlanLogQuery) Select ¶
func (dvlq *DeletedVlanLogQuery) Select(field string, fields ...string) *DeletedVlanLogSelect
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 { VlanID int `json:"vlan_id,omitempty"` } client.DeletedVlanLog.Query(). Select(deletedvlanlog.FieldVlanID). Scan(ctx, &v)
func (*DeletedVlanLogQuery) Unique ¶
func (dvlq *DeletedVlanLogQuery) Unique(unique bool) *DeletedVlanLogQuery
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 (*DeletedVlanLogQuery) Where ¶
func (dvlq *DeletedVlanLogQuery) Where(ps ...predicate.DeletedVlanLog) *DeletedVlanLogQuery
Where adds a new predicate for the DeletedVlanLogQuery builder.
func (*DeletedVlanLogQuery) WithOnDevice ¶
func (dvlq *DeletedVlanLogQuery) WithOnDevice(opts ...func(*DeviceQuery)) *DeletedVlanLogQuery
WithOnDevice tells the query-builder to eager-load the nodes that are connected to the "on_device" edge. The optional arguments are used to configure the query builder of the edge.
type DeletedVlanLogSelect ¶
type DeletedVlanLogSelect struct { *DeletedVlanLogQuery // contains filtered or unexported fields }
DeletedVlanLogSelect is the builder for selecting fields of DeletedVlanLog entities.
func (*DeletedVlanLogSelect) Bool ¶
func (dvls *DeletedVlanLogSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DeletedVlanLogSelect) BoolX ¶
func (dvls *DeletedVlanLogSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DeletedVlanLogSelect) Bools ¶
func (dvls *DeletedVlanLogSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DeletedVlanLogSelect) BoolsX ¶
func (dvls *DeletedVlanLogSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DeletedVlanLogSelect) Float64 ¶
func (dvls *DeletedVlanLogSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DeletedVlanLogSelect) Float64X ¶
func (dvls *DeletedVlanLogSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DeletedVlanLogSelect) Float64s ¶
func (dvls *DeletedVlanLogSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DeletedVlanLogSelect) Float64sX ¶
func (dvls *DeletedVlanLogSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DeletedVlanLogSelect) Int ¶
func (dvls *DeletedVlanLogSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DeletedVlanLogSelect) IntX ¶
func (dvls *DeletedVlanLogSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DeletedVlanLogSelect) Ints ¶
func (dvls *DeletedVlanLogSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DeletedVlanLogSelect) IntsX ¶
func (dvls *DeletedVlanLogSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DeletedVlanLogSelect) Scan ¶
func (dvls *DeletedVlanLogSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DeletedVlanLogSelect) ScanX ¶
func (dvls *DeletedVlanLogSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DeletedVlanLogSelect) String ¶
func (dvls *DeletedVlanLogSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DeletedVlanLogSelect) StringX ¶
func (dvls *DeletedVlanLogSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DeletedVlanLogUpdate ¶
type DeletedVlanLogUpdate struct {
// contains filtered or unexported fields
}
DeletedVlanLogUpdate is the builder for updating DeletedVlanLog entities.
func (*DeletedVlanLogUpdate) AddVlanID ¶
func (dvlu *DeletedVlanLogUpdate) AddVlanID(i int) *DeletedVlanLogUpdate
AddVlanID adds i to the "vlan_id" field.
func (*DeletedVlanLogUpdate) ClearOnDevice ¶
func (dvlu *DeletedVlanLogUpdate) ClearOnDevice() *DeletedVlanLogUpdate
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*DeletedVlanLogUpdate) Exec ¶
func (dvlu *DeletedVlanLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeletedVlanLogUpdate) ExecX ¶
func (dvlu *DeletedVlanLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeletedVlanLogUpdate) Mutation ¶
func (dvlu *DeletedVlanLogUpdate) Mutation() *DeletedVlanLogMutation
Mutation returns the DeletedVlanLogMutation object of the builder.
func (*DeletedVlanLogUpdate) Save ¶
func (dvlu *DeletedVlanLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DeletedVlanLogUpdate) SaveX ¶
func (dvlu *DeletedVlanLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DeletedVlanLogUpdate) SetDeleted ¶
func (dvlu *DeletedVlanLogUpdate) SetDeleted(b bool) *DeletedVlanLogUpdate
SetDeleted sets the "deleted" field.
func (*DeletedVlanLogUpdate) SetNillableDeleted ¶
func (dvlu *DeletedVlanLogUpdate) SetNillableDeleted(b *bool) *DeletedVlanLogUpdate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*DeletedVlanLogUpdate) SetNillableOnDeviceID ¶
func (dvlu *DeletedVlanLogUpdate) SetNillableOnDeviceID(id *int) *DeletedVlanLogUpdate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*DeletedVlanLogUpdate) SetOnDevice ¶
func (dvlu *DeletedVlanLogUpdate) SetOnDevice(d *Device) *DeletedVlanLogUpdate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*DeletedVlanLogUpdate) SetOnDeviceID ¶
func (dvlu *DeletedVlanLogUpdate) SetOnDeviceID(id int) *DeletedVlanLogUpdate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*DeletedVlanLogUpdate) SetVlanID ¶
func (dvlu *DeletedVlanLogUpdate) SetVlanID(i int) *DeletedVlanLogUpdate
SetVlanID sets the "vlan_id" field.
func (*DeletedVlanLogUpdate) Where ¶
func (dvlu *DeletedVlanLogUpdate) Where(ps ...predicate.DeletedVlanLog) *DeletedVlanLogUpdate
Where adds a new predicate for the DeletedVlanLogUpdate builder.
type DeletedVlanLogUpdateOne ¶
type DeletedVlanLogUpdateOne struct {
// contains filtered or unexported fields
}
DeletedVlanLogUpdateOne is the builder for updating a single DeletedVlanLog entity.
func (*DeletedVlanLogUpdateOne) AddVlanID ¶
func (dvluo *DeletedVlanLogUpdateOne) AddVlanID(i int) *DeletedVlanLogUpdateOne
AddVlanID adds i to the "vlan_id" field.
func (*DeletedVlanLogUpdateOne) ClearOnDevice ¶
func (dvluo *DeletedVlanLogUpdateOne) ClearOnDevice() *DeletedVlanLogUpdateOne
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*DeletedVlanLogUpdateOne) Exec ¶
func (dvluo *DeletedVlanLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DeletedVlanLogUpdateOne) ExecX ¶
func (dvluo *DeletedVlanLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeletedVlanLogUpdateOne) Mutation ¶
func (dvluo *DeletedVlanLogUpdateOne) Mutation() *DeletedVlanLogMutation
Mutation returns the DeletedVlanLogMutation object of the builder.
func (*DeletedVlanLogUpdateOne) Save ¶
func (dvluo *DeletedVlanLogUpdateOne) Save(ctx context.Context) (*DeletedVlanLog, error)
Save executes the query and returns the updated DeletedVlanLog entity.
func (*DeletedVlanLogUpdateOne) SaveX ¶
func (dvluo *DeletedVlanLogUpdateOne) SaveX(ctx context.Context) *DeletedVlanLog
SaveX is like Save, but panics if an error occurs.
func (*DeletedVlanLogUpdateOne) Select ¶
func (dvluo *DeletedVlanLogUpdateOne) Select(field string, fields ...string) *DeletedVlanLogUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DeletedVlanLogUpdateOne) SetDeleted ¶
func (dvluo *DeletedVlanLogUpdateOne) SetDeleted(b bool) *DeletedVlanLogUpdateOne
SetDeleted sets the "deleted" field.
func (*DeletedVlanLogUpdateOne) SetNillableDeleted ¶
func (dvluo *DeletedVlanLogUpdateOne) SetNillableDeleted(b *bool) *DeletedVlanLogUpdateOne
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*DeletedVlanLogUpdateOne) SetNillableOnDeviceID ¶
func (dvluo *DeletedVlanLogUpdateOne) SetNillableOnDeviceID(id *int) *DeletedVlanLogUpdateOne
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*DeletedVlanLogUpdateOne) SetOnDevice ¶
func (dvluo *DeletedVlanLogUpdateOne) SetOnDevice(d *Device) *DeletedVlanLogUpdateOne
SetOnDevice sets the "on_device" edge to the Device entity.
func (*DeletedVlanLogUpdateOne) SetOnDeviceID ¶
func (dvluo *DeletedVlanLogUpdateOne) SetOnDeviceID(id int) *DeletedVlanLogUpdateOne
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*DeletedVlanLogUpdateOne) SetVlanID ¶
func (dvluo *DeletedVlanLogUpdateOne) SetVlanID(i int) *DeletedVlanLogUpdateOne
SetVlanID sets the "vlan_id" field.
type DeletedVlanLogs ¶
type DeletedVlanLogs []*DeletedVlanLog
DeletedVlanLogs is a parsable slice of DeletedVlanLog.
type Device ¶
type Device struct { // ID of the ent. ID int `json:"id,omitempty"` // DeviceName holds the value of the "device_name" field. DeviceName string `json:"device_name,omitempty"` // DeviceHostname holds the value of the "device_hostname" field. DeviceHostname string `json:"device_hostname,omitempty"` // DeviceUsername holds the value of the "device_username" field. DeviceUsername string `json:"device_username,omitempty"` // DevicePassword holds the value of the "device_password" field. DevicePassword string `json:"device_password,omitempty"` // DeviceSecret holds the value of the "device_secret" field. DeviceSecret string `json:"device_secret,omitempty"` // DeviceSSHPort holds the value of the "device_ssh_port" field. DeviceSSHPort int `json:"device_ssh_port,omitempty"` // DeviceCommitConfig holds the value of the "device_commit_config" field. DeviceCommitConfig bool `json:"device_commit_config,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DeviceQuery when eager-loading is set. Edges DeviceEdges `json:"edges"` // contains filtered or unexported fields }
Device is the model entity for the Device schema.
func (*Device) QueryDeletedVlans ¶
func (d *Device) QueryDeletedVlans() *DeletedVlanLogQuery
QueryDeletedVlans queries the "deleted_vlans" edge of the Device entity.
func (*Device) QueryHaveIPAddresses ¶ added in v0.2.0
func (d *Device) QueryHaveIPAddresses() *IPAddressQuery
QueryHaveIPAddresses queries the "have_ip_addresses" edge of the Device entity.
func (*Device) QueryIPStaticRouting ¶ added in v0.2.0
func (d *Device) QueryIPStaticRouting() *IPStaticRoutingTableQuery
QueryIPStaticRouting queries the "ip_static_routing" edge of the Device entity.
func (*Device) QueryInPlatform ¶
func (d *Device) QueryInPlatform() *DevicePlatformQuery
QueryInPlatform queries the "in_platform" edge of the Device entity.
func (*Device) QueryInTopology ¶
func (d *Device) QueryInTopology() *NetTopologyDeviceMapQuery
QueryInTopology queries the "in_topology" edge of the Device entity.
func (*Device) QueryInType ¶
func (d *Device) QueryInType() *DeviceTypeQuery
QueryInType queries the "in_type" edge of the Device entity.
func (*Device) QueryInterfaces ¶
func (d *Device) QueryInterfaces() *NetInterfaceQuery
QueryInterfaces queries the "interfaces" edge of the Device entity.
func (*Device) QueryPoInterfaces ¶ added in v0.2.0
func (d *Device) QueryPoInterfaces() *PortChannelInterfaceQuery
QueryPoInterfaces queries the "po_interfaces" edge of the Device entity.
func (*Device) QueryStoreVlans ¶
QueryStoreVlans queries the "store_vlans" edge of the Device entity.
func (*Device) Unwrap ¶
Unwrap unwraps the Device 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 (*Device) Update ¶
func (d *Device) Update() *DeviceUpdateOne
Update returns a builder for updating this Device. Note that you need to call Device.Unwrap() before calling this method if this Device was returned from a transaction, and the transaction was committed or rolled back.
type DeviceClient ¶
type DeviceClient struct {
// contains filtered or unexported fields
}
DeviceClient is a client for the Device schema.
func NewDeviceClient ¶
func NewDeviceClient(c config) *DeviceClient
NewDeviceClient returns a client for the Device from the given config.
func (*DeviceClient) Create ¶
func (c *DeviceClient) Create() *DeviceCreate
Create returns a create builder for Device.
func (*DeviceClient) CreateBulk ¶
func (c *DeviceClient) CreateBulk(builders ...*DeviceCreate) *DeviceCreateBulk
CreateBulk returns a builder for creating a bulk of Device entities.
func (*DeviceClient) Delete ¶
func (c *DeviceClient) Delete() *DeviceDelete
Delete returns a delete builder for Device.
func (*DeviceClient) DeleteOne ¶
func (c *DeviceClient) DeleteOne(d *Device) *DeviceDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DeviceClient) DeleteOneID ¶
func (c *DeviceClient) DeleteOneID(id int) *DeviceDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DeviceClient) GetX ¶
func (c *DeviceClient) GetX(ctx context.Context, id int) *Device
GetX is like Get, but panics if an error occurs.
func (*DeviceClient) Query ¶
func (c *DeviceClient) Query() *DeviceQuery
Query returns a query builder for Device.
func (*DeviceClient) QueryDeletedVlans ¶
func (c *DeviceClient) QueryDeletedVlans(d *Device) *DeletedVlanLogQuery
QueryDeletedVlans queries the deleted_vlans edge of a Device.
func (*DeviceClient) QueryHaveIPAddresses ¶ added in v0.2.0
func (c *DeviceClient) QueryHaveIPAddresses(d *Device) *IPAddressQuery
QueryHaveIPAddresses queries the have_ip_addresses edge of a Device.
func (*DeviceClient) QueryIPStaticRouting ¶ added in v0.2.0
func (c *DeviceClient) QueryIPStaticRouting(d *Device) *IPStaticRoutingTableQuery
QueryIPStaticRouting queries the ip_static_routing edge of a Device.
func (*DeviceClient) QueryInPlatform ¶
func (c *DeviceClient) QueryInPlatform(d *Device) *DevicePlatformQuery
QueryInPlatform queries the in_platform edge of a Device.
func (*DeviceClient) QueryInTopology ¶
func (c *DeviceClient) QueryInTopology(d *Device) *NetTopologyDeviceMapQuery
QueryInTopology queries the in_topology edge of a Device.
func (*DeviceClient) QueryInType ¶
func (c *DeviceClient) QueryInType(d *Device) *DeviceTypeQuery
QueryInType queries the in_type edge of a Device.
func (*DeviceClient) QueryInterfaces ¶
func (c *DeviceClient) QueryInterfaces(d *Device) *NetInterfaceQuery
QueryInterfaces queries the interfaces edge of a Device.
func (*DeviceClient) QueryPoInterfaces ¶ added in v0.2.0
func (c *DeviceClient) QueryPoInterfaces(d *Device) *PortChannelInterfaceQuery
QueryPoInterfaces queries the po_interfaces edge of a Device.
func (*DeviceClient) QueryStoreVlans ¶
func (c *DeviceClient) QueryStoreVlans(d *Device) *VlanQuery
QueryStoreVlans queries the store_vlans edge of a Device.
func (*DeviceClient) Update ¶
func (c *DeviceClient) Update() *DeviceUpdate
Update returns an update builder for Device.
func (*DeviceClient) UpdateOne ¶
func (c *DeviceClient) UpdateOne(d *Device) *DeviceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DeviceClient) UpdateOneID ¶
func (c *DeviceClient) UpdateOneID(id int) *DeviceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DeviceClient) Use ¶
func (c *DeviceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `device.Hooks(f(g(h())))`.
type DeviceCreate ¶
type DeviceCreate struct {
// contains filtered or unexported fields
}
DeviceCreate is the builder for creating a Device entity.
func (*DeviceCreate) AddDeletedVlanIDs ¶
func (dc *DeviceCreate) AddDeletedVlanIDs(ids ...int) *DeviceCreate
AddDeletedVlanIDs adds the "deleted_vlans" edge to the DeletedVlanLog entity by IDs.
func (*DeviceCreate) AddDeletedVlans ¶
func (dc *DeviceCreate) AddDeletedVlans(d ...*DeletedVlanLog) *DeviceCreate
AddDeletedVlans adds the "deleted_vlans" edges to the DeletedVlanLog entity.
func (*DeviceCreate) AddHaveIPAddressIDs ¶ added in v0.2.0
func (dc *DeviceCreate) AddHaveIPAddressIDs(ids ...int) *DeviceCreate
AddHaveIPAddressIDs adds the "have_ip_addresses" edge to the IPAddress entity by IDs.
func (*DeviceCreate) AddHaveIPAddresses ¶ added in v0.2.0
func (dc *DeviceCreate) AddHaveIPAddresses(i ...*IPAddress) *DeviceCreate
AddHaveIPAddresses adds the "have_ip_addresses" edges to the IPAddress entity.
func (*DeviceCreate) AddIPStaticRouting ¶ added in v0.2.0
func (dc *DeviceCreate) AddIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceCreate
AddIPStaticRouting adds the "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*DeviceCreate) AddIPStaticRoutingIDs ¶ added in v0.2.0
func (dc *DeviceCreate) AddIPStaticRoutingIDs(ids ...int) *DeviceCreate
AddIPStaticRoutingIDs adds the "ip_static_routing" edge to the IPStaticRoutingTable entity by IDs.
func (*DeviceCreate) AddInTopology ¶
func (dc *DeviceCreate) AddInTopology(n ...*NetTopologyDeviceMap) *DeviceCreate
AddInTopology adds the "in_topology" edges to the NetTopologyDeviceMap entity.
func (*DeviceCreate) AddInTopologyIDs ¶
func (dc *DeviceCreate) AddInTopologyIDs(ids ...int) *DeviceCreate
AddInTopologyIDs adds the "in_topology" edge to the NetTopologyDeviceMap entity by IDs.
func (*DeviceCreate) AddInterfaceIDs ¶
func (dc *DeviceCreate) AddInterfaceIDs(ids ...int) *DeviceCreate
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by IDs.
func (*DeviceCreate) AddInterfaces ¶
func (dc *DeviceCreate) AddInterfaces(n ...*NetInterface) *DeviceCreate
AddInterfaces adds the "interfaces" edges to the NetInterface entity.
func (*DeviceCreate) AddPoInterfaceIDs ¶ added in v0.2.0
func (dc *DeviceCreate) AddPoInterfaceIDs(ids ...int) *DeviceCreate
AddPoInterfaceIDs adds the "po_interfaces" edge to the PortChannelInterface entity by IDs.
func (*DeviceCreate) AddPoInterfaces ¶ added in v0.2.0
func (dc *DeviceCreate) AddPoInterfaces(p ...*PortChannelInterface) *DeviceCreate
AddPoInterfaces adds the "po_interfaces" edges to the PortChannelInterface entity.
func (*DeviceCreate) AddStoreVlanIDs ¶
func (dc *DeviceCreate) AddStoreVlanIDs(ids ...int) *DeviceCreate
AddStoreVlanIDs adds the "store_vlans" edge to the Vlan entity by IDs.
func (*DeviceCreate) AddStoreVlans ¶
func (dc *DeviceCreate) AddStoreVlans(v ...*Vlan) *DeviceCreate
AddStoreVlans adds the "store_vlans" edges to the Vlan entity.
func (*DeviceCreate) Mutation ¶
func (dc *DeviceCreate) Mutation() *DeviceMutation
Mutation returns the DeviceMutation object of the builder.
func (*DeviceCreate) Save ¶
func (dc *DeviceCreate) Save(ctx context.Context) (*Device, error)
Save creates the Device in the database.
func (*DeviceCreate) SaveX ¶
func (dc *DeviceCreate) SaveX(ctx context.Context) *Device
SaveX calls Save and panics if Save returns an error.
func (*DeviceCreate) SetDeviceCommitConfig ¶
func (dc *DeviceCreate) SetDeviceCommitConfig(b bool) *DeviceCreate
SetDeviceCommitConfig sets the "device_commit_config" field.
func (*DeviceCreate) SetDeviceHostname ¶
func (dc *DeviceCreate) SetDeviceHostname(s string) *DeviceCreate
SetDeviceHostname sets the "device_hostname" field.
func (*DeviceCreate) SetDeviceName ¶
func (dc *DeviceCreate) SetDeviceName(s string) *DeviceCreate
SetDeviceName sets the "device_name" field.
func (*DeviceCreate) SetDevicePassword ¶
func (dc *DeviceCreate) SetDevicePassword(s string) *DeviceCreate
SetDevicePassword sets the "device_password" field.
func (*DeviceCreate) SetDeviceSSHPort ¶
func (dc *DeviceCreate) SetDeviceSSHPort(i int) *DeviceCreate
SetDeviceSSHPort sets the "device_ssh_port" field.
func (*DeviceCreate) SetDeviceSecret ¶
func (dc *DeviceCreate) SetDeviceSecret(s string) *DeviceCreate
SetDeviceSecret sets the "device_secret" field.
func (*DeviceCreate) SetDeviceUsername ¶
func (dc *DeviceCreate) SetDeviceUsername(s string) *DeviceCreate
SetDeviceUsername sets the "device_username" field.
func (*DeviceCreate) SetInPlatform ¶
func (dc *DeviceCreate) SetInPlatform(d *DevicePlatform) *DeviceCreate
SetInPlatform sets the "in_platform" edge to the DevicePlatform entity.
func (*DeviceCreate) SetInPlatformID ¶
func (dc *DeviceCreate) SetInPlatformID(id int) *DeviceCreate
SetInPlatformID sets the "in_platform" edge to the DevicePlatform entity by ID.
func (*DeviceCreate) SetInType ¶
func (dc *DeviceCreate) SetInType(d *DeviceType) *DeviceCreate
SetInType sets the "in_type" edge to the DeviceType entity.
func (*DeviceCreate) SetInTypeID ¶
func (dc *DeviceCreate) SetInTypeID(id int) *DeviceCreate
SetInTypeID sets the "in_type" edge to the DeviceType entity by ID.
func (*DeviceCreate) SetNillableDeviceCommitConfig ¶
func (dc *DeviceCreate) SetNillableDeviceCommitConfig(b *bool) *DeviceCreate
SetNillableDeviceCommitConfig sets the "device_commit_config" field if the given value is not nil.
func (*DeviceCreate) SetNillableDevicePassword ¶
func (dc *DeviceCreate) SetNillableDevicePassword(s *string) *DeviceCreate
SetNillableDevicePassword sets the "device_password" field if the given value is not nil.
func (*DeviceCreate) SetNillableDeviceSSHPort ¶
func (dc *DeviceCreate) SetNillableDeviceSSHPort(i *int) *DeviceCreate
SetNillableDeviceSSHPort sets the "device_ssh_port" field if the given value is not nil.
func (*DeviceCreate) SetNillableDeviceSecret ¶
func (dc *DeviceCreate) SetNillableDeviceSecret(s *string) *DeviceCreate
SetNillableDeviceSecret sets the "device_secret" field if the given value is not nil.
func (*DeviceCreate) SetNillableDeviceUsername ¶
func (dc *DeviceCreate) SetNillableDeviceUsername(s *string) *DeviceCreate
SetNillableDeviceUsername sets the "device_username" field if the given value is not nil.
func (*DeviceCreate) SetNillableInPlatformID ¶
func (dc *DeviceCreate) SetNillableInPlatformID(id *int) *DeviceCreate
SetNillableInPlatformID sets the "in_platform" edge to the DevicePlatform entity by ID if the given value is not nil.
func (*DeviceCreate) SetNillableInTypeID ¶
func (dc *DeviceCreate) SetNillableInTypeID(id *int) *DeviceCreate
SetNillableInTypeID sets the "in_type" edge to the DeviceType entity by ID if the given value is not nil.
type DeviceCreateBulk ¶
type DeviceCreateBulk struct {
// contains filtered or unexported fields
}
DeviceCreateBulk is the builder for creating many Device entities in bulk.
type DeviceDelete ¶
type DeviceDelete struct {
// contains filtered or unexported fields
}
DeviceDelete is the builder for deleting a Device entity.
func (*DeviceDelete) Exec ¶
func (dd *DeviceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DeviceDelete) ExecX ¶
func (dd *DeviceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DeviceDelete) Where ¶
func (dd *DeviceDelete) Where(ps ...predicate.Device) *DeviceDelete
Where adds a new predicate to the DeviceDelete builder.
type DeviceDeleteOne ¶
type DeviceDeleteOne struct {
// contains filtered or unexported fields
}
DeviceDeleteOne is the builder for deleting a single Device entity.
func (*DeviceDeleteOne) Exec ¶
func (ddo *DeviceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DeviceDeleteOne) ExecX ¶
func (ddo *DeviceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DeviceEdges ¶
type DeviceEdges struct { // InType holds the value of the in_type edge. InType *DeviceType `json:"in_type,omitempty"` // InPlatform holds the value of the in_platform edge. InPlatform *DevicePlatform `json:"in_platform,omitempty"` // Interfaces holds the value of the interfaces edge. Interfaces []*NetInterface `json:"interfaces,omitempty"` // IPStaticRouting holds the value of the ip_static_routing edge. IPStaticRouting []*IPStaticRoutingTable `json:"ip_static_routing,omitempty"` // PoInterfaces holds the value of the po_interfaces edge. PoInterfaces []*PortChannelInterface `json:"po_interfaces,omitempty"` // HaveIPAddresses holds the value of the have_ip_addresses edge. HaveIPAddresses []*IPAddress `json:"have_ip_addresses,omitempty"` // InTopology holds the value of the in_topology edge. InTopology []*NetTopologyDeviceMap `json:"in_topology,omitempty"` // StoreVlans holds the value of the store_vlans edge. StoreVlans []*Vlan `json:"store_vlans,omitempty"` // DeletedVlans holds the value of the deleted_vlans edge. DeletedVlans []*DeletedVlanLog `json:"deleted_vlans,omitempty"` // contains filtered or unexported fields }
DeviceEdges holds the relations/edges for other nodes in the graph.
func (DeviceEdges) DeletedVlansOrErr ¶
func (e DeviceEdges) DeletedVlansOrErr() ([]*DeletedVlanLog, error)
DeletedVlansOrErr returns the DeletedVlans value or an error if the edge was not loaded in eager-loading.
func (DeviceEdges) HaveIPAddressesOrErr ¶ added in v0.2.0
func (e DeviceEdges) HaveIPAddressesOrErr() ([]*IPAddress, error)
HaveIPAddressesOrErr returns the HaveIPAddresses value or an error if the edge was not loaded in eager-loading.
func (DeviceEdges) IPStaticRoutingOrErr ¶ added in v0.2.0
func (e DeviceEdges) IPStaticRoutingOrErr() ([]*IPStaticRoutingTable, error)
IPStaticRoutingOrErr returns the IPStaticRouting value or an error if the edge was not loaded in eager-loading.
func (DeviceEdges) InPlatformOrErr ¶
func (e DeviceEdges) InPlatformOrErr() (*DevicePlatform, error)
InPlatformOrErr returns the InPlatform value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (DeviceEdges) InTopologyOrErr ¶
func (e DeviceEdges) InTopologyOrErr() ([]*NetTopologyDeviceMap, error)
InTopologyOrErr returns the InTopology value or an error if the edge was not loaded in eager-loading.
func (DeviceEdges) InTypeOrErr ¶
func (e DeviceEdges) InTypeOrErr() (*DeviceType, error)
InTypeOrErr returns the InType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (DeviceEdges) InterfacesOrErr ¶
func (e DeviceEdges) InterfacesOrErr() ([]*NetInterface, error)
InterfacesOrErr returns the Interfaces value or an error if the edge was not loaded in eager-loading.
func (DeviceEdges) PoInterfacesOrErr ¶ added in v0.2.0
func (e DeviceEdges) PoInterfacesOrErr() ([]*PortChannelInterface, error)
PoInterfacesOrErr returns the PoInterfaces value or an error if the edge was not loaded in eager-loading.
func (DeviceEdges) StoreVlansOrErr ¶
func (e DeviceEdges) StoreVlansOrErr() ([]*Vlan, error)
StoreVlansOrErr returns the StoreVlans value or an error if the edge was not loaded in eager-loading.
type DeviceGroupBy ¶
type DeviceGroupBy struct {
// contains filtered or unexported fields
}
DeviceGroupBy is the group-by builder for Device entities.
func (*DeviceGroupBy) Aggregate ¶
func (dgb *DeviceGroupBy) Aggregate(fns ...AggregateFunc) *DeviceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DeviceGroupBy) Bool ¶
func (dgb *DeviceGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeviceGroupBy) BoolX ¶
func (dgb *DeviceGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DeviceGroupBy) Bools ¶
func (dgb *DeviceGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*DeviceGroupBy) BoolsX ¶
func (dgb *DeviceGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DeviceGroupBy) Float64 ¶
func (dgb *DeviceGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeviceGroupBy) Float64X ¶
func (dgb *DeviceGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DeviceGroupBy) Float64s ¶
func (dgb *DeviceGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*DeviceGroupBy) Float64sX ¶
func (dgb *DeviceGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DeviceGroupBy) Int ¶
func (dgb *DeviceGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeviceGroupBy) IntX ¶
func (dgb *DeviceGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DeviceGroupBy) Ints ¶
func (dgb *DeviceGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*DeviceGroupBy) IntsX ¶
func (dgb *DeviceGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DeviceGroupBy) Scan ¶
func (dgb *DeviceGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DeviceGroupBy) ScanX ¶
func (dgb *DeviceGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DeviceGroupBy) String ¶
func (dgb *DeviceGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeviceGroupBy) StringX ¶
func (dgb *DeviceGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DeviceMutation ¶
type DeviceMutation struct {
// contains filtered or unexported fields
}
DeviceMutation represents an operation that mutates the Device nodes in the graph.
func (*DeviceMutation) AddDeletedVlanIDs ¶
func (m *DeviceMutation) AddDeletedVlanIDs(ids ...int)
AddDeletedVlanIDs adds the "deleted_vlans" edge to the DeletedVlanLog entity by ids.
func (*DeviceMutation) AddDeviceSSHPort ¶
func (m *DeviceMutation) AddDeviceSSHPort(i int)
AddDeviceSSHPort adds i to the "device_ssh_port" field.
func (*DeviceMutation) AddField ¶
func (m *DeviceMutation) 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 (*DeviceMutation) AddHaveIPAddressIDs ¶ added in v0.2.0
func (m *DeviceMutation) AddHaveIPAddressIDs(ids ...int)
AddHaveIPAddressIDs adds the "have_ip_addresses" edge to the IPAddress entity by ids.
func (*DeviceMutation) AddIPStaticRoutingIDs ¶ added in v0.2.0
func (m *DeviceMutation) AddIPStaticRoutingIDs(ids ...int)
AddIPStaticRoutingIDs adds the "ip_static_routing" edge to the IPStaticRoutingTable entity by ids.
func (*DeviceMutation) AddInTopologyIDs ¶
func (m *DeviceMutation) AddInTopologyIDs(ids ...int)
AddInTopologyIDs adds the "in_topology" edge to the NetTopologyDeviceMap entity by ids.
func (*DeviceMutation) AddInterfaceIDs ¶
func (m *DeviceMutation) AddInterfaceIDs(ids ...int)
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by ids.
func (*DeviceMutation) AddPoInterfaceIDs ¶ added in v0.2.0
func (m *DeviceMutation) AddPoInterfaceIDs(ids ...int)
AddPoInterfaceIDs adds the "po_interfaces" edge to the PortChannelInterface entity by ids.
func (*DeviceMutation) AddStoreVlanIDs ¶
func (m *DeviceMutation) AddStoreVlanIDs(ids ...int)
AddStoreVlanIDs adds the "store_vlans" edge to the Vlan entity by ids.
func (*DeviceMutation) AddedDeviceSSHPort ¶
func (m *DeviceMutation) AddedDeviceSSHPort() (r int, exists bool)
AddedDeviceSSHPort returns the value that was added to the "device_ssh_port" field in this mutation.
func (*DeviceMutation) AddedEdges ¶
func (m *DeviceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DeviceMutation) AddedField ¶
func (m *DeviceMutation) 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 (*DeviceMutation) AddedFields ¶
func (m *DeviceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DeviceMutation) AddedIDs ¶
func (m *DeviceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DeviceMutation) ClearDeletedVlans ¶
func (m *DeviceMutation) ClearDeletedVlans()
ClearDeletedVlans clears the "deleted_vlans" edge to the DeletedVlanLog entity.
func (*DeviceMutation) ClearDevicePassword ¶
func (m *DeviceMutation) ClearDevicePassword()
ClearDevicePassword clears the value of the "device_password" field.
func (*DeviceMutation) ClearDeviceSecret ¶
func (m *DeviceMutation) ClearDeviceSecret()
ClearDeviceSecret clears the value of the "device_secret" field.
func (*DeviceMutation) ClearDeviceUsername ¶
func (m *DeviceMutation) ClearDeviceUsername()
ClearDeviceUsername clears the value of the "device_username" field.
func (*DeviceMutation) ClearEdge ¶
func (m *DeviceMutation) 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 (*DeviceMutation) ClearField ¶
func (m *DeviceMutation) 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 (*DeviceMutation) ClearHaveIPAddresses ¶ added in v0.2.0
func (m *DeviceMutation) ClearHaveIPAddresses()
ClearHaveIPAddresses clears the "have_ip_addresses" edge to the IPAddress entity.
func (*DeviceMutation) ClearIPStaticRouting ¶ added in v0.2.0
func (m *DeviceMutation) ClearIPStaticRouting()
ClearIPStaticRouting clears the "ip_static_routing" edge to the IPStaticRoutingTable entity.
func (*DeviceMutation) ClearInPlatform ¶
func (m *DeviceMutation) ClearInPlatform()
ClearInPlatform clears the "in_platform" edge to the DevicePlatform entity.
func (*DeviceMutation) ClearInTopology ¶
func (m *DeviceMutation) ClearInTopology()
ClearInTopology clears the "in_topology" edge to the NetTopologyDeviceMap entity.
func (*DeviceMutation) ClearInType ¶
func (m *DeviceMutation) ClearInType()
ClearInType clears the "in_type" edge to the DeviceType entity.
func (*DeviceMutation) ClearInterfaces ¶
func (m *DeviceMutation) ClearInterfaces()
ClearInterfaces clears the "interfaces" edge to the NetInterface entity.
func (*DeviceMutation) ClearPoInterfaces ¶ added in v0.2.0
func (m *DeviceMutation) ClearPoInterfaces()
ClearPoInterfaces clears the "po_interfaces" edge to the PortChannelInterface entity.
func (*DeviceMutation) ClearStoreVlans ¶
func (m *DeviceMutation) ClearStoreVlans()
ClearStoreVlans clears the "store_vlans" edge to the Vlan entity.
func (*DeviceMutation) ClearedEdges ¶
func (m *DeviceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DeviceMutation) ClearedFields ¶
func (m *DeviceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DeviceMutation) Client ¶
func (m DeviceMutation) 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 (*DeviceMutation) DeletedVlansCleared ¶
func (m *DeviceMutation) DeletedVlansCleared() bool
DeletedVlansCleared reports if the "deleted_vlans" edge to the DeletedVlanLog entity was cleared.
func (*DeviceMutation) DeletedVlansIDs ¶
func (m *DeviceMutation) DeletedVlansIDs() (ids []int)
DeletedVlansIDs returns the "deleted_vlans" edge IDs in the mutation.
func (*DeviceMutation) DeviceCommitConfig ¶
func (m *DeviceMutation) DeviceCommitConfig() (r bool, exists bool)
DeviceCommitConfig returns the value of the "device_commit_config" field in the mutation.
func (*DeviceMutation) DeviceHostname ¶
func (m *DeviceMutation) DeviceHostname() (r string, exists bool)
DeviceHostname returns the value of the "device_hostname" field in the mutation.
func (*DeviceMutation) DeviceName ¶
func (m *DeviceMutation) DeviceName() (r string, exists bool)
DeviceName returns the value of the "device_name" field in the mutation.
func (*DeviceMutation) DevicePassword ¶
func (m *DeviceMutation) DevicePassword() (r string, exists bool)
DevicePassword returns the value of the "device_password" field in the mutation.
func (*DeviceMutation) DevicePasswordCleared ¶
func (m *DeviceMutation) DevicePasswordCleared() bool
DevicePasswordCleared returns if the "device_password" field was cleared in this mutation.
func (*DeviceMutation) DeviceSSHPort ¶
func (m *DeviceMutation) DeviceSSHPort() (r int, exists bool)
DeviceSSHPort returns the value of the "device_ssh_port" field in the mutation.
func (*DeviceMutation) DeviceSecret ¶
func (m *DeviceMutation) DeviceSecret() (r string, exists bool)
DeviceSecret returns the value of the "device_secret" field in the mutation.
func (*DeviceMutation) DeviceSecretCleared ¶
func (m *DeviceMutation) DeviceSecretCleared() bool
DeviceSecretCleared returns if the "device_secret" field was cleared in this mutation.
func (*DeviceMutation) DeviceUsername ¶
func (m *DeviceMutation) DeviceUsername() (r string, exists bool)
DeviceUsername returns the value of the "device_username" field in the mutation.
func (*DeviceMutation) DeviceUsernameCleared ¶
func (m *DeviceMutation) DeviceUsernameCleared() bool
DeviceUsernameCleared returns if the "device_username" field was cleared in this mutation.
func (*DeviceMutation) EdgeCleared ¶
func (m *DeviceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DeviceMutation) Field ¶
func (m *DeviceMutation) 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 (*DeviceMutation) FieldCleared ¶
func (m *DeviceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DeviceMutation) Fields ¶
func (m *DeviceMutation) 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 (*DeviceMutation) HaveIPAddressesCleared ¶ added in v0.2.0
func (m *DeviceMutation) HaveIPAddressesCleared() bool
HaveIPAddressesCleared reports if the "have_ip_addresses" edge to the IPAddress entity was cleared.
func (*DeviceMutation) HaveIPAddressesIDs ¶ added in v0.2.0
func (m *DeviceMutation) HaveIPAddressesIDs() (ids []int)
HaveIPAddressesIDs returns the "have_ip_addresses" edge IDs in the mutation.
func (*DeviceMutation) ID ¶
func (m *DeviceMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*DeviceMutation) IPStaticRoutingCleared ¶ added in v0.2.0
func (m *DeviceMutation) IPStaticRoutingCleared() bool
IPStaticRoutingCleared reports if the "ip_static_routing" edge to the IPStaticRoutingTable entity was cleared.
func (*DeviceMutation) IPStaticRoutingIDs ¶ added in v0.2.0
func (m *DeviceMutation) IPStaticRoutingIDs() (ids []int)
IPStaticRoutingIDs returns the "ip_static_routing" edge IDs in the mutation.
func (*DeviceMutation) InPlatformCleared ¶
func (m *DeviceMutation) InPlatformCleared() bool
InPlatformCleared reports if the "in_platform" edge to the DevicePlatform entity was cleared.
func (*DeviceMutation) InPlatformID ¶
func (m *DeviceMutation) InPlatformID() (id int, exists bool)
InPlatformID returns the "in_platform" edge ID in the mutation.
func (*DeviceMutation) InPlatformIDs ¶
func (m *DeviceMutation) InPlatformIDs() (ids []int)
InPlatformIDs returns the "in_platform" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InPlatformID instead. It exists only for internal usage by the builders.
func (*DeviceMutation) InTopologyCleared ¶
func (m *DeviceMutation) InTopologyCleared() bool
InTopologyCleared reports if the "in_topology" edge to the NetTopologyDeviceMap entity was cleared.
func (*DeviceMutation) InTopologyIDs ¶
func (m *DeviceMutation) InTopologyIDs() (ids []int)
InTopologyIDs returns the "in_topology" edge IDs in the mutation.
func (*DeviceMutation) InTypeCleared ¶
func (m *DeviceMutation) InTypeCleared() bool
InTypeCleared reports if the "in_type" edge to the DeviceType entity was cleared.
func (*DeviceMutation) InTypeID ¶
func (m *DeviceMutation) InTypeID() (id int, exists bool)
InTypeID returns the "in_type" edge ID in the mutation.
func (*DeviceMutation) InTypeIDs ¶
func (m *DeviceMutation) InTypeIDs() (ids []int)
InTypeIDs returns the "in_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InTypeID instead. It exists only for internal usage by the builders.
func (*DeviceMutation) InterfacesCleared ¶
func (m *DeviceMutation) InterfacesCleared() bool
InterfacesCleared reports if the "interfaces" edge to the NetInterface entity was cleared.
func (*DeviceMutation) InterfacesIDs ¶
func (m *DeviceMutation) InterfacesIDs() (ids []int)
InterfacesIDs returns the "interfaces" edge IDs in the mutation.
func (*DeviceMutation) OldDeviceCommitConfig ¶
func (m *DeviceMutation) OldDeviceCommitConfig(ctx context.Context) (v bool, err error)
OldDeviceCommitConfig returns the old "device_commit_config" field's value of the Device entity. If the Device object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeviceMutation) OldDeviceHostname ¶
func (m *DeviceMutation) OldDeviceHostname(ctx context.Context) (v string, err error)
OldDeviceHostname returns the old "device_hostname" field's value of the Device entity. If the Device object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeviceMutation) OldDeviceName ¶
func (m *DeviceMutation) OldDeviceName(ctx context.Context) (v string, err error)
OldDeviceName returns the old "device_name" field's value of the Device entity. If the Device object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeviceMutation) OldDevicePassword ¶
func (m *DeviceMutation) OldDevicePassword(ctx context.Context) (v string, err error)
OldDevicePassword returns the old "device_password" field's value of the Device entity. If the Device object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeviceMutation) OldDeviceSSHPort ¶
func (m *DeviceMutation) OldDeviceSSHPort(ctx context.Context) (v int, err error)
OldDeviceSSHPort returns the old "device_ssh_port" field's value of the Device entity. If the Device object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeviceMutation) OldDeviceSecret ¶
func (m *DeviceMutation) OldDeviceSecret(ctx context.Context) (v string, err error)
OldDeviceSecret returns the old "device_secret" field's value of the Device entity. If the Device object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeviceMutation) OldDeviceUsername ¶
func (m *DeviceMutation) OldDeviceUsername(ctx context.Context) (v string, err error)
OldDeviceUsername returns the old "device_username" field's value of the Device entity. If the Device object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeviceMutation) 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 (*DeviceMutation) PoInterfacesCleared ¶ added in v0.2.0
func (m *DeviceMutation) PoInterfacesCleared() bool
PoInterfacesCleared reports if the "po_interfaces" edge to the PortChannelInterface entity was cleared.
func (*DeviceMutation) PoInterfacesIDs ¶ added in v0.2.0
func (m *DeviceMutation) PoInterfacesIDs() (ids []int)
PoInterfacesIDs returns the "po_interfaces" edge IDs in the mutation.
func (*DeviceMutation) RemoveDeletedVlanIDs ¶
func (m *DeviceMutation) RemoveDeletedVlanIDs(ids ...int)
RemoveDeletedVlanIDs removes the "deleted_vlans" edge to the DeletedVlanLog entity by IDs.
func (*DeviceMutation) RemoveHaveIPAddressIDs ¶ added in v0.2.0
func (m *DeviceMutation) RemoveHaveIPAddressIDs(ids ...int)
RemoveHaveIPAddressIDs removes the "have_ip_addresses" edge to the IPAddress entity by IDs.
func (*DeviceMutation) RemoveIPStaticRoutingIDs ¶ added in v0.2.0
func (m *DeviceMutation) RemoveIPStaticRoutingIDs(ids ...int)
RemoveIPStaticRoutingIDs removes the "ip_static_routing" edge to the IPStaticRoutingTable entity by IDs.
func (*DeviceMutation) RemoveInTopologyIDs ¶
func (m *DeviceMutation) RemoveInTopologyIDs(ids ...int)
RemoveInTopologyIDs removes the "in_topology" edge to the NetTopologyDeviceMap entity by IDs.
func (*DeviceMutation) RemoveInterfaceIDs ¶
func (m *DeviceMutation) RemoveInterfaceIDs(ids ...int)
RemoveInterfaceIDs removes the "interfaces" edge to the NetInterface entity by IDs.
func (*DeviceMutation) RemovePoInterfaceIDs ¶ added in v0.2.0
func (m *DeviceMutation) RemovePoInterfaceIDs(ids ...int)
RemovePoInterfaceIDs removes the "po_interfaces" edge to the PortChannelInterface entity by IDs.
func (*DeviceMutation) RemoveStoreVlanIDs ¶
func (m *DeviceMutation) RemoveStoreVlanIDs(ids ...int)
RemoveStoreVlanIDs removes the "store_vlans" edge to the Vlan entity by IDs.
func (*DeviceMutation) RemovedDeletedVlansIDs ¶
func (m *DeviceMutation) RemovedDeletedVlansIDs() (ids []int)
RemovedDeletedVlans returns the removed IDs of the "deleted_vlans" edge to the DeletedVlanLog entity.
func (*DeviceMutation) RemovedEdges ¶
func (m *DeviceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DeviceMutation) RemovedHaveIPAddressesIDs ¶ added in v0.2.0
func (m *DeviceMutation) RemovedHaveIPAddressesIDs() (ids []int)
RemovedHaveIPAddresses returns the removed IDs of the "have_ip_addresses" edge to the IPAddress entity.
func (*DeviceMutation) RemovedIDs ¶
func (m *DeviceMutation) 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 (*DeviceMutation) RemovedIPStaticRoutingIDs ¶ added in v0.2.0
func (m *DeviceMutation) RemovedIPStaticRoutingIDs() (ids []int)
RemovedIPStaticRouting returns the removed IDs of the "ip_static_routing" edge to the IPStaticRoutingTable entity.
func (*DeviceMutation) RemovedInTopologyIDs ¶
func (m *DeviceMutation) RemovedInTopologyIDs() (ids []int)
RemovedInTopology returns the removed IDs of the "in_topology" edge to the NetTopologyDeviceMap entity.
func (*DeviceMutation) RemovedInterfacesIDs ¶
func (m *DeviceMutation) RemovedInterfacesIDs() (ids []int)
RemovedInterfaces returns the removed IDs of the "interfaces" edge to the NetInterface entity.
func (*DeviceMutation) RemovedPoInterfacesIDs ¶ added in v0.2.0
func (m *DeviceMutation) RemovedPoInterfacesIDs() (ids []int)
RemovedPoInterfaces returns the removed IDs of the "po_interfaces" edge to the PortChannelInterface entity.
func (*DeviceMutation) RemovedStoreVlansIDs ¶
func (m *DeviceMutation) RemovedStoreVlansIDs() (ids []int)
RemovedStoreVlans returns the removed IDs of the "store_vlans" edge to the Vlan entity.
func (*DeviceMutation) ResetDeletedVlans ¶
func (m *DeviceMutation) ResetDeletedVlans()
ResetDeletedVlans resets all changes to the "deleted_vlans" edge.
func (*DeviceMutation) ResetDeviceCommitConfig ¶
func (m *DeviceMutation) ResetDeviceCommitConfig()
ResetDeviceCommitConfig resets all changes to the "device_commit_config" field.
func (*DeviceMutation) ResetDeviceHostname ¶
func (m *DeviceMutation) ResetDeviceHostname()
ResetDeviceHostname resets all changes to the "device_hostname" field.
func (*DeviceMutation) ResetDeviceName ¶
func (m *DeviceMutation) ResetDeviceName()
ResetDeviceName resets all changes to the "device_name" field.
func (*DeviceMutation) ResetDevicePassword ¶
func (m *DeviceMutation) ResetDevicePassword()
ResetDevicePassword resets all changes to the "device_password" field.
func (*DeviceMutation) ResetDeviceSSHPort ¶
func (m *DeviceMutation) ResetDeviceSSHPort()
ResetDeviceSSHPort resets all changes to the "device_ssh_port" field.
func (*DeviceMutation) ResetDeviceSecret ¶
func (m *DeviceMutation) ResetDeviceSecret()
ResetDeviceSecret resets all changes to the "device_secret" field.
func (*DeviceMutation) ResetDeviceUsername ¶
func (m *DeviceMutation) ResetDeviceUsername()
ResetDeviceUsername resets all changes to the "device_username" field.
func (*DeviceMutation) ResetEdge ¶
func (m *DeviceMutation) 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 (*DeviceMutation) ResetField ¶
func (m *DeviceMutation) 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 (*DeviceMutation) ResetHaveIPAddresses ¶ added in v0.2.0
func (m *DeviceMutation) ResetHaveIPAddresses()
ResetHaveIPAddresses resets all changes to the "have_ip_addresses" edge.
func (*DeviceMutation) ResetIPStaticRouting ¶ added in v0.2.0
func (m *DeviceMutation) ResetIPStaticRouting()
ResetIPStaticRouting resets all changes to the "ip_static_routing" edge.
func (*DeviceMutation) ResetInPlatform ¶
func (m *DeviceMutation) ResetInPlatform()
ResetInPlatform resets all changes to the "in_platform" edge.
func (*DeviceMutation) ResetInTopology ¶
func (m *DeviceMutation) ResetInTopology()
ResetInTopology resets all changes to the "in_topology" edge.
func (*DeviceMutation) ResetInType ¶
func (m *DeviceMutation) ResetInType()
ResetInType resets all changes to the "in_type" edge.
func (*DeviceMutation) ResetInterfaces ¶
func (m *DeviceMutation) ResetInterfaces()
ResetInterfaces resets all changes to the "interfaces" edge.
func (*DeviceMutation) ResetPoInterfaces ¶ added in v0.2.0
func (m *DeviceMutation) ResetPoInterfaces()
ResetPoInterfaces resets all changes to the "po_interfaces" edge.
func (*DeviceMutation) ResetStoreVlans ¶
func (m *DeviceMutation) ResetStoreVlans()
ResetStoreVlans resets all changes to the "store_vlans" edge.
func (*DeviceMutation) SetDeviceCommitConfig ¶
func (m *DeviceMutation) SetDeviceCommitConfig(b bool)
SetDeviceCommitConfig sets the "device_commit_config" field.
func (*DeviceMutation) SetDeviceHostname ¶
func (m *DeviceMutation) SetDeviceHostname(s string)
SetDeviceHostname sets the "device_hostname" field.
func (*DeviceMutation) SetDeviceName ¶
func (m *DeviceMutation) SetDeviceName(s string)
SetDeviceName sets the "device_name" field.
func (*DeviceMutation) SetDevicePassword ¶
func (m *DeviceMutation) SetDevicePassword(s string)
SetDevicePassword sets the "device_password" field.
func (*DeviceMutation) SetDeviceSSHPort ¶
func (m *DeviceMutation) SetDeviceSSHPort(i int)
SetDeviceSSHPort sets the "device_ssh_port" field.
func (*DeviceMutation) SetDeviceSecret ¶
func (m *DeviceMutation) SetDeviceSecret(s string)
SetDeviceSecret sets the "device_secret" field.
func (*DeviceMutation) SetDeviceUsername ¶
func (m *DeviceMutation) SetDeviceUsername(s string)
SetDeviceUsername sets the "device_username" field.
func (*DeviceMutation) SetField ¶
func (m *DeviceMutation) 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 (*DeviceMutation) SetInPlatformID ¶
func (m *DeviceMutation) SetInPlatformID(id int)
SetInPlatformID sets the "in_platform" edge to the DevicePlatform entity by id.
func (*DeviceMutation) SetInTypeID ¶
func (m *DeviceMutation) SetInTypeID(id int)
SetInTypeID sets the "in_type" edge to the DeviceType entity by id.
func (*DeviceMutation) StoreVlansCleared ¶
func (m *DeviceMutation) StoreVlansCleared() bool
StoreVlansCleared reports if the "store_vlans" edge to the Vlan entity was cleared.
func (*DeviceMutation) StoreVlansIDs ¶
func (m *DeviceMutation) StoreVlansIDs() (ids []int)
StoreVlansIDs returns the "store_vlans" edge IDs in the mutation.
func (DeviceMutation) Tx ¶
func (m DeviceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DeviceMutation) Type ¶
func (m *DeviceMutation) Type() string
Type returns the node type of this mutation (Device).
type DevicePlatform ¶
type DevicePlatform struct { // ID of the ent. ID int `json:"id,omitempty"` // DevicePlatformName holds the value of the "device_platform_name" field. DevicePlatformName string `json:"device_platform_name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DevicePlatformQuery when eager-loading is set. Edges DevicePlatformEdges `json:"edges"` // contains filtered or unexported fields }
DevicePlatform is the model entity for the DevicePlatform schema.
func (*DevicePlatform) QueryPlatforms ¶
func (dp *DevicePlatform) QueryPlatforms() *DeviceQuery
QueryPlatforms queries the "platforms" edge of the DevicePlatform entity.
func (*DevicePlatform) String ¶
func (dp *DevicePlatform) String() string
String implements the fmt.Stringer.
func (*DevicePlatform) Unwrap ¶
func (dp *DevicePlatform) Unwrap() *DevicePlatform
Unwrap unwraps the DevicePlatform 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 (*DevicePlatform) Update ¶
func (dp *DevicePlatform) Update() *DevicePlatformUpdateOne
Update returns a builder for updating this DevicePlatform. Note that you need to call DevicePlatform.Unwrap() before calling this method if this DevicePlatform was returned from a transaction, and the transaction was committed or rolled back.
type DevicePlatformClient ¶
type DevicePlatformClient struct {
// contains filtered or unexported fields
}
DevicePlatformClient is a client for the DevicePlatform schema.
func NewDevicePlatformClient ¶
func NewDevicePlatformClient(c config) *DevicePlatformClient
NewDevicePlatformClient returns a client for the DevicePlatform from the given config.
func (*DevicePlatformClient) Create ¶
func (c *DevicePlatformClient) Create() *DevicePlatformCreate
Create returns a create builder for DevicePlatform.
func (*DevicePlatformClient) CreateBulk ¶
func (c *DevicePlatformClient) CreateBulk(builders ...*DevicePlatformCreate) *DevicePlatformCreateBulk
CreateBulk returns a builder for creating a bulk of DevicePlatform entities.
func (*DevicePlatformClient) Delete ¶
func (c *DevicePlatformClient) Delete() *DevicePlatformDelete
Delete returns a delete builder for DevicePlatform.
func (*DevicePlatformClient) DeleteOne ¶
func (c *DevicePlatformClient) DeleteOne(dp *DevicePlatform) *DevicePlatformDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DevicePlatformClient) DeleteOneID ¶
func (c *DevicePlatformClient) DeleteOneID(id int) *DevicePlatformDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DevicePlatformClient) Get ¶
func (c *DevicePlatformClient) Get(ctx context.Context, id int) (*DevicePlatform, error)
Get returns a DevicePlatform entity by its id.
func (*DevicePlatformClient) GetX ¶
func (c *DevicePlatformClient) GetX(ctx context.Context, id int) *DevicePlatform
GetX is like Get, but panics if an error occurs.
func (*DevicePlatformClient) Hooks ¶
func (c *DevicePlatformClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DevicePlatformClient) Query ¶
func (c *DevicePlatformClient) Query() *DevicePlatformQuery
Query returns a query builder for DevicePlatform.
func (*DevicePlatformClient) QueryPlatforms ¶
func (c *DevicePlatformClient) QueryPlatforms(dp *DevicePlatform) *DeviceQuery
QueryPlatforms queries the platforms edge of a DevicePlatform.
func (*DevicePlatformClient) Update ¶
func (c *DevicePlatformClient) Update() *DevicePlatformUpdate
Update returns an update builder for DevicePlatform.
func (*DevicePlatformClient) UpdateOne ¶
func (c *DevicePlatformClient) UpdateOne(dp *DevicePlatform) *DevicePlatformUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DevicePlatformClient) UpdateOneID ¶
func (c *DevicePlatformClient) UpdateOneID(id int) *DevicePlatformUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DevicePlatformClient) Use ¶
func (c *DevicePlatformClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deviceplatform.Hooks(f(g(h())))`.
type DevicePlatformCreate ¶
type DevicePlatformCreate struct {
// contains filtered or unexported fields
}
DevicePlatformCreate is the builder for creating a DevicePlatform entity.
func (*DevicePlatformCreate) AddPlatformIDs ¶
func (dpc *DevicePlatformCreate) AddPlatformIDs(ids ...int) *DevicePlatformCreate
AddPlatformIDs adds the "platforms" edge to the Device entity by IDs.
func (*DevicePlatformCreate) AddPlatforms ¶
func (dpc *DevicePlatformCreate) AddPlatforms(d ...*Device) *DevicePlatformCreate
AddPlatforms adds the "platforms" edges to the Device entity.
func (*DevicePlatformCreate) Mutation ¶
func (dpc *DevicePlatformCreate) Mutation() *DevicePlatformMutation
Mutation returns the DevicePlatformMutation object of the builder.
func (*DevicePlatformCreate) Save ¶
func (dpc *DevicePlatformCreate) Save(ctx context.Context) (*DevicePlatform, error)
Save creates the DevicePlatform in the database.
func (*DevicePlatformCreate) SaveX ¶
func (dpc *DevicePlatformCreate) SaveX(ctx context.Context) *DevicePlatform
SaveX calls Save and panics if Save returns an error.
func (*DevicePlatformCreate) SetDevicePlatformName ¶
func (dpc *DevicePlatformCreate) SetDevicePlatformName(s string) *DevicePlatformCreate
SetDevicePlatformName sets the "device_platform_name" field.
type DevicePlatformCreateBulk ¶
type DevicePlatformCreateBulk struct {
// contains filtered or unexported fields
}
DevicePlatformCreateBulk is the builder for creating many DevicePlatform entities in bulk.
func (*DevicePlatformCreateBulk) Save ¶
func (dpcb *DevicePlatformCreateBulk) Save(ctx context.Context) ([]*DevicePlatform, error)
Save creates the DevicePlatform entities in the database.
func (*DevicePlatformCreateBulk) SaveX ¶
func (dpcb *DevicePlatformCreateBulk) SaveX(ctx context.Context) []*DevicePlatform
SaveX is like Save, but panics if an error occurs.
type DevicePlatformDelete ¶
type DevicePlatformDelete struct {
// contains filtered or unexported fields
}
DevicePlatformDelete is the builder for deleting a DevicePlatform entity.
func (*DevicePlatformDelete) Exec ¶
func (dpd *DevicePlatformDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DevicePlatformDelete) ExecX ¶
func (dpd *DevicePlatformDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DevicePlatformDelete) Where ¶
func (dpd *DevicePlatformDelete) Where(ps ...predicate.DevicePlatform) *DevicePlatformDelete
Where adds a new predicate to the DevicePlatformDelete builder.
type DevicePlatformDeleteOne ¶
type DevicePlatformDeleteOne struct {
// contains filtered or unexported fields
}
DevicePlatformDeleteOne is the builder for deleting a single DevicePlatform entity.
func (*DevicePlatformDeleteOne) Exec ¶
func (dpdo *DevicePlatformDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DevicePlatformDeleteOne) ExecX ¶
func (dpdo *DevicePlatformDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DevicePlatformEdges ¶
type DevicePlatformEdges struct { // Platforms holds the value of the platforms edge. Platforms []*Device `json:"platforms,omitempty"` // contains filtered or unexported fields }
DevicePlatformEdges holds the relations/edges for other nodes in the graph.
func (DevicePlatformEdges) PlatformsOrErr ¶
func (e DevicePlatformEdges) PlatformsOrErr() ([]*Device, error)
PlatformsOrErr returns the Platforms value or an error if the edge was not loaded in eager-loading.
type DevicePlatformGroupBy ¶
type DevicePlatformGroupBy struct {
// contains filtered or unexported fields
}
DevicePlatformGroupBy is the group-by builder for DevicePlatform entities.
func (*DevicePlatformGroupBy) Aggregate ¶
func (dpgb *DevicePlatformGroupBy) Aggregate(fns ...AggregateFunc) *DevicePlatformGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DevicePlatformGroupBy) Bool ¶
func (dpgb *DevicePlatformGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DevicePlatformGroupBy) BoolX ¶
func (dpgb *DevicePlatformGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DevicePlatformGroupBy) Bools ¶
func (dpgb *DevicePlatformGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*DevicePlatformGroupBy) BoolsX ¶
func (dpgb *DevicePlatformGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DevicePlatformGroupBy) Float64 ¶
func (dpgb *DevicePlatformGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DevicePlatformGroupBy) Float64X ¶
func (dpgb *DevicePlatformGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DevicePlatformGroupBy) Float64s ¶
func (dpgb *DevicePlatformGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*DevicePlatformGroupBy) Float64sX ¶
func (dpgb *DevicePlatformGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DevicePlatformGroupBy) Int ¶
func (dpgb *DevicePlatformGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DevicePlatformGroupBy) IntX ¶
func (dpgb *DevicePlatformGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DevicePlatformGroupBy) Ints ¶
func (dpgb *DevicePlatformGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*DevicePlatformGroupBy) IntsX ¶
func (dpgb *DevicePlatformGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DevicePlatformGroupBy) Scan ¶
func (dpgb *DevicePlatformGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DevicePlatformGroupBy) ScanX ¶
func (dpgb *DevicePlatformGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DevicePlatformGroupBy) String ¶
func (dpgb *DevicePlatformGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DevicePlatformGroupBy) StringX ¶
func (dpgb *DevicePlatformGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DevicePlatformMutation ¶
type DevicePlatformMutation struct {
// contains filtered or unexported fields
}
DevicePlatformMutation represents an operation that mutates the DevicePlatform nodes in the graph.
func (*DevicePlatformMutation) AddField ¶
func (m *DevicePlatformMutation) 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 (*DevicePlatformMutation) AddPlatformIDs ¶
func (m *DevicePlatformMutation) AddPlatformIDs(ids ...int)
AddPlatformIDs adds the "platforms" edge to the Device entity by ids.
func (*DevicePlatformMutation) AddedEdges ¶
func (m *DevicePlatformMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DevicePlatformMutation) AddedField ¶
func (m *DevicePlatformMutation) 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 (*DevicePlatformMutation) AddedFields ¶
func (m *DevicePlatformMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DevicePlatformMutation) AddedIDs ¶
func (m *DevicePlatformMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DevicePlatformMutation) ClearEdge ¶
func (m *DevicePlatformMutation) 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 (*DevicePlatformMutation) ClearField ¶
func (m *DevicePlatformMutation) 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 (*DevicePlatformMutation) ClearPlatforms ¶
func (m *DevicePlatformMutation) ClearPlatforms()
ClearPlatforms clears the "platforms" edge to the Device entity.
func (*DevicePlatformMutation) ClearedEdges ¶
func (m *DevicePlatformMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DevicePlatformMutation) ClearedFields ¶
func (m *DevicePlatformMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DevicePlatformMutation) Client ¶
func (m DevicePlatformMutation) 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 (*DevicePlatformMutation) DevicePlatformName ¶
func (m *DevicePlatformMutation) DevicePlatformName() (r string, exists bool)
DevicePlatformName returns the value of the "device_platform_name" field in the mutation.
func (*DevicePlatformMutation) EdgeCleared ¶
func (m *DevicePlatformMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DevicePlatformMutation) Field ¶
func (m *DevicePlatformMutation) 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 (*DevicePlatformMutation) FieldCleared ¶
func (m *DevicePlatformMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DevicePlatformMutation) Fields ¶
func (m *DevicePlatformMutation) 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 (*DevicePlatformMutation) ID ¶
func (m *DevicePlatformMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*DevicePlatformMutation) OldDevicePlatformName ¶
func (m *DevicePlatformMutation) OldDevicePlatformName(ctx context.Context) (v string, err error)
OldDevicePlatformName returns the old "device_platform_name" field's value of the DevicePlatform entity. If the DevicePlatform object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DevicePlatformMutation) 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 (*DevicePlatformMutation) Op ¶
func (m *DevicePlatformMutation) Op() Op
Op returns the operation name.
func (*DevicePlatformMutation) PlatformsCleared ¶
func (m *DevicePlatformMutation) PlatformsCleared() bool
PlatformsCleared reports if the "platforms" edge to the Device entity was cleared.
func (*DevicePlatformMutation) PlatformsIDs ¶
func (m *DevicePlatformMutation) PlatformsIDs() (ids []int)
PlatformsIDs returns the "platforms" edge IDs in the mutation.
func (*DevicePlatformMutation) RemovePlatformIDs ¶
func (m *DevicePlatformMutation) RemovePlatformIDs(ids ...int)
RemovePlatformIDs removes the "platforms" edge to the Device entity by IDs.
func (*DevicePlatformMutation) RemovedEdges ¶
func (m *DevicePlatformMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DevicePlatformMutation) RemovedIDs ¶
func (m *DevicePlatformMutation) 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 (*DevicePlatformMutation) RemovedPlatformsIDs ¶
func (m *DevicePlatformMutation) RemovedPlatformsIDs() (ids []int)
RemovedPlatforms returns the removed IDs of the "platforms" edge to the Device entity.
func (*DevicePlatformMutation) ResetDevicePlatformName ¶
func (m *DevicePlatformMutation) ResetDevicePlatformName()
ResetDevicePlatformName resets all changes to the "device_platform_name" field.
func (*DevicePlatformMutation) ResetEdge ¶
func (m *DevicePlatformMutation) 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 (*DevicePlatformMutation) ResetField ¶
func (m *DevicePlatformMutation) 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 (*DevicePlatformMutation) ResetPlatforms ¶
func (m *DevicePlatformMutation) ResetPlatforms()
ResetPlatforms resets all changes to the "platforms" edge.
func (*DevicePlatformMutation) SetDevicePlatformName ¶
func (m *DevicePlatformMutation) SetDevicePlatformName(s string)
SetDevicePlatformName sets the "device_platform_name" field.
func (*DevicePlatformMutation) SetField ¶
func (m *DevicePlatformMutation) 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 (DevicePlatformMutation) Tx ¶
func (m DevicePlatformMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DevicePlatformMutation) Type ¶
func (m *DevicePlatformMutation) Type() string
Type returns the node type of this mutation (DevicePlatform).
type DevicePlatformQuery ¶
type DevicePlatformQuery struct {
// contains filtered or unexported fields
}
DevicePlatformQuery is the builder for querying DevicePlatform entities.
func (*DevicePlatformQuery) All ¶
func (dpq *DevicePlatformQuery) All(ctx context.Context) ([]*DevicePlatform, error)
All executes the query and returns a list of DevicePlatforms.
func (*DevicePlatformQuery) AllX ¶
func (dpq *DevicePlatformQuery) AllX(ctx context.Context) []*DevicePlatform
AllX is like All, but panics if an error occurs.
func (*DevicePlatformQuery) Clone ¶
func (dpq *DevicePlatformQuery) Clone() *DevicePlatformQuery
Clone returns a duplicate of the DevicePlatformQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DevicePlatformQuery) Count ¶
func (dpq *DevicePlatformQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DevicePlatformQuery) CountX ¶
func (dpq *DevicePlatformQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DevicePlatformQuery) Exist ¶
func (dpq *DevicePlatformQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DevicePlatformQuery) ExistX ¶
func (dpq *DevicePlatformQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DevicePlatformQuery) First ¶
func (dpq *DevicePlatformQuery) First(ctx context.Context) (*DevicePlatform, error)
First returns the first DevicePlatform entity from the query. Returns a *NotFoundError when no DevicePlatform was found.
func (*DevicePlatformQuery) FirstID ¶
func (dpq *DevicePlatformQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DevicePlatform ID from the query. Returns a *NotFoundError when no DevicePlatform ID was found.
func (*DevicePlatformQuery) FirstIDX ¶
func (dpq *DevicePlatformQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DevicePlatformQuery) FirstX ¶
func (dpq *DevicePlatformQuery) FirstX(ctx context.Context) *DevicePlatform
FirstX is like First, but panics if an error occurs.
func (*DevicePlatformQuery) GroupBy ¶
func (dpq *DevicePlatformQuery) GroupBy(field string, fields ...string) *DevicePlatformGroupBy
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 { DevicePlatformName string `json:"device_platform_name,omitempty"` Count int `json:"count,omitempty"` } client.DevicePlatform.Query(). GroupBy(deviceplatform.FieldDevicePlatformName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DevicePlatformQuery) IDs ¶
func (dpq *DevicePlatformQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of DevicePlatform IDs.
func (*DevicePlatformQuery) IDsX ¶
func (dpq *DevicePlatformQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DevicePlatformQuery) Limit ¶
func (dpq *DevicePlatformQuery) Limit(limit int) *DevicePlatformQuery
Limit adds a limit step to the query.
func (*DevicePlatformQuery) Offset ¶
func (dpq *DevicePlatformQuery) Offset(offset int) *DevicePlatformQuery
Offset adds an offset step to the query.
func (*DevicePlatformQuery) Only ¶
func (dpq *DevicePlatformQuery) Only(ctx context.Context) (*DevicePlatform, error)
Only returns a single DevicePlatform entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one DevicePlatform entity is not found. Returns a *NotFoundError when no DevicePlatform entities are found.
func (*DevicePlatformQuery) OnlyID ¶
func (dpq *DevicePlatformQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DevicePlatform ID in the query. Returns a *NotSingularError when exactly one DevicePlatform ID is not found. Returns a *NotFoundError when no entities are found.
func (*DevicePlatformQuery) OnlyIDX ¶
func (dpq *DevicePlatformQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DevicePlatformQuery) OnlyX ¶
func (dpq *DevicePlatformQuery) OnlyX(ctx context.Context) *DevicePlatform
OnlyX is like Only, but panics if an error occurs.
func (*DevicePlatformQuery) Order ¶
func (dpq *DevicePlatformQuery) Order(o ...OrderFunc) *DevicePlatformQuery
Order adds an order step to the query.
func (*DevicePlatformQuery) QueryPlatforms ¶
func (dpq *DevicePlatformQuery) QueryPlatforms() *DeviceQuery
QueryPlatforms chains the current query on the "platforms" edge.
func (*DevicePlatformQuery) Select ¶
func (dpq *DevicePlatformQuery) Select(field string, fields ...string) *DevicePlatformSelect
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 { DevicePlatformName string `json:"device_platform_name,omitempty"` } client.DevicePlatform.Query(). Select(deviceplatform.FieldDevicePlatformName). Scan(ctx, &v)
func (*DevicePlatformQuery) Unique ¶
func (dpq *DevicePlatformQuery) Unique(unique bool) *DevicePlatformQuery
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 (*DevicePlatformQuery) Where ¶
func (dpq *DevicePlatformQuery) Where(ps ...predicate.DevicePlatform) *DevicePlatformQuery
Where adds a new predicate for the DevicePlatformQuery builder.
func (*DevicePlatformQuery) WithPlatforms ¶
func (dpq *DevicePlatformQuery) WithPlatforms(opts ...func(*DeviceQuery)) *DevicePlatformQuery
WithPlatforms tells the query-builder to eager-load the nodes that are connected to the "platforms" edge. The optional arguments are used to configure the query builder of the edge.
type DevicePlatformSelect ¶
type DevicePlatformSelect struct { *DevicePlatformQuery // contains filtered or unexported fields }
DevicePlatformSelect is the builder for selecting fields of DevicePlatform entities.
func (*DevicePlatformSelect) Bool ¶
func (dps *DevicePlatformSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DevicePlatformSelect) BoolX ¶
func (dps *DevicePlatformSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DevicePlatformSelect) Bools ¶
func (dps *DevicePlatformSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DevicePlatformSelect) BoolsX ¶
func (dps *DevicePlatformSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DevicePlatformSelect) Float64 ¶
func (dps *DevicePlatformSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DevicePlatformSelect) Float64X ¶
func (dps *DevicePlatformSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DevicePlatformSelect) Float64s ¶
func (dps *DevicePlatformSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DevicePlatformSelect) Float64sX ¶
func (dps *DevicePlatformSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DevicePlatformSelect) Int ¶
func (dps *DevicePlatformSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DevicePlatformSelect) IntX ¶
func (dps *DevicePlatformSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DevicePlatformSelect) Ints ¶
func (dps *DevicePlatformSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DevicePlatformSelect) IntsX ¶
func (dps *DevicePlatformSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DevicePlatformSelect) Scan ¶
func (dps *DevicePlatformSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DevicePlatformSelect) ScanX ¶
func (dps *DevicePlatformSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DevicePlatformSelect) String ¶
func (dps *DevicePlatformSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DevicePlatformSelect) StringX ¶
func (dps *DevicePlatformSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DevicePlatformUpdate ¶
type DevicePlatformUpdate struct {
// contains filtered or unexported fields
}
DevicePlatformUpdate is the builder for updating DevicePlatform entities.
func (*DevicePlatformUpdate) AddPlatformIDs ¶
func (dpu *DevicePlatformUpdate) AddPlatformIDs(ids ...int) *DevicePlatformUpdate
AddPlatformIDs adds the "platforms" edge to the Device entity by IDs.
func (*DevicePlatformUpdate) AddPlatforms ¶
func (dpu *DevicePlatformUpdate) AddPlatforms(d ...*Device) *DevicePlatformUpdate
AddPlatforms adds the "platforms" edges to the Device entity.
func (*DevicePlatformUpdate) ClearPlatforms ¶
func (dpu *DevicePlatformUpdate) ClearPlatforms() *DevicePlatformUpdate
ClearPlatforms clears all "platforms" edges to the Device entity.
func (*DevicePlatformUpdate) Exec ¶
func (dpu *DevicePlatformUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DevicePlatformUpdate) ExecX ¶
func (dpu *DevicePlatformUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DevicePlatformUpdate) Mutation ¶
func (dpu *DevicePlatformUpdate) Mutation() *DevicePlatformMutation
Mutation returns the DevicePlatformMutation object of the builder.
func (*DevicePlatformUpdate) RemovePlatformIDs ¶
func (dpu *DevicePlatformUpdate) RemovePlatformIDs(ids ...int) *DevicePlatformUpdate
RemovePlatformIDs removes the "platforms" edge to Device entities by IDs.
func (*DevicePlatformUpdate) RemovePlatforms ¶
func (dpu *DevicePlatformUpdate) RemovePlatforms(d ...*Device) *DevicePlatformUpdate
RemovePlatforms removes "platforms" edges to Device entities.
func (*DevicePlatformUpdate) Save ¶
func (dpu *DevicePlatformUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DevicePlatformUpdate) SaveX ¶
func (dpu *DevicePlatformUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DevicePlatformUpdate) SetDevicePlatformName ¶
func (dpu *DevicePlatformUpdate) SetDevicePlatformName(s string) *DevicePlatformUpdate
SetDevicePlatformName sets the "device_platform_name" field.
func (*DevicePlatformUpdate) Where ¶
func (dpu *DevicePlatformUpdate) Where(ps ...predicate.DevicePlatform) *DevicePlatformUpdate
Where adds a new predicate for the DevicePlatformUpdate builder.
type DevicePlatformUpdateOne ¶
type DevicePlatformUpdateOne struct {
// contains filtered or unexported fields
}
DevicePlatformUpdateOne is the builder for updating a single DevicePlatform entity.
func (*DevicePlatformUpdateOne) AddPlatformIDs ¶
func (dpuo *DevicePlatformUpdateOne) AddPlatformIDs(ids ...int) *DevicePlatformUpdateOne
AddPlatformIDs adds the "platforms" edge to the Device entity by IDs.
func (*DevicePlatformUpdateOne) AddPlatforms ¶
func (dpuo *DevicePlatformUpdateOne) AddPlatforms(d ...*Device) *DevicePlatformUpdateOne
AddPlatforms adds the "platforms" edges to the Device entity.
func (*DevicePlatformUpdateOne) ClearPlatforms ¶
func (dpuo *DevicePlatformUpdateOne) ClearPlatforms() *DevicePlatformUpdateOne
ClearPlatforms clears all "platforms" edges to the Device entity.
func (*DevicePlatformUpdateOne) Exec ¶
func (dpuo *DevicePlatformUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DevicePlatformUpdateOne) ExecX ¶
func (dpuo *DevicePlatformUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DevicePlatformUpdateOne) Mutation ¶
func (dpuo *DevicePlatformUpdateOne) Mutation() *DevicePlatformMutation
Mutation returns the DevicePlatformMutation object of the builder.
func (*DevicePlatformUpdateOne) RemovePlatformIDs ¶
func (dpuo *DevicePlatformUpdateOne) RemovePlatformIDs(ids ...int) *DevicePlatformUpdateOne
RemovePlatformIDs removes the "platforms" edge to Device entities by IDs.
func (*DevicePlatformUpdateOne) RemovePlatforms ¶
func (dpuo *DevicePlatformUpdateOne) RemovePlatforms(d ...*Device) *DevicePlatformUpdateOne
RemovePlatforms removes "platforms" edges to Device entities.
func (*DevicePlatformUpdateOne) Save ¶
func (dpuo *DevicePlatformUpdateOne) Save(ctx context.Context) (*DevicePlatform, error)
Save executes the query and returns the updated DevicePlatform entity.
func (*DevicePlatformUpdateOne) SaveX ¶
func (dpuo *DevicePlatformUpdateOne) SaveX(ctx context.Context) *DevicePlatform
SaveX is like Save, but panics if an error occurs.
func (*DevicePlatformUpdateOne) Select ¶
func (dpuo *DevicePlatformUpdateOne) Select(field string, fields ...string) *DevicePlatformUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DevicePlatformUpdateOne) SetDevicePlatformName ¶
func (dpuo *DevicePlatformUpdateOne) SetDevicePlatformName(s string) *DevicePlatformUpdateOne
SetDevicePlatformName sets the "device_platform_name" field.
type DevicePlatforms ¶
type DevicePlatforms []*DevicePlatform
DevicePlatforms is a parsable slice of DevicePlatform.
type DeviceQuery ¶
type DeviceQuery struct {
// contains filtered or unexported fields
}
DeviceQuery is the builder for querying Device entities.
func (*DeviceQuery) All ¶
func (dq *DeviceQuery) All(ctx context.Context) ([]*Device, error)
All executes the query and returns a list of Devices.
func (*DeviceQuery) AllX ¶
func (dq *DeviceQuery) AllX(ctx context.Context) []*Device
AllX is like All, but panics if an error occurs.
func (*DeviceQuery) Clone ¶
func (dq *DeviceQuery) Clone() *DeviceQuery
Clone returns a duplicate of the DeviceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DeviceQuery) Count ¶
func (dq *DeviceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DeviceQuery) CountX ¶
func (dq *DeviceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DeviceQuery) Exist ¶
func (dq *DeviceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DeviceQuery) ExistX ¶
func (dq *DeviceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DeviceQuery) First ¶
func (dq *DeviceQuery) First(ctx context.Context) (*Device, error)
First returns the first Device entity from the query. Returns a *NotFoundError when no Device was found.
func (*DeviceQuery) FirstID ¶
func (dq *DeviceQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Device ID from the query. Returns a *NotFoundError when no Device ID was found.
func (*DeviceQuery) FirstIDX ¶
func (dq *DeviceQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DeviceQuery) FirstX ¶
func (dq *DeviceQuery) FirstX(ctx context.Context) *Device
FirstX is like First, but panics if an error occurs.
func (*DeviceQuery) GroupBy ¶
func (dq *DeviceQuery) GroupBy(field string, fields ...string) *DeviceGroupBy
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 { DeviceName string `json:"device_name,omitempty"` Count int `json:"count,omitempty"` } client.Device.Query(). GroupBy(device.FieldDeviceName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DeviceQuery) IDs ¶
func (dq *DeviceQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Device IDs.
func (*DeviceQuery) IDsX ¶
func (dq *DeviceQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DeviceQuery) Limit ¶
func (dq *DeviceQuery) Limit(limit int) *DeviceQuery
Limit adds a limit step to the query.
func (*DeviceQuery) Offset ¶
func (dq *DeviceQuery) Offset(offset int) *DeviceQuery
Offset adds an offset step to the query.
func (*DeviceQuery) Only ¶
func (dq *DeviceQuery) Only(ctx context.Context) (*Device, error)
Only returns a single Device entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Device entity is not found. Returns a *NotFoundError when no Device entities are found.
func (*DeviceQuery) OnlyID ¶
func (dq *DeviceQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Device ID in the query. Returns a *NotSingularError when exactly one Device ID is not found. Returns a *NotFoundError when no entities are found.
func (*DeviceQuery) OnlyIDX ¶
func (dq *DeviceQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DeviceQuery) OnlyX ¶
func (dq *DeviceQuery) OnlyX(ctx context.Context) *Device
OnlyX is like Only, but panics if an error occurs.
func (*DeviceQuery) Order ¶
func (dq *DeviceQuery) Order(o ...OrderFunc) *DeviceQuery
Order adds an order step to the query.
func (*DeviceQuery) QueryDeletedVlans ¶
func (dq *DeviceQuery) QueryDeletedVlans() *DeletedVlanLogQuery
QueryDeletedVlans chains the current query on the "deleted_vlans" edge.
func (*DeviceQuery) QueryHaveIPAddresses ¶ added in v0.2.0
func (dq *DeviceQuery) QueryHaveIPAddresses() *IPAddressQuery
QueryHaveIPAddresses chains the current query on the "have_ip_addresses" edge.
func (*DeviceQuery) QueryIPStaticRouting ¶ added in v0.2.0
func (dq *DeviceQuery) QueryIPStaticRouting() *IPStaticRoutingTableQuery
QueryIPStaticRouting chains the current query on the "ip_static_routing" edge.
func (*DeviceQuery) QueryInPlatform ¶
func (dq *DeviceQuery) QueryInPlatform() *DevicePlatformQuery
QueryInPlatform chains the current query on the "in_platform" edge.
func (*DeviceQuery) QueryInTopology ¶
func (dq *DeviceQuery) QueryInTopology() *NetTopologyDeviceMapQuery
QueryInTopology chains the current query on the "in_topology" edge.
func (*DeviceQuery) QueryInType ¶
func (dq *DeviceQuery) QueryInType() *DeviceTypeQuery
QueryInType chains the current query on the "in_type" edge.
func (*DeviceQuery) QueryInterfaces ¶
func (dq *DeviceQuery) QueryInterfaces() *NetInterfaceQuery
QueryInterfaces chains the current query on the "interfaces" edge.
func (*DeviceQuery) QueryPoInterfaces ¶ added in v0.2.0
func (dq *DeviceQuery) QueryPoInterfaces() *PortChannelInterfaceQuery
QueryPoInterfaces chains the current query on the "po_interfaces" edge.
func (*DeviceQuery) QueryStoreVlans ¶
func (dq *DeviceQuery) QueryStoreVlans() *VlanQuery
QueryStoreVlans chains the current query on the "store_vlans" edge.
func (*DeviceQuery) Select ¶
func (dq *DeviceQuery) Select(field string, fields ...string) *DeviceSelect
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 { DeviceName string `json:"device_name,omitempty"` } client.Device.Query(). Select(device.FieldDeviceName). Scan(ctx, &v)
func (*DeviceQuery) Unique ¶
func (dq *DeviceQuery) Unique(unique bool) *DeviceQuery
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 (*DeviceQuery) Where ¶
func (dq *DeviceQuery) Where(ps ...predicate.Device) *DeviceQuery
Where adds a new predicate for the DeviceQuery builder.
func (*DeviceQuery) WithDeletedVlans ¶
func (dq *DeviceQuery) WithDeletedVlans(opts ...func(*DeletedVlanLogQuery)) *DeviceQuery
WithDeletedVlans tells the query-builder to eager-load the nodes that are connected to the "deleted_vlans" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeviceQuery) WithHaveIPAddresses ¶ added in v0.2.0
func (dq *DeviceQuery) WithHaveIPAddresses(opts ...func(*IPAddressQuery)) *DeviceQuery
WithHaveIPAddresses tells the query-builder to eager-load the nodes that are connected to the "have_ip_addresses" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeviceQuery) WithIPStaticRouting ¶ added in v0.2.0
func (dq *DeviceQuery) WithIPStaticRouting(opts ...func(*IPStaticRoutingTableQuery)) *DeviceQuery
WithIPStaticRouting tells the query-builder to eager-load the nodes that are connected to the "ip_static_routing" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeviceQuery) WithInPlatform ¶
func (dq *DeviceQuery) WithInPlatform(opts ...func(*DevicePlatformQuery)) *DeviceQuery
WithInPlatform tells the query-builder to eager-load the nodes that are connected to the "in_platform" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeviceQuery) WithInTopology ¶
func (dq *DeviceQuery) WithInTopology(opts ...func(*NetTopologyDeviceMapQuery)) *DeviceQuery
WithInTopology tells the query-builder to eager-load the nodes that are connected to the "in_topology" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeviceQuery) WithInType ¶
func (dq *DeviceQuery) WithInType(opts ...func(*DeviceTypeQuery)) *DeviceQuery
WithInType tells the query-builder to eager-load the nodes that are connected to the "in_type" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeviceQuery) WithInterfaces ¶
func (dq *DeviceQuery) WithInterfaces(opts ...func(*NetInterfaceQuery)) *DeviceQuery
WithInterfaces tells the query-builder to eager-load the nodes that are connected to the "interfaces" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeviceQuery) WithPoInterfaces ¶ added in v0.2.0
func (dq *DeviceQuery) WithPoInterfaces(opts ...func(*PortChannelInterfaceQuery)) *DeviceQuery
WithPoInterfaces tells the query-builder to eager-load the nodes that are connected to the "po_interfaces" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeviceQuery) WithStoreVlans ¶
func (dq *DeviceQuery) WithStoreVlans(opts ...func(*VlanQuery)) *DeviceQuery
WithStoreVlans tells the query-builder to eager-load the nodes that are connected to the "store_vlans" edge. The optional arguments are used to configure the query builder of the edge.
type DeviceSelect ¶
type DeviceSelect struct { *DeviceQuery // contains filtered or unexported fields }
DeviceSelect is the builder for selecting fields of Device entities.
func (*DeviceSelect) Bool ¶
func (ds *DeviceSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DeviceSelect) BoolX ¶
func (ds *DeviceSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DeviceSelect) Bools ¶
func (ds *DeviceSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DeviceSelect) BoolsX ¶
func (ds *DeviceSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DeviceSelect) Float64 ¶
func (ds *DeviceSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DeviceSelect) Float64X ¶
func (ds *DeviceSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DeviceSelect) Float64s ¶
func (ds *DeviceSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DeviceSelect) Float64sX ¶
func (ds *DeviceSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DeviceSelect) Int ¶
func (ds *DeviceSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DeviceSelect) IntX ¶
func (ds *DeviceSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DeviceSelect) Ints ¶
func (ds *DeviceSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DeviceSelect) IntsX ¶
func (ds *DeviceSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DeviceSelect) Scan ¶
func (ds *DeviceSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DeviceSelect) ScanX ¶
func (ds *DeviceSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DeviceSelect) String ¶
func (ds *DeviceSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DeviceSelect) StringX ¶
func (ds *DeviceSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DeviceType ¶
type DeviceType struct { // ID of the ent. ID int `json:"id,omitempty"` // DeviceTypeName holds the value of the "device_type_name" field. DeviceTypeName string `json:"device_type_name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DeviceTypeQuery when eager-loading is set. Edges DeviceTypeEdges `json:"edges"` // contains filtered or unexported fields }
DeviceType is the model entity for the DeviceType schema.
func (*DeviceType) QueryTypes ¶
func (dt *DeviceType) QueryTypes() *DeviceQuery
QueryTypes queries the "types" edge of the DeviceType entity.
func (*DeviceType) String ¶
func (dt *DeviceType) String() string
String implements the fmt.Stringer.
func (*DeviceType) Unwrap ¶
func (dt *DeviceType) Unwrap() *DeviceType
Unwrap unwraps the DeviceType 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 (*DeviceType) Update ¶
func (dt *DeviceType) Update() *DeviceTypeUpdateOne
Update returns a builder for updating this DeviceType. Note that you need to call DeviceType.Unwrap() before calling this method if this DeviceType was returned from a transaction, and the transaction was committed or rolled back.
type DeviceTypeClient ¶
type DeviceTypeClient struct {
// contains filtered or unexported fields
}
DeviceTypeClient is a client for the DeviceType schema.
func NewDeviceTypeClient ¶
func NewDeviceTypeClient(c config) *DeviceTypeClient
NewDeviceTypeClient returns a client for the DeviceType from the given config.
func (*DeviceTypeClient) Create ¶
func (c *DeviceTypeClient) Create() *DeviceTypeCreate
Create returns a create builder for DeviceType.
func (*DeviceTypeClient) CreateBulk ¶
func (c *DeviceTypeClient) CreateBulk(builders ...*DeviceTypeCreate) *DeviceTypeCreateBulk
CreateBulk returns a builder for creating a bulk of DeviceType entities.
func (*DeviceTypeClient) Delete ¶
func (c *DeviceTypeClient) Delete() *DeviceTypeDelete
Delete returns a delete builder for DeviceType.
func (*DeviceTypeClient) DeleteOne ¶
func (c *DeviceTypeClient) DeleteOne(dt *DeviceType) *DeviceTypeDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DeviceTypeClient) DeleteOneID ¶
func (c *DeviceTypeClient) DeleteOneID(id int) *DeviceTypeDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DeviceTypeClient) Get ¶
func (c *DeviceTypeClient) Get(ctx context.Context, id int) (*DeviceType, error)
Get returns a DeviceType entity by its id.
func (*DeviceTypeClient) GetX ¶
func (c *DeviceTypeClient) GetX(ctx context.Context, id int) *DeviceType
GetX is like Get, but panics if an error occurs.
func (*DeviceTypeClient) Hooks ¶
func (c *DeviceTypeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DeviceTypeClient) Query ¶
func (c *DeviceTypeClient) Query() *DeviceTypeQuery
Query returns a query builder for DeviceType.
func (*DeviceTypeClient) QueryTypes ¶
func (c *DeviceTypeClient) QueryTypes(dt *DeviceType) *DeviceQuery
QueryTypes queries the types edge of a DeviceType.
func (*DeviceTypeClient) Update ¶
func (c *DeviceTypeClient) Update() *DeviceTypeUpdate
Update returns an update builder for DeviceType.
func (*DeviceTypeClient) UpdateOne ¶
func (c *DeviceTypeClient) UpdateOne(dt *DeviceType) *DeviceTypeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DeviceTypeClient) UpdateOneID ¶
func (c *DeviceTypeClient) UpdateOneID(id int) *DeviceTypeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DeviceTypeClient) Use ¶
func (c *DeviceTypeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `devicetype.Hooks(f(g(h())))`.
type DeviceTypeCreate ¶
type DeviceTypeCreate struct {
// contains filtered or unexported fields
}
DeviceTypeCreate is the builder for creating a DeviceType entity.
func (*DeviceTypeCreate) AddTypeIDs ¶
func (dtc *DeviceTypeCreate) AddTypeIDs(ids ...int) *DeviceTypeCreate
AddTypeIDs adds the "types" edge to the Device entity by IDs.
func (*DeviceTypeCreate) AddTypes ¶
func (dtc *DeviceTypeCreate) AddTypes(d ...*Device) *DeviceTypeCreate
AddTypes adds the "types" edges to the Device entity.
func (*DeviceTypeCreate) Mutation ¶
func (dtc *DeviceTypeCreate) Mutation() *DeviceTypeMutation
Mutation returns the DeviceTypeMutation object of the builder.
func (*DeviceTypeCreate) Save ¶
func (dtc *DeviceTypeCreate) Save(ctx context.Context) (*DeviceType, error)
Save creates the DeviceType in the database.
func (*DeviceTypeCreate) SaveX ¶
func (dtc *DeviceTypeCreate) SaveX(ctx context.Context) *DeviceType
SaveX calls Save and panics if Save returns an error.
func (*DeviceTypeCreate) SetDeviceTypeName ¶
func (dtc *DeviceTypeCreate) SetDeviceTypeName(s string) *DeviceTypeCreate
SetDeviceTypeName sets the "device_type_name" field.
type DeviceTypeCreateBulk ¶
type DeviceTypeCreateBulk struct {
// contains filtered or unexported fields
}
DeviceTypeCreateBulk is the builder for creating many DeviceType entities in bulk.
func (*DeviceTypeCreateBulk) Save ¶
func (dtcb *DeviceTypeCreateBulk) Save(ctx context.Context) ([]*DeviceType, error)
Save creates the DeviceType entities in the database.
func (*DeviceTypeCreateBulk) SaveX ¶
func (dtcb *DeviceTypeCreateBulk) SaveX(ctx context.Context) []*DeviceType
SaveX is like Save, but panics if an error occurs.
type DeviceTypeDelete ¶
type DeviceTypeDelete struct {
// contains filtered or unexported fields
}
DeviceTypeDelete is the builder for deleting a DeviceType entity.
func (*DeviceTypeDelete) Exec ¶
func (dtd *DeviceTypeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DeviceTypeDelete) ExecX ¶
func (dtd *DeviceTypeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DeviceTypeDelete) Where ¶
func (dtd *DeviceTypeDelete) Where(ps ...predicate.DeviceType) *DeviceTypeDelete
Where adds a new predicate to the DeviceTypeDelete builder.
type DeviceTypeDeleteOne ¶
type DeviceTypeDeleteOne struct {
// contains filtered or unexported fields
}
DeviceTypeDeleteOne is the builder for deleting a single DeviceType entity.
func (*DeviceTypeDeleteOne) Exec ¶
func (dtdo *DeviceTypeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DeviceTypeDeleteOne) ExecX ¶
func (dtdo *DeviceTypeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DeviceTypeEdges ¶
type DeviceTypeEdges struct { // Types holds the value of the types edge. Types []*Device `json:"types,omitempty"` // contains filtered or unexported fields }
DeviceTypeEdges holds the relations/edges for other nodes in the graph.
func (DeviceTypeEdges) TypesOrErr ¶
func (e DeviceTypeEdges) TypesOrErr() ([]*Device, error)
TypesOrErr returns the Types value or an error if the edge was not loaded in eager-loading.
type DeviceTypeGroupBy ¶
type DeviceTypeGroupBy struct {
// contains filtered or unexported fields
}
DeviceTypeGroupBy is the group-by builder for DeviceType entities.
func (*DeviceTypeGroupBy) Aggregate ¶
func (dtgb *DeviceTypeGroupBy) Aggregate(fns ...AggregateFunc) *DeviceTypeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DeviceTypeGroupBy) Bool ¶
func (dtgb *DeviceTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeviceTypeGroupBy) BoolX ¶
func (dtgb *DeviceTypeGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DeviceTypeGroupBy) Bools ¶
func (dtgb *DeviceTypeGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*DeviceTypeGroupBy) BoolsX ¶
func (dtgb *DeviceTypeGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DeviceTypeGroupBy) Float64 ¶
func (dtgb *DeviceTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeviceTypeGroupBy) Float64X ¶
func (dtgb *DeviceTypeGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DeviceTypeGroupBy) Float64s ¶
func (dtgb *DeviceTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*DeviceTypeGroupBy) Float64sX ¶
func (dtgb *DeviceTypeGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DeviceTypeGroupBy) Int ¶
func (dtgb *DeviceTypeGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeviceTypeGroupBy) IntX ¶
func (dtgb *DeviceTypeGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DeviceTypeGroupBy) Ints ¶
func (dtgb *DeviceTypeGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*DeviceTypeGroupBy) IntsX ¶
func (dtgb *DeviceTypeGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DeviceTypeGroupBy) Scan ¶
func (dtgb *DeviceTypeGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DeviceTypeGroupBy) ScanX ¶
func (dtgb *DeviceTypeGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DeviceTypeGroupBy) String ¶
func (dtgb *DeviceTypeGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DeviceTypeGroupBy) StringX ¶
func (dtgb *DeviceTypeGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DeviceTypeMutation ¶
type DeviceTypeMutation struct {
// contains filtered or unexported fields
}
DeviceTypeMutation represents an operation that mutates the DeviceType nodes in the graph.
func (*DeviceTypeMutation) AddField ¶
func (m *DeviceTypeMutation) 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 (*DeviceTypeMutation) AddTypeIDs ¶
func (m *DeviceTypeMutation) AddTypeIDs(ids ...int)
AddTypeIDs adds the "types" edge to the Device entity by ids.
func (*DeviceTypeMutation) AddedEdges ¶
func (m *DeviceTypeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DeviceTypeMutation) AddedField ¶
func (m *DeviceTypeMutation) 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 (*DeviceTypeMutation) AddedFields ¶
func (m *DeviceTypeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DeviceTypeMutation) AddedIDs ¶
func (m *DeviceTypeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DeviceTypeMutation) ClearEdge ¶
func (m *DeviceTypeMutation) 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 (*DeviceTypeMutation) ClearField ¶
func (m *DeviceTypeMutation) 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 (*DeviceTypeMutation) ClearTypes ¶
func (m *DeviceTypeMutation) ClearTypes()
ClearTypes clears the "types" edge to the Device entity.
func (*DeviceTypeMutation) ClearedEdges ¶
func (m *DeviceTypeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DeviceTypeMutation) ClearedFields ¶
func (m *DeviceTypeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DeviceTypeMutation) Client ¶
func (m DeviceTypeMutation) 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 (*DeviceTypeMutation) DeviceTypeName ¶
func (m *DeviceTypeMutation) DeviceTypeName() (r string, exists bool)
DeviceTypeName returns the value of the "device_type_name" field in the mutation.
func (*DeviceTypeMutation) EdgeCleared ¶
func (m *DeviceTypeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DeviceTypeMutation) Field ¶
func (m *DeviceTypeMutation) 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 (*DeviceTypeMutation) FieldCleared ¶
func (m *DeviceTypeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DeviceTypeMutation) Fields ¶
func (m *DeviceTypeMutation) 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 (*DeviceTypeMutation) ID ¶
func (m *DeviceTypeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*DeviceTypeMutation) OldDeviceTypeName ¶
func (m *DeviceTypeMutation) OldDeviceTypeName(ctx context.Context) (v string, err error)
OldDeviceTypeName returns the old "device_type_name" field's value of the DeviceType entity. If the DeviceType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeviceTypeMutation) 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 (*DeviceTypeMutation) RemoveTypeIDs ¶
func (m *DeviceTypeMutation) RemoveTypeIDs(ids ...int)
RemoveTypeIDs removes the "types" edge to the Device entity by IDs.
func (*DeviceTypeMutation) RemovedEdges ¶
func (m *DeviceTypeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DeviceTypeMutation) RemovedIDs ¶
func (m *DeviceTypeMutation) 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 (*DeviceTypeMutation) RemovedTypesIDs ¶
func (m *DeviceTypeMutation) RemovedTypesIDs() (ids []int)
RemovedTypes returns the removed IDs of the "types" edge to the Device entity.
func (*DeviceTypeMutation) ResetDeviceTypeName ¶
func (m *DeviceTypeMutation) ResetDeviceTypeName()
ResetDeviceTypeName resets all changes to the "device_type_name" field.
func (*DeviceTypeMutation) ResetEdge ¶
func (m *DeviceTypeMutation) 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 (*DeviceTypeMutation) ResetField ¶
func (m *DeviceTypeMutation) 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 (*DeviceTypeMutation) ResetTypes ¶
func (m *DeviceTypeMutation) ResetTypes()
ResetTypes resets all changes to the "types" edge.
func (*DeviceTypeMutation) SetDeviceTypeName ¶
func (m *DeviceTypeMutation) SetDeviceTypeName(s string)
SetDeviceTypeName sets the "device_type_name" field.
func (*DeviceTypeMutation) SetField ¶
func (m *DeviceTypeMutation) 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 (DeviceTypeMutation) Tx ¶
func (m DeviceTypeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DeviceTypeMutation) Type ¶
func (m *DeviceTypeMutation) Type() string
Type returns the node type of this mutation (DeviceType).
func (*DeviceTypeMutation) TypesCleared ¶
func (m *DeviceTypeMutation) TypesCleared() bool
TypesCleared reports if the "types" edge to the Device entity was cleared.
func (*DeviceTypeMutation) TypesIDs ¶
func (m *DeviceTypeMutation) TypesIDs() (ids []int)
TypesIDs returns the "types" edge IDs in the mutation.
type DeviceTypeQuery ¶
type DeviceTypeQuery struct {
// contains filtered or unexported fields
}
DeviceTypeQuery is the builder for querying DeviceType entities.
func (*DeviceTypeQuery) All ¶
func (dtq *DeviceTypeQuery) All(ctx context.Context) ([]*DeviceType, error)
All executes the query and returns a list of DeviceTypes.
func (*DeviceTypeQuery) AllX ¶
func (dtq *DeviceTypeQuery) AllX(ctx context.Context) []*DeviceType
AllX is like All, but panics if an error occurs.
func (*DeviceTypeQuery) Clone ¶
func (dtq *DeviceTypeQuery) Clone() *DeviceTypeQuery
Clone returns a duplicate of the DeviceTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DeviceTypeQuery) Count ¶
func (dtq *DeviceTypeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DeviceTypeQuery) CountX ¶
func (dtq *DeviceTypeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DeviceTypeQuery) Exist ¶
func (dtq *DeviceTypeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DeviceTypeQuery) ExistX ¶
func (dtq *DeviceTypeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DeviceTypeQuery) First ¶
func (dtq *DeviceTypeQuery) First(ctx context.Context) (*DeviceType, error)
First returns the first DeviceType entity from the query. Returns a *NotFoundError when no DeviceType was found.
func (*DeviceTypeQuery) FirstID ¶
func (dtq *DeviceTypeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DeviceType ID from the query. Returns a *NotFoundError when no DeviceType ID was found.
func (*DeviceTypeQuery) FirstIDX ¶
func (dtq *DeviceTypeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DeviceTypeQuery) FirstX ¶
func (dtq *DeviceTypeQuery) FirstX(ctx context.Context) *DeviceType
FirstX is like First, but panics if an error occurs.
func (*DeviceTypeQuery) GroupBy ¶
func (dtq *DeviceTypeQuery) GroupBy(field string, fields ...string) *DeviceTypeGroupBy
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 { DeviceTypeName string `json:"device_type_name,omitempty"` Count int `json:"count,omitempty"` } client.DeviceType.Query(). GroupBy(devicetype.FieldDeviceTypeName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DeviceTypeQuery) IDs ¶
func (dtq *DeviceTypeQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of DeviceType IDs.
func (*DeviceTypeQuery) IDsX ¶
func (dtq *DeviceTypeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DeviceTypeQuery) Limit ¶
func (dtq *DeviceTypeQuery) Limit(limit int) *DeviceTypeQuery
Limit adds a limit step to the query.
func (*DeviceTypeQuery) Offset ¶
func (dtq *DeviceTypeQuery) Offset(offset int) *DeviceTypeQuery
Offset adds an offset step to the query.
func (*DeviceTypeQuery) Only ¶
func (dtq *DeviceTypeQuery) Only(ctx context.Context) (*DeviceType, error)
Only returns a single DeviceType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one DeviceType entity is not found. Returns a *NotFoundError when no DeviceType entities are found.
func (*DeviceTypeQuery) OnlyID ¶
func (dtq *DeviceTypeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DeviceType ID in the query. Returns a *NotSingularError when exactly one DeviceType ID is not found. Returns a *NotFoundError when no entities are found.
func (*DeviceTypeQuery) OnlyIDX ¶
func (dtq *DeviceTypeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DeviceTypeQuery) OnlyX ¶
func (dtq *DeviceTypeQuery) OnlyX(ctx context.Context) *DeviceType
OnlyX is like Only, but panics if an error occurs.
func (*DeviceTypeQuery) Order ¶
func (dtq *DeviceTypeQuery) Order(o ...OrderFunc) *DeviceTypeQuery
Order adds an order step to the query.
func (*DeviceTypeQuery) QueryTypes ¶
func (dtq *DeviceTypeQuery) QueryTypes() *DeviceQuery
QueryTypes chains the current query on the "types" edge.
func (*DeviceTypeQuery) Select ¶
func (dtq *DeviceTypeQuery) Select(field string, fields ...string) *DeviceTypeSelect
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 { DeviceTypeName string `json:"device_type_name,omitempty"` } client.DeviceType.Query(). Select(devicetype.FieldDeviceTypeName). Scan(ctx, &v)
func (*DeviceTypeQuery) Unique ¶
func (dtq *DeviceTypeQuery) Unique(unique bool) *DeviceTypeQuery
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 (*DeviceTypeQuery) Where ¶
func (dtq *DeviceTypeQuery) Where(ps ...predicate.DeviceType) *DeviceTypeQuery
Where adds a new predicate for the DeviceTypeQuery builder.
func (*DeviceTypeQuery) WithTypes ¶
func (dtq *DeviceTypeQuery) WithTypes(opts ...func(*DeviceQuery)) *DeviceTypeQuery
WithTypes tells the query-builder to eager-load the nodes that are connected to the "types" edge. The optional arguments are used to configure the query builder of the edge.
type DeviceTypeSelect ¶
type DeviceTypeSelect struct { *DeviceTypeQuery // contains filtered or unexported fields }
DeviceTypeSelect is the builder for selecting fields of DeviceType entities.
func (*DeviceTypeSelect) Bool ¶
func (dts *DeviceTypeSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DeviceTypeSelect) BoolX ¶
func (dts *DeviceTypeSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DeviceTypeSelect) Bools ¶
func (dts *DeviceTypeSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DeviceTypeSelect) BoolsX ¶
func (dts *DeviceTypeSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DeviceTypeSelect) Float64 ¶
func (dts *DeviceTypeSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DeviceTypeSelect) Float64X ¶
func (dts *DeviceTypeSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DeviceTypeSelect) Float64s ¶
func (dts *DeviceTypeSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DeviceTypeSelect) Float64sX ¶
func (dts *DeviceTypeSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DeviceTypeSelect) Int ¶
func (dts *DeviceTypeSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DeviceTypeSelect) IntX ¶
func (dts *DeviceTypeSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DeviceTypeSelect) Ints ¶
func (dts *DeviceTypeSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DeviceTypeSelect) IntsX ¶
func (dts *DeviceTypeSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DeviceTypeSelect) Scan ¶
func (dts *DeviceTypeSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DeviceTypeSelect) ScanX ¶
func (dts *DeviceTypeSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DeviceTypeSelect) String ¶
func (dts *DeviceTypeSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DeviceTypeSelect) StringX ¶
func (dts *DeviceTypeSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DeviceTypeUpdate ¶
type DeviceTypeUpdate struct {
// contains filtered or unexported fields
}
DeviceTypeUpdate is the builder for updating DeviceType entities.
func (*DeviceTypeUpdate) AddTypeIDs ¶
func (dtu *DeviceTypeUpdate) AddTypeIDs(ids ...int) *DeviceTypeUpdate
AddTypeIDs adds the "types" edge to the Device entity by IDs.
func (*DeviceTypeUpdate) AddTypes ¶
func (dtu *DeviceTypeUpdate) AddTypes(d ...*Device) *DeviceTypeUpdate
AddTypes adds the "types" edges to the Device entity.
func (*DeviceTypeUpdate) ClearTypes ¶
func (dtu *DeviceTypeUpdate) ClearTypes() *DeviceTypeUpdate
ClearTypes clears all "types" edges to the Device entity.
func (*DeviceTypeUpdate) Exec ¶
func (dtu *DeviceTypeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeviceTypeUpdate) ExecX ¶
func (dtu *DeviceTypeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeviceTypeUpdate) Mutation ¶
func (dtu *DeviceTypeUpdate) Mutation() *DeviceTypeMutation
Mutation returns the DeviceTypeMutation object of the builder.
func (*DeviceTypeUpdate) RemoveTypeIDs ¶
func (dtu *DeviceTypeUpdate) RemoveTypeIDs(ids ...int) *DeviceTypeUpdate
RemoveTypeIDs removes the "types" edge to Device entities by IDs.
func (*DeviceTypeUpdate) RemoveTypes ¶
func (dtu *DeviceTypeUpdate) RemoveTypes(d ...*Device) *DeviceTypeUpdate
RemoveTypes removes "types" edges to Device entities.
func (*DeviceTypeUpdate) Save ¶
func (dtu *DeviceTypeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DeviceTypeUpdate) SaveX ¶
func (dtu *DeviceTypeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DeviceTypeUpdate) SetDeviceTypeName ¶
func (dtu *DeviceTypeUpdate) SetDeviceTypeName(s string) *DeviceTypeUpdate
SetDeviceTypeName sets the "device_type_name" field.
func (*DeviceTypeUpdate) Where ¶
func (dtu *DeviceTypeUpdate) Where(ps ...predicate.DeviceType) *DeviceTypeUpdate
Where adds a new predicate for the DeviceTypeUpdate builder.
type DeviceTypeUpdateOne ¶
type DeviceTypeUpdateOne struct {
// contains filtered or unexported fields
}
DeviceTypeUpdateOne is the builder for updating a single DeviceType entity.
func (*DeviceTypeUpdateOne) AddTypeIDs ¶
func (dtuo *DeviceTypeUpdateOne) AddTypeIDs(ids ...int) *DeviceTypeUpdateOne
AddTypeIDs adds the "types" edge to the Device entity by IDs.
func (*DeviceTypeUpdateOne) AddTypes ¶
func (dtuo *DeviceTypeUpdateOne) AddTypes(d ...*Device) *DeviceTypeUpdateOne
AddTypes adds the "types" edges to the Device entity.
func (*DeviceTypeUpdateOne) ClearTypes ¶
func (dtuo *DeviceTypeUpdateOne) ClearTypes() *DeviceTypeUpdateOne
ClearTypes clears all "types" edges to the Device entity.
func (*DeviceTypeUpdateOne) Exec ¶
func (dtuo *DeviceTypeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DeviceTypeUpdateOne) ExecX ¶
func (dtuo *DeviceTypeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeviceTypeUpdateOne) Mutation ¶
func (dtuo *DeviceTypeUpdateOne) Mutation() *DeviceTypeMutation
Mutation returns the DeviceTypeMutation object of the builder.
func (*DeviceTypeUpdateOne) RemoveTypeIDs ¶
func (dtuo *DeviceTypeUpdateOne) RemoveTypeIDs(ids ...int) *DeviceTypeUpdateOne
RemoveTypeIDs removes the "types" edge to Device entities by IDs.
func (*DeviceTypeUpdateOne) RemoveTypes ¶
func (dtuo *DeviceTypeUpdateOne) RemoveTypes(d ...*Device) *DeviceTypeUpdateOne
RemoveTypes removes "types" edges to Device entities.
func (*DeviceTypeUpdateOne) Save ¶
func (dtuo *DeviceTypeUpdateOne) Save(ctx context.Context) (*DeviceType, error)
Save executes the query and returns the updated DeviceType entity.
func (*DeviceTypeUpdateOne) SaveX ¶
func (dtuo *DeviceTypeUpdateOne) SaveX(ctx context.Context) *DeviceType
SaveX is like Save, but panics if an error occurs.
func (*DeviceTypeUpdateOne) Select ¶
func (dtuo *DeviceTypeUpdateOne) Select(field string, fields ...string) *DeviceTypeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DeviceTypeUpdateOne) SetDeviceTypeName ¶
func (dtuo *DeviceTypeUpdateOne) SetDeviceTypeName(s string) *DeviceTypeUpdateOne
SetDeviceTypeName sets the "device_type_name" field.
type DeviceUpdate ¶
type DeviceUpdate struct {
// contains filtered or unexported fields
}
DeviceUpdate is the builder for updating Device entities.
func (*DeviceUpdate) AddDeletedVlanIDs ¶
func (du *DeviceUpdate) AddDeletedVlanIDs(ids ...int) *DeviceUpdate
AddDeletedVlanIDs adds the "deleted_vlans" edge to the DeletedVlanLog entity by IDs.
func (*DeviceUpdate) AddDeletedVlans ¶
func (du *DeviceUpdate) AddDeletedVlans(d ...*DeletedVlanLog) *DeviceUpdate
AddDeletedVlans adds the "deleted_vlans" edges to the DeletedVlanLog entity.
func (*DeviceUpdate) AddDeviceSSHPort ¶
func (du *DeviceUpdate) AddDeviceSSHPort(i int) *DeviceUpdate
AddDeviceSSHPort adds i to the "device_ssh_port" field.
func (*DeviceUpdate) AddHaveIPAddressIDs ¶ added in v0.2.0
func (du *DeviceUpdate) AddHaveIPAddressIDs(ids ...int) *DeviceUpdate
AddHaveIPAddressIDs adds the "have_ip_addresses" edge to the IPAddress entity by IDs.
func (*DeviceUpdate) AddHaveIPAddresses ¶ added in v0.2.0
func (du *DeviceUpdate) AddHaveIPAddresses(i ...*IPAddress) *DeviceUpdate
AddHaveIPAddresses adds the "have_ip_addresses" edges to the IPAddress entity.
func (*DeviceUpdate) AddIPStaticRouting ¶ added in v0.2.0
func (du *DeviceUpdate) AddIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceUpdate
AddIPStaticRouting adds the "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*DeviceUpdate) AddIPStaticRoutingIDs ¶ added in v0.2.0
func (du *DeviceUpdate) AddIPStaticRoutingIDs(ids ...int) *DeviceUpdate
AddIPStaticRoutingIDs adds the "ip_static_routing" edge to the IPStaticRoutingTable entity by IDs.
func (*DeviceUpdate) AddInTopology ¶
func (du *DeviceUpdate) AddInTopology(n ...*NetTopologyDeviceMap) *DeviceUpdate
AddInTopology adds the "in_topology" edges to the NetTopologyDeviceMap entity.
func (*DeviceUpdate) AddInTopologyIDs ¶
func (du *DeviceUpdate) AddInTopologyIDs(ids ...int) *DeviceUpdate
AddInTopologyIDs adds the "in_topology" edge to the NetTopologyDeviceMap entity by IDs.
func (*DeviceUpdate) AddInterfaceIDs ¶
func (du *DeviceUpdate) AddInterfaceIDs(ids ...int) *DeviceUpdate
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by IDs.
func (*DeviceUpdate) AddInterfaces ¶
func (du *DeviceUpdate) AddInterfaces(n ...*NetInterface) *DeviceUpdate
AddInterfaces adds the "interfaces" edges to the NetInterface entity.
func (*DeviceUpdate) AddPoInterfaceIDs ¶ added in v0.2.0
func (du *DeviceUpdate) AddPoInterfaceIDs(ids ...int) *DeviceUpdate
AddPoInterfaceIDs adds the "po_interfaces" edge to the PortChannelInterface entity by IDs.
func (*DeviceUpdate) AddPoInterfaces ¶ added in v0.2.0
func (du *DeviceUpdate) AddPoInterfaces(p ...*PortChannelInterface) *DeviceUpdate
AddPoInterfaces adds the "po_interfaces" edges to the PortChannelInterface entity.
func (*DeviceUpdate) AddStoreVlanIDs ¶
func (du *DeviceUpdate) AddStoreVlanIDs(ids ...int) *DeviceUpdate
AddStoreVlanIDs adds the "store_vlans" edge to the Vlan entity by IDs.
func (*DeviceUpdate) AddStoreVlans ¶
func (du *DeviceUpdate) AddStoreVlans(v ...*Vlan) *DeviceUpdate
AddStoreVlans adds the "store_vlans" edges to the Vlan entity.
func (*DeviceUpdate) ClearDeletedVlans ¶
func (du *DeviceUpdate) ClearDeletedVlans() *DeviceUpdate
ClearDeletedVlans clears all "deleted_vlans" edges to the DeletedVlanLog entity.
func (*DeviceUpdate) ClearDevicePassword ¶
func (du *DeviceUpdate) ClearDevicePassword() *DeviceUpdate
ClearDevicePassword clears the value of the "device_password" field.
func (*DeviceUpdate) ClearDeviceSecret ¶
func (du *DeviceUpdate) ClearDeviceSecret() *DeviceUpdate
ClearDeviceSecret clears the value of the "device_secret" field.
func (*DeviceUpdate) ClearDeviceUsername ¶
func (du *DeviceUpdate) ClearDeviceUsername() *DeviceUpdate
ClearDeviceUsername clears the value of the "device_username" field.
func (*DeviceUpdate) ClearHaveIPAddresses ¶ added in v0.2.0
func (du *DeviceUpdate) ClearHaveIPAddresses() *DeviceUpdate
ClearHaveIPAddresses clears all "have_ip_addresses" edges to the IPAddress entity.
func (*DeviceUpdate) ClearIPStaticRouting ¶ added in v0.2.0
func (du *DeviceUpdate) ClearIPStaticRouting() *DeviceUpdate
ClearIPStaticRouting clears all "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*DeviceUpdate) ClearInPlatform ¶
func (du *DeviceUpdate) ClearInPlatform() *DeviceUpdate
ClearInPlatform clears the "in_platform" edge to the DevicePlatform entity.
func (*DeviceUpdate) ClearInTopology ¶
func (du *DeviceUpdate) ClearInTopology() *DeviceUpdate
ClearInTopology clears all "in_topology" edges to the NetTopologyDeviceMap entity.
func (*DeviceUpdate) ClearInType ¶
func (du *DeviceUpdate) ClearInType() *DeviceUpdate
ClearInType clears the "in_type" edge to the DeviceType entity.
func (*DeviceUpdate) ClearInterfaces ¶
func (du *DeviceUpdate) ClearInterfaces() *DeviceUpdate
ClearInterfaces clears all "interfaces" edges to the NetInterface entity.
func (*DeviceUpdate) ClearPoInterfaces ¶ added in v0.2.0
func (du *DeviceUpdate) ClearPoInterfaces() *DeviceUpdate
ClearPoInterfaces clears all "po_interfaces" edges to the PortChannelInterface entity.
func (*DeviceUpdate) ClearStoreVlans ¶
func (du *DeviceUpdate) ClearStoreVlans() *DeviceUpdate
ClearStoreVlans clears all "store_vlans" edges to the Vlan entity.
func (*DeviceUpdate) Exec ¶
func (du *DeviceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeviceUpdate) ExecX ¶
func (du *DeviceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeviceUpdate) Mutation ¶
func (du *DeviceUpdate) Mutation() *DeviceMutation
Mutation returns the DeviceMutation object of the builder.
func (*DeviceUpdate) RemoveDeletedVlanIDs ¶
func (du *DeviceUpdate) RemoveDeletedVlanIDs(ids ...int) *DeviceUpdate
RemoveDeletedVlanIDs removes the "deleted_vlans" edge to DeletedVlanLog entities by IDs.
func (*DeviceUpdate) RemoveDeletedVlans ¶
func (du *DeviceUpdate) RemoveDeletedVlans(d ...*DeletedVlanLog) *DeviceUpdate
RemoveDeletedVlans removes "deleted_vlans" edges to DeletedVlanLog entities.
func (*DeviceUpdate) RemoveHaveIPAddressIDs ¶ added in v0.2.0
func (du *DeviceUpdate) RemoveHaveIPAddressIDs(ids ...int) *DeviceUpdate
RemoveHaveIPAddressIDs removes the "have_ip_addresses" edge to IPAddress entities by IDs.
func (*DeviceUpdate) RemoveHaveIPAddresses ¶ added in v0.2.0
func (du *DeviceUpdate) RemoveHaveIPAddresses(i ...*IPAddress) *DeviceUpdate
RemoveHaveIPAddresses removes "have_ip_addresses" edges to IPAddress entities.
func (*DeviceUpdate) RemoveIPStaticRouting ¶ added in v0.2.0
func (du *DeviceUpdate) RemoveIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceUpdate
RemoveIPStaticRouting removes "ip_static_routing" edges to IPStaticRoutingTable entities.
func (*DeviceUpdate) RemoveIPStaticRoutingIDs ¶ added in v0.2.0
func (du *DeviceUpdate) RemoveIPStaticRoutingIDs(ids ...int) *DeviceUpdate
RemoveIPStaticRoutingIDs removes the "ip_static_routing" edge to IPStaticRoutingTable entities by IDs.
func (*DeviceUpdate) RemoveInTopology ¶
func (du *DeviceUpdate) RemoveInTopology(n ...*NetTopologyDeviceMap) *DeviceUpdate
RemoveInTopology removes "in_topology" edges to NetTopologyDeviceMap entities.
func (*DeviceUpdate) RemoveInTopologyIDs ¶
func (du *DeviceUpdate) RemoveInTopologyIDs(ids ...int) *DeviceUpdate
RemoveInTopologyIDs removes the "in_topology" edge to NetTopologyDeviceMap entities by IDs.
func (*DeviceUpdate) RemoveInterfaceIDs ¶
func (du *DeviceUpdate) RemoveInterfaceIDs(ids ...int) *DeviceUpdate
RemoveInterfaceIDs removes the "interfaces" edge to NetInterface entities by IDs.
func (*DeviceUpdate) RemoveInterfaces ¶
func (du *DeviceUpdate) RemoveInterfaces(n ...*NetInterface) *DeviceUpdate
RemoveInterfaces removes "interfaces" edges to NetInterface entities.
func (*DeviceUpdate) RemovePoInterfaceIDs ¶ added in v0.2.0
func (du *DeviceUpdate) RemovePoInterfaceIDs(ids ...int) *DeviceUpdate
RemovePoInterfaceIDs removes the "po_interfaces" edge to PortChannelInterface entities by IDs.
func (*DeviceUpdate) RemovePoInterfaces ¶ added in v0.2.0
func (du *DeviceUpdate) RemovePoInterfaces(p ...*PortChannelInterface) *DeviceUpdate
RemovePoInterfaces removes "po_interfaces" edges to PortChannelInterface entities.
func (*DeviceUpdate) RemoveStoreVlanIDs ¶
func (du *DeviceUpdate) RemoveStoreVlanIDs(ids ...int) *DeviceUpdate
RemoveStoreVlanIDs removes the "store_vlans" edge to Vlan entities by IDs.
func (*DeviceUpdate) RemoveStoreVlans ¶
func (du *DeviceUpdate) RemoveStoreVlans(v ...*Vlan) *DeviceUpdate
RemoveStoreVlans removes "store_vlans" edges to Vlan entities.
func (*DeviceUpdate) Save ¶
func (du *DeviceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DeviceUpdate) SaveX ¶
func (du *DeviceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DeviceUpdate) SetDeviceCommitConfig ¶
func (du *DeviceUpdate) SetDeviceCommitConfig(b bool) *DeviceUpdate
SetDeviceCommitConfig sets the "device_commit_config" field.
func (*DeviceUpdate) SetDeviceHostname ¶
func (du *DeviceUpdate) SetDeviceHostname(s string) *DeviceUpdate
SetDeviceHostname sets the "device_hostname" field.
func (*DeviceUpdate) SetDeviceName ¶
func (du *DeviceUpdate) SetDeviceName(s string) *DeviceUpdate
SetDeviceName sets the "device_name" field.
func (*DeviceUpdate) SetDevicePassword ¶
func (du *DeviceUpdate) SetDevicePassword(s string) *DeviceUpdate
SetDevicePassword sets the "device_password" field.
func (*DeviceUpdate) SetDeviceSSHPort ¶
func (du *DeviceUpdate) SetDeviceSSHPort(i int) *DeviceUpdate
SetDeviceSSHPort sets the "device_ssh_port" field.
func (*DeviceUpdate) SetDeviceSecret ¶
func (du *DeviceUpdate) SetDeviceSecret(s string) *DeviceUpdate
SetDeviceSecret sets the "device_secret" field.
func (*DeviceUpdate) SetDeviceUsername ¶
func (du *DeviceUpdate) SetDeviceUsername(s string) *DeviceUpdate
SetDeviceUsername sets the "device_username" field.
func (*DeviceUpdate) SetInPlatform ¶
func (du *DeviceUpdate) SetInPlatform(d *DevicePlatform) *DeviceUpdate
SetInPlatform sets the "in_platform" edge to the DevicePlatform entity.
func (*DeviceUpdate) SetInPlatformID ¶
func (du *DeviceUpdate) SetInPlatformID(id int) *DeviceUpdate
SetInPlatformID sets the "in_platform" edge to the DevicePlatform entity by ID.
func (*DeviceUpdate) SetInType ¶
func (du *DeviceUpdate) SetInType(d *DeviceType) *DeviceUpdate
SetInType sets the "in_type" edge to the DeviceType entity.
func (*DeviceUpdate) SetInTypeID ¶
func (du *DeviceUpdate) SetInTypeID(id int) *DeviceUpdate
SetInTypeID sets the "in_type" edge to the DeviceType entity by ID.
func (*DeviceUpdate) SetNillableDeviceCommitConfig ¶
func (du *DeviceUpdate) SetNillableDeviceCommitConfig(b *bool) *DeviceUpdate
SetNillableDeviceCommitConfig sets the "device_commit_config" field if the given value is not nil.
func (*DeviceUpdate) SetNillableDevicePassword ¶
func (du *DeviceUpdate) SetNillableDevicePassword(s *string) *DeviceUpdate
SetNillableDevicePassword sets the "device_password" field if the given value is not nil.
func (*DeviceUpdate) SetNillableDeviceSSHPort ¶
func (du *DeviceUpdate) SetNillableDeviceSSHPort(i *int) *DeviceUpdate
SetNillableDeviceSSHPort sets the "device_ssh_port" field if the given value is not nil.
func (*DeviceUpdate) SetNillableDeviceSecret ¶
func (du *DeviceUpdate) SetNillableDeviceSecret(s *string) *DeviceUpdate
SetNillableDeviceSecret sets the "device_secret" field if the given value is not nil.
func (*DeviceUpdate) SetNillableDeviceUsername ¶
func (du *DeviceUpdate) SetNillableDeviceUsername(s *string) *DeviceUpdate
SetNillableDeviceUsername sets the "device_username" field if the given value is not nil.
func (*DeviceUpdate) SetNillableInPlatformID ¶
func (du *DeviceUpdate) SetNillableInPlatformID(id *int) *DeviceUpdate
SetNillableInPlatformID sets the "in_platform" edge to the DevicePlatform entity by ID if the given value is not nil.
func (*DeviceUpdate) SetNillableInTypeID ¶
func (du *DeviceUpdate) SetNillableInTypeID(id *int) *DeviceUpdate
SetNillableInTypeID sets the "in_type" edge to the DeviceType entity by ID if the given value is not nil.
func (*DeviceUpdate) Where ¶
func (du *DeviceUpdate) Where(ps ...predicate.Device) *DeviceUpdate
Where adds a new predicate for the DeviceUpdate builder.
type DeviceUpdateOne ¶
type DeviceUpdateOne struct {
// contains filtered or unexported fields
}
DeviceUpdateOne is the builder for updating a single Device entity.
func (*DeviceUpdateOne) AddDeletedVlanIDs ¶
func (duo *DeviceUpdateOne) AddDeletedVlanIDs(ids ...int) *DeviceUpdateOne
AddDeletedVlanIDs adds the "deleted_vlans" edge to the DeletedVlanLog entity by IDs.
func (*DeviceUpdateOne) AddDeletedVlans ¶
func (duo *DeviceUpdateOne) AddDeletedVlans(d ...*DeletedVlanLog) *DeviceUpdateOne
AddDeletedVlans adds the "deleted_vlans" edges to the DeletedVlanLog entity.
func (*DeviceUpdateOne) AddDeviceSSHPort ¶
func (duo *DeviceUpdateOne) AddDeviceSSHPort(i int) *DeviceUpdateOne
AddDeviceSSHPort adds i to the "device_ssh_port" field.
func (*DeviceUpdateOne) AddHaveIPAddressIDs ¶ added in v0.2.0
func (duo *DeviceUpdateOne) AddHaveIPAddressIDs(ids ...int) *DeviceUpdateOne
AddHaveIPAddressIDs adds the "have_ip_addresses" edge to the IPAddress entity by IDs.
func (*DeviceUpdateOne) AddHaveIPAddresses ¶ added in v0.2.0
func (duo *DeviceUpdateOne) AddHaveIPAddresses(i ...*IPAddress) *DeviceUpdateOne
AddHaveIPAddresses adds the "have_ip_addresses" edges to the IPAddress entity.
func (*DeviceUpdateOne) AddIPStaticRouting ¶ added in v0.2.0
func (duo *DeviceUpdateOne) AddIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceUpdateOne
AddIPStaticRouting adds the "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*DeviceUpdateOne) AddIPStaticRoutingIDs ¶ added in v0.2.0
func (duo *DeviceUpdateOne) AddIPStaticRoutingIDs(ids ...int) *DeviceUpdateOne
AddIPStaticRoutingIDs adds the "ip_static_routing" edge to the IPStaticRoutingTable entity by IDs.
func (*DeviceUpdateOne) AddInTopology ¶
func (duo *DeviceUpdateOne) AddInTopology(n ...*NetTopologyDeviceMap) *DeviceUpdateOne
AddInTopology adds the "in_topology" edges to the NetTopologyDeviceMap entity.
func (*DeviceUpdateOne) AddInTopologyIDs ¶
func (duo *DeviceUpdateOne) AddInTopologyIDs(ids ...int) *DeviceUpdateOne
AddInTopologyIDs adds the "in_topology" edge to the NetTopologyDeviceMap entity by IDs.
func (*DeviceUpdateOne) AddInterfaceIDs ¶
func (duo *DeviceUpdateOne) AddInterfaceIDs(ids ...int) *DeviceUpdateOne
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by IDs.
func (*DeviceUpdateOne) AddInterfaces ¶
func (duo *DeviceUpdateOne) AddInterfaces(n ...*NetInterface) *DeviceUpdateOne
AddInterfaces adds the "interfaces" edges to the NetInterface entity.
func (*DeviceUpdateOne) AddPoInterfaceIDs ¶ added in v0.2.0
func (duo *DeviceUpdateOne) AddPoInterfaceIDs(ids ...int) *DeviceUpdateOne
AddPoInterfaceIDs adds the "po_interfaces" edge to the PortChannelInterface entity by IDs.
func (*DeviceUpdateOne) AddPoInterfaces ¶ added in v0.2.0
func (duo *DeviceUpdateOne) AddPoInterfaces(p ...*PortChannelInterface) *DeviceUpdateOne
AddPoInterfaces adds the "po_interfaces" edges to the PortChannelInterface entity.
func (*DeviceUpdateOne) AddStoreVlanIDs ¶
func (duo *DeviceUpdateOne) AddStoreVlanIDs(ids ...int) *DeviceUpdateOne
AddStoreVlanIDs adds the "store_vlans" edge to the Vlan entity by IDs.
func (*DeviceUpdateOne) AddStoreVlans ¶
func (duo *DeviceUpdateOne) AddStoreVlans(v ...*Vlan) *DeviceUpdateOne
AddStoreVlans adds the "store_vlans" edges to the Vlan entity.
func (*DeviceUpdateOne) ClearDeletedVlans ¶
func (duo *DeviceUpdateOne) ClearDeletedVlans() *DeviceUpdateOne
ClearDeletedVlans clears all "deleted_vlans" edges to the DeletedVlanLog entity.
func (*DeviceUpdateOne) ClearDevicePassword ¶
func (duo *DeviceUpdateOne) ClearDevicePassword() *DeviceUpdateOne
ClearDevicePassword clears the value of the "device_password" field.
func (*DeviceUpdateOne) ClearDeviceSecret ¶
func (duo *DeviceUpdateOne) ClearDeviceSecret() *DeviceUpdateOne
ClearDeviceSecret clears the value of the "device_secret" field.
func (*DeviceUpdateOne) ClearDeviceUsername ¶
func (duo *DeviceUpdateOne) ClearDeviceUsername() *DeviceUpdateOne
ClearDeviceUsername clears the value of the "device_username" field.
func (*DeviceUpdateOne) ClearHaveIPAddresses ¶ added in v0.2.0
func (duo *DeviceUpdateOne) ClearHaveIPAddresses() *DeviceUpdateOne
ClearHaveIPAddresses clears all "have_ip_addresses" edges to the IPAddress entity.
func (*DeviceUpdateOne) ClearIPStaticRouting ¶ added in v0.2.0
func (duo *DeviceUpdateOne) ClearIPStaticRouting() *DeviceUpdateOne
ClearIPStaticRouting clears all "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*DeviceUpdateOne) ClearInPlatform ¶
func (duo *DeviceUpdateOne) ClearInPlatform() *DeviceUpdateOne
ClearInPlatform clears the "in_platform" edge to the DevicePlatform entity.
func (*DeviceUpdateOne) ClearInTopology ¶
func (duo *DeviceUpdateOne) ClearInTopology() *DeviceUpdateOne
ClearInTopology clears all "in_topology" edges to the NetTopologyDeviceMap entity.
func (*DeviceUpdateOne) ClearInType ¶
func (duo *DeviceUpdateOne) ClearInType() *DeviceUpdateOne
ClearInType clears the "in_type" edge to the DeviceType entity.
func (*DeviceUpdateOne) ClearInterfaces ¶
func (duo *DeviceUpdateOne) ClearInterfaces() *DeviceUpdateOne
ClearInterfaces clears all "interfaces" edges to the NetInterface entity.
func (*DeviceUpdateOne) ClearPoInterfaces ¶ added in v0.2.0
func (duo *DeviceUpdateOne) ClearPoInterfaces() *DeviceUpdateOne
ClearPoInterfaces clears all "po_interfaces" edges to the PortChannelInterface entity.
func (*DeviceUpdateOne) ClearStoreVlans ¶
func (duo *DeviceUpdateOne) ClearStoreVlans() *DeviceUpdateOne
ClearStoreVlans clears all "store_vlans" edges to the Vlan entity.
func (*DeviceUpdateOne) Exec ¶
func (duo *DeviceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DeviceUpdateOne) ExecX ¶
func (duo *DeviceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeviceUpdateOne) Mutation ¶
func (duo *DeviceUpdateOne) Mutation() *DeviceMutation
Mutation returns the DeviceMutation object of the builder.
func (*DeviceUpdateOne) RemoveDeletedVlanIDs ¶
func (duo *DeviceUpdateOne) RemoveDeletedVlanIDs(ids ...int) *DeviceUpdateOne
RemoveDeletedVlanIDs removes the "deleted_vlans" edge to DeletedVlanLog entities by IDs.
func (*DeviceUpdateOne) RemoveDeletedVlans ¶
func (duo *DeviceUpdateOne) RemoveDeletedVlans(d ...*DeletedVlanLog) *DeviceUpdateOne
RemoveDeletedVlans removes "deleted_vlans" edges to DeletedVlanLog entities.
func (*DeviceUpdateOne) RemoveHaveIPAddressIDs ¶ added in v0.2.0
func (duo *DeviceUpdateOne) RemoveHaveIPAddressIDs(ids ...int) *DeviceUpdateOne
RemoveHaveIPAddressIDs removes the "have_ip_addresses" edge to IPAddress entities by IDs.
func (*DeviceUpdateOne) RemoveHaveIPAddresses ¶ added in v0.2.0
func (duo *DeviceUpdateOne) RemoveHaveIPAddresses(i ...*IPAddress) *DeviceUpdateOne
RemoveHaveIPAddresses removes "have_ip_addresses" edges to IPAddress entities.
func (*DeviceUpdateOne) RemoveIPStaticRouting ¶ added in v0.2.0
func (duo *DeviceUpdateOne) RemoveIPStaticRouting(i ...*IPStaticRoutingTable) *DeviceUpdateOne
RemoveIPStaticRouting removes "ip_static_routing" edges to IPStaticRoutingTable entities.
func (*DeviceUpdateOne) RemoveIPStaticRoutingIDs ¶ added in v0.2.0
func (duo *DeviceUpdateOne) RemoveIPStaticRoutingIDs(ids ...int) *DeviceUpdateOne
RemoveIPStaticRoutingIDs removes the "ip_static_routing" edge to IPStaticRoutingTable entities by IDs.
func (*DeviceUpdateOne) RemoveInTopology ¶
func (duo *DeviceUpdateOne) RemoveInTopology(n ...*NetTopologyDeviceMap) *DeviceUpdateOne
RemoveInTopology removes "in_topology" edges to NetTopologyDeviceMap entities.
func (*DeviceUpdateOne) RemoveInTopologyIDs ¶
func (duo *DeviceUpdateOne) RemoveInTopologyIDs(ids ...int) *DeviceUpdateOne
RemoveInTopologyIDs removes the "in_topology" edge to NetTopologyDeviceMap entities by IDs.
func (*DeviceUpdateOne) RemoveInterfaceIDs ¶
func (duo *DeviceUpdateOne) RemoveInterfaceIDs(ids ...int) *DeviceUpdateOne
RemoveInterfaceIDs removes the "interfaces" edge to NetInterface entities by IDs.
func (*DeviceUpdateOne) RemoveInterfaces ¶
func (duo *DeviceUpdateOne) RemoveInterfaces(n ...*NetInterface) *DeviceUpdateOne
RemoveInterfaces removes "interfaces" edges to NetInterface entities.
func (*DeviceUpdateOne) RemovePoInterfaceIDs ¶ added in v0.2.0
func (duo *DeviceUpdateOne) RemovePoInterfaceIDs(ids ...int) *DeviceUpdateOne
RemovePoInterfaceIDs removes the "po_interfaces" edge to PortChannelInterface entities by IDs.
func (*DeviceUpdateOne) RemovePoInterfaces ¶ added in v0.2.0
func (duo *DeviceUpdateOne) RemovePoInterfaces(p ...*PortChannelInterface) *DeviceUpdateOne
RemovePoInterfaces removes "po_interfaces" edges to PortChannelInterface entities.
func (*DeviceUpdateOne) RemoveStoreVlanIDs ¶
func (duo *DeviceUpdateOne) RemoveStoreVlanIDs(ids ...int) *DeviceUpdateOne
RemoveStoreVlanIDs removes the "store_vlans" edge to Vlan entities by IDs.
func (*DeviceUpdateOne) RemoveStoreVlans ¶
func (duo *DeviceUpdateOne) RemoveStoreVlans(v ...*Vlan) *DeviceUpdateOne
RemoveStoreVlans removes "store_vlans" edges to Vlan entities.
func (*DeviceUpdateOne) Save ¶
func (duo *DeviceUpdateOne) Save(ctx context.Context) (*Device, error)
Save executes the query and returns the updated Device entity.
func (*DeviceUpdateOne) SaveX ¶
func (duo *DeviceUpdateOne) SaveX(ctx context.Context) *Device
SaveX is like Save, but panics if an error occurs.
func (*DeviceUpdateOne) Select ¶
func (duo *DeviceUpdateOne) Select(field string, fields ...string) *DeviceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DeviceUpdateOne) SetDeviceCommitConfig ¶
func (duo *DeviceUpdateOne) SetDeviceCommitConfig(b bool) *DeviceUpdateOne
SetDeviceCommitConfig sets the "device_commit_config" field.
func (*DeviceUpdateOne) SetDeviceHostname ¶
func (duo *DeviceUpdateOne) SetDeviceHostname(s string) *DeviceUpdateOne
SetDeviceHostname sets the "device_hostname" field.
func (*DeviceUpdateOne) SetDeviceName ¶
func (duo *DeviceUpdateOne) SetDeviceName(s string) *DeviceUpdateOne
SetDeviceName sets the "device_name" field.
func (*DeviceUpdateOne) SetDevicePassword ¶
func (duo *DeviceUpdateOne) SetDevicePassword(s string) *DeviceUpdateOne
SetDevicePassword sets the "device_password" field.
func (*DeviceUpdateOne) SetDeviceSSHPort ¶
func (duo *DeviceUpdateOne) SetDeviceSSHPort(i int) *DeviceUpdateOne
SetDeviceSSHPort sets the "device_ssh_port" field.
func (*DeviceUpdateOne) SetDeviceSecret ¶
func (duo *DeviceUpdateOne) SetDeviceSecret(s string) *DeviceUpdateOne
SetDeviceSecret sets the "device_secret" field.
func (*DeviceUpdateOne) SetDeviceUsername ¶
func (duo *DeviceUpdateOne) SetDeviceUsername(s string) *DeviceUpdateOne
SetDeviceUsername sets the "device_username" field.
func (*DeviceUpdateOne) SetInPlatform ¶
func (duo *DeviceUpdateOne) SetInPlatform(d *DevicePlatform) *DeviceUpdateOne
SetInPlatform sets the "in_platform" edge to the DevicePlatform entity.
func (*DeviceUpdateOne) SetInPlatformID ¶
func (duo *DeviceUpdateOne) SetInPlatformID(id int) *DeviceUpdateOne
SetInPlatformID sets the "in_platform" edge to the DevicePlatform entity by ID.
func (*DeviceUpdateOne) SetInType ¶
func (duo *DeviceUpdateOne) SetInType(d *DeviceType) *DeviceUpdateOne
SetInType sets the "in_type" edge to the DeviceType entity.
func (*DeviceUpdateOne) SetInTypeID ¶
func (duo *DeviceUpdateOne) SetInTypeID(id int) *DeviceUpdateOne
SetInTypeID sets the "in_type" edge to the DeviceType entity by ID.
func (*DeviceUpdateOne) SetNillableDeviceCommitConfig ¶
func (duo *DeviceUpdateOne) SetNillableDeviceCommitConfig(b *bool) *DeviceUpdateOne
SetNillableDeviceCommitConfig sets the "device_commit_config" field if the given value is not nil.
func (*DeviceUpdateOne) SetNillableDevicePassword ¶
func (duo *DeviceUpdateOne) SetNillableDevicePassword(s *string) *DeviceUpdateOne
SetNillableDevicePassword sets the "device_password" field if the given value is not nil.
func (*DeviceUpdateOne) SetNillableDeviceSSHPort ¶
func (duo *DeviceUpdateOne) SetNillableDeviceSSHPort(i *int) *DeviceUpdateOne
SetNillableDeviceSSHPort sets the "device_ssh_port" field if the given value is not nil.
func (*DeviceUpdateOne) SetNillableDeviceSecret ¶
func (duo *DeviceUpdateOne) SetNillableDeviceSecret(s *string) *DeviceUpdateOne
SetNillableDeviceSecret sets the "device_secret" field if the given value is not nil.
func (*DeviceUpdateOne) SetNillableDeviceUsername ¶
func (duo *DeviceUpdateOne) SetNillableDeviceUsername(s *string) *DeviceUpdateOne
SetNillableDeviceUsername sets the "device_username" field if the given value is not nil.
func (*DeviceUpdateOne) SetNillableInPlatformID ¶
func (duo *DeviceUpdateOne) SetNillableInPlatformID(id *int) *DeviceUpdateOne
SetNillableInPlatformID sets the "in_platform" edge to the DevicePlatform entity by ID if the given value is not nil.
func (*DeviceUpdateOne) SetNillableInTypeID ¶
func (duo *DeviceUpdateOne) SetNillableInTypeID(id *int) *DeviceUpdateOne
SetNillableInTypeID sets the "in_type" edge to the DeviceType entity by ID if the given value is not nil.
type IPAddress ¶ added in v0.2.0
type IPAddress struct { // ID of the ent. ID int `json:"id,omitempty"` // IPAddress holds the value of the "ip_address" field. IPAddress string `json:"ip_address,omitempty"` // SubnetMask holds the value of the "subnet_mask" field. SubnetMask string `json:"subnet_mask,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 }
IPAddress is the model entity for the IPAddress schema.
func (*IPAddress) QueryInterfaces ¶ added in v0.2.0
func (ia *IPAddress) QueryInterfaces() *NetInterfaceQuery
QueryInterfaces queries the "interfaces" edge of the IPAddress entity.
func (*IPAddress) QueryOnDevice ¶ added in v0.2.0
func (ia *IPAddress) QueryOnDevice() *DeviceQuery
QueryOnDevice queries the "on_device" edge of the IPAddress entity.
func (*IPAddress) QueryPoInterfaces ¶ added in v0.2.0
func (ia *IPAddress) QueryPoInterfaces() *PortChannelInterfaceQuery
QueryPoInterfaces queries the "po_interfaces" edge of the IPAddress entity.
func (*IPAddress) Unwrap ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
type IPAddressClient struct {
// contains filtered or unexported fields
}
IPAddressClient is a client for the IPAddress schema.
func NewIPAddressClient ¶ added in v0.2.0
func NewIPAddressClient(c config) *IPAddressClient
NewIPAddressClient returns a client for the IPAddress from the given config.
func (*IPAddressClient) Create ¶ added in v0.2.0
func (c *IPAddressClient) Create() *IPAddressCreate
Create returns a create builder for IPAddress.
func (*IPAddressClient) CreateBulk ¶ added in v0.2.0
func (c *IPAddressClient) CreateBulk(builders ...*IPAddressCreate) *IPAddressCreateBulk
CreateBulk returns a builder for creating a bulk of IPAddress entities.
func (*IPAddressClient) Delete ¶ added in v0.2.0
func (c *IPAddressClient) Delete() *IPAddressDelete
Delete returns a delete builder for IPAddress.
func (*IPAddressClient) DeleteOne ¶ added in v0.2.0
func (c *IPAddressClient) DeleteOne(ia *IPAddress) *IPAddressDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*IPAddressClient) DeleteOneID ¶ added in v0.2.0
func (c *IPAddressClient) DeleteOneID(id int) *IPAddressDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*IPAddressClient) GetX ¶ added in v0.2.0
func (c *IPAddressClient) GetX(ctx context.Context, id int) *IPAddress
GetX is like Get, but panics if an error occurs.
func (*IPAddressClient) Hooks ¶ added in v0.2.0
func (c *IPAddressClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IPAddressClient) Query ¶ added in v0.2.0
func (c *IPAddressClient) Query() *IPAddressQuery
Query returns a query builder for IPAddress.
func (*IPAddressClient) QueryInterfaces ¶ added in v0.2.0
func (c *IPAddressClient) QueryInterfaces(ia *IPAddress) *NetInterfaceQuery
QueryInterfaces queries the interfaces edge of a IPAddress.
func (*IPAddressClient) QueryOnDevice ¶ added in v0.2.0
func (c *IPAddressClient) QueryOnDevice(ia *IPAddress) *DeviceQuery
QueryOnDevice queries the on_device edge of a IPAddress.
func (*IPAddressClient) QueryPoInterfaces ¶ added in v0.2.0
func (c *IPAddressClient) QueryPoInterfaces(ia *IPAddress) *PortChannelInterfaceQuery
QueryPoInterfaces queries the po_interfaces edge of a IPAddress.
func (*IPAddressClient) Update ¶ added in v0.2.0
func (c *IPAddressClient) Update() *IPAddressUpdate
Update returns an update builder for IPAddress.
func (*IPAddressClient) UpdateOne ¶ added in v0.2.0
func (c *IPAddressClient) UpdateOne(ia *IPAddress) *IPAddressUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IPAddressClient) UpdateOneID ¶ added in v0.2.0
func (c *IPAddressClient) UpdateOneID(id int) *IPAddressUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IPAddressClient) Use ¶ added in v0.2.0
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 IPAddressCreate ¶ added in v0.2.0
type IPAddressCreate struct {
// contains filtered or unexported fields
}
IPAddressCreate is the builder for creating a IPAddress entity.
func (*IPAddressCreate) AddInterfaceIDs ¶ added in v0.2.0
func (iac *IPAddressCreate) AddInterfaceIDs(ids ...int) *IPAddressCreate
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by IDs.
func (*IPAddressCreate) AddInterfaces ¶ added in v0.2.0
func (iac *IPAddressCreate) AddInterfaces(n ...*NetInterface) *IPAddressCreate
AddInterfaces adds the "interfaces" edges to the NetInterface entity.
func (*IPAddressCreate) AddPoInterfaceIDs ¶ added in v0.2.0
func (iac *IPAddressCreate) AddPoInterfaceIDs(ids ...int) *IPAddressCreate
AddPoInterfaceIDs adds the "po_interfaces" edge to the PortChannelInterface entity by IDs.
func (*IPAddressCreate) AddPoInterfaces ¶ added in v0.2.0
func (iac *IPAddressCreate) AddPoInterfaces(p ...*PortChannelInterface) *IPAddressCreate
AddPoInterfaces adds the "po_interfaces" edges to the PortChannelInterface entity.
func (*IPAddressCreate) Mutation ¶ added in v0.2.0
func (iac *IPAddressCreate) Mutation() *IPAddressMutation
Mutation returns the IPAddressMutation object of the builder.
func (*IPAddressCreate) Save ¶ added in v0.2.0
func (iac *IPAddressCreate) Save(ctx context.Context) (*IPAddress, error)
Save creates the IPAddress in the database.
func (*IPAddressCreate) SaveX ¶ added in v0.2.0
func (iac *IPAddressCreate) SaveX(ctx context.Context) *IPAddress
SaveX calls Save and panics if Save returns an error.
func (*IPAddressCreate) SetIPAddress ¶ added in v0.2.0
func (iac *IPAddressCreate) SetIPAddress(s string) *IPAddressCreate
SetIPAddress sets the "ip_address" field.
func (*IPAddressCreate) SetNillableOnDeviceID ¶ added in v0.2.0
func (iac *IPAddressCreate) SetNillableOnDeviceID(id *int) *IPAddressCreate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*IPAddressCreate) SetOnDevice ¶ added in v0.2.0
func (iac *IPAddressCreate) SetOnDevice(d *Device) *IPAddressCreate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*IPAddressCreate) SetOnDeviceID ¶ added in v0.2.0
func (iac *IPAddressCreate) SetOnDeviceID(id int) *IPAddressCreate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*IPAddressCreate) SetSubnetMask ¶ added in v0.2.0
func (iac *IPAddressCreate) SetSubnetMask(s string) *IPAddressCreate
SetSubnetMask sets the "subnet_mask" field.
type IPAddressCreateBulk ¶ added in v0.2.0
type IPAddressCreateBulk struct {
// contains filtered or unexported fields
}
IPAddressCreateBulk is the builder for creating many IPAddress entities in bulk.
type IPAddressDelete ¶ added in v0.2.0
type IPAddressDelete struct {
// contains filtered or unexported fields
}
IPAddressDelete is the builder for deleting a IPAddress entity.
func (*IPAddressDelete) Exec ¶ added in v0.2.0
func (iad *IPAddressDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IPAddressDelete) ExecX ¶ added in v0.2.0
func (iad *IPAddressDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IPAddressDelete) Where ¶ added in v0.2.0
func (iad *IPAddressDelete) Where(ps ...predicate.IPAddress) *IPAddressDelete
Where adds a new predicate to the IPAddressDelete builder.
type IPAddressDeleteOne ¶ added in v0.2.0
type IPAddressDeleteOne struct {
// contains filtered or unexported fields
}
IPAddressDeleteOne is the builder for deleting a single IPAddress entity.
func (*IPAddressDeleteOne) Exec ¶ added in v0.2.0
func (iado *IPAddressDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IPAddressDeleteOne) ExecX ¶ added in v0.2.0
func (iado *IPAddressDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IPAddressEdges ¶ added in v0.2.0
type IPAddressEdges struct { // OnDevice holds the value of the on_device edge. OnDevice *Device `json:"on_device,omitempty"` // Interfaces holds the value of the interfaces edge. Interfaces []*NetInterface `json:"interfaces,omitempty"` // PoInterfaces holds the value of the po_interfaces edge. PoInterfaces []*PortChannelInterface `json:"po_interfaces,omitempty"` // contains filtered or unexported fields }
IPAddressEdges holds the relations/edges for other nodes in the graph.
func (IPAddressEdges) InterfacesOrErr ¶ added in v0.2.0
func (e IPAddressEdges) InterfacesOrErr() ([]*NetInterface, error)
InterfacesOrErr returns the Interfaces value or an error if the edge was not loaded in eager-loading.
func (IPAddressEdges) OnDeviceOrErr ¶ added in v0.2.0
func (e IPAddressEdges) OnDeviceOrErr() (*Device, error)
OnDeviceOrErr returns the OnDevice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (IPAddressEdges) PoInterfacesOrErr ¶ added in v0.2.0
func (e IPAddressEdges) PoInterfacesOrErr() ([]*PortChannelInterface, error)
PoInterfacesOrErr returns the PoInterfaces value or an error if the edge was not loaded in eager-loading.
type IPAddressGroupBy ¶ added in v0.2.0
type IPAddressGroupBy struct {
// contains filtered or unexported fields
}
IPAddressGroupBy is the group-by builder for IPAddress entities.
func (*IPAddressGroupBy) Aggregate ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Aggregate(fns ...AggregateFunc) *IPAddressGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IPAddressGroupBy) Bool ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*IPAddressGroupBy) BoolX ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*IPAddressGroupBy) Bools ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*IPAddressGroupBy) BoolsX ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*IPAddressGroupBy) Float64 ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*IPAddressGroupBy) Float64X ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*IPAddressGroupBy) Float64s ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*IPAddressGroupBy) Float64sX ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*IPAddressGroupBy) Int ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*IPAddressGroupBy) IntX ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*IPAddressGroupBy) Ints ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*IPAddressGroupBy) IntsX ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*IPAddressGroupBy) Scan ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*IPAddressGroupBy) ScanX ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*IPAddressGroupBy) String ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*IPAddressGroupBy) StringX ¶ added in v0.2.0
func (iagb *IPAddressGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type IPAddressMutation ¶ added in v0.2.0
type IPAddressMutation struct {
// contains filtered or unexported fields
}
IPAddressMutation represents an operation that mutates the IPAddress nodes in the graph.
func (*IPAddressMutation) AddField ¶ added in v0.2.0
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) AddInterfaceIDs ¶ added in v0.2.0
func (m *IPAddressMutation) AddInterfaceIDs(ids ...int)
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by ids.
func (*IPAddressMutation) AddPoInterfaceIDs ¶ added in v0.2.0
func (m *IPAddressMutation) AddPoInterfaceIDs(ids ...int)
AddPoInterfaceIDs adds the "po_interfaces" edge to the PortChannelInterface entity by ids.
func (*IPAddressMutation) AddedEdges ¶ added in v0.2.0
func (m *IPAddressMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IPAddressMutation) AddedField ¶ added in v0.2.0
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 ¶ added in v0.2.0
func (m *IPAddressMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IPAddressMutation) AddedIDs ¶ added in v0.2.0
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) ClearEdge ¶ added in v0.2.0
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 ¶ added in v0.2.0
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) ClearInterfaces ¶ added in v0.2.0
func (m *IPAddressMutation) ClearInterfaces()
ClearInterfaces clears the "interfaces" edge to the NetInterface entity.
func (*IPAddressMutation) ClearOnDevice ¶ added in v0.2.0
func (m *IPAddressMutation) ClearOnDevice()
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*IPAddressMutation) ClearPoInterfaces ¶ added in v0.2.0
func (m *IPAddressMutation) ClearPoInterfaces()
ClearPoInterfaces clears the "po_interfaces" edge to the PortChannelInterface entity.
func (*IPAddressMutation) ClearedEdges ¶ added in v0.2.0
func (m *IPAddressMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IPAddressMutation) ClearedFields ¶ added in v0.2.0
func (m *IPAddressMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IPAddressMutation) Client ¶ added in v0.2.0
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) EdgeCleared ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
func (m *IPAddressMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*IPAddressMutation) IPAddress ¶ added in v0.2.0
func (m *IPAddressMutation) IPAddress() (r string, exists bool)
IPAddress returns the value of the "ip_address" field in the mutation.
func (*IPAddressMutation) InterfacesCleared ¶ added in v0.2.0
func (m *IPAddressMutation) InterfacesCleared() bool
InterfacesCleared reports if the "interfaces" edge to the NetInterface entity was cleared.
func (*IPAddressMutation) InterfacesIDs ¶ added in v0.2.0
func (m *IPAddressMutation) InterfacesIDs() (ids []int)
InterfacesIDs returns the "interfaces" edge IDs in the mutation.
func (*IPAddressMutation) OldField ¶ added in v0.2.0
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) OldIPAddress ¶ added in v0.2.0
func (m *IPAddressMutation) OldIPAddress(ctx context.Context) (v string, err error)
OldIPAddress returns the old "ip_address" 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) OldSubnetMask ¶ added in v0.2.0
func (m *IPAddressMutation) OldSubnetMask(ctx context.Context) (v string, err error)
OldSubnetMask returns the old "subnet_mask" 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) OnDeviceCleared ¶ added in v0.2.0
func (m *IPAddressMutation) OnDeviceCleared() bool
OnDeviceCleared reports if the "on_device" edge to the Device entity was cleared.
func (*IPAddressMutation) OnDeviceID ¶ added in v0.2.0
func (m *IPAddressMutation) OnDeviceID() (id int, exists bool)
OnDeviceID returns the "on_device" edge ID in the mutation.
func (*IPAddressMutation) OnDeviceIDs ¶ added in v0.2.0
func (m *IPAddressMutation) OnDeviceIDs() (ids []int)
OnDeviceIDs returns the "on_device" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnDeviceID instead. It exists only for internal usage by the builders.
func (*IPAddressMutation) Op ¶ added in v0.2.0
func (m *IPAddressMutation) Op() Op
Op returns the operation name.
func (*IPAddressMutation) PoInterfacesCleared ¶ added in v0.2.0
func (m *IPAddressMutation) PoInterfacesCleared() bool
PoInterfacesCleared reports if the "po_interfaces" edge to the PortChannelInterface entity was cleared.
func (*IPAddressMutation) PoInterfacesIDs ¶ added in v0.2.0
func (m *IPAddressMutation) PoInterfacesIDs() (ids []int)
PoInterfacesIDs returns the "po_interfaces" edge IDs in the mutation.
func (*IPAddressMutation) RemoveInterfaceIDs ¶ added in v0.2.0
func (m *IPAddressMutation) RemoveInterfaceIDs(ids ...int)
RemoveInterfaceIDs removes the "interfaces" edge to the NetInterface entity by IDs.
func (*IPAddressMutation) RemovePoInterfaceIDs ¶ added in v0.2.0
func (m *IPAddressMutation) RemovePoInterfaceIDs(ids ...int)
RemovePoInterfaceIDs removes the "po_interfaces" edge to the PortChannelInterface entity by IDs.
func (*IPAddressMutation) RemovedEdges ¶ added in v0.2.0
func (m *IPAddressMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IPAddressMutation) RemovedIDs ¶ added in v0.2.0
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) RemovedInterfacesIDs ¶ added in v0.2.0
func (m *IPAddressMutation) RemovedInterfacesIDs() (ids []int)
RemovedInterfaces returns the removed IDs of the "interfaces" edge to the NetInterface entity.
func (*IPAddressMutation) RemovedPoInterfacesIDs ¶ added in v0.2.0
func (m *IPAddressMutation) RemovedPoInterfacesIDs() (ids []int)
RemovedPoInterfaces returns the removed IDs of the "po_interfaces" edge to the PortChannelInterface entity.
func (*IPAddressMutation) ResetEdge ¶ added in v0.2.0
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 ¶ added in v0.2.0
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) ResetIPAddress ¶ added in v0.2.0
func (m *IPAddressMutation) ResetIPAddress()
ResetIPAddress resets all changes to the "ip_address" field.
func (*IPAddressMutation) ResetInterfaces ¶ added in v0.2.0
func (m *IPAddressMutation) ResetInterfaces()
ResetInterfaces resets all changes to the "interfaces" edge.
func (*IPAddressMutation) ResetOnDevice ¶ added in v0.2.0
func (m *IPAddressMutation) ResetOnDevice()
ResetOnDevice resets all changes to the "on_device" edge.
func (*IPAddressMutation) ResetPoInterfaces ¶ added in v0.2.0
func (m *IPAddressMutation) ResetPoInterfaces()
ResetPoInterfaces resets all changes to the "po_interfaces" edge.
func (*IPAddressMutation) ResetSubnetMask ¶ added in v0.2.0
func (m *IPAddressMutation) ResetSubnetMask()
ResetSubnetMask resets all changes to the "subnet_mask" field.
func (*IPAddressMutation) SetField ¶ added in v0.2.0
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) SetIPAddress ¶ added in v0.2.0
func (m *IPAddressMutation) SetIPAddress(s string)
SetIPAddress sets the "ip_address" field.
func (*IPAddressMutation) SetOnDeviceID ¶ added in v0.2.0
func (m *IPAddressMutation) SetOnDeviceID(id int)
SetOnDeviceID sets the "on_device" edge to the Device entity by id.
func (*IPAddressMutation) SetSubnetMask ¶ added in v0.2.0
func (m *IPAddressMutation) SetSubnetMask(s string)
SetSubnetMask sets the "subnet_mask" field.
func (*IPAddressMutation) SubnetMask ¶ added in v0.2.0
func (m *IPAddressMutation) SubnetMask() (r string, exists bool)
SubnetMask returns the value of the "subnet_mask" field in the mutation.
func (IPAddressMutation) Tx ¶ added in v0.2.0
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 ¶ added in v0.2.0
func (m *IPAddressMutation) Type() string
Type returns the node type of this mutation (IPAddress).
type IPAddressQuery ¶ added in v0.2.0
type IPAddressQuery struct {
// contains filtered or unexported fields
}
IPAddressQuery is the builder for querying IPAddress entities.
func (*IPAddressQuery) All ¶ added in v0.2.0
func (iaq *IPAddressQuery) All(ctx context.Context) ([]*IPAddress, error)
All executes the query and returns a list of IPAddresses.
func (*IPAddressQuery) AllX ¶ added in v0.2.0
func (iaq *IPAddressQuery) AllX(ctx context.Context) []*IPAddress
AllX is like All, but panics if an error occurs.
func (*IPAddressQuery) Clone ¶ added in v0.2.0
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) Count ¶ added in v0.2.0
func (iaq *IPAddressQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IPAddressQuery) CountX ¶ added in v0.2.0
func (iaq *IPAddressQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IPAddressQuery) Exist ¶ added in v0.2.0
func (iaq *IPAddressQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IPAddressQuery) ExistX ¶ added in v0.2.0
func (iaq *IPAddressQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IPAddressQuery) First ¶ added in v0.2.0
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 ¶ added in v0.2.0
func (iaq *IPAddressQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first IPAddress ID from the query. Returns a *NotFoundError when no IPAddress ID was found.
func (*IPAddressQuery) FirstIDX ¶ added in v0.2.0
func (iaq *IPAddressQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*IPAddressQuery) FirstX ¶ added in v0.2.0
func (iaq *IPAddressQuery) FirstX(ctx context.Context) *IPAddress
FirstX is like First, but panics if an error occurs.
func (*IPAddressQuery) GroupBy ¶ added in v0.2.0
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 { IPAddress string `json:"ip_address,omitempty"` Count int `json:"count,omitempty"` } client.IPAddress.Query(). GroupBy(ipaddress.FieldIPAddress). Aggregate(ent.Count()). Scan(ctx, &v)
func (*IPAddressQuery) IDs ¶ added in v0.2.0
func (iaq *IPAddressQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of IPAddress IDs.
func (*IPAddressQuery) IDsX ¶ added in v0.2.0
func (iaq *IPAddressQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*IPAddressQuery) Limit ¶ added in v0.2.0
func (iaq *IPAddressQuery) Limit(limit int) *IPAddressQuery
Limit adds a limit step to the query.
func (*IPAddressQuery) Offset ¶ added in v0.2.0
func (iaq *IPAddressQuery) Offset(offset int) *IPAddressQuery
Offset adds an offset step to the query.
func (*IPAddressQuery) Only ¶ added in v0.2.0
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 exactly one IPAddress entity is not found. Returns a *NotFoundError when no IPAddress entities are found.
func (*IPAddressQuery) OnlyID ¶ added in v0.2.0
func (iaq *IPAddressQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only IPAddress ID in the query. Returns a *NotSingularError when exactly one IPAddress ID is not found. Returns a *NotFoundError when no entities are found.
func (*IPAddressQuery) OnlyIDX ¶ added in v0.2.0
func (iaq *IPAddressQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IPAddressQuery) OnlyX ¶ added in v0.2.0
func (iaq *IPAddressQuery) OnlyX(ctx context.Context) *IPAddress
OnlyX is like Only, but panics if an error occurs.
func (*IPAddressQuery) Order ¶ added in v0.2.0
func (iaq *IPAddressQuery) Order(o ...OrderFunc) *IPAddressQuery
Order adds an order step to the query.
func (*IPAddressQuery) QueryInterfaces ¶ added in v0.2.0
func (iaq *IPAddressQuery) QueryInterfaces() *NetInterfaceQuery
QueryInterfaces chains the current query on the "interfaces" edge.
func (*IPAddressQuery) QueryOnDevice ¶ added in v0.2.0
func (iaq *IPAddressQuery) QueryOnDevice() *DeviceQuery
QueryOnDevice chains the current query on the "on_device" edge.
func (*IPAddressQuery) QueryPoInterfaces ¶ added in v0.2.0
func (iaq *IPAddressQuery) QueryPoInterfaces() *PortChannelInterfaceQuery
QueryPoInterfaces chains the current query on the "po_interfaces" edge.
func (*IPAddressQuery) Select ¶ added in v0.2.0
func (iaq *IPAddressQuery) Select(field string, 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 { IPAddress string `json:"ip_address,omitempty"` } client.IPAddress.Query(). Select(ipaddress.FieldIPAddress). Scan(ctx, &v)
func (*IPAddressQuery) Unique ¶ added in v0.2.0
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 ¶ added in v0.2.0
func (iaq *IPAddressQuery) Where(ps ...predicate.IPAddress) *IPAddressQuery
Where adds a new predicate for the IPAddressQuery builder.
func (*IPAddressQuery) WithInterfaces ¶ added in v0.2.0
func (iaq *IPAddressQuery) WithInterfaces(opts ...func(*NetInterfaceQuery)) *IPAddressQuery
WithInterfaces tells the query-builder to eager-load the nodes that are connected to the "interfaces" edge. The optional arguments are used to configure the query builder of the edge.
func (*IPAddressQuery) WithOnDevice ¶ added in v0.2.0
func (iaq *IPAddressQuery) WithOnDevice(opts ...func(*DeviceQuery)) *IPAddressQuery
WithOnDevice tells the query-builder to eager-load the nodes that are connected to the "on_device" edge. The optional arguments are used to configure the query builder of the edge.
func (*IPAddressQuery) WithPoInterfaces ¶ added in v0.2.0
func (iaq *IPAddressQuery) WithPoInterfaces(opts ...func(*PortChannelInterfaceQuery)) *IPAddressQuery
WithPoInterfaces tells the query-builder to eager-load the nodes that are connected to the "po_interfaces" edge. The optional arguments are used to configure the query builder of the edge.
type IPAddressSelect ¶ added in v0.2.0
type IPAddressSelect struct { *IPAddressQuery // contains filtered or unexported fields }
IPAddressSelect is the builder for selecting fields of IPAddress entities.
func (*IPAddressSelect) Bool ¶ added in v0.2.0
func (ias *IPAddressSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) BoolX ¶ added in v0.2.0
func (ias *IPAddressSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*IPAddressSelect) Bools ¶ added in v0.2.0
func (ias *IPAddressSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) BoolsX ¶ added in v0.2.0
func (ias *IPAddressSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*IPAddressSelect) Float64 ¶ added in v0.2.0
func (ias *IPAddressSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) Float64X ¶ added in v0.2.0
func (ias *IPAddressSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*IPAddressSelect) Float64s ¶ added in v0.2.0
func (ias *IPAddressSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) Float64sX ¶ added in v0.2.0
func (ias *IPAddressSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*IPAddressSelect) Int ¶ added in v0.2.0
func (ias *IPAddressSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) IntX ¶ added in v0.2.0
func (ias *IPAddressSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*IPAddressSelect) Ints ¶ added in v0.2.0
func (ias *IPAddressSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) IntsX ¶ added in v0.2.0
func (ias *IPAddressSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*IPAddressSelect) Scan ¶ added in v0.2.0
func (ias *IPAddressSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*IPAddressSelect) ScanX ¶ added in v0.2.0
func (ias *IPAddressSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*IPAddressSelect) String ¶ added in v0.2.0
func (ias *IPAddressSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*IPAddressSelect) StringX ¶ added in v0.2.0
func (ias *IPAddressSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type IPAddressUpdate ¶ added in v0.2.0
type IPAddressUpdate struct {
// contains filtered or unexported fields
}
IPAddressUpdate is the builder for updating IPAddress entities.
func (*IPAddressUpdate) AddInterfaceIDs ¶ added in v0.2.0
func (iau *IPAddressUpdate) AddInterfaceIDs(ids ...int) *IPAddressUpdate
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by IDs.
func (*IPAddressUpdate) AddInterfaces ¶ added in v0.2.0
func (iau *IPAddressUpdate) AddInterfaces(n ...*NetInterface) *IPAddressUpdate
AddInterfaces adds the "interfaces" edges to the NetInterface entity.
func (*IPAddressUpdate) AddPoInterfaceIDs ¶ added in v0.2.0
func (iau *IPAddressUpdate) AddPoInterfaceIDs(ids ...int) *IPAddressUpdate
AddPoInterfaceIDs adds the "po_interfaces" edge to the PortChannelInterface entity by IDs.
func (*IPAddressUpdate) AddPoInterfaces ¶ added in v0.2.0
func (iau *IPAddressUpdate) AddPoInterfaces(p ...*PortChannelInterface) *IPAddressUpdate
AddPoInterfaces adds the "po_interfaces" edges to the PortChannelInterface entity.
func (*IPAddressUpdate) ClearInterfaces ¶ added in v0.2.0
func (iau *IPAddressUpdate) ClearInterfaces() *IPAddressUpdate
ClearInterfaces clears all "interfaces" edges to the NetInterface entity.
func (*IPAddressUpdate) ClearOnDevice ¶ added in v0.2.0
func (iau *IPAddressUpdate) ClearOnDevice() *IPAddressUpdate
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*IPAddressUpdate) ClearPoInterfaces ¶ added in v0.2.0
func (iau *IPAddressUpdate) ClearPoInterfaces() *IPAddressUpdate
ClearPoInterfaces clears all "po_interfaces" edges to the PortChannelInterface entity.
func (*IPAddressUpdate) Exec ¶ added in v0.2.0
func (iau *IPAddressUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IPAddressUpdate) ExecX ¶ added in v0.2.0
func (iau *IPAddressUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPAddressUpdate) Mutation ¶ added in v0.2.0
func (iau *IPAddressUpdate) Mutation() *IPAddressMutation
Mutation returns the IPAddressMutation object of the builder.
func (*IPAddressUpdate) RemoveInterfaceIDs ¶ added in v0.2.0
func (iau *IPAddressUpdate) RemoveInterfaceIDs(ids ...int) *IPAddressUpdate
RemoveInterfaceIDs removes the "interfaces" edge to NetInterface entities by IDs.
func (*IPAddressUpdate) RemoveInterfaces ¶ added in v0.2.0
func (iau *IPAddressUpdate) RemoveInterfaces(n ...*NetInterface) *IPAddressUpdate
RemoveInterfaces removes "interfaces" edges to NetInterface entities.
func (*IPAddressUpdate) RemovePoInterfaceIDs ¶ added in v0.2.0
func (iau *IPAddressUpdate) RemovePoInterfaceIDs(ids ...int) *IPAddressUpdate
RemovePoInterfaceIDs removes the "po_interfaces" edge to PortChannelInterface entities by IDs.
func (*IPAddressUpdate) RemovePoInterfaces ¶ added in v0.2.0
func (iau *IPAddressUpdate) RemovePoInterfaces(p ...*PortChannelInterface) *IPAddressUpdate
RemovePoInterfaces removes "po_interfaces" edges to PortChannelInterface entities.
func (*IPAddressUpdate) Save ¶ added in v0.2.0
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 ¶ added in v0.2.0
func (iau *IPAddressUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IPAddressUpdate) SetIPAddress ¶ added in v0.2.0
func (iau *IPAddressUpdate) SetIPAddress(s string) *IPAddressUpdate
SetIPAddress sets the "ip_address" field.
func (*IPAddressUpdate) SetNillableOnDeviceID ¶ added in v0.2.0
func (iau *IPAddressUpdate) SetNillableOnDeviceID(id *int) *IPAddressUpdate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*IPAddressUpdate) SetOnDevice ¶ added in v0.2.0
func (iau *IPAddressUpdate) SetOnDevice(d *Device) *IPAddressUpdate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*IPAddressUpdate) SetOnDeviceID ¶ added in v0.2.0
func (iau *IPAddressUpdate) SetOnDeviceID(id int) *IPAddressUpdate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*IPAddressUpdate) SetSubnetMask ¶ added in v0.2.0
func (iau *IPAddressUpdate) SetSubnetMask(s string) *IPAddressUpdate
SetSubnetMask sets the "subnet_mask" field.
func (*IPAddressUpdate) Where ¶ added in v0.2.0
func (iau *IPAddressUpdate) Where(ps ...predicate.IPAddress) *IPAddressUpdate
Where adds a new predicate for the IPAddressUpdate builder.
type IPAddressUpdateOne ¶ added in v0.2.0
type IPAddressUpdateOne struct {
// contains filtered or unexported fields
}
IPAddressUpdateOne is the builder for updating a single IPAddress entity.
func (*IPAddressUpdateOne) AddInterfaceIDs ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) AddInterfaceIDs(ids ...int) *IPAddressUpdateOne
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by IDs.
func (*IPAddressUpdateOne) AddInterfaces ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) AddInterfaces(n ...*NetInterface) *IPAddressUpdateOne
AddInterfaces adds the "interfaces" edges to the NetInterface entity.
func (*IPAddressUpdateOne) AddPoInterfaceIDs ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) AddPoInterfaceIDs(ids ...int) *IPAddressUpdateOne
AddPoInterfaceIDs adds the "po_interfaces" edge to the PortChannelInterface entity by IDs.
func (*IPAddressUpdateOne) AddPoInterfaces ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) AddPoInterfaces(p ...*PortChannelInterface) *IPAddressUpdateOne
AddPoInterfaces adds the "po_interfaces" edges to the PortChannelInterface entity.
func (*IPAddressUpdateOne) ClearInterfaces ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) ClearInterfaces() *IPAddressUpdateOne
ClearInterfaces clears all "interfaces" edges to the NetInterface entity.
func (*IPAddressUpdateOne) ClearOnDevice ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) ClearOnDevice() *IPAddressUpdateOne
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*IPAddressUpdateOne) ClearPoInterfaces ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) ClearPoInterfaces() *IPAddressUpdateOne
ClearPoInterfaces clears all "po_interfaces" edges to the PortChannelInterface entity.
func (*IPAddressUpdateOne) Exec ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IPAddressUpdateOne) ExecX ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPAddressUpdateOne) Mutation ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) Mutation() *IPAddressMutation
Mutation returns the IPAddressMutation object of the builder.
func (*IPAddressUpdateOne) RemoveInterfaceIDs ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) RemoveInterfaceIDs(ids ...int) *IPAddressUpdateOne
RemoveInterfaceIDs removes the "interfaces" edge to NetInterface entities by IDs.
func (*IPAddressUpdateOne) RemoveInterfaces ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) RemoveInterfaces(n ...*NetInterface) *IPAddressUpdateOne
RemoveInterfaces removes "interfaces" edges to NetInterface entities.
func (*IPAddressUpdateOne) RemovePoInterfaceIDs ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) RemovePoInterfaceIDs(ids ...int) *IPAddressUpdateOne
RemovePoInterfaceIDs removes the "po_interfaces" edge to PortChannelInterface entities by IDs.
func (*IPAddressUpdateOne) RemovePoInterfaces ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) RemovePoInterfaces(p ...*PortChannelInterface) *IPAddressUpdateOne
RemovePoInterfaces removes "po_interfaces" edges to PortChannelInterface entities.
func (*IPAddressUpdateOne) Save ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) Save(ctx context.Context) (*IPAddress, error)
Save executes the query and returns the updated IPAddress entity.
func (*IPAddressUpdateOne) SaveX ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) SaveX(ctx context.Context) *IPAddress
SaveX is like Save, but panics if an error occurs.
func (*IPAddressUpdateOne) Select ¶ added in v0.2.0
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) SetIPAddress ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) SetIPAddress(s string) *IPAddressUpdateOne
SetIPAddress sets the "ip_address" field.
func (*IPAddressUpdateOne) SetNillableOnDeviceID ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) SetNillableOnDeviceID(id *int) *IPAddressUpdateOne
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*IPAddressUpdateOne) SetOnDevice ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) SetOnDevice(d *Device) *IPAddressUpdateOne
SetOnDevice sets the "on_device" edge to the Device entity.
func (*IPAddressUpdateOne) SetOnDeviceID ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) SetOnDeviceID(id int) *IPAddressUpdateOne
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*IPAddressUpdateOne) SetSubnetMask ¶ added in v0.2.0
func (iauo *IPAddressUpdateOne) SetSubnetMask(s string) *IPAddressUpdateOne
SetSubnetMask sets the "subnet_mask" field.
type IPAddresses ¶ added in v0.2.0
type IPAddresses []*IPAddress
IPAddresses is a parsable slice of IPAddress.
type IPStaticRoutingTable ¶ added in v0.2.0
type IPStaticRoutingTable struct { // ID of the ent. ID int `json:"id,omitempty"` // NetworkAddress holds the value of the "network_address" field. NetworkAddress string `json:"network_address,omitempty"` // SubnetMask holds the value of the "subnet_mask" field. SubnetMask string `json:"subnet_mask,omitempty"` // NextHop holds the value of the "next_hop" field. NextHop string `json:"next_hop,omitempty"` // BrdInterface holds the value of the "brd_interface" field. BrdInterface bool `json:"brd_interface,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the IPStaticRoutingTableQuery when eager-loading is set. Edges IPStaticRoutingTableEdges `json:"edges"` // contains filtered or unexported fields }
IPStaticRoutingTable is the model entity for the IPStaticRoutingTable schema.
func (*IPStaticRoutingTable) QueryOnDevice ¶ added in v0.2.0
func (isrt *IPStaticRoutingTable) QueryOnDevice() *DeviceQuery
QueryOnDevice queries the "on_device" edge of the IPStaticRoutingTable entity.
func (*IPStaticRoutingTable) QueryOnInterface ¶ added in v0.2.0
func (isrt *IPStaticRoutingTable) QueryOnInterface() *NetInterfaceQuery
QueryOnInterface queries the "on_interface" edge of the IPStaticRoutingTable entity.
func (*IPStaticRoutingTable) String ¶ added in v0.2.0
func (isrt *IPStaticRoutingTable) String() string
String implements the fmt.Stringer.
func (*IPStaticRoutingTable) Unwrap ¶ added in v0.2.0
func (isrt *IPStaticRoutingTable) Unwrap() *IPStaticRoutingTable
Unwrap unwraps the IPStaticRoutingTable 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 (*IPStaticRoutingTable) Update ¶ added in v0.2.0
func (isrt *IPStaticRoutingTable) Update() *IPStaticRoutingTableUpdateOne
Update returns a builder for updating this IPStaticRoutingTable. Note that you need to call IPStaticRoutingTable.Unwrap() before calling this method if this IPStaticRoutingTable was returned from a transaction, and the transaction was committed or rolled back.
type IPStaticRoutingTableClient ¶ added in v0.2.0
type IPStaticRoutingTableClient struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableClient is a client for the IPStaticRoutingTable schema.
func NewIPStaticRoutingTableClient ¶ added in v0.2.0
func NewIPStaticRoutingTableClient(c config) *IPStaticRoutingTableClient
NewIPStaticRoutingTableClient returns a client for the IPStaticRoutingTable from the given config.
func (*IPStaticRoutingTableClient) Create ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) Create() *IPStaticRoutingTableCreate
Create returns a create builder for IPStaticRoutingTable.
func (*IPStaticRoutingTableClient) CreateBulk ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) CreateBulk(builders ...*IPStaticRoutingTableCreate) *IPStaticRoutingTableCreateBulk
CreateBulk returns a builder for creating a bulk of IPStaticRoutingTable entities.
func (*IPStaticRoutingTableClient) Delete ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) Delete() *IPStaticRoutingTableDelete
Delete returns a delete builder for IPStaticRoutingTable.
func (*IPStaticRoutingTableClient) DeleteOne ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) DeleteOne(isrt *IPStaticRoutingTable) *IPStaticRoutingTableDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*IPStaticRoutingTableClient) DeleteOneID ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) DeleteOneID(id int) *IPStaticRoutingTableDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*IPStaticRoutingTableClient) Get ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) Get(ctx context.Context, id int) (*IPStaticRoutingTable, error)
Get returns a IPStaticRoutingTable entity by its id.
func (*IPStaticRoutingTableClient) GetX ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) GetX(ctx context.Context, id int) *IPStaticRoutingTable
GetX is like Get, but panics if an error occurs.
func (*IPStaticRoutingTableClient) Hooks ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IPStaticRoutingTableClient) Query ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) Query() *IPStaticRoutingTableQuery
Query returns a query builder for IPStaticRoutingTable.
func (*IPStaticRoutingTableClient) QueryOnDevice ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) QueryOnDevice(isrt *IPStaticRoutingTable) *DeviceQuery
QueryOnDevice queries the on_device edge of a IPStaticRoutingTable.
func (*IPStaticRoutingTableClient) QueryOnInterface ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) QueryOnInterface(isrt *IPStaticRoutingTable) *NetInterfaceQuery
QueryOnInterface queries the on_interface edge of a IPStaticRoutingTable.
func (*IPStaticRoutingTableClient) Update ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) Update() *IPStaticRoutingTableUpdate
Update returns an update builder for IPStaticRoutingTable.
func (*IPStaticRoutingTableClient) UpdateOne ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) UpdateOne(isrt *IPStaticRoutingTable) *IPStaticRoutingTableUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IPStaticRoutingTableClient) UpdateOneID ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) UpdateOneID(id int) *IPStaticRoutingTableUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IPStaticRoutingTableClient) Use ¶ added in v0.2.0
func (c *IPStaticRoutingTableClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ipstaticroutingtable.Hooks(f(g(h())))`.
type IPStaticRoutingTableCreate ¶ added in v0.2.0
type IPStaticRoutingTableCreate struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableCreate is the builder for creating a IPStaticRoutingTable entity.
func (*IPStaticRoutingTableCreate) Mutation ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) Mutation() *IPStaticRoutingTableMutation
Mutation returns the IPStaticRoutingTableMutation object of the builder.
func (*IPStaticRoutingTableCreate) Save ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) Save(ctx context.Context) (*IPStaticRoutingTable, error)
Save creates the IPStaticRoutingTable in the database.
func (*IPStaticRoutingTableCreate) SaveX ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SaveX(ctx context.Context) *IPStaticRoutingTable
SaveX calls Save and panics if Save returns an error.
func (*IPStaticRoutingTableCreate) SetBrdInterface ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetBrdInterface(b bool) *IPStaticRoutingTableCreate
SetBrdInterface sets the "brd_interface" field.
func (*IPStaticRoutingTableCreate) SetNetworkAddress ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetNetworkAddress(s string) *IPStaticRoutingTableCreate
SetNetworkAddress sets the "network_address" field.
func (*IPStaticRoutingTableCreate) SetNextHop ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetNextHop(s string) *IPStaticRoutingTableCreate
SetNextHop sets the "next_hop" field.
func (*IPStaticRoutingTableCreate) SetNillableBrdInterface ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetNillableBrdInterface(b *bool) *IPStaticRoutingTableCreate
SetNillableBrdInterface sets the "brd_interface" field if the given value is not nil.
func (*IPStaticRoutingTableCreate) SetNillableOnDeviceID ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetNillableOnDeviceID(id *int) *IPStaticRoutingTableCreate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*IPStaticRoutingTableCreate) SetNillableOnInterfaceID ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetNillableOnInterfaceID(id *int) *IPStaticRoutingTableCreate
SetNillableOnInterfaceID sets the "on_interface" edge to the NetInterface entity by ID if the given value is not nil.
func (*IPStaticRoutingTableCreate) SetOnDevice ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetOnDevice(d *Device) *IPStaticRoutingTableCreate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*IPStaticRoutingTableCreate) SetOnDeviceID ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetOnDeviceID(id int) *IPStaticRoutingTableCreate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*IPStaticRoutingTableCreate) SetOnInterface ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetOnInterface(n *NetInterface) *IPStaticRoutingTableCreate
SetOnInterface sets the "on_interface" edge to the NetInterface entity.
func (*IPStaticRoutingTableCreate) SetOnInterfaceID ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetOnInterfaceID(id int) *IPStaticRoutingTableCreate
SetOnInterfaceID sets the "on_interface" edge to the NetInterface entity by ID.
func (*IPStaticRoutingTableCreate) SetSubnetMask ¶ added in v0.2.0
func (isrtc *IPStaticRoutingTableCreate) SetSubnetMask(s string) *IPStaticRoutingTableCreate
SetSubnetMask sets the "subnet_mask" field.
type IPStaticRoutingTableCreateBulk ¶ added in v0.2.0
type IPStaticRoutingTableCreateBulk struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableCreateBulk is the builder for creating many IPStaticRoutingTable entities in bulk.
func (*IPStaticRoutingTableCreateBulk) Save ¶ added in v0.2.0
func (isrtcb *IPStaticRoutingTableCreateBulk) Save(ctx context.Context) ([]*IPStaticRoutingTable, error)
Save creates the IPStaticRoutingTable entities in the database.
func (*IPStaticRoutingTableCreateBulk) SaveX ¶ added in v0.2.0
func (isrtcb *IPStaticRoutingTableCreateBulk) SaveX(ctx context.Context) []*IPStaticRoutingTable
SaveX is like Save, but panics if an error occurs.
type IPStaticRoutingTableDelete ¶ added in v0.2.0
type IPStaticRoutingTableDelete struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableDelete is the builder for deleting a IPStaticRoutingTable entity.
func (*IPStaticRoutingTableDelete) Exec ¶ added in v0.2.0
func (isrtd *IPStaticRoutingTableDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IPStaticRoutingTableDelete) ExecX ¶ added in v0.2.0
func (isrtd *IPStaticRoutingTableDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IPStaticRoutingTableDelete) Where ¶ added in v0.2.0
func (isrtd *IPStaticRoutingTableDelete) Where(ps ...predicate.IPStaticRoutingTable) *IPStaticRoutingTableDelete
Where adds a new predicate to the IPStaticRoutingTableDelete builder.
type IPStaticRoutingTableDeleteOne ¶ added in v0.2.0
type IPStaticRoutingTableDeleteOne struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableDeleteOne is the builder for deleting a single IPStaticRoutingTable entity.
func (*IPStaticRoutingTableDeleteOne) Exec ¶ added in v0.2.0
func (isrtdo *IPStaticRoutingTableDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IPStaticRoutingTableDeleteOne) ExecX ¶ added in v0.2.0
func (isrtdo *IPStaticRoutingTableDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IPStaticRoutingTableEdges ¶ added in v0.2.0
type IPStaticRoutingTableEdges struct { // OnDevice holds the value of the on_device edge. OnDevice *Device `json:"on_device,omitempty"` // OnInterface holds the value of the on_interface edge. OnInterface *NetInterface `json:"on_interface,omitempty"` // contains filtered or unexported fields }
IPStaticRoutingTableEdges holds the relations/edges for other nodes in the graph.
func (IPStaticRoutingTableEdges) OnDeviceOrErr ¶ added in v0.2.0
func (e IPStaticRoutingTableEdges) OnDeviceOrErr() (*Device, error)
OnDeviceOrErr returns the OnDevice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (IPStaticRoutingTableEdges) OnInterfaceOrErr ¶ added in v0.2.0
func (e IPStaticRoutingTableEdges) OnInterfaceOrErr() (*NetInterface, error)
OnInterfaceOrErr returns the OnInterface value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type IPStaticRoutingTableGroupBy ¶ added in v0.2.0
type IPStaticRoutingTableGroupBy struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableGroupBy is the group-by builder for IPStaticRoutingTable entities.
func (*IPStaticRoutingTableGroupBy) Aggregate ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Aggregate(fns ...AggregateFunc) *IPStaticRoutingTableGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IPStaticRoutingTableGroupBy) Bool ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*IPStaticRoutingTableGroupBy) BoolX ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*IPStaticRoutingTableGroupBy) Bools ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*IPStaticRoutingTableGroupBy) BoolsX ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*IPStaticRoutingTableGroupBy) Float64 ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*IPStaticRoutingTableGroupBy) Float64X ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*IPStaticRoutingTableGroupBy) Float64s ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*IPStaticRoutingTableGroupBy) Float64sX ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*IPStaticRoutingTableGroupBy) Int ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*IPStaticRoutingTableGroupBy) IntX ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*IPStaticRoutingTableGroupBy) Ints ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*IPStaticRoutingTableGroupBy) IntsX ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*IPStaticRoutingTableGroupBy) Scan ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*IPStaticRoutingTableGroupBy) ScanX ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*IPStaticRoutingTableGroupBy) String ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*IPStaticRoutingTableGroupBy) StringX ¶ added in v0.2.0
func (isrtgb *IPStaticRoutingTableGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type IPStaticRoutingTableMutation ¶ added in v0.2.0
type IPStaticRoutingTableMutation struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableMutation represents an operation that mutates the IPStaticRoutingTable nodes in the graph.
func (*IPStaticRoutingTableMutation) AddField ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) AddedEdges ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IPStaticRoutingTableMutation) AddedField ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) AddedFields ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IPStaticRoutingTableMutation) AddedIDs ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IPStaticRoutingTableMutation) BrdInterface ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) BrdInterface() (r bool, exists bool)
BrdInterface returns the value of the "brd_interface" field in the mutation.
func (*IPStaticRoutingTableMutation) ClearEdge ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) ClearField ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) ClearOnDevice ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ClearOnDevice()
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*IPStaticRoutingTableMutation) ClearOnInterface ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ClearOnInterface()
ClearOnInterface clears the "on_interface" edge to the NetInterface entity.
func (*IPStaticRoutingTableMutation) ClearedEdges ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IPStaticRoutingTableMutation) ClearedFields ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IPStaticRoutingTableMutation) Client ¶ added in v0.2.0
func (m IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) EdgeCleared ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IPStaticRoutingTableMutation) Field ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) FieldCleared ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IPStaticRoutingTableMutation) Fields ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) ID ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*IPStaticRoutingTableMutation) NetworkAddress ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) NetworkAddress() (r string, exists bool)
NetworkAddress returns the value of the "network_address" field in the mutation.
func (*IPStaticRoutingTableMutation) NextHop ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) NextHop() (r string, exists bool)
NextHop returns the value of the "next_hop" field in the mutation.
func (*IPStaticRoutingTableMutation) OldBrdInterface ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OldBrdInterface(ctx context.Context) (v bool, err error)
OldBrdInterface returns the old "brd_interface" field's value of the IPStaticRoutingTable entity. If the IPStaticRoutingTable object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPStaticRoutingTableMutation) OldField ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*IPStaticRoutingTableMutation) OldNetworkAddress ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OldNetworkAddress(ctx context.Context) (v string, err error)
OldNetworkAddress returns the old "network_address" field's value of the IPStaticRoutingTable entity. If the IPStaticRoutingTable object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPStaticRoutingTableMutation) OldNextHop ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OldNextHop(ctx context.Context) (v string, err error)
OldNextHop returns the old "next_hop" field's value of the IPStaticRoutingTable entity. If the IPStaticRoutingTable object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPStaticRoutingTableMutation) OldSubnetMask ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OldSubnetMask(ctx context.Context) (v string, err error)
OldSubnetMask returns the old "subnet_mask" field's value of the IPStaticRoutingTable entity. If the IPStaticRoutingTable object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*IPStaticRoutingTableMutation) OnDeviceCleared ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OnDeviceCleared() bool
OnDeviceCleared reports if the "on_device" edge to the Device entity was cleared.
func (*IPStaticRoutingTableMutation) OnDeviceID ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OnDeviceID() (id int, exists bool)
OnDeviceID returns the "on_device" edge ID in the mutation.
func (*IPStaticRoutingTableMutation) OnDeviceIDs ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OnDeviceIDs() (ids []int)
OnDeviceIDs returns the "on_device" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnDeviceID instead. It exists only for internal usage by the builders.
func (*IPStaticRoutingTableMutation) OnInterfaceCleared ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OnInterfaceCleared() bool
OnInterfaceCleared reports if the "on_interface" edge to the NetInterface entity was cleared.
func (*IPStaticRoutingTableMutation) OnInterfaceID ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OnInterfaceID() (id int, exists bool)
OnInterfaceID returns the "on_interface" edge ID in the mutation.
func (*IPStaticRoutingTableMutation) OnInterfaceIDs ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) OnInterfaceIDs() (ids []int)
OnInterfaceIDs returns the "on_interface" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnInterfaceID instead. It exists only for internal usage by the builders.
func (*IPStaticRoutingTableMutation) Op ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) Op() Op
Op returns the operation name.
func (*IPStaticRoutingTableMutation) RemovedEdges ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IPStaticRoutingTableMutation) RemovedIDs ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) ResetBrdInterface ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ResetBrdInterface()
ResetBrdInterface resets all changes to the "brd_interface" field.
func (*IPStaticRoutingTableMutation) ResetEdge ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) ResetField ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) ResetNetworkAddress ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ResetNetworkAddress()
ResetNetworkAddress resets all changes to the "network_address" field.
func (*IPStaticRoutingTableMutation) ResetNextHop ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ResetNextHop()
ResetNextHop resets all changes to the "next_hop" field.
func (*IPStaticRoutingTableMutation) ResetOnDevice ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ResetOnDevice()
ResetOnDevice resets all changes to the "on_device" edge.
func (*IPStaticRoutingTableMutation) ResetOnInterface ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ResetOnInterface()
ResetOnInterface resets all changes to the "on_interface" edge.
func (*IPStaticRoutingTableMutation) ResetSubnetMask ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) ResetSubnetMask()
ResetSubnetMask resets all changes to the "subnet_mask" field.
func (*IPStaticRoutingTableMutation) SetBrdInterface ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) SetBrdInterface(b bool)
SetBrdInterface sets the "brd_interface" field.
func (*IPStaticRoutingTableMutation) SetField ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) 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 (*IPStaticRoutingTableMutation) SetNetworkAddress ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) SetNetworkAddress(s string)
SetNetworkAddress sets the "network_address" field.
func (*IPStaticRoutingTableMutation) SetNextHop ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) SetNextHop(s string)
SetNextHop sets the "next_hop" field.
func (*IPStaticRoutingTableMutation) SetOnDeviceID ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) SetOnDeviceID(id int)
SetOnDeviceID sets the "on_device" edge to the Device entity by id.
func (*IPStaticRoutingTableMutation) SetOnInterfaceID ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) SetOnInterfaceID(id int)
SetOnInterfaceID sets the "on_interface" edge to the NetInterface entity by id.
func (*IPStaticRoutingTableMutation) SetSubnetMask ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) SetSubnetMask(s string)
SetSubnetMask sets the "subnet_mask" field.
func (*IPStaticRoutingTableMutation) SubnetMask ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) SubnetMask() (r string, exists bool)
SubnetMask returns the value of the "subnet_mask" field in the mutation.
func (IPStaticRoutingTableMutation) Tx ¶ added in v0.2.0
func (m IPStaticRoutingTableMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IPStaticRoutingTableMutation) Type ¶ added in v0.2.0
func (m *IPStaticRoutingTableMutation) Type() string
Type returns the node type of this mutation (IPStaticRoutingTable).
type IPStaticRoutingTableQuery ¶ added in v0.2.0
type IPStaticRoutingTableQuery struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableQuery is the builder for querying IPStaticRoutingTable entities.
func (*IPStaticRoutingTableQuery) All ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) All(ctx context.Context) ([]*IPStaticRoutingTable, error)
All executes the query and returns a list of IPStaticRoutingTables.
func (*IPStaticRoutingTableQuery) AllX ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) AllX(ctx context.Context) []*IPStaticRoutingTable
AllX is like All, but panics if an error occurs.
func (*IPStaticRoutingTableQuery) Clone ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Clone() *IPStaticRoutingTableQuery
Clone returns a duplicate of the IPStaticRoutingTableQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IPStaticRoutingTableQuery) Count ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IPStaticRoutingTableQuery) CountX ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IPStaticRoutingTableQuery) Exist ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IPStaticRoutingTableQuery) ExistX ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IPStaticRoutingTableQuery) First ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) First(ctx context.Context) (*IPStaticRoutingTable, error)
First returns the first IPStaticRoutingTable entity from the query. Returns a *NotFoundError when no IPStaticRoutingTable was found.
func (*IPStaticRoutingTableQuery) FirstID ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first IPStaticRoutingTable ID from the query. Returns a *NotFoundError when no IPStaticRoutingTable ID was found.
func (*IPStaticRoutingTableQuery) FirstIDX ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*IPStaticRoutingTableQuery) FirstX ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) FirstX(ctx context.Context) *IPStaticRoutingTable
FirstX is like First, but panics if an error occurs.
func (*IPStaticRoutingTableQuery) GroupBy ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) GroupBy(field string, fields ...string) *IPStaticRoutingTableGroupBy
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 { NetworkAddress string `json:"network_address,omitempty"` Count int `json:"count,omitempty"` } client.IPStaticRoutingTable.Query(). GroupBy(ipstaticroutingtable.FieldNetworkAddress). Aggregate(ent.Count()). Scan(ctx, &v)
func (*IPStaticRoutingTableQuery) IDs ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of IPStaticRoutingTable IDs.
func (*IPStaticRoutingTableQuery) IDsX ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*IPStaticRoutingTableQuery) Limit ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Limit(limit int) *IPStaticRoutingTableQuery
Limit adds a limit step to the query.
func (*IPStaticRoutingTableQuery) Offset ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Offset(offset int) *IPStaticRoutingTableQuery
Offset adds an offset step to the query.
func (*IPStaticRoutingTableQuery) Only ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Only(ctx context.Context) (*IPStaticRoutingTable, error)
Only returns a single IPStaticRoutingTable entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one IPStaticRoutingTable entity is not found. Returns a *NotFoundError when no IPStaticRoutingTable entities are found.
func (*IPStaticRoutingTableQuery) OnlyID ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only IPStaticRoutingTable ID in the query. Returns a *NotSingularError when exactly one IPStaticRoutingTable ID is not found. Returns a *NotFoundError when no entities are found.
func (*IPStaticRoutingTableQuery) OnlyIDX ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IPStaticRoutingTableQuery) OnlyX ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) OnlyX(ctx context.Context) *IPStaticRoutingTable
OnlyX is like Only, but panics if an error occurs.
func (*IPStaticRoutingTableQuery) Order ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Order(o ...OrderFunc) *IPStaticRoutingTableQuery
Order adds an order step to the query.
func (*IPStaticRoutingTableQuery) QueryOnDevice ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) QueryOnDevice() *DeviceQuery
QueryOnDevice chains the current query on the "on_device" edge.
func (*IPStaticRoutingTableQuery) QueryOnInterface ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) QueryOnInterface() *NetInterfaceQuery
QueryOnInterface chains the current query on the "on_interface" edge.
func (*IPStaticRoutingTableQuery) Select ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Select(field string, fields ...string) *IPStaticRoutingTableSelect
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 { NetworkAddress string `json:"network_address,omitempty"` } client.IPStaticRoutingTable.Query(). Select(ipstaticroutingtable.FieldNetworkAddress). Scan(ctx, &v)
func (*IPStaticRoutingTableQuery) Unique ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Unique(unique bool) *IPStaticRoutingTableQuery
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 (*IPStaticRoutingTableQuery) Where ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) Where(ps ...predicate.IPStaticRoutingTable) *IPStaticRoutingTableQuery
Where adds a new predicate for the IPStaticRoutingTableQuery builder.
func (*IPStaticRoutingTableQuery) WithOnDevice ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) WithOnDevice(opts ...func(*DeviceQuery)) *IPStaticRoutingTableQuery
WithOnDevice tells the query-builder to eager-load the nodes that are connected to the "on_device" edge. The optional arguments are used to configure the query builder of the edge.
func (*IPStaticRoutingTableQuery) WithOnInterface ¶ added in v0.2.0
func (isrtq *IPStaticRoutingTableQuery) WithOnInterface(opts ...func(*NetInterfaceQuery)) *IPStaticRoutingTableQuery
WithOnInterface tells the query-builder to eager-load the nodes that are connected to the "on_interface" edge. The optional arguments are used to configure the query builder of the edge.
type IPStaticRoutingTableSelect ¶ added in v0.2.0
type IPStaticRoutingTableSelect struct { *IPStaticRoutingTableQuery // contains filtered or unexported fields }
IPStaticRoutingTableSelect is the builder for selecting fields of IPStaticRoutingTable entities.
func (*IPStaticRoutingTableSelect) Bool ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IPStaticRoutingTableSelect) BoolX ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*IPStaticRoutingTableSelect) Bools ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IPStaticRoutingTableSelect) BoolsX ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*IPStaticRoutingTableSelect) Float64 ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IPStaticRoutingTableSelect) Float64X ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*IPStaticRoutingTableSelect) Float64s ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IPStaticRoutingTableSelect) Float64sX ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*IPStaticRoutingTableSelect) Int ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IPStaticRoutingTableSelect) IntX ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*IPStaticRoutingTableSelect) Ints ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IPStaticRoutingTableSelect) IntsX ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*IPStaticRoutingTableSelect) Scan ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*IPStaticRoutingTableSelect) ScanX ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*IPStaticRoutingTableSelect) String ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*IPStaticRoutingTableSelect) StringX ¶ added in v0.2.0
func (isrts *IPStaticRoutingTableSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type IPStaticRoutingTableUpdate ¶ added in v0.2.0
type IPStaticRoutingTableUpdate struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableUpdate is the builder for updating IPStaticRoutingTable entities.
func (*IPStaticRoutingTableUpdate) ClearOnDevice ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) ClearOnDevice() *IPStaticRoutingTableUpdate
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*IPStaticRoutingTableUpdate) ClearOnInterface ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) ClearOnInterface() *IPStaticRoutingTableUpdate
ClearOnInterface clears the "on_interface" edge to the NetInterface entity.
func (*IPStaticRoutingTableUpdate) Exec ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IPStaticRoutingTableUpdate) ExecX ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPStaticRoutingTableUpdate) Mutation ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) Mutation() *IPStaticRoutingTableMutation
Mutation returns the IPStaticRoutingTableMutation object of the builder.
func (*IPStaticRoutingTableUpdate) Save ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IPStaticRoutingTableUpdate) SaveX ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IPStaticRoutingTableUpdate) SetBrdInterface ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetBrdInterface(b bool) *IPStaticRoutingTableUpdate
SetBrdInterface sets the "brd_interface" field.
func (*IPStaticRoutingTableUpdate) SetNetworkAddress ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetNetworkAddress(s string) *IPStaticRoutingTableUpdate
SetNetworkAddress sets the "network_address" field.
func (*IPStaticRoutingTableUpdate) SetNextHop ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetNextHop(s string) *IPStaticRoutingTableUpdate
SetNextHop sets the "next_hop" field.
func (*IPStaticRoutingTableUpdate) SetNillableBrdInterface ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetNillableBrdInterface(b *bool) *IPStaticRoutingTableUpdate
SetNillableBrdInterface sets the "brd_interface" field if the given value is not nil.
func (*IPStaticRoutingTableUpdate) SetNillableOnDeviceID ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetNillableOnDeviceID(id *int) *IPStaticRoutingTableUpdate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*IPStaticRoutingTableUpdate) SetNillableOnInterfaceID ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetNillableOnInterfaceID(id *int) *IPStaticRoutingTableUpdate
SetNillableOnInterfaceID sets the "on_interface" edge to the NetInterface entity by ID if the given value is not nil.
func (*IPStaticRoutingTableUpdate) SetOnDevice ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetOnDevice(d *Device) *IPStaticRoutingTableUpdate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*IPStaticRoutingTableUpdate) SetOnDeviceID ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetOnDeviceID(id int) *IPStaticRoutingTableUpdate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*IPStaticRoutingTableUpdate) SetOnInterface ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetOnInterface(n *NetInterface) *IPStaticRoutingTableUpdate
SetOnInterface sets the "on_interface" edge to the NetInterface entity.
func (*IPStaticRoutingTableUpdate) SetOnInterfaceID ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetOnInterfaceID(id int) *IPStaticRoutingTableUpdate
SetOnInterfaceID sets the "on_interface" edge to the NetInterface entity by ID.
func (*IPStaticRoutingTableUpdate) SetSubnetMask ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) SetSubnetMask(s string) *IPStaticRoutingTableUpdate
SetSubnetMask sets the "subnet_mask" field.
func (*IPStaticRoutingTableUpdate) Where ¶ added in v0.2.0
func (isrtu *IPStaticRoutingTableUpdate) Where(ps ...predicate.IPStaticRoutingTable) *IPStaticRoutingTableUpdate
Where adds a new predicate for the IPStaticRoutingTableUpdate builder.
type IPStaticRoutingTableUpdateOne ¶ added in v0.2.0
type IPStaticRoutingTableUpdateOne struct {
// contains filtered or unexported fields
}
IPStaticRoutingTableUpdateOne is the builder for updating a single IPStaticRoutingTable entity.
func (*IPStaticRoutingTableUpdateOne) ClearOnDevice ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) ClearOnDevice() *IPStaticRoutingTableUpdateOne
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*IPStaticRoutingTableUpdateOne) ClearOnInterface ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) ClearOnInterface() *IPStaticRoutingTableUpdateOne
ClearOnInterface clears the "on_interface" edge to the NetInterface entity.
func (*IPStaticRoutingTableUpdateOne) Exec ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IPStaticRoutingTableUpdateOne) ExecX ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IPStaticRoutingTableUpdateOne) Mutation ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) Mutation() *IPStaticRoutingTableMutation
Mutation returns the IPStaticRoutingTableMutation object of the builder.
func (*IPStaticRoutingTableUpdateOne) Save ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) Save(ctx context.Context) (*IPStaticRoutingTable, error)
Save executes the query and returns the updated IPStaticRoutingTable entity.
func (*IPStaticRoutingTableUpdateOne) SaveX ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SaveX(ctx context.Context) *IPStaticRoutingTable
SaveX is like Save, but panics if an error occurs.
func (*IPStaticRoutingTableUpdateOne) Select ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) Select(field string, fields ...string) *IPStaticRoutingTableUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*IPStaticRoutingTableUpdateOne) SetBrdInterface ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetBrdInterface(b bool) *IPStaticRoutingTableUpdateOne
SetBrdInterface sets the "brd_interface" field.
func (*IPStaticRoutingTableUpdateOne) SetNetworkAddress ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetNetworkAddress(s string) *IPStaticRoutingTableUpdateOne
SetNetworkAddress sets the "network_address" field.
func (*IPStaticRoutingTableUpdateOne) SetNextHop ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetNextHop(s string) *IPStaticRoutingTableUpdateOne
SetNextHop sets the "next_hop" field.
func (*IPStaticRoutingTableUpdateOne) SetNillableBrdInterface ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetNillableBrdInterface(b *bool) *IPStaticRoutingTableUpdateOne
SetNillableBrdInterface sets the "brd_interface" field if the given value is not nil.
func (*IPStaticRoutingTableUpdateOne) SetNillableOnDeviceID ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetNillableOnDeviceID(id *int) *IPStaticRoutingTableUpdateOne
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*IPStaticRoutingTableUpdateOne) SetNillableOnInterfaceID ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetNillableOnInterfaceID(id *int) *IPStaticRoutingTableUpdateOne
SetNillableOnInterfaceID sets the "on_interface" edge to the NetInterface entity by ID if the given value is not nil.
func (*IPStaticRoutingTableUpdateOne) SetOnDevice ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetOnDevice(d *Device) *IPStaticRoutingTableUpdateOne
SetOnDevice sets the "on_device" edge to the Device entity.
func (*IPStaticRoutingTableUpdateOne) SetOnDeviceID ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetOnDeviceID(id int) *IPStaticRoutingTableUpdateOne
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*IPStaticRoutingTableUpdateOne) SetOnInterface ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetOnInterface(n *NetInterface) *IPStaticRoutingTableUpdateOne
SetOnInterface sets the "on_interface" edge to the NetInterface entity.
func (*IPStaticRoutingTableUpdateOne) SetOnInterfaceID ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetOnInterfaceID(id int) *IPStaticRoutingTableUpdateOne
SetOnInterfaceID sets the "on_interface" edge to the NetInterface entity by ID.
func (*IPStaticRoutingTableUpdateOne) SetSubnetMask ¶ added in v0.2.0
func (isrtuo *IPStaticRoutingTableUpdateOne) SetSubnetMask(s string) *IPStaticRoutingTableUpdateOne
SetSubnetMask sets the "subnet_mask" field.
type IPStaticRoutingTables ¶ added in v0.2.0
type IPStaticRoutingTables []*IPStaticRoutingTable
IPStaticRoutingTables is a parsable slice of IPStaticRoutingTable.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NetInterface ¶
type NetInterface struct { // ID of the ent. ID int `json:"id,omitempty"` // InterfaceName holds the value of the "interface_name" field. InterfaceName string `json:"interface_name,omitempty"` // InterfaceShutdown holds the value of the "interface_shutdown" field. InterfaceShutdown bool `json:"interface_shutdown,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NetInterfaceQuery when eager-loading is set. Edges NetInterfaceEdges `json:"edges"` // contains filtered or unexported fields }
NetInterface is the model entity for the NetInterface schema.
func (*NetInterface) QueryHaveVlans ¶
func (ni *NetInterface) QueryHaveVlans() *VlanQuery
QueryHaveVlans queries the "have_vlans" edge of the NetInterface entity.
func (*NetInterface) QueryIPStaticRouting ¶ added in v0.2.0
func (ni *NetInterface) QueryIPStaticRouting() *IPStaticRoutingTableQuery
QueryIPStaticRouting queries the "ip_static_routing" edge of the NetInterface entity.
func (*NetInterface) QueryMode ¶
func (ni *NetInterface) QueryMode() *NetInterfaceModeQuery
QueryMode queries the "mode" edge of the NetInterface entity.
func (*NetInterface) QueryNativeOnVlan ¶
func (ni *NetInterface) QueryNativeOnVlan() *VlanQuery
QueryNativeOnVlan queries the "native_on_vlan" edge of the NetInterface entity.
func (*NetInterface) QueryOnDevice ¶
func (ni *NetInterface) QueryOnDevice() *DeviceQuery
QueryOnDevice queries the "on_device" edge of the NetInterface entity.
func (*NetInterface) QueryOnIPAddress ¶ added in v0.2.0
func (ni *NetInterface) QueryOnIPAddress() *IPAddressQuery
QueryOnIPAddress queries the "on_ip_address" edge of the NetInterface entity.
func (*NetInterface) QueryOnLayer ¶ added in v0.2.0
func (ni *NetInterface) QueryOnLayer() *NetInterfaceLayerQuery
QueryOnLayer queries the "on_layer" edge of the NetInterface entity.
func (*NetInterface) QueryOnPoInterface ¶ added in v0.2.0
func (ni *NetInterface) QueryOnPoInterface() *PortChannelInterfaceQuery
QueryOnPoInterface queries the "on_po_interface" edge of the NetInterface entity.
func (*NetInterface) String ¶
func (ni *NetInterface) String() string
String implements the fmt.Stringer.
func (*NetInterface) Unwrap ¶
func (ni *NetInterface) Unwrap() *NetInterface
Unwrap unwraps the NetInterface 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 (*NetInterface) Update ¶
func (ni *NetInterface) Update() *NetInterfaceUpdateOne
Update returns a builder for updating this NetInterface. Note that you need to call NetInterface.Unwrap() before calling this method if this NetInterface was returned from a transaction, and the transaction was committed or rolled back.
type NetInterfaceClient ¶
type NetInterfaceClient struct {
// contains filtered or unexported fields
}
NetInterfaceClient is a client for the NetInterface schema.
func NewNetInterfaceClient ¶
func NewNetInterfaceClient(c config) *NetInterfaceClient
NewNetInterfaceClient returns a client for the NetInterface from the given config.
func (*NetInterfaceClient) Create ¶
func (c *NetInterfaceClient) Create() *NetInterfaceCreate
Create returns a create builder for NetInterface.
func (*NetInterfaceClient) CreateBulk ¶
func (c *NetInterfaceClient) CreateBulk(builders ...*NetInterfaceCreate) *NetInterfaceCreateBulk
CreateBulk returns a builder for creating a bulk of NetInterface entities.
func (*NetInterfaceClient) Delete ¶
func (c *NetInterfaceClient) Delete() *NetInterfaceDelete
Delete returns a delete builder for NetInterface.
func (*NetInterfaceClient) DeleteOne ¶
func (c *NetInterfaceClient) DeleteOne(ni *NetInterface) *NetInterfaceDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*NetInterfaceClient) DeleteOneID ¶
func (c *NetInterfaceClient) DeleteOneID(id int) *NetInterfaceDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*NetInterfaceClient) Get ¶
func (c *NetInterfaceClient) Get(ctx context.Context, id int) (*NetInterface, error)
Get returns a NetInterface entity by its id.
func (*NetInterfaceClient) GetX ¶
func (c *NetInterfaceClient) GetX(ctx context.Context, id int) *NetInterface
GetX is like Get, but panics if an error occurs.
func (*NetInterfaceClient) Hooks ¶
func (c *NetInterfaceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NetInterfaceClient) Query ¶
func (c *NetInterfaceClient) Query() *NetInterfaceQuery
Query returns a query builder for NetInterface.
func (*NetInterfaceClient) QueryHaveVlans ¶
func (c *NetInterfaceClient) QueryHaveVlans(ni *NetInterface) *VlanQuery
QueryHaveVlans queries the have_vlans edge of a NetInterface.
func (*NetInterfaceClient) QueryIPStaticRouting ¶ added in v0.2.0
func (c *NetInterfaceClient) QueryIPStaticRouting(ni *NetInterface) *IPStaticRoutingTableQuery
QueryIPStaticRouting queries the ip_static_routing edge of a NetInterface.
func (*NetInterfaceClient) QueryMode ¶
func (c *NetInterfaceClient) QueryMode(ni *NetInterface) *NetInterfaceModeQuery
QueryMode queries the mode edge of a NetInterface.
func (*NetInterfaceClient) QueryNativeOnVlan ¶
func (c *NetInterfaceClient) QueryNativeOnVlan(ni *NetInterface) *VlanQuery
QueryNativeOnVlan queries the native_on_vlan edge of a NetInterface.
func (*NetInterfaceClient) QueryOnDevice ¶
func (c *NetInterfaceClient) QueryOnDevice(ni *NetInterface) *DeviceQuery
QueryOnDevice queries the on_device edge of a NetInterface.
func (*NetInterfaceClient) QueryOnIPAddress ¶ added in v0.2.0
func (c *NetInterfaceClient) QueryOnIPAddress(ni *NetInterface) *IPAddressQuery
QueryOnIPAddress queries the on_ip_address edge of a NetInterface.
func (*NetInterfaceClient) QueryOnLayer ¶ added in v0.2.0
func (c *NetInterfaceClient) QueryOnLayer(ni *NetInterface) *NetInterfaceLayerQuery
QueryOnLayer queries the on_layer edge of a NetInterface.
func (*NetInterfaceClient) QueryOnPoInterface ¶ added in v0.2.0
func (c *NetInterfaceClient) QueryOnPoInterface(ni *NetInterface) *PortChannelInterfaceQuery
QueryOnPoInterface queries the on_po_interface edge of a NetInterface.
func (*NetInterfaceClient) Update ¶
func (c *NetInterfaceClient) Update() *NetInterfaceUpdate
Update returns an update builder for NetInterface.
func (*NetInterfaceClient) UpdateOne ¶
func (c *NetInterfaceClient) UpdateOne(ni *NetInterface) *NetInterfaceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NetInterfaceClient) UpdateOneID ¶
func (c *NetInterfaceClient) UpdateOneID(id int) *NetInterfaceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NetInterfaceClient) Use ¶
func (c *NetInterfaceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `netinterface.Hooks(f(g(h())))`.
type NetInterfaceCreate ¶
type NetInterfaceCreate struct {
// contains filtered or unexported fields
}
NetInterfaceCreate is the builder for creating a NetInterface entity.
func (*NetInterfaceCreate) AddHaveVlanIDs ¶
func (nic *NetInterfaceCreate) AddHaveVlanIDs(ids ...int) *NetInterfaceCreate
AddHaveVlanIDs adds the "have_vlans" edge to the Vlan entity by IDs.
func (*NetInterfaceCreate) AddHaveVlans ¶
func (nic *NetInterfaceCreate) AddHaveVlans(v ...*Vlan) *NetInterfaceCreate
AddHaveVlans adds the "have_vlans" edges to the Vlan entity.
func (*NetInterfaceCreate) AddIPStaticRouting ¶ added in v0.2.0
func (nic *NetInterfaceCreate) AddIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceCreate
AddIPStaticRouting adds the "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*NetInterfaceCreate) AddIPStaticRoutingIDs ¶ added in v0.2.0
func (nic *NetInterfaceCreate) AddIPStaticRoutingIDs(ids ...int) *NetInterfaceCreate
AddIPStaticRoutingIDs adds the "ip_static_routing" edge to the IPStaticRoutingTable entity by IDs.
func (*NetInterfaceCreate) Mutation ¶
func (nic *NetInterfaceCreate) Mutation() *NetInterfaceMutation
Mutation returns the NetInterfaceMutation object of the builder.
func (*NetInterfaceCreate) Save ¶
func (nic *NetInterfaceCreate) Save(ctx context.Context) (*NetInterface, error)
Save creates the NetInterface in the database.
func (*NetInterfaceCreate) SaveX ¶
func (nic *NetInterfaceCreate) SaveX(ctx context.Context) *NetInterface
SaveX calls Save and panics if Save returns an error.
func (*NetInterfaceCreate) SetInterfaceName ¶
func (nic *NetInterfaceCreate) SetInterfaceName(s string) *NetInterfaceCreate
SetInterfaceName sets the "interface_name" field.
func (*NetInterfaceCreate) SetInterfaceShutdown ¶
func (nic *NetInterfaceCreate) SetInterfaceShutdown(b bool) *NetInterfaceCreate
SetInterfaceShutdown sets the "interface_shutdown" field.
func (*NetInterfaceCreate) SetMode ¶
func (nic *NetInterfaceCreate) SetMode(n *NetInterfaceMode) *NetInterfaceCreate
SetMode sets the "mode" edge to the NetInterfaceMode entity.
func (*NetInterfaceCreate) SetModeID ¶
func (nic *NetInterfaceCreate) SetModeID(id int) *NetInterfaceCreate
SetModeID sets the "mode" edge to the NetInterfaceMode entity by ID.
func (*NetInterfaceCreate) SetNativeOnVlan ¶
func (nic *NetInterfaceCreate) SetNativeOnVlan(v *Vlan) *NetInterfaceCreate
SetNativeOnVlan sets the "native_on_vlan" edge to the Vlan entity.
func (*NetInterfaceCreate) SetNativeOnVlanID ¶
func (nic *NetInterfaceCreate) SetNativeOnVlanID(id int) *NetInterfaceCreate
SetNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID.
func (*NetInterfaceCreate) SetNillableInterfaceShutdown ¶
func (nic *NetInterfaceCreate) SetNillableInterfaceShutdown(b *bool) *NetInterfaceCreate
SetNillableInterfaceShutdown sets the "interface_shutdown" field if the given value is not nil.
func (*NetInterfaceCreate) SetNillableModeID ¶
func (nic *NetInterfaceCreate) SetNillableModeID(id *int) *NetInterfaceCreate
SetNillableModeID sets the "mode" edge to the NetInterfaceMode entity by ID if the given value is not nil.
func (*NetInterfaceCreate) SetNillableNativeOnVlanID ¶
func (nic *NetInterfaceCreate) SetNillableNativeOnVlanID(id *int) *NetInterfaceCreate
SetNillableNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID if the given value is not nil.
func (*NetInterfaceCreate) SetNillableOnDeviceID ¶
func (nic *NetInterfaceCreate) SetNillableOnDeviceID(id *int) *NetInterfaceCreate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*NetInterfaceCreate) SetNillableOnIPAddressID ¶ added in v0.2.0
func (nic *NetInterfaceCreate) SetNillableOnIPAddressID(id *int) *NetInterfaceCreate
SetNillableOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID if the given value is not nil.
func (*NetInterfaceCreate) SetNillableOnLayerID ¶ added in v0.2.0
func (nic *NetInterfaceCreate) SetNillableOnLayerID(id *int) *NetInterfaceCreate
SetNillableOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID if the given value is not nil.
func (*NetInterfaceCreate) SetNillableOnPoInterfaceID ¶ added in v0.2.0
func (nic *NetInterfaceCreate) SetNillableOnPoInterfaceID(id *int) *NetInterfaceCreate
SetNillableOnPoInterfaceID sets the "on_po_interface" edge to the PortChannelInterface entity by ID if the given value is not nil.
func (*NetInterfaceCreate) SetOnDevice ¶
func (nic *NetInterfaceCreate) SetOnDevice(d *Device) *NetInterfaceCreate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*NetInterfaceCreate) SetOnDeviceID ¶
func (nic *NetInterfaceCreate) SetOnDeviceID(id int) *NetInterfaceCreate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*NetInterfaceCreate) SetOnIPAddress ¶ added in v0.2.0
func (nic *NetInterfaceCreate) SetOnIPAddress(i *IPAddress) *NetInterfaceCreate
SetOnIPAddress sets the "on_ip_address" edge to the IPAddress entity.
func (*NetInterfaceCreate) SetOnIPAddressID ¶ added in v0.2.0
func (nic *NetInterfaceCreate) SetOnIPAddressID(id int) *NetInterfaceCreate
SetOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID.
func (*NetInterfaceCreate) SetOnLayer ¶ added in v0.2.0
func (nic *NetInterfaceCreate) SetOnLayer(n *NetInterfaceLayer) *NetInterfaceCreate
SetOnLayer sets the "on_layer" edge to the NetInterfaceLayer entity.
func (*NetInterfaceCreate) SetOnLayerID ¶ added in v0.2.0
func (nic *NetInterfaceCreate) SetOnLayerID(id int) *NetInterfaceCreate
SetOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID.
func (*NetInterfaceCreate) SetOnPoInterface ¶ added in v0.2.0
func (nic *NetInterfaceCreate) SetOnPoInterface(p *PortChannelInterface) *NetInterfaceCreate
SetOnPoInterface sets the "on_po_interface" edge to the PortChannelInterface entity.
func (*NetInterfaceCreate) SetOnPoInterfaceID ¶ added in v0.2.0
func (nic *NetInterfaceCreate) SetOnPoInterfaceID(id int) *NetInterfaceCreate
SetOnPoInterfaceID sets the "on_po_interface" edge to the PortChannelInterface entity by ID.
type NetInterfaceCreateBulk ¶
type NetInterfaceCreateBulk struct {
// contains filtered or unexported fields
}
NetInterfaceCreateBulk is the builder for creating many NetInterface entities in bulk.
func (*NetInterfaceCreateBulk) Save ¶
func (nicb *NetInterfaceCreateBulk) Save(ctx context.Context) ([]*NetInterface, error)
Save creates the NetInterface entities in the database.
func (*NetInterfaceCreateBulk) SaveX ¶
func (nicb *NetInterfaceCreateBulk) SaveX(ctx context.Context) []*NetInterface
SaveX is like Save, but panics if an error occurs.
type NetInterfaceDelete ¶
type NetInterfaceDelete struct {
// contains filtered or unexported fields
}
NetInterfaceDelete is the builder for deleting a NetInterface entity.
func (*NetInterfaceDelete) Exec ¶
func (nid *NetInterfaceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NetInterfaceDelete) ExecX ¶
func (nid *NetInterfaceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NetInterfaceDelete) Where ¶
func (nid *NetInterfaceDelete) Where(ps ...predicate.NetInterface) *NetInterfaceDelete
Where adds a new predicate to the NetInterfaceDelete builder.
type NetInterfaceDeleteOne ¶
type NetInterfaceDeleteOne struct {
// contains filtered or unexported fields
}
NetInterfaceDeleteOne is the builder for deleting a single NetInterface entity.
func (*NetInterfaceDeleteOne) Exec ¶
func (nido *NetInterfaceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NetInterfaceDeleteOne) ExecX ¶
func (nido *NetInterfaceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NetInterfaceEdges ¶
type NetInterfaceEdges struct { // OnDevice holds the value of the on_device edge. OnDevice *Device `json:"on_device,omitempty"` // OnPoInterface holds the value of the on_po_interface edge. OnPoInterface *PortChannelInterface `json:"on_po_interface,omitempty"` // OnIPAddress holds the value of the on_ip_address edge. OnIPAddress *IPAddress `json:"on_ip_address,omitempty"` // IPStaticRouting holds the value of the ip_static_routing edge. IPStaticRouting []*IPStaticRoutingTable `json:"ip_static_routing,omitempty"` // Mode holds the value of the mode edge. Mode *NetInterfaceMode `json:"mode,omitempty"` // OnLayer holds the value of the on_layer edge. OnLayer *NetInterfaceLayer `json:"on_layer,omitempty"` // HaveVlans holds the value of the have_vlans edge. HaveVlans []*Vlan `json:"have_vlans,omitempty"` // NativeOnVlan holds the value of the native_on_vlan edge. NativeOnVlan *Vlan `json:"native_on_vlan,omitempty"` // contains filtered or unexported fields }
NetInterfaceEdges holds the relations/edges for other nodes in the graph.
func (NetInterfaceEdges) HaveVlansOrErr ¶
func (e NetInterfaceEdges) HaveVlansOrErr() ([]*Vlan, error)
HaveVlansOrErr returns the HaveVlans value or an error if the edge was not loaded in eager-loading.
func (NetInterfaceEdges) IPStaticRoutingOrErr ¶ added in v0.2.0
func (e NetInterfaceEdges) IPStaticRoutingOrErr() ([]*IPStaticRoutingTable, error)
IPStaticRoutingOrErr returns the IPStaticRouting value or an error if the edge was not loaded in eager-loading.
func (NetInterfaceEdges) ModeOrErr ¶
func (e NetInterfaceEdges) ModeOrErr() (*NetInterfaceMode, error)
ModeOrErr returns the Mode value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NetInterfaceEdges) NativeOnVlanOrErr ¶
func (e NetInterfaceEdges) NativeOnVlanOrErr() (*Vlan, error)
NativeOnVlanOrErr returns the NativeOnVlan value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NetInterfaceEdges) OnDeviceOrErr ¶
func (e NetInterfaceEdges) OnDeviceOrErr() (*Device, error)
OnDeviceOrErr returns the OnDevice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NetInterfaceEdges) OnIPAddressOrErr ¶ added in v0.2.0
func (e NetInterfaceEdges) OnIPAddressOrErr() (*IPAddress, error)
OnIPAddressOrErr returns the OnIPAddress value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NetInterfaceEdges) OnLayerOrErr ¶ added in v0.2.0
func (e NetInterfaceEdges) OnLayerOrErr() (*NetInterfaceLayer, error)
OnLayerOrErr returns the OnLayer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NetInterfaceEdges) OnPoInterfaceOrErr ¶ added in v0.2.0
func (e NetInterfaceEdges) OnPoInterfaceOrErr() (*PortChannelInterface, error)
OnPoInterfaceOrErr returns the OnPoInterface value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NetInterfaceGroupBy ¶
type NetInterfaceGroupBy struct {
// contains filtered or unexported fields
}
NetInterfaceGroupBy is the group-by builder for NetInterface entities.
func (*NetInterfaceGroupBy) Aggregate ¶
func (nigb *NetInterfaceGroupBy) Aggregate(fns ...AggregateFunc) *NetInterfaceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NetInterfaceGroupBy) Bool ¶
func (nigb *NetInterfaceGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceGroupBy) BoolX ¶
func (nigb *NetInterfaceGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetInterfaceGroupBy) Bools ¶
func (nigb *NetInterfaceGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceGroupBy) BoolsX ¶
func (nigb *NetInterfaceGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetInterfaceGroupBy) Float64 ¶
func (nigb *NetInterfaceGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceGroupBy) Float64X ¶
func (nigb *NetInterfaceGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetInterfaceGroupBy) Float64s ¶
func (nigb *NetInterfaceGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceGroupBy) Float64sX ¶
func (nigb *NetInterfaceGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetInterfaceGroupBy) Int ¶
func (nigb *NetInterfaceGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceGroupBy) IntX ¶
func (nigb *NetInterfaceGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetInterfaceGroupBy) Ints ¶
func (nigb *NetInterfaceGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceGroupBy) IntsX ¶
func (nigb *NetInterfaceGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetInterfaceGroupBy) Scan ¶
func (nigb *NetInterfaceGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*NetInterfaceGroupBy) ScanX ¶
func (nigb *NetInterfaceGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetInterfaceGroupBy) String ¶
func (nigb *NetInterfaceGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceGroupBy) StringX ¶
func (nigb *NetInterfaceGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetInterfaceLayer ¶ added in v0.2.0
type NetInterfaceLayer struct { // ID of the ent. ID int `json:"id,omitempty"` // InterfaceLayer holds the value of the "interface_layer" field. InterfaceLayer int `json:"interface_layer,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NetInterfaceLayerQuery when eager-loading is set. Edges NetInterfaceLayerEdges `json:"edges"` // contains filtered or unexported fields }
NetInterfaceLayer is the model entity for the NetInterfaceLayer schema.
func (*NetInterfaceLayer) QueryLayers ¶ added in v0.2.0
func (nil *NetInterfaceLayer) QueryLayers() *NetInterfaceQuery
QueryLayers queries the "layers" edge of the NetInterfaceLayer entity.
func (*NetInterfaceLayer) QueryPoLayers ¶ added in v0.2.0
func (nil *NetInterfaceLayer) QueryPoLayers() *PortChannelInterfaceQuery
QueryPoLayers queries the "po_layers" edge of the NetInterfaceLayer entity.
func (*NetInterfaceLayer) String ¶ added in v0.2.0
func (nil *NetInterfaceLayer) String() string
String implements the fmt.Stringer.
func (*NetInterfaceLayer) Unwrap ¶ added in v0.2.0
func (nil *NetInterfaceLayer) Unwrap() *NetInterfaceLayer
Unwrap unwraps the NetInterfaceLayer 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 (*NetInterfaceLayer) Update ¶ added in v0.2.0
func (nil *NetInterfaceLayer) Update() *NetInterfaceLayerUpdateOne
Update returns a builder for updating this NetInterfaceLayer. Note that you need to call NetInterfaceLayer.Unwrap() before calling this method if this NetInterfaceLayer was returned from a transaction, and the transaction was committed or rolled back.
type NetInterfaceLayerClient ¶ added in v0.2.0
type NetInterfaceLayerClient struct {
// contains filtered or unexported fields
}
NetInterfaceLayerClient is a client for the NetInterfaceLayer schema.
func NewNetInterfaceLayerClient ¶ added in v0.2.0
func NewNetInterfaceLayerClient(c config) *NetInterfaceLayerClient
NewNetInterfaceLayerClient returns a client for the NetInterfaceLayer from the given config.
func (*NetInterfaceLayerClient) Create ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) Create() *NetInterfaceLayerCreate
Create returns a create builder for NetInterfaceLayer.
func (*NetInterfaceLayerClient) CreateBulk ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) CreateBulk(builders ...*NetInterfaceLayerCreate) *NetInterfaceLayerCreateBulk
CreateBulk returns a builder for creating a bulk of NetInterfaceLayer entities.
func (*NetInterfaceLayerClient) Delete ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) Delete() *NetInterfaceLayerDelete
Delete returns a delete builder for NetInterfaceLayer.
func (*NetInterfaceLayerClient) DeleteOne ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) DeleteOne(nil *NetInterfaceLayer) *NetInterfaceLayerDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*NetInterfaceLayerClient) DeleteOneID ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) DeleteOneID(id int) *NetInterfaceLayerDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*NetInterfaceLayerClient) Get ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) Get(ctx context.Context, id int) (*NetInterfaceLayer, error)
Get returns a NetInterfaceLayer entity by its id.
func (*NetInterfaceLayerClient) GetX ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) GetX(ctx context.Context, id int) *NetInterfaceLayer
GetX is like Get, but panics if an error occurs.
func (*NetInterfaceLayerClient) Hooks ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NetInterfaceLayerClient) Query ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) Query() *NetInterfaceLayerQuery
Query returns a query builder for NetInterfaceLayer.
func (*NetInterfaceLayerClient) QueryLayers ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) QueryLayers(nly *NetInterfaceLayer) *NetInterfaceQuery
QueryLayers queries the layers edge of a NetInterfaceLayer.
func (*NetInterfaceLayerClient) QueryPoLayers ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) QueryPoLayers(nly *NetInterfaceLayer) *PortChannelInterfaceQuery
QueryPoLayers queries the po_layers edge of a NetInterfaceLayer.
func (*NetInterfaceLayerClient) Update ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) Update() *NetInterfaceLayerUpdate
Update returns an update builder for NetInterfaceLayer.
func (*NetInterfaceLayerClient) UpdateOne ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) UpdateOne(nil *NetInterfaceLayer) *NetInterfaceLayerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NetInterfaceLayerClient) UpdateOneID ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) UpdateOneID(id int) *NetInterfaceLayerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NetInterfaceLayerClient) Use ¶ added in v0.2.0
func (c *NetInterfaceLayerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `netinterfacelayer.Hooks(f(g(h())))`.
type NetInterfaceLayerCreate ¶ added in v0.2.0
type NetInterfaceLayerCreate struct {
// contains filtered or unexported fields
}
NetInterfaceLayerCreate is the builder for creating a NetInterfaceLayer entity.
func (*NetInterfaceLayerCreate) AddLayerIDs ¶ added in v0.2.0
func (nilc *NetInterfaceLayerCreate) AddLayerIDs(ids ...int) *NetInterfaceLayerCreate
AddLayerIDs adds the "layers" edge to the NetInterface entity by IDs.
func (*NetInterfaceLayerCreate) AddLayers ¶ added in v0.2.0
func (nilc *NetInterfaceLayerCreate) AddLayers(n ...*NetInterface) *NetInterfaceLayerCreate
AddLayers adds the "layers" edges to the NetInterface entity.
func (*NetInterfaceLayerCreate) AddPoLayerIDs ¶ added in v0.2.0
func (nilc *NetInterfaceLayerCreate) AddPoLayerIDs(ids ...int) *NetInterfaceLayerCreate
AddPoLayerIDs adds the "po_layers" edge to the PortChannelInterface entity by IDs.
func (*NetInterfaceLayerCreate) AddPoLayers ¶ added in v0.2.0
func (nilc *NetInterfaceLayerCreate) AddPoLayers(p ...*PortChannelInterface) *NetInterfaceLayerCreate
AddPoLayers adds the "po_layers" edges to the PortChannelInterface entity.
func (*NetInterfaceLayerCreate) Mutation ¶ added in v0.2.0
func (nilc *NetInterfaceLayerCreate) Mutation() *NetInterfaceLayerMutation
Mutation returns the NetInterfaceLayerMutation object of the builder.
func (*NetInterfaceLayerCreate) Save ¶ added in v0.2.0
func (nilc *NetInterfaceLayerCreate) Save(ctx context.Context) (*NetInterfaceLayer, error)
Save creates the NetInterfaceLayer in the database.
func (*NetInterfaceLayerCreate) SaveX ¶ added in v0.2.0
func (nilc *NetInterfaceLayerCreate) SaveX(ctx context.Context) *NetInterfaceLayer
SaveX calls Save and panics if Save returns an error.
func (*NetInterfaceLayerCreate) SetInterfaceLayer ¶ added in v0.2.0
func (nilc *NetInterfaceLayerCreate) SetInterfaceLayer(i int) *NetInterfaceLayerCreate
SetInterfaceLayer sets the "interface_layer" field.
type NetInterfaceLayerCreateBulk ¶ added in v0.2.0
type NetInterfaceLayerCreateBulk struct {
// contains filtered or unexported fields
}
NetInterfaceLayerCreateBulk is the builder for creating many NetInterfaceLayer entities in bulk.
func (*NetInterfaceLayerCreateBulk) Save ¶ added in v0.2.0
func (nilcb *NetInterfaceLayerCreateBulk) Save(ctx context.Context) ([]*NetInterfaceLayer, error)
Save creates the NetInterfaceLayer entities in the database.
func (*NetInterfaceLayerCreateBulk) SaveX ¶ added in v0.2.0
func (nilcb *NetInterfaceLayerCreateBulk) SaveX(ctx context.Context) []*NetInterfaceLayer
SaveX is like Save, but panics if an error occurs.
type NetInterfaceLayerDelete ¶ added in v0.2.0
type NetInterfaceLayerDelete struct {
// contains filtered or unexported fields
}
NetInterfaceLayerDelete is the builder for deleting a NetInterfaceLayer entity.
func (*NetInterfaceLayerDelete) Exec ¶ added in v0.2.0
func (nild *NetInterfaceLayerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NetInterfaceLayerDelete) ExecX ¶ added in v0.2.0
func (nild *NetInterfaceLayerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NetInterfaceLayerDelete) Where ¶ added in v0.2.0
func (nild *NetInterfaceLayerDelete) Where(ps ...predicate.NetInterfaceLayer) *NetInterfaceLayerDelete
Where adds a new predicate to the NetInterfaceLayerDelete builder.
type NetInterfaceLayerDeleteOne ¶ added in v0.2.0
type NetInterfaceLayerDeleteOne struct {
// contains filtered or unexported fields
}
NetInterfaceLayerDeleteOne is the builder for deleting a single NetInterfaceLayer entity.
func (*NetInterfaceLayerDeleteOne) Exec ¶ added in v0.2.0
func (nildo *NetInterfaceLayerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NetInterfaceLayerDeleteOne) ExecX ¶ added in v0.2.0
func (nildo *NetInterfaceLayerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NetInterfaceLayerEdges ¶ added in v0.2.0
type NetInterfaceLayerEdges struct { // Layers holds the value of the layers edge. Layers []*NetInterface `json:"layers,omitempty"` // PoLayers holds the value of the po_layers edge. PoLayers []*PortChannelInterface `json:"po_layers,omitempty"` // contains filtered or unexported fields }
NetInterfaceLayerEdges holds the relations/edges for other nodes in the graph.
func (NetInterfaceLayerEdges) LayersOrErr ¶ added in v0.2.0
func (e NetInterfaceLayerEdges) LayersOrErr() ([]*NetInterface, error)
LayersOrErr returns the Layers value or an error if the edge was not loaded in eager-loading.
func (NetInterfaceLayerEdges) PoLayersOrErr ¶ added in v0.2.0
func (e NetInterfaceLayerEdges) PoLayersOrErr() ([]*PortChannelInterface, error)
PoLayersOrErr returns the PoLayers value or an error if the edge was not loaded in eager-loading.
type NetInterfaceLayerGroupBy ¶ added in v0.2.0
type NetInterfaceLayerGroupBy struct {
// contains filtered or unexported fields
}
NetInterfaceLayerGroupBy is the group-by builder for NetInterfaceLayer entities.
func (*NetInterfaceLayerGroupBy) Aggregate ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Aggregate(fns ...AggregateFunc) *NetInterfaceLayerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NetInterfaceLayerGroupBy) Bool ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceLayerGroupBy) BoolX ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetInterfaceLayerGroupBy) Bools ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceLayerGroupBy) BoolsX ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetInterfaceLayerGroupBy) Float64 ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceLayerGroupBy) Float64X ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetInterfaceLayerGroupBy) Float64s ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceLayerGroupBy) Float64sX ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetInterfaceLayerGroupBy) Int ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceLayerGroupBy) IntX ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetInterfaceLayerGroupBy) Ints ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceLayerGroupBy) IntsX ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetInterfaceLayerGroupBy) Scan ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*NetInterfaceLayerGroupBy) ScanX ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetInterfaceLayerGroupBy) String ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceLayerGroupBy) StringX ¶ added in v0.2.0
func (nilgb *NetInterfaceLayerGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetInterfaceLayerMutation ¶ added in v0.2.0
type NetInterfaceLayerMutation struct {
// contains filtered or unexported fields
}
NetInterfaceLayerMutation represents an operation that mutates the NetInterfaceLayer nodes in the graph.
func (*NetInterfaceLayerMutation) AddField ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) AddInterfaceLayer ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) AddInterfaceLayer(i int)
AddInterfaceLayer adds i to the "interface_layer" field.
func (*NetInterfaceLayerMutation) AddLayerIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) AddLayerIDs(ids ...int)
AddLayerIDs adds the "layers" edge to the NetInterface entity by ids.
func (*NetInterfaceLayerMutation) AddPoLayerIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) AddPoLayerIDs(ids ...int)
AddPoLayerIDs adds the "po_layers" edge to the PortChannelInterface entity by ids.
func (*NetInterfaceLayerMutation) AddedEdges ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NetInterfaceLayerMutation) AddedField ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) AddedFields ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NetInterfaceLayerMutation) AddedIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NetInterfaceLayerMutation) AddedInterfaceLayer ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) AddedInterfaceLayer() (r int, exists bool)
AddedInterfaceLayer returns the value that was added to the "interface_layer" field in this mutation.
func (*NetInterfaceLayerMutation) ClearEdge ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) ClearField ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) ClearLayers ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) ClearLayers()
ClearLayers clears the "layers" edge to the NetInterface entity.
func (*NetInterfaceLayerMutation) ClearPoLayers ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) ClearPoLayers()
ClearPoLayers clears the "po_layers" edge to the PortChannelInterface entity.
func (*NetInterfaceLayerMutation) ClearedEdges ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NetInterfaceLayerMutation) ClearedFields ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NetInterfaceLayerMutation) Client ¶ added in v0.2.0
func (m NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) EdgeCleared ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NetInterfaceLayerMutation) Field ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) FieldCleared ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NetInterfaceLayerMutation) Fields ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) ID ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*NetInterfaceLayerMutation) InterfaceLayer ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) InterfaceLayer() (r int, exists bool)
InterfaceLayer returns the value of the "interface_layer" field in the mutation.
func (*NetInterfaceLayerMutation) LayersCleared ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) LayersCleared() bool
LayersCleared reports if the "layers" edge to the NetInterface entity was cleared.
func (*NetInterfaceLayerMutation) LayersIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) LayersIDs() (ids []int)
LayersIDs returns the "layers" edge IDs in the mutation.
func (*NetInterfaceLayerMutation) OldField ¶ added in v0.2.0
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 (*NetInterfaceLayerMutation) OldInterfaceLayer ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) OldInterfaceLayer(ctx context.Context) (v int, err error)
OldInterfaceLayer returns the old "interface_layer" field's value of the NetInterfaceLayer entity. If the NetInterfaceLayer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NetInterfaceLayerMutation) Op ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) Op() Op
Op returns the operation name.
func (*NetInterfaceLayerMutation) PoLayersCleared ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) PoLayersCleared() bool
PoLayersCleared reports if the "po_layers" edge to the PortChannelInterface entity was cleared.
func (*NetInterfaceLayerMutation) PoLayersIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) PoLayersIDs() (ids []int)
PoLayersIDs returns the "po_layers" edge IDs in the mutation.
func (*NetInterfaceLayerMutation) RemoveLayerIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) RemoveLayerIDs(ids ...int)
RemoveLayerIDs removes the "layers" edge to the NetInterface entity by IDs.
func (*NetInterfaceLayerMutation) RemovePoLayerIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) RemovePoLayerIDs(ids ...int)
RemovePoLayerIDs removes the "po_layers" edge to the PortChannelInterface entity by IDs.
func (*NetInterfaceLayerMutation) RemovedEdges ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NetInterfaceLayerMutation) RemovedIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) RemovedLayersIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) RemovedLayersIDs() (ids []int)
RemovedLayers returns the removed IDs of the "layers" edge to the NetInterface entity.
func (*NetInterfaceLayerMutation) RemovedPoLayersIDs ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) RemovedPoLayersIDs() (ids []int)
RemovedPoLayers returns the removed IDs of the "po_layers" edge to the PortChannelInterface entity.
func (*NetInterfaceLayerMutation) ResetEdge ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) ResetField ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) ResetInterfaceLayer ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) ResetInterfaceLayer()
ResetInterfaceLayer resets all changes to the "interface_layer" field.
func (*NetInterfaceLayerMutation) ResetLayers ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) ResetLayers()
ResetLayers resets all changes to the "layers" edge.
func (*NetInterfaceLayerMutation) ResetPoLayers ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) ResetPoLayers()
ResetPoLayers resets all changes to the "po_layers" edge.
func (*NetInterfaceLayerMutation) SetField ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) 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 (*NetInterfaceLayerMutation) SetInterfaceLayer ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) SetInterfaceLayer(i int)
SetInterfaceLayer sets the "interface_layer" field.
func (NetInterfaceLayerMutation) Tx ¶ added in v0.2.0
func (m NetInterfaceLayerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NetInterfaceLayerMutation) Type ¶ added in v0.2.0
func (m *NetInterfaceLayerMutation) Type() string
Type returns the node type of this mutation (NetInterfaceLayer).
type NetInterfaceLayerQuery ¶ added in v0.2.0
type NetInterfaceLayerQuery struct {
// contains filtered or unexported fields
}
NetInterfaceLayerQuery is the builder for querying NetInterfaceLayer entities.
func (*NetInterfaceLayerQuery) All ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) All(ctx context.Context) ([]*NetInterfaceLayer, error)
All executes the query and returns a list of NetInterfaceLayers.
func (*NetInterfaceLayerQuery) AllX ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) AllX(ctx context.Context) []*NetInterfaceLayer
AllX is like All, but panics if an error occurs.
func (*NetInterfaceLayerQuery) Clone ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Clone() *NetInterfaceLayerQuery
Clone returns a duplicate of the NetInterfaceLayerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NetInterfaceLayerQuery) Count ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NetInterfaceLayerQuery) CountX ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NetInterfaceLayerQuery) Exist ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NetInterfaceLayerQuery) ExistX ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NetInterfaceLayerQuery) First ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) First(ctx context.Context) (*NetInterfaceLayer, error)
First returns the first NetInterfaceLayer entity from the query. Returns a *NotFoundError when no NetInterfaceLayer was found.
func (*NetInterfaceLayerQuery) FirstID ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NetInterfaceLayer ID from the query. Returns a *NotFoundError when no NetInterfaceLayer ID was found.
func (*NetInterfaceLayerQuery) FirstIDX ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NetInterfaceLayerQuery) FirstX ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) FirstX(ctx context.Context) *NetInterfaceLayer
FirstX is like First, but panics if an error occurs.
func (*NetInterfaceLayerQuery) GroupBy ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) GroupBy(field string, fields ...string) *NetInterfaceLayerGroupBy
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 { InterfaceLayer int `json:"interface_layer,omitempty"` Count int `json:"count,omitempty"` } client.NetInterfaceLayer.Query(). GroupBy(netinterfacelayer.FieldInterfaceLayer). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NetInterfaceLayerQuery) IDs ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NetInterfaceLayer IDs.
func (*NetInterfaceLayerQuery) IDsX ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NetInterfaceLayerQuery) Limit ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Limit(limit int) *NetInterfaceLayerQuery
Limit adds a limit step to the query.
func (*NetInterfaceLayerQuery) Offset ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Offset(offset int) *NetInterfaceLayerQuery
Offset adds an offset step to the query.
func (*NetInterfaceLayerQuery) Only ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Only(ctx context.Context) (*NetInterfaceLayer, error)
Only returns a single NetInterfaceLayer entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one NetInterfaceLayer entity is not found. Returns a *NotFoundError when no NetInterfaceLayer entities are found.
func (*NetInterfaceLayerQuery) OnlyID ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NetInterfaceLayer ID in the query. Returns a *NotSingularError when exactly one NetInterfaceLayer ID is not found. Returns a *NotFoundError when no entities are found.
func (*NetInterfaceLayerQuery) OnlyIDX ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NetInterfaceLayerQuery) OnlyX ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) OnlyX(ctx context.Context) *NetInterfaceLayer
OnlyX is like Only, but panics if an error occurs.
func (*NetInterfaceLayerQuery) Order ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Order(o ...OrderFunc) *NetInterfaceLayerQuery
Order adds an order step to the query.
func (*NetInterfaceLayerQuery) QueryLayers ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) QueryLayers() *NetInterfaceQuery
QueryLayers chains the current query on the "layers" edge.
func (*NetInterfaceLayerQuery) QueryPoLayers ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) QueryPoLayers() *PortChannelInterfaceQuery
QueryPoLayers chains the current query on the "po_layers" edge.
func (*NetInterfaceLayerQuery) Select ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Select(field string, fields ...string) *NetInterfaceLayerSelect
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 { InterfaceLayer int `json:"interface_layer,omitempty"` } client.NetInterfaceLayer.Query(). Select(netinterfacelayer.FieldInterfaceLayer). Scan(ctx, &v)
func (*NetInterfaceLayerQuery) Unique ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Unique(unique bool) *NetInterfaceLayerQuery
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 (*NetInterfaceLayerQuery) Where ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) Where(ps ...predicate.NetInterfaceLayer) *NetInterfaceLayerQuery
Where adds a new predicate for the NetInterfaceLayerQuery builder.
func (*NetInterfaceLayerQuery) WithLayers ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) WithLayers(opts ...func(*NetInterfaceQuery)) *NetInterfaceLayerQuery
WithLayers tells the query-builder to eager-load the nodes that are connected to the "layers" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetInterfaceLayerQuery) WithPoLayers ¶ added in v0.2.0
func (nilq *NetInterfaceLayerQuery) WithPoLayers(opts ...func(*PortChannelInterfaceQuery)) *NetInterfaceLayerQuery
WithPoLayers tells the query-builder to eager-load the nodes that are connected to the "po_layers" edge. The optional arguments are used to configure the query builder of the edge.
type NetInterfaceLayerSelect ¶ added in v0.2.0
type NetInterfaceLayerSelect struct { *NetInterfaceLayerQuery // contains filtered or unexported fields }
NetInterfaceLayerSelect is the builder for selecting fields of NetInterfaceLayer entities.
func (*NetInterfaceLayerSelect) Bool ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NetInterfaceLayerSelect) BoolX ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetInterfaceLayerSelect) Bools ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NetInterfaceLayerSelect) BoolsX ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetInterfaceLayerSelect) Float64 ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NetInterfaceLayerSelect) Float64X ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetInterfaceLayerSelect) Float64s ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NetInterfaceLayerSelect) Float64sX ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetInterfaceLayerSelect) Int ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NetInterfaceLayerSelect) IntX ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetInterfaceLayerSelect) Ints ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NetInterfaceLayerSelect) IntsX ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetInterfaceLayerSelect) Scan ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*NetInterfaceLayerSelect) ScanX ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetInterfaceLayerSelect) String ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*NetInterfaceLayerSelect) StringX ¶ added in v0.2.0
func (nils *NetInterfaceLayerSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetInterfaceLayerUpdate ¶ added in v0.2.0
type NetInterfaceLayerUpdate struct {
// contains filtered or unexported fields
}
NetInterfaceLayerUpdate is the builder for updating NetInterfaceLayer entities.
func (*NetInterfaceLayerUpdate) AddInterfaceLayer ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) AddInterfaceLayer(i int) *NetInterfaceLayerUpdate
AddInterfaceLayer adds i to the "interface_layer" field.
func (*NetInterfaceLayerUpdate) AddLayerIDs ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) AddLayerIDs(ids ...int) *NetInterfaceLayerUpdate
AddLayerIDs adds the "layers" edge to the NetInterface entity by IDs.
func (*NetInterfaceLayerUpdate) AddLayers ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) AddLayers(n ...*NetInterface) *NetInterfaceLayerUpdate
AddLayers adds the "layers" edges to the NetInterface entity.
func (*NetInterfaceLayerUpdate) AddPoLayerIDs ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) AddPoLayerIDs(ids ...int) *NetInterfaceLayerUpdate
AddPoLayerIDs adds the "po_layers" edge to the PortChannelInterface entity by IDs.
func (*NetInterfaceLayerUpdate) AddPoLayers ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) AddPoLayers(p ...*PortChannelInterface) *NetInterfaceLayerUpdate
AddPoLayers adds the "po_layers" edges to the PortChannelInterface entity.
func (*NetInterfaceLayerUpdate) ClearLayers ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) ClearLayers() *NetInterfaceLayerUpdate
ClearLayers clears all "layers" edges to the NetInterface entity.
func (*NetInterfaceLayerUpdate) ClearPoLayers ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) ClearPoLayers() *NetInterfaceLayerUpdate
ClearPoLayers clears all "po_layers" edges to the PortChannelInterface entity.
func (*NetInterfaceLayerUpdate) Exec ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NetInterfaceLayerUpdate) ExecX ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetInterfaceLayerUpdate) Mutation ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) Mutation() *NetInterfaceLayerMutation
Mutation returns the NetInterfaceLayerMutation object of the builder.
func (*NetInterfaceLayerUpdate) RemoveLayerIDs ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) RemoveLayerIDs(ids ...int) *NetInterfaceLayerUpdate
RemoveLayerIDs removes the "layers" edge to NetInterface entities by IDs.
func (*NetInterfaceLayerUpdate) RemoveLayers ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) RemoveLayers(n ...*NetInterface) *NetInterfaceLayerUpdate
RemoveLayers removes "layers" edges to NetInterface entities.
func (*NetInterfaceLayerUpdate) RemovePoLayerIDs ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) RemovePoLayerIDs(ids ...int) *NetInterfaceLayerUpdate
RemovePoLayerIDs removes the "po_layers" edge to PortChannelInterface entities by IDs.
func (*NetInterfaceLayerUpdate) RemovePoLayers ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) RemovePoLayers(p ...*PortChannelInterface) *NetInterfaceLayerUpdate
RemovePoLayers removes "po_layers" edges to PortChannelInterface entities.
func (*NetInterfaceLayerUpdate) Save ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NetInterfaceLayerUpdate) SaveX ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NetInterfaceLayerUpdate) SetInterfaceLayer ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) SetInterfaceLayer(i int) *NetInterfaceLayerUpdate
SetInterfaceLayer sets the "interface_layer" field.
func (*NetInterfaceLayerUpdate) Where ¶ added in v0.2.0
func (nilu *NetInterfaceLayerUpdate) Where(ps ...predicate.NetInterfaceLayer) *NetInterfaceLayerUpdate
Where adds a new predicate for the NetInterfaceLayerUpdate builder.
type NetInterfaceLayerUpdateOne ¶ added in v0.2.0
type NetInterfaceLayerUpdateOne struct {
// contains filtered or unexported fields
}
NetInterfaceLayerUpdateOne is the builder for updating a single NetInterfaceLayer entity.
func (*NetInterfaceLayerUpdateOne) AddInterfaceLayer ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) AddInterfaceLayer(i int) *NetInterfaceLayerUpdateOne
AddInterfaceLayer adds i to the "interface_layer" field.
func (*NetInterfaceLayerUpdateOne) AddLayerIDs ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) AddLayerIDs(ids ...int) *NetInterfaceLayerUpdateOne
AddLayerIDs adds the "layers" edge to the NetInterface entity by IDs.
func (*NetInterfaceLayerUpdateOne) AddLayers ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) AddLayers(n ...*NetInterface) *NetInterfaceLayerUpdateOne
AddLayers adds the "layers" edges to the NetInterface entity.
func (*NetInterfaceLayerUpdateOne) AddPoLayerIDs ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) AddPoLayerIDs(ids ...int) *NetInterfaceLayerUpdateOne
AddPoLayerIDs adds the "po_layers" edge to the PortChannelInterface entity by IDs.
func (*NetInterfaceLayerUpdateOne) AddPoLayers ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) AddPoLayers(p ...*PortChannelInterface) *NetInterfaceLayerUpdateOne
AddPoLayers adds the "po_layers" edges to the PortChannelInterface entity.
func (*NetInterfaceLayerUpdateOne) ClearLayers ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) ClearLayers() *NetInterfaceLayerUpdateOne
ClearLayers clears all "layers" edges to the NetInterface entity.
func (*NetInterfaceLayerUpdateOne) ClearPoLayers ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) ClearPoLayers() *NetInterfaceLayerUpdateOne
ClearPoLayers clears all "po_layers" edges to the PortChannelInterface entity.
func (*NetInterfaceLayerUpdateOne) Exec ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NetInterfaceLayerUpdateOne) ExecX ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetInterfaceLayerUpdateOne) Mutation ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) Mutation() *NetInterfaceLayerMutation
Mutation returns the NetInterfaceLayerMutation object of the builder.
func (*NetInterfaceLayerUpdateOne) RemoveLayerIDs ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) RemoveLayerIDs(ids ...int) *NetInterfaceLayerUpdateOne
RemoveLayerIDs removes the "layers" edge to NetInterface entities by IDs.
func (*NetInterfaceLayerUpdateOne) RemoveLayers ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) RemoveLayers(n ...*NetInterface) *NetInterfaceLayerUpdateOne
RemoveLayers removes "layers" edges to NetInterface entities.
func (*NetInterfaceLayerUpdateOne) RemovePoLayerIDs ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) RemovePoLayerIDs(ids ...int) *NetInterfaceLayerUpdateOne
RemovePoLayerIDs removes the "po_layers" edge to PortChannelInterface entities by IDs.
func (*NetInterfaceLayerUpdateOne) RemovePoLayers ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) RemovePoLayers(p ...*PortChannelInterface) *NetInterfaceLayerUpdateOne
RemovePoLayers removes "po_layers" edges to PortChannelInterface entities.
func (*NetInterfaceLayerUpdateOne) Save ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) Save(ctx context.Context) (*NetInterfaceLayer, error)
Save executes the query and returns the updated NetInterfaceLayer entity.
func (*NetInterfaceLayerUpdateOne) SaveX ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) SaveX(ctx context.Context) *NetInterfaceLayer
SaveX is like Save, but panics if an error occurs.
func (*NetInterfaceLayerUpdateOne) Select ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) Select(field string, fields ...string) *NetInterfaceLayerUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NetInterfaceLayerUpdateOne) SetInterfaceLayer ¶ added in v0.2.0
func (niluo *NetInterfaceLayerUpdateOne) SetInterfaceLayer(i int) *NetInterfaceLayerUpdateOne
SetInterfaceLayer sets the "interface_layer" field.
type NetInterfaceLayers ¶ added in v0.2.0
type NetInterfaceLayers []*NetInterfaceLayer
NetInterfaceLayers is a parsable slice of NetInterfaceLayer.
type NetInterfaceMode ¶
type NetInterfaceMode struct { // ID of the ent. ID int `json:"id,omitempty"` // InterfaceMode holds the value of the "interface_mode" field. InterfaceMode string `json:"interface_mode,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NetInterfaceModeQuery when eager-loading is set. Edges NetInterfaceModeEdges `json:"edges"` // contains filtered or unexported fields }
NetInterfaceMode is the model entity for the NetInterfaceMode schema.
func (*NetInterfaceMode) QueryModes ¶
func (nim *NetInterfaceMode) QueryModes() *NetInterfaceQuery
QueryModes queries the "modes" edge of the NetInterfaceMode entity.
func (*NetInterfaceMode) QueryPoModes ¶ added in v0.2.0
func (nim *NetInterfaceMode) QueryPoModes() *PortChannelInterfaceQuery
QueryPoModes queries the "po_modes" edge of the NetInterfaceMode entity.
func (*NetInterfaceMode) String ¶
func (nim *NetInterfaceMode) String() string
String implements the fmt.Stringer.
func (*NetInterfaceMode) Unwrap ¶
func (nim *NetInterfaceMode) Unwrap() *NetInterfaceMode
Unwrap unwraps the NetInterfaceMode 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 (*NetInterfaceMode) Update ¶
func (nim *NetInterfaceMode) Update() *NetInterfaceModeUpdateOne
Update returns a builder for updating this NetInterfaceMode. Note that you need to call NetInterfaceMode.Unwrap() before calling this method if this NetInterfaceMode was returned from a transaction, and the transaction was committed or rolled back.
type NetInterfaceModeClient ¶
type NetInterfaceModeClient struct {
// contains filtered or unexported fields
}
NetInterfaceModeClient is a client for the NetInterfaceMode schema.
func NewNetInterfaceModeClient ¶
func NewNetInterfaceModeClient(c config) *NetInterfaceModeClient
NewNetInterfaceModeClient returns a client for the NetInterfaceMode from the given config.
func (*NetInterfaceModeClient) Create ¶
func (c *NetInterfaceModeClient) Create() *NetInterfaceModeCreate
Create returns a create builder for NetInterfaceMode.
func (*NetInterfaceModeClient) CreateBulk ¶
func (c *NetInterfaceModeClient) CreateBulk(builders ...*NetInterfaceModeCreate) *NetInterfaceModeCreateBulk
CreateBulk returns a builder for creating a bulk of NetInterfaceMode entities.
func (*NetInterfaceModeClient) Delete ¶
func (c *NetInterfaceModeClient) Delete() *NetInterfaceModeDelete
Delete returns a delete builder for NetInterfaceMode.
func (*NetInterfaceModeClient) DeleteOne ¶
func (c *NetInterfaceModeClient) DeleteOne(nim *NetInterfaceMode) *NetInterfaceModeDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*NetInterfaceModeClient) DeleteOneID ¶
func (c *NetInterfaceModeClient) DeleteOneID(id int) *NetInterfaceModeDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*NetInterfaceModeClient) Get ¶
func (c *NetInterfaceModeClient) Get(ctx context.Context, id int) (*NetInterfaceMode, error)
Get returns a NetInterfaceMode entity by its id.
func (*NetInterfaceModeClient) GetX ¶
func (c *NetInterfaceModeClient) GetX(ctx context.Context, id int) *NetInterfaceMode
GetX is like Get, but panics if an error occurs.
func (*NetInterfaceModeClient) Hooks ¶
func (c *NetInterfaceModeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NetInterfaceModeClient) Query ¶
func (c *NetInterfaceModeClient) Query() *NetInterfaceModeQuery
Query returns a query builder for NetInterfaceMode.
func (*NetInterfaceModeClient) QueryModes ¶
func (c *NetInterfaceModeClient) QueryModes(nim *NetInterfaceMode) *NetInterfaceQuery
QueryModes queries the modes edge of a NetInterfaceMode.
func (*NetInterfaceModeClient) QueryPoModes ¶ added in v0.2.0
func (c *NetInterfaceModeClient) QueryPoModes(nim *NetInterfaceMode) *PortChannelInterfaceQuery
QueryPoModes queries the po_modes edge of a NetInterfaceMode.
func (*NetInterfaceModeClient) Update ¶
func (c *NetInterfaceModeClient) Update() *NetInterfaceModeUpdate
Update returns an update builder for NetInterfaceMode.
func (*NetInterfaceModeClient) UpdateOne ¶
func (c *NetInterfaceModeClient) UpdateOne(nim *NetInterfaceMode) *NetInterfaceModeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NetInterfaceModeClient) UpdateOneID ¶
func (c *NetInterfaceModeClient) UpdateOneID(id int) *NetInterfaceModeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NetInterfaceModeClient) Use ¶
func (c *NetInterfaceModeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `netinterfacemode.Hooks(f(g(h())))`.
type NetInterfaceModeCreate ¶
type NetInterfaceModeCreate struct {
// contains filtered or unexported fields
}
NetInterfaceModeCreate is the builder for creating a NetInterfaceMode entity.
func (*NetInterfaceModeCreate) AddModeIDs ¶
func (nimc *NetInterfaceModeCreate) AddModeIDs(ids ...int) *NetInterfaceModeCreate
AddModeIDs adds the "modes" edge to the NetInterface entity by IDs.
func (*NetInterfaceModeCreate) AddModes ¶
func (nimc *NetInterfaceModeCreate) AddModes(n ...*NetInterface) *NetInterfaceModeCreate
AddModes adds the "modes" edges to the NetInterface entity.
func (*NetInterfaceModeCreate) AddPoModeIDs ¶ added in v0.2.0
func (nimc *NetInterfaceModeCreate) AddPoModeIDs(ids ...int) *NetInterfaceModeCreate
AddPoModeIDs adds the "po_modes" edge to the PortChannelInterface entity by IDs.
func (*NetInterfaceModeCreate) AddPoModes ¶ added in v0.2.0
func (nimc *NetInterfaceModeCreate) AddPoModes(p ...*PortChannelInterface) *NetInterfaceModeCreate
AddPoModes adds the "po_modes" edges to the PortChannelInterface entity.
func (*NetInterfaceModeCreate) Mutation ¶
func (nimc *NetInterfaceModeCreate) Mutation() *NetInterfaceModeMutation
Mutation returns the NetInterfaceModeMutation object of the builder.
func (*NetInterfaceModeCreate) Save ¶
func (nimc *NetInterfaceModeCreate) Save(ctx context.Context) (*NetInterfaceMode, error)
Save creates the NetInterfaceMode in the database.
func (*NetInterfaceModeCreate) SaveX ¶
func (nimc *NetInterfaceModeCreate) SaveX(ctx context.Context) *NetInterfaceMode
SaveX calls Save and panics if Save returns an error.
func (*NetInterfaceModeCreate) SetInterfaceMode ¶
func (nimc *NetInterfaceModeCreate) SetInterfaceMode(s string) *NetInterfaceModeCreate
SetInterfaceMode sets the "interface_mode" field.
type NetInterfaceModeCreateBulk ¶
type NetInterfaceModeCreateBulk struct {
// contains filtered or unexported fields
}
NetInterfaceModeCreateBulk is the builder for creating many NetInterfaceMode entities in bulk.
func (*NetInterfaceModeCreateBulk) Save ¶
func (nimcb *NetInterfaceModeCreateBulk) Save(ctx context.Context) ([]*NetInterfaceMode, error)
Save creates the NetInterfaceMode entities in the database.
func (*NetInterfaceModeCreateBulk) SaveX ¶
func (nimcb *NetInterfaceModeCreateBulk) SaveX(ctx context.Context) []*NetInterfaceMode
SaveX is like Save, but panics if an error occurs.
type NetInterfaceModeDelete ¶
type NetInterfaceModeDelete struct {
// contains filtered or unexported fields
}
NetInterfaceModeDelete is the builder for deleting a NetInterfaceMode entity.
func (*NetInterfaceModeDelete) Exec ¶
func (nimd *NetInterfaceModeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NetInterfaceModeDelete) ExecX ¶
func (nimd *NetInterfaceModeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NetInterfaceModeDelete) Where ¶
func (nimd *NetInterfaceModeDelete) Where(ps ...predicate.NetInterfaceMode) *NetInterfaceModeDelete
Where adds a new predicate to the NetInterfaceModeDelete builder.
type NetInterfaceModeDeleteOne ¶
type NetInterfaceModeDeleteOne struct {
// contains filtered or unexported fields
}
NetInterfaceModeDeleteOne is the builder for deleting a single NetInterfaceMode entity.
func (*NetInterfaceModeDeleteOne) Exec ¶
func (nimdo *NetInterfaceModeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NetInterfaceModeDeleteOne) ExecX ¶
func (nimdo *NetInterfaceModeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NetInterfaceModeEdges ¶
type NetInterfaceModeEdges struct { // Modes holds the value of the modes edge. Modes []*NetInterface `json:"modes,omitempty"` // PoModes holds the value of the po_modes edge. PoModes []*PortChannelInterface `json:"po_modes,omitempty"` // contains filtered or unexported fields }
NetInterfaceModeEdges holds the relations/edges for other nodes in the graph.
func (NetInterfaceModeEdges) ModesOrErr ¶
func (e NetInterfaceModeEdges) ModesOrErr() ([]*NetInterface, error)
ModesOrErr returns the Modes value or an error if the edge was not loaded in eager-loading.
func (NetInterfaceModeEdges) PoModesOrErr ¶ added in v0.2.0
func (e NetInterfaceModeEdges) PoModesOrErr() ([]*PortChannelInterface, error)
PoModesOrErr returns the PoModes value or an error if the edge was not loaded in eager-loading.
type NetInterfaceModeGroupBy ¶
type NetInterfaceModeGroupBy struct {
// contains filtered or unexported fields
}
NetInterfaceModeGroupBy is the group-by builder for NetInterfaceMode entities.
func (*NetInterfaceModeGroupBy) Aggregate ¶
func (nimgb *NetInterfaceModeGroupBy) Aggregate(fns ...AggregateFunc) *NetInterfaceModeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NetInterfaceModeGroupBy) Bool ¶
func (nimgb *NetInterfaceModeGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceModeGroupBy) BoolX ¶
func (nimgb *NetInterfaceModeGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetInterfaceModeGroupBy) Bools ¶
func (nimgb *NetInterfaceModeGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceModeGroupBy) BoolsX ¶
func (nimgb *NetInterfaceModeGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetInterfaceModeGroupBy) Float64 ¶
func (nimgb *NetInterfaceModeGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceModeGroupBy) Float64X ¶
func (nimgb *NetInterfaceModeGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetInterfaceModeGroupBy) Float64s ¶
func (nimgb *NetInterfaceModeGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceModeGroupBy) Float64sX ¶
func (nimgb *NetInterfaceModeGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetInterfaceModeGroupBy) Int ¶
func (nimgb *NetInterfaceModeGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceModeGroupBy) IntX ¶
func (nimgb *NetInterfaceModeGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetInterfaceModeGroupBy) Ints ¶
func (nimgb *NetInterfaceModeGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceModeGroupBy) IntsX ¶
func (nimgb *NetInterfaceModeGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetInterfaceModeGroupBy) Scan ¶
func (nimgb *NetInterfaceModeGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*NetInterfaceModeGroupBy) ScanX ¶
func (nimgb *NetInterfaceModeGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetInterfaceModeGroupBy) String ¶
func (nimgb *NetInterfaceModeGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetInterfaceModeGroupBy) StringX ¶
func (nimgb *NetInterfaceModeGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetInterfaceModeMutation ¶
type NetInterfaceModeMutation struct {
// contains filtered or unexported fields
}
NetInterfaceModeMutation represents an operation that mutates the NetInterfaceMode nodes in the graph.
func (*NetInterfaceModeMutation) AddField ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) AddModeIDs ¶
func (m *NetInterfaceModeMutation) AddModeIDs(ids ...int)
AddModeIDs adds the "modes" edge to the NetInterface entity by ids.
func (*NetInterfaceModeMutation) AddPoModeIDs ¶ added in v0.2.0
func (m *NetInterfaceModeMutation) AddPoModeIDs(ids ...int)
AddPoModeIDs adds the "po_modes" edge to the PortChannelInterface entity by ids.
func (*NetInterfaceModeMutation) AddedEdges ¶
func (m *NetInterfaceModeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NetInterfaceModeMutation) AddedField ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) AddedFields ¶
func (m *NetInterfaceModeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NetInterfaceModeMutation) AddedIDs ¶
func (m *NetInterfaceModeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NetInterfaceModeMutation) ClearEdge ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) ClearField ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) ClearModes ¶
func (m *NetInterfaceModeMutation) ClearModes()
ClearModes clears the "modes" edge to the NetInterface entity.
func (*NetInterfaceModeMutation) ClearPoModes ¶ added in v0.2.0
func (m *NetInterfaceModeMutation) ClearPoModes()
ClearPoModes clears the "po_modes" edge to the PortChannelInterface entity.
func (*NetInterfaceModeMutation) ClearedEdges ¶
func (m *NetInterfaceModeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NetInterfaceModeMutation) ClearedFields ¶
func (m *NetInterfaceModeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NetInterfaceModeMutation) Client ¶
func (m NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) EdgeCleared ¶
func (m *NetInterfaceModeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NetInterfaceModeMutation) Field ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) FieldCleared ¶
func (m *NetInterfaceModeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NetInterfaceModeMutation) Fields ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) ID ¶
func (m *NetInterfaceModeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*NetInterfaceModeMutation) InterfaceMode ¶
func (m *NetInterfaceModeMutation) InterfaceMode() (r string, exists bool)
InterfaceMode returns the value of the "interface_mode" field in the mutation.
func (*NetInterfaceModeMutation) ModesCleared ¶
func (m *NetInterfaceModeMutation) ModesCleared() bool
ModesCleared reports if the "modes" edge to the NetInterface entity was cleared.
func (*NetInterfaceModeMutation) ModesIDs ¶
func (m *NetInterfaceModeMutation) ModesIDs() (ids []int)
ModesIDs returns the "modes" edge IDs in the mutation.
func (*NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) OldInterfaceMode ¶
func (m *NetInterfaceModeMutation) OldInterfaceMode(ctx context.Context) (v string, err error)
OldInterfaceMode returns the old "interface_mode" field's value of the NetInterfaceMode entity. If the NetInterfaceMode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NetInterfaceModeMutation) Op ¶
func (m *NetInterfaceModeMutation) Op() Op
Op returns the operation name.
func (*NetInterfaceModeMutation) PoModesCleared ¶ added in v0.2.0
func (m *NetInterfaceModeMutation) PoModesCleared() bool
PoModesCleared reports if the "po_modes" edge to the PortChannelInterface entity was cleared.
func (*NetInterfaceModeMutation) PoModesIDs ¶ added in v0.2.0
func (m *NetInterfaceModeMutation) PoModesIDs() (ids []int)
PoModesIDs returns the "po_modes" edge IDs in the mutation.
func (*NetInterfaceModeMutation) RemoveModeIDs ¶
func (m *NetInterfaceModeMutation) RemoveModeIDs(ids ...int)
RemoveModeIDs removes the "modes" edge to the NetInterface entity by IDs.
func (*NetInterfaceModeMutation) RemovePoModeIDs ¶ added in v0.2.0
func (m *NetInterfaceModeMutation) RemovePoModeIDs(ids ...int)
RemovePoModeIDs removes the "po_modes" edge to the PortChannelInterface entity by IDs.
func (*NetInterfaceModeMutation) RemovedEdges ¶
func (m *NetInterfaceModeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NetInterfaceModeMutation) RemovedIDs ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) RemovedModesIDs ¶
func (m *NetInterfaceModeMutation) RemovedModesIDs() (ids []int)
RemovedModes returns the removed IDs of the "modes" edge to the NetInterface entity.
func (*NetInterfaceModeMutation) RemovedPoModesIDs ¶ added in v0.2.0
func (m *NetInterfaceModeMutation) RemovedPoModesIDs() (ids []int)
RemovedPoModes returns the removed IDs of the "po_modes" edge to the PortChannelInterface entity.
func (*NetInterfaceModeMutation) ResetEdge ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) ResetField ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) ResetInterfaceMode ¶
func (m *NetInterfaceModeMutation) ResetInterfaceMode()
ResetInterfaceMode resets all changes to the "interface_mode" field.
func (*NetInterfaceModeMutation) ResetModes ¶
func (m *NetInterfaceModeMutation) ResetModes()
ResetModes resets all changes to the "modes" edge.
func (*NetInterfaceModeMutation) ResetPoModes ¶ added in v0.2.0
func (m *NetInterfaceModeMutation) ResetPoModes()
ResetPoModes resets all changes to the "po_modes" edge.
func (*NetInterfaceModeMutation) SetField ¶
func (m *NetInterfaceModeMutation) 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 (*NetInterfaceModeMutation) SetInterfaceMode ¶
func (m *NetInterfaceModeMutation) SetInterfaceMode(s string)
SetInterfaceMode sets the "interface_mode" field.
func (NetInterfaceModeMutation) Tx ¶
func (m NetInterfaceModeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NetInterfaceModeMutation) Type ¶
func (m *NetInterfaceModeMutation) Type() string
Type returns the node type of this mutation (NetInterfaceMode).
type NetInterfaceModeQuery ¶
type NetInterfaceModeQuery struct {
// contains filtered or unexported fields
}
NetInterfaceModeQuery is the builder for querying NetInterfaceMode entities.
func (*NetInterfaceModeQuery) All ¶
func (nimq *NetInterfaceModeQuery) All(ctx context.Context) ([]*NetInterfaceMode, error)
All executes the query and returns a list of NetInterfaceModes.
func (*NetInterfaceModeQuery) AllX ¶
func (nimq *NetInterfaceModeQuery) AllX(ctx context.Context) []*NetInterfaceMode
AllX is like All, but panics if an error occurs.
func (*NetInterfaceModeQuery) Clone ¶
func (nimq *NetInterfaceModeQuery) Clone() *NetInterfaceModeQuery
Clone returns a duplicate of the NetInterfaceModeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NetInterfaceModeQuery) Count ¶
func (nimq *NetInterfaceModeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NetInterfaceModeQuery) CountX ¶
func (nimq *NetInterfaceModeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NetInterfaceModeQuery) Exist ¶
func (nimq *NetInterfaceModeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NetInterfaceModeQuery) ExistX ¶
func (nimq *NetInterfaceModeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NetInterfaceModeQuery) First ¶
func (nimq *NetInterfaceModeQuery) First(ctx context.Context) (*NetInterfaceMode, error)
First returns the first NetInterfaceMode entity from the query. Returns a *NotFoundError when no NetInterfaceMode was found.
func (*NetInterfaceModeQuery) FirstID ¶
func (nimq *NetInterfaceModeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NetInterfaceMode ID from the query. Returns a *NotFoundError when no NetInterfaceMode ID was found.
func (*NetInterfaceModeQuery) FirstIDX ¶
func (nimq *NetInterfaceModeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NetInterfaceModeQuery) FirstX ¶
func (nimq *NetInterfaceModeQuery) FirstX(ctx context.Context) *NetInterfaceMode
FirstX is like First, but panics if an error occurs.
func (*NetInterfaceModeQuery) GroupBy ¶
func (nimq *NetInterfaceModeQuery) GroupBy(field string, fields ...string) *NetInterfaceModeGroupBy
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 { InterfaceMode string `json:"interface_mode,omitempty"` Count int `json:"count,omitempty"` } client.NetInterfaceMode.Query(). GroupBy(netinterfacemode.FieldInterfaceMode). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NetInterfaceModeQuery) IDs ¶
func (nimq *NetInterfaceModeQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NetInterfaceMode IDs.
func (*NetInterfaceModeQuery) IDsX ¶
func (nimq *NetInterfaceModeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NetInterfaceModeQuery) Limit ¶
func (nimq *NetInterfaceModeQuery) Limit(limit int) *NetInterfaceModeQuery
Limit adds a limit step to the query.
func (*NetInterfaceModeQuery) Offset ¶
func (nimq *NetInterfaceModeQuery) Offset(offset int) *NetInterfaceModeQuery
Offset adds an offset step to the query.
func (*NetInterfaceModeQuery) Only ¶
func (nimq *NetInterfaceModeQuery) Only(ctx context.Context) (*NetInterfaceMode, error)
Only returns a single NetInterfaceMode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one NetInterfaceMode entity is not found. Returns a *NotFoundError when no NetInterfaceMode entities are found.
func (*NetInterfaceModeQuery) OnlyID ¶
func (nimq *NetInterfaceModeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NetInterfaceMode ID in the query. Returns a *NotSingularError when exactly one NetInterfaceMode ID is not found. Returns a *NotFoundError when no entities are found.
func (*NetInterfaceModeQuery) OnlyIDX ¶
func (nimq *NetInterfaceModeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NetInterfaceModeQuery) OnlyX ¶
func (nimq *NetInterfaceModeQuery) OnlyX(ctx context.Context) *NetInterfaceMode
OnlyX is like Only, but panics if an error occurs.
func (*NetInterfaceModeQuery) Order ¶
func (nimq *NetInterfaceModeQuery) Order(o ...OrderFunc) *NetInterfaceModeQuery
Order adds an order step to the query.
func (*NetInterfaceModeQuery) QueryModes ¶
func (nimq *NetInterfaceModeQuery) QueryModes() *NetInterfaceQuery
QueryModes chains the current query on the "modes" edge.
func (*NetInterfaceModeQuery) QueryPoModes ¶ added in v0.2.0
func (nimq *NetInterfaceModeQuery) QueryPoModes() *PortChannelInterfaceQuery
QueryPoModes chains the current query on the "po_modes" edge.
func (*NetInterfaceModeQuery) Select ¶
func (nimq *NetInterfaceModeQuery) Select(field string, fields ...string) *NetInterfaceModeSelect
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 { InterfaceMode string `json:"interface_mode,omitempty"` } client.NetInterfaceMode.Query(). Select(netinterfacemode.FieldInterfaceMode). Scan(ctx, &v)
func (*NetInterfaceModeQuery) Unique ¶
func (nimq *NetInterfaceModeQuery) Unique(unique bool) *NetInterfaceModeQuery
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 (*NetInterfaceModeQuery) Where ¶
func (nimq *NetInterfaceModeQuery) Where(ps ...predicate.NetInterfaceMode) *NetInterfaceModeQuery
Where adds a new predicate for the NetInterfaceModeQuery builder.
func (*NetInterfaceModeQuery) WithModes ¶
func (nimq *NetInterfaceModeQuery) WithModes(opts ...func(*NetInterfaceQuery)) *NetInterfaceModeQuery
WithModes tells the query-builder to eager-load the nodes that are connected to the "modes" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetInterfaceModeQuery) WithPoModes ¶ added in v0.2.0
func (nimq *NetInterfaceModeQuery) WithPoModes(opts ...func(*PortChannelInterfaceQuery)) *NetInterfaceModeQuery
WithPoModes tells the query-builder to eager-load the nodes that are connected to the "po_modes" edge. The optional arguments are used to configure the query builder of the edge.
type NetInterfaceModeSelect ¶
type NetInterfaceModeSelect struct { *NetInterfaceModeQuery // contains filtered or unexported fields }
NetInterfaceModeSelect is the builder for selecting fields of NetInterfaceMode entities.
func (*NetInterfaceModeSelect) Bool ¶
func (nims *NetInterfaceModeSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NetInterfaceModeSelect) BoolX ¶
func (nims *NetInterfaceModeSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetInterfaceModeSelect) Bools ¶
func (nims *NetInterfaceModeSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NetInterfaceModeSelect) BoolsX ¶
func (nims *NetInterfaceModeSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetInterfaceModeSelect) Float64 ¶
func (nims *NetInterfaceModeSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NetInterfaceModeSelect) Float64X ¶
func (nims *NetInterfaceModeSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetInterfaceModeSelect) Float64s ¶
func (nims *NetInterfaceModeSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NetInterfaceModeSelect) Float64sX ¶
func (nims *NetInterfaceModeSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetInterfaceModeSelect) Int ¶
func (nims *NetInterfaceModeSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NetInterfaceModeSelect) IntX ¶
func (nims *NetInterfaceModeSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetInterfaceModeSelect) Ints ¶
func (nims *NetInterfaceModeSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NetInterfaceModeSelect) IntsX ¶
func (nims *NetInterfaceModeSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetInterfaceModeSelect) Scan ¶
func (nims *NetInterfaceModeSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*NetInterfaceModeSelect) ScanX ¶
func (nims *NetInterfaceModeSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetInterfaceModeSelect) String ¶
func (nims *NetInterfaceModeSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*NetInterfaceModeSelect) StringX ¶
func (nims *NetInterfaceModeSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetInterfaceModeUpdate ¶
type NetInterfaceModeUpdate struct {
// contains filtered or unexported fields
}
NetInterfaceModeUpdate is the builder for updating NetInterfaceMode entities.
func (*NetInterfaceModeUpdate) AddModeIDs ¶
func (nimu *NetInterfaceModeUpdate) AddModeIDs(ids ...int) *NetInterfaceModeUpdate
AddModeIDs adds the "modes" edge to the NetInterface entity by IDs.
func (*NetInterfaceModeUpdate) AddModes ¶
func (nimu *NetInterfaceModeUpdate) AddModes(n ...*NetInterface) *NetInterfaceModeUpdate
AddModes adds the "modes" edges to the NetInterface entity.
func (*NetInterfaceModeUpdate) AddPoModeIDs ¶ added in v0.2.0
func (nimu *NetInterfaceModeUpdate) AddPoModeIDs(ids ...int) *NetInterfaceModeUpdate
AddPoModeIDs adds the "po_modes" edge to the PortChannelInterface entity by IDs.
func (*NetInterfaceModeUpdate) AddPoModes ¶ added in v0.2.0
func (nimu *NetInterfaceModeUpdate) AddPoModes(p ...*PortChannelInterface) *NetInterfaceModeUpdate
AddPoModes adds the "po_modes" edges to the PortChannelInterface entity.
func (*NetInterfaceModeUpdate) ClearModes ¶
func (nimu *NetInterfaceModeUpdate) ClearModes() *NetInterfaceModeUpdate
ClearModes clears all "modes" edges to the NetInterface entity.
func (*NetInterfaceModeUpdate) ClearPoModes ¶ added in v0.2.0
func (nimu *NetInterfaceModeUpdate) ClearPoModes() *NetInterfaceModeUpdate
ClearPoModes clears all "po_modes" edges to the PortChannelInterface entity.
func (*NetInterfaceModeUpdate) Exec ¶
func (nimu *NetInterfaceModeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NetInterfaceModeUpdate) ExecX ¶
func (nimu *NetInterfaceModeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetInterfaceModeUpdate) Mutation ¶
func (nimu *NetInterfaceModeUpdate) Mutation() *NetInterfaceModeMutation
Mutation returns the NetInterfaceModeMutation object of the builder.
func (*NetInterfaceModeUpdate) RemoveModeIDs ¶
func (nimu *NetInterfaceModeUpdate) RemoveModeIDs(ids ...int) *NetInterfaceModeUpdate
RemoveModeIDs removes the "modes" edge to NetInterface entities by IDs.
func (*NetInterfaceModeUpdate) RemoveModes ¶
func (nimu *NetInterfaceModeUpdate) RemoveModes(n ...*NetInterface) *NetInterfaceModeUpdate
RemoveModes removes "modes" edges to NetInterface entities.
func (*NetInterfaceModeUpdate) RemovePoModeIDs ¶ added in v0.2.0
func (nimu *NetInterfaceModeUpdate) RemovePoModeIDs(ids ...int) *NetInterfaceModeUpdate
RemovePoModeIDs removes the "po_modes" edge to PortChannelInterface entities by IDs.
func (*NetInterfaceModeUpdate) RemovePoModes ¶ added in v0.2.0
func (nimu *NetInterfaceModeUpdate) RemovePoModes(p ...*PortChannelInterface) *NetInterfaceModeUpdate
RemovePoModes removes "po_modes" edges to PortChannelInterface entities.
func (*NetInterfaceModeUpdate) Save ¶
func (nimu *NetInterfaceModeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NetInterfaceModeUpdate) SaveX ¶
func (nimu *NetInterfaceModeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NetInterfaceModeUpdate) SetInterfaceMode ¶
func (nimu *NetInterfaceModeUpdate) SetInterfaceMode(s string) *NetInterfaceModeUpdate
SetInterfaceMode sets the "interface_mode" field.
func (*NetInterfaceModeUpdate) Where ¶
func (nimu *NetInterfaceModeUpdate) Where(ps ...predicate.NetInterfaceMode) *NetInterfaceModeUpdate
Where adds a new predicate for the NetInterfaceModeUpdate builder.
type NetInterfaceModeUpdateOne ¶
type NetInterfaceModeUpdateOne struct {
// contains filtered or unexported fields
}
NetInterfaceModeUpdateOne is the builder for updating a single NetInterfaceMode entity.
func (*NetInterfaceModeUpdateOne) AddModeIDs ¶
func (nimuo *NetInterfaceModeUpdateOne) AddModeIDs(ids ...int) *NetInterfaceModeUpdateOne
AddModeIDs adds the "modes" edge to the NetInterface entity by IDs.
func (*NetInterfaceModeUpdateOne) AddModes ¶
func (nimuo *NetInterfaceModeUpdateOne) AddModes(n ...*NetInterface) *NetInterfaceModeUpdateOne
AddModes adds the "modes" edges to the NetInterface entity.
func (*NetInterfaceModeUpdateOne) AddPoModeIDs ¶ added in v0.2.0
func (nimuo *NetInterfaceModeUpdateOne) AddPoModeIDs(ids ...int) *NetInterfaceModeUpdateOne
AddPoModeIDs adds the "po_modes" edge to the PortChannelInterface entity by IDs.
func (*NetInterfaceModeUpdateOne) AddPoModes ¶ added in v0.2.0
func (nimuo *NetInterfaceModeUpdateOne) AddPoModes(p ...*PortChannelInterface) *NetInterfaceModeUpdateOne
AddPoModes adds the "po_modes" edges to the PortChannelInterface entity.
func (*NetInterfaceModeUpdateOne) ClearModes ¶
func (nimuo *NetInterfaceModeUpdateOne) ClearModes() *NetInterfaceModeUpdateOne
ClearModes clears all "modes" edges to the NetInterface entity.
func (*NetInterfaceModeUpdateOne) ClearPoModes ¶ added in v0.2.0
func (nimuo *NetInterfaceModeUpdateOne) ClearPoModes() *NetInterfaceModeUpdateOne
ClearPoModes clears all "po_modes" edges to the PortChannelInterface entity.
func (*NetInterfaceModeUpdateOne) Exec ¶
func (nimuo *NetInterfaceModeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NetInterfaceModeUpdateOne) ExecX ¶
func (nimuo *NetInterfaceModeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetInterfaceModeUpdateOne) Mutation ¶
func (nimuo *NetInterfaceModeUpdateOne) Mutation() *NetInterfaceModeMutation
Mutation returns the NetInterfaceModeMutation object of the builder.
func (*NetInterfaceModeUpdateOne) RemoveModeIDs ¶
func (nimuo *NetInterfaceModeUpdateOne) RemoveModeIDs(ids ...int) *NetInterfaceModeUpdateOne
RemoveModeIDs removes the "modes" edge to NetInterface entities by IDs.
func (*NetInterfaceModeUpdateOne) RemoveModes ¶
func (nimuo *NetInterfaceModeUpdateOne) RemoveModes(n ...*NetInterface) *NetInterfaceModeUpdateOne
RemoveModes removes "modes" edges to NetInterface entities.
func (*NetInterfaceModeUpdateOne) RemovePoModeIDs ¶ added in v0.2.0
func (nimuo *NetInterfaceModeUpdateOne) RemovePoModeIDs(ids ...int) *NetInterfaceModeUpdateOne
RemovePoModeIDs removes the "po_modes" edge to PortChannelInterface entities by IDs.
func (*NetInterfaceModeUpdateOne) RemovePoModes ¶ added in v0.2.0
func (nimuo *NetInterfaceModeUpdateOne) RemovePoModes(p ...*PortChannelInterface) *NetInterfaceModeUpdateOne
RemovePoModes removes "po_modes" edges to PortChannelInterface entities.
func (*NetInterfaceModeUpdateOne) Save ¶
func (nimuo *NetInterfaceModeUpdateOne) Save(ctx context.Context) (*NetInterfaceMode, error)
Save executes the query and returns the updated NetInterfaceMode entity.
func (*NetInterfaceModeUpdateOne) SaveX ¶
func (nimuo *NetInterfaceModeUpdateOne) SaveX(ctx context.Context) *NetInterfaceMode
SaveX is like Save, but panics if an error occurs.
func (*NetInterfaceModeUpdateOne) Select ¶
func (nimuo *NetInterfaceModeUpdateOne) Select(field string, fields ...string) *NetInterfaceModeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NetInterfaceModeUpdateOne) SetInterfaceMode ¶
func (nimuo *NetInterfaceModeUpdateOne) SetInterfaceMode(s string) *NetInterfaceModeUpdateOne
SetInterfaceMode sets the "interface_mode" field.
type NetInterfaceModes ¶
type NetInterfaceModes []*NetInterfaceMode
NetInterfaceModes is a parsable slice of NetInterfaceMode.
type NetInterfaceMutation ¶
type NetInterfaceMutation struct {
// contains filtered or unexported fields
}
NetInterfaceMutation represents an operation that mutates the NetInterface nodes in the graph.
func (*NetInterfaceMutation) AddField ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) AddHaveVlanIDs ¶
func (m *NetInterfaceMutation) AddHaveVlanIDs(ids ...int)
AddHaveVlanIDs adds the "have_vlans" edge to the Vlan entity by ids.
func (*NetInterfaceMutation) AddIPStaticRoutingIDs ¶ added in v0.2.0
func (m *NetInterfaceMutation) AddIPStaticRoutingIDs(ids ...int)
AddIPStaticRoutingIDs adds the "ip_static_routing" edge to the IPStaticRoutingTable entity by ids.
func (*NetInterfaceMutation) AddedEdges ¶
func (m *NetInterfaceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NetInterfaceMutation) AddedField ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) AddedFields ¶
func (m *NetInterfaceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NetInterfaceMutation) AddedIDs ¶
func (m *NetInterfaceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NetInterfaceMutation) ClearEdge ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) ClearField ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) ClearHaveVlans ¶
func (m *NetInterfaceMutation) ClearHaveVlans()
ClearHaveVlans clears the "have_vlans" edge to the Vlan entity.
func (*NetInterfaceMutation) ClearIPStaticRouting ¶ added in v0.2.0
func (m *NetInterfaceMutation) ClearIPStaticRouting()
ClearIPStaticRouting clears the "ip_static_routing" edge to the IPStaticRoutingTable entity.
func (*NetInterfaceMutation) ClearMode ¶
func (m *NetInterfaceMutation) ClearMode()
ClearMode clears the "mode" edge to the NetInterfaceMode entity.
func (*NetInterfaceMutation) ClearNativeOnVlan ¶
func (m *NetInterfaceMutation) ClearNativeOnVlan()
ClearNativeOnVlan clears the "native_on_vlan" edge to the Vlan entity.
func (*NetInterfaceMutation) ClearOnDevice ¶
func (m *NetInterfaceMutation) ClearOnDevice()
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*NetInterfaceMutation) ClearOnIPAddress ¶ added in v0.2.0
func (m *NetInterfaceMutation) ClearOnIPAddress()
ClearOnIPAddress clears the "on_ip_address" edge to the IPAddress entity.
func (*NetInterfaceMutation) ClearOnLayer ¶ added in v0.2.0
func (m *NetInterfaceMutation) ClearOnLayer()
ClearOnLayer clears the "on_layer" edge to the NetInterfaceLayer entity.
func (*NetInterfaceMutation) ClearOnPoInterface ¶ added in v0.2.0
func (m *NetInterfaceMutation) ClearOnPoInterface()
ClearOnPoInterface clears the "on_po_interface" edge to the PortChannelInterface entity.
func (*NetInterfaceMutation) ClearedEdges ¶
func (m *NetInterfaceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NetInterfaceMutation) ClearedFields ¶
func (m *NetInterfaceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NetInterfaceMutation) Client ¶
func (m NetInterfaceMutation) 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 (*NetInterfaceMutation) EdgeCleared ¶
func (m *NetInterfaceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NetInterfaceMutation) Field ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) FieldCleared ¶
func (m *NetInterfaceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NetInterfaceMutation) Fields ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) HaveVlansCleared ¶
func (m *NetInterfaceMutation) HaveVlansCleared() bool
HaveVlansCleared reports if the "have_vlans" edge to the Vlan entity was cleared.
func (*NetInterfaceMutation) HaveVlansIDs ¶
func (m *NetInterfaceMutation) HaveVlansIDs() (ids []int)
HaveVlansIDs returns the "have_vlans" edge IDs in the mutation.
func (*NetInterfaceMutation) ID ¶
func (m *NetInterfaceMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*NetInterfaceMutation) IPStaticRoutingCleared ¶ added in v0.2.0
func (m *NetInterfaceMutation) IPStaticRoutingCleared() bool
IPStaticRoutingCleared reports if the "ip_static_routing" edge to the IPStaticRoutingTable entity was cleared.
func (*NetInterfaceMutation) IPStaticRoutingIDs ¶ added in v0.2.0
func (m *NetInterfaceMutation) IPStaticRoutingIDs() (ids []int)
IPStaticRoutingIDs returns the "ip_static_routing" edge IDs in the mutation.
func (*NetInterfaceMutation) InterfaceName ¶
func (m *NetInterfaceMutation) InterfaceName() (r string, exists bool)
InterfaceName returns the value of the "interface_name" field in the mutation.
func (*NetInterfaceMutation) InterfaceShutdown ¶
func (m *NetInterfaceMutation) InterfaceShutdown() (r bool, exists bool)
InterfaceShutdown returns the value of the "interface_shutdown" field in the mutation.
func (*NetInterfaceMutation) ModeCleared ¶
func (m *NetInterfaceMutation) ModeCleared() bool
ModeCleared reports if the "mode" edge to the NetInterfaceMode entity was cleared.
func (*NetInterfaceMutation) ModeID ¶
func (m *NetInterfaceMutation) ModeID() (id int, exists bool)
ModeID returns the "mode" edge ID in the mutation.
func (*NetInterfaceMutation) ModeIDs ¶
func (m *NetInterfaceMutation) ModeIDs() (ids []int)
ModeIDs returns the "mode" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ModeID instead. It exists only for internal usage by the builders.
func (*NetInterfaceMutation) NativeOnVlanCleared ¶
func (m *NetInterfaceMutation) NativeOnVlanCleared() bool
NativeOnVlanCleared reports if the "native_on_vlan" edge to the Vlan entity was cleared.
func (*NetInterfaceMutation) NativeOnVlanID ¶
func (m *NetInterfaceMutation) NativeOnVlanID() (id int, exists bool)
NativeOnVlanID returns the "native_on_vlan" edge ID in the mutation.
func (*NetInterfaceMutation) NativeOnVlanIDs ¶
func (m *NetInterfaceMutation) NativeOnVlanIDs() (ids []int)
NativeOnVlanIDs returns the "native_on_vlan" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NativeOnVlanID instead. It exists only for internal usage by the builders.
func (*NetInterfaceMutation) 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 (*NetInterfaceMutation) OldInterfaceName ¶
func (m *NetInterfaceMutation) OldInterfaceName(ctx context.Context) (v string, err error)
OldInterfaceName returns the old "interface_name" field's value of the NetInterface entity. If the NetInterface object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NetInterfaceMutation) OldInterfaceShutdown ¶
func (m *NetInterfaceMutation) OldInterfaceShutdown(ctx context.Context) (v bool, err error)
OldInterfaceShutdown returns the old "interface_shutdown" field's value of the NetInterface entity. If the NetInterface object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NetInterfaceMutation) OnDeviceCleared ¶
func (m *NetInterfaceMutation) OnDeviceCleared() bool
OnDeviceCleared reports if the "on_device" edge to the Device entity was cleared.
func (*NetInterfaceMutation) OnDeviceID ¶
func (m *NetInterfaceMutation) OnDeviceID() (id int, exists bool)
OnDeviceID returns the "on_device" edge ID in the mutation.
func (*NetInterfaceMutation) OnDeviceIDs ¶
func (m *NetInterfaceMutation) OnDeviceIDs() (ids []int)
OnDeviceIDs returns the "on_device" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnDeviceID instead. It exists only for internal usage by the builders.
func (*NetInterfaceMutation) OnIPAddressCleared ¶ added in v0.2.0
func (m *NetInterfaceMutation) OnIPAddressCleared() bool
OnIPAddressCleared reports if the "on_ip_address" edge to the IPAddress entity was cleared.
func (*NetInterfaceMutation) OnIPAddressID ¶ added in v0.2.0
func (m *NetInterfaceMutation) OnIPAddressID() (id int, exists bool)
OnIPAddressID returns the "on_ip_address" edge ID in the mutation.
func (*NetInterfaceMutation) OnIPAddressIDs ¶ added in v0.2.0
func (m *NetInterfaceMutation) OnIPAddressIDs() (ids []int)
OnIPAddressIDs returns the "on_ip_address" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnIPAddressID instead. It exists only for internal usage by the builders.
func (*NetInterfaceMutation) OnLayerCleared ¶ added in v0.2.0
func (m *NetInterfaceMutation) OnLayerCleared() bool
OnLayerCleared reports if the "on_layer" edge to the NetInterfaceLayer entity was cleared.
func (*NetInterfaceMutation) OnLayerID ¶ added in v0.2.0
func (m *NetInterfaceMutation) OnLayerID() (id int, exists bool)
OnLayerID returns the "on_layer" edge ID in the mutation.
func (*NetInterfaceMutation) OnLayerIDs ¶ added in v0.2.0
func (m *NetInterfaceMutation) OnLayerIDs() (ids []int)
OnLayerIDs returns the "on_layer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnLayerID instead. It exists only for internal usage by the builders.
func (*NetInterfaceMutation) OnPoInterfaceCleared ¶ added in v0.2.0
func (m *NetInterfaceMutation) OnPoInterfaceCleared() bool
OnPoInterfaceCleared reports if the "on_po_interface" edge to the PortChannelInterface entity was cleared.
func (*NetInterfaceMutation) OnPoInterfaceID ¶ added in v0.2.0
func (m *NetInterfaceMutation) OnPoInterfaceID() (id int, exists bool)
OnPoInterfaceID returns the "on_po_interface" edge ID in the mutation.
func (*NetInterfaceMutation) OnPoInterfaceIDs ¶ added in v0.2.0
func (m *NetInterfaceMutation) OnPoInterfaceIDs() (ids []int)
OnPoInterfaceIDs returns the "on_po_interface" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnPoInterfaceID instead. It exists only for internal usage by the builders.
func (*NetInterfaceMutation) Op ¶
func (m *NetInterfaceMutation) Op() Op
Op returns the operation name.
func (*NetInterfaceMutation) RemoveHaveVlanIDs ¶
func (m *NetInterfaceMutation) RemoveHaveVlanIDs(ids ...int)
RemoveHaveVlanIDs removes the "have_vlans" edge to the Vlan entity by IDs.
func (*NetInterfaceMutation) RemoveIPStaticRoutingIDs ¶ added in v0.2.0
func (m *NetInterfaceMutation) RemoveIPStaticRoutingIDs(ids ...int)
RemoveIPStaticRoutingIDs removes the "ip_static_routing" edge to the IPStaticRoutingTable entity by IDs.
func (*NetInterfaceMutation) RemovedEdges ¶
func (m *NetInterfaceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NetInterfaceMutation) RemovedHaveVlansIDs ¶
func (m *NetInterfaceMutation) RemovedHaveVlansIDs() (ids []int)
RemovedHaveVlans returns the removed IDs of the "have_vlans" edge to the Vlan entity.
func (*NetInterfaceMutation) RemovedIDs ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) RemovedIPStaticRoutingIDs ¶ added in v0.2.0
func (m *NetInterfaceMutation) RemovedIPStaticRoutingIDs() (ids []int)
RemovedIPStaticRouting returns the removed IDs of the "ip_static_routing" edge to the IPStaticRoutingTable entity.
func (*NetInterfaceMutation) ResetEdge ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) ResetField ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) ResetHaveVlans ¶
func (m *NetInterfaceMutation) ResetHaveVlans()
ResetHaveVlans resets all changes to the "have_vlans" edge.
func (*NetInterfaceMutation) ResetIPStaticRouting ¶ added in v0.2.0
func (m *NetInterfaceMutation) ResetIPStaticRouting()
ResetIPStaticRouting resets all changes to the "ip_static_routing" edge.
func (*NetInterfaceMutation) ResetInterfaceName ¶
func (m *NetInterfaceMutation) ResetInterfaceName()
ResetInterfaceName resets all changes to the "interface_name" field.
func (*NetInterfaceMutation) ResetInterfaceShutdown ¶
func (m *NetInterfaceMutation) ResetInterfaceShutdown()
ResetInterfaceShutdown resets all changes to the "interface_shutdown" field.
func (*NetInterfaceMutation) ResetMode ¶
func (m *NetInterfaceMutation) ResetMode()
ResetMode resets all changes to the "mode" edge.
func (*NetInterfaceMutation) ResetNativeOnVlan ¶
func (m *NetInterfaceMutation) ResetNativeOnVlan()
ResetNativeOnVlan resets all changes to the "native_on_vlan" edge.
func (*NetInterfaceMutation) ResetOnDevice ¶
func (m *NetInterfaceMutation) ResetOnDevice()
ResetOnDevice resets all changes to the "on_device" edge.
func (*NetInterfaceMutation) ResetOnIPAddress ¶ added in v0.2.0
func (m *NetInterfaceMutation) ResetOnIPAddress()
ResetOnIPAddress resets all changes to the "on_ip_address" edge.
func (*NetInterfaceMutation) ResetOnLayer ¶ added in v0.2.0
func (m *NetInterfaceMutation) ResetOnLayer()
ResetOnLayer resets all changes to the "on_layer" edge.
func (*NetInterfaceMutation) ResetOnPoInterface ¶ added in v0.2.0
func (m *NetInterfaceMutation) ResetOnPoInterface()
ResetOnPoInterface resets all changes to the "on_po_interface" edge.
func (*NetInterfaceMutation) SetField ¶
func (m *NetInterfaceMutation) 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 (*NetInterfaceMutation) SetInterfaceName ¶
func (m *NetInterfaceMutation) SetInterfaceName(s string)
SetInterfaceName sets the "interface_name" field.
func (*NetInterfaceMutation) SetInterfaceShutdown ¶
func (m *NetInterfaceMutation) SetInterfaceShutdown(b bool)
SetInterfaceShutdown sets the "interface_shutdown" field.
func (*NetInterfaceMutation) SetModeID ¶
func (m *NetInterfaceMutation) SetModeID(id int)
SetModeID sets the "mode" edge to the NetInterfaceMode entity by id.
func (*NetInterfaceMutation) SetNativeOnVlanID ¶
func (m *NetInterfaceMutation) SetNativeOnVlanID(id int)
SetNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by id.
func (*NetInterfaceMutation) SetOnDeviceID ¶
func (m *NetInterfaceMutation) SetOnDeviceID(id int)
SetOnDeviceID sets the "on_device" edge to the Device entity by id.
func (*NetInterfaceMutation) SetOnIPAddressID ¶ added in v0.2.0
func (m *NetInterfaceMutation) SetOnIPAddressID(id int)
SetOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by id.
func (*NetInterfaceMutation) SetOnLayerID ¶ added in v0.2.0
func (m *NetInterfaceMutation) SetOnLayerID(id int)
SetOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by id.
func (*NetInterfaceMutation) SetOnPoInterfaceID ¶ added in v0.2.0
func (m *NetInterfaceMutation) SetOnPoInterfaceID(id int)
SetOnPoInterfaceID sets the "on_po_interface" edge to the PortChannelInterface entity by id.
func (NetInterfaceMutation) Tx ¶
func (m NetInterfaceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NetInterfaceMutation) Type ¶
func (m *NetInterfaceMutation) Type() string
Type returns the node type of this mutation (NetInterface).
type NetInterfaceQuery ¶
type NetInterfaceQuery struct {
// contains filtered or unexported fields
}
NetInterfaceQuery is the builder for querying NetInterface entities.
func (*NetInterfaceQuery) All ¶
func (niq *NetInterfaceQuery) All(ctx context.Context) ([]*NetInterface, error)
All executes the query and returns a list of NetInterfaces.
func (*NetInterfaceQuery) AllX ¶
func (niq *NetInterfaceQuery) AllX(ctx context.Context) []*NetInterface
AllX is like All, but panics if an error occurs.
func (*NetInterfaceQuery) Clone ¶
func (niq *NetInterfaceQuery) Clone() *NetInterfaceQuery
Clone returns a duplicate of the NetInterfaceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NetInterfaceQuery) Count ¶
func (niq *NetInterfaceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NetInterfaceQuery) CountX ¶
func (niq *NetInterfaceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NetInterfaceQuery) Exist ¶
func (niq *NetInterfaceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NetInterfaceQuery) ExistX ¶
func (niq *NetInterfaceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NetInterfaceQuery) First ¶
func (niq *NetInterfaceQuery) First(ctx context.Context) (*NetInterface, error)
First returns the first NetInterface entity from the query. Returns a *NotFoundError when no NetInterface was found.
func (*NetInterfaceQuery) FirstID ¶
func (niq *NetInterfaceQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NetInterface ID from the query. Returns a *NotFoundError when no NetInterface ID was found.
func (*NetInterfaceQuery) FirstIDX ¶
func (niq *NetInterfaceQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NetInterfaceQuery) FirstX ¶
func (niq *NetInterfaceQuery) FirstX(ctx context.Context) *NetInterface
FirstX is like First, but panics if an error occurs.
func (*NetInterfaceQuery) GroupBy ¶
func (niq *NetInterfaceQuery) GroupBy(field string, fields ...string) *NetInterfaceGroupBy
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 { InterfaceName string `json:"interface_name,omitempty"` Count int `json:"count,omitempty"` } client.NetInterface.Query(). GroupBy(netinterface.FieldInterfaceName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NetInterfaceQuery) IDs ¶
func (niq *NetInterfaceQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NetInterface IDs.
func (*NetInterfaceQuery) IDsX ¶
func (niq *NetInterfaceQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NetInterfaceQuery) Limit ¶
func (niq *NetInterfaceQuery) Limit(limit int) *NetInterfaceQuery
Limit adds a limit step to the query.
func (*NetInterfaceQuery) Offset ¶
func (niq *NetInterfaceQuery) Offset(offset int) *NetInterfaceQuery
Offset adds an offset step to the query.
func (*NetInterfaceQuery) Only ¶
func (niq *NetInterfaceQuery) Only(ctx context.Context) (*NetInterface, error)
Only returns a single NetInterface entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one NetInterface entity is not found. Returns a *NotFoundError when no NetInterface entities are found.
func (*NetInterfaceQuery) OnlyID ¶
func (niq *NetInterfaceQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NetInterface ID in the query. Returns a *NotSingularError when exactly one NetInterface ID is not found. Returns a *NotFoundError when no entities are found.
func (*NetInterfaceQuery) OnlyIDX ¶
func (niq *NetInterfaceQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NetInterfaceQuery) OnlyX ¶
func (niq *NetInterfaceQuery) OnlyX(ctx context.Context) *NetInterface
OnlyX is like Only, but panics if an error occurs.
func (*NetInterfaceQuery) Order ¶
func (niq *NetInterfaceQuery) Order(o ...OrderFunc) *NetInterfaceQuery
Order adds an order step to the query.
func (*NetInterfaceQuery) QueryHaveVlans ¶
func (niq *NetInterfaceQuery) QueryHaveVlans() *VlanQuery
QueryHaveVlans chains the current query on the "have_vlans" edge.
func (*NetInterfaceQuery) QueryIPStaticRouting ¶ added in v0.2.0
func (niq *NetInterfaceQuery) QueryIPStaticRouting() *IPStaticRoutingTableQuery
QueryIPStaticRouting chains the current query on the "ip_static_routing" edge.
func (*NetInterfaceQuery) QueryMode ¶
func (niq *NetInterfaceQuery) QueryMode() *NetInterfaceModeQuery
QueryMode chains the current query on the "mode" edge.
func (*NetInterfaceQuery) QueryNativeOnVlan ¶
func (niq *NetInterfaceQuery) QueryNativeOnVlan() *VlanQuery
QueryNativeOnVlan chains the current query on the "native_on_vlan" edge.
func (*NetInterfaceQuery) QueryOnDevice ¶
func (niq *NetInterfaceQuery) QueryOnDevice() *DeviceQuery
QueryOnDevice chains the current query on the "on_device" edge.
func (*NetInterfaceQuery) QueryOnIPAddress ¶ added in v0.2.0
func (niq *NetInterfaceQuery) QueryOnIPAddress() *IPAddressQuery
QueryOnIPAddress chains the current query on the "on_ip_address" edge.
func (*NetInterfaceQuery) QueryOnLayer ¶ added in v0.2.0
func (niq *NetInterfaceQuery) QueryOnLayer() *NetInterfaceLayerQuery
QueryOnLayer chains the current query on the "on_layer" edge.
func (*NetInterfaceQuery) QueryOnPoInterface ¶ added in v0.2.0
func (niq *NetInterfaceQuery) QueryOnPoInterface() *PortChannelInterfaceQuery
QueryOnPoInterface chains the current query on the "on_po_interface" edge.
func (*NetInterfaceQuery) Select ¶
func (niq *NetInterfaceQuery) Select(field string, fields ...string) *NetInterfaceSelect
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 { InterfaceName string `json:"interface_name,omitempty"` } client.NetInterface.Query(). Select(netinterface.FieldInterfaceName). Scan(ctx, &v)
func (*NetInterfaceQuery) Unique ¶
func (niq *NetInterfaceQuery) Unique(unique bool) *NetInterfaceQuery
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 (*NetInterfaceQuery) Where ¶
func (niq *NetInterfaceQuery) Where(ps ...predicate.NetInterface) *NetInterfaceQuery
Where adds a new predicate for the NetInterfaceQuery builder.
func (*NetInterfaceQuery) WithHaveVlans ¶
func (niq *NetInterfaceQuery) WithHaveVlans(opts ...func(*VlanQuery)) *NetInterfaceQuery
WithHaveVlans tells the query-builder to eager-load the nodes that are connected to the "have_vlans" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetInterfaceQuery) WithIPStaticRouting ¶ added in v0.2.0
func (niq *NetInterfaceQuery) WithIPStaticRouting(opts ...func(*IPStaticRoutingTableQuery)) *NetInterfaceQuery
WithIPStaticRouting tells the query-builder to eager-load the nodes that are connected to the "ip_static_routing" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetInterfaceQuery) WithMode ¶
func (niq *NetInterfaceQuery) WithMode(opts ...func(*NetInterfaceModeQuery)) *NetInterfaceQuery
WithMode tells the query-builder to eager-load the nodes that are connected to the "mode" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetInterfaceQuery) WithNativeOnVlan ¶
func (niq *NetInterfaceQuery) WithNativeOnVlan(opts ...func(*VlanQuery)) *NetInterfaceQuery
WithNativeOnVlan tells the query-builder to eager-load the nodes that are connected to the "native_on_vlan" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetInterfaceQuery) WithOnDevice ¶
func (niq *NetInterfaceQuery) WithOnDevice(opts ...func(*DeviceQuery)) *NetInterfaceQuery
WithOnDevice tells the query-builder to eager-load the nodes that are connected to the "on_device" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetInterfaceQuery) WithOnIPAddress ¶ added in v0.2.0
func (niq *NetInterfaceQuery) WithOnIPAddress(opts ...func(*IPAddressQuery)) *NetInterfaceQuery
WithOnIPAddress tells the query-builder to eager-load the nodes that are connected to the "on_ip_address" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetInterfaceQuery) WithOnLayer ¶ added in v0.2.0
func (niq *NetInterfaceQuery) WithOnLayer(opts ...func(*NetInterfaceLayerQuery)) *NetInterfaceQuery
WithOnLayer tells the query-builder to eager-load the nodes that are connected to the "on_layer" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetInterfaceQuery) WithOnPoInterface ¶ added in v0.2.0
func (niq *NetInterfaceQuery) WithOnPoInterface(opts ...func(*PortChannelInterfaceQuery)) *NetInterfaceQuery
WithOnPoInterface tells the query-builder to eager-load the nodes that are connected to the "on_po_interface" edge. The optional arguments are used to configure the query builder of the edge.
type NetInterfaceSelect ¶
type NetInterfaceSelect struct { *NetInterfaceQuery // contains filtered or unexported fields }
NetInterfaceSelect is the builder for selecting fields of NetInterface entities.
func (*NetInterfaceSelect) Bool ¶
func (nis *NetInterfaceSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NetInterfaceSelect) BoolX ¶
func (nis *NetInterfaceSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetInterfaceSelect) Bools ¶
func (nis *NetInterfaceSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NetInterfaceSelect) BoolsX ¶
func (nis *NetInterfaceSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetInterfaceSelect) Float64 ¶
func (nis *NetInterfaceSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NetInterfaceSelect) Float64X ¶
func (nis *NetInterfaceSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetInterfaceSelect) Float64s ¶
func (nis *NetInterfaceSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NetInterfaceSelect) Float64sX ¶
func (nis *NetInterfaceSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetInterfaceSelect) Int ¶
func (nis *NetInterfaceSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NetInterfaceSelect) IntX ¶
func (nis *NetInterfaceSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetInterfaceSelect) Ints ¶
func (nis *NetInterfaceSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NetInterfaceSelect) IntsX ¶
func (nis *NetInterfaceSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetInterfaceSelect) Scan ¶
func (nis *NetInterfaceSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*NetInterfaceSelect) ScanX ¶
func (nis *NetInterfaceSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetInterfaceSelect) String ¶
func (nis *NetInterfaceSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*NetInterfaceSelect) StringX ¶
func (nis *NetInterfaceSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetInterfaceUpdate ¶
type NetInterfaceUpdate struct {
// contains filtered or unexported fields
}
NetInterfaceUpdate is the builder for updating NetInterface entities.
func (*NetInterfaceUpdate) AddHaveVlanIDs ¶
func (niu *NetInterfaceUpdate) AddHaveVlanIDs(ids ...int) *NetInterfaceUpdate
AddHaveVlanIDs adds the "have_vlans" edge to the Vlan entity by IDs.
func (*NetInterfaceUpdate) AddHaveVlans ¶
func (niu *NetInterfaceUpdate) AddHaveVlans(v ...*Vlan) *NetInterfaceUpdate
AddHaveVlans adds the "have_vlans" edges to the Vlan entity.
func (*NetInterfaceUpdate) AddIPStaticRouting ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) AddIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceUpdate
AddIPStaticRouting adds the "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*NetInterfaceUpdate) AddIPStaticRoutingIDs ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) AddIPStaticRoutingIDs(ids ...int) *NetInterfaceUpdate
AddIPStaticRoutingIDs adds the "ip_static_routing" edge to the IPStaticRoutingTable entity by IDs.
func (*NetInterfaceUpdate) ClearHaveVlans ¶
func (niu *NetInterfaceUpdate) ClearHaveVlans() *NetInterfaceUpdate
ClearHaveVlans clears all "have_vlans" edges to the Vlan entity.
func (*NetInterfaceUpdate) ClearIPStaticRouting ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) ClearIPStaticRouting() *NetInterfaceUpdate
ClearIPStaticRouting clears all "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*NetInterfaceUpdate) ClearMode ¶
func (niu *NetInterfaceUpdate) ClearMode() *NetInterfaceUpdate
ClearMode clears the "mode" edge to the NetInterfaceMode entity.
func (*NetInterfaceUpdate) ClearNativeOnVlan ¶
func (niu *NetInterfaceUpdate) ClearNativeOnVlan() *NetInterfaceUpdate
ClearNativeOnVlan clears the "native_on_vlan" edge to the Vlan entity.
func (*NetInterfaceUpdate) ClearOnDevice ¶
func (niu *NetInterfaceUpdate) ClearOnDevice() *NetInterfaceUpdate
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*NetInterfaceUpdate) ClearOnIPAddress ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) ClearOnIPAddress() *NetInterfaceUpdate
ClearOnIPAddress clears the "on_ip_address" edge to the IPAddress entity.
func (*NetInterfaceUpdate) ClearOnLayer ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) ClearOnLayer() *NetInterfaceUpdate
ClearOnLayer clears the "on_layer" edge to the NetInterfaceLayer entity.
func (*NetInterfaceUpdate) ClearOnPoInterface ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) ClearOnPoInterface() *NetInterfaceUpdate
ClearOnPoInterface clears the "on_po_interface" edge to the PortChannelInterface entity.
func (*NetInterfaceUpdate) Exec ¶
func (niu *NetInterfaceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NetInterfaceUpdate) ExecX ¶
func (niu *NetInterfaceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetInterfaceUpdate) Mutation ¶
func (niu *NetInterfaceUpdate) Mutation() *NetInterfaceMutation
Mutation returns the NetInterfaceMutation object of the builder.
func (*NetInterfaceUpdate) RemoveHaveVlanIDs ¶
func (niu *NetInterfaceUpdate) RemoveHaveVlanIDs(ids ...int) *NetInterfaceUpdate
RemoveHaveVlanIDs removes the "have_vlans" edge to Vlan entities by IDs.
func (*NetInterfaceUpdate) RemoveHaveVlans ¶
func (niu *NetInterfaceUpdate) RemoveHaveVlans(v ...*Vlan) *NetInterfaceUpdate
RemoveHaveVlans removes "have_vlans" edges to Vlan entities.
func (*NetInterfaceUpdate) RemoveIPStaticRouting ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) RemoveIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceUpdate
RemoveIPStaticRouting removes "ip_static_routing" edges to IPStaticRoutingTable entities.
func (*NetInterfaceUpdate) RemoveIPStaticRoutingIDs ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) RemoveIPStaticRoutingIDs(ids ...int) *NetInterfaceUpdate
RemoveIPStaticRoutingIDs removes the "ip_static_routing" edge to IPStaticRoutingTable entities by IDs.
func (*NetInterfaceUpdate) Save ¶
func (niu *NetInterfaceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NetInterfaceUpdate) SaveX ¶
func (niu *NetInterfaceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NetInterfaceUpdate) SetInterfaceName ¶
func (niu *NetInterfaceUpdate) SetInterfaceName(s string) *NetInterfaceUpdate
SetInterfaceName sets the "interface_name" field.
func (*NetInterfaceUpdate) SetInterfaceShutdown ¶
func (niu *NetInterfaceUpdate) SetInterfaceShutdown(b bool) *NetInterfaceUpdate
SetInterfaceShutdown sets the "interface_shutdown" field.
func (*NetInterfaceUpdate) SetMode ¶
func (niu *NetInterfaceUpdate) SetMode(n *NetInterfaceMode) *NetInterfaceUpdate
SetMode sets the "mode" edge to the NetInterfaceMode entity.
func (*NetInterfaceUpdate) SetModeID ¶
func (niu *NetInterfaceUpdate) SetModeID(id int) *NetInterfaceUpdate
SetModeID sets the "mode" edge to the NetInterfaceMode entity by ID.
func (*NetInterfaceUpdate) SetNativeOnVlan ¶
func (niu *NetInterfaceUpdate) SetNativeOnVlan(v *Vlan) *NetInterfaceUpdate
SetNativeOnVlan sets the "native_on_vlan" edge to the Vlan entity.
func (*NetInterfaceUpdate) SetNativeOnVlanID ¶
func (niu *NetInterfaceUpdate) SetNativeOnVlanID(id int) *NetInterfaceUpdate
SetNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID.
func (*NetInterfaceUpdate) SetNillableInterfaceShutdown ¶
func (niu *NetInterfaceUpdate) SetNillableInterfaceShutdown(b *bool) *NetInterfaceUpdate
SetNillableInterfaceShutdown sets the "interface_shutdown" field if the given value is not nil.
func (*NetInterfaceUpdate) SetNillableModeID ¶
func (niu *NetInterfaceUpdate) SetNillableModeID(id *int) *NetInterfaceUpdate
SetNillableModeID sets the "mode" edge to the NetInterfaceMode entity by ID if the given value is not nil.
func (*NetInterfaceUpdate) SetNillableNativeOnVlanID ¶
func (niu *NetInterfaceUpdate) SetNillableNativeOnVlanID(id *int) *NetInterfaceUpdate
SetNillableNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID if the given value is not nil.
func (*NetInterfaceUpdate) SetNillableOnDeviceID ¶
func (niu *NetInterfaceUpdate) SetNillableOnDeviceID(id *int) *NetInterfaceUpdate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*NetInterfaceUpdate) SetNillableOnIPAddressID ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) SetNillableOnIPAddressID(id *int) *NetInterfaceUpdate
SetNillableOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID if the given value is not nil.
func (*NetInterfaceUpdate) SetNillableOnLayerID ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) SetNillableOnLayerID(id *int) *NetInterfaceUpdate
SetNillableOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID if the given value is not nil.
func (*NetInterfaceUpdate) SetNillableOnPoInterfaceID ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) SetNillableOnPoInterfaceID(id *int) *NetInterfaceUpdate
SetNillableOnPoInterfaceID sets the "on_po_interface" edge to the PortChannelInterface entity by ID if the given value is not nil.
func (*NetInterfaceUpdate) SetOnDevice ¶
func (niu *NetInterfaceUpdate) SetOnDevice(d *Device) *NetInterfaceUpdate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*NetInterfaceUpdate) SetOnDeviceID ¶
func (niu *NetInterfaceUpdate) SetOnDeviceID(id int) *NetInterfaceUpdate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*NetInterfaceUpdate) SetOnIPAddress ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) SetOnIPAddress(i *IPAddress) *NetInterfaceUpdate
SetOnIPAddress sets the "on_ip_address" edge to the IPAddress entity.
func (*NetInterfaceUpdate) SetOnIPAddressID ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) SetOnIPAddressID(id int) *NetInterfaceUpdate
SetOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID.
func (*NetInterfaceUpdate) SetOnLayer ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) SetOnLayer(n *NetInterfaceLayer) *NetInterfaceUpdate
SetOnLayer sets the "on_layer" edge to the NetInterfaceLayer entity.
func (*NetInterfaceUpdate) SetOnLayerID ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) SetOnLayerID(id int) *NetInterfaceUpdate
SetOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID.
func (*NetInterfaceUpdate) SetOnPoInterface ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) SetOnPoInterface(p *PortChannelInterface) *NetInterfaceUpdate
SetOnPoInterface sets the "on_po_interface" edge to the PortChannelInterface entity.
func (*NetInterfaceUpdate) SetOnPoInterfaceID ¶ added in v0.2.0
func (niu *NetInterfaceUpdate) SetOnPoInterfaceID(id int) *NetInterfaceUpdate
SetOnPoInterfaceID sets the "on_po_interface" edge to the PortChannelInterface entity by ID.
func (*NetInterfaceUpdate) Where ¶
func (niu *NetInterfaceUpdate) Where(ps ...predicate.NetInterface) *NetInterfaceUpdate
Where adds a new predicate for the NetInterfaceUpdate builder.
type NetInterfaceUpdateOne ¶
type NetInterfaceUpdateOne struct {
// contains filtered or unexported fields
}
NetInterfaceUpdateOne is the builder for updating a single NetInterface entity.
func (*NetInterfaceUpdateOne) AddHaveVlanIDs ¶
func (niuo *NetInterfaceUpdateOne) AddHaveVlanIDs(ids ...int) *NetInterfaceUpdateOne
AddHaveVlanIDs adds the "have_vlans" edge to the Vlan entity by IDs.
func (*NetInterfaceUpdateOne) AddHaveVlans ¶
func (niuo *NetInterfaceUpdateOne) AddHaveVlans(v ...*Vlan) *NetInterfaceUpdateOne
AddHaveVlans adds the "have_vlans" edges to the Vlan entity.
func (*NetInterfaceUpdateOne) AddIPStaticRouting ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) AddIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceUpdateOne
AddIPStaticRouting adds the "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*NetInterfaceUpdateOne) AddIPStaticRoutingIDs ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) AddIPStaticRoutingIDs(ids ...int) *NetInterfaceUpdateOne
AddIPStaticRoutingIDs adds the "ip_static_routing" edge to the IPStaticRoutingTable entity by IDs.
func (*NetInterfaceUpdateOne) ClearHaveVlans ¶
func (niuo *NetInterfaceUpdateOne) ClearHaveVlans() *NetInterfaceUpdateOne
ClearHaveVlans clears all "have_vlans" edges to the Vlan entity.
func (*NetInterfaceUpdateOne) ClearIPStaticRouting ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) ClearIPStaticRouting() *NetInterfaceUpdateOne
ClearIPStaticRouting clears all "ip_static_routing" edges to the IPStaticRoutingTable entity.
func (*NetInterfaceUpdateOne) ClearMode ¶
func (niuo *NetInterfaceUpdateOne) ClearMode() *NetInterfaceUpdateOne
ClearMode clears the "mode" edge to the NetInterfaceMode entity.
func (*NetInterfaceUpdateOne) ClearNativeOnVlan ¶
func (niuo *NetInterfaceUpdateOne) ClearNativeOnVlan() *NetInterfaceUpdateOne
ClearNativeOnVlan clears the "native_on_vlan" edge to the Vlan entity.
func (*NetInterfaceUpdateOne) ClearOnDevice ¶
func (niuo *NetInterfaceUpdateOne) ClearOnDevice() *NetInterfaceUpdateOne
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*NetInterfaceUpdateOne) ClearOnIPAddress ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) ClearOnIPAddress() *NetInterfaceUpdateOne
ClearOnIPAddress clears the "on_ip_address" edge to the IPAddress entity.
func (*NetInterfaceUpdateOne) ClearOnLayer ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) ClearOnLayer() *NetInterfaceUpdateOne
ClearOnLayer clears the "on_layer" edge to the NetInterfaceLayer entity.
func (*NetInterfaceUpdateOne) ClearOnPoInterface ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) ClearOnPoInterface() *NetInterfaceUpdateOne
ClearOnPoInterface clears the "on_po_interface" edge to the PortChannelInterface entity.
func (*NetInterfaceUpdateOne) Exec ¶
func (niuo *NetInterfaceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NetInterfaceUpdateOne) ExecX ¶
func (niuo *NetInterfaceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetInterfaceUpdateOne) Mutation ¶
func (niuo *NetInterfaceUpdateOne) Mutation() *NetInterfaceMutation
Mutation returns the NetInterfaceMutation object of the builder.
func (*NetInterfaceUpdateOne) RemoveHaveVlanIDs ¶
func (niuo *NetInterfaceUpdateOne) RemoveHaveVlanIDs(ids ...int) *NetInterfaceUpdateOne
RemoveHaveVlanIDs removes the "have_vlans" edge to Vlan entities by IDs.
func (*NetInterfaceUpdateOne) RemoveHaveVlans ¶
func (niuo *NetInterfaceUpdateOne) RemoveHaveVlans(v ...*Vlan) *NetInterfaceUpdateOne
RemoveHaveVlans removes "have_vlans" edges to Vlan entities.
func (*NetInterfaceUpdateOne) RemoveIPStaticRouting ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) RemoveIPStaticRouting(i ...*IPStaticRoutingTable) *NetInterfaceUpdateOne
RemoveIPStaticRouting removes "ip_static_routing" edges to IPStaticRoutingTable entities.
func (*NetInterfaceUpdateOne) RemoveIPStaticRoutingIDs ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) RemoveIPStaticRoutingIDs(ids ...int) *NetInterfaceUpdateOne
RemoveIPStaticRoutingIDs removes the "ip_static_routing" edge to IPStaticRoutingTable entities by IDs.
func (*NetInterfaceUpdateOne) Save ¶
func (niuo *NetInterfaceUpdateOne) Save(ctx context.Context) (*NetInterface, error)
Save executes the query and returns the updated NetInterface entity.
func (*NetInterfaceUpdateOne) SaveX ¶
func (niuo *NetInterfaceUpdateOne) SaveX(ctx context.Context) *NetInterface
SaveX is like Save, but panics if an error occurs.
func (*NetInterfaceUpdateOne) Select ¶
func (niuo *NetInterfaceUpdateOne) Select(field string, fields ...string) *NetInterfaceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NetInterfaceUpdateOne) SetInterfaceName ¶
func (niuo *NetInterfaceUpdateOne) SetInterfaceName(s string) *NetInterfaceUpdateOne
SetInterfaceName sets the "interface_name" field.
func (*NetInterfaceUpdateOne) SetInterfaceShutdown ¶
func (niuo *NetInterfaceUpdateOne) SetInterfaceShutdown(b bool) *NetInterfaceUpdateOne
SetInterfaceShutdown sets the "interface_shutdown" field.
func (*NetInterfaceUpdateOne) SetMode ¶
func (niuo *NetInterfaceUpdateOne) SetMode(n *NetInterfaceMode) *NetInterfaceUpdateOne
SetMode sets the "mode" edge to the NetInterfaceMode entity.
func (*NetInterfaceUpdateOne) SetModeID ¶
func (niuo *NetInterfaceUpdateOne) SetModeID(id int) *NetInterfaceUpdateOne
SetModeID sets the "mode" edge to the NetInterfaceMode entity by ID.
func (*NetInterfaceUpdateOne) SetNativeOnVlan ¶
func (niuo *NetInterfaceUpdateOne) SetNativeOnVlan(v *Vlan) *NetInterfaceUpdateOne
SetNativeOnVlan sets the "native_on_vlan" edge to the Vlan entity.
func (*NetInterfaceUpdateOne) SetNativeOnVlanID ¶
func (niuo *NetInterfaceUpdateOne) SetNativeOnVlanID(id int) *NetInterfaceUpdateOne
SetNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID.
func (*NetInterfaceUpdateOne) SetNillableInterfaceShutdown ¶
func (niuo *NetInterfaceUpdateOne) SetNillableInterfaceShutdown(b *bool) *NetInterfaceUpdateOne
SetNillableInterfaceShutdown sets the "interface_shutdown" field if the given value is not nil.
func (*NetInterfaceUpdateOne) SetNillableModeID ¶
func (niuo *NetInterfaceUpdateOne) SetNillableModeID(id *int) *NetInterfaceUpdateOne
SetNillableModeID sets the "mode" edge to the NetInterfaceMode entity by ID if the given value is not nil.
func (*NetInterfaceUpdateOne) SetNillableNativeOnVlanID ¶
func (niuo *NetInterfaceUpdateOne) SetNillableNativeOnVlanID(id *int) *NetInterfaceUpdateOne
SetNillableNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID if the given value is not nil.
func (*NetInterfaceUpdateOne) SetNillableOnDeviceID ¶
func (niuo *NetInterfaceUpdateOne) SetNillableOnDeviceID(id *int) *NetInterfaceUpdateOne
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*NetInterfaceUpdateOne) SetNillableOnIPAddressID ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) SetNillableOnIPAddressID(id *int) *NetInterfaceUpdateOne
SetNillableOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID if the given value is not nil.
func (*NetInterfaceUpdateOne) SetNillableOnLayerID ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) SetNillableOnLayerID(id *int) *NetInterfaceUpdateOne
SetNillableOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID if the given value is not nil.
func (*NetInterfaceUpdateOne) SetNillableOnPoInterfaceID ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) SetNillableOnPoInterfaceID(id *int) *NetInterfaceUpdateOne
SetNillableOnPoInterfaceID sets the "on_po_interface" edge to the PortChannelInterface entity by ID if the given value is not nil.
func (*NetInterfaceUpdateOne) SetOnDevice ¶
func (niuo *NetInterfaceUpdateOne) SetOnDevice(d *Device) *NetInterfaceUpdateOne
SetOnDevice sets the "on_device" edge to the Device entity.
func (*NetInterfaceUpdateOne) SetOnDeviceID ¶
func (niuo *NetInterfaceUpdateOne) SetOnDeviceID(id int) *NetInterfaceUpdateOne
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*NetInterfaceUpdateOne) SetOnIPAddress ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) SetOnIPAddress(i *IPAddress) *NetInterfaceUpdateOne
SetOnIPAddress sets the "on_ip_address" edge to the IPAddress entity.
func (*NetInterfaceUpdateOne) SetOnIPAddressID ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) SetOnIPAddressID(id int) *NetInterfaceUpdateOne
SetOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID.
func (*NetInterfaceUpdateOne) SetOnLayer ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) SetOnLayer(n *NetInterfaceLayer) *NetInterfaceUpdateOne
SetOnLayer sets the "on_layer" edge to the NetInterfaceLayer entity.
func (*NetInterfaceUpdateOne) SetOnLayerID ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) SetOnLayerID(id int) *NetInterfaceUpdateOne
SetOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID.
func (*NetInterfaceUpdateOne) SetOnPoInterface ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) SetOnPoInterface(p *PortChannelInterface) *NetInterfaceUpdateOne
SetOnPoInterface sets the "on_po_interface" edge to the PortChannelInterface entity.
func (*NetInterfaceUpdateOne) SetOnPoInterfaceID ¶ added in v0.2.0
func (niuo *NetInterfaceUpdateOne) SetOnPoInterfaceID(id int) *NetInterfaceUpdateOne
SetOnPoInterfaceID sets the "on_po_interface" edge to the PortChannelInterface entity by ID.
type NetInterfaces ¶
type NetInterfaces []*NetInterface
NetInterfaces is a parsable slice of NetInterface.
type NetTopologies ¶
type NetTopologies []*NetTopology
NetTopologies is a parsable slice of NetTopology.
type NetTopology ¶
type NetTopology struct { // ID of the ent. ID int `json:"id,omitempty"` // TopologyName holds the value of the "topology_name" field. TopologyName string `json:"topology_name,omitempty"` // TopologyDescription holds the value of the "topology_description" field. TopologyDescription string `json:"topology_description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NetTopologyQuery when eager-loading is set. Edges NetTopologyEdges `json:"edges"` // contains filtered or unexported fields }
NetTopology is the model entity for the NetTopology schema.
func (*NetTopology) QueryTopology ¶
func (nt *NetTopology) QueryTopology() *NetTopologyDeviceMapQuery
QueryTopology queries the "topology" edge of the NetTopology entity.
func (*NetTopology) String ¶
func (nt *NetTopology) String() string
String implements the fmt.Stringer.
func (*NetTopology) Unwrap ¶
func (nt *NetTopology) Unwrap() *NetTopology
Unwrap unwraps the NetTopology 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 (*NetTopology) Update ¶
func (nt *NetTopology) Update() *NetTopologyUpdateOne
Update returns a builder for updating this NetTopology. Note that you need to call NetTopology.Unwrap() before calling this method if this NetTopology was returned from a transaction, and the transaction was committed or rolled back.
type NetTopologyClient ¶
type NetTopologyClient struct {
// contains filtered or unexported fields
}
NetTopologyClient is a client for the NetTopology schema.
func NewNetTopologyClient ¶
func NewNetTopologyClient(c config) *NetTopologyClient
NewNetTopologyClient returns a client for the NetTopology from the given config.
func (*NetTopologyClient) Create ¶
func (c *NetTopologyClient) Create() *NetTopologyCreate
Create returns a create builder for NetTopology.
func (*NetTopologyClient) CreateBulk ¶
func (c *NetTopologyClient) CreateBulk(builders ...*NetTopologyCreate) *NetTopologyCreateBulk
CreateBulk returns a builder for creating a bulk of NetTopology entities.
func (*NetTopologyClient) Delete ¶
func (c *NetTopologyClient) Delete() *NetTopologyDelete
Delete returns a delete builder for NetTopology.
func (*NetTopologyClient) DeleteOne ¶
func (c *NetTopologyClient) DeleteOne(nt *NetTopology) *NetTopologyDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*NetTopologyClient) DeleteOneID ¶
func (c *NetTopologyClient) DeleteOneID(id int) *NetTopologyDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*NetTopologyClient) Get ¶
func (c *NetTopologyClient) Get(ctx context.Context, id int) (*NetTopology, error)
Get returns a NetTopology entity by its id.
func (*NetTopologyClient) GetX ¶
func (c *NetTopologyClient) GetX(ctx context.Context, id int) *NetTopology
GetX is like Get, but panics if an error occurs.
func (*NetTopologyClient) Hooks ¶
func (c *NetTopologyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NetTopologyClient) Query ¶
func (c *NetTopologyClient) Query() *NetTopologyQuery
Query returns a query builder for NetTopology.
func (*NetTopologyClient) QueryTopology ¶
func (c *NetTopologyClient) QueryTopology(nt *NetTopology) *NetTopologyDeviceMapQuery
QueryTopology queries the topology edge of a NetTopology.
func (*NetTopologyClient) Update ¶
func (c *NetTopologyClient) Update() *NetTopologyUpdate
Update returns an update builder for NetTopology.
func (*NetTopologyClient) UpdateOne ¶
func (c *NetTopologyClient) UpdateOne(nt *NetTopology) *NetTopologyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NetTopologyClient) UpdateOneID ¶
func (c *NetTopologyClient) UpdateOneID(id int) *NetTopologyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NetTopologyClient) Use ¶
func (c *NetTopologyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `nettopology.Hooks(f(g(h())))`.
type NetTopologyCreate ¶
type NetTopologyCreate struct {
// contains filtered or unexported fields
}
NetTopologyCreate is the builder for creating a NetTopology entity.
func (*NetTopologyCreate) AddTopology ¶
func (ntc *NetTopologyCreate) AddTopology(n ...*NetTopologyDeviceMap) *NetTopologyCreate
AddTopology adds the "topology" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyCreate) AddTopologyIDs ¶
func (ntc *NetTopologyCreate) AddTopologyIDs(ids ...int) *NetTopologyCreate
AddTopologyIDs adds the "topology" edge to the NetTopologyDeviceMap entity by IDs.
func (*NetTopologyCreate) Mutation ¶
func (ntc *NetTopologyCreate) Mutation() *NetTopologyMutation
Mutation returns the NetTopologyMutation object of the builder.
func (*NetTopologyCreate) Save ¶
func (ntc *NetTopologyCreate) Save(ctx context.Context) (*NetTopology, error)
Save creates the NetTopology in the database.
func (*NetTopologyCreate) SaveX ¶
func (ntc *NetTopologyCreate) SaveX(ctx context.Context) *NetTopology
SaveX calls Save and panics if Save returns an error.
func (*NetTopologyCreate) SetTopologyDescription ¶
func (ntc *NetTopologyCreate) SetTopologyDescription(s string) *NetTopologyCreate
SetTopologyDescription sets the "topology_description" field.
func (*NetTopologyCreate) SetTopologyName ¶
func (ntc *NetTopologyCreate) SetTopologyName(s string) *NetTopologyCreate
SetTopologyName sets the "topology_name" field.
type NetTopologyCreateBulk ¶
type NetTopologyCreateBulk struct {
// contains filtered or unexported fields
}
NetTopologyCreateBulk is the builder for creating many NetTopology entities in bulk.
func (*NetTopologyCreateBulk) Save ¶
func (ntcb *NetTopologyCreateBulk) Save(ctx context.Context) ([]*NetTopology, error)
Save creates the NetTopology entities in the database.
func (*NetTopologyCreateBulk) SaveX ¶
func (ntcb *NetTopologyCreateBulk) SaveX(ctx context.Context) []*NetTopology
SaveX is like Save, but panics if an error occurs.
type NetTopologyDelete ¶
type NetTopologyDelete struct {
// contains filtered or unexported fields
}
NetTopologyDelete is the builder for deleting a NetTopology entity.
func (*NetTopologyDelete) Exec ¶
func (ntd *NetTopologyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NetTopologyDelete) ExecX ¶
func (ntd *NetTopologyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NetTopologyDelete) Where ¶
func (ntd *NetTopologyDelete) Where(ps ...predicate.NetTopology) *NetTopologyDelete
Where adds a new predicate to the NetTopologyDelete builder.
type NetTopologyDeleteOne ¶
type NetTopologyDeleteOne struct {
// contains filtered or unexported fields
}
NetTopologyDeleteOne is the builder for deleting a single NetTopology entity.
func (*NetTopologyDeleteOne) Exec ¶
func (ntdo *NetTopologyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NetTopologyDeleteOne) ExecX ¶
func (ntdo *NetTopologyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NetTopologyDeviceMap ¶
type NetTopologyDeviceMap struct { // ID of the ent. ID int `json:"id,omitempty"` // PositionX holds the value of the "position_x" field. PositionX int `json:"position_x,omitempty"` // PositionY holds the value of the "position_y" field. PositionY int `json:"position_y,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NetTopologyDeviceMapQuery when eager-loading is set. Edges NetTopologyDeviceMapEdges `json:"edges"` // contains filtered or unexported fields }
NetTopologyDeviceMap is the model entity for the NetTopologyDeviceMap schema.
func (*NetTopologyDeviceMap) QueryDevice ¶
func (ntdm *NetTopologyDeviceMap) QueryDevice() *DeviceQuery
QueryDevice queries the "device" edge of the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMap) QueryEdge ¶
func (ntdm *NetTopologyDeviceMap) QueryEdge() *NetTopologyDeviceMapQuery
QueryEdge queries the "edge" edge of the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMap) QueryOnTopology ¶
func (ntdm *NetTopologyDeviceMap) QueryOnTopology() *NetTopologyQuery
QueryOnTopology queries the "on_topology" edge of the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMap) String ¶
func (ntdm *NetTopologyDeviceMap) String() string
String implements the fmt.Stringer.
func (*NetTopologyDeviceMap) Unwrap ¶
func (ntdm *NetTopologyDeviceMap) Unwrap() *NetTopologyDeviceMap
Unwrap unwraps the NetTopologyDeviceMap 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 (*NetTopologyDeviceMap) Update ¶
func (ntdm *NetTopologyDeviceMap) Update() *NetTopologyDeviceMapUpdateOne
Update returns a builder for updating this NetTopologyDeviceMap. Note that you need to call NetTopologyDeviceMap.Unwrap() before calling this method if this NetTopologyDeviceMap was returned from a transaction, and the transaction was committed or rolled back.
type NetTopologyDeviceMapClient ¶
type NetTopologyDeviceMapClient struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapClient is a client for the NetTopologyDeviceMap schema.
func NewNetTopologyDeviceMapClient ¶
func NewNetTopologyDeviceMapClient(c config) *NetTopologyDeviceMapClient
NewNetTopologyDeviceMapClient returns a client for the NetTopologyDeviceMap from the given config.
func (*NetTopologyDeviceMapClient) Create ¶
func (c *NetTopologyDeviceMapClient) Create() *NetTopologyDeviceMapCreate
Create returns a create builder for NetTopologyDeviceMap.
func (*NetTopologyDeviceMapClient) CreateBulk ¶
func (c *NetTopologyDeviceMapClient) CreateBulk(builders ...*NetTopologyDeviceMapCreate) *NetTopologyDeviceMapCreateBulk
CreateBulk returns a builder for creating a bulk of NetTopologyDeviceMap entities.
func (*NetTopologyDeviceMapClient) Delete ¶
func (c *NetTopologyDeviceMapClient) Delete() *NetTopologyDeviceMapDelete
Delete returns a delete builder for NetTopologyDeviceMap.
func (*NetTopologyDeviceMapClient) DeleteOne ¶
func (c *NetTopologyDeviceMapClient) DeleteOne(ntdm *NetTopologyDeviceMap) *NetTopologyDeviceMapDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*NetTopologyDeviceMapClient) DeleteOneID ¶
func (c *NetTopologyDeviceMapClient) DeleteOneID(id int) *NetTopologyDeviceMapDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*NetTopologyDeviceMapClient) Get ¶
func (c *NetTopologyDeviceMapClient) Get(ctx context.Context, id int) (*NetTopologyDeviceMap, error)
Get returns a NetTopologyDeviceMap entity by its id.
func (*NetTopologyDeviceMapClient) GetX ¶
func (c *NetTopologyDeviceMapClient) GetX(ctx context.Context, id int) *NetTopologyDeviceMap
GetX is like Get, but panics if an error occurs.
func (*NetTopologyDeviceMapClient) Hooks ¶
func (c *NetTopologyDeviceMapClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NetTopologyDeviceMapClient) Query ¶
func (c *NetTopologyDeviceMapClient) Query() *NetTopologyDeviceMapQuery
Query returns a query builder for NetTopologyDeviceMap.
func (*NetTopologyDeviceMapClient) QueryDevice ¶
func (c *NetTopologyDeviceMapClient) QueryDevice(ntdm *NetTopologyDeviceMap) *DeviceQuery
QueryDevice queries the device edge of a NetTopologyDeviceMap.
func (*NetTopologyDeviceMapClient) QueryEdge ¶
func (c *NetTopologyDeviceMapClient) QueryEdge(ntdm *NetTopologyDeviceMap) *NetTopologyDeviceMapQuery
QueryEdge queries the edge edge of a NetTopologyDeviceMap.
func (*NetTopologyDeviceMapClient) QueryOnTopology ¶
func (c *NetTopologyDeviceMapClient) QueryOnTopology(ntdm *NetTopologyDeviceMap) *NetTopologyQuery
QueryOnTopology queries the on_topology edge of a NetTopologyDeviceMap.
func (*NetTopologyDeviceMapClient) Update ¶
func (c *NetTopologyDeviceMapClient) Update() *NetTopologyDeviceMapUpdate
Update returns an update builder for NetTopologyDeviceMap.
func (*NetTopologyDeviceMapClient) UpdateOne ¶
func (c *NetTopologyDeviceMapClient) UpdateOne(ntdm *NetTopologyDeviceMap) *NetTopologyDeviceMapUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NetTopologyDeviceMapClient) UpdateOneID ¶
func (c *NetTopologyDeviceMapClient) UpdateOneID(id int) *NetTopologyDeviceMapUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NetTopologyDeviceMapClient) Use ¶
func (c *NetTopologyDeviceMapClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `nettopologydevicemap.Hooks(f(g(h())))`.
type NetTopologyDeviceMapCreate ¶
type NetTopologyDeviceMapCreate struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapCreate is the builder for creating a NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapCreate) AddEdge ¶
func (ntdmc *NetTopologyDeviceMapCreate) AddEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapCreate
AddEdge adds the "edge" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapCreate) AddEdgeIDs ¶
func (ntdmc *NetTopologyDeviceMapCreate) AddEdgeIDs(ids ...int) *NetTopologyDeviceMapCreate
AddEdgeIDs adds the "edge" edge to the NetTopologyDeviceMap entity by IDs.
func (*NetTopologyDeviceMapCreate) Mutation ¶
func (ntdmc *NetTopologyDeviceMapCreate) Mutation() *NetTopologyDeviceMapMutation
Mutation returns the NetTopologyDeviceMapMutation object of the builder.
func (*NetTopologyDeviceMapCreate) Save ¶
func (ntdmc *NetTopologyDeviceMapCreate) Save(ctx context.Context) (*NetTopologyDeviceMap, error)
Save creates the NetTopologyDeviceMap in the database.
func (*NetTopologyDeviceMapCreate) SaveX ¶
func (ntdmc *NetTopologyDeviceMapCreate) SaveX(ctx context.Context) *NetTopologyDeviceMap
SaveX calls Save and panics if Save returns an error.
func (*NetTopologyDeviceMapCreate) SetDevice ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetDevice(d *Device) *NetTopologyDeviceMapCreate
SetDevice sets the "device" edge to the Device entity.
func (*NetTopologyDeviceMapCreate) SetDeviceID ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetDeviceID(id int) *NetTopologyDeviceMapCreate
SetDeviceID sets the "device" edge to the Device entity by ID.
func (*NetTopologyDeviceMapCreate) SetNillableDeviceID ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetNillableDeviceID(id *int) *NetTopologyDeviceMapCreate
SetNillableDeviceID sets the "device" edge to the Device entity by ID if the given value is not nil.
func (*NetTopologyDeviceMapCreate) SetNillableOnTopologyID ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetNillableOnTopologyID(id *int) *NetTopologyDeviceMapCreate
SetNillableOnTopologyID sets the "on_topology" edge to the NetTopology entity by ID if the given value is not nil.
func (*NetTopologyDeviceMapCreate) SetNillablePositionX ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetNillablePositionX(i *int) *NetTopologyDeviceMapCreate
SetNillablePositionX sets the "position_x" field if the given value is not nil.
func (*NetTopologyDeviceMapCreate) SetNillablePositionY ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetNillablePositionY(i *int) *NetTopologyDeviceMapCreate
SetNillablePositionY sets the "position_y" field if the given value is not nil.
func (*NetTopologyDeviceMapCreate) SetOnTopology ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetOnTopology(n *NetTopology) *NetTopologyDeviceMapCreate
SetOnTopology sets the "on_topology" edge to the NetTopology entity.
func (*NetTopologyDeviceMapCreate) SetOnTopologyID ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetOnTopologyID(id int) *NetTopologyDeviceMapCreate
SetOnTopologyID sets the "on_topology" edge to the NetTopology entity by ID.
func (*NetTopologyDeviceMapCreate) SetPositionX ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetPositionX(i int) *NetTopologyDeviceMapCreate
SetPositionX sets the "position_x" field.
func (*NetTopologyDeviceMapCreate) SetPositionY ¶
func (ntdmc *NetTopologyDeviceMapCreate) SetPositionY(i int) *NetTopologyDeviceMapCreate
SetPositionY sets the "position_y" field.
type NetTopologyDeviceMapCreateBulk ¶
type NetTopologyDeviceMapCreateBulk struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapCreateBulk is the builder for creating many NetTopologyDeviceMap entities in bulk.
func (*NetTopologyDeviceMapCreateBulk) Save ¶
func (ntdmcb *NetTopologyDeviceMapCreateBulk) Save(ctx context.Context) ([]*NetTopologyDeviceMap, error)
Save creates the NetTopologyDeviceMap entities in the database.
func (*NetTopologyDeviceMapCreateBulk) SaveX ¶
func (ntdmcb *NetTopologyDeviceMapCreateBulk) SaveX(ctx context.Context) []*NetTopologyDeviceMap
SaveX is like Save, but panics if an error occurs.
type NetTopologyDeviceMapDelete ¶
type NetTopologyDeviceMapDelete struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapDelete is the builder for deleting a NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapDelete) Exec ¶
func (ntdmd *NetTopologyDeviceMapDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NetTopologyDeviceMapDelete) ExecX ¶
func (ntdmd *NetTopologyDeviceMapDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NetTopologyDeviceMapDelete) Where ¶
func (ntdmd *NetTopologyDeviceMapDelete) Where(ps ...predicate.NetTopologyDeviceMap) *NetTopologyDeviceMapDelete
Where adds a new predicate to the NetTopologyDeviceMapDelete builder.
type NetTopologyDeviceMapDeleteOne ¶
type NetTopologyDeviceMapDeleteOne struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapDeleteOne is the builder for deleting a single NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapDeleteOne) Exec ¶
func (ntdmdo *NetTopologyDeviceMapDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NetTopologyDeviceMapDeleteOne) ExecX ¶
func (ntdmdo *NetTopologyDeviceMapDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NetTopologyDeviceMapEdges ¶
type NetTopologyDeviceMapEdges struct { // OnTopology holds the value of the on_topology edge. OnTopology *NetTopology `json:"on_topology,omitempty"` // Device holds the value of the device edge. Device *Device `json:"device,omitempty"` // Edge holds the value of the edge edge. Edge []*NetTopologyDeviceMap `json:"edge,omitempty"` // contains filtered or unexported fields }
NetTopologyDeviceMapEdges holds the relations/edges for other nodes in the graph.
func (NetTopologyDeviceMapEdges) DeviceOrErr ¶
func (e NetTopologyDeviceMapEdges) DeviceOrErr() (*Device, error)
DeviceOrErr returns the Device value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (NetTopologyDeviceMapEdges) EdgeOrErr ¶
func (e NetTopologyDeviceMapEdges) EdgeOrErr() ([]*NetTopologyDeviceMap, error)
EdgeOrErr returns the Edge value or an error if the edge was not loaded in eager-loading.
func (NetTopologyDeviceMapEdges) OnTopologyOrErr ¶
func (e NetTopologyDeviceMapEdges) OnTopologyOrErr() (*NetTopology, error)
OnTopologyOrErr returns the OnTopology value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NetTopologyDeviceMapGroupBy ¶
type NetTopologyDeviceMapGroupBy struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapGroupBy is the group-by builder for NetTopologyDeviceMap entities.
func (*NetTopologyDeviceMapGroupBy) Aggregate ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Aggregate(fns ...AggregateFunc) *NetTopologyDeviceMapGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NetTopologyDeviceMapGroupBy) Bool ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetTopologyDeviceMapGroupBy) BoolX ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetTopologyDeviceMapGroupBy) Bools ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*NetTopologyDeviceMapGroupBy) BoolsX ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetTopologyDeviceMapGroupBy) Float64 ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetTopologyDeviceMapGroupBy) Float64X ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetTopologyDeviceMapGroupBy) Float64s ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*NetTopologyDeviceMapGroupBy) Float64sX ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetTopologyDeviceMapGroupBy) Int ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetTopologyDeviceMapGroupBy) IntX ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetTopologyDeviceMapGroupBy) Ints ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*NetTopologyDeviceMapGroupBy) IntsX ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetTopologyDeviceMapGroupBy) Scan ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*NetTopologyDeviceMapGroupBy) ScanX ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetTopologyDeviceMapGroupBy) String ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetTopologyDeviceMapGroupBy) StringX ¶
func (ntdmgb *NetTopologyDeviceMapGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetTopologyDeviceMapMutation ¶
type NetTopologyDeviceMapMutation struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapMutation represents an operation that mutates the NetTopologyDeviceMap nodes in the graph.
func (*NetTopologyDeviceMapMutation) AddEdgeIDs ¶
func (m *NetTopologyDeviceMapMutation) AddEdgeIDs(ids ...int)
AddEdgeIDs adds the "edge" edge to the NetTopologyDeviceMap entity by ids.
func (*NetTopologyDeviceMapMutation) AddField ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) AddPositionX ¶
func (m *NetTopologyDeviceMapMutation) AddPositionX(i int)
AddPositionX adds i to the "position_x" field.
func (*NetTopologyDeviceMapMutation) AddPositionY ¶
func (m *NetTopologyDeviceMapMutation) AddPositionY(i int)
AddPositionY adds i to the "position_y" field.
func (*NetTopologyDeviceMapMutation) AddedEdges ¶
func (m *NetTopologyDeviceMapMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NetTopologyDeviceMapMutation) AddedField ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) AddedFields ¶
func (m *NetTopologyDeviceMapMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NetTopologyDeviceMapMutation) AddedIDs ¶
func (m *NetTopologyDeviceMapMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NetTopologyDeviceMapMutation) AddedPositionX ¶
func (m *NetTopologyDeviceMapMutation) AddedPositionX() (r int, exists bool)
AddedPositionX returns the value that was added to the "position_x" field in this mutation.
func (*NetTopologyDeviceMapMutation) AddedPositionY ¶
func (m *NetTopologyDeviceMapMutation) AddedPositionY() (r int, exists bool)
AddedPositionY returns the value that was added to the "position_y" field in this mutation.
func (*NetTopologyDeviceMapMutation) ClearDevice ¶
func (m *NetTopologyDeviceMapMutation) ClearDevice()
ClearDevice clears the "device" edge to the Device entity.
func (*NetTopologyDeviceMapMutation) ClearEdge ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) ClearEdgeEdge ¶
func (m *NetTopologyDeviceMapMutation) ClearEdgeEdge()
ClearEdgeEdge clears the "edge" edge to the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapMutation) ClearField ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) ClearOnTopology ¶
func (m *NetTopologyDeviceMapMutation) ClearOnTopology()
ClearOnTopology clears the "on_topology" edge to the NetTopology entity.
func (*NetTopologyDeviceMapMutation) ClearedEdges ¶
func (m *NetTopologyDeviceMapMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NetTopologyDeviceMapMutation) ClearedFields ¶
func (m *NetTopologyDeviceMapMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NetTopologyDeviceMapMutation) Client ¶
func (m NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) DeviceCleared ¶
func (m *NetTopologyDeviceMapMutation) DeviceCleared() bool
DeviceCleared reports if the "device" edge to the Device entity was cleared.
func (*NetTopologyDeviceMapMutation) DeviceID ¶
func (m *NetTopologyDeviceMapMutation) DeviceID() (id int, exists bool)
DeviceID returns the "device" edge ID in the mutation.
func (*NetTopologyDeviceMapMutation) DeviceIDs ¶
func (m *NetTopologyDeviceMapMutation) DeviceIDs() (ids []int)
DeviceIDs returns the "device" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeviceID instead. It exists only for internal usage by the builders.
func (*NetTopologyDeviceMapMutation) EdgeCleared ¶
func (m *NetTopologyDeviceMapMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NetTopologyDeviceMapMutation) EdgeEdgeCleared ¶
func (m *NetTopologyDeviceMapMutation) EdgeEdgeCleared() bool
EdgeEdgeCleared reports if the "edge" edge to the NetTopologyDeviceMap entity was cleared.
func (*NetTopologyDeviceMapMutation) EdgeIDs ¶
func (m *NetTopologyDeviceMapMutation) EdgeIDs() (ids []int)
EdgeIDs returns the "edge" edge IDs in the mutation.
func (*NetTopologyDeviceMapMutation) Field ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) FieldCleared ¶
func (m *NetTopologyDeviceMapMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NetTopologyDeviceMapMutation) Fields ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) ID ¶
func (m *NetTopologyDeviceMapMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*NetTopologyDeviceMapMutation) OldField ¶
func (m *NetTopologyDeviceMapMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*NetTopologyDeviceMapMutation) OldPositionX ¶
func (m *NetTopologyDeviceMapMutation) OldPositionX(ctx context.Context) (v int, err error)
OldPositionX returns the old "position_x" field's value of the NetTopologyDeviceMap entity. If the NetTopologyDeviceMap object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NetTopologyDeviceMapMutation) OldPositionY ¶
func (m *NetTopologyDeviceMapMutation) OldPositionY(ctx context.Context) (v int, err error)
OldPositionY returns the old "position_y" field's value of the NetTopologyDeviceMap entity. If the NetTopologyDeviceMap object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NetTopologyDeviceMapMutation) OnTopologyCleared ¶
func (m *NetTopologyDeviceMapMutation) OnTopologyCleared() bool
OnTopologyCleared reports if the "on_topology" edge to the NetTopology entity was cleared.
func (*NetTopologyDeviceMapMutation) OnTopologyID ¶
func (m *NetTopologyDeviceMapMutation) OnTopologyID() (id int, exists bool)
OnTopologyID returns the "on_topology" edge ID in the mutation.
func (*NetTopologyDeviceMapMutation) OnTopologyIDs ¶
func (m *NetTopologyDeviceMapMutation) OnTopologyIDs() (ids []int)
OnTopologyIDs returns the "on_topology" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnTopologyID instead. It exists only for internal usage by the builders.
func (*NetTopologyDeviceMapMutation) Op ¶
func (m *NetTopologyDeviceMapMutation) Op() Op
Op returns the operation name.
func (*NetTopologyDeviceMapMutation) PositionX ¶
func (m *NetTopologyDeviceMapMutation) PositionX() (r int, exists bool)
PositionX returns the value of the "position_x" field in the mutation.
func (*NetTopologyDeviceMapMutation) PositionY ¶
func (m *NetTopologyDeviceMapMutation) PositionY() (r int, exists bool)
PositionY returns the value of the "position_y" field in the mutation.
func (*NetTopologyDeviceMapMutation) RemoveEdgeIDs ¶
func (m *NetTopologyDeviceMapMutation) RemoveEdgeIDs(ids ...int)
RemoveEdgeIDs removes the "edge" edge to the NetTopologyDeviceMap entity by IDs.
func (*NetTopologyDeviceMapMutation) RemovedEdgeIDs ¶
func (m *NetTopologyDeviceMapMutation) RemovedEdgeIDs() (ids []int)
RemovedEdge returns the removed IDs of the "edge" edge to the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapMutation) RemovedEdges ¶
func (m *NetTopologyDeviceMapMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NetTopologyDeviceMapMutation) RemovedIDs ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) ResetDevice ¶
func (m *NetTopologyDeviceMapMutation) ResetDevice()
ResetDevice resets all changes to the "device" edge.
func (*NetTopologyDeviceMapMutation) ResetEdge ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) ResetEdgeEdge ¶
func (m *NetTopologyDeviceMapMutation) ResetEdgeEdge()
ResetEdgeEdge resets all changes to the "edge" edge.
func (*NetTopologyDeviceMapMutation) ResetField ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) ResetOnTopology ¶
func (m *NetTopologyDeviceMapMutation) ResetOnTopology()
ResetOnTopology resets all changes to the "on_topology" edge.
func (*NetTopologyDeviceMapMutation) ResetPositionX ¶
func (m *NetTopologyDeviceMapMutation) ResetPositionX()
ResetPositionX resets all changes to the "position_x" field.
func (*NetTopologyDeviceMapMutation) ResetPositionY ¶
func (m *NetTopologyDeviceMapMutation) ResetPositionY()
ResetPositionY resets all changes to the "position_y" field.
func (*NetTopologyDeviceMapMutation) SetDeviceID ¶
func (m *NetTopologyDeviceMapMutation) SetDeviceID(id int)
SetDeviceID sets the "device" edge to the Device entity by id.
func (*NetTopologyDeviceMapMutation) SetField ¶
func (m *NetTopologyDeviceMapMutation) 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 (*NetTopologyDeviceMapMutation) SetOnTopologyID ¶
func (m *NetTopologyDeviceMapMutation) SetOnTopologyID(id int)
SetOnTopologyID sets the "on_topology" edge to the NetTopology entity by id.
func (*NetTopologyDeviceMapMutation) SetPositionX ¶
func (m *NetTopologyDeviceMapMutation) SetPositionX(i int)
SetPositionX sets the "position_x" field.
func (*NetTopologyDeviceMapMutation) SetPositionY ¶
func (m *NetTopologyDeviceMapMutation) SetPositionY(i int)
SetPositionY sets the "position_y" field.
func (NetTopologyDeviceMapMutation) Tx ¶
func (m NetTopologyDeviceMapMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NetTopologyDeviceMapMutation) Type ¶
func (m *NetTopologyDeviceMapMutation) Type() string
Type returns the node type of this mutation (NetTopologyDeviceMap).
type NetTopologyDeviceMapQuery ¶
type NetTopologyDeviceMapQuery struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapQuery is the builder for querying NetTopologyDeviceMap entities.
func (*NetTopologyDeviceMapQuery) All ¶
func (ntdmq *NetTopologyDeviceMapQuery) All(ctx context.Context) ([]*NetTopologyDeviceMap, error)
All executes the query and returns a list of NetTopologyDeviceMaps.
func (*NetTopologyDeviceMapQuery) AllX ¶
func (ntdmq *NetTopologyDeviceMapQuery) AllX(ctx context.Context) []*NetTopologyDeviceMap
AllX is like All, but panics if an error occurs.
func (*NetTopologyDeviceMapQuery) Clone ¶
func (ntdmq *NetTopologyDeviceMapQuery) Clone() *NetTopologyDeviceMapQuery
Clone returns a duplicate of the NetTopologyDeviceMapQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NetTopologyDeviceMapQuery) Count ¶
func (ntdmq *NetTopologyDeviceMapQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NetTopologyDeviceMapQuery) CountX ¶
func (ntdmq *NetTopologyDeviceMapQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NetTopologyDeviceMapQuery) Exist ¶
func (ntdmq *NetTopologyDeviceMapQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NetTopologyDeviceMapQuery) ExistX ¶
func (ntdmq *NetTopologyDeviceMapQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NetTopologyDeviceMapQuery) First ¶
func (ntdmq *NetTopologyDeviceMapQuery) First(ctx context.Context) (*NetTopologyDeviceMap, error)
First returns the first NetTopologyDeviceMap entity from the query. Returns a *NotFoundError when no NetTopologyDeviceMap was found.
func (*NetTopologyDeviceMapQuery) FirstID ¶
func (ntdmq *NetTopologyDeviceMapQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NetTopologyDeviceMap ID from the query. Returns a *NotFoundError when no NetTopologyDeviceMap ID was found.
func (*NetTopologyDeviceMapQuery) FirstIDX ¶
func (ntdmq *NetTopologyDeviceMapQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NetTopologyDeviceMapQuery) FirstX ¶
func (ntdmq *NetTopologyDeviceMapQuery) FirstX(ctx context.Context) *NetTopologyDeviceMap
FirstX is like First, but panics if an error occurs.
func (*NetTopologyDeviceMapQuery) GroupBy ¶
func (ntdmq *NetTopologyDeviceMapQuery) GroupBy(field string, fields ...string) *NetTopologyDeviceMapGroupBy
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 { PositionX int `json:"position_x,omitempty"` Count int `json:"count,omitempty"` } client.NetTopologyDeviceMap.Query(). GroupBy(nettopologydevicemap.FieldPositionX). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NetTopologyDeviceMapQuery) IDs ¶
func (ntdmq *NetTopologyDeviceMapQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NetTopologyDeviceMap IDs.
func (*NetTopologyDeviceMapQuery) IDsX ¶
func (ntdmq *NetTopologyDeviceMapQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NetTopologyDeviceMapQuery) Limit ¶
func (ntdmq *NetTopologyDeviceMapQuery) Limit(limit int) *NetTopologyDeviceMapQuery
Limit adds a limit step to the query.
func (*NetTopologyDeviceMapQuery) Offset ¶
func (ntdmq *NetTopologyDeviceMapQuery) Offset(offset int) *NetTopologyDeviceMapQuery
Offset adds an offset step to the query.
func (*NetTopologyDeviceMapQuery) Only ¶
func (ntdmq *NetTopologyDeviceMapQuery) Only(ctx context.Context) (*NetTopologyDeviceMap, error)
Only returns a single NetTopologyDeviceMap entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one NetTopologyDeviceMap entity is not found. Returns a *NotFoundError when no NetTopologyDeviceMap entities are found.
func (*NetTopologyDeviceMapQuery) OnlyID ¶
func (ntdmq *NetTopologyDeviceMapQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NetTopologyDeviceMap ID in the query. Returns a *NotSingularError when exactly one NetTopologyDeviceMap ID is not found. Returns a *NotFoundError when no entities are found.
func (*NetTopologyDeviceMapQuery) OnlyIDX ¶
func (ntdmq *NetTopologyDeviceMapQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NetTopologyDeviceMapQuery) OnlyX ¶
func (ntdmq *NetTopologyDeviceMapQuery) OnlyX(ctx context.Context) *NetTopologyDeviceMap
OnlyX is like Only, but panics if an error occurs.
func (*NetTopologyDeviceMapQuery) Order ¶
func (ntdmq *NetTopologyDeviceMapQuery) Order(o ...OrderFunc) *NetTopologyDeviceMapQuery
Order adds an order step to the query.
func (*NetTopologyDeviceMapQuery) QueryDevice ¶
func (ntdmq *NetTopologyDeviceMapQuery) QueryDevice() *DeviceQuery
QueryDevice chains the current query on the "device" edge.
func (*NetTopologyDeviceMapQuery) QueryEdge ¶
func (ntdmq *NetTopologyDeviceMapQuery) QueryEdge() *NetTopologyDeviceMapQuery
QueryEdge chains the current query on the "edge" edge.
func (*NetTopologyDeviceMapQuery) QueryOnTopology ¶
func (ntdmq *NetTopologyDeviceMapQuery) QueryOnTopology() *NetTopologyQuery
QueryOnTopology chains the current query on the "on_topology" edge.
func (*NetTopologyDeviceMapQuery) Select ¶
func (ntdmq *NetTopologyDeviceMapQuery) Select(field string, fields ...string) *NetTopologyDeviceMapSelect
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 { PositionX int `json:"position_x,omitempty"` } client.NetTopologyDeviceMap.Query(). Select(nettopologydevicemap.FieldPositionX). Scan(ctx, &v)
func (*NetTopologyDeviceMapQuery) Unique ¶
func (ntdmq *NetTopologyDeviceMapQuery) Unique(unique bool) *NetTopologyDeviceMapQuery
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 (*NetTopologyDeviceMapQuery) Where ¶
func (ntdmq *NetTopologyDeviceMapQuery) Where(ps ...predicate.NetTopologyDeviceMap) *NetTopologyDeviceMapQuery
Where adds a new predicate for the NetTopologyDeviceMapQuery builder.
func (*NetTopologyDeviceMapQuery) WithDevice ¶
func (ntdmq *NetTopologyDeviceMapQuery) WithDevice(opts ...func(*DeviceQuery)) *NetTopologyDeviceMapQuery
WithDevice tells the query-builder to eager-load the nodes that are connected to the "device" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetTopologyDeviceMapQuery) WithEdge ¶
func (ntdmq *NetTopologyDeviceMapQuery) WithEdge(opts ...func(*NetTopologyDeviceMapQuery)) *NetTopologyDeviceMapQuery
WithEdge tells the query-builder to eager-load the nodes that are connected to the "edge" edge. The optional arguments are used to configure the query builder of the edge.
func (*NetTopologyDeviceMapQuery) WithOnTopology ¶
func (ntdmq *NetTopologyDeviceMapQuery) WithOnTopology(opts ...func(*NetTopologyQuery)) *NetTopologyDeviceMapQuery
WithOnTopology tells the query-builder to eager-load the nodes that are connected to the "on_topology" edge. The optional arguments are used to configure the query builder of the edge.
type NetTopologyDeviceMapSelect ¶
type NetTopologyDeviceMapSelect struct { *NetTopologyDeviceMapQuery // contains filtered or unexported fields }
NetTopologyDeviceMapSelect is the builder for selecting fields of NetTopologyDeviceMap entities.
func (*NetTopologyDeviceMapSelect) Bool ¶
func (ntdms *NetTopologyDeviceMapSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NetTopologyDeviceMapSelect) BoolX ¶
func (ntdms *NetTopologyDeviceMapSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetTopologyDeviceMapSelect) Bools ¶
func (ntdms *NetTopologyDeviceMapSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NetTopologyDeviceMapSelect) BoolsX ¶
func (ntdms *NetTopologyDeviceMapSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetTopologyDeviceMapSelect) Float64 ¶
func (ntdms *NetTopologyDeviceMapSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NetTopologyDeviceMapSelect) Float64X ¶
func (ntdms *NetTopologyDeviceMapSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetTopologyDeviceMapSelect) Float64s ¶
func (ntdms *NetTopologyDeviceMapSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NetTopologyDeviceMapSelect) Float64sX ¶
func (ntdms *NetTopologyDeviceMapSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetTopologyDeviceMapSelect) Int ¶
func (ntdms *NetTopologyDeviceMapSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NetTopologyDeviceMapSelect) IntX ¶
func (ntdms *NetTopologyDeviceMapSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetTopologyDeviceMapSelect) Ints ¶
func (ntdms *NetTopologyDeviceMapSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NetTopologyDeviceMapSelect) IntsX ¶
func (ntdms *NetTopologyDeviceMapSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetTopologyDeviceMapSelect) Scan ¶
func (ntdms *NetTopologyDeviceMapSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*NetTopologyDeviceMapSelect) ScanX ¶
func (ntdms *NetTopologyDeviceMapSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetTopologyDeviceMapSelect) String ¶
func (ntdms *NetTopologyDeviceMapSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*NetTopologyDeviceMapSelect) StringX ¶
func (ntdms *NetTopologyDeviceMapSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetTopologyDeviceMapUpdate ¶
type NetTopologyDeviceMapUpdate struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapUpdate is the builder for updating NetTopologyDeviceMap entities.
func (*NetTopologyDeviceMapUpdate) AddEdge ¶
func (ntdmu *NetTopologyDeviceMapUpdate) AddEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapUpdate
AddEdge adds the "edge" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapUpdate) AddEdgeIDs ¶
func (ntdmu *NetTopologyDeviceMapUpdate) AddEdgeIDs(ids ...int) *NetTopologyDeviceMapUpdate
AddEdgeIDs adds the "edge" edge to the NetTopologyDeviceMap entity by IDs.
func (*NetTopologyDeviceMapUpdate) AddPositionX ¶
func (ntdmu *NetTopologyDeviceMapUpdate) AddPositionX(i int) *NetTopologyDeviceMapUpdate
AddPositionX adds i to the "position_x" field.
func (*NetTopologyDeviceMapUpdate) AddPositionY ¶
func (ntdmu *NetTopologyDeviceMapUpdate) AddPositionY(i int) *NetTopologyDeviceMapUpdate
AddPositionY adds i to the "position_y" field.
func (*NetTopologyDeviceMapUpdate) ClearDevice ¶
func (ntdmu *NetTopologyDeviceMapUpdate) ClearDevice() *NetTopologyDeviceMapUpdate
ClearDevice clears the "device" edge to the Device entity.
func (*NetTopologyDeviceMapUpdate) ClearEdgeEdge ¶
func (ntdmu *NetTopologyDeviceMapUpdate) ClearEdgeEdge() *NetTopologyDeviceMapUpdate
ClearEdgeEdge clears all "edge" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapUpdate) ClearOnTopology ¶
func (ntdmu *NetTopologyDeviceMapUpdate) ClearOnTopology() *NetTopologyDeviceMapUpdate
ClearOnTopology clears the "on_topology" edge to the NetTopology entity.
func (*NetTopologyDeviceMapUpdate) Exec ¶
func (ntdmu *NetTopologyDeviceMapUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NetTopologyDeviceMapUpdate) ExecX ¶
func (ntdmu *NetTopologyDeviceMapUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetTopologyDeviceMapUpdate) Mutation ¶
func (ntdmu *NetTopologyDeviceMapUpdate) Mutation() *NetTopologyDeviceMapMutation
Mutation returns the NetTopologyDeviceMapMutation object of the builder.
func (*NetTopologyDeviceMapUpdate) RemoveEdge ¶
func (ntdmu *NetTopologyDeviceMapUpdate) RemoveEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapUpdate
RemoveEdge removes "edge" edges to NetTopologyDeviceMap entities.
func (*NetTopologyDeviceMapUpdate) RemoveEdgeIDs ¶
func (ntdmu *NetTopologyDeviceMapUpdate) RemoveEdgeIDs(ids ...int) *NetTopologyDeviceMapUpdate
RemoveEdgeIDs removes the "edge" edge to NetTopologyDeviceMap entities by IDs.
func (*NetTopologyDeviceMapUpdate) Save ¶
func (ntdmu *NetTopologyDeviceMapUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NetTopologyDeviceMapUpdate) SaveX ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NetTopologyDeviceMapUpdate) SetDevice ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetDevice(d *Device) *NetTopologyDeviceMapUpdate
SetDevice sets the "device" edge to the Device entity.
func (*NetTopologyDeviceMapUpdate) SetDeviceID ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetDeviceID(id int) *NetTopologyDeviceMapUpdate
SetDeviceID sets the "device" edge to the Device entity by ID.
func (*NetTopologyDeviceMapUpdate) SetNillableDeviceID ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetNillableDeviceID(id *int) *NetTopologyDeviceMapUpdate
SetNillableDeviceID sets the "device" edge to the Device entity by ID if the given value is not nil.
func (*NetTopologyDeviceMapUpdate) SetNillableOnTopologyID ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetNillableOnTopologyID(id *int) *NetTopologyDeviceMapUpdate
SetNillableOnTopologyID sets the "on_topology" edge to the NetTopology entity by ID if the given value is not nil.
func (*NetTopologyDeviceMapUpdate) SetNillablePositionX ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetNillablePositionX(i *int) *NetTopologyDeviceMapUpdate
SetNillablePositionX sets the "position_x" field if the given value is not nil.
func (*NetTopologyDeviceMapUpdate) SetNillablePositionY ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetNillablePositionY(i *int) *NetTopologyDeviceMapUpdate
SetNillablePositionY sets the "position_y" field if the given value is not nil.
func (*NetTopologyDeviceMapUpdate) SetOnTopology ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetOnTopology(n *NetTopology) *NetTopologyDeviceMapUpdate
SetOnTopology sets the "on_topology" edge to the NetTopology entity.
func (*NetTopologyDeviceMapUpdate) SetOnTopologyID ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetOnTopologyID(id int) *NetTopologyDeviceMapUpdate
SetOnTopologyID sets the "on_topology" edge to the NetTopology entity by ID.
func (*NetTopologyDeviceMapUpdate) SetPositionX ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetPositionX(i int) *NetTopologyDeviceMapUpdate
SetPositionX sets the "position_x" field.
func (*NetTopologyDeviceMapUpdate) SetPositionY ¶
func (ntdmu *NetTopologyDeviceMapUpdate) SetPositionY(i int) *NetTopologyDeviceMapUpdate
SetPositionY sets the "position_y" field.
func (*NetTopologyDeviceMapUpdate) Where ¶
func (ntdmu *NetTopologyDeviceMapUpdate) Where(ps ...predicate.NetTopologyDeviceMap) *NetTopologyDeviceMapUpdate
Where adds a new predicate for the NetTopologyDeviceMapUpdate builder.
type NetTopologyDeviceMapUpdateOne ¶
type NetTopologyDeviceMapUpdateOne struct {
// contains filtered or unexported fields
}
NetTopologyDeviceMapUpdateOne is the builder for updating a single NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapUpdateOne) AddEdge ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) AddEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapUpdateOne
AddEdge adds the "edge" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapUpdateOne) AddEdgeIDs ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) AddEdgeIDs(ids ...int) *NetTopologyDeviceMapUpdateOne
AddEdgeIDs adds the "edge" edge to the NetTopologyDeviceMap entity by IDs.
func (*NetTopologyDeviceMapUpdateOne) AddPositionX ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) AddPositionX(i int) *NetTopologyDeviceMapUpdateOne
AddPositionX adds i to the "position_x" field.
func (*NetTopologyDeviceMapUpdateOne) AddPositionY ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) AddPositionY(i int) *NetTopologyDeviceMapUpdateOne
AddPositionY adds i to the "position_y" field.
func (*NetTopologyDeviceMapUpdateOne) ClearDevice ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) ClearDevice() *NetTopologyDeviceMapUpdateOne
ClearDevice clears the "device" edge to the Device entity.
func (*NetTopologyDeviceMapUpdateOne) ClearEdgeEdge ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) ClearEdgeEdge() *NetTopologyDeviceMapUpdateOne
ClearEdgeEdge clears all "edge" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapUpdateOne) ClearOnTopology ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) ClearOnTopology() *NetTopologyDeviceMapUpdateOne
ClearOnTopology clears the "on_topology" edge to the NetTopology entity.
func (*NetTopologyDeviceMapUpdateOne) Exec ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NetTopologyDeviceMapUpdateOne) ExecX ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetTopologyDeviceMapUpdateOne) Mutation ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) Mutation() *NetTopologyDeviceMapMutation
Mutation returns the NetTopologyDeviceMapMutation object of the builder.
func (*NetTopologyDeviceMapUpdateOne) RemoveEdge ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) RemoveEdge(n ...*NetTopologyDeviceMap) *NetTopologyDeviceMapUpdateOne
RemoveEdge removes "edge" edges to NetTopologyDeviceMap entities.
func (*NetTopologyDeviceMapUpdateOne) RemoveEdgeIDs ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) RemoveEdgeIDs(ids ...int) *NetTopologyDeviceMapUpdateOne
RemoveEdgeIDs removes the "edge" edge to NetTopologyDeviceMap entities by IDs.
func (*NetTopologyDeviceMapUpdateOne) Save ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) Save(ctx context.Context) (*NetTopologyDeviceMap, error)
Save executes the query and returns the updated NetTopologyDeviceMap entity.
func (*NetTopologyDeviceMapUpdateOne) SaveX ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SaveX(ctx context.Context) *NetTopologyDeviceMap
SaveX is like Save, but panics if an error occurs.
func (*NetTopologyDeviceMapUpdateOne) Select ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) Select(field string, fields ...string) *NetTopologyDeviceMapUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NetTopologyDeviceMapUpdateOne) SetDevice ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetDevice(d *Device) *NetTopologyDeviceMapUpdateOne
SetDevice sets the "device" edge to the Device entity.
func (*NetTopologyDeviceMapUpdateOne) SetDeviceID ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetDeviceID(id int) *NetTopologyDeviceMapUpdateOne
SetDeviceID sets the "device" edge to the Device entity by ID.
func (*NetTopologyDeviceMapUpdateOne) SetNillableDeviceID ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetNillableDeviceID(id *int) *NetTopologyDeviceMapUpdateOne
SetNillableDeviceID sets the "device" edge to the Device entity by ID if the given value is not nil.
func (*NetTopologyDeviceMapUpdateOne) SetNillableOnTopologyID ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetNillableOnTopologyID(id *int) *NetTopologyDeviceMapUpdateOne
SetNillableOnTopologyID sets the "on_topology" edge to the NetTopology entity by ID if the given value is not nil.
func (*NetTopologyDeviceMapUpdateOne) SetNillablePositionX ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetNillablePositionX(i *int) *NetTopologyDeviceMapUpdateOne
SetNillablePositionX sets the "position_x" field if the given value is not nil.
func (*NetTopologyDeviceMapUpdateOne) SetNillablePositionY ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetNillablePositionY(i *int) *NetTopologyDeviceMapUpdateOne
SetNillablePositionY sets the "position_y" field if the given value is not nil.
func (*NetTopologyDeviceMapUpdateOne) SetOnTopology ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetOnTopology(n *NetTopology) *NetTopologyDeviceMapUpdateOne
SetOnTopology sets the "on_topology" edge to the NetTopology entity.
func (*NetTopologyDeviceMapUpdateOne) SetOnTopologyID ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetOnTopologyID(id int) *NetTopologyDeviceMapUpdateOne
SetOnTopologyID sets the "on_topology" edge to the NetTopology entity by ID.
func (*NetTopologyDeviceMapUpdateOne) SetPositionX ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetPositionX(i int) *NetTopologyDeviceMapUpdateOne
SetPositionX sets the "position_x" field.
func (*NetTopologyDeviceMapUpdateOne) SetPositionY ¶
func (ntdmuo *NetTopologyDeviceMapUpdateOne) SetPositionY(i int) *NetTopologyDeviceMapUpdateOne
SetPositionY sets the "position_y" field.
type NetTopologyDeviceMaps ¶
type NetTopologyDeviceMaps []*NetTopologyDeviceMap
NetTopologyDeviceMaps is a parsable slice of NetTopologyDeviceMap.
type NetTopologyEdges ¶
type NetTopologyEdges struct { // Topology holds the value of the topology edge. Topology []*NetTopologyDeviceMap `json:"topology,omitempty"` // contains filtered or unexported fields }
NetTopologyEdges holds the relations/edges for other nodes in the graph.
func (NetTopologyEdges) TopologyOrErr ¶
func (e NetTopologyEdges) TopologyOrErr() ([]*NetTopologyDeviceMap, error)
TopologyOrErr returns the Topology value or an error if the edge was not loaded in eager-loading.
type NetTopologyGroupBy ¶
type NetTopologyGroupBy struct {
// contains filtered or unexported fields
}
NetTopologyGroupBy is the group-by builder for NetTopology entities.
func (*NetTopologyGroupBy) Aggregate ¶
func (ntgb *NetTopologyGroupBy) Aggregate(fns ...AggregateFunc) *NetTopologyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NetTopologyGroupBy) Bool ¶
func (ntgb *NetTopologyGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetTopologyGroupBy) BoolX ¶
func (ntgb *NetTopologyGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetTopologyGroupBy) Bools ¶
func (ntgb *NetTopologyGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*NetTopologyGroupBy) BoolsX ¶
func (ntgb *NetTopologyGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetTopologyGroupBy) Float64 ¶
func (ntgb *NetTopologyGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetTopologyGroupBy) Float64X ¶
func (ntgb *NetTopologyGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetTopologyGroupBy) Float64s ¶
func (ntgb *NetTopologyGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*NetTopologyGroupBy) Float64sX ¶
func (ntgb *NetTopologyGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetTopologyGroupBy) Int ¶
func (ntgb *NetTopologyGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetTopologyGroupBy) IntX ¶
func (ntgb *NetTopologyGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetTopologyGroupBy) Ints ¶
func (ntgb *NetTopologyGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*NetTopologyGroupBy) IntsX ¶
func (ntgb *NetTopologyGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetTopologyGroupBy) Scan ¶
func (ntgb *NetTopologyGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*NetTopologyGroupBy) ScanX ¶
func (ntgb *NetTopologyGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetTopologyGroupBy) String ¶
func (ntgb *NetTopologyGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*NetTopologyGroupBy) StringX ¶
func (ntgb *NetTopologyGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetTopologyMutation ¶
type NetTopologyMutation struct {
// contains filtered or unexported fields
}
NetTopologyMutation represents an operation that mutates the NetTopology nodes in the graph.
func (*NetTopologyMutation) AddField ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) AddTopologyIDs ¶
func (m *NetTopologyMutation) AddTopologyIDs(ids ...int)
AddTopologyIDs adds the "topology" edge to the NetTopologyDeviceMap entity by ids.
func (*NetTopologyMutation) AddedEdges ¶
func (m *NetTopologyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NetTopologyMutation) AddedField ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) AddedFields ¶
func (m *NetTopologyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NetTopologyMutation) AddedIDs ¶
func (m *NetTopologyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NetTopologyMutation) ClearEdge ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) ClearField ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) ClearTopology ¶
func (m *NetTopologyMutation) ClearTopology()
ClearTopology clears the "topology" edge to the NetTopologyDeviceMap entity.
func (*NetTopologyMutation) ClearedEdges ¶
func (m *NetTopologyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NetTopologyMutation) ClearedFields ¶
func (m *NetTopologyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NetTopologyMutation) Client ¶
func (m NetTopologyMutation) 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 (*NetTopologyMutation) EdgeCleared ¶
func (m *NetTopologyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NetTopologyMutation) Field ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) FieldCleared ¶
func (m *NetTopologyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NetTopologyMutation) Fields ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) ID ¶
func (m *NetTopologyMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*NetTopologyMutation) 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 (*NetTopologyMutation) OldTopologyDescription ¶
func (m *NetTopologyMutation) OldTopologyDescription(ctx context.Context) (v string, err error)
OldTopologyDescription returns the old "topology_description" field's value of the NetTopology entity. If the NetTopology object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NetTopologyMutation) OldTopologyName ¶
func (m *NetTopologyMutation) OldTopologyName(ctx context.Context) (v string, err error)
OldTopologyName returns the old "topology_name" field's value of the NetTopology entity. If the NetTopology object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NetTopologyMutation) Op ¶
func (m *NetTopologyMutation) Op() Op
Op returns the operation name.
func (*NetTopologyMutation) RemoveTopologyIDs ¶
func (m *NetTopologyMutation) RemoveTopologyIDs(ids ...int)
RemoveTopologyIDs removes the "topology" edge to the NetTopologyDeviceMap entity by IDs.
func (*NetTopologyMutation) RemovedEdges ¶
func (m *NetTopologyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NetTopologyMutation) RemovedIDs ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) RemovedTopologyIDs ¶
func (m *NetTopologyMutation) RemovedTopologyIDs() (ids []int)
RemovedTopology returns the removed IDs of the "topology" edge to the NetTopologyDeviceMap entity.
func (*NetTopologyMutation) ResetEdge ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) ResetField ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) ResetTopology ¶
func (m *NetTopologyMutation) ResetTopology()
ResetTopology resets all changes to the "topology" edge.
func (*NetTopologyMutation) ResetTopologyDescription ¶
func (m *NetTopologyMutation) ResetTopologyDescription()
ResetTopologyDescription resets all changes to the "topology_description" field.
func (*NetTopologyMutation) ResetTopologyName ¶
func (m *NetTopologyMutation) ResetTopologyName()
ResetTopologyName resets all changes to the "topology_name" field.
func (*NetTopologyMutation) SetField ¶
func (m *NetTopologyMutation) 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 (*NetTopologyMutation) SetTopologyDescription ¶
func (m *NetTopologyMutation) SetTopologyDescription(s string)
SetTopologyDescription sets the "topology_description" field.
func (*NetTopologyMutation) SetTopologyName ¶
func (m *NetTopologyMutation) SetTopologyName(s string)
SetTopologyName sets the "topology_name" field.
func (*NetTopologyMutation) TopologyCleared ¶
func (m *NetTopologyMutation) TopologyCleared() bool
TopologyCleared reports if the "topology" edge to the NetTopologyDeviceMap entity was cleared.
func (*NetTopologyMutation) TopologyDescription ¶
func (m *NetTopologyMutation) TopologyDescription() (r string, exists bool)
TopologyDescription returns the value of the "topology_description" field in the mutation.
func (*NetTopologyMutation) TopologyIDs ¶
func (m *NetTopologyMutation) TopologyIDs() (ids []int)
TopologyIDs returns the "topology" edge IDs in the mutation.
func (*NetTopologyMutation) TopologyName ¶
func (m *NetTopologyMutation) TopologyName() (r string, exists bool)
TopologyName returns the value of the "topology_name" field in the mutation.
func (NetTopologyMutation) Tx ¶
func (m NetTopologyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NetTopologyMutation) Type ¶
func (m *NetTopologyMutation) Type() string
Type returns the node type of this mutation (NetTopology).
type NetTopologyQuery ¶
type NetTopologyQuery struct {
// contains filtered or unexported fields
}
NetTopologyQuery is the builder for querying NetTopology entities.
func (*NetTopologyQuery) All ¶
func (ntq *NetTopologyQuery) All(ctx context.Context) ([]*NetTopology, error)
All executes the query and returns a list of NetTopologies.
func (*NetTopologyQuery) AllX ¶
func (ntq *NetTopologyQuery) AllX(ctx context.Context) []*NetTopology
AllX is like All, but panics if an error occurs.
func (*NetTopologyQuery) Clone ¶
func (ntq *NetTopologyQuery) Clone() *NetTopologyQuery
Clone returns a duplicate of the NetTopologyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NetTopologyQuery) Count ¶
func (ntq *NetTopologyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NetTopologyQuery) CountX ¶
func (ntq *NetTopologyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NetTopologyQuery) Exist ¶
func (ntq *NetTopologyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NetTopologyQuery) ExistX ¶
func (ntq *NetTopologyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NetTopologyQuery) First ¶
func (ntq *NetTopologyQuery) First(ctx context.Context) (*NetTopology, error)
First returns the first NetTopology entity from the query. Returns a *NotFoundError when no NetTopology was found.
func (*NetTopologyQuery) FirstID ¶
func (ntq *NetTopologyQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NetTopology ID from the query. Returns a *NotFoundError when no NetTopology ID was found.
func (*NetTopologyQuery) FirstIDX ¶
func (ntq *NetTopologyQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NetTopologyQuery) FirstX ¶
func (ntq *NetTopologyQuery) FirstX(ctx context.Context) *NetTopology
FirstX is like First, but panics if an error occurs.
func (*NetTopologyQuery) GroupBy ¶
func (ntq *NetTopologyQuery) GroupBy(field string, fields ...string) *NetTopologyGroupBy
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 { TopologyName string `json:"topology_name,omitempty"` Count int `json:"count,omitempty"` } client.NetTopology.Query(). GroupBy(nettopology.FieldTopologyName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NetTopologyQuery) IDs ¶
func (ntq *NetTopologyQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NetTopology IDs.
func (*NetTopologyQuery) IDsX ¶
func (ntq *NetTopologyQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NetTopologyQuery) Limit ¶
func (ntq *NetTopologyQuery) Limit(limit int) *NetTopologyQuery
Limit adds a limit step to the query.
func (*NetTopologyQuery) Offset ¶
func (ntq *NetTopologyQuery) Offset(offset int) *NetTopologyQuery
Offset adds an offset step to the query.
func (*NetTopologyQuery) Only ¶
func (ntq *NetTopologyQuery) Only(ctx context.Context) (*NetTopology, error)
Only returns a single NetTopology entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one NetTopology entity is not found. Returns a *NotFoundError when no NetTopology entities are found.
func (*NetTopologyQuery) OnlyID ¶
func (ntq *NetTopologyQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NetTopology ID in the query. Returns a *NotSingularError when exactly one NetTopology ID is not found. Returns a *NotFoundError when no entities are found.
func (*NetTopologyQuery) OnlyIDX ¶
func (ntq *NetTopologyQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NetTopologyQuery) OnlyX ¶
func (ntq *NetTopologyQuery) OnlyX(ctx context.Context) *NetTopology
OnlyX is like Only, but panics if an error occurs.
func (*NetTopologyQuery) Order ¶
func (ntq *NetTopologyQuery) Order(o ...OrderFunc) *NetTopologyQuery
Order adds an order step to the query.
func (*NetTopologyQuery) QueryTopology ¶
func (ntq *NetTopologyQuery) QueryTopology() *NetTopologyDeviceMapQuery
QueryTopology chains the current query on the "topology" edge.
func (*NetTopologyQuery) Select ¶
func (ntq *NetTopologyQuery) Select(field string, fields ...string) *NetTopologySelect
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 { TopologyName string `json:"topology_name,omitempty"` } client.NetTopology.Query(). Select(nettopology.FieldTopologyName). Scan(ctx, &v)
func (*NetTopologyQuery) Unique ¶
func (ntq *NetTopologyQuery) Unique(unique bool) *NetTopologyQuery
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 (*NetTopologyQuery) Where ¶
func (ntq *NetTopologyQuery) Where(ps ...predicate.NetTopology) *NetTopologyQuery
Where adds a new predicate for the NetTopologyQuery builder.
func (*NetTopologyQuery) WithTopology ¶
func (ntq *NetTopologyQuery) WithTopology(opts ...func(*NetTopologyDeviceMapQuery)) *NetTopologyQuery
WithTopology tells the query-builder to eager-load the nodes that are connected to the "topology" edge. The optional arguments are used to configure the query builder of the edge.
type NetTopologySelect ¶
type NetTopologySelect struct { *NetTopologyQuery // contains filtered or unexported fields }
NetTopologySelect is the builder for selecting fields of NetTopology entities.
func (*NetTopologySelect) Bool ¶
func (nts *NetTopologySelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NetTopologySelect) BoolX ¶
func (nts *NetTopologySelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*NetTopologySelect) Bools ¶
func (nts *NetTopologySelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NetTopologySelect) BoolsX ¶
func (nts *NetTopologySelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*NetTopologySelect) Float64 ¶
func (nts *NetTopologySelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NetTopologySelect) Float64X ¶
func (nts *NetTopologySelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*NetTopologySelect) Float64s ¶
func (nts *NetTopologySelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NetTopologySelect) Float64sX ¶
func (nts *NetTopologySelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*NetTopologySelect) Int ¶
func (nts *NetTopologySelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NetTopologySelect) IntX ¶
func (nts *NetTopologySelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*NetTopologySelect) Ints ¶
func (nts *NetTopologySelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NetTopologySelect) IntsX ¶
func (nts *NetTopologySelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*NetTopologySelect) Scan ¶
func (nts *NetTopologySelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*NetTopologySelect) ScanX ¶
func (nts *NetTopologySelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*NetTopologySelect) String ¶
func (nts *NetTopologySelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*NetTopologySelect) StringX ¶
func (nts *NetTopologySelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type NetTopologyUpdate ¶
type NetTopologyUpdate struct {
// contains filtered or unexported fields
}
NetTopologyUpdate is the builder for updating NetTopology entities.
func (*NetTopologyUpdate) AddTopology ¶
func (ntu *NetTopologyUpdate) AddTopology(n ...*NetTopologyDeviceMap) *NetTopologyUpdate
AddTopology adds the "topology" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyUpdate) AddTopologyIDs ¶
func (ntu *NetTopologyUpdate) AddTopologyIDs(ids ...int) *NetTopologyUpdate
AddTopologyIDs adds the "topology" edge to the NetTopologyDeviceMap entity by IDs.
func (*NetTopologyUpdate) ClearTopology ¶
func (ntu *NetTopologyUpdate) ClearTopology() *NetTopologyUpdate
ClearTopology clears all "topology" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyUpdate) Exec ¶
func (ntu *NetTopologyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NetTopologyUpdate) ExecX ¶
func (ntu *NetTopologyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetTopologyUpdate) Mutation ¶
func (ntu *NetTopologyUpdate) Mutation() *NetTopologyMutation
Mutation returns the NetTopologyMutation object of the builder.
func (*NetTopologyUpdate) RemoveTopology ¶
func (ntu *NetTopologyUpdate) RemoveTopology(n ...*NetTopologyDeviceMap) *NetTopologyUpdate
RemoveTopology removes "topology" edges to NetTopologyDeviceMap entities.
func (*NetTopologyUpdate) RemoveTopologyIDs ¶
func (ntu *NetTopologyUpdate) RemoveTopologyIDs(ids ...int) *NetTopologyUpdate
RemoveTopologyIDs removes the "topology" edge to NetTopologyDeviceMap entities by IDs.
func (*NetTopologyUpdate) Save ¶
func (ntu *NetTopologyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NetTopologyUpdate) SaveX ¶
func (ntu *NetTopologyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NetTopologyUpdate) SetTopologyDescription ¶
func (ntu *NetTopologyUpdate) SetTopologyDescription(s string) *NetTopologyUpdate
SetTopologyDescription sets the "topology_description" field.
func (*NetTopologyUpdate) SetTopologyName ¶
func (ntu *NetTopologyUpdate) SetTopologyName(s string) *NetTopologyUpdate
SetTopologyName sets the "topology_name" field.
func (*NetTopologyUpdate) Where ¶
func (ntu *NetTopologyUpdate) Where(ps ...predicate.NetTopology) *NetTopologyUpdate
Where adds a new predicate for the NetTopologyUpdate builder.
type NetTopologyUpdateOne ¶
type NetTopologyUpdateOne struct {
// contains filtered or unexported fields
}
NetTopologyUpdateOne is the builder for updating a single NetTopology entity.
func (*NetTopologyUpdateOne) AddTopology ¶
func (ntuo *NetTopologyUpdateOne) AddTopology(n ...*NetTopologyDeviceMap) *NetTopologyUpdateOne
AddTopology adds the "topology" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyUpdateOne) AddTopologyIDs ¶
func (ntuo *NetTopologyUpdateOne) AddTopologyIDs(ids ...int) *NetTopologyUpdateOne
AddTopologyIDs adds the "topology" edge to the NetTopologyDeviceMap entity by IDs.
func (*NetTopologyUpdateOne) ClearTopology ¶
func (ntuo *NetTopologyUpdateOne) ClearTopology() *NetTopologyUpdateOne
ClearTopology clears all "topology" edges to the NetTopologyDeviceMap entity.
func (*NetTopologyUpdateOne) Exec ¶
func (ntuo *NetTopologyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NetTopologyUpdateOne) ExecX ¶
func (ntuo *NetTopologyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NetTopologyUpdateOne) Mutation ¶
func (ntuo *NetTopologyUpdateOne) Mutation() *NetTopologyMutation
Mutation returns the NetTopologyMutation object of the builder.
func (*NetTopologyUpdateOne) RemoveTopology ¶
func (ntuo *NetTopologyUpdateOne) RemoveTopology(n ...*NetTopologyDeviceMap) *NetTopologyUpdateOne
RemoveTopology removes "topology" edges to NetTopologyDeviceMap entities.
func (*NetTopologyUpdateOne) RemoveTopologyIDs ¶
func (ntuo *NetTopologyUpdateOne) RemoveTopologyIDs(ids ...int) *NetTopologyUpdateOne
RemoveTopologyIDs removes the "topology" edge to NetTopologyDeviceMap entities by IDs.
func (*NetTopologyUpdateOne) Save ¶
func (ntuo *NetTopologyUpdateOne) Save(ctx context.Context) (*NetTopology, error)
Save executes the query and returns the updated NetTopology entity.
func (*NetTopologyUpdateOne) SaveX ¶
func (ntuo *NetTopologyUpdateOne) SaveX(ctx context.Context) *NetTopology
SaveX is like Save, but panics if an error occurs.
func (*NetTopologyUpdateOne) Select ¶
func (ntuo *NetTopologyUpdateOne) Select(field string, fields ...string) *NetTopologyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NetTopologyUpdateOne) SetTopologyDescription ¶
func (ntuo *NetTopologyUpdateOne) SetTopologyDescription(s string) *NetTopologyUpdateOne
SetTopologyDescription sets the "topology_description" field.
func (*NetTopologyUpdateOne) SetTopologyName ¶
func (ntuo *NetTopologyUpdateOne) SetTopologyName(s string) *NetTopologyUpdateOne
SetTopologyName sets the "topology_name" field.
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 PortChannelInterface ¶ added in v0.2.0
type PortChannelInterface struct { // ID of the ent. ID int `json:"id,omitempty"` // PoInterfaceID holds the value of the "po_interface_id" field. PoInterfaceID int `json:"po_interface_id,omitempty"` // PoInterfaceShutdown holds the value of the "po_interface_shutdown" field. PoInterfaceShutdown bool `json:"po_interface_shutdown,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PortChannelInterfaceQuery when eager-loading is set. Edges PortChannelInterfaceEdges `json:"edges"` // contains filtered or unexported fields }
PortChannelInterface is the model entity for the PortChannelInterface schema.
func (*PortChannelInterface) QueryHaveVlans ¶ added in v0.2.0
func (pci *PortChannelInterface) QueryHaveVlans() *VlanQuery
QueryHaveVlans queries the "have_vlans" edge of the PortChannelInterface entity.
func (*PortChannelInterface) QueryInterfaces ¶ added in v0.2.0
func (pci *PortChannelInterface) QueryInterfaces() *NetInterfaceQuery
QueryInterfaces queries the "interfaces" edge of the PortChannelInterface entity.
func (*PortChannelInterface) QueryMode ¶ added in v0.2.0
func (pci *PortChannelInterface) QueryMode() *NetInterfaceModeQuery
QueryMode queries the "mode" edge of the PortChannelInterface entity.
func (*PortChannelInterface) QueryNativeOnVlan ¶ added in v0.2.0
func (pci *PortChannelInterface) QueryNativeOnVlan() *VlanQuery
QueryNativeOnVlan queries the "native_on_vlan" edge of the PortChannelInterface entity.
func (*PortChannelInterface) QueryOnDevice ¶ added in v0.2.0
func (pci *PortChannelInterface) QueryOnDevice() *DeviceQuery
QueryOnDevice queries the "on_device" edge of the PortChannelInterface entity.
func (*PortChannelInterface) QueryOnIPAddress ¶ added in v0.2.0
func (pci *PortChannelInterface) QueryOnIPAddress() *IPAddressQuery
QueryOnIPAddress queries the "on_ip_address" edge of the PortChannelInterface entity.
func (*PortChannelInterface) QueryOnLayer ¶ added in v0.2.0
func (pci *PortChannelInterface) QueryOnLayer() *NetInterfaceLayerQuery
QueryOnLayer queries the "on_layer" edge of the PortChannelInterface entity.
func (*PortChannelInterface) String ¶ added in v0.2.0
func (pci *PortChannelInterface) String() string
String implements the fmt.Stringer.
func (*PortChannelInterface) Unwrap ¶ added in v0.2.0
func (pci *PortChannelInterface) Unwrap() *PortChannelInterface
Unwrap unwraps the PortChannelInterface 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 (*PortChannelInterface) Update ¶ added in v0.2.0
func (pci *PortChannelInterface) Update() *PortChannelInterfaceUpdateOne
Update returns a builder for updating this PortChannelInterface. Note that you need to call PortChannelInterface.Unwrap() before calling this method if this PortChannelInterface was returned from a transaction, and the transaction was committed or rolled back.
type PortChannelInterfaceClient ¶ added in v0.2.0
type PortChannelInterfaceClient struct {
// contains filtered or unexported fields
}
PortChannelInterfaceClient is a client for the PortChannelInterface schema.
func NewPortChannelInterfaceClient ¶ added in v0.2.0
func NewPortChannelInterfaceClient(c config) *PortChannelInterfaceClient
NewPortChannelInterfaceClient returns a client for the PortChannelInterface from the given config.
func (*PortChannelInterfaceClient) Create ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) Create() *PortChannelInterfaceCreate
Create returns a create builder for PortChannelInterface.
func (*PortChannelInterfaceClient) CreateBulk ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) CreateBulk(builders ...*PortChannelInterfaceCreate) *PortChannelInterfaceCreateBulk
CreateBulk returns a builder for creating a bulk of PortChannelInterface entities.
func (*PortChannelInterfaceClient) Delete ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) Delete() *PortChannelInterfaceDelete
Delete returns a delete builder for PortChannelInterface.
func (*PortChannelInterfaceClient) DeleteOne ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) DeleteOne(pci *PortChannelInterface) *PortChannelInterfaceDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*PortChannelInterfaceClient) DeleteOneID ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) DeleteOneID(id int) *PortChannelInterfaceDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*PortChannelInterfaceClient) Get ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) Get(ctx context.Context, id int) (*PortChannelInterface, error)
Get returns a PortChannelInterface entity by its id.
func (*PortChannelInterfaceClient) GetX ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) GetX(ctx context.Context, id int) *PortChannelInterface
GetX is like Get, but panics if an error occurs.
func (*PortChannelInterfaceClient) Hooks ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PortChannelInterfaceClient) Query ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) Query() *PortChannelInterfaceQuery
Query returns a query builder for PortChannelInterface.
func (*PortChannelInterfaceClient) QueryHaveVlans ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) QueryHaveVlans(pci *PortChannelInterface) *VlanQuery
QueryHaveVlans queries the have_vlans edge of a PortChannelInterface.
func (*PortChannelInterfaceClient) QueryInterfaces ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) QueryInterfaces(pci *PortChannelInterface) *NetInterfaceQuery
QueryInterfaces queries the interfaces edge of a PortChannelInterface.
func (*PortChannelInterfaceClient) QueryMode ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) QueryMode(pci *PortChannelInterface) *NetInterfaceModeQuery
QueryMode queries the mode edge of a PortChannelInterface.
func (*PortChannelInterfaceClient) QueryNativeOnVlan ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) QueryNativeOnVlan(pci *PortChannelInterface) *VlanQuery
QueryNativeOnVlan queries the native_on_vlan edge of a PortChannelInterface.
func (*PortChannelInterfaceClient) QueryOnDevice ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) QueryOnDevice(pci *PortChannelInterface) *DeviceQuery
QueryOnDevice queries the on_device edge of a PortChannelInterface.
func (*PortChannelInterfaceClient) QueryOnIPAddress ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) QueryOnIPAddress(pci *PortChannelInterface) *IPAddressQuery
QueryOnIPAddress queries the on_ip_address edge of a PortChannelInterface.
func (*PortChannelInterfaceClient) QueryOnLayer ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) QueryOnLayer(pci *PortChannelInterface) *NetInterfaceLayerQuery
QueryOnLayer queries the on_layer edge of a PortChannelInterface.
func (*PortChannelInterfaceClient) Update ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) Update() *PortChannelInterfaceUpdate
Update returns an update builder for PortChannelInterface.
func (*PortChannelInterfaceClient) UpdateOne ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) UpdateOne(pci *PortChannelInterface) *PortChannelInterfaceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PortChannelInterfaceClient) UpdateOneID ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) UpdateOneID(id int) *PortChannelInterfaceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PortChannelInterfaceClient) Use ¶ added in v0.2.0
func (c *PortChannelInterfaceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `portchannelinterface.Hooks(f(g(h())))`.
type PortChannelInterfaceCreate ¶ added in v0.2.0
type PortChannelInterfaceCreate struct {
// contains filtered or unexported fields
}
PortChannelInterfaceCreate is the builder for creating a PortChannelInterface entity.
func (*PortChannelInterfaceCreate) AddHaveVlanIDs ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) AddHaveVlanIDs(ids ...int) *PortChannelInterfaceCreate
AddHaveVlanIDs adds the "have_vlans" edge to the Vlan entity by IDs.
func (*PortChannelInterfaceCreate) AddHaveVlans ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) AddHaveVlans(v ...*Vlan) *PortChannelInterfaceCreate
AddHaveVlans adds the "have_vlans" edges to the Vlan entity.
func (*PortChannelInterfaceCreate) AddInterfaceIDs ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) AddInterfaceIDs(ids ...int) *PortChannelInterfaceCreate
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by IDs.
func (*PortChannelInterfaceCreate) AddInterfaces ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) AddInterfaces(n ...*NetInterface) *PortChannelInterfaceCreate
AddInterfaces adds the "interfaces" edges to the NetInterface entity.
func (*PortChannelInterfaceCreate) Mutation ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) Mutation() *PortChannelInterfaceMutation
Mutation returns the PortChannelInterfaceMutation object of the builder.
func (*PortChannelInterfaceCreate) Save ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) Save(ctx context.Context) (*PortChannelInterface, error)
Save creates the PortChannelInterface in the database.
func (*PortChannelInterfaceCreate) SaveX ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SaveX(ctx context.Context) *PortChannelInterface
SaveX calls Save and panics if Save returns an error.
func (*PortChannelInterfaceCreate) SetMode ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetMode(n *NetInterfaceMode) *PortChannelInterfaceCreate
SetMode sets the "mode" edge to the NetInterfaceMode entity.
func (*PortChannelInterfaceCreate) SetModeID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetModeID(id int) *PortChannelInterfaceCreate
SetModeID sets the "mode" edge to the NetInterfaceMode entity by ID.
func (*PortChannelInterfaceCreate) SetNativeOnVlan ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetNativeOnVlan(v *Vlan) *PortChannelInterfaceCreate
SetNativeOnVlan sets the "native_on_vlan" edge to the Vlan entity.
func (*PortChannelInterfaceCreate) SetNativeOnVlanID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetNativeOnVlanID(id int) *PortChannelInterfaceCreate
SetNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID.
func (*PortChannelInterfaceCreate) SetNillableModeID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetNillableModeID(id *int) *PortChannelInterfaceCreate
SetNillableModeID sets the "mode" edge to the NetInterfaceMode entity by ID if the given value is not nil.
func (*PortChannelInterfaceCreate) SetNillableNativeOnVlanID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetNillableNativeOnVlanID(id *int) *PortChannelInterfaceCreate
SetNillableNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID if the given value is not nil.
func (*PortChannelInterfaceCreate) SetNillableOnDeviceID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetNillableOnDeviceID(id *int) *PortChannelInterfaceCreate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*PortChannelInterfaceCreate) SetNillableOnIPAddressID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetNillableOnIPAddressID(id *int) *PortChannelInterfaceCreate
SetNillableOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID if the given value is not nil.
func (*PortChannelInterfaceCreate) SetNillableOnLayerID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetNillableOnLayerID(id *int) *PortChannelInterfaceCreate
SetNillableOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID if the given value is not nil.
func (*PortChannelInterfaceCreate) SetNillablePoInterfaceShutdown ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetNillablePoInterfaceShutdown(b *bool) *PortChannelInterfaceCreate
SetNillablePoInterfaceShutdown sets the "po_interface_shutdown" field if the given value is not nil.
func (*PortChannelInterfaceCreate) SetOnDevice ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetOnDevice(d *Device) *PortChannelInterfaceCreate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*PortChannelInterfaceCreate) SetOnDeviceID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetOnDeviceID(id int) *PortChannelInterfaceCreate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*PortChannelInterfaceCreate) SetOnIPAddress ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetOnIPAddress(i *IPAddress) *PortChannelInterfaceCreate
SetOnIPAddress sets the "on_ip_address" edge to the IPAddress entity.
func (*PortChannelInterfaceCreate) SetOnIPAddressID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetOnIPAddressID(id int) *PortChannelInterfaceCreate
SetOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID.
func (*PortChannelInterfaceCreate) SetOnLayer ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetOnLayer(n *NetInterfaceLayer) *PortChannelInterfaceCreate
SetOnLayer sets the "on_layer" edge to the NetInterfaceLayer entity.
func (*PortChannelInterfaceCreate) SetOnLayerID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetOnLayerID(id int) *PortChannelInterfaceCreate
SetOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID.
func (*PortChannelInterfaceCreate) SetPoInterfaceID ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetPoInterfaceID(i int) *PortChannelInterfaceCreate
SetPoInterfaceID sets the "po_interface_id" field.
func (*PortChannelInterfaceCreate) SetPoInterfaceShutdown ¶ added in v0.2.0
func (pcic *PortChannelInterfaceCreate) SetPoInterfaceShutdown(b bool) *PortChannelInterfaceCreate
SetPoInterfaceShutdown sets the "po_interface_shutdown" field.
type PortChannelInterfaceCreateBulk ¶ added in v0.2.0
type PortChannelInterfaceCreateBulk struct {
// contains filtered or unexported fields
}
PortChannelInterfaceCreateBulk is the builder for creating many PortChannelInterface entities in bulk.
func (*PortChannelInterfaceCreateBulk) Save ¶ added in v0.2.0
func (pcicb *PortChannelInterfaceCreateBulk) Save(ctx context.Context) ([]*PortChannelInterface, error)
Save creates the PortChannelInterface entities in the database.
func (*PortChannelInterfaceCreateBulk) SaveX ¶ added in v0.2.0
func (pcicb *PortChannelInterfaceCreateBulk) SaveX(ctx context.Context) []*PortChannelInterface
SaveX is like Save, but panics if an error occurs.
type PortChannelInterfaceDelete ¶ added in v0.2.0
type PortChannelInterfaceDelete struct {
// contains filtered or unexported fields
}
PortChannelInterfaceDelete is the builder for deleting a PortChannelInterface entity.
func (*PortChannelInterfaceDelete) Exec ¶ added in v0.2.0
func (pcid *PortChannelInterfaceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PortChannelInterfaceDelete) ExecX ¶ added in v0.2.0
func (pcid *PortChannelInterfaceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PortChannelInterfaceDelete) Where ¶ added in v0.2.0
func (pcid *PortChannelInterfaceDelete) Where(ps ...predicate.PortChannelInterface) *PortChannelInterfaceDelete
Where adds a new predicate to the PortChannelInterfaceDelete builder.
type PortChannelInterfaceDeleteOne ¶ added in v0.2.0
type PortChannelInterfaceDeleteOne struct {
// contains filtered or unexported fields
}
PortChannelInterfaceDeleteOne is the builder for deleting a single PortChannelInterface entity.
func (*PortChannelInterfaceDeleteOne) Exec ¶ added in v0.2.0
func (pcido *PortChannelInterfaceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PortChannelInterfaceDeleteOne) ExecX ¶ added in v0.2.0
func (pcido *PortChannelInterfaceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PortChannelInterfaceEdges ¶ added in v0.2.0
type PortChannelInterfaceEdges struct { // Mode holds the value of the mode edge. Mode *NetInterfaceMode `json:"mode,omitempty"` // OnLayer holds the value of the on_layer edge. OnLayer *NetInterfaceLayer `json:"on_layer,omitempty"` // HaveVlans holds the value of the have_vlans edge. HaveVlans []*Vlan `json:"have_vlans,omitempty"` // NativeOnVlan holds the value of the native_on_vlan edge. NativeOnVlan *Vlan `json:"native_on_vlan,omitempty"` // OnDevice holds the value of the on_device edge. OnDevice *Device `json:"on_device,omitempty"` // OnIPAddress holds the value of the on_ip_address edge. OnIPAddress *IPAddress `json:"on_ip_address,omitempty"` // Interfaces holds the value of the interfaces edge. Interfaces []*NetInterface `json:"interfaces,omitempty"` // contains filtered or unexported fields }
PortChannelInterfaceEdges holds the relations/edges for other nodes in the graph.
func (PortChannelInterfaceEdges) HaveVlansOrErr ¶ added in v0.2.0
func (e PortChannelInterfaceEdges) HaveVlansOrErr() ([]*Vlan, error)
HaveVlansOrErr returns the HaveVlans value or an error if the edge was not loaded in eager-loading.
func (PortChannelInterfaceEdges) InterfacesOrErr ¶ added in v0.2.0
func (e PortChannelInterfaceEdges) InterfacesOrErr() ([]*NetInterface, error)
InterfacesOrErr returns the Interfaces value or an error if the edge was not loaded in eager-loading.
func (PortChannelInterfaceEdges) ModeOrErr ¶ added in v0.2.0
func (e PortChannelInterfaceEdges) ModeOrErr() (*NetInterfaceMode, error)
ModeOrErr returns the Mode value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PortChannelInterfaceEdges) NativeOnVlanOrErr ¶ added in v0.2.0
func (e PortChannelInterfaceEdges) NativeOnVlanOrErr() (*Vlan, error)
NativeOnVlanOrErr returns the NativeOnVlan value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PortChannelInterfaceEdges) OnDeviceOrErr ¶ added in v0.2.0
func (e PortChannelInterfaceEdges) OnDeviceOrErr() (*Device, error)
OnDeviceOrErr returns the OnDevice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PortChannelInterfaceEdges) OnIPAddressOrErr ¶ added in v0.2.0
func (e PortChannelInterfaceEdges) OnIPAddressOrErr() (*IPAddress, error)
OnIPAddressOrErr returns the OnIPAddress value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PortChannelInterfaceEdges) OnLayerOrErr ¶ added in v0.2.0
func (e PortChannelInterfaceEdges) OnLayerOrErr() (*NetInterfaceLayer, error)
OnLayerOrErr returns the OnLayer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PortChannelInterfaceGroupBy ¶ added in v0.2.0
type PortChannelInterfaceGroupBy struct {
// contains filtered or unexported fields
}
PortChannelInterfaceGroupBy is the group-by builder for PortChannelInterface entities.
func (*PortChannelInterfaceGroupBy) Aggregate ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Aggregate(fns ...AggregateFunc) *PortChannelInterfaceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PortChannelInterfaceGroupBy) Bool ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*PortChannelInterfaceGroupBy) BoolX ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*PortChannelInterfaceGroupBy) Bools ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*PortChannelInterfaceGroupBy) BoolsX ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PortChannelInterfaceGroupBy) Float64 ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*PortChannelInterfaceGroupBy) Float64X ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*PortChannelInterfaceGroupBy) Float64s ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*PortChannelInterfaceGroupBy) Float64sX ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PortChannelInterfaceGroupBy) Int ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*PortChannelInterfaceGroupBy) IntX ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*PortChannelInterfaceGroupBy) Ints ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*PortChannelInterfaceGroupBy) IntsX ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PortChannelInterfaceGroupBy) Scan ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*PortChannelInterfaceGroupBy) ScanX ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*PortChannelInterfaceGroupBy) String ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*PortChannelInterfaceGroupBy) StringX ¶ added in v0.2.0
func (pcigb *PortChannelInterfaceGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type PortChannelInterfaceMutation ¶ added in v0.2.0
type PortChannelInterfaceMutation struct {
// contains filtered or unexported fields
}
PortChannelInterfaceMutation represents an operation that mutates the PortChannelInterface nodes in the graph.
func (*PortChannelInterfaceMutation) AddField ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) AddHaveVlanIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) AddHaveVlanIDs(ids ...int)
AddHaveVlanIDs adds the "have_vlans" edge to the Vlan entity by ids.
func (*PortChannelInterfaceMutation) AddInterfaceIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) AddInterfaceIDs(ids ...int)
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by ids.
func (*PortChannelInterfaceMutation) AddPoInterfaceID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) AddPoInterfaceID(i int)
AddPoInterfaceID adds i to the "po_interface_id" field.
func (*PortChannelInterfaceMutation) AddedEdges ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PortChannelInterfaceMutation) AddedField ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) AddedFields ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PortChannelInterfaceMutation) AddedIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PortChannelInterfaceMutation) AddedPoInterfaceID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) AddedPoInterfaceID() (r int, exists bool)
AddedPoInterfaceID returns the value that was added to the "po_interface_id" field in this mutation.
func (*PortChannelInterfaceMutation) ClearEdge ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) ClearField ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) ClearHaveVlans ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ClearHaveVlans()
ClearHaveVlans clears the "have_vlans" edge to the Vlan entity.
func (*PortChannelInterfaceMutation) ClearInterfaces ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ClearInterfaces()
ClearInterfaces clears the "interfaces" edge to the NetInterface entity.
func (*PortChannelInterfaceMutation) ClearMode ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ClearMode()
ClearMode clears the "mode" edge to the NetInterfaceMode entity.
func (*PortChannelInterfaceMutation) ClearNativeOnVlan ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ClearNativeOnVlan()
ClearNativeOnVlan clears the "native_on_vlan" edge to the Vlan entity.
func (*PortChannelInterfaceMutation) ClearOnDevice ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ClearOnDevice()
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*PortChannelInterfaceMutation) ClearOnIPAddress ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ClearOnIPAddress()
ClearOnIPAddress clears the "on_ip_address" edge to the IPAddress entity.
func (*PortChannelInterfaceMutation) ClearOnLayer ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ClearOnLayer()
ClearOnLayer clears the "on_layer" edge to the NetInterfaceLayer entity.
func (*PortChannelInterfaceMutation) ClearedEdges ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PortChannelInterfaceMutation) ClearedFields ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PortChannelInterfaceMutation) Client ¶ added in v0.2.0
func (m PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) EdgeCleared ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PortChannelInterfaceMutation) Field ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) FieldCleared ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PortChannelInterfaceMutation) Fields ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) HaveVlansCleared ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) HaveVlansCleared() bool
HaveVlansCleared reports if the "have_vlans" edge to the Vlan entity was cleared.
func (*PortChannelInterfaceMutation) HaveVlansIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) HaveVlansIDs() (ids []int)
HaveVlansIDs returns the "have_vlans" edge IDs in the mutation.
func (*PortChannelInterfaceMutation) ID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*PortChannelInterfaceMutation) InterfacesCleared ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) InterfacesCleared() bool
InterfacesCleared reports if the "interfaces" edge to the NetInterface entity was cleared.
func (*PortChannelInterfaceMutation) InterfacesIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) InterfacesIDs() (ids []int)
InterfacesIDs returns the "interfaces" edge IDs in the mutation.
func (*PortChannelInterfaceMutation) ModeCleared ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ModeCleared() bool
ModeCleared reports if the "mode" edge to the NetInterfaceMode entity was cleared.
func (*PortChannelInterfaceMutation) ModeID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ModeID() (id int, exists bool)
ModeID returns the "mode" edge ID in the mutation.
func (*PortChannelInterfaceMutation) ModeIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ModeIDs() (ids []int)
ModeIDs returns the "mode" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ModeID instead. It exists only for internal usage by the builders.
func (*PortChannelInterfaceMutation) NativeOnVlanCleared ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) NativeOnVlanCleared() bool
NativeOnVlanCleared reports if the "native_on_vlan" edge to the Vlan entity was cleared.
func (*PortChannelInterfaceMutation) NativeOnVlanID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) NativeOnVlanID() (id int, exists bool)
NativeOnVlanID returns the "native_on_vlan" edge ID in the mutation.
func (*PortChannelInterfaceMutation) NativeOnVlanIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) NativeOnVlanIDs() (ids []int)
NativeOnVlanIDs returns the "native_on_vlan" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NativeOnVlanID instead. It exists only for internal usage by the builders.
func (*PortChannelInterfaceMutation) OldField ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*PortChannelInterfaceMutation) OldPoInterfaceID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OldPoInterfaceID(ctx context.Context) (v int, err error)
OldPoInterfaceID returns the old "po_interface_id" field's value of the PortChannelInterface entity. If the PortChannelInterface object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PortChannelInterfaceMutation) OldPoInterfaceShutdown ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OldPoInterfaceShutdown(ctx context.Context) (v bool, err error)
OldPoInterfaceShutdown returns the old "po_interface_shutdown" field's value of the PortChannelInterface entity. If the PortChannelInterface object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PortChannelInterfaceMutation) OnDeviceCleared ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OnDeviceCleared() bool
OnDeviceCleared reports if the "on_device" edge to the Device entity was cleared.
func (*PortChannelInterfaceMutation) OnDeviceID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OnDeviceID() (id int, exists bool)
OnDeviceID returns the "on_device" edge ID in the mutation.
func (*PortChannelInterfaceMutation) OnDeviceIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OnDeviceIDs() (ids []int)
OnDeviceIDs returns the "on_device" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnDeviceID instead. It exists only for internal usage by the builders.
func (*PortChannelInterfaceMutation) OnIPAddressCleared ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OnIPAddressCleared() bool
OnIPAddressCleared reports if the "on_ip_address" edge to the IPAddress entity was cleared.
func (*PortChannelInterfaceMutation) OnIPAddressID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OnIPAddressID() (id int, exists bool)
OnIPAddressID returns the "on_ip_address" edge ID in the mutation.
func (*PortChannelInterfaceMutation) OnIPAddressIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OnIPAddressIDs() (ids []int)
OnIPAddressIDs returns the "on_ip_address" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnIPAddressID instead. It exists only for internal usage by the builders.
func (*PortChannelInterfaceMutation) OnLayerCleared ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OnLayerCleared() bool
OnLayerCleared reports if the "on_layer" edge to the NetInterfaceLayer entity was cleared.
func (*PortChannelInterfaceMutation) OnLayerID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OnLayerID() (id int, exists bool)
OnLayerID returns the "on_layer" edge ID in the mutation.
func (*PortChannelInterfaceMutation) OnLayerIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) OnLayerIDs() (ids []int)
OnLayerIDs returns the "on_layer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OnLayerID instead. It exists only for internal usage by the builders.
func (*PortChannelInterfaceMutation) Op ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) Op() Op
Op returns the operation name.
func (*PortChannelInterfaceMutation) PoInterfaceID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) PoInterfaceID() (r int, exists bool)
PoInterfaceID returns the value of the "po_interface_id" field in the mutation.
func (*PortChannelInterfaceMutation) PoInterfaceShutdown ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) PoInterfaceShutdown() (r bool, exists bool)
PoInterfaceShutdown returns the value of the "po_interface_shutdown" field in the mutation.
func (*PortChannelInterfaceMutation) RemoveHaveVlanIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) RemoveHaveVlanIDs(ids ...int)
RemoveHaveVlanIDs removes the "have_vlans" edge to the Vlan entity by IDs.
func (*PortChannelInterfaceMutation) RemoveInterfaceIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) RemoveInterfaceIDs(ids ...int)
RemoveInterfaceIDs removes the "interfaces" edge to the NetInterface entity by IDs.
func (*PortChannelInterfaceMutation) RemovedEdges ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PortChannelInterfaceMutation) RemovedHaveVlansIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) RemovedHaveVlansIDs() (ids []int)
RemovedHaveVlans returns the removed IDs of the "have_vlans" edge to the Vlan entity.
func (*PortChannelInterfaceMutation) RemovedIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) RemovedInterfacesIDs ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) RemovedInterfacesIDs() (ids []int)
RemovedInterfaces returns the removed IDs of the "interfaces" edge to the NetInterface entity.
func (*PortChannelInterfaceMutation) ResetEdge ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) ResetField ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) ResetHaveVlans ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ResetHaveVlans()
ResetHaveVlans resets all changes to the "have_vlans" edge.
func (*PortChannelInterfaceMutation) ResetInterfaces ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ResetInterfaces()
ResetInterfaces resets all changes to the "interfaces" edge.
func (*PortChannelInterfaceMutation) ResetMode ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ResetMode()
ResetMode resets all changes to the "mode" edge.
func (*PortChannelInterfaceMutation) ResetNativeOnVlan ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ResetNativeOnVlan()
ResetNativeOnVlan resets all changes to the "native_on_vlan" edge.
func (*PortChannelInterfaceMutation) ResetOnDevice ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ResetOnDevice()
ResetOnDevice resets all changes to the "on_device" edge.
func (*PortChannelInterfaceMutation) ResetOnIPAddress ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ResetOnIPAddress()
ResetOnIPAddress resets all changes to the "on_ip_address" edge.
func (*PortChannelInterfaceMutation) ResetOnLayer ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ResetOnLayer()
ResetOnLayer resets all changes to the "on_layer" edge.
func (*PortChannelInterfaceMutation) ResetPoInterfaceID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ResetPoInterfaceID()
ResetPoInterfaceID resets all changes to the "po_interface_id" field.
func (*PortChannelInterfaceMutation) ResetPoInterfaceShutdown ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) ResetPoInterfaceShutdown()
ResetPoInterfaceShutdown resets all changes to the "po_interface_shutdown" field.
func (*PortChannelInterfaceMutation) SetField ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) 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 (*PortChannelInterfaceMutation) SetModeID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) SetModeID(id int)
SetModeID sets the "mode" edge to the NetInterfaceMode entity by id.
func (*PortChannelInterfaceMutation) SetNativeOnVlanID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) SetNativeOnVlanID(id int)
SetNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by id.
func (*PortChannelInterfaceMutation) SetOnDeviceID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) SetOnDeviceID(id int)
SetOnDeviceID sets the "on_device" edge to the Device entity by id.
func (*PortChannelInterfaceMutation) SetOnIPAddressID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) SetOnIPAddressID(id int)
SetOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by id.
func (*PortChannelInterfaceMutation) SetOnLayerID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) SetOnLayerID(id int)
SetOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by id.
func (*PortChannelInterfaceMutation) SetPoInterfaceID ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) SetPoInterfaceID(i int)
SetPoInterfaceID sets the "po_interface_id" field.
func (*PortChannelInterfaceMutation) SetPoInterfaceShutdown ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) SetPoInterfaceShutdown(b bool)
SetPoInterfaceShutdown sets the "po_interface_shutdown" field.
func (PortChannelInterfaceMutation) Tx ¶ added in v0.2.0
func (m PortChannelInterfaceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PortChannelInterfaceMutation) Type ¶ added in v0.2.0
func (m *PortChannelInterfaceMutation) Type() string
Type returns the node type of this mutation (PortChannelInterface).
type PortChannelInterfaceQuery ¶ added in v0.2.0
type PortChannelInterfaceQuery struct {
// contains filtered or unexported fields
}
PortChannelInterfaceQuery is the builder for querying PortChannelInterface entities.
func (*PortChannelInterfaceQuery) All ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) All(ctx context.Context) ([]*PortChannelInterface, error)
All executes the query and returns a list of PortChannelInterfaces.
func (*PortChannelInterfaceQuery) AllX ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) AllX(ctx context.Context) []*PortChannelInterface
AllX is like All, but panics if an error occurs.
func (*PortChannelInterfaceQuery) Clone ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Clone() *PortChannelInterfaceQuery
Clone returns a duplicate of the PortChannelInterfaceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PortChannelInterfaceQuery) Count ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PortChannelInterfaceQuery) CountX ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PortChannelInterfaceQuery) Exist ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PortChannelInterfaceQuery) ExistX ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PortChannelInterfaceQuery) First ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) First(ctx context.Context) (*PortChannelInterface, error)
First returns the first PortChannelInterface entity from the query. Returns a *NotFoundError when no PortChannelInterface was found.
func (*PortChannelInterfaceQuery) FirstID ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PortChannelInterface ID from the query. Returns a *NotFoundError when no PortChannelInterface ID was found.
func (*PortChannelInterfaceQuery) FirstIDX ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PortChannelInterfaceQuery) FirstX ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) FirstX(ctx context.Context) *PortChannelInterface
FirstX is like First, but panics if an error occurs.
func (*PortChannelInterfaceQuery) GroupBy ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) GroupBy(field string, fields ...string) *PortChannelInterfaceGroupBy
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 { PoInterfaceID int `json:"po_interface_id,omitempty"` Count int `json:"count,omitempty"` } client.PortChannelInterface.Query(). GroupBy(portchannelinterface.FieldPoInterfaceID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PortChannelInterfaceQuery) IDs ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of PortChannelInterface IDs.
func (*PortChannelInterfaceQuery) IDsX ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PortChannelInterfaceQuery) Limit ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Limit(limit int) *PortChannelInterfaceQuery
Limit adds a limit step to the query.
func (*PortChannelInterfaceQuery) Offset ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Offset(offset int) *PortChannelInterfaceQuery
Offset adds an offset step to the query.
func (*PortChannelInterfaceQuery) Only ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Only(ctx context.Context) (*PortChannelInterface, error)
Only returns a single PortChannelInterface entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one PortChannelInterface entity is not found. Returns a *NotFoundError when no PortChannelInterface entities are found.
func (*PortChannelInterfaceQuery) OnlyID ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PortChannelInterface ID in the query. Returns a *NotSingularError when exactly one PortChannelInterface ID is not found. Returns a *NotFoundError when no entities are found.
func (*PortChannelInterfaceQuery) OnlyIDX ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PortChannelInterfaceQuery) OnlyX ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) OnlyX(ctx context.Context) *PortChannelInterface
OnlyX is like Only, but panics if an error occurs.
func (*PortChannelInterfaceQuery) Order ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Order(o ...OrderFunc) *PortChannelInterfaceQuery
Order adds an order step to the query.
func (*PortChannelInterfaceQuery) QueryHaveVlans ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) QueryHaveVlans() *VlanQuery
QueryHaveVlans chains the current query on the "have_vlans" edge.
func (*PortChannelInterfaceQuery) QueryInterfaces ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) QueryInterfaces() *NetInterfaceQuery
QueryInterfaces chains the current query on the "interfaces" edge.
func (*PortChannelInterfaceQuery) QueryMode ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) QueryMode() *NetInterfaceModeQuery
QueryMode chains the current query on the "mode" edge.
func (*PortChannelInterfaceQuery) QueryNativeOnVlan ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) QueryNativeOnVlan() *VlanQuery
QueryNativeOnVlan chains the current query on the "native_on_vlan" edge.
func (*PortChannelInterfaceQuery) QueryOnDevice ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) QueryOnDevice() *DeviceQuery
QueryOnDevice chains the current query on the "on_device" edge.
func (*PortChannelInterfaceQuery) QueryOnIPAddress ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) QueryOnIPAddress() *IPAddressQuery
QueryOnIPAddress chains the current query on the "on_ip_address" edge.
func (*PortChannelInterfaceQuery) QueryOnLayer ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) QueryOnLayer() *NetInterfaceLayerQuery
QueryOnLayer chains the current query on the "on_layer" edge.
func (*PortChannelInterfaceQuery) Select ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Select(field string, fields ...string) *PortChannelInterfaceSelect
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 { PoInterfaceID int `json:"po_interface_id,omitempty"` } client.PortChannelInterface.Query(). Select(portchannelinterface.FieldPoInterfaceID). Scan(ctx, &v)
func (*PortChannelInterfaceQuery) Unique ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Unique(unique bool) *PortChannelInterfaceQuery
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 (*PortChannelInterfaceQuery) Where ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) Where(ps ...predicate.PortChannelInterface) *PortChannelInterfaceQuery
Where adds a new predicate for the PortChannelInterfaceQuery builder.
func (*PortChannelInterfaceQuery) WithHaveVlans ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) WithHaveVlans(opts ...func(*VlanQuery)) *PortChannelInterfaceQuery
WithHaveVlans tells the query-builder to eager-load the nodes that are connected to the "have_vlans" edge. The optional arguments are used to configure the query builder of the edge.
func (*PortChannelInterfaceQuery) WithInterfaces ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) WithInterfaces(opts ...func(*NetInterfaceQuery)) *PortChannelInterfaceQuery
WithInterfaces tells the query-builder to eager-load the nodes that are connected to the "interfaces" edge. The optional arguments are used to configure the query builder of the edge.
func (*PortChannelInterfaceQuery) WithMode ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) WithMode(opts ...func(*NetInterfaceModeQuery)) *PortChannelInterfaceQuery
WithMode tells the query-builder to eager-load the nodes that are connected to the "mode" edge. The optional arguments are used to configure the query builder of the edge.
func (*PortChannelInterfaceQuery) WithNativeOnVlan ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) WithNativeOnVlan(opts ...func(*VlanQuery)) *PortChannelInterfaceQuery
WithNativeOnVlan tells the query-builder to eager-load the nodes that are connected to the "native_on_vlan" edge. The optional arguments are used to configure the query builder of the edge.
func (*PortChannelInterfaceQuery) WithOnDevice ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) WithOnDevice(opts ...func(*DeviceQuery)) *PortChannelInterfaceQuery
WithOnDevice tells the query-builder to eager-load the nodes that are connected to the "on_device" edge. The optional arguments are used to configure the query builder of the edge.
func (*PortChannelInterfaceQuery) WithOnIPAddress ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) WithOnIPAddress(opts ...func(*IPAddressQuery)) *PortChannelInterfaceQuery
WithOnIPAddress tells the query-builder to eager-load the nodes that are connected to the "on_ip_address" edge. The optional arguments are used to configure the query builder of the edge.
func (*PortChannelInterfaceQuery) WithOnLayer ¶ added in v0.2.0
func (pciq *PortChannelInterfaceQuery) WithOnLayer(opts ...func(*NetInterfaceLayerQuery)) *PortChannelInterfaceQuery
WithOnLayer tells the query-builder to eager-load the nodes that are connected to the "on_layer" edge. The optional arguments are used to configure the query builder of the edge.
type PortChannelInterfaceSelect ¶ added in v0.2.0
type PortChannelInterfaceSelect struct { *PortChannelInterfaceQuery // contains filtered or unexported fields }
PortChannelInterfaceSelect is the builder for selecting fields of PortChannelInterface entities.
func (*PortChannelInterfaceSelect) Bool ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PortChannelInterfaceSelect) BoolX ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*PortChannelInterfaceSelect) Bools ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PortChannelInterfaceSelect) BoolsX ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PortChannelInterfaceSelect) Float64 ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PortChannelInterfaceSelect) Float64X ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*PortChannelInterfaceSelect) Float64s ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PortChannelInterfaceSelect) Float64sX ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PortChannelInterfaceSelect) Int ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PortChannelInterfaceSelect) IntX ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*PortChannelInterfaceSelect) Ints ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PortChannelInterfaceSelect) IntsX ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PortChannelInterfaceSelect) Scan ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*PortChannelInterfaceSelect) ScanX ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*PortChannelInterfaceSelect) String ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*PortChannelInterfaceSelect) StringX ¶ added in v0.2.0
func (pcis *PortChannelInterfaceSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type PortChannelInterfaceUpdate ¶ added in v0.2.0
type PortChannelInterfaceUpdate struct {
// contains filtered or unexported fields
}
PortChannelInterfaceUpdate is the builder for updating PortChannelInterface entities.
func (*PortChannelInterfaceUpdate) AddHaveVlanIDs ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) AddHaveVlanIDs(ids ...int) *PortChannelInterfaceUpdate
AddHaveVlanIDs adds the "have_vlans" edge to the Vlan entity by IDs.
func (*PortChannelInterfaceUpdate) AddHaveVlans ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) AddHaveVlans(v ...*Vlan) *PortChannelInterfaceUpdate
AddHaveVlans adds the "have_vlans" edges to the Vlan entity.
func (*PortChannelInterfaceUpdate) AddInterfaceIDs ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) AddInterfaceIDs(ids ...int) *PortChannelInterfaceUpdate
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by IDs.
func (*PortChannelInterfaceUpdate) AddInterfaces ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) AddInterfaces(n ...*NetInterface) *PortChannelInterfaceUpdate
AddInterfaces adds the "interfaces" edges to the NetInterface entity.
func (*PortChannelInterfaceUpdate) AddPoInterfaceID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) AddPoInterfaceID(i int) *PortChannelInterfaceUpdate
AddPoInterfaceID adds i to the "po_interface_id" field.
func (*PortChannelInterfaceUpdate) ClearHaveVlans ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) ClearHaveVlans() *PortChannelInterfaceUpdate
ClearHaveVlans clears all "have_vlans" edges to the Vlan entity.
func (*PortChannelInterfaceUpdate) ClearInterfaces ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) ClearInterfaces() *PortChannelInterfaceUpdate
ClearInterfaces clears all "interfaces" edges to the NetInterface entity.
func (*PortChannelInterfaceUpdate) ClearMode ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) ClearMode() *PortChannelInterfaceUpdate
ClearMode clears the "mode" edge to the NetInterfaceMode entity.
func (*PortChannelInterfaceUpdate) ClearNativeOnVlan ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) ClearNativeOnVlan() *PortChannelInterfaceUpdate
ClearNativeOnVlan clears the "native_on_vlan" edge to the Vlan entity.
func (*PortChannelInterfaceUpdate) ClearOnDevice ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) ClearOnDevice() *PortChannelInterfaceUpdate
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*PortChannelInterfaceUpdate) ClearOnIPAddress ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) ClearOnIPAddress() *PortChannelInterfaceUpdate
ClearOnIPAddress clears the "on_ip_address" edge to the IPAddress entity.
func (*PortChannelInterfaceUpdate) ClearOnLayer ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) ClearOnLayer() *PortChannelInterfaceUpdate
ClearOnLayer clears the "on_layer" edge to the NetInterfaceLayer entity.
func (*PortChannelInterfaceUpdate) Exec ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PortChannelInterfaceUpdate) ExecX ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortChannelInterfaceUpdate) Mutation ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) Mutation() *PortChannelInterfaceMutation
Mutation returns the PortChannelInterfaceMutation object of the builder.
func (*PortChannelInterfaceUpdate) RemoveHaveVlanIDs ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) RemoveHaveVlanIDs(ids ...int) *PortChannelInterfaceUpdate
RemoveHaveVlanIDs removes the "have_vlans" edge to Vlan entities by IDs.
func (*PortChannelInterfaceUpdate) RemoveHaveVlans ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) RemoveHaveVlans(v ...*Vlan) *PortChannelInterfaceUpdate
RemoveHaveVlans removes "have_vlans" edges to Vlan entities.
func (*PortChannelInterfaceUpdate) RemoveInterfaceIDs ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) RemoveInterfaceIDs(ids ...int) *PortChannelInterfaceUpdate
RemoveInterfaceIDs removes the "interfaces" edge to NetInterface entities by IDs.
func (*PortChannelInterfaceUpdate) RemoveInterfaces ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) RemoveInterfaces(n ...*NetInterface) *PortChannelInterfaceUpdate
RemoveInterfaces removes "interfaces" edges to NetInterface entities.
func (*PortChannelInterfaceUpdate) Save ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PortChannelInterfaceUpdate) SaveX ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PortChannelInterfaceUpdate) SetMode ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetMode(n *NetInterfaceMode) *PortChannelInterfaceUpdate
SetMode sets the "mode" edge to the NetInterfaceMode entity.
func (*PortChannelInterfaceUpdate) SetModeID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetModeID(id int) *PortChannelInterfaceUpdate
SetModeID sets the "mode" edge to the NetInterfaceMode entity by ID.
func (*PortChannelInterfaceUpdate) SetNativeOnVlan ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetNativeOnVlan(v *Vlan) *PortChannelInterfaceUpdate
SetNativeOnVlan sets the "native_on_vlan" edge to the Vlan entity.
func (*PortChannelInterfaceUpdate) SetNativeOnVlanID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetNativeOnVlanID(id int) *PortChannelInterfaceUpdate
SetNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID.
func (*PortChannelInterfaceUpdate) SetNillableModeID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetNillableModeID(id *int) *PortChannelInterfaceUpdate
SetNillableModeID sets the "mode" edge to the NetInterfaceMode entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdate) SetNillableNativeOnVlanID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetNillableNativeOnVlanID(id *int) *PortChannelInterfaceUpdate
SetNillableNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdate) SetNillableOnDeviceID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetNillableOnDeviceID(id *int) *PortChannelInterfaceUpdate
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdate) SetNillableOnIPAddressID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetNillableOnIPAddressID(id *int) *PortChannelInterfaceUpdate
SetNillableOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdate) SetNillableOnLayerID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetNillableOnLayerID(id *int) *PortChannelInterfaceUpdate
SetNillableOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdate) SetNillablePoInterfaceShutdown ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetNillablePoInterfaceShutdown(b *bool) *PortChannelInterfaceUpdate
SetNillablePoInterfaceShutdown sets the "po_interface_shutdown" field if the given value is not nil.
func (*PortChannelInterfaceUpdate) SetOnDevice ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetOnDevice(d *Device) *PortChannelInterfaceUpdate
SetOnDevice sets the "on_device" edge to the Device entity.
func (*PortChannelInterfaceUpdate) SetOnDeviceID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetOnDeviceID(id int) *PortChannelInterfaceUpdate
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*PortChannelInterfaceUpdate) SetOnIPAddress ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetOnIPAddress(i *IPAddress) *PortChannelInterfaceUpdate
SetOnIPAddress sets the "on_ip_address" edge to the IPAddress entity.
func (*PortChannelInterfaceUpdate) SetOnIPAddressID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetOnIPAddressID(id int) *PortChannelInterfaceUpdate
SetOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID.
func (*PortChannelInterfaceUpdate) SetOnLayer ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetOnLayer(n *NetInterfaceLayer) *PortChannelInterfaceUpdate
SetOnLayer sets the "on_layer" edge to the NetInterfaceLayer entity.
func (*PortChannelInterfaceUpdate) SetOnLayerID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetOnLayerID(id int) *PortChannelInterfaceUpdate
SetOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID.
func (*PortChannelInterfaceUpdate) SetPoInterfaceID ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetPoInterfaceID(i int) *PortChannelInterfaceUpdate
SetPoInterfaceID sets the "po_interface_id" field.
func (*PortChannelInterfaceUpdate) SetPoInterfaceShutdown ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) SetPoInterfaceShutdown(b bool) *PortChannelInterfaceUpdate
SetPoInterfaceShutdown sets the "po_interface_shutdown" field.
func (*PortChannelInterfaceUpdate) Where ¶ added in v0.2.0
func (pciu *PortChannelInterfaceUpdate) Where(ps ...predicate.PortChannelInterface) *PortChannelInterfaceUpdate
Where adds a new predicate for the PortChannelInterfaceUpdate builder.
type PortChannelInterfaceUpdateOne ¶ added in v0.2.0
type PortChannelInterfaceUpdateOne struct {
// contains filtered or unexported fields
}
PortChannelInterfaceUpdateOne is the builder for updating a single PortChannelInterface entity.
func (*PortChannelInterfaceUpdateOne) AddHaveVlanIDs ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) AddHaveVlanIDs(ids ...int) *PortChannelInterfaceUpdateOne
AddHaveVlanIDs adds the "have_vlans" edge to the Vlan entity by IDs.
func (*PortChannelInterfaceUpdateOne) AddHaveVlans ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) AddHaveVlans(v ...*Vlan) *PortChannelInterfaceUpdateOne
AddHaveVlans adds the "have_vlans" edges to the Vlan entity.
func (*PortChannelInterfaceUpdateOne) AddInterfaceIDs ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) AddInterfaceIDs(ids ...int) *PortChannelInterfaceUpdateOne
AddInterfaceIDs adds the "interfaces" edge to the NetInterface entity by IDs.
func (*PortChannelInterfaceUpdateOne) AddInterfaces ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) AddInterfaces(n ...*NetInterface) *PortChannelInterfaceUpdateOne
AddInterfaces adds the "interfaces" edges to the NetInterface entity.
func (*PortChannelInterfaceUpdateOne) AddPoInterfaceID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) AddPoInterfaceID(i int) *PortChannelInterfaceUpdateOne
AddPoInterfaceID adds i to the "po_interface_id" field.
func (*PortChannelInterfaceUpdateOne) ClearHaveVlans ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) ClearHaveVlans() *PortChannelInterfaceUpdateOne
ClearHaveVlans clears all "have_vlans" edges to the Vlan entity.
func (*PortChannelInterfaceUpdateOne) ClearInterfaces ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) ClearInterfaces() *PortChannelInterfaceUpdateOne
ClearInterfaces clears all "interfaces" edges to the NetInterface entity.
func (*PortChannelInterfaceUpdateOne) ClearMode ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) ClearMode() *PortChannelInterfaceUpdateOne
ClearMode clears the "mode" edge to the NetInterfaceMode entity.
func (*PortChannelInterfaceUpdateOne) ClearNativeOnVlan ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) ClearNativeOnVlan() *PortChannelInterfaceUpdateOne
ClearNativeOnVlan clears the "native_on_vlan" edge to the Vlan entity.
func (*PortChannelInterfaceUpdateOne) ClearOnDevice ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) ClearOnDevice() *PortChannelInterfaceUpdateOne
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*PortChannelInterfaceUpdateOne) ClearOnIPAddress ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) ClearOnIPAddress() *PortChannelInterfaceUpdateOne
ClearOnIPAddress clears the "on_ip_address" edge to the IPAddress entity.
func (*PortChannelInterfaceUpdateOne) ClearOnLayer ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) ClearOnLayer() *PortChannelInterfaceUpdateOne
ClearOnLayer clears the "on_layer" edge to the NetInterfaceLayer entity.
func (*PortChannelInterfaceUpdateOne) Exec ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PortChannelInterfaceUpdateOne) ExecX ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortChannelInterfaceUpdateOne) Mutation ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) Mutation() *PortChannelInterfaceMutation
Mutation returns the PortChannelInterfaceMutation object of the builder.
func (*PortChannelInterfaceUpdateOne) RemoveHaveVlanIDs ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) RemoveHaveVlanIDs(ids ...int) *PortChannelInterfaceUpdateOne
RemoveHaveVlanIDs removes the "have_vlans" edge to Vlan entities by IDs.
func (*PortChannelInterfaceUpdateOne) RemoveHaveVlans ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) RemoveHaveVlans(v ...*Vlan) *PortChannelInterfaceUpdateOne
RemoveHaveVlans removes "have_vlans" edges to Vlan entities.
func (*PortChannelInterfaceUpdateOne) RemoveInterfaceIDs ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) RemoveInterfaceIDs(ids ...int) *PortChannelInterfaceUpdateOne
RemoveInterfaceIDs removes the "interfaces" edge to NetInterface entities by IDs.
func (*PortChannelInterfaceUpdateOne) RemoveInterfaces ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) RemoveInterfaces(n ...*NetInterface) *PortChannelInterfaceUpdateOne
RemoveInterfaces removes "interfaces" edges to NetInterface entities.
func (*PortChannelInterfaceUpdateOne) Save ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) Save(ctx context.Context) (*PortChannelInterface, error)
Save executes the query and returns the updated PortChannelInterface entity.
func (*PortChannelInterfaceUpdateOne) SaveX ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SaveX(ctx context.Context) *PortChannelInterface
SaveX is like Save, but panics if an error occurs.
func (*PortChannelInterfaceUpdateOne) Select ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) Select(field string, fields ...string) *PortChannelInterfaceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PortChannelInterfaceUpdateOne) SetMode ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetMode(n *NetInterfaceMode) *PortChannelInterfaceUpdateOne
SetMode sets the "mode" edge to the NetInterfaceMode entity.
func (*PortChannelInterfaceUpdateOne) SetModeID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetModeID(id int) *PortChannelInterfaceUpdateOne
SetModeID sets the "mode" edge to the NetInterfaceMode entity by ID.
func (*PortChannelInterfaceUpdateOne) SetNativeOnVlan ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetNativeOnVlan(v *Vlan) *PortChannelInterfaceUpdateOne
SetNativeOnVlan sets the "native_on_vlan" edge to the Vlan entity.
func (*PortChannelInterfaceUpdateOne) SetNativeOnVlanID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetNativeOnVlanID(id int) *PortChannelInterfaceUpdateOne
SetNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID.
func (*PortChannelInterfaceUpdateOne) SetNillableModeID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetNillableModeID(id *int) *PortChannelInterfaceUpdateOne
SetNillableModeID sets the "mode" edge to the NetInterfaceMode entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdateOne) SetNillableNativeOnVlanID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetNillableNativeOnVlanID(id *int) *PortChannelInterfaceUpdateOne
SetNillableNativeOnVlanID sets the "native_on_vlan" edge to the Vlan entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdateOne) SetNillableOnDeviceID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetNillableOnDeviceID(id *int) *PortChannelInterfaceUpdateOne
SetNillableOnDeviceID sets the "on_device" edge to the Device entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdateOne) SetNillableOnIPAddressID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetNillableOnIPAddressID(id *int) *PortChannelInterfaceUpdateOne
SetNillableOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdateOne) SetNillableOnLayerID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetNillableOnLayerID(id *int) *PortChannelInterfaceUpdateOne
SetNillableOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID if the given value is not nil.
func (*PortChannelInterfaceUpdateOne) SetNillablePoInterfaceShutdown ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetNillablePoInterfaceShutdown(b *bool) *PortChannelInterfaceUpdateOne
SetNillablePoInterfaceShutdown sets the "po_interface_shutdown" field if the given value is not nil.
func (*PortChannelInterfaceUpdateOne) SetOnDevice ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetOnDevice(d *Device) *PortChannelInterfaceUpdateOne
SetOnDevice sets the "on_device" edge to the Device entity.
func (*PortChannelInterfaceUpdateOne) SetOnDeviceID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetOnDeviceID(id int) *PortChannelInterfaceUpdateOne
SetOnDeviceID sets the "on_device" edge to the Device entity by ID.
func (*PortChannelInterfaceUpdateOne) SetOnIPAddress ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetOnIPAddress(i *IPAddress) *PortChannelInterfaceUpdateOne
SetOnIPAddress sets the "on_ip_address" edge to the IPAddress entity.
func (*PortChannelInterfaceUpdateOne) SetOnIPAddressID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetOnIPAddressID(id int) *PortChannelInterfaceUpdateOne
SetOnIPAddressID sets the "on_ip_address" edge to the IPAddress entity by ID.
func (*PortChannelInterfaceUpdateOne) SetOnLayer ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetOnLayer(n *NetInterfaceLayer) *PortChannelInterfaceUpdateOne
SetOnLayer sets the "on_layer" edge to the NetInterfaceLayer entity.
func (*PortChannelInterfaceUpdateOne) SetOnLayerID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetOnLayerID(id int) *PortChannelInterfaceUpdateOne
SetOnLayerID sets the "on_layer" edge to the NetInterfaceLayer entity by ID.
func (*PortChannelInterfaceUpdateOne) SetPoInterfaceID ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetPoInterfaceID(i int) *PortChannelInterfaceUpdateOne
SetPoInterfaceID sets the "po_interface_id" field.
func (*PortChannelInterfaceUpdateOne) SetPoInterfaceShutdown ¶ added in v0.2.0
func (pciuo *PortChannelInterfaceUpdateOne) SetPoInterfaceShutdown(b bool) *PortChannelInterfaceUpdateOne
SetPoInterfaceShutdown sets the "po_interface_shutdown" field.
type PortChannelInterfaces ¶ added in v0.2.0
type PortChannelInterfaces []*PortChannelInterface
PortChannelInterfaces is a parsable slice of PortChannelInterface.
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(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 Rollbacker method.
type Tx ¶
type Tx struct { // Administrator is the client for interacting with the Administrator builders. Administrator *AdministratorClient // DeletedVlanLog is the client for interacting with the DeletedVlanLog builders. DeletedVlanLog *DeletedVlanLogClient // Device is the client for interacting with the Device builders. Device *DeviceClient // DevicePlatform is the client for interacting with the DevicePlatform builders. DevicePlatform *DevicePlatformClient // DeviceType is the client for interacting with the DeviceType builders. DeviceType *DeviceTypeClient // IPAddress is the client for interacting with the IPAddress builders. IPAddress *IPAddressClient // IPStaticRoutingTable is the client for interacting with the IPStaticRoutingTable builders. IPStaticRoutingTable *IPStaticRoutingTableClient // NetInterface is the client for interacting with the NetInterface builders. NetInterface *NetInterfaceClient // NetInterfaceLayer is the client for interacting with the NetInterfaceLayer builders. NetInterfaceLayer *NetInterfaceLayerClient // NetInterfaceMode is the client for interacting with the NetInterfaceMode builders. NetInterfaceMode *NetInterfaceModeClient // NetTopology is the client for interacting with the NetTopology builders. NetTopology *NetTopologyClient // NetTopologyDeviceMap is the client for interacting with the NetTopologyDeviceMap builders. NetTopologyDeviceMap *NetTopologyDeviceMapClient // PortChannelInterface is the client for interacting with the PortChannelInterface builders. PortChannelInterface *PortChannelInterfaceClient // Vlan is the client for interacting with the Vlan builders. Vlan *VlanClient // 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 ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Vlan ¶
type Vlan struct { // ID of the ent. ID int `json:"id,omitempty"` // VlanID holds the value of the "vlan_id" field. VlanID int `json:"vlan_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the VlanQuery when eager-loading is set. Edges VlanEdges `json:"edges"` // contains filtered or unexported fields }
Vlan is the model entity for the Vlan schema.
func (*Vlan) QueryNativeVlan ¶
func (v *Vlan) QueryNativeVlan() *NetInterfaceQuery
QueryNativeVlan queries the "native_vlan" edge of the Vlan entity.
func (*Vlan) QueryOnDevice ¶
func (v *Vlan) QueryOnDevice() *DeviceQuery
QueryOnDevice queries the "on_device" edge of the Vlan entity.
func (*Vlan) QueryPoNativeVlan ¶ added in v0.2.0
func (v *Vlan) QueryPoNativeVlan() *PortChannelInterfaceQuery
QueryPoNativeVlan queries the "po_native_vlan" edge of the Vlan entity.
func (*Vlan) QueryPoVlans ¶ added in v0.2.0
func (v *Vlan) QueryPoVlans() *PortChannelInterfaceQuery
QueryPoVlans queries the "po_vlans" edge of the Vlan entity.
func (*Vlan) QueryVlans ¶
func (v *Vlan) QueryVlans() *NetInterfaceQuery
QueryVlans queries the "vlans" edge of the Vlan entity.
func (*Vlan) Unwrap ¶
Unwrap unwraps the Vlan 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 (*Vlan) Update ¶
func (v *Vlan) Update() *VlanUpdateOne
Update returns a builder for updating this Vlan. Note that you need to call Vlan.Unwrap() before calling this method if this Vlan was returned from a transaction, and the transaction was committed or rolled back.
type VlanClient ¶
type VlanClient struct {
// contains filtered or unexported fields
}
VlanClient is a client for the Vlan schema.
func NewVlanClient ¶
func NewVlanClient(c config) *VlanClient
NewVlanClient returns a client for the Vlan from the given config.
func (*VlanClient) Create ¶
func (c *VlanClient) Create() *VlanCreate
Create returns a create builder for Vlan.
func (*VlanClient) CreateBulk ¶
func (c *VlanClient) CreateBulk(builders ...*VlanCreate) *VlanCreateBulk
CreateBulk returns a builder for creating a bulk of Vlan entities.
func (*VlanClient) Delete ¶
func (c *VlanClient) Delete() *VlanDelete
Delete returns a delete builder for Vlan.
func (*VlanClient) DeleteOne ¶
func (c *VlanClient) DeleteOne(v *Vlan) *VlanDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*VlanClient) DeleteOneID ¶
func (c *VlanClient) DeleteOneID(id int) *VlanDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*VlanClient) GetX ¶
func (c *VlanClient) GetX(ctx context.Context, id int) *Vlan
GetX is like Get, but panics if an error occurs.
func (*VlanClient) Query ¶
func (c *VlanClient) Query() *VlanQuery
Query returns a query builder for Vlan.
func (*VlanClient) QueryNativeVlan ¶
func (c *VlanClient) QueryNativeVlan(v *Vlan) *NetInterfaceQuery
QueryNativeVlan queries the native_vlan edge of a Vlan.
func (*VlanClient) QueryOnDevice ¶
func (c *VlanClient) QueryOnDevice(v *Vlan) *DeviceQuery
QueryOnDevice queries the on_device edge of a Vlan.
func (*VlanClient) QueryPoNativeVlan ¶ added in v0.2.0
func (c *VlanClient) QueryPoNativeVlan(v *Vlan) *PortChannelInterfaceQuery
QueryPoNativeVlan queries the po_native_vlan edge of a Vlan.
func (*VlanClient) QueryPoVlans ¶ added in v0.2.0
func (c *VlanClient) QueryPoVlans(v *Vlan) *PortChannelInterfaceQuery
QueryPoVlans queries the po_vlans edge of a Vlan.
func (*VlanClient) QueryVlans ¶
func (c *VlanClient) QueryVlans(v *Vlan) *NetInterfaceQuery
QueryVlans queries the vlans edge of a Vlan.
func (*VlanClient) Update ¶
func (c *VlanClient) Update() *VlanUpdate
Update returns an update builder for Vlan.
func (*VlanClient) UpdateOne ¶
func (c *VlanClient) UpdateOne(v *Vlan) *VlanUpdateOne
UpdateOne returns an update builder for the given entity.
func (*VlanClient) UpdateOneID ¶
func (c *VlanClient) UpdateOneID(id int) *VlanUpdateOne
UpdateOneID returns an update builder for the given id.
func (*VlanClient) Use ¶
func (c *VlanClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vlan.Hooks(f(g(h())))`.
type VlanCreate ¶
type VlanCreate struct {
// contains filtered or unexported fields
}
VlanCreate is the builder for creating a Vlan entity.
func (*VlanCreate) AddNativeVlan ¶
func (vc *VlanCreate) AddNativeVlan(n ...*NetInterface) *VlanCreate
AddNativeVlan adds the "native_vlan" edges to the NetInterface entity.
func (*VlanCreate) AddNativeVlanIDs ¶
func (vc *VlanCreate) AddNativeVlanIDs(ids ...int) *VlanCreate
AddNativeVlanIDs adds the "native_vlan" edge to the NetInterface entity by IDs.
func (*VlanCreate) AddOnDevice ¶
func (vc *VlanCreate) AddOnDevice(d ...*Device) *VlanCreate
AddOnDevice adds the "on_device" edges to the Device entity.
func (*VlanCreate) AddOnDeviceIDs ¶
func (vc *VlanCreate) AddOnDeviceIDs(ids ...int) *VlanCreate
AddOnDeviceIDs adds the "on_device" edge to the Device entity by IDs.
func (*VlanCreate) AddPoNativeVlan ¶ added in v0.2.0
func (vc *VlanCreate) AddPoNativeVlan(p ...*PortChannelInterface) *VlanCreate
AddPoNativeVlan adds the "po_native_vlan" edges to the PortChannelInterface entity.
func (*VlanCreate) AddPoNativeVlanIDs ¶ added in v0.2.0
func (vc *VlanCreate) AddPoNativeVlanIDs(ids ...int) *VlanCreate
AddPoNativeVlanIDs adds the "po_native_vlan" edge to the PortChannelInterface entity by IDs.
func (*VlanCreate) AddPoVlanIDs ¶ added in v0.2.0
func (vc *VlanCreate) AddPoVlanIDs(ids ...int) *VlanCreate
AddPoVlanIDs adds the "po_vlans" edge to the PortChannelInterface entity by IDs.
func (*VlanCreate) AddPoVlans ¶ added in v0.2.0
func (vc *VlanCreate) AddPoVlans(p ...*PortChannelInterface) *VlanCreate
AddPoVlans adds the "po_vlans" edges to the PortChannelInterface entity.
func (*VlanCreate) AddVlanIDs ¶
func (vc *VlanCreate) AddVlanIDs(ids ...int) *VlanCreate
AddVlanIDs adds the "vlans" edge to the NetInterface entity by IDs.
func (*VlanCreate) AddVlans ¶
func (vc *VlanCreate) AddVlans(n ...*NetInterface) *VlanCreate
AddVlans adds the "vlans" edges to the NetInterface entity.
func (*VlanCreate) Mutation ¶
func (vc *VlanCreate) Mutation() *VlanMutation
Mutation returns the VlanMutation object of the builder.
func (*VlanCreate) Save ¶
func (vc *VlanCreate) Save(ctx context.Context) (*Vlan, error)
Save creates the Vlan in the database.
func (*VlanCreate) SaveX ¶
func (vc *VlanCreate) SaveX(ctx context.Context) *Vlan
SaveX calls Save and panics if Save returns an error.
func (*VlanCreate) SetVlanID ¶
func (vc *VlanCreate) SetVlanID(i int) *VlanCreate
SetVlanID sets the "vlan_id" field.
type VlanCreateBulk ¶
type VlanCreateBulk struct {
// contains filtered or unexported fields
}
VlanCreateBulk is the builder for creating many Vlan entities in bulk.
type VlanDelete ¶
type VlanDelete struct {
// contains filtered or unexported fields
}
VlanDelete is the builder for deleting a Vlan entity.
func (*VlanDelete) Exec ¶
func (vd *VlanDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*VlanDelete) ExecX ¶
func (vd *VlanDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*VlanDelete) Where ¶
func (vd *VlanDelete) Where(ps ...predicate.Vlan) *VlanDelete
Where adds a new predicate to the VlanDelete builder.
type VlanDeleteOne ¶
type VlanDeleteOne struct {
// contains filtered or unexported fields
}
VlanDeleteOne is the builder for deleting a single Vlan entity.
func (*VlanDeleteOne) Exec ¶
func (vdo *VlanDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*VlanDeleteOne) ExecX ¶
func (vdo *VlanDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type VlanEdges ¶
type VlanEdges struct { // Vlans holds the value of the vlans edge. Vlans []*NetInterface `json:"vlans,omitempty"` // NativeVlan holds the value of the native_vlan edge. NativeVlan []*NetInterface `json:"native_vlan,omitempty"` // PoVlans holds the value of the po_vlans edge. PoVlans []*PortChannelInterface `json:"po_vlans,omitempty"` // PoNativeVlan holds the value of the po_native_vlan edge. PoNativeVlan []*PortChannelInterface `json:"po_native_vlan,omitempty"` // OnDevice holds the value of the on_device edge. OnDevice []*Device `json:"on_device,omitempty"` // contains filtered or unexported fields }
VlanEdges holds the relations/edges for other nodes in the graph.
func (VlanEdges) NativeVlanOrErr ¶
func (e VlanEdges) NativeVlanOrErr() ([]*NetInterface, error)
NativeVlanOrErr returns the NativeVlan value or an error if the edge was not loaded in eager-loading.
func (VlanEdges) OnDeviceOrErr ¶
OnDeviceOrErr returns the OnDevice value or an error if the edge was not loaded in eager-loading.
func (VlanEdges) PoNativeVlanOrErr ¶ added in v0.2.0
func (e VlanEdges) PoNativeVlanOrErr() ([]*PortChannelInterface, error)
PoNativeVlanOrErr returns the PoNativeVlan value or an error if the edge was not loaded in eager-loading.
func (VlanEdges) PoVlansOrErr ¶ added in v0.2.0
func (e VlanEdges) PoVlansOrErr() ([]*PortChannelInterface, error)
PoVlansOrErr returns the PoVlans value or an error if the edge was not loaded in eager-loading.
func (VlanEdges) VlansOrErr ¶
func (e VlanEdges) VlansOrErr() ([]*NetInterface, error)
VlansOrErr returns the Vlans value or an error if the edge was not loaded in eager-loading.
type VlanGroupBy ¶
type VlanGroupBy struct {
// contains filtered or unexported fields
}
VlanGroupBy is the group-by builder for Vlan entities.
func (*VlanGroupBy) Aggregate ¶
func (vgb *VlanGroupBy) Aggregate(fns ...AggregateFunc) *VlanGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*VlanGroupBy) Bool ¶
func (vgb *VlanGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*VlanGroupBy) BoolX ¶
func (vgb *VlanGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*VlanGroupBy) Bools ¶
func (vgb *VlanGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*VlanGroupBy) BoolsX ¶
func (vgb *VlanGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*VlanGroupBy) Float64 ¶
func (vgb *VlanGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*VlanGroupBy) Float64X ¶
func (vgb *VlanGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*VlanGroupBy) Float64s ¶
func (vgb *VlanGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*VlanGroupBy) Float64sX ¶
func (vgb *VlanGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*VlanGroupBy) Int ¶
func (vgb *VlanGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*VlanGroupBy) IntX ¶
func (vgb *VlanGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*VlanGroupBy) Ints ¶
func (vgb *VlanGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*VlanGroupBy) IntsX ¶
func (vgb *VlanGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*VlanGroupBy) Scan ¶
func (vgb *VlanGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*VlanGroupBy) ScanX ¶
func (vgb *VlanGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*VlanGroupBy) String ¶
func (vgb *VlanGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*VlanGroupBy) StringX ¶
func (vgb *VlanGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type VlanMutation ¶
type VlanMutation struct {
// contains filtered or unexported fields
}
VlanMutation represents an operation that mutates the Vlan nodes in the graph.
func (*VlanMutation) AddField ¶
func (m *VlanMutation) 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 (*VlanMutation) AddNativeVlanIDs ¶
func (m *VlanMutation) AddNativeVlanIDs(ids ...int)
AddNativeVlanIDs adds the "native_vlan" edge to the NetInterface entity by ids.
func (*VlanMutation) AddOnDeviceIDs ¶
func (m *VlanMutation) AddOnDeviceIDs(ids ...int)
AddOnDeviceIDs adds the "on_device" edge to the Device entity by ids.
func (*VlanMutation) AddPoNativeVlanIDs ¶ added in v0.2.0
func (m *VlanMutation) AddPoNativeVlanIDs(ids ...int)
AddPoNativeVlanIDs adds the "po_native_vlan" edge to the PortChannelInterface entity by ids.
func (*VlanMutation) AddPoVlanIDs ¶ added in v0.2.0
func (m *VlanMutation) AddPoVlanIDs(ids ...int)
AddPoVlanIDs adds the "po_vlans" edge to the PortChannelInterface entity by ids.
func (*VlanMutation) AddVlanID ¶
func (m *VlanMutation) AddVlanID(i int)
AddVlanID adds i to the "vlan_id" field.
func (*VlanMutation) AddVlanIDs ¶
func (m *VlanMutation) AddVlanIDs(ids ...int)
AddVlanIDs adds the "vlans" edge to the NetInterface entity by ids.
func (*VlanMutation) AddedEdges ¶
func (m *VlanMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*VlanMutation) AddedField ¶
func (m *VlanMutation) 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 (*VlanMutation) AddedFields ¶
func (m *VlanMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*VlanMutation) AddedIDs ¶
func (m *VlanMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*VlanMutation) AddedVlanID ¶
func (m *VlanMutation) AddedVlanID() (r int, exists bool)
AddedVlanID returns the value that was added to the "vlan_id" field in this mutation.
func (*VlanMutation) ClearEdge ¶
func (m *VlanMutation) 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 (*VlanMutation) ClearField ¶
func (m *VlanMutation) 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 (*VlanMutation) ClearNativeVlan ¶
func (m *VlanMutation) ClearNativeVlan()
ClearNativeVlan clears the "native_vlan" edge to the NetInterface entity.
func (*VlanMutation) ClearOnDevice ¶
func (m *VlanMutation) ClearOnDevice()
ClearOnDevice clears the "on_device" edge to the Device entity.
func (*VlanMutation) ClearPoNativeVlan ¶ added in v0.2.0
func (m *VlanMutation) ClearPoNativeVlan()
ClearPoNativeVlan clears the "po_native_vlan" edge to the PortChannelInterface entity.
func (*VlanMutation) ClearPoVlans ¶ added in v0.2.0
func (m *VlanMutation) ClearPoVlans()
ClearPoVlans clears the "po_vlans" edge to the PortChannelInterface entity.
func (*VlanMutation) ClearVlans ¶
func (m *VlanMutation) ClearVlans()
ClearVlans clears the "vlans" edge to the NetInterface entity.
func (*VlanMutation) ClearedEdges ¶
func (m *VlanMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*VlanMutation) ClearedFields ¶
func (m *VlanMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (VlanMutation) Client ¶
func (m VlanMutation) 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 (*VlanMutation) EdgeCleared ¶
func (m *VlanMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*VlanMutation) Field ¶
func (m *VlanMutation) 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 (*VlanMutation) FieldCleared ¶
func (m *VlanMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*VlanMutation) Fields ¶
func (m *VlanMutation) 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 (*VlanMutation) ID ¶
func (m *VlanMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*VlanMutation) NativeVlanCleared ¶
func (m *VlanMutation) NativeVlanCleared() bool
NativeVlanCleared reports if the "native_vlan" edge to the NetInterface entity was cleared.
func (*VlanMutation) NativeVlanIDs ¶
func (m *VlanMutation) NativeVlanIDs() (ids []int)
NativeVlanIDs returns the "native_vlan" edge IDs in the mutation.
func (*VlanMutation) 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 (*VlanMutation) OldVlanID ¶
func (m *VlanMutation) OldVlanID(ctx context.Context) (v int, err error)
OldVlanID returns the old "vlan_id" field's value of the Vlan entity. If the Vlan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VlanMutation) OnDeviceCleared ¶
func (m *VlanMutation) OnDeviceCleared() bool
OnDeviceCleared reports if the "on_device" edge to the Device entity was cleared.
func (*VlanMutation) OnDeviceIDs ¶
func (m *VlanMutation) OnDeviceIDs() (ids []int)
OnDeviceIDs returns the "on_device" edge IDs in the mutation.
func (*VlanMutation) PoNativeVlanCleared ¶ added in v0.2.0
func (m *VlanMutation) PoNativeVlanCleared() bool
PoNativeVlanCleared reports if the "po_native_vlan" edge to the PortChannelInterface entity was cleared.
func (*VlanMutation) PoNativeVlanIDs ¶ added in v0.2.0
func (m *VlanMutation) PoNativeVlanIDs() (ids []int)
PoNativeVlanIDs returns the "po_native_vlan" edge IDs in the mutation.
func (*VlanMutation) PoVlansCleared ¶ added in v0.2.0
func (m *VlanMutation) PoVlansCleared() bool
PoVlansCleared reports if the "po_vlans" edge to the PortChannelInterface entity was cleared.
func (*VlanMutation) PoVlansIDs ¶ added in v0.2.0
func (m *VlanMutation) PoVlansIDs() (ids []int)
PoVlansIDs returns the "po_vlans" edge IDs in the mutation.
func (*VlanMutation) RemoveNativeVlanIDs ¶
func (m *VlanMutation) RemoveNativeVlanIDs(ids ...int)
RemoveNativeVlanIDs removes the "native_vlan" edge to the NetInterface entity by IDs.
func (*VlanMutation) RemoveOnDeviceIDs ¶
func (m *VlanMutation) RemoveOnDeviceIDs(ids ...int)
RemoveOnDeviceIDs removes the "on_device" edge to the Device entity by IDs.
func (*VlanMutation) RemovePoNativeVlanIDs ¶ added in v0.2.0
func (m *VlanMutation) RemovePoNativeVlanIDs(ids ...int)
RemovePoNativeVlanIDs removes the "po_native_vlan" edge to the PortChannelInterface entity by IDs.
func (*VlanMutation) RemovePoVlanIDs ¶ added in v0.2.0
func (m *VlanMutation) RemovePoVlanIDs(ids ...int)
RemovePoVlanIDs removes the "po_vlans" edge to the PortChannelInterface entity by IDs.
func (*VlanMutation) RemoveVlanIDs ¶
func (m *VlanMutation) RemoveVlanIDs(ids ...int)
RemoveVlanIDs removes the "vlans" edge to the NetInterface entity by IDs.
func (*VlanMutation) RemovedEdges ¶
func (m *VlanMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*VlanMutation) RemovedIDs ¶
func (m *VlanMutation) 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 (*VlanMutation) RemovedNativeVlanIDs ¶
func (m *VlanMutation) RemovedNativeVlanIDs() (ids []int)
RemovedNativeVlan returns the removed IDs of the "native_vlan" edge to the NetInterface entity.
func (*VlanMutation) RemovedOnDeviceIDs ¶
func (m *VlanMutation) RemovedOnDeviceIDs() (ids []int)
RemovedOnDevice returns the removed IDs of the "on_device" edge to the Device entity.
func (*VlanMutation) RemovedPoNativeVlanIDs ¶ added in v0.2.0
func (m *VlanMutation) RemovedPoNativeVlanIDs() (ids []int)
RemovedPoNativeVlan returns the removed IDs of the "po_native_vlan" edge to the PortChannelInterface entity.
func (*VlanMutation) RemovedPoVlansIDs ¶ added in v0.2.0
func (m *VlanMutation) RemovedPoVlansIDs() (ids []int)
RemovedPoVlans returns the removed IDs of the "po_vlans" edge to the PortChannelInterface entity.
func (*VlanMutation) RemovedVlansIDs ¶
func (m *VlanMutation) RemovedVlansIDs() (ids []int)
RemovedVlans returns the removed IDs of the "vlans" edge to the NetInterface entity.
func (*VlanMutation) ResetEdge ¶
func (m *VlanMutation) 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 (*VlanMutation) ResetField ¶
func (m *VlanMutation) 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 (*VlanMutation) ResetNativeVlan ¶
func (m *VlanMutation) ResetNativeVlan()
ResetNativeVlan resets all changes to the "native_vlan" edge.
func (*VlanMutation) ResetOnDevice ¶
func (m *VlanMutation) ResetOnDevice()
ResetOnDevice resets all changes to the "on_device" edge.
func (*VlanMutation) ResetPoNativeVlan ¶ added in v0.2.0
func (m *VlanMutation) ResetPoNativeVlan()
ResetPoNativeVlan resets all changes to the "po_native_vlan" edge.
func (*VlanMutation) ResetPoVlans ¶ added in v0.2.0
func (m *VlanMutation) ResetPoVlans()
ResetPoVlans resets all changes to the "po_vlans" edge.
func (*VlanMutation) ResetVlanID ¶
func (m *VlanMutation) ResetVlanID()
ResetVlanID resets all changes to the "vlan_id" field.
func (*VlanMutation) ResetVlans ¶
func (m *VlanMutation) ResetVlans()
ResetVlans resets all changes to the "vlans" edge.
func (*VlanMutation) SetField ¶
func (m *VlanMutation) 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 (*VlanMutation) SetVlanID ¶
func (m *VlanMutation) SetVlanID(i int)
SetVlanID sets the "vlan_id" field.
func (VlanMutation) Tx ¶
func (m VlanMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*VlanMutation) Type ¶
func (m *VlanMutation) Type() string
Type returns the node type of this mutation (Vlan).
func (*VlanMutation) VlanID ¶
func (m *VlanMutation) VlanID() (r int, exists bool)
VlanID returns the value of the "vlan_id" field in the mutation.
func (*VlanMutation) VlansCleared ¶
func (m *VlanMutation) VlansCleared() bool
VlansCleared reports if the "vlans" edge to the NetInterface entity was cleared.
func (*VlanMutation) VlansIDs ¶
func (m *VlanMutation) VlansIDs() (ids []int)
VlansIDs returns the "vlans" edge IDs in the mutation.
type VlanQuery ¶
type VlanQuery struct {
// contains filtered or unexported fields
}
VlanQuery is the builder for querying Vlan entities.
func (*VlanQuery) Clone ¶
Clone returns a duplicate of the VlanQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*VlanQuery) First ¶
First returns the first Vlan entity from the query. Returns a *NotFoundError when no Vlan was found.
func (*VlanQuery) FirstID ¶
FirstID returns the first Vlan ID from the query. Returns a *NotFoundError when no Vlan ID was found.
func (*VlanQuery) GroupBy ¶
func (vq *VlanQuery) GroupBy(field string, fields ...string) *VlanGroupBy
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 { VlanID int `json:"vlan_id,omitempty"` Count int `json:"count,omitempty"` } client.Vlan.Query(). GroupBy(vlan.FieldVlanID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*VlanQuery) Only ¶
Only returns a single Vlan entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Vlan entity is not found. Returns a *NotFoundError when no Vlan entities are found.
func (*VlanQuery) OnlyID ¶
OnlyID is like Only, but returns the only Vlan ID in the query. Returns a *NotSingularError when exactly one Vlan ID is not found. Returns a *NotFoundError when no entities are found.
func (*VlanQuery) QueryNativeVlan ¶
func (vq *VlanQuery) QueryNativeVlan() *NetInterfaceQuery
QueryNativeVlan chains the current query on the "native_vlan" edge.
func (*VlanQuery) QueryOnDevice ¶
func (vq *VlanQuery) QueryOnDevice() *DeviceQuery
QueryOnDevice chains the current query on the "on_device" edge.
func (*VlanQuery) QueryPoNativeVlan ¶ added in v0.2.0
func (vq *VlanQuery) QueryPoNativeVlan() *PortChannelInterfaceQuery
QueryPoNativeVlan chains the current query on the "po_native_vlan" edge.
func (*VlanQuery) QueryPoVlans ¶ added in v0.2.0
func (vq *VlanQuery) QueryPoVlans() *PortChannelInterfaceQuery
QueryPoVlans chains the current query on the "po_vlans" edge.
func (*VlanQuery) QueryVlans ¶
func (vq *VlanQuery) QueryVlans() *NetInterfaceQuery
QueryVlans chains the current query on the "vlans" edge.
func (*VlanQuery) Select ¶
func (vq *VlanQuery) Select(field string, fields ...string) *VlanSelect
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 { VlanID int `json:"vlan_id,omitempty"` } client.Vlan.Query(). Select(vlan.FieldVlanID). Scan(ctx, &v)
func (*VlanQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*VlanQuery) WithNativeVlan ¶
func (vq *VlanQuery) WithNativeVlan(opts ...func(*NetInterfaceQuery)) *VlanQuery
WithNativeVlan tells the query-builder to eager-load the nodes that are connected to the "native_vlan" edge. The optional arguments are used to configure the query builder of the edge.
func (*VlanQuery) WithOnDevice ¶
func (vq *VlanQuery) WithOnDevice(opts ...func(*DeviceQuery)) *VlanQuery
WithOnDevice tells the query-builder to eager-load the nodes that are connected to the "on_device" edge. The optional arguments are used to configure the query builder of the edge.
func (*VlanQuery) WithPoNativeVlan ¶ added in v0.2.0
func (vq *VlanQuery) WithPoNativeVlan(opts ...func(*PortChannelInterfaceQuery)) *VlanQuery
WithPoNativeVlan tells the query-builder to eager-load the nodes that are connected to the "po_native_vlan" edge. The optional arguments are used to configure the query builder of the edge.
func (*VlanQuery) WithPoVlans ¶ added in v0.2.0
func (vq *VlanQuery) WithPoVlans(opts ...func(*PortChannelInterfaceQuery)) *VlanQuery
WithPoVlans tells the query-builder to eager-load the nodes that are connected to the "po_vlans" edge. The optional arguments are used to configure the query builder of the edge.
func (*VlanQuery) WithVlans ¶
func (vq *VlanQuery) WithVlans(opts ...func(*NetInterfaceQuery)) *VlanQuery
WithVlans tells the query-builder to eager-load the nodes that are connected to the "vlans" edge. The optional arguments are used to configure the query builder of the edge.
type VlanSelect ¶
type VlanSelect struct { *VlanQuery // contains filtered or unexported fields }
VlanSelect is the builder for selecting fields of Vlan entities.
func (*VlanSelect) Bool ¶
func (vs *VlanSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VlanSelect) BoolX ¶
func (vs *VlanSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*VlanSelect) Bools ¶
func (vs *VlanSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VlanSelect) BoolsX ¶
func (vs *VlanSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*VlanSelect) Float64 ¶
func (vs *VlanSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VlanSelect) Float64X ¶
func (vs *VlanSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*VlanSelect) Float64s ¶
func (vs *VlanSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VlanSelect) Float64sX ¶
func (vs *VlanSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*VlanSelect) Int ¶
func (vs *VlanSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VlanSelect) IntX ¶
func (vs *VlanSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*VlanSelect) Ints ¶
func (vs *VlanSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VlanSelect) IntsX ¶
func (vs *VlanSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*VlanSelect) Scan ¶
func (vs *VlanSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*VlanSelect) ScanX ¶
func (vs *VlanSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*VlanSelect) String ¶
func (vs *VlanSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*VlanSelect) StringX ¶
func (vs *VlanSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type VlanUpdate ¶
type VlanUpdate struct {
// contains filtered or unexported fields
}
VlanUpdate is the builder for updating Vlan entities.
func (*VlanUpdate) AddNativeVlan ¶
func (vu *VlanUpdate) AddNativeVlan(n ...*NetInterface) *VlanUpdate
AddNativeVlan adds the "native_vlan" edges to the NetInterface entity.
func (*VlanUpdate) AddNativeVlanIDs ¶
func (vu *VlanUpdate) AddNativeVlanIDs(ids ...int) *VlanUpdate
AddNativeVlanIDs adds the "native_vlan" edge to the NetInterface entity by IDs.
func (*VlanUpdate) AddOnDevice ¶
func (vu *VlanUpdate) AddOnDevice(d ...*Device) *VlanUpdate
AddOnDevice adds the "on_device" edges to the Device entity.
func (*VlanUpdate) AddOnDeviceIDs ¶
func (vu *VlanUpdate) AddOnDeviceIDs(ids ...int) *VlanUpdate
AddOnDeviceIDs adds the "on_device" edge to the Device entity by IDs.
func (*VlanUpdate) AddPoNativeVlan ¶ added in v0.2.0
func (vu *VlanUpdate) AddPoNativeVlan(p ...*PortChannelInterface) *VlanUpdate
AddPoNativeVlan adds the "po_native_vlan" edges to the PortChannelInterface entity.
func (*VlanUpdate) AddPoNativeVlanIDs ¶ added in v0.2.0
func (vu *VlanUpdate) AddPoNativeVlanIDs(ids ...int) *VlanUpdate
AddPoNativeVlanIDs adds the "po_native_vlan" edge to the PortChannelInterface entity by IDs.
func (*VlanUpdate) AddPoVlanIDs ¶ added in v0.2.0
func (vu *VlanUpdate) AddPoVlanIDs(ids ...int) *VlanUpdate
AddPoVlanIDs adds the "po_vlans" edge to the PortChannelInterface entity by IDs.
func (*VlanUpdate) AddPoVlans ¶ added in v0.2.0
func (vu *VlanUpdate) AddPoVlans(p ...*PortChannelInterface) *VlanUpdate
AddPoVlans adds the "po_vlans" edges to the PortChannelInterface entity.
func (*VlanUpdate) AddVlanID ¶
func (vu *VlanUpdate) AddVlanID(i int) *VlanUpdate
AddVlanID adds i to the "vlan_id" field.
func (*VlanUpdate) AddVlanIDs ¶
func (vu *VlanUpdate) AddVlanIDs(ids ...int) *VlanUpdate
AddVlanIDs adds the "vlans" edge to the NetInterface entity by IDs.
func (*VlanUpdate) AddVlans ¶
func (vu *VlanUpdate) AddVlans(n ...*NetInterface) *VlanUpdate
AddVlans adds the "vlans" edges to the NetInterface entity.
func (*VlanUpdate) ClearNativeVlan ¶
func (vu *VlanUpdate) ClearNativeVlan() *VlanUpdate
ClearNativeVlan clears all "native_vlan" edges to the NetInterface entity.
func (*VlanUpdate) ClearOnDevice ¶
func (vu *VlanUpdate) ClearOnDevice() *VlanUpdate
ClearOnDevice clears all "on_device" edges to the Device entity.
func (*VlanUpdate) ClearPoNativeVlan ¶ added in v0.2.0
func (vu *VlanUpdate) ClearPoNativeVlan() *VlanUpdate
ClearPoNativeVlan clears all "po_native_vlan" edges to the PortChannelInterface entity.
func (*VlanUpdate) ClearPoVlans ¶ added in v0.2.0
func (vu *VlanUpdate) ClearPoVlans() *VlanUpdate
ClearPoVlans clears all "po_vlans" edges to the PortChannelInterface entity.
func (*VlanUpdate) ClearVlans ¶
func (vu *VlanUpdate) ClearVlans() *VlanUpdate
ClearVlans clears all "vlans" edges to the NetInterface entity.
func (*VlanUpdate) Exec ¶
func (vu *VlanUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*VlanUpdate) ExecX ¶
func (vu *VlanUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VlanUpdate) Mutation ¶
func (vu *VlanUpdate) Mutation() *VlanMutation
Mutation returns the VlanMutation object of the builder.
func (*VlanUpdate) RemoveNativeVlan ¶
func (vu *VlanUpdate) RemoveNativeVlan(n ...*NetInterface) *VlanUpdate
RemoveNativeVlan removes "native_vlan" edges to NetInterface entities.
func (*VlanUpdate) RemoveNativeVlanIDs ¶
func (vu *VlanUpdate) RemoveNativeVlanIDs(ids ...int) *VlanUpdate
RemoveNativeVlanIDs removes the "native_vlan" edge to NetInterface entities by IDs.
func (*VlanUpdate) RemoveOnDevice ¶
func (vu *VlanUpdate) RemoveOnDevice(d ...*Device) *VlanUpdate
RemoveOnDevice removes "on_device" edges to Device entities.
func (*VlanUpdate) RemoveOnDeviceIDs ¶
func (vu *VlanUpdate) RemoveOnDeviceIDs(ids ...int) *VlanUpdate
RemoveOnDeviceIDs removes the "on_device" edge to Device entities by IDs.
func (*VlanUpdate) RemovePoNativeVlan ¶ added in v0.2.0
func (vu *VlanUpdate) RemovePoNativeVlan(p ...*PortChannelInterface) *VlanUpdate
RemovePoNativeVlan removes "po_native_vlan" edges to PortChannelInterface entities.
func (*VlanUpdate) RemovePoNativeVlanIDs ¶ added in v0.2.0
func (vu *VlanUpdate) RemovePoNativeVlanIDs(ids ...int) *VlanUpdate
RemovePoNativeVlanIDs removes the "po_native_vlan" edge to PortChannelInterface entities by IDs.
func (*VlanUpdate) RemovePoVlanIDs ¶ added in v0.2.0
func (vu *VlanUpdate) RemovePoVlanIDs(ids ...int) *VlanUpdate
RemovePoVlanIDs removes the "po_vlans" edge to PortChannelInterface entities by IDs.
func (*VlanUpdate) RemovePoVlans ¶ added in v0.2.0
func (vu *VlanUpdate) RemovePoVlans(p ...*PortChannelInterface) *VlanUpdate
RemovePoVlans removes "po_vlans" edges to PortChannelInterface entities.
func (*VlanUpdate) RemoveVlanIDs ¶
func (vu *VlanUpdate) RemoveVlanIDs(ids ...int) *VlanUpdate
RemoveVlanIDs removes the "vlans" edge to NetInterface entities by IDs.
func (*VlanUpdate) RemoveVlans ¶
func (vu *VlanUpdate) RemoveVlans(n ...*NetInterface) *VlanUpdate
RemoveVlans removes "vlans" edges to NetInterface entities.
func (*VlanUpdate) Save ¶
func (vu *VlanUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*VlanUpdate) SaveX ¶
func (vu *VlanUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*VlanUpdate) SetVlanID ¶
func (vu *VlanUpdate) SetVlanID(i int) *VlanUpdate
SetVlanID sets the "vlan_id" field.
func (*VlanUpdate) Where ¶
func (vu *VlanUpdate) Where(ps ...predicate.Vlan) *VlanUpdate
Where adds a new predicate for the VlanUpdate builder.
type VlanUpdateOne ¶
type VlanUpdateOne struct {
// contains filtered or unexported fields
}
VlanUpdateOne is the builder for updating a single Vlan entity.
func (*VlanUpdateOne) AddNativeVlan ¶
func (vuo *VlanUpdateOne) AddNativeVlan(n ...*NetInterface) *VlanUpdateOne
AddNativeVlan adds the "native_vlan" edges to the NetInterface entity.
func (*VlanUpdateOne) AddNativeVlanIDs ¶
func (vuo *VlanUpdateOne) AddNativeVlanIDs(ids ...int) *VlanUpdateOne
AddNativeVlanIDs adds the "native_vlan" edge to the NetInterface entity by IDs.
func (*VlanUpdateOne) AddOnDevice ¶
func (vuo *VlanUpdateOne) AddOnDevice(d ...*Device) *VlanUpdateOne
AddOnDevice adds the "on_device" edges to the Device entity.
func (*VlanUpdateOne) AddOnDeviceIDs ¶
func (vuo *VlanUpdateOne) AddOnDeviceIDs(ids ...int) *VlanUpdateOne
AddOnDeviceIDs adds the "on_device" edge to the Device entity by IDs.
func (*VlanUpdateOne) AddPoNativeVlan ¶ added in v0.2.0
func (vuo *VlanUpdateOne) AddPoNativeVlan(p ...*PortChannelInterface) *VlanUpdateOne
AddPoNativeVlan adds the "po_native_vlan" edges to the PortChannelInterface entity.
func (*VlanUpdateOne) AddPoNativeVlanIDs ¶ added in v0.2.0
func (vuo *VlanUpdateOne) AddPoNativeVlanIDs(ids ...int) *VlanUpdateOne
AddPoNativeVlanIDs adds the "po_native_vlan" edge to the PortChannelInterface entity by IDs.
func (*VlanUpdateOne) AddPoVlanIDs ¶ added in v0.2.0
func (vuo *VlanUpdateOne) AddPoVlanIDs(ids ...int) *VlanUpdateOne
AddPoVlanIDs adds the "po_vlans" edge to the PortChannelInterface entity by IDs.
func (*VlanUpdateOne) AddPoVlans ¶ added in v0.2.0
func (vuo *VlanUpdateOne) AddPoVlans(p ...*PortChannelInterface) *VlanUpdateOne
AddPoVlans adds the "po_vlans" edges to the PortChannelInterface entity.
func (*VlanUpdateOne) AddVlanID ¶
func (vuo *VlanUpdateOne) AddVlanID(i int) *VlanUpdateOne
AddVlanID adds i to the "vlan_id" field.
func (*VlanUpdateOne) AddVlanIDs ¶
func (vuo *VlanUpdateOne) AddVlanIDs(ids ...int) *VlanUpdateOne
AddVlanIDs adds the "vlans" edge to the NetInterface entity by IDs.
func (*VlanUpdateOne) AddVlans ¶
func (vuo *VlanUpdateOne) AddVlans(n ...*NetInterface) *VlanUpdateOne
AddVlans adds the "vlans" edges to the NetInterface entity.
func (*VlanUpdateOne) ClearNativeVlan ¶
func (vuo *VlanUpdateOne) ClearNativeVlan() *VlanUpdateOne
ClearNativeVlan clears all "native_vlan" edges to the NetInterface entity.
func (*VlanUpdateOne) ClearOnDevice ¶
func (vuo *VlanUpdateOne) ClearOnDevice() *VlanUpdateOne
ClearOnDevice clears all "on_device" edges to the Device entity.
func (*VlanUpdateOne) ClearPoNativeVlan ¶ added in v0.2.0
func (vuo *VlanUpdateOne) ClearPoNativeVlan() *VlanUpdateOne
ClearPoNativeVlan clears all "po_native_vlan" edges to the PortChannelInterface entity.
func (*VlanUpdateOne) ClearPoVlans ¶ added in v0.2.0
func (vuo *VlanUpdateOne) ClearPoVlans() *VlanUpdateOne
ClearPoVlans clears all "po_vlans" edges to the PortChannelInterface entity.
func (*VlanUpdateOne) ClearVlans ¶
func (vuo *VlanUpdateOne) ClearVlans() *VlanUpdateOne
ClearVlans clears all "vlans" edges to the NetInterface entity.
func (*VlanUpdateOne) Exec ¶
func (vuo *VlanUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*VlanUpdateOne) ExecX ¶
func (vuo *VlanUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VlanUpdateOne) Mutation ¶
func (vuo *VlanUpdateOne) Mutation() *VlanMutation
Mutation returns the VlanMutation object of the builder.
func (*VlanUpdateOne) RemoveNativeVlan ¶
func (vuo *VlanUpdateOne) RemoveNativeVlan(n ...*NetInterface) *VlanUpdateOne
RemoveNativeVlan removes "native_vlan" edges to NetInterface entities.
func (*VlanUpdateOne) RemoveNativeVlanIDs ¶
func (vuo *VlanUpdateOne) RemoveNativeVlanIDs(ids ...int) *VlanUpdateOne
RemoveNativeVlanIDs removes the "native_vlan" edge to NetInterface entities by IDs.
func (*VlanUpdateOne) RemoveOnDevice ¶
func (vuo *VlanUpdateOne) RemoveOnDevice(d ...*Device) *VlanUpdateOne
RemoveOnDevice removes "on_device" edges to Device entities.
func (*VlanUpdateOne) RemoveOnDeviceIDs ¶
func (vuo *VlanUpdateOne) RemoveOnDeviceIDs(ids ...int) *VlanUpdateOne
RemoveOnDeviceIDs removes the "on_device" edge to Device entities by IDs.
func (*VlanUpdateOne) RemovePoNativeVlan ¶ added in v0.2.0
func (vuo *VlanUpdateOne) RemovePoNativeVlan(p ...*PortChannelInterface) *VlanUpdateOne
RemovePoNativeVlan removes "po_native_vlan" edges to PortChannelInterface entities.
func (*VlanUpdateOne) RemovePoNativeVlanIDs ¶ added in v0.2.0
func (vuo *VlanUpdateOne) RemovePoNativeVlanIDs(ids ...int) *VlanUpdateOne
RemovePoNativeVlanIDs removes the "po_native_vlan" edge to PortChannelInterface entities by IDs.
func (*VlanUpdateOne) RemovePoVlanIDs ¶ added in v0.2.0
func (vuo *VlanUpdateOne) RemovePoVlanIDs(ids ...int) *VlanUpdateOne
RemovePoVlanIDs removes the "po_vlans" edge to PortChannelInterface entities by IDs.
func (*VlanUpdateOne) RemovePoVlans ¶ added in v0.2.0
func (vuo *VlanUpdateOne) RemovePoVlans(p ...*PortChannelInterface) *VlanUpdateOne
RemovePoVlans removes "po_vlans" edges to PortChannelInterface entities.
func (*VlanUpdateOne) RemoveVlanIDs ¶
func (vuo *VlanUpdateOne) RemoveVlanIDs(ids ...int) *VlanUpdateOne
RemoveVlanIDs removes the "vlans" edge to NetInterface entities by IDs.
func (*VlanUpdateOne) RemoveVlans ¶
func (vuo *VlanUpdateOne) RemoveVlans(n ...*NetInterface) *VlanUpdateOne
RemoveVlans removes "vlans" edges to NetInterface entities.
func (*VlanUpdateOne) Save ¶
func (vuo *VlanUpdateOne) Save(ctx context.Context) (*Vlan, error)
Save executes the query and returns the updated Vlan entity.
func (*VlanUpdateOne) SaveX ¶
func (vuo *VlanUpdateOne) SaveX(ctx context.Context) *Vlan
SaveX is like Save, but panics if an error occurs.
func (*VlanUpdateOne) Select ¶
func (vuo *VlanUpdateOne) Select(field string, fields ...string) *VlanUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*VlanUpdateOne) SetVlanID ¶
func (vuo *VlanUpdateOne) SetVlanID(i int) *VlanUpdateOne
SetVlanID sets the "vlan_id" field.
Source Files
¶
- administrator.go
- administrator_create.go
- administrator_delete.go
- administrator_query.go
- administrator_update.go
- client.go
- config.go
- context.go
- deletedvlanlog.go
- deletedvlanlog_create.go
- deletedvlanlog_delete.go
- deletedvlanlog_query.go
- deletedvlanlog_update.go
- device.go
- device_create.go
- device_delete.go
- device_query.go
- device_update.go
- deviceplatform.go
- deviceplatform_create.go
- deviceplatform_delete.go
- deviceplatform_query.go
- deviceplatform_update.go
- devicetype.go
- devicetype_create.go
- devicetype_delete.go
- devicetype_query.go
- devicetype_update.go
- ent.go
- generate.go
- ipaddress.go
- ipaddress_create.go
- ipaddress_delete.go
- ipaddress_query.go
- ipaddress_update.go
- ipstaticroutingtable.go
- ipstaticroutingtable_create.go
- ipstaticroutingtable_delete.go
- ipstaticroutingtable_query.go
- ipstaticroutingtable_update.go
- mutation.go
- netinterface.go
- netinterface_create.go
- netinterface_delete.go
- netinterface_query.go
- netinterface_update.go
- netinterfacelayer.go
- netinterfacelayer_create.go
- netinterfacelayer_delete.go
- netinterfacelayer_query.go
- netinterfacelayer_update.go
- netinterfacemode.go
- netinterfacemode_create.go
- netinterfacemode_delete.go
- netinterfacemode_query.go
- netinterfacemode_update.go
- nettopology.go
- nettopology_create.go
- nettopology_delete.go
- nettopology_query.go
- nettopology_update.go
- nettopologydevicemap.go
- nettopologydevicemap_create.go
- nettopologydevicemap_delete.go
- nettopologydevicemap_query.go
- nettopologydevicemap_update.go
- portchannelinterface.go
- portchannelinterface_create.go
- portchannelinterface_delete.go
- portchannelinterface_query.go
- portchannelinterface_update.go
- runtime.go
- tx.go
- vlan.go
- vlan_create.go
- vlan_delete.go
- vlan_query.go
- vlan_update.go