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) QueryInPlatform() *DevicePlatformQuery
- func (d *Device) QueryInTopology() *NetTopologyDeviceMapQuery
- func (d *Device) QueryInType() *DeviceTypeQuery
- func (d *Device) QueryInterfaces() *NetInterfaceQuery
- 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) 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) 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) 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) 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) InPlatformOrErr() (*DevicePlatform, error)
- func (e DeviceEdges) InTopologyOrErr() ([]*NetTopologyDeviceMap, error)
- func (e DeviceEdges) InTypeOrErr() (*DeviceType, error)
- func (e DeviceEdges) InterfacesOrErr() ([]*NetInterface, 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) AddInTopologyIDs(ids ...int)
- func (m *DeviceMutation) AddInterfaceIDs(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) ClearInPlatform()
- func (m *DeviceMutation) ClearInTopology()
- func (m *DeviceMutation) ClearInType()
- func (m *DeviceMutation) ClearInterfaces()
- 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) ID() (id int, exists bool)
- 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) RemoveDeletedVlanIDs(ids ...int)
- func (m *DeviceMutation) RemoveInTopologyIDs(ids ...int)
- func (m *DeviceMutation) RemoveInterfaceIDs(ids ...int)
- func (m *DeviceMutation) RemoveStoreVlanIDs(ids ...int)
- func (m *DeviceMutation) RemovedDeletedVlansIDs() (ids []int)
- func (m *DeviceMutation) RemovedEdges() []string
- func (m *DeviceMutation) RemovedIDs(name string) []ent.Value
- func (m *DeviceMutation) RemovedInTopologyIDs() (ids []int)
- func (m *DeviceMutation) RemovedInterfacesIDs() (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) ResetInPlatform()
- func (m *DeviceMutation) ResetInTopology()
- func (m *DeviceMutation) ResetInType()
- func (m *DeviceMutation) ResetInterfaces()
- 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) QueryInPlatform() *DevicePlatformQuery
- func (dq *DeviceQuery) QueryInTopology() *NetTopologyDeviceMapQuery
- func (dq *DeviceQuery) QueryInType() *DeviceTypeQuery
- func (dq *DeviceQuery) QueryInterfaces() *NetInterfaceQuery
- 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) 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) 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) 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) 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) ClearInPlatform() *DeviceUpdate
- func (du *DeviceUpdate) ClearInTopology() *DeviceUpdate
- func (du *DeviceUpdate) ClearInType() *DeviceUpdate
- func (du *DeviceUpdate) ClearInterfaces() *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) 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) 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) 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) 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) ClearInPlatform() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearInTopology() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearInType() *DeviceUpdateOne
- func (duo *DeviceUpdateOne) ClearInterfaces() *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) 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) 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 MutateFunc
- type Mutation
- type Mutator
- type NetInterface
- func (ni *NetInterface) QueryHaveVlans() *VlanQuery
- func (ni *NetInterface) QueryMode() *NetInterfaceModeQuery
- func (ni *NetInterface) QueryNativeOnVlan() *VlanQuery
- func (ni *NetInterface) QueryOnDevice() *DeviceQuery
- 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) QueryMode(ni *NetInterface) *NetInterfaceModeQuery
- func (c *NetInterfaceClient) QueryNativeOnVlan(ni *NetInterface) *VlanQuery
- func (c *NetInterfaceClient) QueryOnDevice(ni *NetInterface) *DeviceQuery
- 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) 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) SetOnDevice(d *Device) *NetInterfaceCreate
- func (nic *NetInterfaceCreate) SetOnDeviceID(id int) *NetInterfaceCreate
- type NetInterfaceCreateBulk
- type NetInterfaceDelete
- type NetInterfaceDeleteOne
- type NetInterfaceEdges
- 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 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) 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) 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) 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) 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) RemoveModeIDs(ids ...int)
- func (m *NetInterfaceModeMutation) RemovedEdges() []string
- func (m *NetInterfaceModeMutation) RemovedIDs(name string) []ent.Value
- func (m *NetInterfaceModeMutation) RemovedModesIDs() (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) 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) 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
- 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) ClearModes() *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) 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) ClearModes() *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) 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) 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) ClearMode()
- func (m *NetInterfaceMutation) ClearNativeOnVlan()
- func (m *NetInterfaceMutation) ClearOnDevice()
- 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) 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) Op() Op
- func (m *NetInterfaceMutation) RemoveHaveVlanIDs(ids ...int)
- func (m *NetInterfaceMutation) RemovedEdges() []string
- func (m *NetInterfaceMutation) RemovedHaveVlansIDs() (ids []int)
- func (m *NetInterfaceMutation) RemovedIDs(name string) []ent.Value
- func (m *NetInterfaceMutation) ResetEdge(name string) error
- func (m *NetInterfaceMutation) ResetField(name string) error
- func (m *NetInterfaceMutation) ResetHaveVlans()
- func (m *NetInterfaceMutation) ResetInterfaceName()
- func (m *NetInterfaceMutation) ResetInterfaceShutdown()
- func (m *NetInterfaceMutation) ResetMode()
- func (m *NetInterfaceMutation) ResetNativeOnVlan()
- func (m *NetInterfaceMutation) ResetOnDevice()
- 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) 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) QueryMode() *NetInterfaceModeQuery
- func (niq *NetInterfaceQuery) QueryNativeOnVlan() *VlanQuery
- func (niq *NetInterfaceQuery) QueryOnDevice() *DeviceQuery
- 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) WithMode(opts ...func(*NetInterfaceModeQuery)) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithNativeOnVlan(opts ...func(*VlanQuery)) *NetInterfaceQuery
- func (niq *NetInterfaceQuery) WithOnDevice(opts ...func(*DeviceQuery)) *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) ClearHaveVlans() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearMode() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearNativeOnVlan() *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) ClearOnDevice() *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) 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) SetOnDevice(d *Device) *NetInterfaceUpdate
- func (niu *NetInterfaceUpdate) SetOnDeviceID(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) ClearHaveVlans() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearMode() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearNativeOnVlan() *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) ClearOnDevice() *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) 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) SetOnDevice(d *Device) *NetInterfaceUpdateOne
- func (niuo *NetInterfaceUpdateOne) SetOnDeviceID(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 Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tx
- type ValidationError
- type Value
- type Vlan
- 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) 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) 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
- 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) 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) 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) RemoveNativeVlanIDs(ids ...int)
- func (m *VlanMutation) RemoveOnDeviceIDs(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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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" TypeNetInterface = "NetInterface" TypeNetInterfaceMode = "NetInterfaceMode" TypeNetTopology = "NetTopology" TypeNetTopologyDeviceMap = "NetTopologyDeviceMap" 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 // NetInterface is the client for interacting with the NetInterface builders. NetInterface *NetInterfaceClient // 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 // 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) 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) 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) 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) 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) 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) 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"` // 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) 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) 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) 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) 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) 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) 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) 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) 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) RemoveDeletedVlanIDs ¶
func (m *DeviceMutation) RemoveDeletedVlanIDs(ids ...int)
RemoveDeletedVlanIDs removes the "deleted_vlans" edge to the DeletedVlanLog 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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 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) 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) 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) 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) 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) 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) 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.
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"` // Mode holds the value of the mode edge. Mode *NetInterfaceMode `json:"mode,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) 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.
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 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) 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) 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) 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"` // 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.
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) 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) 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) RemoveModeIDs ¶
func (m *NetInterfaceModeMutation) RemoveModeIDs(ids ...int)
RemoveModeIDs removes the "modes" edge to the NetInterface 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) 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) 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) 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.
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) ClearModes ¶
func (nimu *NetInterfaceModeUpdate) ClearModes() *NetInterfaceModeUpdate
ClearModes clears all "modes" edges to the NetInterface 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) 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) ClearModes ¶
func (nimuo *NetInterfaceModeUpdateOne) ClearModes() *NetInterfaceModeUpdateOne
ClearModes clears all "modes" edges to the NetInterface 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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.
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) ClearHaveVlans ¶
func (niu *NetInterfaceUpdate) ClearHaveVlans() *NetInterfaceUpdate
ClearHaveVlans clears all "have_vlans" edges to the Vlan 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) 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) 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) 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) 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) ClearHaveVlans ¶
func (niuo *NetInterfaceUpdateOne) ClearHaveVlans() *NetInterfaceUpdateOne
ClearHaveVlans clears all "have_vlans" edges to the Vlan 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) 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) 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) 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.
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 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 // NetInterface is the client for interacting with the NetInterface builders. NetInterface *NetInterfaceClient // 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 // 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) 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) 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) 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"` // 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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
- mutation.go
- netinterface.go
- netinterface_create.go
- netinterface_delete.go
- netinterface_query.go
- netinterface_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
- runtime.go
- tx.go
- vlan.go
- vlan_create.go
- vlan_delete.go
- vlan_query.go
- vlan_update.go