Documentation ¶
Index ¶
- Constants
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AgeKey
- type AgeKeyClient
- func (c *AgeKeyClient) Create() *AgeKeyCreate
- func (c *AgeKeyClient) CreateBulk(builders ...*AgeKeyCreate) *AgeKeyCreateBulk
- func (c *AgeKeyClient) Delete() *AgeKeyDelete
- func (c *AgeKeyClient) DeleteOne(ak *AgeKey) *AgeKeyDeleteOne
- func (c *AgeKeyClient) DeleteOneID(id uuid.UUID) *AgeKeyDeleteOne
- func (c *AgeKeyClient) Get(ctx context.Context, id uuid.UUID) (*AgeKey, error)
- func (c *AgeKeyClient) GetX(ctx context.Context, id uuid.UUID) *AgeKey
- func (c *AgeKeyClient) Hooks() []Hook
- func (c *AgeKeyClient) Intercept(interceptors ...Interceptor)
- func (c *AgeKeyClient) Interceptors() []Interceptor
- func (c *AgeKeyClient) Query() *AgeKeyQuery
- func (c *AgeKeyClient) QueryUser(ak *AgeKey) *UserQuery
- func (c *AgeKeyClient) Update() *AgeKeyUpdate
- func (c *AgeKeyClient) UpdateOne(ak *AgeKey) *AgeKeyUpdateOne
- func (c *AgeKeyClient) UpdateOneID(id uuid.UUID) *AgeKeyUpdateOne
- func (c *AgeKeyClient) Use(hooks ...Hook)
- type AgeKeyCreate
- func (akc *AgeKeyCreate) Exec(ctx context.Context) error
- func (akc *AgeKeyCreate) ExecX(ctx context.Context)
- func (akc *AgeKeyCreate) Mutation() *AgeKeyMutation
- func (akc *AgeKeyCreate) Save(ctx context.Context) (*AgeKey, error)
- func (akc *AgeKeyCreate) SaveX(ctx context.Context) *AgeKey
- func (akc *AgeKeyCreate) SetCreated(t time.Time) *AgeKeyCreate
- func (akc *AgeKeyCreate) SetID(u uuid.UUID) *AgeKeyCreate
- func (akc *AgeKeyCreate) SetKey(b []byte) *AgeKeyCreate
- func (akc *AgeKeyCreate) SetNillableCreated(t *time.Time) *AgeKeyCreate
- func (akc *AgeKeyCreate) SetNillableID(u *uuid.UUID) *AgeKeyCreate
- func (akc *AgeKeyCreate) SetNillableUpdated(t *time.Time) *AgeKeyCreate
- func (akc *AgeKeyCreate) SetOwner(u uuid.UUID) *AgeKeyCreate
- func (akc *AgeKeyCreate) SetUpdated(t time.Time) *AgeKeyCreate
- func (akc *AgeKeyCreate) SetUser(u *User) *AgeKeyCreate
- func (akc *AgeKeyCreate) SetUserID(id uuid.UUID) *AgeKeyCreate
- type AgeKeyCreateBulk
- type AgeKeyDelete
- type AgeKeyDeleteOne
- type AgeKeyEdges
- type AgeKeyGroupBy
- func (akgb *AgeKeyGroupBy) Aggregate(fns ...AggregateFunc) *AgeKeyGroupBy
- func (s *AgeKeyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AgeKeyGroupBy) BoolX(ctx context.Context) bool
- func (s *AgeKeyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AgeKeyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AgeKeyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AgeKeyGroupBy) Float64X(ctx context.Context) float64
- func (s *AgeKeyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AgeKeyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AgeKeyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AgeKeyGroupBy) IntX(ctx context.Context) int
- func (s *AgeKeyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AgeKeyGroupBy) IntsX(ctx context.Context) []int
- func (akgb *AgeKeyGroupBy) Scan(ctx context.Context, v any) error
- func (s *AgeKeyGroupBy) ScanX(ctx context.Context, v any)
- func (s *AgeKeyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AgeKeyGroupBy) StringX(ctx context.Context) string
- func (s *AgeKeyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AgeKeyGroupBy) StringsX(ctx context.Context) []string
- type AgeKeyMutation
- func (m *AgeKeyMutation) AddField(name string, value ent.Value) error
- func (m *AgeKeyMutation) AddedEdges() []string
- func (m *AgeKeyMutation) AddedField(name string) (ent.Value, bool)
- func (m *AgeKeyMutation) AddedFields() []string
- func (m *AgeKeyMutation) AddedIDs(name string) []ent.Value
- func (m *AgeKeyMutation) ClearEdge(name string) error
- func (m *AgeKeyMutation) ClearField(name string) error
- func (m *AgeKeyMutation) ClearUser()
- func (m *AgeKeyMutation) ClearedEdges() []string
- func (m *AgeKeyMutation) ClearedFields() []string
- func (m AgeKeyMutation) Client() *Client
- func (m *AgeKeyMutation) Created() (r time.Time, exists bool)
- func (m *AgeKeyMutation) EdgeCleared(name string) bool
- func (m *AgeKeyMutation) Field(name string) (ent.Value, bool)
- func (m *AgeKeyMutation) FieldCleared(name string) bool
- func (m *AgeKeyMutation) Fields() []string
- func (m *AgeKeyMutation) ID() (id uuid.UUID, exists bool)
- func (m *AgeKeyMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AgeKeyMutation) Key() (r []byte, exists bool)
- func (m *AgeKeyMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *AgeKeyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AgeKeyMutation) OldKey(ctx context.Context) (v *[]byte, err error)
- func (m *AgeKeyMutation) OldOwner(ctx context.Context) (v uuid.UUID, err error)
- func (m *AgeKeyMutation) OldUpdated(ctx context.Context) (v time.Time, err error)
- func (m *AgeKeyMutation) Op() Op
- func (m *AgeKeyMutation) Owner() (r uuid.UUID, exists bool)
- func (m *AgeKeyMutation) RemovedEdges() []string
- func (m *AgeKeyMutation) RemovedIDs(name string) []ent.Value
- func (m *AgeKeyMutation) ResetCreated()
- func (m *AgeKeyMutation) ResetEdge(name string) error
- func (m *AgeKeyMutation) ResetField(name string) error
- func (m *AgeKeyMutation) ResetKey()
- func (m *AgeKeyMutation) ResetOwner()
- func (m *AgeKeyMutation) ResetUpdated()
- func (m *AgeKeyMutation) ResetUser()
- func (m *AgeKeyMutation) SetCreated(t time.Time)
- func (m *AgeKeyMutation) SetField(name string, value ent.Value) error
- func (m *AgeKeyMutation) SetID(id uuid.UUID)
- func (m *AgeKeyMutation) SetKey(b []byte)
- func (m *AgeKeyMutation) SetOp(op Op)
- func (m *AgeKeyMutation) SetOwner(u uuid.UUID)
- func (m *AgeKeyMutation) SetUpdated(t time.Time)
- func (m *AgeKeyMutation) SetUserID(id uuid.UUID)
- func (m AgeKeyMutation) Tx() (*Tx, error)
- func (m *AgeKeyMutation) Type() string
- func (m *AgeKeyMutation) Updated() (r time.Time, exists bool)
- func (m *AgeKeyMutation) UserCleared() bool
- func (m *AgeKeyMutation) UserID() (id uuid.UUID, exists bool)
- func (m *AgeKeyMutation) UserIDs() (ids []uuid.UUID)
- func (m *AgeKeyMutation) Where(ps ...predicate.AgeKey)
- func (m *AgeKeyMutation) WhereP(ps ...func(*sql.Selector))
- type AgeKeyQuery
- func (akq *AgeKeyQuery) Aggregate(fns ...AggregateFunc) *AgeKeySelect
- func (akq *AgeKeyQuery) All(ctx context.Context) ([]*AgeKey, error)
- func (akq *AgeKeyQuery) AllX(ctx context.Context) []*AgeKey
- func (akq *AgeKeyQuery) Clone() *AgeKeyQuery
- func (akq *AgeKeyQuery) Count(ctx context.Context) (int, error)
- func (akq *AgeKeyQuery) CountX(ctx context.Context) int
- func (akq *AgeKeyQuery) Exist(ctx context.Context) (bool, error)
- func (akq *AgeKeyQuery) ExistX(ctx context.Context) bool
- func (akq *AgeKeyQuery) First(ctx context.Context) (*AgeKey, error)
- func (akq *AgeKeyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (akq *AgeKeyQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (akq *AgeKeyQuery) FirstX(ctx context.Context) *AgeKey
- func (akq *AgeKeyQuery) GroupBy(field string, fields ...string) *AgeKeyGroupBy
- func (akq *AgeKeyQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (akq *AgeKeyQuery) IDsX(ctx context.Context) []uuid.UUID
- func (akq *AgeKeyQuery) Limit(limit int) *AgeKeyQuery
- func (akq *AgeKeyQuery) Offset(offset int) *AgeKeyQuery
- func (akq *AgeKeyQuery) Only(ctx context.Context) (*AgeKey, error)
- func (akq *AgeKeyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (akq *AgeKeyQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (akq *AgeKeyQuery) OnlyX(ctx context.Context) *AgeKey
- func (akq *AgeKeyQuery) Order(o ...agekey.OrderOption) *AgeKeyQuery
- func (akq *AgeKeyQuery) QueryUser() *UserQuery
- func (akq *AgeKeyQuery) Select(fields ...string) *AgeKeySelect
- func (akq *AgeKeyQuery) Unique(unique bool) *AgeKeyQuery
- func (akq *AgeKeyQuery) Where(ps ...predicate.AgeKey) *AgeKeyQuery
- func (akq *AgeKeyQuery) WithUser(opts ...func(*UserQuery)) *AgeKeyQuery
- type AgeKeySelect
- func (aks *AgeKeySelect) Aggregate(fns ...AggregateFunc) *AgeKeySelect
- func (s *AgeKeySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AgeKeySelect) BoolX(ctx context.Context) bool
- func (s *AgeKeySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AgeKeySelect) BoolsX(ctx context.Context) []bool
- func (s *AgeKeySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AgeKeySelect) Float64X(ctx context.Context) float64
- func (s *AgeKeySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AgeKeySelect) Float64sX(ctx context.Context) []float64
- func (s *AgeKeySelect) Int(ctx context.Context) (_ int, err error)
- func (s *AgeKeySelect) IntX(ctx context.Context) int
- func (s *AgeKeySelect) Ints(ctx context.Context) ([]int, error)
- func (s *AgeKeySelect) IntsX(ctx context.Context) []int
- func (aks *AgeKeySelect) Scan(ctx context.Context, v any) error
- func (s *AgeKeySelect) ScanX(ctx context.Context, v any)
- func (s *AgeKeySelect) String(ctx context.Context) (_ string, err error)
- func (s *AgeKeySelect) StringX(ctx context.Context) string
- func (s *AgeKeySelect) Strings(ctx context.Context) ([]string, error)
- func (s *AgeKeySelect) StringsX(ctx context.Context) []string
- type AgeKeyUpdate
- func (aku *AgeKeyUpdate) Exec(ctx context.Context) error
- func (aku *AgeKeyUpdate) ExecX(ctx context.Context)
- func (aku *AgeKeyUpdate) Mutation() *AgeKeyMutation
- func (aku *AgeKeyUpdate) Save(ctx context.Context) (int, error)
- func (aku *AgeKeyUpdate) SaveX(ctx context.Context) int
- func (aku *AgeKeyUpdate) SetKey(b []byte) *AgeKeyUpdate
- func (aku *AgeKeyUpdate) SetNillableUpdated(t *time.Time) *AgeKeyUpdate
- func (aku *AgeKeyUpdate) SetUpdated(t time.Time) *AgeKeyUpdate
- func (aku *AgeKeyUpdate) Where(ps ...predicate.AgeKey) *AgeKeyUpdate
- type AgeKeyUpdateOne
- func (akuo *AgeKeyUpdateOne) Exec(ctx context.Context) error
- func (akuo *AgeKeyUpdateOne) ExecX(ctx context.Context)
- func (akuo *AgeKeyUpdateOne) Mutation() *AgeKeyMutation
- func (akuo *AgeKeyUpdateOne) Save(ctx context.Context) (*AgeKey, error)
- func (akuo *AgeKeyUpdateOne) SaveX(ctx context.Context) *AgeKey
- func (akuo *AgeKeyUpdateOne) Select(field string, fields ...string) *AgeKeyUpdateOne
- func (akuo *AgeKeyUpdateOne) SetKey(b []byte) *AgeKeyUpdateOne
- func (akuo *AgeKeyUpdateOne) SetNillableUpdated(t *time.Time) *AgeKeyUpdateOne
- func (akuo *AgeKeyUpdateOne) SetUpdated(t time.Time) *AgeKeyUpdateOne
- func (akuo *AgeKeyUpdateOne) Where(ps ...predicate.AgeKey) *AgeKeyUpdateOne
- type AgeKeys
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type HIBP
- type HIBPClient
- func (c *HIBPClient) Create() *HIBPCreate
- func (c *HIBPClient) CreateBulk(builders ...*HIBPCreate) *HIBPCreateBulk
- func (c *HIBPClient) Delete() *HIBPDelete
- func (c *HIBPClient) DeleteOne(h *HIBP) *HIBPDeleteOne
- func (c *HIBPClient) DeleteOneID(id uuid.UUID) *HIBPDeleteOne
- func (c *HIBPClient) Get(ctx context.Context, id uuid.UUID) (*HIBP, error)
- func (c *HIBPClient) GetX(ctx context.Context, id uuid.UUID) *HIBP
- func (c *HIBPClient) Hooks() []Hook
- func (c *HIBPClient) Intercept(interceptors ...Interceptor)
- func (c *HIBPClient) Interceptors() []Interceptor
- func (c *HIBPClient) Query() *HIBPQuery
- func (c *HIBPClient) QueryTrackedBreaches(h *HIBP) *TrackedBreachesQuery
- func (c *HIBPClient) Update() *HIBPUpdate
- func (c *HIBPClient) UpdateOne(h *HIBP) *HIBPUpdateOne
- func (c *HIBPClient) UpdateOneID(id uuid.UUID) *HIBPUpdateOne
- func (c *HIBPClient) Use(hooks ...Hook)
- type HIBPCreate
- func (hc *HIBPCreate) Exec(ctx context.Context) error
- func (hc *HIBPCreate) ExecX(ctx context.Context)
- func (hc *HIBPCreate) Mutation() *HIBPMutation
- func (hc *HIBPCreate) Save(ctx context.Context) (*HIBP, error)
- func (hc *HIBPCreate) SaveX(ctx context.Context) *HIBP
- func (hc *HIBPCreate) SetAddedDate(t time.Time) *HIBPCreate
- func (hc *HIBPCreate) SetBreachDate(s string) *HIBPCreate
- func (hc *HIBPCreate) SetDataclasses(s []string) *HIBPCreate
- func (hc *HIBPCreate) SetDescription(s string) *HIBPCreate
- func (hc *HIBPCreate) SetDomain(s string) *HIBPCreate
- func (hc *HIBPCreate) SetID(u uuid.UUID) *HIBPCreate
- func (hc *HIBPCreate) SetIsFabricated(b bool) *HIBPCreate
- func (hc *HIBPCreate) SetIsMalware(b bool) *HIBPCreate
- func (hc *HIBPCreate) SetIsRetired(b bool) *HIBPCreate
- func (hc *HIBPCreate) SetIsSensitive(b bool) *HIBPCreate
- func (hc *HIBPCreate) SetIsSpamList(b bool) *HIBPCreate
- func (hc *HIBPCreate) SetIsVerified(b bool) *HIBPCreate
- func (hc *HIBPCreate) SetLogoPath(s string) *HIBPCreate
- func (hc *HIBPCreate) SetModifiedDate(t time.Time) *HIBPCreate
- func (hc *HIBPCreate) SetName(s string) *HIBPCreate
- func (hc *HIBPCreate) SetNillableDescription(s *string) *HIBPCreate
- func (hc *HIBPCreate) SetNillableID(u *uuid.UUID) *HIBPCreate
- func (hc *HIBPCreate) SetNillableIsFabricated(b *bool) *HIBPCreate
- func (hc *HIBPCreate) SetNillableIsMalware(b *bool) *HIBPCreate
- func (hc *HIBPCreate) SetNillableIsRetired(b *bool) *HIBPCreate
- func (hc *HIBPCreate) SetNillableIsSensitive(b *bool) *HIBPCreate
- func (hc *HIBPCreate) SetNillableIsSpamList(b *bool) *HIBPCreate
- func (hc *HIBPCreate) SetNillableIsVerified(b *bool) *HIBPCreate
- func (hc *HIBPCreate) SetNillableLogoPath(s *string) *HIBPCreate
- func (hc *HIBPCreate) SetNillableTrackedBreachesID(id *uuid.UUID) *HIBPCreate
- func (hc *HIBPCreate) SetPwnCount(i int) *HIBPCreate
- func (hc *HIBPCreate) SetTitle(s string) *HIBPCreate
- func (hc *HIBPCreate) SetTrackedBreaches(t *TrackedBreaches) *HIBPCreate
- func (hc *HIBPCreate) SetTrackedBreachesID(id uuid.UUID) *HIBPCreate
- type HIBPCreateBulk
- type HIBPDelete
- type HIBPDeleteOne
- type HIBPEdges
- type HIBPGroupBy
- func (hgb *HIBPGroupBy) Aggregate(fns ...AggregateFunc) *HIBPGroupBy
- func (s *HIBPGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *HIBPGroupBy) BoolX(ctx context.Context) bool
- func (s *HIBPGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *HIBPGroupBy) BoolsX(ctx context.Context) []bool
- func (s *HIBPGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *HIBPGroupBy) Float64X(ctx context.Context) float64
- func (s *HIBPGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *HIBPGroupBy) Float64sX(ctx context.Context) []float64
- func (s *HIBPGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *HIBPGroupBy) IntX(ctx context.Context) int
- func (s *HIBPGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *HIBPGroupBy) IntsX(ctx context.Context) []int
- func (hgb *HIBPGroupBy) Scan(ctx context.Context, v any) error
- func (s *HIBPGroupBy) ScanX(ctx context.Context, v any)
- func (s *HIBPGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *HIBPGroupBy) StringX(ctx context.Context) string
- func (s *HIBPGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *HIBPGroupBy) StringsX(ctx context.Context) []string
- type HIBPMutation
- func (m *HIBPMutation) AddField(name string, value ent.Value) error
- func (m *HIBPMutation) AddPwnCount(i int)
- func (m *HIBPMutation) AddedDate() (r time.Time, exists bool)
- func (m *HIBPMutation) AddedEdges() []string
- func (m *HIBPMutation) AddedField(name string) (ent.Value, bool)
- func (m *HIBPMutation) AddedFields() []string
- func (m *HIBPMutation) AddedIDs(name string) []ent.Value
- func (m *HIBPMutation) AddedPwnCount() (r int, exists bool)
- func (m *HIBPMutation) AppendDataclasses(s []string)
- func (m *HIBPMutation) AppendedDataclasses() ([]string, bool)
- func (m *HIBPMutation) BreachDate() (r string, exists bool)
- func (m *HIBPMutation) ClearDescription()
- func (m *HIBPMutation) ClearEdge(name string) error
- func (m *HIBPMutation) ClearField(name string) error
- func (m *HIBPMutation) ClearLogoPath()
- func (m *HIBPMutation) ClearTrackedBreaches()
- func (m *HIBPMutation) ClearedEdges() []string
- func (m *HIBPMutation) ClearedFields() []string
- func (m HIBPMutation) Client() *Client
- func (m *HIBPMutation) Dataclasses() (r []string, exists bool)
- func (m *HIBPMutation) Description() (r string, exists bool)
- func (m *HIBPMutation) DescriptionCleared() bool
- func (m *HIBPMutation) Domain() (r string, exists bool)
- func (m *HIBPMutation) EdgeCleared(name string) bool
- func (m *HIBPMutation) Field(name string) (ent.Value, bool)
- func (m *HIBPMutation) FieldCleared(name string) bool
- func (m *HIBPMutation) Fields() []string
- func (m *HIBPMutation) ID() (id uuid.UUID, exists bool)
- func (m *HIBPMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *HIBPMutation) IsFabricated() (r bool, exists bool)
- func (m *HIBPMutation) IsMalware() (r bool, exists bool)
- func (m *HIBPMutation) IsRetired() (r bool, exists bool)
- func (m *HIBPMutation) IsSensitive() (r bool, exists bool)
- func (m *HIBPMutation) IsSpamList() (r bool, exists bool)
- func (m *HIBPMutation) IsVerified() (r bool, exists bool)
- func (m *HIBPMutation) LogoPath() (r string, exists bool)
- func (m *HIBPMutation) LogoPathCleared() bool
- func (m *HIBPMutation) ModifiedDate() (r time.Time, exists bool)
- func (m *HIBPMutation) Name() (r string, exists bool)
- func (m *HIBPMutation) OldAddedDate(ctx context.Context) (v time.Time, err error)
- func (m *HIBPMutation) OldBreachDate(ctx context.Context) (v string, err error)
- func (m *HIBPMutation) OldDataclasses(ctx context.Context) (v []string, err error)
- func (m *HIBPMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *HIBPMutation) OldDomain(ctx context.Context) (v string, err error)
- func (m *HIBPMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HIBPMutation) OldIsFabricated(ctx context.Context) (v bool, err error)
- func (m *HIBPMutation) OldIsMalware(ctx context.Context) (v bool, err error)
- func (m *HIBPMutation) OldIsRetired(ctx context.Context) (v bool, err error)
- func (m *HIBPMutation) OldIsSensitive(ctx context.Context) (v bool, err error)
- func (m *HIBPMutation) OldIsSpamList(ctx context.Context) (v bool, err error)
- func (m *HIBPMutation) OldIsVerified(ctx context.Context) (v bool, err error)
- func (m *HIBPMutation) OldLogoPath(ctx context.Context) (v *string, err error)
- func (m *HIBPMutation) OldModifiedDate(ctx context.Context) (v time.Time, err error)
- func (m *HIBPMutation) OldName(ctx context.Context) (v string, err error)
- func (m *HIBPMutation) OldPwnCount(ctx context.Context) (v int, err error)
- func (m *HIBPMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *HIBPMutation) Op() Op
- func (m *HIBPMutation) PwnCount() (r int, exists bool)
- func (m *HIBPMutation) RemovedEdges() []string
- func (m *HIBPMutation) RemovedIDs(name string) []ent.Value
- func (m *HIBPMutation) ResetAddedDate()
- func (m *HIBPMutation) ResetBreachDate()
- func (m *HIBPMutation) ResetDataclasses()
- func (m *HIBPMutation) ResetDescription()
- func (m *HIBPMutation) ResetDomain()
- func (m *HIBPMutation) ResetEdge(name string) error
- func (m *HIBPMutation) ResetField(name string) error
- func (m *HIBPMutation) ResetIsFabricated()
- func (m *HIBPMutation) ResetIsMalware()
- func (m *HIBPMutation) ResetIsRetired()
- func (m *HIBPMutation) ResetIsSensitive()
- func (m *HIBPMutation) ResetIsSpamList()
- func (m *HIBPMutation) ResetIsVerified()
- func (m *HIBPMutation) ResetLogoPath()
- func (m *HIBPMutation) ResetModifiedDate()
- func (m *HIBPMutation) ResetName()
- func (m *HIBPMutation) ResetPwnCount()
- func (m *HIBPMutation) ResetTitle()
- func (m *HIBPMutation) ResetTrackedBreaches()
- func (m *HIBPMutation) SetAddedDate(t time.Time)
- func (m *HIBPMutation) SetBreachDate(s string)
- func (m *HIBPMutation) SetDataclasses(s []string)
- func (m *HIBPMutation) SetDescription(s string)
- func (m *HIBPMutation) SetDomain(s string)
- func (m *HIBPMutation) SetField(name string, value ent.Value) error
- func (m *HIBPMutation) SetID(id uuid.UUID)
- func (m *HIBPMutation) SetIsFabricated(b bool)
- func (m *HIBPMutation) SetIsMalware(b bool)
- func (m *HIBPMutation) SetIsRetired(b bool)
- func (m *HIBPMutation) SetIsSensitive(b bool)
- func (m *HIBPMutation) SetIsSpamList(b bool)
- func (m *HIBPMutation) SetIsVerified(b bool)
- func (m *HIBPMutation) SetLogoPath(s string)
- func (m *HIBPMutation) SetModifiedDate(t time.Time)
- func (m *HIBPMutation) SetName(s string)
- func (m *HIBPMutation) SetOp(op Op)
- func (m *HIBPMutation) SetPwnCount(i int)
- func (m *HIBPMutation) SetTitle(s string)
- func (m *HIBPMutation) SetTrackedBreachesID(id uuid.UUID)
- func (m *HIBPMutation) Title() (r string, exists bool)
- func (m *HIBPMutation) TrackedBreachesCleared() bool
- func (m *HIBPMutation) TrackedBreachesID() (id uuid.UUID, exists bool)
- func (m *HIBPMutation) TrackedBreachesIDs() (ids []uuid.UUID)
- func (m HIBPMutation) Tx() (*Tx, error)
- func (m *HIBPMutation) Type() string
- func (m *HIBPMutation) Where(ps ...predicate.HIBP)
- func (m *HIBPMutation) WhereP(ps ...func(*sql.Selector))
- type HIBPQuery
- func (hq *HIBPQuery) Aggregate(fns ...AggregateFunc) *HIBPSelect
- func (hq *HIBPQuery) All(ctx context.Context) ([]*HIBP, error)
- func (hq *HIBPQuery) AllX(ctx context.Context) []*HIBP
- func (hq *HIBPQuery) Clone() *HIBPQuery
- func (hq *HIBPQuery) Count(ctx context.Context) (int, error)
- func (hq *HIBPQuery) CountX(ctx context.Context) int
- func (hq *HIBPQuery) Exist(ctx context.Context) (bool, error)
- func (hq *HIBPQuery) ExistX(ctx context.Context) bool
- func (hq *HIBPQuery) First(ctx context.Context) (*HIBP, error)
- func (hq *HIBPQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (hq *HIBPQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (hq *HIBPQuery) FirstX(ctx context.Context) *HIBP
- func (hq *HIBPQuery) GroupBy(field string, fields ...string) *HIBPGroupBy
- func (hq *HIBPQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (hq *HIBPQuery) IDsX(ctx context.Context) []uuid.UUID
- func (hq *HIBPQuery) Limit(limit int) *HIBPQuery
- func (hq *HIBPQuery) Offset(offset int) *HIBPQuery
- func (hq *HIBPQuery) Only(ctx context.Context) (*HIBP, error)
- func (hq *HIBPQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (hq *HIBPQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (hq *HIBPQuery) OnlyX(ctx context.Context) *HIBP
- func (hq *HIBPQuery) Order(o ...hibp.OrderOption) *HIBPQuery
- func (hq *HIBPQuery) QueryTrackedBreaches() *TrackedBreachesQuery
- func (hq *HIBPQuery) Select(fields ...string) *HIBPSelect
- func (hq *HIBPQuery) Unique(unique bool) *HIBPQuery
- func (hq *HIBPQuery) Where(ps ...predicate.HIBP) *HIBPQuery
- func (hq *HIBPQuery) WithTrackedBreaches(opts ...func(*TrackedBreachesQuery)) *HIBPQuery
- type HIBPSelect
- func (hs *HIBPSelect) Aggregate(fns ...AggregateFunc) *HIBPSelect
- func (s *HIBPSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *HIBPSelect) BoolX(ctx context.Context) bool
- func (s *HIBPSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *HIBPSelect) BoolsX(ctx context.Context) []bool
- func (s *HIBPSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *HIBPSelect) Float64X(ctx context.Context) float64
- func (s *HIBPSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *HIBPSelect) Float64sX(ctx context.Context) []float64
- func (s *HIBPSelect) Int(ctx context.Context) (_ int, err error)
- func (s *HIBPSelect) IntX(ctx context.Context) int
- func (s *HIBPSelect) Ints(ctx context.Context) ([]int, error)
- func (s *HIBPSelect) IntsX(ctx context.Context) []int
- func (hs *HIBPSelect) Scan(ctx context.Context, v any) error
- func (s *HIBPSelect) ScanX(ctx context.Context, v any)
- func (s *HIBPSelect) String(ctx context.Context) (_ string, err error)
- func (s *HIBPSelect) StringX(ctx context.Context) string
- func (s *HIBPSelect) Strings(ctx context.Context) ([]string, error)
- func (s *HIBPSelect) StringsX(ctx context.Context) []string
- type HIBPUpdate
- func (hu *HIBPUpdate) AddPwnCount(i int) *HIBPUpdate
- func (hu *HIBPUpdate) AppendDataclasses(s []string) *HIBPUpdate
- func (hu *HIBPUpdate) ClearDescription() *HIBPUpdate
- func (hu *HIBPUpdate) ClearLogoPath() *HIBPUpdate
- func (hu *HIBPUpdate) ClearTrackedBreaches() *HIBPUpdate
- func (hu *HIBPUpdate) Exec(ctx context.Context) error
- func (hu *HIBPUpdate) ExecX(ctx context.Context)
- func (hu *HIBPUpdate) Mutation() *HIBPMutation
- func (hu *HIBPUpdate) Save(ctx context.Context) (int, error)
- func (hu *HIBPUpdate) SaveX(ctx context.Context) int
- func (hu *HIBPUpdate) SetAddedDate(t time.Time) *HIBPUpdate
- func (hu *HIBPUpdate) SetBreachDate(s string) *HIBPUpdate
- func (hu *HIBPUpdate) SetDataclasses(s []string) *HIBPUpdate
- func (hu *HIBPUpdate) SetDescription(s string) *HIBPUpdate
- func (hu *HIBPUpdate) SetIsFabricated(b bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetIsMalware(b bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetIsRetired(b bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetIsSensitive(b bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetIsSpamList(b bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetIsVerified(b bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetLogoPath(s string) *HIBPUpdate
- func (hu *HIBPUpdate) SetModifiedDate(t time.Time) *HIBPUpdate
- func (hu *HIBPUpdate) SetNillableDescription(s *string) *HIBPUpdate
- func (hu *HIBPUpdate) SetNillableIsFabricated(b *bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetNillableIsMalware(b *bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetNillableIsRetired(b *bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetNillableIsSensitive(b *bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetNillableIsSpamList(b *bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetNillableIsVerified(b *bool) *HIBPUpdate
- func (hu *HIBPUpdate) SetNillableLogoPath(s *string) *HIBPUpdate
- func (hu *HIBPUpdate) SetNillableTrackedBreachesID(id *uuid.UUID) *HIBPUpdate
- func (hu *HIBPUpdate) SetPwnCount(i int) *HIBPUpdate
- func (hu *HIBPUpdate) SetTitle(s string) *HIBPUpdate
- func (hu *HIBPUpdate) SetTrackedBreaches(t *TrackedBreaches) *HIBPUpdate
- func (hu *HIBPUpdate) SetTrackedBreachesID(id uuid.UUID) *HIBPUpdate
- func (hu *HIBPUpdate) Where(ps ...predicate.HIBP) *HIBPUpdate
- type HIBPUpdateOne
- func (huo *HIBPUpdateOne) AddPwnCount(i int) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) AppendDataclasses(s []string) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) ClearDescription() *HIBPUpdateOne
- func (huo *HIBPUpdateOne) ClearLogoPath() *HIBPUpdateOne
- func (huo *HIBPUpdateOne) ClearTrackedBreaches() *HIBPUpdateOne
- func (huo *HIBPUpdateOne) Exec(ctx context.Context) error
- func (huo *HIBPUpdateOne) ExecX(ctx context.Context)
- func (huo *HIBPUpdateOne) Mutation() *HIBPMutation
- func (huo *HIBPUpdateOne) Save(ctx context.Context) (*HIBP, error)
- func (huo *HIBPUpdateOne) SaveX(ctx context.Context) *HIBP
- func (huo *HIBPUpdateOne) Select(field string, fields ...string) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetAddedDate(t time.Time) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetBreachDate(s string) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetDataclasses(s []string) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetDescription(s string) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetIsFabricated(b bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetIsMalware(b bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetIsRetired(b bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetIsSensitive(b bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetIsSpamList(b bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetIsVerified(b bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetLogoPath(s string) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetModifiedDate(t time.Time) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetNillableDescription(s *string) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetNillableIsFabricated(b *bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetNillableIsMalware(b *bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetNillableIsRetired(b *bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetNillableIsSensitive(b *bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetNillableIsSpamList(b *bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetNillableIsVerified(b *bool) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetNillableLogoPath(s *string) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetNillableTrackedBreachesID(id *uuid.UUID) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetPwnCount(i int) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetTitle(s string) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetTrackedBreaches(t *TrackedBreaches) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) SetTrackedBreachesID(id uuid.UUID) *HIBPUpdateOne
- func (huo *HIBPUpdateOne) Where(ps ...predicate.HIBP) *HIBPUpdateOne
- type HIBPs
- type Hook
- type InterceptFunc
- type Interceptor
- type LocalBreach
- type LocalBreachClient
- func (c *LocalBreachClient) Create() *LocalBreachCreate
- func (c *LocalBreachClient) CreateBulk(builders ...*LocalBreachCreate) *LocalBreachCreateBulk
- func (c *LocalBreachClient) Delete() *LocalBreachDelete
- func (c *LocalBreachClient) DeleteOne(lb *LocalBreach) *LocalBreachDeleteOne
- func (c *LocalBreachClient) DeleteOneID(id uuid.UUID) *LocalBreachDeleteOne
- func (c *LocalBreachClient) Get(ctx context.Context, id uuid.UUID) (*LocalBreach, error)
- func (c *LocalBreachClient) GetX(ctx context.Context, id uuid.UUID) *LocalBreach
- func (c *LocalBreachClient) Hooks() []Hook
- func (c *LocalBreachClient) Intercept(interceptors ...Interceptor)
- func (c *LocalBreachClient) Interceptors() []Interceptor
- func (c *LocalBreachClient) Query() *LocalBreachQuery
- func (c *LocalBreachClient) QueryTrackedBreaches(lb *LocalBreach) *TrackedBreachesQuery
- func (c *LocalBreachClient) Update() *LocalBreachUpdate
- func (c *LocalBreachClient) UpdateOne(lb *LocalBreach) *LocalBreachUpdateOne
- func (c *LocalBreachClient) UpdateOneID(id uuid.UUID) *LocalBreachUpdateOne
- func (c *LocalBreachClient) Use(hooks ...Hook)
- type LocalBreachCreate
- func (lbc *LocalBreachCreate) AddTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachCreate
- func (lbc *LocalBreachCreate) AddTrackedBreaches(t ...*TrackedBreaches) *LocalBreachCreate
- func (lbc *LocalBreachCreate) Exec(ctx context.Context) error
- func (lbc *LocalBreachCreate) ExecX(ctx context.Context)
- func (lbc *LocalBreachCreate) Mutation() *LocalBreachMutation
- func (lbc *LocalBreachCreate) Save(ctx context.Context) (*LocalBreach, error)
- func (lbc *LocalBreachCreate) SaveX(ctx context.Context) *LocalBreach
- func (lbc *LocalBreachCreate) SetContainsEmails(b bool) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetContainsHashes(b bool) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetContainsPasswords(b bool) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetContainsUsernames(b bool) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetCreatedAt(t time.Time) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetData(s *schema.Data) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetDate(t time.Time) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetDescription(s string) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetHashPeppered(b bool) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetHashSalted(b bool) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetHashType(s string) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetID(u uuid.UUID) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetIsVerified(b bool) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetName(s string) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetNillableCreatedAt(t *time.Time) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetNillableDate(t *time.Time) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetNillableDescription(s *string) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetNillableHashPeppered(b *bool) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetNillableHashSalted(b *bool) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetNillableHashType(s *string) *LocalBreachCreate
- func (lbc *LocalBreachCreate) SetNillableID(u *uuid.UUID) *LocalBreachCreate
- type LocalBreachCreateBulk
- type LocalBreachDelete
- type LocalBreachDeleteOne
- type LocalBreachEdges
- type LocalBreachGroupBy
- func (lbgb *LocalBreachGroupBy) Aggregate(fns ...AggregateFunc) *LocalBreachGroupBy
- func (s *LocalBreachGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocalBreachGroupBy) BoolX(ctx context.Context) bool
- func (s *LocalBreachGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LocalBreachGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LocalBreachGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocalBreachGroupBy) Float64X(ctx context.Context) float64
- func (s *LocalBreachGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocalBreachGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LocalBreachGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LocalBreachGroupBy) IntX(ctx context.Context) int
- func (s *LocalBreachGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LocalBreachGroupBy) IntsX(ctx context.Context) []int
- func (lbgb *LocalBreachGroupBy) Scan(ctx context.Context, v any) error
- func (s *LocalBreachGroupBy) ScanX(ctx context.Context, v any)
- func (s *LocalBreachGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LocalBreachGroupBy) StringX(ctx context.Context) string
- func (s *LocalBreachGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LocalBreachGroupBy) StringsX(ctx context.Context) []string
- type LocalBreachMutation
- func (m *LocalBreachMutation) AddField(name string, value ent.Value) error
- func (m *LocalBreachMutation) AddTrackedBreachIDs(ids ...uuid.UUID)
- func (m *LocalBreachMutation) AddedEdges() []string
- func (m *LocalBreachMutation) AddedField(name string) (ent.Value, bool)
- func (m *LocalBreachMutation) AddedFields() []string
- func (m *LocalBreachMutation) AddedIDs(name string) []ent.Value
- func (m *LocalBreachMutation) ClearData()
- func (m *LocalBreachMutation) ClearDescription()
- func (m *LocalBreachMutation) ClearEdge(name string) error
- func (m *LocalBreachMutation) ClearField(name string) error
- func (m *LocalBreachMutation) ClearHashPeppered()
- func (m *LocalBreachMutation) ClearHashSalted()
- func (m *LocalBreachMutation) ClearHashType()
- func (m *LocalBreachMutation) ClearTrackedBreaches()
- func (m *LocalBreachMutation) ClearedEdges() []string
- func (m *LocalBreachMutation) ClearedFields() []string
- func (m LocalBreachMutation) Client() *Client
- func (m *LocalBreachMutation) ContainsEmails() (r bool, exists bool)
- func (m *LocalBreachMutation) ContainsHashes() (r bool, exists bool)
- func (m *LocalBreachMutation) ContainsPasswords() (r bool, exists bool)
- func (m *LocalBreachMutation) ContainsUsernames() (r bool, exists bool)
- func (m *LocalBreachMutation) CreatedAt() (r time.Time, exists bool)
- func (m *LocalBreachMutation) Data() (r *schema.Data, exists bool)
- func (m *LocalBreachMutation) DataCleared() bool
- func (m *LocalBreachMutation) Date() (r time.Time, exists bool)
- func (m *LocalBreachMutation) Description() (r string, exists bool)
- func (m *LocalBreachMutation) DescriptionCleared() bool
- func (m *LocalBreachMutation) EdgeCleared(name string) bool
- func (m *LocalBreachMutation) Field(name string) (ent.Value, bool)
- func (m *LocalBreachMutation) FieldCleared(name string) bool
- func (m *LocalBreachMutation) Fields() []string
- func (m *LocalBreachMutation) HashPeppered() (r bool, exists bool)
- func (m *LocalBreachMutation) HashPepperedCleared() bool
- func (m *LocalBreachMutation) HashSalted() (r bool, exists bool)
- func (m *LocalBreachMutation) HashSaltedCleared() bool
- func (m *LocalBreachMutation) HashType() (r string, exists bool)
- func (m *LocalBreachMutation) HashTypeCleared() bool
- func (m *LocalBreachMutation) ID() (id uuid.UUID, exists bool)
- func (m *LocalBreachMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *LocalBreachMutation) IsVerified() (r bool, exists bool)
- func (m *LocalBreachMutation) Name() (r string, exists bool)
- func (m *LocalBreachMutation) OldContainsEmails(ctx context.Context) (v bool, err error)
- func (m *LocalBreachMutation) OldContainsHashes(ctx context.Context) (v bool, err error)
- func (m *LocalBreachMutation) OldContainsPasswords(ctx context.Context) (v bool, err error)
- func (m *LocalBreachMutation) OldContainsUsernames(ctx context.Context) (v bool, err error)
- func (m *LocalBreachMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LocalBreachMutation) OldData(ctx context.Context) (v *schema.Data, err error)
- func (m *LocalBreachMutation) OldDate(ctx context.Context) (v time.Time, err error)
- func (m *LocalBreachMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *LocalBreachMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LocalBreachMutation) OldHashPeppered(ctx context.Context) (v *bool, err error)
- func (m *LocalBreachMutation) OldHashSalted(ctx context.Context) (v *bool, err error)
- func (m *LocalBreachMutation) OldHashType(ctx context.Context) (v *string, err error)
- func (m *LocalBreachMutation) OldIsVerified(ctx context.Context) (v bool, err error)
- func (m *LocalBreachMutation) OldName(ctx context.Context) (v string, err error)
- func (m *LocalBreachMutation) Op() Op
- func (m *LocalBreachMutation) RemoveTrackedBreachIDs(ids ...uuid.UUID)
- func (m *LocalBreachMutation) RemovedEdges() []string
- func (m *LocalBreachMutation) RemovedIDs(name string) []ent.Value
- func (m *LocalBreachMutation) RemovedTrackedBreachesIDs() (ids []uuid.UUID)
- func (m *LocalBreachMutation) ResetContainsEmails()
- func (m *LocalBreachMutation) ResetContainsHashes()
- func (m *LocalBreachMutation) ResetContainsPasswords()
- func (m *LocalBreachMutation) ResetContainsUsernames()
- func (m *LocalBreachMutation) ResetCreatedAt()
- func (m *LocalBreachMutation) ResetData()
- func (m *LocalBreachMutation) ResetDate()
- func (m *LocalBreachMutation) ResetDescription()
- func (m *LocalBreachMutation) ResetEdge(name string) error
- func (m *LocalBreachMutation) ResetField(name string) error
- func (m *LocalBreachMutation) ResetHashPeppered()
- func (m *LocalBreachMutation) ResetHashSalted()
- func (m *LocalBreachMutation) ResetHashType()
- func (m *LocalBreachMutation) ResetIsVerified()
- func (m *LocalBreachMutation) ResetName()
- func (m *LocalBreachMutation) ResetTrackedBreaches()
- func (m *LocalBreachMutation) SetContainsEmails(b bool)
- func (m *LocalBreachMutation) SetContainsHashes(b bool)
- func (m *LocalBreachMutation) SetContainsPasswords(b bool)
- func (m *LocalBreachMutation) SetContainsUsernames(b bool)
- func (m *LocalBreachMutation) SetCreatedAt(t time.Time)
- func (m *LocalBreachMutation) SetData(s *schema.Data)
- func (m *LocalBreachMutation) SetDate(t time.Time)
- func (m *LocalBreachMutation) SetDescription(s string)
- func (m *LocalBreachMutation) SetField(name string, value ent.Value) error
- func (m *LocalBreachMutation) SetHashPeppered(b bool)
- func (m *LocalBreachMutation) SetHashSalted(b bool)
- func (m *LocalBreachMutation) SetHashType(s string)
- func (m *LocalBreachMutation) SetID(id uuid.UUID)
- func (m *LocalBreachMutation) SetIsVerified(b bool)
- func (m *LocalBreachMutation) SetName(s string)
- func (m *LocalBreachMutation) SetOp(op Op)
- func (m *LocalBreachMutation) TrackedBreachesCleared() bool
- func (m *LocalBreachMutation) TrackedBreachesIDs() (ids []uuid.UUID)
- func (m LocalBreachMutation) Tx() (*Tx, error)
- func (m *LocalBreachMutation) Type() string
- func (m *LocalBreachMutation) Where(ps ...predicate.LocalBreach)
- func (m *LocalBreachMutation) WhereP(ps ...func(*sql.Selector))
- type LocalBreachQuery
- func (lbq *LocalBreachQuery) Aggregate(fns ...AggregateFunc) *LocalBreachSelect
- func (lbq *LocalBreachQuery) All(ctx context.Context) ([]*LocalBreach, error)
- func (lbq *LocalBreachQuery) AllX(ctx context.Context) []*LocalBreach
- func (lbq *LocalBreachQuery) Clone() *LocalBreachQuery
- func (lbq *LocalBreachQuery) Count(ctx context.Context) (int, error)
- func (lbq *LocalBreachQuery) CountX(ctx context.Context) int
- func (lbq *LocalBreachQuery) Exist(ctx context.Context) (bool, error)
- func (lbq *LocalBreachQuery) ExistX(ctx context.Context) bool
- func (lbq *LocalBreachQuery) First(ctx context.Context) (*LocalBreach, error)
- func (lbq *LocalBreachQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (lbq *LocalBreachQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (lbq *LocalBreachQuery) FirstX(ctx context.Context) *LocalBreach
- func (lbq *LocalBreachQuery) GroupBy(field string, fields ...string) *LocalBreachGroupBy
- func (lbq *LocalBreachQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (lbq *LocalBreachQuery) IDsX(ctx context.Context) []uuid.UUID
- func (lbq *LocalBreachQuery) Limit(limit int) *LocalBreachQuery
- func (lbq *LocalBreachQuery) Offset(offset int) *LocalBreachQuery
- func (lbq *LocalBreachQuery) Only(ctx context.Context) (*LocalBreach, error)
- func (lbq *LocalBreachQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (lbq *LocalBreachQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (lbq *LocalBreachQuery) OnlyX(ctx context.Context) *LocalBreach
- func (lbq *LocalBreachQuery) Order(o ...localbreach.OrderOption) *LocalBreachQuery
- func (lbq *LocalBreachQuery) QueryTrackedBreaches() *TrackedBreachesQuery
- func (lbq *LocalBreachQuery) Select(fields ...string) *LocalBreachSelect
- func (lbq *LocalBreachQuery) Unique(unique bool) *LocalBreachQuery
- func (lbq *LocalBreachQuery) Where(ps ...predicate.LocalBreach) *LocalBreachQuery
- func (lbq *LocalBreachQuery) WithTrackedBreaches(opts ...func(*TrackedBreachesQuery)) *LocalBreachQuery
- type LocalBreachSelect
- func (lbs *LocalBreachSelect) Aggregate(fns ...AggregateFunc) *LocalBreachSelect
- func (s *LocalBreachSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocalBreachSelect) BoolX(ctx context.Context) bool
- func (s *LocalBreachSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LocalBreachSelect) BoolsX(ctx context.Context) []bool
- func (s *LocalBreachSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocalBreachSelect) Float64X(ctx context.Context) float64
- func (s *LocalBreachSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocalBreachSelect) Float64sX(ctx context.Context) []float64
- func (s *LocalBreachSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LocalBreachSelect) IntX(ctx context.Context) int
- func (s *LocalBreachSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LocalBreachSelect) IntsX(ctx context.Context) []int
- func (lbs *LocalBreachSelect) Scan(ctx context.Context, v any) error
- func (s *LocalBreachSelect) ScanX(ctx context.Context, v any)
- func (s *LocalBreachSelect) String(ctx context.Context) (_ string, err error)
- func (s *LocalBreachSelect) StringX(ctx context.Context) string
- func (s *LocalBreachSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LocalBreachSelect) StringsX(ctx context.Context) []string
- type LocalBreachUpdate
- func (lbu *LocalBreachUpdate) AddTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) AddTrackedBreaches(t ...*TrackedBreaches) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) ClearData() *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) ClearDescription() *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) ClearHashPeppered() *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) ClearHashSalted() *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) ClearHashType() *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) ClearTrackedBreaches() *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) Exec(ctx context.Context) error
- func (lbu *LocalBreachUpdate) ExecX(ctx context.Context)
- func (lbu *LocalBreachUpdate) Mutation() *LocalBreachMutation
- func (lbu *LocalBreachUpdate) RemoveTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) RemoveTrackedBreaches(t ...*TrackedBreaches) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) Save(ctx context.Context) (int, error)
- func (lbu *LocalBreachUpdate) SaveX(ctx context.Context) int
- func (lbu *LocalBreachUpdate) SetContainsEmails(b bool) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetContainsHashes(b bool) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetContainsPasswords(b bool) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetContainsUsernames(b bool) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetData(s *schema.Data) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetDate(t time.Time) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetDescription(s string) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetHashPeppered(b bool) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetHashSalted(b bool) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetHashType(s string) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetIsVerified(b bool) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetName(s string) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetNillableDate(t *time.Time) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetNillableDescription(s *string) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetNillableHashPeppered(b *bool) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetNillableHashSalted(b *bool) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) SetNillableHashType(s *string) *LocalBreachUpdate
- func (lbu *LocalBreachUpdate) Where(ps ...predicate.LocalBreach) *LocalBreachUpdate
- type LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) AddTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) AddTrackedBreaches(t ...*TrackedBreaches) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) ClearData() *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) ClearDescription() *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) ClearHashPeppered() *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) ClearHashSalted() *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) ClearHashType() *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) ClearTrackedBreaches() *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) Exec(ctx context.Context) error
- func (lbuo *LocalBreachUpdateOne) ExecX(ctx context.Context)
- func (lbuo *LocalBreachUpdateOne) Mutation() *LocalBreachMutation
- func (lbuo *LocalBreachUpdateOne) RemoveTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) RemoveTrackedBreaches(t ...*TrackedBreaches) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) Save(ctx context.Context) (*LocalBreach, error)
- func (lbuo *LocalBreachUpdateOne) SaveX(ctx context.Context) *LocalBreach
- func (lbuo *LocalBreachUpdateOne) Select(field string, fields ...string) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetContainsEmails(b bool) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetContainsHashes(b bool) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetContainsPasswords(b bool) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetContainsUsernames(b bool) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetData(s *schema.Data) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetDate(t time.Time) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetDescription(s string) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetHashPeppered(b bool) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetHashSalted(b bool) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetHashType(s string) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetIsVerified(b bool) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetName(s string) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetNillableDate(t *time.Time) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetNillableDescription(s *string) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetNillableHashPeppered(b *bool) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetNillableHashSalted(b *bool) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) SetNillableHashType(s *string) *LocalBreachUpdateOne
- func (lbuo *LocalBreachUpdateOne) Where(ps ...predicate.LocalBreach) *LocalBreachUpdateOne
- type LocalBreaches
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type SearchQueries
- type SearchQuery
- type SearchQueryClient
- func (c *SearchQueryClient) Create() *SearchQueryCreate
- func (c *SearchQueryClient) CreateBulk(builders ...*SearchQueryCreate) *SearchQueryCreateBulk
- func (c *SearchQueryClient) Delete() *SearchQueryDelete
- func (c *SearchQueryClient) DeleteOne(sq *SearchQuery) *SearchQueryDeleteOne
- func (c *SearchQueryClient) DeleteOneID(id uuid.UUID) *SearchQueryDeleteOne
- func (c *SearchQueryClient) Get(ctx context.Context, id uuid.UUID) (*SearchQuery, error)
- func (c *SearchQueryClient) GetX(ctx context.Context, id uuid.UUID) *SearchQuery
- func (c *SearchQueryClient) Hooks() []Hook
- func (c *SearchQueryClient) Intercept(interceptors ...Interceptor)
- func (c *SearchQueryClient) Interceptors() []Interceptor
- func (c *SearchQueryClient) Query() *SearchQueryQuery
- func (c *SearchQueryClient) QueryUser(sq *SearchQuery) *UserQuery
- func (c *SearchQueryClient) Update() *SearchQueryUpdate
- func (c *SearchQueryClient) UpdateOne(sq *SearchQuery) *SearchQueryUpdateOne
- func (c *SearchQueryClient) UpdateOneID(id uuid.UUID) *SearchQueryUpdateOne
- func (c *SearchQueryClient) Use(hooks ...Hook)
- type SearchQueryCreate
- func (sqc *SearchQueryCreate) Exec(ctx context.Context) error
- func (sqc *SearchQueryCreate) ExecX(ctx context.Context)
- func (sqc *SearchQueryCreate) Mutation() *SearchQueryMutation
- func (sqc *SearchQueryCreate) Save(ctx context.Context) (*SearchQuery, error)
- func (sqc *SearchQueryCreate) SaveX(ctx context.Context) *SearchQuery
- func (sqc *SearchQueryCreate) SetCreated(t time.Time) *SearchQueryCreate
- func (sqc *SearchQueryCreate) SetID(u uuid.UUID) *SearchQueryCreate
- func (sqc *SearchQueryCreate) SetNillableCreated(t *time.Time) *SearchQueryCreate
- func (sqc *SearchQueryCreate) SetNillableID(u *uuid.UUID) *SearchQueryCreate
- func (sqc *SearchQueryCreate) SetOwner(u uuid.UUID) *SearchQueryCreate
- func (sqc *SearchQueryCreate) SetQuery(s string) *SearchQueryCreate
- func (sqc *SearchQueryCreate) SetUser(u *User) *SearchQueryCreate
- func (sqc *SearchQueryCreate) SetUserID(id uuid.UUID) *SearchQueryCreate
- type SearchQueryCreateBulk
- type SearchQueryDelete
- type SearchQueryDeleteOne
- type SearchQueryEdges
- type SearchQueryGroupBy
- func (sqgb *SearchQueryGroupBy) Aggregate(fns ...AggregateFunc) *SearchQueryGroupBy
- func (s *SearchQueryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SearchQueryGroupBy) BoolX(ctx context.Context) bool
- func (s *SearchQueryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SearchQueryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SearchQueryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SearchQueryGroupBy) Float64X(ctx context.Context) float64
- func (s *SearchQueryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SearchQueryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SearchQueryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SearchQueryGroupBy) IntX(ctx context.Context) int
- func (s *SearchQueryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SearchQueryGroupBy) IntsX(ctx context.Context) []int
- func (sqgb *SearchQueryGroupBy) Scan(ctx context.Context, v any) error
- func (s *SearchQueryGroupBy) ScanX(ctx context.Context, v any)
- func (s *SearchQueryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SearchQueryGroupBy) StringX(ctx context.Context) string
- func (s *SearchQueryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SearchQueryGroupBy) StringsX(ctx context.Context) []string
- type SearchQueryMutation
- func (m *SearchQueryMutation) AddField(name string, value ent.Value) error
- func (m *SearchQueryMutation) AddedEdges() []string
- func (m *SearchQueryMutation) AddedField(name string) (ent.Value, bool)
- func (m *SearchQueryMutation) AddedFields() []string
- func (m *SearchQueryMutation) AddedIDs(name string) []ent.Value
- func (m *SearchQueryMutation) ClearEdge(name string) error
- func (m *SearchQueryMutation) ClearField(name string) error
- func (m *SearchQueryMutation) ClearUser()
- func (m *SearchQueryMutation) ClearedEdges() []string
- func (m *SearchQueryMutation) ClearedFields() []string
- func (m SearchQueryMutation) Client() *Client
- func (m *SearchQueryMutation) Created() (r time.Time, exists bool)
- func (m *SearchQueryMutation) EdgeCleared(name string) bool
- func (m *SearchQueryMutation) Field(name string) (ent.Value, bool)
- func (m *SearchQueryMutation) FieldCleared(name string) bool
- func (m *SearchQueryMutation) Fields() []string
- func (m *SearchQueryMutation) ID() (id uuid.UUID, exists bool)
- func (m *SearchQueryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SearchQueryMutation) OldCreated(ctx context.Context) (v time.Time, err error)
- func (m *SearchQueryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SearchQueryMutation) OldOwner(ctx context.Context) (v uuid.UUID, err error)
- func (m *SearchQueryMutation) OldQuery(ctx context.Context) (v string, err error)
- func (m *SearchQueryMutation) Op() Op
- func (m *SearchQueryMutation) Owner() (r uuid.UUID, exists bool)
- func (m *SearchQueryMutation) Query() (r string, exists bool)
- func (m *SearchQueryMutation) RemovedEdges() []string
- func (m *SearchQueryMutation) RemovedIDs(name string) []ent.Value
- func (m *SearchQueryMutation) ResetCreated()
- func (m *SearchQueryMutation) ResetEdge(name string) error
- func (m *SearchQueryMutation) ResetField(name string) error
- func (m *SearchQueryMutation) ResetOwner()
- func (m *SearchQueryMutation) ResetQuery()
- func (m *SearchQueryMutation) ResetUser()
- func (m *SearchQueryMutation) SetCreated(t time.Time)
- func (m *SearchQueryMutation) SetField(name string, value ent.Value) error
- func (m *SearchQueryMutation) SetID(id uuid.UUID)
- func (m *SearchQueryMutation) SetOp(op Op)
- func (m *SearchQueryMutation) SetOwner(u uuid.UUID)
- func (m *SearchQueryMutation) SetQuery(s string)
- func (m *SearchQueryMutation) SetUserID(id uuid.UUID)
- func (m SearchQueryMutation) Tx() (*Tx, error)
- func (m *SearchQueryMutation) Type() string
- func (m *SearchQueryMutation) UserCleared() bool
- func (m *SearchQueryMutation) UserID() (id uuid.UUID, exists bool)
- func (m *SearchQueryMutation) UserIDs() (ids []uuid.UUID)
- func (m *SearchQueryMutation) Where(ps ...predicate.SearchQuery)
- func (m *SearchQueryMutation) WhereP(ps ...func(*sql.Selector))
- type SearchQueryQuery
- func (sqq *SearchQueryQuery) Aggregate(fns ...AggregateFunc) *SearchQuerySelect
- func (sqq *SearchQueryQuery) All(ctx context.Context) ([]*SearchQuery, error)
- func (sqq *SearchQueryQuery) AllX(ctx context.Context) []*SearchQuery
- func (sqq *SearchQueryQuery) Clone() *SearchQueryQuery
- func (sqq *SearchQueryQuery) Count(ctx context.Context) (int, error)
- func (sqq *SearchQueryQuery) CountX(ctx context.Context) int
- func (sqq *SearchQueryQuery) Exist(ctx context.Context) (bool, error)
- func (sqq *SearchQueryQuery) ExistX(ctx context.Context) bool
- func (sqq *SearchQueryQuery) First(ctx context.Context) (*SearchQuery, error)
- func (sqq *SearchQueryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sqq *SearchQueryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sqq *SearchQueryQuery) FirstX(ctx context.Context) *SearchQuery
- func (sqq *SearchQueryQuery) GroupBy(field string, fields ...string) *SearchQueryGroupBy
- func (sqq *SearchQueryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sqq *SearchQueryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sqq *SearchQueryQuery) Limit(limit int) *SearchQueryQuery
- func (sqq *SearchQueryQuery) Offset(offset int) *SearchQueryQuery
- func (sqq *SearchQueryQuery) Only(ctx context.Context) (*SearchQuery, error)
- func (sqq *SearchQueryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sqq *SearchQueryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sqq *SearchQueryQuery) OnlyX(ctx context.Context) *SearchQuery
- func (sqq *SearchQueryQuery) Order(o ...searchquery.OrderOption) *SearchQueryQuery
- func (sqq *SearchQueryQuery) QueryUser() *UserQuery
- func (sqq *SearchQueryQuery) Select(fields ...string) *SearchQuerySelect
- func (sqq *SearchQueryQuery) Unique(unique bool) *SearchQueryQuery
- func (sqq *SearchQueryQuery) Where(ps ...predicate.SearchQuery) *SearchQueryQuery
- func (sqq *SearchQueryQuery) WithUser(opts ...func(*UserQuery)) *SearchQueryQuery
- type SearchQuerySelect
- func (sqs *SearchQuerySelect) Aggregate(fns ...AggregateFunc) *SearchQuerySelect
- func (s *SearchQuerySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SearchQuerySelect) BoolX(ctx context.Context) bool
- func (s *SearchQuerySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SearchQuerySelect) BoolsX(ctx context.Context) []bool
- func (s *SearchQuerySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SearchQuerySelect) Float64X(ctx context.Context) float64
- func (s *SearchQuerySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SearchQuerySelect) Float64sX(ctx context.Context) []float64
- func (s *SearchQuerySelect) Int(ctx context.Context) (_ int, err error)
- func (s *SearchQuerySelect) IntX(ctx context.Context) int
- func (s *SearchQuerySelect) Ints(ctx context.Context) ([]int, error)
- func (s *SearchQuerySelect) IntsX(ctx context.Context) []int
- func (sqs *SearchQuerySelect) Scan(ctx context.Context, v any) error
- func (s *SearchQuerySelect) ScanX(ctx context.Context, v any)
- func (s *SearchQuerySelect) String(ctx context.Context) (_ string, err error)
- func (s *SearchQuerySelect) StringX(ctx context.Context) string
- func (s *SearchQuerySelect) Strings(ctx context.Context) ([]string, error)
- func (s *SearchQuerySelect) StringsX(ctx context.Context) []string
- type SearchQueryUpdate
- func (squ *SearchQueryUpdate) Exec(ctx context.Context) error
- func (squ *SearchQueryUpdate) ExecX(ctx context.Context)
- func (squ *SearchQueryUpdate) Mutation() *SearchQueryMutation
- func (squ *SearchQueryUpdate) Save(ctx context.Context) (int, error)
- func (squ *SearchQueryUpdate) SaveX(ctx context.Context) int
- func (squ *SearchQueryUpdate) Where(ps ...predicate.SearchQuery) *SearchQueryUpdate
- type SearchQueryUpdateOne
- func (squo *SearchQueryUpdateOne) Exec(ctx context.Context) error
- func (squo *SearchQueryUpdateOne) ExecX(ctx context.Context)
- func (squo *SearchQueryUpdateOne) Mutation() *SearchQueryMutation
- func (squo *SearchQueryUpdateOne) Save(ctx context.Context) (*SearchQuery, error)
- func (squo *SearchQueryUpdateOne) SaveX(ctx context.Context) *SearchQuery
- func (squo *SearchQueryUpdateOne) Select(field string, fields ...string) *SearchQueryUpdateOne
- func (squo *SearchQueryUpdateOne) Where(ps ...predicate.SearchQuery) *SearchQueryUpdateOne
- type Settings
- type SettingsClient
- func (c *SettingsClient) Create() *SettingsCreate
- func (c *SettingsClient) CreateBulk(builders ...*SettingsCreate) *SettingsCreateBulk
- func (c *SettingsClient) Delete() *SettingsDelete
- func (c *SettingsClient) DeleteOne(s *Settings) *SettingsDeleteOne
- func (c *SettingsClient) DeleteOneID(id uuid.UUID) *SettingsDeleteOne
- func (c *SettingsClient) Get(ctx context.Context, id uuid.UUID) (*Settings, error)
- func (c *SettingsClient) GetX(ctx context.Context, id uuid.UUID) *Settings
- func (c *SettingsClient) Hooks() []Hook
- func (c *SettingsClient) Intercept(interceptors ...Interceptor)
- func (c *SettingsClient) Interceptors() []Interceptor
- func (c *SettingsClient) Query() *SettingsQuery
- func (c *SettingsClient) Update() *SettingsUpdate
- func (c *SettingsClient) UpdateOne(s *Settings) *SettingsUpdateOne
- func (c *SettingsClient) UpdateOneID(id uuid.UUID) *SettingsUpdateOne
- func (c *SettingsClient) Use(hooks ...Hook)
- type SettingsCreate
- func (sc *SettingsCreate) Exec(ctx context.Context) error
- func (sc *SettingsCreate) ExecX(ctx context.Context)
- func (sc *SettingsCreate) Mutation() *SettingsMutation
- func (sc *SettingsCreate) Save(ctx context.Context) (*Settings, error)
- func (sc *SettingsCreate) SaveX(ctx context.Context) *Settings
- func (sc *SettingsCreate) SetDehashedAPIKey(s string) *SettingsCreate
- func (sc *SettingsCreate) SetHibpAPIKey(s string) *SettingsCreate
- func (sc *SettingsCreate) SetID(u uuid.UUID) *SettingsCreate
- func (sc *SettingsCreate) SetNillableDehashedAPIKey(s *string) *SettingsCreate
- func (sc *SettingsCreate) SetNillableHibpAPIKey(s *string) *SettingsCreate
- func (sc *SettingsCreate) SetNillableID(u *uuid.UUID) *SettingsCreate
- func (sc *SettingsCreate) SetNillableSearches(u *uint64) *SettingsCreate
- func (sc *SettingsCreate) SetSearches(u uint64) *SettingsCreate
- type SettingsCreateBulk
- type SettingsDelete
- type SettingsDeleteOne
- type SettingsGroupBy
- func (sgb *SettingsGroupBy) Aggregate(fns ...AggregateFunc) *SettingsGroupBy
- func (s *SettingsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SettingsGroupBy) BoolX(ctx context.Context) bool
- func (s *SettingsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SettingsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SettingsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SettingsGroupBy) Float64X(ctx context.Context) float64
- func (s *SettingsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SettingsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SettingsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SettingsGroupBy) IntX(ctx context.Context) int
- func (s *SettingsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SettingsGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SettingsGroupBy) Scan(ctx context.Context, v any) error
- func (s *SettingsGroupBy) ScanX(ctx context.Context, v any)
- func (s *SettingsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SettingsGroupBy) StringX(ctx context.Context) string
- func (s *SettingsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SettingsGroupBy) StringsX(ctx context.Context) []string
- type SettingsMutation
- func (m *SettingsMutation) AddField(name string, value ent.Value) error
- func (m *SettingsMutation) AddSearches(u int64)
- func (m *SettingsMutation) AddedEdges() []string
- func (m *SettingsMutation) AddedField(name string) (ent.Value, bool)
- func (m *SettingsMutation) AddedFields() []string
- func (m *SettingsMutation) AddedIDs(name string) []ent.Value
- func (m *SettingsMutation) AddedSearches() (r int64, exists bool)
- func (m *SettingsMutation) ClearDehashedAPIKey()
- func (m *SettingsMutation) ClearEdge(name string) error
- func (m *SettingsMutation) ClearField(name string) error
- func (m *SettingsMutation) ClearHibpAPIKey()
- func (m *SettingsMutation) ClearedEdges() []string
- func (m *SettingsMutation) ClearedFields() []string
- func (m SettingsMutation) Client() *Client
- func (m *SettingsMutation) DehashedAPIKey() (r string, exists bool)
- func (m *SettingsMutation) DehashedAPIKeyCleared() bool
- func (m *SettingsMutation) EdgeCleared(name string) bool
- func (m *SettingsMutation) Field(name string) (ent.Value, bool)
- func (m *SettingsMutation) FieldCleared(name string) bool
- func (m *SettingsMutation) Fields() []string
- func (m *SettingsMutation) HibpAPIKey() (r string, exists bool)
- func (m *SettingsMutation) HibpAPIKeyCleared() bool
- func (m *SettingsMutation) ID() (id uuid.UUID, exists bool)
- func (m *SettingsMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SettingsMutation) OldDehashedAPIKey(ctx context.Context) (v string, err error)
- func (m *SettingsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SettingsMutation) OldHibpAPIKey(ctx context.Context) (v string, err error)
- func (m *SettingsMutation) OldSearches(ctx context.Context) (v uint64, err error)
- func (m *SettingsMutation) Op() Op
- func (m *SettingsMutation) RemovedEdges() []string
- func (m *SettingsMutation) RemovedIDs(name string) []ent.Value
- func (m *SettingsMutation) ResetDehashedAPIKey()
- func (m *SettingsMutation) ResetEdge(name string) error
- func (m *SettingsMutation) ResetField(name string) error
- func (m *SettingsMutation) ResetHibpAPIKey()
- func (m *SettingsMutation) ResetSearches()
- func (m *SettingsMutation) Searches() (r uint64, exists bool)
- func (m *SettingsMutation) SetDehashedAPIKey(s string)
- func (m *SettingsMutation) SetField(name string, value ent.Value) error
- func (m *SettingsMutation) SetHibpAPIKey(s string)
- func (m *SettingsMutation) SetID(id uuid.UUID)
- func (m *SettingsMutation) SetOp(op Op)
- func (m *SettingsMutation) SetSearches(u uint64)
- func (m SettingsMutation) Tx() (*Tx, error)
- func (m *SettingsMutation) Type() string
- func (m *SettingsMutation) Where(ps ...predicate.Settings)
- func (m *SettingsMutation) WhereP(ps ...func(*sql.Selector))
- type SettingsQuery
- func (sq *SettingsQuery) Aggregate(fns ...AggregateFunc) *SettingsSelect
- func (sq *SettingsQuery) All(ctx context.Context) ([]*Settings, error)
- func (sq *SettingsQuery) AllX(ctx context.Context) []*Settings
- func (sq *SettingsQuery) Clone() *SettingsQuery
- func (sq *SettingsQuery) Count(ctx context.Context) (int, error)
- func (sq *SettingsQuery) CountX(ctx context.Context) int
- func (sq *SettingsQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SettingsQuery) ExistX(ctx context.Context) bool
- func (sq *SettingsQuery) First(ctx context.Context) (*Settings, error)
- func (sq *SettingsQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SettingsQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *SettingsQuery) FirstX(ctx context.Context) *Settings
- func (sq *SettingsQuery) GroupBy(field string, fields ...string) *SettingsGroupBy
- func (sq *SettingsQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sq *SettingsQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *SettingsQuery) Limit(limit int) *SettingsQuery
- func (sq *SettingsQuery) Offset(offset int) *SettingsQuery
- func (sq *SettingsQuery) Only(ctx context.Context) (*Settings, error)
- func (sq *SettingsQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SettingsQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *SettingsQuery) OnlyX(ctx context.Context) *Settings
- func (sq *SettingsQuery) Order(o ...settings.OrderOption) *SettingsQuery
- func (sq *SettingsQuery) Select(fields ...string) *SettingsSelect
- func (sq *SettingsQuery) Unique(unique bool) *SettingsQuery
- func (sq *SettingsQuery) Where(ps ...predicate.Settings) *SettingsQuery
- type SettingsSelect
- func (ss *SettingsSelect) Aggregate(fns ...AggregateFunc) *SettingsSelect
- func (s *SettingsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SettingsSelect) BoolX(ctx context.Context) bool
- func (s *SettingsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SettingsSelect) BoolsX(ctx context.Context) []bool
- func (s *SettingsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SettingsSelect) Float64X(ctx context.Context) float64
- func (s *SettingsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SettingsSelect) Float64sX(ctx context.Context) []float64
- func (s *SettingsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SettingsSelect) IntX(ctx context.Context) int
- func (s *SettingsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SettingsSelect) IntsX(ctx context.Context) []int
- func (ss *SettingsSelect) Scan(ctx context.Context, v any) error
- func (s *SettingsSelect) ScanX(ctx context.Context, v any)
- func (s *SettingsSelect) String(ctx context.Context) (_ string, err error)
- func (s *SettingsSelect) StringX(ctx context.Context) string
- func (s *SettingsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SettingsSelect) StringsX(ctx context.Context) []string
- type SettingsSlice
- type SettingsUpdate
- func (su *SettingsUpdate) AddSearches(u int64) *SettingsUpdate
- func (su *SettingsUpdate) ClearDehashedAPIKey() *SettingsUpdate
- func (su *SettingsUpdate) ClearHibpAPIKey() *SettingsUpdate
- func (su *SettingsUpdate) Exec(ctx context.Context) error
- func (su *SettingsUpdate) ExecX(ctx context.Context)
- func (su *SettingsUpdate) Mutation() *SettingsMutation
- func (su *SettingsUpdate) Save(ctx context.Context) (int, error)
- func (su *SettingsUpdate) SaveX(ctx context.Context) int
- func (su *SettingsUpdate) SetDehashedAPIKey(s string) *SettingsUpdate
- func (su *SettingsUpdate) SetHibpAPIKey(s string) *SettingsUpdate
- func (su *SettingsUpdate) SetNillableDehashedAPIKey(s *string) *SettingsUpdate
- func (su *SettingsUpdate) SetNillableHibpAPIKey(s *string) *SettingsUpdate
- func (su *SettingsUpdate) SetNillableSearches(u *uint64) *SettingsUpdate
- func (su *SettingsUpdate) SetSearches(u uint64) *SettingsUpdate
- func (su *SettingsUpdate) Where(ps ...predicate.Settings) *SettingsUpdate
- type SettingsUpdateOne
- func (suo *SettingsUpdateOne) AddSearches(u int64) *SettingsUpdateOne
- func (suo *SettingsUpdateOne) ClearDehashedAPIKey() *SettingsUpdateOne
- func (suo *SettingsUpdateOne) ClearHibpAPIKey() *SettingsUpdateOne
- func (suo *SettingsUpdateOne) Exec(ctx context.Context) error
- func (suo *SettingsUpdateOne) ExecX(ctx context.Context)
- func (suo *SettingsUpdateOne) Mutation() *SettingsMutation
- func (suo *SettingsUpdateOne) Save(ctx context.Context) (*Settings, error)
- func (suo *SettingsUpdateOne) SaveX(ctx context.Context) *Settings
- func (suo *SettingsUpdateOne) Select(field string, fields ...string) *SettingsUpdateOne
- func (suo *SettingsUpdateOne) SetDehashedAPIKey(s string) *SettingsUpdateOne
- func (suo *SettingsUpdateOne) SetHibpAPIKey(s string) *SettingsUpdateOne
- func (suo *SettingsUpdateOne) SetNillableDehashedAPIKey(s *string) *SettingsUpdateOne
- func (suo *SettingsUpdateOne) SetNillableHibpAPIKey(s *string) *SettingsUpdateOne
- func (suo *SettingsUpdateOne) SetNillableSearches(u *uint64) *SettingsUpdateOne
- func (suo *SettingsUpdateOne) SetSearches(u uint64) *SettingsUpdateOne
- func (suo *SettingsUpdateOne) Where(ps ...predicate.Settings) *SettingsUpdateOne
- type Setup
- type SetupClient
- func (c *SetupClient) Create() *SetupCreate
- func (c *SetupClient) CreateBulk(builders ...*SetupCreate) *SetupCreateBulk
- func (c *SetupClient) Delete() *SetupDelete
- func (c *SetupClient) DeleteOne(s *Setup) *SetupDeleteOne
- func (c *SetupClient) DeleteOneID(id uuid.UUID) *SetupDeleteOne
- func (c *SetupClient) Get(ctx context.Context, id uuid.UUID) (*Setup, error)
- func (c *SetupClient) GetX(ctx context.Context, id uuid.UUID) *Setup
- func (c *SetupClient) Hooks() []Hook
- func (c *SetupClient) Intercept(interceptors ...Interceptor)
- func (c *SetupClient) Interceptors() []Interceptor
- func (c *SetupClient) Query() *SetupQuery
- func (c *SetupClient) Update() *SetupUpdate
- func (c *SetupClient) UpdateOne(s *Setup) *SetupUpdateOne
- func (c *SetupClient) UpdateOneID(id uuid.UUID) *SetupUpdateOne
- func (c *SetupClient) Use(hooks ...Hook)
- type SetupCreate
- func (sc *SetupCreate) Exec(ctx context.Context) error
- func (sc *SetupCreate) ExecX(ctx context.Context)
- func (sc *SetupCreate) Mutation() *SetupMutation
- func (sc *SetupCreate) Save(ctx context.Context) (*Setup, error)
- func (sc *SetupCreate) SaveX(ctx context.Context) *Setup
- func (sc *SetupCreate) SetID(u uuid.UUID) *SetupCreate
- func (sc *SetupCreate) SetNillableID(u *uuid.UUID) *SetupCreate
- func (sc *SetupCreate) SetNillableSetUpAt(t *time.Time) *SetupCreate
- func (sc *SetupCreate) SetSetUpAt(t time.Time) *SetupCreate
- type SetupCreateBulk
- type SetupDelete
- type SetupDeleteOne
- type SetupGroupBy
- func (sgb *SetupGroupBy) Aggregate(fns ...AggregateFunc) *SetupGroupBy
- func (s *SetupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SetupGroupBy) BoolX(ctx context.Context) bool
- func (s *SetupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SetupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SetupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SetupGroupBy) Float64X(ctx context.Context) float64
- func (s *SetupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SetupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SetupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SetupGroupBy) IntX(ctx context.Context) int
- func (s *SetupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SetupGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SetupGroupBy) Scan(ctx context.Context, v any) error
- func (s *SetupGroupBy) ScanX(ctx context.Context, v any)
- func (s *SetupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SetupGroupBy) StringX(ctx context.Context) string
- func (s *SetupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SetupGroupBy) StringsX(ctx context.Context) []string
- type SetupMutation
- func (m *SetupMutation) AddField(name string, value ent.Value) error
- func (m *SetupMutation) AddedEdges() []string
- func (m *SetupMutation) AddedField(name string) (ent.Value, bool)
- func (m *SetupMutation) AddedFields() []string
- func (m *SetupMutation) AddedIDs(name string) []ent.Value
- func (m *SetupMutation) ClearEdge(name string) error
- func (m *SetupMutation) ClearField(name string) error
- func (m *SetupMutation) ClearedEdges() []string
- func (m *SetupMutation) ClearedFields() []string
- func (m SetupMutation) Client() *Client
- func (m *SetupMutation) EdgeCleared(name string) bool
- func (m *SetupMutation) Field(name string) (ent.Value, bool)
- func (m *SetupMutation) FieldCleared(name string) bool
- func (m *SetupMutation) Fields() []string
- func (m *SetupMutation) ID() (id uuid.UUID, exists bool)
- func (m *SetupMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SetupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SetupMutation) OldSetUpAt(ctx context.Context) (v time.Time, err error)
- func (m *SetupMutation) Op() Op
- func (m *SetupMutation) RemovedEdges() []string
- func (m *SetupMutation) RemovedIDs(name string) []ent.Value
- func (m *SetupMutation) ResetEdge(name string) error
- func (m *SetupMutation) ResetField(name string) error
- func (m *SetupMutation) ResetSetUpAt()
- func (m *SetupMutation) SetField(name string, value ent.Value) error
- func (m *SetupMutation) SetID(id uuid.UUID)
- func (m *SetupMutation) SetOp(op Op)
- func (m *SetupMutation) SetSetUpAt(t time.Time)
- func (m *SetupMutation) SetUpAt() (r time.Time, exists bool)
- func (m SetupMutation) Tx() (*Tx, error)
- func (m *SetupMutation) Type() string
- func (m *SetupMutation) Where(ps ...predicate.Setup)
- func (m *SetupMutation) WhereP(ps ...func(*sql.Selector))
- type SetupQuery
- func (sq *SetupQuery) Aggregate(fns ...AggregateFunc) *SetupSelect
- func (sq *SetupQuery) All(ctx context.Context) ([]*Setup, error)
- func (sq *SetupQuery) AllX(ctx context.Context) []*Setup
- func (sq *SetupQuery) Clone() *SetupQuery
- func (sq *SetupQuery) Count(ctx context.Context) (int, error)
- func (sq *SetupQuery) CountX(ctx context.Context) int
- func (sq *SetupQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SetupQuery) ExistX(ctx context.Context) bool
- func (sq *SetupQuery) First(ctx context.Context) (*Setup, error)
- func (sq *SetupQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SetupQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *SetupQuery) FirstX(ctx context.Context) *Setup
- func (sq *SetupQuery) GroupBy(field string, fields ...string) *SetupGroupBy
- func (sq *SetupQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sq *SetupQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *SetupQuery) Limit(limit int) *SetupQuery
- func (sq *SetupQuery) Offset(offset int) *SetupQuery
- func (sq *SetupQuery) Only(ctx context.Context) (*Setup, error)
- func (sq *SetupQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SetupQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *SetupQuery) OnlyX(ctx context.Context) *Setup
- func (sq *SetupQuery) Order(o ...setup.OrderOption) *SetupQuery
- func (sq *SetupQuery) Select(fields ...string) *SetupSelect
- func (sq *SetupQuery) Unique(unique bool) *SetupQuery
- func (sq *SetupQuery) Where(ps ...predicate.Setup) *SetupQuery
- type SetupSelect
- func (ss *SetupSelect) Aggregate(fns ...AggregateFunc) *SetupSelect
- func (s *SetupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SetupSelect) BoolX(ctx context.Context) bool
- func (s *SetupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SetupSelect) BoolsX(ctx context.Context) []bool
- func (s *SetupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SetupSelect) Float64X(ctx context.Context) float64
- func (s *SetupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SetupSelect) Float64sX(ctx context.Context) []float64
- func (s *SetupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SetupSelect) IntX(ctx context.Context) int
- func (s *SetupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SetupSelect) IntsX(ctx context.Context) []int
- func (ss *SetupSelect) Scan(ctx context.Context, v any) error
- func (s *SetupSelect) ScanX(ctx context.Context, v any)
- func (s *SetupSelect) String(ctx context.Context) (_ string, err error)
- func (s *SetupSelect) StringX(ctx context.Context) string
- func (s *SetupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SetupSelect) StringsX(ctx context.Context) []string
- type SetupUpdate
- func (su *SetupUpdate) Exec(ctx context.Context) error
- func (su *SetupUpdate) ExecX(ctx context.Context)
- func (su *SetupUpdate) Mutation() *SetupMutation
- func (su *SetupUpdate) Save(ctx context.Context) (int, error)
- func (su *SetupUpdate) SaveX(ctx context.Context) int
- func (su *SetupUpdate) Where(ps ...predicate.Setup) *SetupUpdate
- type SetupUpdateOne
- func (suo *SetupUpdateOne) Exec(ctx context.Context) error
- func (suo *SetupUpdateOne) ExecX(ctx context.Context)
- func (suo *SetupUpdateOne) Mutation() *SetupMutation
- func (suo *SetupUpdateOne) Save(ctx context.Context) (*Setup, error)
- func (suo *SetupUpdateOne) SaveX(ctx context.Context) *Setup
- func (suo *SetupUpdateOne) Select(field string, fields ...string) *SetupUpdateOne
- func (suo *SetupUpdateOne) Where(ps ...predicate.Setup) *SetupUpdateOne
- type Setups
- type TrackedBreaches
- func (tb *TrackedBreaches) QueryHibp() *HIBPQuery
- func (tb *TrackedBreaches) QueryLocalbreach() *LocalBreachQuery
- func (tb *TrackedBreaches) QueryUser() *UserQuery
- func (tb *TrackedBreaches) String() string
- func (tb *TrackedBreaches) Unwrap() *TrackedBreaches
- func (tb *TrackedBreaches) Update() *TrackedBreachesUpdateOne
- func (tb *TrackedBreaches) Value(name string) (ent.Value, error)
- type TrackedBreachesClient
- func (c *TrackedBreachesClient) Create() *TrackedBreachesCreate
- func (c *TrackedBreachesClient) CreateBulk(builders ...*TrackedBreachesCreate) *TrackedBreachesCreateBulk
- func (c *TrackedBreachesClient) Delete() *TrackedBreachesDelete
- func (c *TrackedBreachesClient) DeleteOne(tb *TrackedBreaches) *TrackedBreachesDeleteOne
- func (c *TrackedBreachesClient) DeleteOneID(id uuid.UUID) *TrackedBreachesDeleteOne
- func (c *TrackedBreachesClient) Get(ctx context.Context, id uuid.UUID) (*TrackedBreaches, error)
- func (c *TrackedBreachesClient) GetX(ctx context.Context, id uuid.UUID) *TrackedBreaches
- func (c *TrackedBreachesClient) Hooks() []Hook
- func (c *TrackedBreachesClient) Intercept(interceptors ...Interceptor)
- func (c *TrackedBreachesClient) Interceptors() []Interceptor
- func (c *TrackedBreachesClient) Query() *TrackedBreachesQuery
- func (c *TrackedBreachesClient) QueryHibp(tb *TrackedBreaches) *HIBPQuery
- func (c *TrackedBreachesClient) QueryLocalbreach(tb *TrackedBreaches) *LocalBreachQuery
- func (c *TrackedBreachesClient) QueryUser(tb *TrackedBreaches) *UserQuery
- func (c *TrackedBreachesClient) Update() *TrackedBreachesUpdate
- func (c *TrackedBreachesClient) UpdateOne(tb *TrackedBreaches) *TrackedBreachesUpdateOne
- func (c *TrackedBreachesClient) UpdateOneID(id uuid.UUID) *TrackedBreachesUpdateOne
- func (c *TrackedBreachesClient) Use(hooks ...Hook)
- type TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) AddHibp(h ...*HIBP) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) AddHibpIDs(ids ...uuid.UUID) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) AddLocalbreach(l ...*LocalBreach) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) AddLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) Exec(ctx context.Context) error
- func (tbc *TrackedBreachesCreate) ExecX(ctx context.Context)
- func (tbc *TrackedBreachesCreate) Mutation() *TrackedBreachesMutation
- func (tbc *TrackedBreachesCreate) Save(ctx context.Context) (*TrackedBreaches, error)
- func (tbc *TrackedBreachesCreate) SaveX(ctx context.Context) *TrackedBreaches
- func (tbc *TrackedBreachesCreate) SetBreach(u uuid.UUID) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) SetID(u uuid.UUID) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) SetNillableID(u *uuid.UUID) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) SetNillableOnline(b *bool) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) SetOnline(b bool) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) SetOwner(u uuid.UUID) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) SetUser(u *User) *TrackedBreachesCreate
- func (tbc *TrackedBreachesCreate) SetUserID(id uuid.UUID) *TrackedBreachesCreate
- type TrackedBreachesCreateBulk
- func (tbcb *TrackedBreachesCreateBulk) Exec(ctx context.Context) error
- func (tbcb *TrackedBreachesCreateBulk) ExecX(ctx context.Context)
- func (tbcb *TrackedBreachesCreateBulk) Save(ctx context.Context) ([]*TrackedBreaches, error)
- func (tbcb *TrackedBreachesCreateBulk) SaveX(ctx context.Context) []*TrackedBreaches
- type TrackedBreachesDelete
- type TrackedBreachesDeleteOne
- type TrackedBreachesEdges
- type TrackedBreachesGroupBy
- func (tbgb *TrackedBreachesGroupBy) Aggregate(fns ...AggregateFunc) *TrackedBreachesGroupBy
- func (s *TrackedBreachesGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TrackedBreachesGroupBy) BoolX(ctx context.Context) bool
- func (s *TrackedBreachesGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TrackedBreachesGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TrackedBreachesGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TrackedBreachesGroupBy) Float64X(ctx context.Context) float64
- func (s *TrackedBreachesGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TrackedBreachesGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TrackedBreachesGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TrackedBreachesGroupBy) IntX(ctx context.Context) int
- func (s *TrackedBreachesGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TrackedBreachesGroupBy) IntsX(ctx context.Context) []int
- func (tbgb *TrackedBreachesGroupBy) Scan(ctx context.Context, v any) error
- func (s *TrackedBreachesGroupBy) ScanX(ctx context.Context, v any)
- func (s *TrackedBreachesGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TrackedBreachesGroupBy) StringX(ctx context.Context) string
- func (s *TrackedBreachesGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TrackedBreachesGroupBy) StringsX(ctx context.Context) []string
- type TrackedBreachesMutation
- func (m *TrackedBreachesMutation) AddField(name string, value ent.Value) error
- func (m *TrackedBreachesMutation) AddHibpIDs(ids ...uuid.UUID)
- func (m *TrackedBreachesMutation) AddLocalbreachIDs(ids ...uuid.UUID)
- func (m *TrackedBreachesMutation) AddedEdges() []string
- func (m *TrackedBreachesMutation) AddedField(name string) (ent.Value, bool)
- func (m *TrackedBreachesMutation) AddedFields() []string
- func (m *TrackedBreachesMutation) AddedIDs(name string) []ent.Value
- func (m *TrackedBreachesMutation) Breach() (r uuid.UUID, exists bool)
- func (m *TrackedBreachesMutation) ClearEdge(name string) error
- func (m *TrackedBreachesMutation) ClearField(name string) error
- func (m *TrackedBreachesMutation) ClearHibp()
- func (m *TrackedBreachesMutation) ClearLocalbreach()
- func (m *TrackedBreachesMutation) ClearUser()
- func (m *TrackedBreachesMutation) ClearedEdges() []string
- func (m *TrackedBreachesMutation) ClearedFields() []string
- func (m TrackedBreachesMutation) Client() *Client
- func (m *TrackedBreachesMutation) EdgeCleared(name string) bool
- func (m *TrackedBreachesMutation) Field(name string) (ent.Value, bool)
- func (m *TrackedBreachesMutation) FieldCleared(name string) bool
- func (m *TrackedBreachesMutation) Fields() []string
- func (m *TrackedBreachesMutation) HibpCleared() bool
- func (m *TrackedBreachesMutation) HibpIDs() (ids []uuid.UUID)
- func (m *TrackedBreachesMutation) ID() (id uuid.UUID, exists bool)
- func (m *TrackedBreachesMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TrackedBreachesMutation) LocalbreachCleared() bool
- func (m *TrackedBreachesMutation) LocalbreachIDs() (ids []uuid.UUID)
- func (m *TrackedBreachesMutation) OldBreach(ctx context.Context) (v uuid.UUID, err error)
- func (m *TrackedBreachesMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TrackedBreachesMutation) OldOnline(ctx context.Context) (v bool, err error)
- func (m *TrackedBreachesMutation) OldOwner(ctx context.Context) (v uuid.UUID, err error)
- func (m *TrackedBreachesMutation) Online() (r bool, exists bool)
- func (m *TrackedBreachesMutation) Op() Op
- func (m *TrackedBreachesMutation) Owner() (r uuid.UUID, exists bool)
- func (m *TrackedBreachesMutation) RemoveHibpIDs(ids ...uuid.UUID)
- func (m *TrackedBreachesMutation) RemoveLocalbreachIDs(ids ...uuid.UUID)
- func (m *TrackedBreachesMutation) RemovedEdges() []string
- func (m *TrackedBreachesMutation) RemovedHibpIDs() (ids []uuid.UUID)
- func (m *TrackedBreachesMutation) RemovedIDs(name string) []ent.Value
- func (m *TrackedBreachesMutation) RemovedLocalbreachIDs() (ids []uuid.UUID)
- func (m *TrackedBreachesMutation) ResetBreach()
- func (m *TrackedBreachesMutation) ResetEdge(name string) error
- func (m *TrackedBreachesMutation) ResetField(name string) error
- func (m *TrackedBreachesMutation) ResetHibp()
- func (m *TrackedBreachesMutation) ResetLocalbreach()
- func (m *TrackedBreachesMutation) ResetOnline()
- func (m *TrackedBreachesMutation) ResetOwner()
- func (m *TrackedBreachesMutation) ResetUser()
- func (m *TrackedBreachesMutation) SetBreach(u uuid.UUID)
- func (m *TrackedBreachesMutation) SetField(name string, value ent.Value) error
- func (m *TrackedBreachesMutation) SetID(id uuid.UUID)
- func (m *TrackedBreachesMutation) SetOnline(b bool)
- func (m *TrackedBreachesMutation) SetOp(op Op)
- func (m *TrackedBreachesMutation) SetOwner(u uuid.UUID)
- func (m *TrackedBreachesMutation) SetUserID(id uuid.UUID)
- func (m TrackedBreachesMutation) Tx() (*Tx, error)
- func (m *TrackedBreachesMutation) Type() string
- func (m *TrackedBreachesMutation) UserCleared() bool
- func (m *TrackedBreachesMutation) UserID() (id uuid.UUID, exists bool)
- func (m *TrackedBreachesMutation) UserIDs() (ids []uuid.UUID)
- func (m *TrackedBreachesMutation) Where(ps ...predicate.TrackedBreaches)
- func (m *TrackedBreachesMutation) WhereP(ps ...func(*sql.Selector))
- type TrackedBreachesQuery
- func (tbq *TrackedBreachesQuery) Aggregate(fns ...AggregateFunc) *TrackedBreachesSelect
- func (tbq *TrackedBreachesQuery) All(ctx context.Context) ([]*TrackedBreaches, error)
- func (tbq *TrackedBreachesQuery) AllX(ctx context.Context) []*TrackedBreaches
- func (tbq *TrackedBreachesQuery) Clone() *TrackedBreachesQuery
- func (tbq *TrackedBreachesQuery) Count(ctx context.Context) (int, error)
- func (tbq *TrackedBreachesQuery) CountX(ctx context.Context) int
- func (tbq *TrackedBreachesQuery) Exist(ctx context.Context) (bool, error)
- func (tbq *TrackedBreachesQuery) ExistX(ctx context.Context) bool
- func (tbq *TrackedBreachesQuery) First(ctx context.Context) (*TrackedBreaches, error)
- func (tbq *TrackedBreachesQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (tbq *TrackedBreachesQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (tbq *TrackedBreachesQuery) FirstX(ctx context.Context) *TrackedBreaches
- func (tbq *TrackedBreachesQuery) GroupBy(field string, fields ...string) *TrackedBreachesGroupBy
- func (tbq *TrackedBreachesQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (tbq *TrackedBreachesQuery) IDsX(ctx context.Context) []uuid.UUID
- func (tbq *TrackedBreachesQuery) Limit(limit int) *TrackedBreachesQuery
- func (tbq *TrackedBreachesQuery) Offset(offset int) *TrackedBreachesQuery
- func (tbq *TrackedBreachesQuery) Only(ctx context.Context) (*TrackedBreaches, error)
- func (tbq *TrackedBreachesQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (tbq *TrackedBreachesQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (tbq *TrackedBreachesQuery) OnlyX(ctx context.Context) *TrackedBreaches
- func (tbq *TrackedBreachesQuery) Order(o ...trackedbreaches.OrderOption) *TrackedBreachesQuery
- func (tbq *TrackedBreachesQuery) QueryHibp() *HIBPQuery
- func (tbq *TrackedBreachesQuery) QueryLocalbreach() *LocalBreachQuery
- func (tbq *TrackedBreachesQuery) QueryUser() *UserQuery
- func (tbq *TrackedBreachesQuery) Select(fields ...string) *TrackedBreachesSelect
- func (tbq *TrackedBreachesQuery) Unique(unique bool) *TrackedBreachesQuery
- func (tbq *TrackedBreachesQuery) Where(ps ...predicate.TrackedBreaches) *TrackedBreachesQuery
- func (tbq *TrackedBreachesQuery) WithHibp(opts ...func(*HIBPQuery)) *TrackedBreachesQuery
- func (tbq *TrackedBreachesQuery) WithLocalbreach(opts ...func(*LocalBreachQuery)) *TrackedBreachesQuery
- func (tbq *TrackedBreachesQuery) WithUser(opts ...func(*UserQuery)) *TrackedBreachesQuery
- type TrackedBreachesSelect
- func (tbs *TrackedBreachesSelect) Aggregate(fns ...AggregateFunc) *TrackedBreachesSelect
- func (s *TrackedBreachesSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TrackedBreachesSelect) BoolX(ctx context.Context) bool
- func (s *TrackedBreachesSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TrackedBreachesSelect) BoolsX(ctx context.Context) []bool
- func (s *TrackedBreachesSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TrackedBreachesSelect) Float64X(ctx context.Context) float64
- func (s *TrackedBreachesSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TrackedBreachesSelect) Float64sX(ctx context.Context) []float64
- func (s *TrackedBreachesSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TrackedBreachesSelect) IntX(ctx context.Context) int
- func (s *TrackedBreachesSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TrackedBreachesSelect) IntsX(ctx context.Context) []int
- func (tbs *TrackedBreachesSelect) Scan(ctx context.Context, v any) error
- func (s *TrackedBreachesSelect) ScanX(ctx context.Context, v any)
- func (s *TrackedBreachesSelect) String(ctx context.Context) (_ string, err error)
- func (s *TrackedBreachesSelect) StringX(ctx context.Context) string
- func (s *TrackedBreachesSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TrackedBreachesSelect) StringsX(ctx context.Context) []string
- type TrackedBreachesSlice
- type TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) AddHibp(h ...*HIBP) *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) AddHibpIDs(ids ...uuid.UUID) *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) AddLocalbreach(l ...*LocalBreach) *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) AddLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) ClearHibp() *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) ClearLocalbreach() *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) Exec(ctx context.Context) error
- func (tbu *TrackedBreachesUpdate) ExecX(ctx context.Context)
- func (tbu *TrackedBreachesUpdate) Mutation() *TrackedBreachesMutation
- func (tbu *TrackedBreachesUpdate) RemoveHibp(h ...*HIBP) *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) RemoveHibpIDs(ids ...uuid.UUID) *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) RemoveLocalbreach(l ...*LocalBreach) *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) RemoveLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) Save(ctx context.Context) (int, error)
- func (tbu *TrackedBreachesUpdate) SaveX(ctx context.Context) int
- func (tbu *TrackedBreachesUpdate) SetBreach(u uuid.UUID) *TrackedBreachesUpdate
- func (tbu *TrackedBreachesUpdate) Where(ps ...predicate.TrackedBreaches) *TrackedBreachesUpdate
- type TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) AddHibp(h ...*HIBP) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) AddHibpIDs(ids ...uuid.UUID) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) AddLocalbreach(l ...*LocalBreach) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) AddLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) ClearHibp() *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) ClearLocalbreach() *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) Exec(ctx context.Context) error
- func (tbuo *TrackedBreachesUpdateOne) ExecX(ctx context.Context)
- func (tbuo *TrackedBreachesUpdateOne) Mutation() *TrackedBreachesMutation
- func (tbuo *TrackedBreachesUpdateOne) RemoveHibp(h ...*HIBP) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) RemoveHibpIDs(ids ...uuid.UUID) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) RemoveLocalbreach(l ...*LocalBreach) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) RemoveLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) Save(ctx context.Context) (*TrackedBreaches, error)
- func (tbuo *TrackedBreachesUpdateOne) SaveX(ctx context.Context) *TrackedBreaches
- func (tbuo *TrackedBreachesUpdateOne) Select(field string, fields ...string) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) SetBreach(u uuid.UUID) *TrackedBreachesUpdateOne
- func (tbuo *TrackedBreachesUpdateOne) Where(ps ...predicate.TrackedBreaches) *TrackedBreachesUpdateOne
- type TraverseFunc
- type Traverser
- type Tx
- type User
- func (u *User) QueryAgekey() *AgeKeyQuery
- func (u *User) QuerySearchQueries() *SearchQueryQuery
- func (u *User) QueryTrackedBreaches() *TrackedBreachesQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryAgekey(u *User) *AgeKeyQuery
- func (c *UserClient) QuerySearchQueries(u *User) *SearchQueryQuery
- func (c *UserClient) QueryTrackedBreaches(u *User) *TrackedBreachesQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddSearchQueries(s ...*SearchQuery) *UserCreate
- func (uc *UserCreate) AddSearchQueryIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddTrackedBreachIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddTrackedBreaches(t ...*TrackedBreaches) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAgekey(a *AgeKey) *UserCreate
- func (uc *UserCreate) SetAgekeyID(id uuid.UUID) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetIsActive(b bool) *UserCreate
- func (uc *UserCreate) SetIsAdmin(b bool) *UserCreate
- func (uc *UserCreate) SetLastLogin(t time.Time) *UserCreate
- func (uc *UserCreate) SetNillableAgekeyID(id *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableIsActive(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableIsAdmin(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableLastLogin(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(b []byte) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddSearchQueryIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddTrackedBreachIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AgekeyCleared() bool
- func (m *UserMutation) AgekeyID() (id uuid.UUID, exists bool)
- func (m *UserMutation) AgekeyIDs() (ids []uuid.UUID)
- func (m *UserMutation) ClearAgekey()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearSearchQueries()
- func (m *UserMutation) ClearTrackedBreaches()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) IsActive() (r bool, exists bool)
- func (m *UserMutation) IsAdmin() (r bool, exists bool)
- func (m *UserMutation) LastLogin() (r time.Time, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIsActive(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldIsAdmin(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldLastLogin(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v []byte, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r []byte, exists bool)
- func (m *UserMutation) RemoveSearchQueryIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveTrackedBreachIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedSearchQueriesIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedTrackedBreachesIDs() (ids []uuid.UUID)
- func (m *UserMutation) ResetAgekey()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIsActive()
- func (m *UserMutation) ResetIsAdmin()
- func (m *UserMutation) ResetLastLogin()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetSearchQueries()
- func (m *UserMutation) ResetTrackedBreaches()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SearchQueriesCleared() bool
- func (m *UserMutation) SearchQueriesIDs() (ids []uuid.UUID)
- func (m *UserMutation) SetAgekeyID(id uuid.UUID)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetIsActive(b bool)
- func (m *UserMutation) SetIsAdmin(b bool)
- func (m *UserMutation) SetLastLogin(t time.Time)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(b []byte)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) TrackedBreachesCleared() bool
- func (m *UserMutation) TrackedBreachesIDs() (ids []uuid.UUID)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryAgekey() *AgeKeyQuery
- func (uq *UserQuery) QuerySearchQueries() *SearchQueryQuery
- func (uq *UserQuery) QueryTrackedBreaches() *TrackedBreachesQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithAgekey(opts ...func(*AgeKeyQuery)) *UserQuery
- func (uq *UserQuery) WithSearchQueries(opts ...func(*SearchQueryQuery)) *UserQuery
- func (uq *UserQuery) WithTrackedBreaches(opts ...func(*TrackedBreachesQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddSearchQueries(s ...*SearchQuery) *UserUpdate
- func (uu *UserUpdate) AddSearchQueryIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddTrackedBreachIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddTrackedBreaches(t ...*TrackedBreaches) *UserUpdate
- func (uu *UserUpdate) ClearSearchQueries() *UserUpdate
- func (uu *UserUpdate) ClearTrackedBreaches() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveSearchQueries(s ...*SearchQuery) *UserUpdate
- func (uu *UserUpdate) RemoveSearchQueryIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveTrackedBreachIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveTrackedBreaches(t ...*TrackedBreaches) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetIsActive(b bool) *UserUpdate
- func (uu *UserUpdate) SetIsAdmin(b bool) *UserUpdate
- func (uu *UserUpdate) SetLastLogin(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableIsActive(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableIsAdmin(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableLastLogin(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetPassword(b []byte) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddSearchQueries(s ...*SearchQuery) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSearchQueryIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTrackedBreachIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTrackedBreaches(t ...*TrackedBreaches) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSearchQueries() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTrackedBreaches() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveSearchQueries(s ...*SearchQuery) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSearchQueryIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveTrackedBreachIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveTrackedBreaches(t ...*TrackedBreaches) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsActive(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsAdmin(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastLogin(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsActive(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsAdmin(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastLogin(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(b []byte) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAgeKey = "AgeKey" TypeHIBP = "HIBP" TypeLocalBreach = "LocalBreach" TypeSearchQuery = "SearchQuery" TypeSettings = "Settings" TypeSetup = "Setup" TypeTrackedBreaches = "TrackedBreaches" TypeUser = "User" )
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 validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AgeKey ¶
type AgeKey struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // age ed25519 identity stored encrypted using AES256 Key *[]byte `json:"key,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // Updated holds the value of the "updated" field. Updated time.Time `json:"updated,omitempty"` // id of the key owner Owner uuid.UUID `json:"owner,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AgeKeyQuery when eager-loading is set. Edges AgeKeyEdges `json:"edges"` // contains filtered or unexported fields }
AgeKey is the model entity for the AgeKey schema.
func (*AgeKey) Unwrap ¶
Unwrap unwraps the AgeKey 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 (*AgeKey) Update ¶
func (ak *AgeKey) Update() *AgeKeyUpdateOne
Update returns a builder for updating this AgeKey. Note that you need to call AgeKey.Unwrap() before calling this method if this AgeKey was returned from a transaction, and the transaction was committed or rolled back.
type AgeKeyClient ¶
type AgeKeyClient struct {
// contains filtered or unexported fields
}
AgeKeyClient is a client for the AgeKey schema.
func NewAgeKeyClient ¶
func NewAgeKeyClient(c config) *AgeKeyClient
NewAgeKeyClient returns a client for the AgeKey from the given config.
func (*AgeKeyClient) Create ¶
func (c *AgeKeyClient) Create() *AgeKeyCreate
Create returns a builder for creating a AgeKey entity.
func (*AgeKeyClient) CreateBulk ¶
func (c *AgeKeyClient) CreateBulk(builders ...*AgeKeyCreate) *AgeKeyCreateBulk
CreateBulk returns a builder for creating a bulk of AgeKey entities.
func (*AgeKeyClient) Delete ¶
func (c *AgeKeyClient) Delete() *AgeKeyDelete
Delete returns a delete builder for AgeKey.
func (*AgeKeyClient) DeleteOne ¶
func (c *AgeKeyClient) DeleteOne(ak *AgeKey) *AgeKeyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AgeKeyClient) DeleteOneID ¶
func (c *AgeKeyClient) DeleteOneID(id uuid.UUID) *AgeKeyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AgeKeyClient) Intercept ¶
func (c *AgeKeyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `agekey.Intercept(f(g(h())))`.
func (*AgeKeyClient) Interceptors ¶
func (c *AgeKeyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AgeKeyClient) Query ¶
func (c *AgeKeyClient) Query() *AgeKeyQuery
Query returns a query builder for AgeKey.
func (*AgeKeyClient) QueryUser ¶
func (c *AgeKeyClient) QueryUser(ak *AgeKey) *UserQuery
QueryUser queries the user edge of a AgeKey.
func (*AgeKeyClient) Update ¶
func (c *AgeKeyClient) Update() *AgeKeyUpdate
Update returns an update builder for AgeKey.
func (*AgeKeyClient) UpdateOne ¶
func (c *AgeKeyClient) UpdateOne(ak *AgeKey) *AgeKeyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AgeKeyClient) UpdateOneID ¶
func (c *AgeKeyClient) UpdateOneID(id uuid.UUID) *AgeKeyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AgeKeyClient) Use ¶
func (c *AgeKeyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `agekey.Hooks(f(g(h())))`.
type AgeKeyCreate ¶
type AgeKeyCreate struct {
// contains filtered or unexported fields
}
AgeKeyCreate is the builder for creating a AgeKey entity.
func (*AgeKeyCreate) Exec ¶
func (akc *AgeKeyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgeKeyCreate) ExecX ¶
func (akc *AgeKeyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgeKeyCreate) Mutation ¶
func (akc *AgeKeyCreate) Mutation() *AgeKeyMutation
Mutation returns the AgeKeyMutation object of the builder.
func (*AgeKeyCreate) Save ¶
func (akc *AgeKeyCreate) Save(ctx context.Context) (*AgeKey, error)
Save creates the AgeKey in the database.
func (*AgeKeyCreate) SaveX ¶
func (akc *AgeKeyCreate) SaveX(ctx context.Context) *AgeKey
SaveX calls Save and panics if Save returns an error.
func (*AgeKeyCreate) SetCreated ¶
func (akc *AgeKeyCreate) SetCreated(t time.Time) *AgeKeyCreate
SetCreated sets the "created" field.
func (*AgeKeyCreate) SetID ¶
func (akc *AgeKeyCreate) SetID(u uuid.UUID) *AgeKeyCreate
SetID sets the "id" field.
func (*AgeKeyCreate) SetKey ¶
func (akc *AgeKeyCreate) SetKey(b []byte) *AgeKeyCreate
SetKey sets the "key" field.
func (*AgeKeyCreate) SetNillableCreated ¶
func (akc *AgeKeyCreate) SetNillableCreated(t *time.Time) *AgeKeyCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*AgeKeyCreate) SetNillableID ¶
func (akc *AgeKeyCreate) SetNillableID(u *uuid.UUID) *AgeKeyCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AgeKeyCreate) SetNillableUpdated ¶
func (akc *AgeKeyCreate) SetNillableUpdated(t *time.Time) *AgeKeyCreate
SetNillableUpdated sets the "updated" field if the given value is not nil.
func (*AgeKeyCreate) SetOwner ¶
func (akc *AgeKeyCreate) SetOwner(u uuid.UUID) *AgeKeyCreate
SetOwner sets the "owner" field.
func (*AgeKeyCreate) SetUpdated ¶
func (akc *AgeKeyCreate) SetUpdated(t time.Time) *AgeKeyCreate
SetUpdated sets the "updated" field.
func (*AgeKeyCreate) SetUser ¶
func (akc *AgeKeyCreate) SetUser(u *User) *AgeKeyCreate
SetUser sets the "user" edge to the User entity.
func (*AgeKeyCreate) SetUserID ¶
func (akc *AgeKeyCreate) SetUserID(id uuid.UUID) *AgeKeyCreate
SetUserID sets the "user" edge to the User entity by ID.
type AgeKeyCreateBulk ¶
type AgeKeyCreateBulk struct {
// contains filtered or unexported fields
}
AgeKeyCreateBulk is the builder for creating many AgeKey entities in bulk.
func (*AgeKeyCreateBulk) Exec ¶
func (akcb *AgeKeyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AgeKeyCreateBulk) ExecX ¶
func (akcb *AgeKeyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AgeKeyDelete ¶
type AgeKeyDelete struct {
// contains filtered or unexported fields
}
AgeKeyDelete is the builder for deleting a AgeKey entity.
func (*AgeKeyDelete) Exec ¶
func (akd *AgeKeyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AgeKeyDelete) ExecX ¶
func (akd *AgeKeyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AgeKeyDelete) Where ¶
func (akd *AgeKeyDelete) Where(ps ...predicate.AgeKey) *AgeKeyDelete
Where appends a list predicates to the AgeKeyDelete builder.
type AgeKeyDeleteOne ¶
type AgeKeyDeleteOne struct {
// contains filtered or unexported fields
}
AgeKeyDeleteOne is the builder for deleting a single AgeKey entity.
func (*AgeKeyDeleteOne) Exec ¶
func (akdo *AgeKeyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AgeKeyDeleteOne) ExecX ¶
func (akdo *AgeKeyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgeKeyDeleteOne) Where ¶
func (akdo *AgeKeyDeleteOne) Where(ps ...predicate.AgeKey) *AgeKeyDeleteOne
Where appends a list predicates to the AgeKeyDelete builder.
type AgeKeyEdges ¶
type AgeKeyEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
AgeKeyEdges holds the relations/edges for other nodes in the graph.
func (AgeKeyEdges) UserOrErr ¶
func (e AgeKeyEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AgeKeyGroupBy ¶
type AgeKeyGroupBy struct {
// contains filtered or unexported fields
}
AgeKeyGroupBy is the group-by builder for AgeKey entities.
func (*AgeKeyGroupBy) Aggregate ¶
func (akgb *AgeKeyGroupBy) Aggregate(fns ...AggregateFunc) *AgeKeyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AgeKeyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AgeKeyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AgeKeyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AgeKeyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AgeKeyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AgeKeyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AgeKeyGroupBy) Scan ¶
func (akgb *AgeKeyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AgeKeyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AgeKeyMutation ¶
type AgeKeyMutation struct {
// contains filtered or unexported fields
}
AgeKeyMutation represents an operation that mutates the AgeKey nodes in the graph.
func (*AgeKeyMutation) AddField ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) AddedEdges ¶
func (m *AgeKeyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AgeKeyMutation) AddedField ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) AddedFields ¶
func (m *AgeKeyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AgeKeyMutation) AddedIDs ¶
func (m *AgeKeyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AgeKeyMutation) ClearEdge ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) ClearField ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) ClearUser ¶
func (m *AgeKeyMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*AgeKeyMutation) ClearedEdges ¶
func (m *AgeKeyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AgeKeyMutation) ClearedFields ¶
func (m *AgeKeyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AgeKeyMutation) Client ¶
func (m AgeKeyMutation) 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 (*AgeKeyMutation) Created ¶
func (m *AgeKeyMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*AgeKeyMutation) EdgeCleared ¶
func (m *AgeKeyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AgeKeyMutation) Field ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) FieldCleared ¶
func (m *AgeKeyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AgeKeyMutation) Fields ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) ID ¶
func (m *AgeKeyMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AgeKeyMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AgeKeyMutation) Key ¶
func (m *AgeKeyMutation) Key() (r []byte, exists bool)
Key returns the value of the "key" field in the mutation.
func (*AgeKeyMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the AgeKey entity. If the AgeKey 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 (*AgeKeyMutation) 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 (*AgeKeyMutation) OldKey ¶
func (m *AgeKeyMutation) OldKey(ctx context.Context) (v *[]byte, err error)
OldKey returns the old "key" field's value of the AgeKey entity. If the AgeKey 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 (*AgeKeyMutation) OldOwner ¶
OldOwner returns the old "owner" field's value of the AgeKey entity. If the AgeKey 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 (*AgeKeyMutation) OldUpdated ¶
OldUpdated returns the old "updated" field's value of the AgeKey entity. If the AgeKey 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 (*AgeKeyMutation) Owner ¶
func (m *AgeKeyMutation) Owner() (r uuid.UUID, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*AgeKeyMutation) RemovedEdges ¶
func (m *AgeKeyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AgeKeyMutation) RemovedIDs ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) ResetCreated ¶
func (m *AgeKeyMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*AgeKeyMutation) ResetEdge ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) ResetField ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) ResetKey ¶
func (m *AgeKeyMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*AgeKeyMutation) ResetOwner ¶
func (m *AgeKeyMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*AgeKeyMutation) ResetUpdated ¶
func (m *AgeKeyMutation) ResetUpdated()
ResetUpdated resets all changes to the "updated" field.
func (*AgeKeyMutation) ResetUser ¶
func (m *AgeKeyMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*AgeKeyMutation) SetCreated ¶
func (m *AgeKeyMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*AgeKeyMutation) SetField ¶
func (m *AgeKeyMutation) 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 (*AgeKeyMutation) SetID ¶
func (m *AgeKeyMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of AgeKey entities.
func (*AgeKeyMutation) SetKey ¶
func (m *AgeKeyMutation) SetKey(b []byte)
SetKey sets the "key" field.
func (*AgeKeyMutation) SetOp ¶
func (m *AgeKeyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AgeKeyMutation) SetOwner ¶
func (m *AgeKeyMutation) SetOwner(u uuid.UUID)
SetOwner sets the "owner" field.
func (*AgeKeyMutation) SetUpdated ¶
func (m *AgeKeyMutation) SetUpdated(t time.Time)
SetUpdated sets the "updated" field.
func (*AgeKeyMutation) SetUserID ¶
func (m *AgeKeyMutation) SetUserID(id uuid.UUID)
SetUserID sets the "user" edge to the User entity by id.
func (AgeKeyMutation) Tx ¶
func (m AgeKeyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AgeKeyMutation) Type ¶
func (m *AgeKeyMutation) Type() string
Type returns the node type of this mutation (AgeKey).
func (*AgeKeyMutation) Updated ¶
func (m *AgeKeyMutation) Updated() (r time.Time, exists bool)
Updated returns the value of the "updated" field in the mutation.
func (*AgeKeyMutation) UserCleared ¶
func (m *AgeKeyMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*AgeKeyMutation) UserID ¶
func (m *AgeKeyMutation) UserID() (id uuid.UUID, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*AgeKeyMutation) UserIDs ¶
func (m *AgeKeyMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*AgeKeyMutation) Where ¶
func (m *AgeKeyMutation) Where(ps ...predicate.AgeKey)
Where appends a list predicates to the AgeKeyMutation builder.
func (*AgeKeyMutation) WhereP ¶
func (m *AgeKeyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AgeKeyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AgeKeyQuery ¶
type AgeKeyQuery struct {
// contains filtered or unexported fields
}
AgeKeyQuery is the builder for querying AgeKey entities.
func (*AgeKeyQuery) Aggregate ¶
func (akq *AgeKeyQuery) Aggregate(fns ...AggregateFunc) *AgeKeySelect
Aggregate returns a AgeKeySelect configured with the given aggregations.
func (*AgeKeyQuery) All ¶
func (akq *AgeKeyQuery) All(ctx context.Context) ([]*AgeKey, error)
All executes the query and returns a list of AgeKeys.
func (*AgeKeyQuery) AllX ¶
func (akq *AgeKeyQuery) AllX(ctx context.Context) []*AgeKey
AllX is like All, but panics if an error occurs.
func (*AgeKeyQuery) Clone ¶
func (akq *AgeKeyQuery) Clone() *AgeKeyQuery
Clone returns a duplicate of the AgeKeyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AgeKeyQuery) Count ¶
func (akq *AgeKeyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AgeKeyQuery) CountX ¶
func (akq *AgeKeyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AgeKeyQuery) Exist ¶
func (akq *AgeKeyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AgeKeyQuery) ExistX ¶
func (akq *AgeKeyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AgeKeyQuery) First ¶
func (akq *AgeKeyQuery) First(ctx context.Context) (*AgeKey, error)
First returns the first AgeKey entity from the query. Returns a *NotFoundError when no AgeKey was found.
func (*AgeKeyQuery) FirstID ¶
FirstID returns the first AgeKey ID from the query. Returns a *NotFoundError when no AgeKey ID was found.
func (*AgeKeyQuery) FirstIDX ¶
func (akq *AgeKeyQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AgeKeyQuery) FirstX ¶
func (akq *AgeKeyQuery) FirstX(ctx context.Context) *AgeKey
FirstX is like First, but panics if an error occurs.
func (*AgeKeyQuery) GroupBy ¶
func (akq *AgeKeyQuery) GroupBy(field string, fields ...string) *AgeKeyGroupBy
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 { Key []byte `json:"key,omitempty"` Count int `json:"count,omitempty"` } client.AgeKey.Query(). GroupBy(agekey.FieldKey). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AgeKeyQuery) IDsX ¶
func (akq *AgeKeyQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AgeKeyQuery) Limit ¶
func (akq *AgeKeyQuery) Limit(limit int) *AgeKeyQuery
Limit the number of records to be returned by this query.
func (*AgeKeyQuery) Offset ¶
func (akq *AgeKeyQuery) Offset(offset int) *AgeKeyQuery
Offset to start from.
func (*AgeKeyQuery) Only ¶
func (akq *AgeKeyQuery) Only(ctx context.Context) (*AgeKey, error)
Only returns a single AgeKey entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AgeKey entity is found. Returns a *NotFoundError when no AgeKey entities are found.
func (*AgeKeyQuery) OnlyID ¶
OnlyID is like Only, but returns the only AgeKey ID in the query. Returns a *NotSingularError when more than one AgeKey ID is found. Returns a *NotFoundError when no entities are found.
func (*AgeKeyQuery) OnlyIDX ¶
func (akq *AgeKeyQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AgeKeyQuery) OnlyX ¶
func (akq *AgeKeyQuery) OnlyX(ctx context.Context) *AgeKey
OnlyX is like Only, but panics if an error occurs.
func (*AgeKeyQuery) Order ¶
func (akq *AgeKeyQuery) Order(o ...agekey.OrderOption) *AgeKeyQuery
Order specifies how the records should be ordered.
func (*AgeKeyQuery) QueryUser ¶
func (akq *AgeKeyQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*AgeKeyQuery) Select ¶
func (akq *AgeKeyQuery) Select(fields ...string) *AgeKeySelect
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 { Key []byte `json:"key,omitempty"` } client.AgeKey.Query(). Select(agekey.FieldKey). Scan(ctx, &v)
func (*AgeKeyQuery) Unique ¶
func (akq *AgeKeyQuery) Unique(unique bool) *AgeKeyQuery
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 (*AgeKeyQuery) Where ¶
func (akq *AgeKeyQuery) Where(ps ...predicate.AgeKey) *AgeKeyQuery
Where adds a new predicate for the AgeKeyQuery builder.
func (*AgeKeyQuery) WithUser ¶
func (akq *AgeKeyQuery) WithUser(opts ...func(*UserQuery)) *AgeKeyQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type AgeKeySelect ¶
type AgeKeySelect struct { *AgeKeyQuery // contains filtered or unexported fields }
AgeKeySelect is the builder for selecting fields of AgeKey entities.
func (*AgeKeySelect) Aggregate ¶
func (aks *AgeKeySelect) Aggregate(fns ...AggregateFunc) *AgeKeySelect
Aggregate adds the given aggregation functions to the selector query.
func (*AgeKeySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AgeKeySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AgeKeySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AgeKeySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AgeKeySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AgeKeySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AgeKeySelect) Scan ¶
func (aks *AgeKeySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AgeKeySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AgeKeyUpdate ¶
type AgeKeyUpdate struct {
// contains filtered or unexported fields
}
AgeKeyUpdate is the builder for updating AgeKey entities.
func (*AgeKeyUpdate) Exec ¶
func (aku *AgeKeyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgeKeyUpdate) ExecX ¶
func (aku *AgeKeyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgeKeyUpdate) Mutation ¶
func (aku *AgeKeyUpdate) Mutation() *AgeKeyMutation
Mutation returns the AgeKeyMutation object of the builder.
func (*AgeKeyUpdate) Save ¶
func (aku *AgeKeyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AgeKeyUpdate) SaveX ¶
func (aku *AgeKeyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AgeKeyUpdate) SetKey ¶
func (aku *AgeKeyUpdate) SetKey(b []byte) *AgeKeyUpdate
SetKey sets the "key" field.
func (*AgeKeyUpdate) SetNillableUpdated ¶
func (aku *AgeKeyUpdate) SetNillableUpdated(t *time.Time) *AgeKeyUpdate
SetNillableUpdated sets the "updated" field if the given value is not nil.
func (*AgeKeyUpdate) SetUpdated ¶
func (aku *AgeKeyUpdate) SetUpdated(t time.Time) *AgeKeyUpdate
SetUpdated sets the "updated" field.
func (*AgeKeyUpdate) Where ¶
func (aku *AgeKeyUpdate) Where(ps ...predicate.AgeKey) *AgeKeyUpdate
Where appends a list predicates to the AgeKeyUpdate builder.
type AgeKeyUpdateOne ¶
type AgeKeyUpdateOne struct {
// contains filtered or unexported fields
}
AgeKeyUpdateOne is the builder for updating a single AgeKey entity.
func (*AgeKeyUpdateOne) Exec ¶
func (akuo *AgeKeyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AgeKeyUpdateOne) ExecX ¶
func (akuo *AgeKeyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgeKeyUpdateOne) Mutation ¶
func (akuo *AgeKeyUpdateOne) Mutation() *AgeKeyMutation
Mutation returns the AgeKeyMutation object of the builder.
func (*AgeKeyUpdateOne) Save ¶
func (akuo *AgeKeyUpdateOne) Save(ctx context.Context) (*AgeKey, error)
Save executes the query and returns the updated AgeKey entity.
func (*AgeKeyUpdateOne) SaveX ¶
func (akuo *AgeKeyUpdateOne) SaveX(ctx context.Context) *AgeKey
SaveX is like Save, but panics if an error occurs.
func (*AgeKeyUpdateOne) Select ¶
func (akuo *AgeKeyUpdateOne) Select(field string, fields ...string) *AgeKeyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AgeKeyUpdateOne) SetKey ¶
func (akuo *AgeKeyUpdateOne) SetKey(b []byte) *AgeKeyUpdateOne
SetKey sets the "key" field.
func (*AgeKeyUpdateOne) SetNillableUpdated ¶
func (akuo *AgeKeyUpdateOne) SetNillableUpdated(t *time.Time) *AgeKeyUpdateOne
SetNillableUpdated sets the "updated" field if the given value is not nil.
func (*AgeKeyUpdateOne) SetUpdated ¶
func (akuo *AgeKeyUpdateOne) SetUpdated(t time.Time) *AgeKeyUpdateOne
SetUpdated sets the "updated" field.
func (*AgeKeyUpdateOne) Where ¶
func (akuo *AgeKeyUpdateOne) Where(ps ...predicate.AgeKey) *AgeKeyUpdateOne
Where appends a list predicates to the AgeKeyUpdate builder.
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 // AgeKey is the client for interacting with the AgeKey builders. AgeKey *AgeKeyClient // HIBP is the client for interacting with the HIBP builders. HIBP *HIBPClient // LocalBreach is the client for interacting with the LocalBreach builders. LocalBreach *LocalBreachClient // SearchQuery is the client for interacting with the SearchQuery builders. SearchQuery *SearchQueryClient // Settings is the client for interacting with the Settings builders. Settings *SettingsClient // Setup is the client for interacting with the Setup builders. Setup *SetupClient // TrackedBreaches is the client for interacting with the TrackedBreaches builders. TrackedBreaches *TrackedBreachesClient // User is the client for interacting with the User builders. User *UserClient // 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(). AgeKey. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type HIBP ¶
type HIBP struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Domain holds the value of the "domain" field. Domain string `json:"domain,omitempty"` // BreachDate holds the value of the "breach_date" field. BreachDate string `json:"breach_date,omitempty"` // AddedDate holds the value of the "added_date" field. AddedDate time.Time `json:"added_date,omitempty"` // ModifiedDate holds the value of the "modified_date" field. ModifiedDate time.Time `json:"modified_date,omitempty"` // PwnCount holds the value of the "pwn_count" field. PwnCount int `json:"pwn_count,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Dataclasses holds the value of the "dataclasses" field. Dataclasses []string `json:"dataclasses,omitempty"` // IsVerified holds the value of the "is_verified" field. IsVerified bool `json:"is_verified,omitempty"` // IsFabricated holds the value of the "is_fabricated" field. IsFabricated bool `json:"is_fabricated,omitempty"` // IsSensitive holds the value of the "is_sensitive" field. IsSensitive bool `json:"is_sensitive,omitempty"` // IsRetired holds the value of the "is_retired" field. IsRetired bool `json:"is_retired,omitempty"` // IsSpamList holds the value of the "is_spamList" field. IsSpamList bool `json:"is_spamList,omitempty"` // IsMalware holds the value of the "is_malware" field. IsMalware bool `json:"is_malware,omitempty"` // LogoPath holds the value of the "logo_path" field. LogoPath *string `json:"logo_path,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the HIBPQuery when eager-loading is set. Edges HIBPEdges `json:"edges"` // contains filtered or unexported fields }
HIBP is the model entity for the HIBP schema.
func (*HIBP) QueryTrackedBreaches ¶
func (h *HIBP) QueryTrackedBreaches() *TrackedBreachesQuery
QueryTrackedBreaches queries the "tracked_breaches" edge of the HIBP entity.
func (*HIBP) Unwrap ¶
Unwrap unwraps the HIBP 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 (*HIBP) Update ¶
func (h *HIBP) Update() *HIBPUpdateOne
Update returns a builder for updating this HIBP. Note that you need to call HIBP.Unwrap() before calling this method if this HIBP was returned from a transaction, and the transaction was committed or rolled back.
type HIBPClient ¶
type HIBPClient struct {
// contains filtered or unexported fields
}
HIBPClient is a client for the HIBP schema.
func NewHIBPClient ¶
func NewHIBPClient(c config) *HIBPClient
NewHIBPClient returns a client for the HIBP from the given config.
func (*HIBPClient) Create ¶
func (c *HIBPClient) Create() *HIBPCreate
Create returns a builder for creating a HIBP entity.
func (*HIBPClient) CreateBulk ¶
func (c *HIBPClient) CreateBulk(builders ...*HIBPCreate) *HIBPCreateBulk
CreateBulk returns a builder for creating a bulk of HIBP entities.
func (*HIBPClient) Delete ¶
func (c *HIBPClient) Delete() *HIBPDelete
Delete returns a delete builder for HIBP.
func (*HIBPClient) DeleteOne ¶
func (c *HIBPClient) DeleteOne(h *HIBP) *HIBPDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*HIBPClient) DeleteOneID ¶
func (c *HIBPClient) DeleteOneID(id uuid.UUID) *HIBPDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*HIBPClient) Intercept ¶
func (c *HIBPClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hibp.Intercept(f(g(h())))`.
func (*HIBPClient) Interceptors ¶
func (c *HIBPClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*HIBPClient) Query ¶
func (c *HIBPClient) Query() *HIBPQuery
Query returns a query builder for HIBP.
func (*HIBPClient) QueryTrackedBreaches ¶
func (c *HIBPClient) QueryTrackedBreaches(h *HIBP) *TrackedBreachesQuery
QueryTrackedBreaches queries the tracked_breaches edge of a HIBP.
func (*HIBPClient) Update ¶
func (c *HIBPClient) Update() *HIBPUpdate
Update returns an update builder for HIBP.
func (*HIBPClient) UpdateOne ¶
func (c *HIBPClient) UpdateOne(h *HIBP) *HIBPUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HIBPClient) UpdateOneID ¶
func (c *HIBPClient) UpdateOneID(id uuid.UUID) *HIBPUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HIBPClient) Use ¶
func (c *HIBPClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hibp.Hooks(f(g(h())))`.
type HIBPCreate ¶
type HIBPCreate struct {
// contains filtered or unexported fields
}
HIBPCreate is the builder for creating a HIBP entity.
func (*HIBPCreate) Exec ¶
func (hc *HIBPCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HIBPCreate) ExecX ¶
func (hc *HIBPCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HIBPCreate) Mutation ¶
func (hc *HIBPCreate) Mutation() *HIBPMutation
Mutation returns the HIBPMutation object of the builder.
func (*HIBPCreate) Save ¶
func (hc *HIBPCreate) Save(ctx context.Context) (*HIBP, error)
Save creates the HIBP in the database.
func (*HIBPCreate) SaveX ¶
func (hc *HIBPCreate) SaveX(ctx context.Context) *HIBP
SaveX calls Save and panics if Save returns an error.
func (*HIBPCreate) SetAddedDate ¶
func (hc *HIBPCreate) SetAddedDate(t time.Time) *HIBPCreate
SetAddedDate sets the "added_date" field.
func (*HIBPCreate) SetBreachDate ¶
func (hc *HIBPCreate) SetBreachDate(s string) *HIBPCreate
SetBreachDate sets the "breach_date" field.
func (*HIBPCreate) SetDataclasses ¶
func (hc *HIBPCreate) SetDataclasses(s []string) *HIBPCreate
SetDataclasses sets the "dataclasses" field.
func (*HIBPCreate) SetDescription ¶
func (hc *HIBPCreate) SetDescription(s string) *HIBPCreate
SetDescription sets the "description" field.
func (*HIBPCreate) SetDomain ¶
func (hc *HIBPCreate) SetDomain(s string) *HIBPCreate
SetDomain sets the "domain" field.
func (*HIBPCreate) SetID ¶
func (hc *HIBPCreate) SetID(u uuid.UUID) *HIBPCreate
SetID sets the "id" field.
func (*HIBPCreate) SetIsFabricated ¶
func (hc *HIBPCreate) SetIsFabricated(b bool) *HIBPCreate
SetIsFabricated sets the "is_fabricated" field.
func (*HIBPCreate) SetIsMalware ¶
func (hc *HIBPCreate) SetIsMalware(b bool) *HIBPCreate
SetIsMalware sets the "is_malware" field.
func (*HIBPCreate) SetIsRetired ¶
func (hc *HIBPCreate) SetIsRetired(b bool) *HIBPCreate
SetIsRetired sets the "is_retired" field.
func (*HIBPCreate) SetIsSensitive ¶
func (hc *HIBPCreate) SetIsSensitive(b bool) *HIBPCreate
SetIsSensitive sets the "is_sensitive" field.
func (*HIBPCreate) SetIsSpamList ¶
func (hc *HIBPCreate) SetIsSpamList(b bool) *HIBPCreate
SetIsSpamList sets the "is_spamList" field.
func (*HIBPCreate) SetIsVerified ¶
func (hc *HIBPCreate) SetIsVerified(b bool) *HIBPCreate
SetIsVerified sets the "is_verified" field.
func (*HIBPCreate) SetLogoPath ¶
func (hc *HIBPCreate) SetLogoPath(s string) *HIBPCreate
SetLogoPath sets the "logo_path" field.
func (*HIBPCreate) SetModifiedDate ¶
func (hc *HIBPCreate) SetModifiedDate(t time.Time) *HIBPCreate
SetModifiedDate sets the "modified_date" field.
func (*HIBPCreate) SetName ¶
func (hc *HIBPCreate) SetName(s string) *HIBPCreate
SetName sets the "name" field.
func (*HIBPCreate) SetNillableDescription ¶
func (hc *HIBPCreate) SetNillableDescription(s *string) *HIBPCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*HIBPCreate) SetNillableID ¶
func (hc *HIBPCreate) SetNillableID(u *uuid.UUID) *HIBPCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*HIBPCreate) SetNillableIsFabricated ¶
func (hc *HIBPCreate) SetNillableIsFabricated(b *bool) *HIBPCreate
SetNillableIsFabricated sets the "is_fabricated" field if the given value is not nil.
func (*HIBPCreate) SetNillableIsMalware ¶
func (hc *HIBPCreate) SetNillableIsMalware(b *bool) *HIBPCreate
SetNillableIsMalware sets the "is_malware" field if the given value is not nil.
func (*HIBPCreate) SetNillableIsRetired ¶
func (hc *HIBPCreate) SetNillableIsRetired(b *bool) *HIBPCreate
SetNillableIsRetired sets the "is_retired" field if the given value is not nil.
func (*HIBPCreate) SetNillableIsSensitive ¶
func (hc *HIBPCreate) SetNillableIsSensitive(b *bool) *HIBPCreate
SetNillableIsSensitive sets the "is_sensitive" field if the given value is not nil.
func (*HIBPCreate) SetNillableIsSpamList ¶
func (hc *HIBPCreate) SetNillableIsSpamList(b *bool) *HIBPCreate
SetNillableIsSpamList sets the "is_spamList" field if the given value is not nil.
func (*HIBPCreate) SetNillableIsVerified ¶
func (hc *HIBPCreate) SetNillableIsVerified(b *bool) *HIBPCreate
SetNillableIsVerified sets the "is_verified" field if the given value is not nil.
func (*HIBPCreate) SetNillableLogoPath ¶
func (hc *HIBPCreate) SetNillableLogoPath(s *string) *HIBPCreate
SetNillableLogoPath sets the "logo_path" field if the given value is not nil.
func (*HIBPCreate) SetNillableTrackedBreachesID ¶
func (hc *HIBPCreate) SetNillableTrackedBreachesID(id *uuid.UUID) *HIBPCreate
SetNillableTrackedBreachesID sets the "tracked_breaches" edge to the TrackedBreaches entity by ID if the given value is not nil.
func (*HIBPCreate) SetPwnCount ¶
func (hc *HIBPCreate) SetPwnCount(i int) *HIBPCreate
SetPwnCount sets the "pwn_count" field.
func (*HIBPCreate) SetTitle ¶
func (hc *HIBPCreate) SetTitle(s string) *HIBPCreate
SetTitle sets the "title" field.
func (*HIBPCreate) SetTrackedBreaches ¶
func (hc *HIBPCreate) SetTrackedBreaches(t *TrackedBreaches) *HIBPCreate
SetTrackedBreaches sets the "tracked_breaches" edge to the TrackedBreaches entity.
func (*HIBPCreate) SetTrackedBreachesID ¶
func (hc *HIBPCreate) SetTrackedBreachesID(id uuid.UUID) *HIBPCreate
SetTrackedBreachesID sets the "tracked_breaches" edge to the TrackedBreaches entity by ID.
type HIBPCreateBulk ¶
type HIBPCreateBulk struct {
// contains filtered or unexported fields
}
HIBPCreateBulk is the builder for creating many HIBP entities in bulk.
func (*HIBPCreateBulk) Exec ¶
func (hcb *HIBPCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HIBPCreateBulk) ExecX ¶
func (hcb *HIBPCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type HIBPDelete ¶
type HIBPDelete struct {
// contains filtered or unexported fields
}
HIBPDelete is the builder for deleting a HIBP entity.
func (*HIBPDelete) Exec ¶
func (hd *HIBPDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HIBPDelete) ExecX ¶
func (hd *HIBPDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HIBPDelete) Where ¶
func (hd *HIBPDelete) Where(ps ...predicate.HIBP) *HIBPDelete
Where appends a list predicates to the HIBPDelete builder.
type HIBPDeleteOne ¶
type HIBPDeleteOne struct {
// contains filtered or unexported fields
}
HIBPDeleteOne is the builder for deleting a single HIBP entity.
func (*HIBPDeleteOne) Exec ¶
func (hdo *HIBPDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HIBPDeleteOne) ExecX ¶
func (hdo *HIBPDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HIBPDeleteOne) Where ¶
func (hdo *HIBPDeleteOne) Where(ps ...predicate.HIBP) *HIBPDeleteOne
Where appends a list predicates to the HIBPDelete builder.
type HIBPEdges ¶
type HIBPEdges struct { // TrackedBreaches holds the value of the tracked_breaches edge. TrackedBreaches *TrackedBreaches `json:"tracked_breaches,omitempty"` // contains filtered or unexported fields }
HIBPEdges holds the relations/edges for other nodes in the graph.
func (HIBPEdges) TrackedBreachesOrErr ¶
func (e HIBPEdges) TrackedBreachesOrErr() (*TrackedBreaches, error)
TrackedBreachesOrErr returns the TrackedBreaches value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type HIBPGroupBy ¶
type HIBPGroupBy struct {
// contains filtered or unexported fields
}
HIBPGroupBy is the group-by builder for HIBP entities.
func (*HIBPGroupBy) Aggregate ¶
func (hgb *HIBPGroupBy) Aggregate(fns ...AggregateFunc) *HIBPGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HIBPGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HIBPGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HIBPGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HIBPGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HIBPGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HIBPGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HIBPGroupBy) Scan ¶
func (hgb *HIBPGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HIBPGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HIBPMutation ¶
type HIBPMutation struct {
// contains filtered or unexported fields
}
HIBPMutation represents an operation that mutates the HIBP nodes in the graph.
func (*HIBPMutation) AddField ¶
func (m *HIBPMutation) 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 (*HIBPMutation) AddPwnCount ¶
func (m *HIBPMutation) AddPwnCount(i int)
AddPwnCount adds i to the "pwn_count" field.
func (*HIBPMutation) AddedDate ¶
func (m *HIBPMutation) AddedDate() (r time.Time, exists bool)
AddedDate returns the value of the "added_date" field in the mutation.
func (*HIBPMutation) AddedEdges ¶
func (m *HIBPMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HIBPMutation) AddedField ¶
func (m *HIBPMutation) 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 (*HIBPMutation) AddedFields ¶
func (m *HIBPMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HIBPMutation) AddedIDs ¶
func (m *HIBPMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HIBPMutation) AddedPwnCount ¶
func (m *HIBPMutation) AddedPwnCount() (r int, exists bool)
AddedPwnCount returns the value that was added to the "pwn_count" field in this mutation.
func (*HIBPMutation) AppendDataclasses ¶
func (m *HIBPMutation) AppendDataclasses(s []string)
AppendDataclasses adds s to the "dataclasses" field.
func (*HIBPMutation) AppendedDataclasses ¶
func (m *HIBPMutation) AppendedDataclasses() ([]string, bool)
AppendedDataclasses returns the list of values that were appended to the "dataclasses" field in this mutation.
func (*HIBPMutation) BreachDate ¶
func (m *HIBPMutation) BreachDate() (r string, exists bool)
BreachDate returns the value of the "breach_date" field in the mutation.
func (*HIBPMutation) ClearDescription ¶
func (m *HIBPMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*HIBPMutation) ClearEdge ¶
func (m *HIBPMutation) 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 (*HIBPMutation) ClearField ¶
func (m *HIBPMutation) 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 (*HIBPMutation) ClearLogoPath ¶
func (m *HIBPMutation) ClearLogoPath()
ClearLogoPath clears the value of the "logo_path" field.
func (*HIBPMutation) ClearTrackedBreaches ¶
func (m *HIBPMutation) ClearTrackedBreaches()
ClearTrackedBreaches clears the "tracked_breaches" edge to the TrackedBreaches entity.
func (*HIBPMutation) ClearedEdges ¶
func (m *HIBPMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HIBPMutation) ClearedFields ¶
func (m *HIBPMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HIBPMutation) Client ¶
func (m HIBPMutation) 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 (*HIBPMutation) Dataclasses ¶
func (m *HIBPMutation) Dataclasses() (r []string, exists bool)
Dataclasses returns the value of the "dataclasses" field in the mutation.
func (*HIBPMutation) Description ¶
func (m *HIBPMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*HIBPMutation) DescriptionCleared ¶
func (m *HIBPMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*HIBPMutation) Domain ¶
func (m *HIBPMutation) Domain() (r string, exists bool)
Domain returns the value of the "domain" field in the mutation.
func (*HIBPMutation) EdgeCleared ¶
func (m *HIBPMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HIBPMutation) Field ¶
func (m *HIBPMutation) 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 (*HIBPMutation) FieldCleared ¶
func (m *HIBPMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HIBPMutation) Fields ¶
func (m *HIBPMutation) 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 (*HIBPMutation) ID ¶
func (m *HIBPMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*HIBPMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*HIBPMutation) IsFabricated ¶
func (m *HIBPMutation) IsFabricated() (r bool, exists bool)
IsFabricated returns the value of the "is_fabricated" field in the mutation.
func (*HIBPMutation) IsMalware ¶
func (m *HIBPMutation) IsMalware() (r bool, exists bool)
IsMalware returns the value of the "is_malware" field in the mutation.
func (*HIBPMutation) IsRetired ¶
func (m *HIBPMutation) IsRetired() (r bool, exists bool)
IsRetired returns the value of the "is_retired" field in the mutation.
func (*HIBPMutation) IsSensitive ¶
func (m *HIBPMutation) IsSensitive() (r bool, exists bool)
IsSensitive returns the value of the "is_sensitive" field in the mutation.
func (*HIBPMutation) IsSpamList ¶
func (m *HIBPMutation) IsSpamList() (r bool, exists bool)
IsSpamList returns the value of the "is_spamList" field in the mutation.
func (*HIBPMutation) IsVerified ¶
func (m *HIBPMutation) IsVerified() (r bool, exists bool)
IsVerified returns the value of the "is_verified" field in the mutation.
func (*HIBPMutation) LogoPath ¶
func (m *HIBPMutation) LogoPath() (r string, exists bool)
LogoPath returns the value of the "logo_path" field in the mutation.
func (*HIBPMutation) LogoPathCleared ¶
func (m *HIBPMutation) LogoPathCleared() bool
LogoPathCleared returns if the "logo_path" field was cleared in this mutation.
func (*HIBPMutation) ModifiedDate ¶
func (m *HIBPMutation) ModifiedDate() (r time.Time, exists bool)
ModifiedDate returns the value of the "modified_date" field in the mutation.
func (*HIBPMutation) Name ¶
func (m *HIBPMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*HIBPMutation) OldAddedDate ¶
OldAddedDate returns the old "added_date" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldBreachDate ¶
func (m *HIBPMutation) OldBreachDate(ctx context.Context) (v string, err error)
OldBreachDate returns the old "breach_date" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldDataclasses ¶
func (m *HIBPMutation) OldDataclasses(ctx context.Context) (v []string, err error)
OldDataclasses returns the old "dataclasses" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldDescription ¶
func (m *HIBPMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldDomain ¶
func (m *HIBPMutation) OldDomain(ctx context.Context) (v string, err error)
OldDomain returns the old "domain" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) 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 (*HIBPMutation) OldIsFabricated ¶
func (m *HIBPMutation) OldIsFabricated(ctx context.Context) (v bool, err error)
OldIsFabricated returns the old "is_fabricated" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldIsMalware ¶
func (m *HIBPMutation) OldIsMalware(ctx context.Context) (v bool, err error)
OldIsMalware returns the old "is_malware" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldIsRetired ¶
func (m *HIBPMutation) OldIsRetired(ctx context.Context) (v bool, err error)
OldIsRetired returns the old "is_retired" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldIsSensitive ¶
func (m *HIBPMutation) OldIsSensitive(ctx context.Context) (v bool, err error)
OldIsSensitive returns the old "is_sensitive" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldIsSpamList ¶
func (m *HIBPMutation) OldIsSpamList(ctx context.Context) (v bool, err error)
OldIsSpamList returns the old "is_spamList" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldIsVerified ¶
func (m *HIBPMutation) OldIsVerified(ctx context.Context) (v bool, err error)
OldIsVerified returns the old "is_verified" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldLogoPath ¶
func (m *HIBPMutation) OldLogoPath(ctx context.Context) (v *string, err error)
OldLogoPath returns the old "logo_path" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldModifiedDate ¶
OldModifiedDate returns the old "modified_date" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldName ¶
func (m *HIBPMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldPwnCount ¶
func (m *HIBPMutation) OldPwnCount(ctx context.Context) (v int, err error)
OldPwnCount returns the old "pwn_count" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) OldTitle ¶
func (m *HIBPMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the HIBP entity. If the HIBP 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 (*HIBPMutation) PwnCount ¶
func (m *HIBPMutation) PwnCount() (r int, exists bool)
PwnCount returns the value of the "pwn_count" field in the mutation.
func (*HIBPMutation) RemovedEdges ¶
func (m *HIBPMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HIBPMutation) RemovedIDs ¶
func (m *HIBPMutation) 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 (*HIBPMutation) ResetAddedDate ¶
func (m *HIBPMutation) ResetAddedDate()
ResetAddedDate resets all changes to the "added_date" field.
func (*HIBPMutation) ResetBreachDate ¶
func (m *HIBPMutation) ResetBreachDate()
ResetBreachDate resets all changes to the "breach_date" field.
func (*HIBPMutation) ResetDataclasses ¶
func (m *HIBPMutation) ResetDataclasses()
ResetDataclasses resets all changes to the "dataclasses" field.
func (*HIBPMutation) ResetDescription ¶
func (m *HIBPMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*HIBPMutation) ResetDomain ¶
func (m *HIBPMutation) ResetDomain()
ResetDomain resets all changes to the "domain" field.
func (*HIBPMutation) ResetEdge ¶
func (m *HIBPMutation) 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 (*HIBPMutation) ResetField ¶
func (m *HIBPMutation) 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 (*HIBPMutation) ResetIsFabricated ¶
func (m *HIBPMutation) ResetIsFabricated()
ResetIsFabricated resets all changes to the "is_fabricated" field.
func (*HIBPMutation) ResetIsMalware ¶
func (m *HIBPMutation) ResetIsMalware()
ResetIsMalware resets all changes to the "is_malware" field.
func (*HIBPMutation) ResetIsRetired ¶
func (m *HIBPMutation) ResetIsRetired()
ResetIsRetired resets all changes to the "is_retired" field.
func (*HIBPMutation) ResetIsSensitive ¶
func (m *HIBPMutation) ResetIsSensitive()
ResetIsSensitive resets all changes to the "is_sensitive" field.
func (*HIBPMutation) ResetIsSpamList ¶
func (m *HIBPMutation) ResetIsSpamList()
ResetIsSpamList resets all changes to the "is_spamList" field.
func (*HIBPMutation) ResetIsVerified ¶
func (m *HIBPMutation) ResetIsVerified()
ResetIsVerified resets all changes to the "is_verified" field.
func (*HIBPMutation) ResetLogoPath ¶
func (m *HIBPMutation) ResetLogoPath()
ResetLogoPath resets all changes to the "logo_path" field.
func (*HIBPMutation) ResetModifiedDate ¶
func (m *HIBPMutation) ResetModifiedDate()
ResetModifiedDate resets all changes to the "modified_date" field.
func (*HIBPMutation) ResetName ¶
func (m *HIBPMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*HIBPMutation) ResetPwnCount ¶
func (m *HIBPMutation) ResetPwnCount()
ResetPwnCount resets all changes to the "pwn_count" field.
func (*HIBPMutation) ResetTitle ¶
func (m *HIBPMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*HIBPMutation) ResetTrackedBreaches ¶
func (m *HIBPMutation) ResetTrackedBreaches()
ResetTrackedBreaches resets all changes to the "tracked_breaches" edge.
func (*HIBPMutation) SetAddedDate ¶
func (m *HIBPMutation) SetAddedDate(t time.Time)
SetAddedDate sets the "added_date" field.
func (*HIBPMutation) SetBreachDate ¶
func (m *HIBPMutation) SetBreachDate(s string)
SetBreachDate sets the "breach_date" field.
func (*HIBPMutation) SetDataclasses ¶
func (m *HIBPMutation) SetDataclasses(s []string)
SetDataclasses sets the "dataclasses" field.
func (*HIBPMutation) SetDescription ¶
func (m *HIBPMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*HIBPMutation) SetDomain ¶
func (m *HIBPMutation) SetDomain(s string)
SetDomain sets the "domain" field.
func (*HIBPMutation) SetField ¶
func (m *HIBPMutation) 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 (*HIBPMutation) SetID ¶
func (m *HIBPMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of HIBP entities.
func (*HIBPMutation) SetIsFabricated ¶
func (m *HIBPMutation) SetIsFabricated(b bool)
SetIsFabricated sets the "is_fabricated" field.
func (*HIBPMutation) SetIsMalware ¶
func (m *HIBPMutation) SetIsMalware(b bool)
SetIsMalware sets the "is_malware" field.
func (*HIBPMutation) SetIsRetired ¶
func (m *HIBPMutation) SetIsRetired(b bool)
SetIsRetired sets the "is_retired" field.
func (*HIBPMutation) SetIsSensitive ¶
func (m *HIBPMutation) SetIsSensitive(b bool)
SetIsSensitive sets the "is_sensitive" field.
func (*HIBPMutation) SetIsSpamList ¶
func (m *HIBPMutation) SetIsSpamList(b bool)
SetIsSpamList sets the "is_spamList" field.
func (*HIBPMutation) SetIsVerified ¶
func (m *HIBPMutation) SetIsVerified(b bool)
SetIsVerified sets the "is_verified" field.
func (*HIBPMutation) SetLogoPath ¶
func (m *HIBPMutation) SetLogoPath(s string)
SetLogoPath sets the "logo_path" field.
func (*HIBPMutation) SetModifiedDate ¶
func (m *HIBPMutation) SetModifiedDate(t time.Time)
SetModifiedDate sets the "modified_date" field.
func (*HIBPMutation) SetName ¶
func (m *HIBPMutation) SetName(s string)
SetName sets the "name" field.
func (*HIBPMutation) SetOp ¶
func (m *HIBPMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*HIBPMutation) SetPwnCount ¶
func (m *HIBPMutation) SetPwnCount(i int)
SetPwnCount sets the "pwn_count" field.
func (*HIBPMutation) SetTitle ¶
func (m *HIBPMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*HIBPMutation) SetTrackedBreachesID ¶
func (m *HIBPMutation) SetTrackedBreachesID(id uuid.UUID)
SetTrackedBreachesID sets the "tracked_breaches" edge to the TrackedBreaches entity by id.
func (*HIBPMutation) Title ¶
func (m *HIBPMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (*HIBPMutation) TrackedBreachesCleared ¶
func (m *HIBPMutation) TrackedBreachesCleared() bool
TrackedBreachesCleared reports if the "tracked_breaches" edge to the TrackedBreaches entity was cleared.
func (*HIBPMutation) TrackedBreachesID ¶
func (m *HIBPMutation) TrackedBreachesID() (id uuid.UUID, exists bool)
TrackedBreachesID returns the "tracked_breaches" edge ID in the mutation.
func (*HIBPMutation) TrackedBreachesIDs ¶
func (m *HIBPMutation) TrackedBreachesIDs() (ids []uuid.UUID)
TrackedBreachesIDs returns the "tracked_breaches" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TrackedBreachesID instead. It exists only for internal usage by the builders.
func (HIBPMutation) Tx ¶
func (m HIBPMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HIBPMutation) Type ¶
func (m *HIBPMutation) Type() string
Type returns the node type of this mutation (HIBP).
func (*HIBPMutation) Where ¶
func (m *HIBPMutation) Where(ps ...predicate.HIBP)
Where appends a list predicates to the HIBPMutation builder.
func (*HIBPMutation) WhereP ¶
func (m *HIBPMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HIBPMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type HIBPQuery ¶
type HIBPQuery struct {
// contains filtered or unexported fields
}
HIBPQuery is the builder for querying HIBP entities.
func (*HIBPQuery) Aggregate ¶
func (hq *HIBPQuery) Aggregate(fns ...AggregateFunc) *HIBPSelect
Aggregate returns a HIBPSelect configured with the given aggregations.
func (*HIBPQuery) Clone ¶
Clone returns a duplicate of the HIBPQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HIBPQuery) First ¶
First returns the first HIBP entity from the query. Returns a *NotFoundError when no HIBP was found.
func (*HIBPQuery) FirstID ¶
FirstID returns the first HIBP ID from the query. Returns a *NotFoundError when no HIBP ID was found.
func (*HIBPQuery) GroupBy ¶
func (hq *HIBPQuery) GroupBy(field string, fields ...string) *HIBPGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.HIBP.Query(). GroupBy(hibp.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*HIBPQuery) Only ¶
Only returns a single HIBP entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HIBP entity is found. Returns a *NotFoundError when no HIBP entities are found.
func (*HIBPQuery) OnlyID ¶
OnlyID is like Only, but returns the only HIBP ID in the query. Returns a *NotSingularError when more than one HIBP ID is found. Returns a *NotFoundError when no entities are found.
func (*HIBPQuery) Order ¶
func (hq *HIBPQuery) Order(o ...hibp.OrderOption) *HIBPQuery
Order specifies how the records should be ordered.
func (*HIBPQuery) QueryTrackedBreaches ¶
func (hq *HIBPQuery) QueryTrackedBreaches() *TrackedBreachesQuery
QueryTrackedBreaches chains the current query on the "tracked_breaches" edge.
func (*HIBPQuery) Select ¶
func (hq *HIBPQuery) Select(fields ...string) *HIBPSelect
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 { Name string `json:"name,omitempty"` } client.HIBP.Query(). Select(hibp.FieldName). Scan(ctx, &v)
func (*HIBPQuery) 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 (*HIBPQuery) WithTrackedBreaches ¶
func (hq *HIBPQuery) WithTrackedBreaches(opts ...func(*TrackedBreachesQuery)) *HIBPQuery
WithTrackedBreaches tells the query-builder to eager-load the nodes that are connected to the "tracked_breaches" edge. The optional arguments are used to configure the query builder of the edge.
type HIBPSelect ¶
type HIBPSelect struct { *HIBPQuery // contains filtered or unexported fields }
HIBPSelect is the builder for selecting fields of HIBP entities.
func (*HIBPSelect) Aggregate ¶
func (hs *HIBPSelect) Aggregate(fns ...AggregateFunc) *HIBPSelect
Aggregate adds the given aggregation functions to the selector query.
func (*HIBPSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HIBPSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HIBPSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HIBPSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HIBPSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HIBPSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HIBPSelect) Scan ¶
func (hs *HIBPSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HIBPSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HIBPUpdate ¶
type HIBPUpdate struct {
// contains filtered or unexported fields
}
HIBPUpdate is the builder for updating HIBP entities.
func (*HIBPUpdate) AddPwnCount ¶
func (hu *HIBPUpdate) AddPwnCount(i int) *HIBPUpdate
AddPwnCount adds i to the "pwn_count" field.
func (*HIBPUpdate) AppendDataclasses ¶
func (hu *HIBPUpdate) AppendDataclasses(s []string) *HIBPUpdate
AppendDataclasses appends s to the "dataclasses" field.
func (*HIBPUpdate) ClearDescription ¶
func (hu *HIBPUpdate) ClearDescription() *HIBPUpdate
ClearDescription clears the value of the "description" field.
func (*HIBPUpdate) ClearLogoPath ¶
func (hu *HIBPUpdate) ClearLogoPath() *HIBPUpdate
ClearLogoPath clears the value of the "logo_path" field.
func (*HIBPUpdate) ClearTrackedBreaches ¶
func (hu *HIBPUpdate) ClearTrackedBreaches() *HIBPUpdate
ClearTrackedBreaches clears the "tracked_breaches" edge to the TrackedBreaches entity.
func (*HIBPUpdate) Exec ¶
func (hu *HIBPUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HIBPUpdate) ExecX ¶
func (hu *HIBPUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HIBPUpdate) Mutation ¶
func (hu *HIBPUpdate) Mutation() *HIBPMutation
Mutation returns the HIBPMutation object of the builder.
func (*HIBPUpdate) Save ¶
func (hu *HIBPUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HIBPUpdate) SaveX ¶
func (hu *HIBPUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HIBPUpdate) SetAddedDate ¶
func (hu *HIBPUpdate) SetAddedDate(t time.Time) *HIBPUpdate
SetAddedDate sets the "added_date" field.
func (*HIBPUpdate) SetBreachDate ¶
func (hu *HIBPUpdate) SetBreachDate(s string) *HIBPUpdate
SetBreachDate sets the "breach_date" field.
func (*HIBPUpdate) SetDataclasses ¶
func (hu *HIBPUpdate) SetDataclasses(s []string) *HIBPUpdate
SetDataclasses sets the "dataclasses" field.
func (*HIBPUpdate) SetDescription ¶
func (hu *HIBPUpdate) SetDescription(s string) *HIBPUpdate
SetDescription sets the "description" field.
func (*HIBPUpdate) SetIsFabricated ¶
func (hu *HIBPUpdate) SetIsFabricated(b bool) *HIBPUpdate
SetIsFabricated sets the "is_fabricated" field.
func (*HIBPUpdate) SetIsMalware ¶
func (hu *HIBPUpdate) SetIsMalware(b bool) *HIBPUpdate
SetIsMalware sets the "is_malware" field.
func (*HIBPUpdate) SetIsRetired ¶
func (hu *HIBPUpdate) SetIsRetired(b bool) *HIBPUpdate
SetIsRetired sets the "is_retired" field.
func (*HIBPUpdate) SetIsSensitive ¶
func (hu *HIBPUpdate) SetIsSensitive(b bool) *HIBPUpdate
SetIsSensitive sets the "is_sensitive" field.
func (*HIBPUpdate) SetIsSpamList ¶
func (hu *HIBPUpdate) SetIsSpamList(b bool) *HIBPUpdate
SetIsSpamList sets the "is_spamList" field.
func (*HIBPUpdate) SetIsVerified ¶
func (hu *HIBPUpdate) SetIsVerified(b bool) *HIBPUpdate
SetIsVerified sets the "is_verified" field.
func (*HIBPUpdate) SetLogoPath ¶
func (hu *HIBPUpdate) SetLogoPath(s string) *HIBPUpdate
SetLogoPath sets the "logo_path" field.
func (*HIBPUpdate) SetModifiedDate ¶
func (hu *HIBPUpdate) SetModifiedDate(t time.Time) *HIBPUpdate
SetModifiedDate sets the "modified_date" field.
func (*HIBPUpdate) SetNillableDescription ¶
func (hu *HIBPUpdate) SetNillableDescription(s *string) *HIBPUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*HIBPUpdate) SetNillableIsFabricated ¶
func (hu *HIBPUpdate) SetNillableIsFabricated(b *bool) *HIBPUpdate
SetNillableIsFabricated sets the "is_fabricated" field if the given value is not nil.
func (*HIBPUpdate) SetNillableIsMalware ¶
func (hu *HIBPUpdate) SetNillableIsMalware(b *bool) *HIBPUpdate
SetNillableIsMalware sets the "is_malware" field if the given value is not nil.
func (*HIBPUpdate) SetNillableIsRetired ¶
func (hu *HIBPUpdate) SetNillableIsRetired(b *bool) *HIBPUpdate
SetNillableIsRetired sets the "is_retired" field if the given value is not nil.
func (*HIBPUpdate) SetNillableIsSensitive ¶
func (hu *HIBPUpdate) SetNillableIsSensitive(b *bool) *HIBPUpdate
SetNillableIsSensitive sets the "is_sensitive" field if the given value is not nil.
func (*HIBPUpdate) SetNillableIsSpamList ¶
func (hu *HIBPUpdate) SetNillableIsSpamList(b *bool) *HIBPUpdate
SetNillableIsSpamList sets the "is_spamList" field if the given value is not nil.
func (*HIBPUpdate) SetNillableIsVerified ¶
func (hu *HIBPUpdate) SetNillableIsVerified(b *bool) *HIBPUpdate
SetNillableIsVerified sets the "is_verified" field if the given value is not nil.
func (*HIBPUpdate) SetNillableLogoPath ¶
func (hu *HIBPUpdate) SetNillableLogoPath(s *string) *HIBPUpdate
SetNillableLogoPath sets the "logo_path" field if the given value is not nil.
func (*HIBPUpdate) SetNillableTrackedBreachesID ¶
func (hu *HIBPUpdate) SetNillableTrackedBreachesID(id *uuid.UUID) *HIBPUpdate
SetNillableTrackedBreachesID sets the "tracked_breaches" edge to the TrackedBreaches entity by ID if the given value is not nil.
func (*HIBPUpdate) SetPwnCount ¶
func (hu *HIBPUpdate) SetPwnCount(i int) *HIBPUpdate
SetPwnCount sets the "pwn_count" field.
func (*HIBPUpdate) SetTitle ¶
func (hu *HIBPUpdate) SetTitle(s string) *HIBPUpdate
SetTitle sets the "title" field.
func (*HIBPUpdate) SetTrackedBreaches ¶
func (hu *HIBPUpdate) SetTrackedBreaches(t *TrackedBreaches) *HIBPUpdate
SetTrackedBreaches sets the "tracked_breaches" edge to the TrackedBreaches entity.
func (*HIBPUpdate) SetTrackedBreachesID ¶
func (hu *HIBPUpdate) SetTrackedBreachesID(id uuid.UUID) *HIBPUpdate
SetTrackedBreachesID sets the "tracked_breaches" edge to the TrackedBreaches entity by ID.
func (*HIBPUpdate) Where ¶
func (hu *HIBPUpdate) Where(ps ...predicate.HIBP) *HIBPUpdate
Where appends a list predicates to the HIBPUpdate builder.
type HIBPUpdateOne ¶
type HIBPUpdateOne struct {
// contains filtered or unexported fields
}
HIBPUpdateOne is the builder for updating a single HIBP entity.
func (*HIBPUpdateOne) AddPwnCount ¶
func (huo *HIBPUpdateOne) AddPwnCount(i int) *HIBPUpdateOne
AddPwnCount adds i to the "pwn_count" field.
func (*HIBPUpdateOne) AppendDataclasses ¶
func (huo *HIBPUpdateOne) AppendDataclasses(s []string) *HIBPUpdateOne
AppendDataclasses appends s to the "dataclasses" field.
func (*HIBPUpdateOne) ClearDescription ¶
func (huo *HIBPUpdateOne) ClearDescription() *HIBPUpdateOne
ClearDescription clears the value of the "description" field.
func (*HIBPUpdateOne) ClearLogoPath ¶
func (huo *HIBPUpdateOne) ClearLogoPath() *HIBPUpdateOne
ClearLogoPath clears the value of the "logo_path" field.
func (*HIBPUpdateOne) ClearTrackedBreaches ¶
func (huo *HIBPUpdateOne) ClearTrackedBreaches() *HIBPUpdateOne
ClearTrackedBreaches clears the "tracked_breaches" edge to the TrackedBreaches entity.
func (*HIBPUpdateOne) Exec ¶
func (huo *HIBPUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HIBPUpdateOne) ExecX ¶
func (huo *HIBPUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HIBPUpdateOne) Mutation ¶
func (huo *HIBPUpdateOne) Mutation() *HIBPMutation
Mutation returns the HIBPMutation object of the builder.
func (*HIBPUpdateOne) Save ¶
func (huo *HIBPUpdateOne) Save(ctx context.Context) (*HIBP, error)
Save executes the query and returns the updated HIBP entity.
func (*HIBPUpdateOne) SaveX ¶
func (huo *HIBPUpdateOne) SaveX(ctx context.Context) *HIBP
SaveX is like Save, but panics if an error occurs.
func (*HIBPUpdateOne) Select ¶
func (huo *HIBPUpdateOne) Select(field string, fields ...string) *HIBPUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HIBPUpdateOne) SetAddedDate ¶
func (huo *HIBPUpdateOne) SetAddedDate(t time.Time) *HIBPUpdateOne
SetAddedDate sets the "added_date" field.
func (*HIBPUpdateOne) SetBreachDate ¶
func (huo *HIBPUpdateOne) SetBreachDate(s string) *HIBPUpdateOne
SetBreachDate sets the "breach_date" field.
func (*HIBPUpdateOne) SetDataclasses ¶
func (huo *HIBPUpdateOne) SetDataclasses(s []string) *HIBPUpdateOne
SetDataclasses sets the "dataclasses" field.
func (*HIBPUpdateOne) SetDescription ¶
func (huo *HIBPUpdateOne) SetDescription(s string) *HIBPUpdateOne
SetDescription sets the "description" field.
func (*HIBPUpdateOne) SetIsFabricated ¶
func (huo *HIBPUpdateOne) SetIsFabricated(b bool) *HIBPUpdateOne
SetIsFabricated sets the "is_fabricated" field.
func (*HIBPUpdateOne) SetIsMalware ¶
func (huo *HIBPUpdateOne) SetIsMalware(b bool) *HIBPUpdateOne
SetIsMalware sets the "is_malware" field.
func (*HIBPUpdateOne) SetIsRetired ¶
func (huo *HIBPUpdateOne) SetIsRetired(b bool) *HIBPUpdateOne
SetIsRetired sets the "is_retired" field.
func (*HIBPUpdateOne) SetIsSensitive ¶
func (huo *HIBPUpdateOne) SetIsSensitive(b bool) *HIBPUpdateOne
SetIsSensitive sets the "is_sensitive" field.
func (*HIBPUpdateOne) SetIsSpamList ¶
func (huo *HIBPUpdateOne) SetIsSpamList(b bool) *HIBPUpdateOne
SetIsSpamList sets the "is_spamList" field.
func (*HIBPUpdateOne) SetIsVerified ¶
func (huo *HIBPUpdateOne) SetIsVerified(b bool) *HIBPUpdateOne
SetIsVerified sets the "is_verified" field.
func (*HIBPUpdateOne) SetLogoPath ¶
func (huo *HIBPUpdateOne) SetLogoPath(s string) *HIBPUpdateOne
SetLogoPath sets the "logo_path" field.
func (*HIBPUpdateOne) SetModifiedDate ¶
func (huo *HIBPUpdateOne) SetModifiedDate(t time.Time) *HIBPUpdateOne
SetModifiedDate sets the "modified_date" field.
func (*HIBPUpdateOne) SetNillableDescription ¶
func (huo *HIBPUpdateOne) SetNillableDescription(s *string) *HIBPUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*HIBPUpdateOne) SetNillableIsFabricated ¶
func (huo *HIBPUpdateOne) SetNillableIsFabricated(b *bool) *HIBPUpdateOne
SetNillableIsFabricated sets the "is_fabricated" field if the given value is not nil.
func (*HIBPUpdateOne) SetNillableIsMalware ¶
func (huo *HIBPUpdateOne) SetNillableIsMalware(b *bool) *HIBPUpdateOne
SetNillableIsMalware sets the "is_malware" field if the given value is not nil.
func (*HIBPUpdateOne) SetNillableIsRetired ¶
func (huo *HIBPUpdateOne) SetNillableIsRetired(b *bool) *HIBPUpdateOne
SetNillableIsRetired sets the "is_retired" field if the given value is not nil.
func (*HIBPUpdateOne) SetNillableIsSensitive ¶
func (huo *HIBPUpdateOne) SetNillableIsSensitive(b *bool) *HIBPUpdateOne
SetNillableIsSensitive sets the "is_sensitive" field if the given value is not nil.
func (*HIBPUpdateOne) SetNillableIsSpamList ¶
func (huo *HIBPUpdateOne) SetNillableIsSpamList(b *bool) *HIBPUpdateOne
SetNillableIsSpamList sets the "is_spamList" field if the given value is not nil.
func (*HIBPUpdateOne) SetNillableIsVerified ¶
func (huo *HIBPUpdateOne) SetNillableIsVerified(b *bool) *HIBPUpdateOne
SetNillableIsVerified sets the "is_verified" field if the given value is not nil.
func (*HIBPUpdateOne) SetNillableLogoPath ¶
func (huo *HIBPUpdateOne) SetNillableLogoPath(s *string) *HIBPUpdateOne
SetNillableLogoPath sets the "logo_path" field if the given value is not nil.
func (*HIBPUpdateOne) SetNillableTrackedBreachesID ¶
func (huo *HIBPUpdateOne) SetNillableTrackedBreachesID(id *uuid.UUID) *HIBPUpdateOne
SetNillableTrackedBreachesID sets the "tracked_breaches" edge to the TrackedBreaches entity by ID if the given value is not nil.
func (*HIBPUpdateOne) SetPwnCount ¶
func (huo *HIBPUpdateOne) SetPwnCount(i int) *HIBPUpdateOne
SetPwnCount sets the "pwn_count" field.
func (*HIBPUpdateOne) SetTitle ¶
func (huo *HIBPUpdateOne) SetTitle(s string) *HIBPUpdateOne
SetTitle sets the "title" field.
func (*HIBPUpdateOne) SetTrackedBreaches ¶
func (huo *HIBPUpdateOne) SetTrackedBreaches(t *TrackedBreaches) *HIBPUpdateOne
SetTrackedBreaches sets the "tracked_breaches" edge to the TrackedBreaches entity.
func (*HIBPUpdateOne) SetTrackedBreachesID ¶
func (huo *HIBPUpdateOne) SetTrackedBreachesID(id uuid.UUID) *HIBPUpdateOne
SetTrackedBreachesID sets the "tracked_breaches" edge to the TrackedBreaches entity by ID.
func (*HIBPUpdateOne) Where ¶
func (huo *HIBPUpdateOne) Where(ps ...predicate.HIBP) *HIBPUpdateOne
Where appends a list predicates to the HIBPUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type LocalBreach ¶
type LocalBreach struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Date holds the value of the "date" field. Date time.Time `json:"date,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // IsVerified holds the value of the "is_verified" field. IsVerified bool `json:"is_verified,omitempty"` // ContainsPasswords holds the value of the "contains_passwords" field. ContainsPasswords bool `json:"contains_passwords,omitempty"` // ContainsHashes holds the value of the "contains_hashes" field. ContainsHashes bool `json:"contains_hashes,omitempty"` // ContainsEmails holds the value of the "contains_emails" field. ContainsEmails bool `json:"contains_emails,omitempty"` // ContainsUsernames holds the value of the "contains_usernames" field. ContainsUsernames bool `json:"contains_usernames,omitempty"` // MD5, SHA1, Argon2id... HashType *string `json:"hash_type,omitempty"` // HashSalted holds the value of the "hash_salted" field. HashSalted *bool `json:"hash_salted,omitempty"` // HashPeppered holds the value of the "hash_peppered" field. HashPeppered *bool `json:"hash_peppered,omitempty"` // Data holds the value of the "data" field. Data *schema.Data `json:"data,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the LocalBreachQuery when eager-loading is set. Edges LocalBreachEdges `json:"edges"` // contains filtered or unexported fields }
LocalBreach is the model entity for the LocalBreach schema.
func (*LocalBreach) QueryTrackedBreaches ¶
func (lb *LocalBreach) QueryTrackedBreaches() *TrackedBreachesQuery
QueryTrackedBreaches queries the "tracked_breaches" edge of the LocalBreach entity.
func (*LocalBreach) String ¶
func (lb *LocalBreach) String() string
String implements the fmt.Stringer.
func (*LocalBreach) Unwrap ¶
func (lb *LocalBreach) Unwrap() *LocalBreach
Unwrap unwraps the LocalBreach 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 (*LocalBreach) Update ¶
func (lb *LocalBreach) Update() *LocalBreachUpdateOne
Update returns a builder for updating this LocalBreach. Note that you need to call LocalBreach.Unwrap() before calling this method if this LocalBreach was returned from a transaction, and the transaction was committed or rolled back.
type LocalBreachClient ¶
type LocalBreachClient struct {
// contains filtered or unexported fields
}
LocalBreachClient is a client for the LocalBreach schema.
func NewLocalBreachClient ¶
func NewLocalBreachClient(c config) *LocalBreachClient
NewLocalBreachClient returns a client for the LocalBreach from the given config.
func (*LocalBreachClient) Create ¶
func (c *LocalBreachClient) Create() *LocalBreachCreate
Create returns a builder for creating a LocalBreach entity.
func (*LocalBreachClient) CreateBulk ¶
func (c *LocalBreachClient) CreateBulk(builders ...*LocalBreachCreate) *LocalBreachCreateBulk
CreateBulk returns a builder for creating a bulk of LocalBreach entities.
func (*LocalBreachClient) Delete ¶
func (c *LocalBreachClient) Delete() *LocalBreachDelete
Delete returns a delete builder for LocalBreach.
func (*LocalBreachClient) DeleteOne ¶
func (c *LocalBreachClient) DeleteOne(lb *LocalBreach) *LocalBreachDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LocalBreachClient) DeleteOneID ¶
func (c *LocalBreachClient) DeleteOneID(id uuid.UUID) *LocalBreachDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LocalBreachClient) Get ¶
func (c *LocalBreachClient) Get(ctx context.Context, id uuid.UUID) (*LocalBreach, error)
Get returns a LocalBreach entity by its id.
func (*LocalBreachClient) GetX ¶
func (c *LocalBreachClient) GetX(ctx context.Context, id uuid.UUID) *LocalBreach
GetX is like Get, but panics if an error occurs.
func (*LocalBreachClient) Hooks ¶
func (c *LocalBreachClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LocalBreachClient) Intercept ¶
func (c *LocalBreachClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `localbreach.Intercept(f(g(h())))`.
func (*LocalBreachClient) Interceptors ¶
func (c *LocalBreachClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LocalBreachClient) Query ¶
func (c *LocalBreachClient) Query() *LocalBreachQuery
Query returns a query builder for LocalBreach.
func (*LocalBreachClient) QueryTrackedBreaches ¶
func (c *LocalBreachClient) QueryTrackedBreaches(lb *LocalBreach) *TrackedBreachesQuery
QueryTrackedBreaches queries the tracked_breaches edge of a LocalBreach.
func (*LocalBreachClient) Update ¶
func (c *LocalBreachClient) Update() *LocalBreachUpdate
Update returns an update builder for LocalBreach.
func (*LocalBreachClient) UpdateOne ¶
func (c *LocalBreachClient) UpdateOne(lb *LocalBreach) *LocalBreachUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LocalBreachClient) UpdateOneID ¶
func (c *LocalBreachClient) UpdateOneID(id uuid.UUID) *LocalBreachUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LocalBreachClient) Use ¶
func (c *LocalBreachClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `localbreach.Hooks(f(g(h())))`.
type LocalBreachCreate ¶
type LocalBreachCreate struct {
// contains filtered or unexported fields
}
LocalBreachCreate is the builder for creating a LocalBreach entity.
func (*LocalBreachCreate) AddTrackedBreachIDs ¶
func (lbc *LocalBreachCreate) AddTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachCreate
AddTrackedBreachIDs adds the "tracked_breaches" edge to the TrackedBreaches entity by IDs.
func (*LocalBreachCreate) AddTrackedBreaches ¶
func (lbc *LocalBreachCreate) AddTrackedBreaches(t ...*TrackedBreaches) *LocalBreachCreate
AddTrackedBreaches adds the "tracked_breaches" edges to the TrackedBreaches entity.
func (*LocalBreachCreate) Exec ¶
func (lbc *LocalBreachCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocalBreachCreate) ExecX ¶
func (lbc *LocalBreachCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocalBreachCreate) Mutation ¶
func (lbc *LocalBreachCreate) Mutation() *LocalBreachMutation
Mutation returns the LocalBreachMutation object of the builder.
func (*LocalBreachCreate) Save ¶
func (lbc *LocalBreachCreate) Save(ctx context.Context) (*LocalBreach, error)
Save creates the LocalBreach in the database.
func (*LocalBreachCreate) SaveX ¶
func (lbc *LocalBreachCreate) SaveX(ctx context.Context) *LocalBreach
SaveX calls Save and panics if Save returns an error.
func (*LocalBreachCreate) SetContainsEmails ¶
func (lbc *LocalBreachCreate) SetContainsEmails(b bool) *LocalBreachCreate
SetContainsEmails sets the "contains_emails" field.
func (*LocalBreachCreate) SetContainsHashes ¶
func (lbc *LocalBreachCreate) SetContainsHashes(b bool) *LocalBreachCreate
SetContainsHashes sets the "contains_hashes" field.
func (*LocalBreachCreate) SetContainsPasswords ¶
func (lbc *LocalBreachCreate) SetContainsPasswords(b bool) *LocalBreachCreate
SetContainsPasswords sets the "contains_passwords" field.
func (*LocalBreachCreate) SetContainsUsernames ¶
func (lbc *LocalBreachCreate) SetContainsUsernames(b bool) *LocalBreachCreate
SetContainsUsernames sets the "contains_usernames" field.
func (*LocalBreachCreate) SetCreatedAt ¶
func (lbc *LocalBreachCreate) SetCreatedAt(t time.Time) *LocalBreachCreate
SetCreatedAt sets the "created_at" field.
func (*LocalBreachCreate) SetData ¶
func (lbc *LocalBreachCreate) SetData(s *schema.Data) *LocalBreachCreate
SetData sets the "data" field.
func (*LocalBreachCreate) SetDate ¶
func (lbc *LocalBreachCreate) SetDate(t time.Time) *LocalBreachCreate
SetDate sets the "date" field.
func (*LocalBreachCreate) SetDescription ¶
func (lbc *LocalBreachCreate) SetDescription(s string) *LocalBreachCreate
SetDescription sets the "description" field.
func (*LocalBreachCreate) SetHashPeppered ¶
func (lbc *LocalBreachCreate) SetHashPeppered(b bool) *LocalBreachCreate
SetHashPeppered sets the "hash_peppered" field.
func (*LocalBreachCreate) SetHashSalted ¶
func (lbc *LocalBreachCreate) SetHashSalted(b bool) *LocalBreachCreate
SetHashSalted sets the "hash_salted" field.
func (*LocalBreachCreate) SetHashType ¶
func (lbc *LocalBreachCreate) SetHashType(s string) *LocalBreachCreate
SetHashType sets the "hash_type" field.
func (*LocalBreachCreate) SetID ¶
func (lbc *LocalBreachCreate) SetID(u uuid.UUID) *LocalBreachCreate
SetID sets the "id" field.
func (*LocalBreachCreate) SetIsVerified ¶
func (lbc *LocalBreachCreate) SetIsVerified(b bool) *LocalBreachCreate
SetIsVerified sets the "is_verified" field.
func (*LocalBreachCreate) SetName ¶
func (lbc *LocalBreachCreate) SetName(s string) *LocalBreachCreate
SetName sets the "name" field.
func (*LocalBreachCreate) SetNillableCreatedAt ¶
func (lbc *LocalBreachCreate) SetNillableCreatedAt(t *time.Time) *LocalBreachCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LocalBreachCreate) SetNillableDate ¶
func (lbc *LocalBreachCreate) SetNillableDate(t *time.Time) *LocalBreachCreate
SetNillableDate sets the "date" field if the given value is not nil.
func (*LocalBreachCreate) SetNillableDescription ¶
func (lbc *LocalBreachCreate) SetNillableDescription(s *string) *LocalBreachCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LocalBreachCreate) SetNillableHashPeppered ¶
func (lbc *LocalBreachCreate) SetNillableHashPeppered(b *bool) *LocalBreachCreate
SetNillableHashPeppered sets the "hash_peppered" field if the given value is not nil.
func (*LocalBreachCreate) SetNillableHashSalted ¶
func (lbc *LocalBreachCreate) SetNillableHashSalted(b *bool) *LocalBreachCreate
SetNillableHashSalted sets the "hash_salted" field if the given value is not nil.
func (*LocalBreachCreate) SetNillableHashType ¶
func (lbc *LocalBreachCreate) SetNillableHashType(s *string) *LocalBreachCreate
SetNillableHashType sets the "hash_type" field if the given value is not nil.
func (*LocalBreachCreate) SetNillableID ¶
func (lbc *LocalBreachCreate) SetNillableID(u *uuid.UUID) *LocalBreachCreate
SetNillableID sets the "id" field if the given value is not nil.
type LocalBreachCreateBulk ¶
type LocalBreachCreateBulk struct {
// contains filtered or unexported fields
}
LocalBreachCreateBulk is the builder for creating many LocalBreach entities in bulk.
func (*LocalBreachCreateBulk) Exec ¶
func (lbcb *LocalBreachCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LocalBreachCreateBulk) ExecX ¶
func (lbcb *LocalBreachCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocalBreachCreateBulk) Save ¶
func (lbcb *LocalBreachCreateBulk) Save(ctx context.Context) ([]*LocalBreach, error)
Save creates the LocalBreach entities in the database.
func (*LocalBreachCreateBulk) SaveX ¶
func (lbcb *LocalBreachCreateBulk) SaveX(ctx context.Context) []*LocalBreach
SaveX is like Save, but panics if an error occurs.
type LocalBreachDelete ¶
type LocalBreachDelete struct {
// contains filtered or unexported fields
}
LocalBreachDelete is the builder for deleting a LocalBreach entity.
func (*LocalBreachDelete) Exec ¶
func (lbd *LocalBreachDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LocalBreachDelete) ExecX ¶
func (lbd *LocalBreachDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LocalBreachDelete) Where ¶
func (lbd *LocalBreachDelete) Where(ps ...predicate.LocalBreach) *LocalBreachDelete
Where appends a list predicates to the LocalBreachDelete builder.
type LocalBreachDeleteOne ¶
type LocalBreachDeleteOne struct {
// contains filtered or unexported fields
}
LocalBreachDeleteOne is the builder for deleting a single LocalBreach entity.
func (*LocalBreachDeleteOne) Exec ¶
func (lbdo *LocalBreachDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LocalBreachDeleteOne) ExecX ¶
func (lbdo *LocalBreachDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocalBreachDeleteOne) Where ¶
func (lbdo *LocalBreachDeleteOne) Where(ps ...predicate.LocalBreach) *LocalBreachDeleteOne
Where appends a list predicates to the LocalBreachDelete builder.
type LocalBreachEdges ¶
type LocalBreachEdges struct { // TrackedBreaches holds the value of the tracked_breaches edge. TrackedBreaches []*TrackedBreaches `json:"tracked_breaches,omitempty"` // contains filtered or unexported fields }
LocalBreachEdges holds the relations/edges for other nodes in the graph.
func (LocalBreachEdges) TrackedBreachesOrErr ¶
func (e LocalBreachEdges) TrackedBreachesOrErr() ([]*TrackedBreaches, error)
TrackedBreachesOrErr returns the TrackedBreaches value or an error if the edge was not loaded in eager-loading.
type LocalBreachGroupBy ¶
type LocalBreachGroupBy struct {
// contains filtered or unexported fields
}
LocalBreachGroupBy is the group-by builder for LocalBreach entities.
func (*LocalBreachGroupBy) Aggregate ¶
func (lbgb *LocalBreachGroupBy) Aggregate(fns ...AggregateFunc) *LocalBreachGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LocalBreachGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocalBreachGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocalBreachGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocalBreachGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocalBreachGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocalBreachGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocalBreachGroupBy) Scan ¶
func (lbgb *LocalBreachGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocalBreachGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocalBreachMutation ¶
type LocalBreachMutation struct {
// contains filtered or unexported fields
}
LocalBreachMutation represents an operation that mutates the LocalBreach nodes in the graph.
func (*LocalBreachMutation) AddField ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) AddTrackedBreachIDs ¶
func (m *LocalBreachMutation) AddTrackedBreachIDs(ids ...uuid.UUID)
AddTrackedBreachIDs adds the "tracked_breaches" edge to the TrackedBreaches entity by ids.
func (*LocalBreachMutation) AddedEdges ¶
func (m *LocalBreachMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LocalBreachMutation) AddedField ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) AddedFields ¶
func (m *LocalBreachMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LocalBreachMutation) AddedIDs ¶
func (m *LocalBreachMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LocalBreachMutation) ClearData ¶
func (m *LocalBreachMutation) ClearData()
ClearData clears the value of the "data" field.
func (*LocalBreachMutation) ClearDescription ¶
func (m *LocalBreachMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*LocalBreachMutation) ClearEdge ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) ClearField ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) ClearHashPeppered ¶
func (m *LocalBreachMutation) ClearHashPeppered()
ClearHashPeppered clears the value of the "hash_peppered" field.
func (*LocalBreachMutation) ClearHashSalted ¶
func (m *LocalBreachMutation) ClearHashSalted()
ClearHashSalted clears the value of the "hash_salted" field.
func (*LocalBreachMutation) ClearHashType ¶
func (m *LocalBreachMutation) ClearHashType()
ClearHashType clears the value of the "hash_type" field.
func (*LocalBreachMutation) ClearTrackedBreaches ¶
func (m *LocalBreachMutation) ClearTrackedBreaches()
ClearTrackedBreaches clears the "tracked_breaches" edge to the TrackedBreaches entity.
func (*LocalBreachMutation) ClearedEdges ¶
func (m *LocalBreachMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LocalBreachMutation) ClearedFields ¶
func (m *LocalBreachMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LocalBreachMutation) Client ¶
func (m LocalBreachMutation) 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 (*LocalBreachMutation) ContainsEmails ¶
func (m *LocalBreachMutation) ContainsEmails() (r bool, exists bool)
ContainsEmails returns the value of the "contains_emails" field in the mutation.
func (*LocalBreachMutation) ContainsHashes ¶
func (m *LocalBreachMutation) ContainsHashes() (r bool, exists bool)
ContainsHashes returns the value of the "contains_hashes" field in the mutation.
func (*LocalBreachMutation) ContainsPasswords ¶
func (m *LocalBreachMutation) ContainsPasswords() (r bool, exists bool)
ContainsPasswords returns the value of the "contains_passwords" field in the mutation.
func (*LocalBreachMutation) ContainsUsernames ¶
func (m *LocalBreachMutation) ContainsUsernames() (r bool, exists bool)
ContainsUsernames returns the value of the "contains_usernames" field in the mutation.
func (*LocalBreachMutation) CreatedAt ¶
func (m *LocalBreachMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*LocalBreachMutation) Data ¶
func (m *LocalBreachMutation) Data() (r *schema.Data, exists bool)
Data returns the value of the "data" field in the mutation.
func (*LocalBreachMutation) DataCleared ¶
func (m *LocalBreachMutation) DataCleared() bool
DataCleared returns if the "data" field was cleared in this mutation.
func (*LocalBreachMutation) Date ¶
func (m *LocalBreachMutation) Date() (r time.Time, exists bool)
Date returns the value of the "date" field in the mutation.
func (*LocalBreachMutation) Description ¶
func (m *LocalBreachMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*LocalBreachMutation) DescriptionCleared ¶
func (m *LocalBreachMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*LocalBreachMutation) EdgeCleared ¶
func (m *LocalBreachMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LocalBreachMutation) Field ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) FieldCleared ¶
func (m *LocalBreachMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LocalBreachMutation) Fields ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) HashPeppered ¶
func (m *LocalBreachMutation) HashPeppered() (r bool, exists bool)
HashPeppered returns the value of the "hash_peppered" field in the mutation.
func (*LocalBreachMutation) HashPepperedCleared ¶
func (m *LocalBreachMutation) HashPepperedCleared() bool
HashPepperedCleared returns if the "hash_peppered" field was cleared in this mutation.
func (*LocalBreachMutation) HashSalted ¶
func (m *LocalBreachMutation) HashSalted() (r bool, exists bool)
HashSalted returns the value of the "hash_salted" field in the mutation.
func (*LocalBreachMutation) HashSaltedCleared ¶
func (m *LocalBreachMutation) HashSaltedCleared() bool
HashSaltedCleared returns if the "hash_salted" field was cleared in this mutation.
func (*LocalBreachMutation) HashType ¶
func (m *LocalBreachMutation) HashType() (r string, exists bool)
HashType returns the value of the "hash_type" field in the mutation.
func (*LocalBreachMutation) HashTypeCleared ¶
func (m *LocalBreachMutation) HashTypeCleared() bool
HashTypeCleared returns if the "hash_type" field was cleared in this mutation.
func (*LocalBreachMutation) ID ¶
func (m *LocalBreachMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*LocalBreachMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LocalBreachMutation) IsVerified ¶
func (m *LocalBreachMutation) IsVerified() (r bool, exists bool)
IsVerified returns the value of the "is_verified" field in the mutation.
func (*LocalBreachMutation) Name ¶
func (m *LocalBreachMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*LocalBreachMutation) OldContainsEmails ¶
func (m *LocalBreachMutation) OldContainsEmails(ctx context.Context) (v bool, err error)
OldContainsEmails returns the old "contains_emails" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldContainsHashes ¶
func (m *LocalBreachMutation) OldContainsHashes(ctx context.Context) (v bool, err error)
OldContainsHashes returns the old "contains_hashes" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldContainsPasswords ¶
func (m *LocalBreachMutation) OldContainsPasswords(ctx context.Context) (v bool, err error)
OldContainsPasswords returns the old "contains_passwords" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldContainsUsernames ¶
func (m *LocalBreachMutation) OldContainsUsernames(ctx context.Context) (v bool, err error)
OldContainsUsernames returns the old "contains_usernames" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldData ¶
OldData returns the old "data" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldDate ¶
OldDate returns the old "date" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldDescription ¶
func (m *LocalBreachMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) 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 (*LocalBreachMutation) OldHashPeppered ¶
func (m *LocalBreachMutation) OldHashPeppered(ctx context.Context) (v *bool, err error)
OldHashPeppered returns the old "hash_peppered" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldHashSalted ¶
func (m *LocalBreachMutation) OldHashSalted(ctx context.Context) (v *bool, err error)
OldHashSalted returns the old "hash_salted" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldHashType ¶
func (m *LocalBreachMutation) OldHashType(ctx context.Context) (v *string, err error)
OldHashType returns the old "hash_type" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldIsVerified ¶
func (m *LocalBreachMutation) OldIsVerified(ctx context.Context) (v bool, err error)
OldIsVerified returns the old "is_verified" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) OldName ¶
func (m *LocalBreachMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the LocalBreach entity. If the LocalBreach 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 (*LocalBreachMutation) Op ¶
func (m *LocalBreachMutation) Op() Op
Op returns the operation name.
func (*LocalBreachMutation) RemoveTrackedBreachIDs ¶
func (m *LocalBreachMutation) RemoveTrackedBreachIDs(ids ...uuid.UUID)
RemoveTrackedBreachIDs removes the "tracked_breaches" edge to the TrackedBreaches entity by IDs.
func (*LocalBreachMutation) RemovedEdges ¶
func (m *LocalBreachMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LocalBreachMutation) RemovedIDs ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) RemovedTrackedBreachesIDs ¶
func (m *LocalBreachMutation) RemovedTrackedBreachesIDs() (ids []uuid.UUID)
RemovedTrackedBreaches returns the removed IDs of the "tracked_breaches" edge to the TrackedBreaches entity.
func (*LocalBreachMutation) ResetContainsEmails ¶
func (m *LocalBreachMutation) ResetContainsEmails()
ResetContainsEmails resets all changes to the "contains_emails" field.
func (*LocalBreachMutation) ResetContainsHashes ¶
func (m *LocalBreachMutation) ResetContainsHashes()
ResetContainsHashes resets all changes to the "contains_hashes" field.
func (*LocalBreachMutation) ResetContainsPasswords ¶
func (m *LocalBreachMutation) ResetContainsPasswords()
ResetContainsPasswords resets all changes to the "contains_passwords" field.
func (*LocalBreachMutation) ResetContainsUsernames ¶
func (m *LocalBreachMutation) ResetContainsUsernames()
ResetContainsUsernames resets all changes to the "contains_usernames" field.
func (*LocalBreachMutation) ResetCreatedAt ¶
func (m *LocalBreachMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*LocalBreachMutation) ResetData ¶
func (m *LocalBreachMutation) ResetData()
ResetData resets all changes to the "data" field.
func (*LocalBreachMutation) ResetDate ¶
func (m *LocalBreachMutation) ResetDate()
ResetDate resets all changes to the "date" field.
func (*LocalBreachMutation) ResetDescription ¶
func (m *LocalBreachMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*LocalBreachMutation) ResetEdge ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) ResetField ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) ResetHashPeppered ¶
func (m *LocalBreachMutation) ResetHashPeppered()
ResetHashPeppered resets all changes to the "hash_peppered" field.
func (*LocalBreachMutation) ResetHashSalted ¶
func (m *LocalBreachMutation) ResetHashSalted()
ResetHashSalted resets all changes to the "hash_salted" field.
func (*LocalBreachMutation) ResetHashType ¶
func (m *LocalBreachMutation) ResetHashType()
ResetHashType resets all changes to the "hash_type" field.
func (*LocalBreachMutation) ResetIsVerified ¶
func (m *LocalBreachMutation) ResetIsVerified()
ResetIsVerified resets all changes to the "is_verified" field.
func (*LocalBreachMutation) ResetName ¶
func (m *LocalBreachMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*LocalBreachMutation) ResetTrackedBreaches ¶
func (m *LocalBreachMutation) ResetTrackedBreaches()
ResetTrackedBreaches resets all changes to the "tracked_breaches" edge.
func (*LocalBreachMutation) SetContainsEmails ¶
func (m *LocalBreachMutation) SetContainsEmails(b bool)
SetContainsEmails sets the "contains_emails" field.
func (*LocalBreachMutation) SetContainsHashes ¶
func (m *LocalBreachMutation) SetContainsHashes(b bool)
SetContainsHashes sets the "contains_hashes" field.
func (*LocalBreachMutation) SetContainsPasswords ¶
func (m *LocalBreachMutation) SetContainsPasswords(b bool)
SetContainsPasswords sets the "contains_passwords" field.
func (*LocalBreachMutation) SetContainsUsernames ¶
func (m *LocalBreachMutation) SetContainsUsernames(b bool)
SetContainsUsernames sets the "contains_usernames" field.
func (*LocalBreachMutation) SetCreatedAt ¶
func (m *LocalBreachMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*LocalBreachMutation) SetData ¶
func (m *LocalBreachMutation) SetData(s *schema.Data)
SetData sets the "data" field.
func (*LocalBreachMutation) SetDate ¶
func (m *LocalBreachMutation) SetDate(t time.Time)
SetDate sets the "date" field.
func (*LocalBreachMutation) SetDescription ¶
func (m *LocalBreachMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*LocalBreachMutation) SetField ¶
func (m *LocalBreachMutation) 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 (*LocalBreachMutation) SetHashPeppered ¶
func (m *LocalBreachMutation) SetHashPeppered(b bool)
SetHashPeppered sets the "hash_peppered" field.
func (*LocalBreachMutation) SetHashSalted ¶
func (m *LocalBreachMutation) SetHashSalted(b bool)
SetHashSalted sets the "hash_salted" field.
func (*LocalBreachMutation) SetHashType ¶
func (m *LocalBreachMutation) SetHashType(s string)
SetHashType sets the "hash_type" field.
func (*LocalBreachMutation) SetID ¶
func (m *LocalBreachMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of LocalBreach entities.
func (*LocalBreachMutation) SetIsVerified ¶
func (m *LocalBreachMutation) SetIsVerified(b bool)
SetIsVerified sets the "is_verified" field.
func (*LocalBreachMutation) SetName ¶
func (m *LocalBreachMutation) SetName(s string)
SetName sets the "name" field.
func (*LocalBreachMutation) SetOp ¶
func (m *LocalBreachMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LocalBreachMutation) TrackedBreachesCleared ¶
func (m *LocalBreachMutation) TrackedBreachesCleared() bool
TrackedBreachesCleared reports if the "tracked_breaches" edge to the TrackedBreaches entity was cleared.
func (*LocalBreachMutation) TrackedBreachesIDs ¶
func (m *LocalBreachMutation) TrackedBreachesIDs() (ids []uuid.UUID)
TrackedBreachesIDs returns the "tracked_breaches" edge IDs in the mutation.
func (LocalBreachMutation) Tx ¶
func (m LocalBreachMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LocalBreachMutation) Type ¶
func (m *LocalBreachMutation) Type() string
Type returns the node type of this mutation (LocalBreach).
func (*LocalBreachMutation) Where ¶
func (m *LocalBreachMutation) Where(ps ...predicate.LocalBreach)
Where appends a list predicates to the LocalBreachMutation builder.
func (*LocalBreachMutation) WhereP ¶
func (m *LocalBreachMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LocalBreachMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LocalBreachQuery ¶
type LocalBreachQuery struct {
// contains filtered or unexported fields
}
LocalBreachQuery is the builder for querying LocalBreach entities.
func (*LocalBreachQuery) Aggregate ¶
func (lbq *LocalBreachQuery) Aggregate(fns ...AggregateFunc) *LocalBreachSelect
Aggregate returns a LocalBreachSelect configured with the given aggregations.
func (*LocalBreachQuery) All ¶
func (lbq *LocalBreachQuery) All(ctx context.Context) ([]*LocalBreach, error)
All executes the query and returns a list of LocalBreaches.
func (*LocalBreachQuery) AllX ¶
func (lbq *LocalBreachQuery) AllX(ctx context.Context) []*LocalBreach
AllX is like All, but panics if an error occurs.
func (*LocalBreachQuery) Clone ¶
func (lbq *LocalBreachQuery) Clone() *LocalBreachQuery
Clone returns a duplicate of the LocalBreachQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LocalBreachQuery) Count ¶
func (lbq *LocalBreachQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LocalBreachQuery) CountX ¶
func (lbq *LocalBreachQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LocalBreachQuery) Exist ¶
func (lbq *LocalBreachQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LocalBreachQuery) ExistX ¶
func (lbq *LocalBreachQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LocalBreachQuery) First ¶
func (lbq *LocalBreachQuery) First(ctx context.Context) (*LocalBreach, error)
First returns the first LocalBreach entity from the query. Returns a *NotFoundError when no LocalBreach was found.
func (*LocalBreachQuery) FirstID ¶
FirstID returns the first LocalBreach ID from the query. Returns a *NotFoundError when no LocalBreach ID was found.
func (*LocalBreachQuery) FirstIDX ¶
func (lbq *LocalBreachQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*LocalBreachQuery) FirstX ¶
func (lbq *LocalBreachQuery) FirstX(ctx context.Context) *LocalBreach
FirstX is like First, but panics if an error occurs.
func (*LocalBreachQuery) GroupBy ¶
func (lbq *LocalBreachQuery) GroupBy(field string, fields ...string) *LocalBreachGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.LocalBreach.Query(). GroupBy(localbreach.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LocalBreachQuery) IDsX ¶
func (lbq *LocalBreachQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*LocalBreachQuery) Limit ¶
func (lbq *LocalBreachQuery) Limit(limit int) *LocalBreachQuery
Limit the number of records to be returned by this query.
func (*LocalBreachQuery) Offset ¶
func (lbq *LocalBreachQuery) Offset(offset int) *LocalBreachQuery
Offset to start from.
func (*LocalBreachQuery) Only ¶
func (lbq *LocalBreachQuery) Only(ctx context.Context) (*LocalBreach, error)
Only returns a single LocalBreach entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one LocalBreach entity is found. Returns a *NotFoundError when no LocalBreach entities are found.
func (*LocalBreachQuery) OnlyID ¶
OnlyID is like Only, but returns the only LocalBreach ID in the query. Returns a *NotSingularError when more than one LocalBreach ID is found. Returns a *NotFoundError when no entities are found.
func (*LocalBreachQuery) OnlyIDX ¶
func (lbq *LocalBreachQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LocalBreachQuery) OnlyX ¶
func (lbq *LocalBreachQuery) OnlyX(ctx context.Context) *LocalBreach
OnlyX is like Only, but panics if an error occurs.
func (*LocalBreachQuery) Order ¶
func (lbq *LocalBreachQuery) Order(o ...localbreach.OrderOption) *LocalBreachQuery
Order specifies how the records should be ordered.
func (*LocalBreachQuery) QueryTrackedBreaches ¶
func (lbq *LocalBreachQuery) QueryTrackedBreaches() *TrackedBreachesQuery
QueryTrackedBreaches chains the current query on the "tracked_breaches" edge.
func (*LocalBreachQuery) Select ¶
func (lbq *LocalBreachQuery) Select(fields ...string) *LocalBreachSelect
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 { Name string `json:"name,omitempty"` } client.LocalBreach.Query(). Select(localbreach.FieldName). Scan(ctx, &v)
func (*LocalBreachQuery) Unique ¶
func (lbq *LocalBreachQuery) Unique(unique bool) *LocalBreachQuery
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 (*LocalBreachQuery) Where ¶
func (lbq *LocalBreachQuery) Where(ps ...predicate.LocalBreach) *LocalBreachQuery
Where adds a new predicate for the LocalBreachQuery builder.
func (*LocalBreachQuery) WithTrackedBreaches ¶
func (lbq *LocalBreachQuery) WithTrackedBreaches(opts ...func(*TrackedBreachesQuery)) *LocalBreachQuery
WithTrackedBreaches tells the query-builder to eager-load the nodes that are connected to the "tracked_breaches" edge. The optional arguments are used to configure the query builder of the edge.
type LocalBreachSelect ¶
type LocalBreachSelect struct { *LocalBreachQuery // contains filtered or unexported fields }
LocalBreachSelect is the builder for selecting fields of LocalBreach entities.
func (*LocalBreachSelect) Aggregate ¶
func (lbs *LocalBreachSelect) Aggregate(fns ...AggregateFunc) *LocalBreachSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LocalBreachSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocalBreachSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocalBreachSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocalBreachSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocalBreachSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocalBreachSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocalBreachSelect) Scan ¶
func (lbs *LocalBreachSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocalBreachSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocalBreachUpdate ¶
type LocalBreachUpdate struct {
// contains filtered or unexported fields
}
LocalBreachUpdate is the builder for updating LocalBreach entities.
func (*LocalBreachUpdate) AddTrackedBreachIDs ¶
func (lbu *LocalBreachUpdate) AddTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachUpdate
AddTrackedBreachIDs adds the "tracked_breaches" edge to the TrackedBreaches entity by IDs.
func (*LocalBreachUpdate) AddTrackedBreaches ¶
func (lbu *LocalBreachUpdate) AddTrackedBreaches(t ...*TrackedBreaches) *LocalBreachUpdate
AddTrackedBreaches adds the "tracked_breaches" edges to the TrackedBreaches entity.
func (*LocalBreachUpdate) ClearData ¶
func (lbu *LocalBreachUpdate) ClearData() *LocalBreachUpdate
ClearData clears the value of the "data" field.
func (*LocalBreachUpdate) ClearDescription ¶
func (lbu *LocalBreachUpdate) ClearDescription() *LocalBreachUpdate
ClearDescription clears the value of the "description" field.
func (*LocalBreachUpdate) ClearHashPeppered ¶
func (lbu *LocalBreachUpdate) ClearHashPeppered() *LocalBreachUpdate
ClearHashPeppered clears the value of the "hash_peppered" field.
func (*LocalBreachUpdate) ClearHashSalted ¶
func (lbu *LocalBreachUpdate) ClearHashSalted() *LocalBreachUpdate
ClearHashSalted clears the value of the "hash_salted" field.
func (*LocalBreachUpdate) ClearHashType ¶
func (lbu *LocalBreachUpdate) ClearHashType() *LocalBreachUpdate
ClearHashType clears the value of the "hash_type" field.
func (*LocalBreachUpdate) ClearTrackedBreaches ¶
func (lbu *LocalBreachUpdate) ClearTrackedBreaches() *LocalBreachUpdate
ClearTrackedBreaches clears all "tracked_breaches" edges to the TrackedBreaches entity.
func (*LocalBreachUpdate) Exec ¶
func (lbu *LocalBreachUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocalBreachUpdate) ExecX ¶
func (lbu *LocalBreachUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocalBreachUpdate) Mutation ¶
func (lbu *LocalBreachUpdate) Mutation() *LocalBreachMutation
Mutation returns the LocalBreachMutation object of the builder.
func (*LocalBreachUpdate) RemoveTrackedBreachIDs ¶
func (lbu *LocalBreachUpdate) RemoveTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachUpdate
RemoveTrackedBreachIDs removes the "tracked_breaches" edge to TrackedBreaches entities by IDs.
func (*LocalBreachUpdate) RemoveTrackedBreaches ¶
func (lbu *LocalBreachUpdate) RemoveTrackedBreaches(t ...*TrackedBreaches) *LocalBreachUpdate
RemoveTrackedBreaches removes "tracked_breaches" edges to TrackedBreaches entities.
func (*LocalBreachUpdate) Save ¶
func (lbu *LocalBreachUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LocalBreachUpdate) SaveX ¶
func (lbu *LocalBreachUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LocalBreachUpdate) SetContainsEmails ¶
func (lbu *LocalBreachUpdate) SetContainsEmails(b bool) *LocalBreachUpdate
SetContainsEmails sets the "contains_emails" field.
func (*LocalBreachUpdate) SetContainsHashes ¶
func (lbu *LocalBreachUpdate) SetContainsHashes(b bool) *LocalBreachUpdate
SetContainsHashes sets the "contains_hashes" field.
func (*LocalBreachUpdate) SetContainsPasswords ¶
func (lbu *LocalBreachUpdate) SetContainsPasswords(b bool) *LocalBreachUpdate
SetContainsPasswords sets the "contains_passwords" field.
func (*LocalBreachUpdate) SetContainsUsernames ¶
func (lbu *LocalBreachUpdate) SetContainsUsernames(b bool) *LocalBreachUpdate
SetContainsUsernames sets the "contains_usernames" field.
func (*LocalBreachUpdate) SetData ¶
func (lbu *LocalBreachUpdate) SetData(s *schema.Data) *LocalBreachUpdate
SetData sets the "data" field.
func (*LocalBreachUpdate) SetDate ¶
func (lbu *LocalBreachUpdate) SetDate(t time.Time) *LocalBreachUpdate
SetDate sets the "date" field.
func (*LocalBreachUpdate) SetDescription ¶
func (lbu *LocalBreachUpdate) SetDescription(s string) *LocalBreachUpdate
SetDescription sets the "description" field.
func (*LocalBreachUpdate) SetHashPeppered ¶
func (lbu *LocalBreachUpdate) SetHashPeppered(b bool) *LocalBreachUpdate
SetHashPeppered sets the "hash_peppered" field.
func (*LocalBreachUpdate) SetHashSalted ¶
func (lbu *LocalBreachUpdate) SetHashSalted(b bool) *LocalBreachUpdate
SetHashSalted sets the "hash_salted" field.
func (*LocalBreachUpdate) SetHashType ¶
func (lbu *LocalBreachUpdate) SetHashType(s string) *LocalBreachUpdate
SetHashType sets the "hash_type" field.
func (*LocalBreachUpdate) SetIsVerified ¶
func (lbu *LocalBreachUpdate) SetIsVerified(b bool) *LocalBreachUpdate
SetIsVerified sets the "is_verified" field.
func (*LocalBreachUpdate) SetName ¶
func (lbu *LocalBreachUpdate) SetName(s string) *LocalBreachUpdate
SetName sets the "name" field.
func (*LocalBreachUpdate) SetNillableDate ¶
func (lbu *LocalBreachUpdate) SetNillableDate(t *time.Time) *LocalBreachUpdate
SetNillableDate sets the "date" field if the given value is not nil.
func (*LocalBreachUpdate) SetNillableDescription ¶
func (lbu *LocalBreachUpdate) SetNillableDescription(s *string) *LocalBreachUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LocalBreachUpdate) SetNillableHashPeppered ¶
func (lbu *LocalBreachUpdate) SetNillableHashPeppered(b *bool) *LocalBreachUpdate
SetNillableHashPeppered sets the "hash_peppered" field if the given value is not nil.
func (*LocalBreachUpdate) SetNillableHashSalted ¶
func (lbu *LocalBreachUpdate) SetNillableHashSalted(b *bool) *LocalBreachUpdate
SetNillableHashSalted sets the "hash_salted" field if the given value is not nil.
func (*LocalBreachUpdate) SetNillableHashType ¶
func (lbu *LocalBreachUpdate) SetNillableHashType(s *string) *LocalBreachUpdate
SetNillableHashType sets the "hash_type" field if the given value is not nil.
func (*LocalBreachUpdate) Where ¶
func (lbu *LocalBreachUpdate) Where(ps ...predicate.LocalBreach) *LocalBreachUpdate
Where appends a list predicates to the LocalBreachUpdate builder.
type LocalBreachUpdateOne ¶
type LocalBreachUpdateOne struct {
// contains filtered or unexported fields
}
LocalBreachUpdateOne is the builder for updating a single LocalBreach entity.
func (*LocalBreachUpdateOne) AddTrackedBreachIDs ¶
func (lbuo *LocalBreachUpdateOne) AddTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachUpdateOne
AddTrackedBreachIDs adds the "tracked_breaches" edge to the TrackedBreaches entity by IDs.
func (*LocalBreachUpdateOne) AddTrackedBreaches ¶
func (lbuo *LocalBreachUpdateOne) AddTrackedBreaches(t ...*TrackedBreaches) *LocalBreachUpdateOne
AddTrackedBreaches adds the "tracked_breaches" edges to the TrackedBreaches entity.
func (*LocalBreachUpdateOne) ClearData ¶
func (lbuo *LocalBreachUpdateOne) ClearData() *LocalBreachUpdateOne
ClearData clears the value of the "data" field.
func (*LocalBreachUpdateOne) ClearDescription ¶
func (lbuo *LocalBreachUpdateOne) ClearDescription() *LocalBreachUpdateOne
ClearDescription clears the value of the "description" field.
func (*LocalBreachUpdateOne) ClearHashPeppered ¶
func (lbuo *LocalBreachUpdateOne) ClearHashPeppered() *LocalBreachUpdateOne
ClearHashPeppered clears the value of the "hash_peppered" field.
func (*LocalBreachUpdateOne) ClearHashSalted ¶
func (lbuo *LocalBreachUpdateOne) ClearHashSalted() *LocalBreachUpdateOne
ClearHashSalted clears the value of the "hash_salted" field.
func (*LocalBreachUpdateOne) ClearHashType ¶
func (lbuo *LocalBreachUpdateOne) ClearHashType() *LocalBreachUpdateOne
ClearHashType clears the value of the "hash_type" field.
func (*LocalBreachUpdateOne) ClearTrackedBreaches ¶
func (lbuo *LocalBreachUpdateOne) ClearTrackedBreaches() *LocalBreachUpdateOne
ClearTrackedBreaches clears all "tracked_breaches" edges to the TrackedBreaches entity.
func (*LocalBreachUpdateOne) Exec ¶
func (lbuo *LocalBreachUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LocalBreachUpdateOne) ExecX ¶
func (lbuo *LocalBreachUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocalBreachUpdateOne) Mutation ¶
func (lbuo *LocalBreachUpdateOne) Mutation() *LocalBreachMutation
Mutation returns the LocalBreachMutation object of the builder.
func (*LocalBreachUpdateOne) RemoveTrackedBreachIDs ¶
func (lbuo *LocalBreachUpdateOne) RemoveTrackedBreachIDs(ids ...uuid.UUID) *LocalBreachUpdateOne
RemoveTrackedBreachIDs removes the "tracked_breaches" edge to TrackedBreaches entities by IDs.
func (*LocalBreachUpdateOne) RemoveTrackedBreaches ¶
func (lbuo *LocalBreachUpdateOne) RemoveTrackedBreaches(t ...*TrackedBreaches) *LocalBreachUpdateOne
RemoveTrackedBreaches removes "tracked_breaches" edges to TrackedBreaches entities.
func (*LocalBreachUpdateOne) Save ¶
func (lbuo *LocalBreachUpdateOne) Save(ctx context.Context) (*LocalBreach, error)
Save executes the query and returns the updated LocalBreach entity.
func (*LocalBreachUpdateOne) SaveX ¶
func (lbuo *LocalBreachUpdateOne) SaveX(ctx context.Context) *LocalBreach
SaveX is like Save, but panics if an error occurs.
func (*LocalBreachUpdateOne) Select ¶
func (lbuo *LocalBreachUpdateOne) Select(field string, fields ...string) *LocalBreachUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LocalBreachUpdateOne) SetContainsEmails ¶
func (lbuo *LocalBreachUpdateOne) SetContainsEmails(b bool) *LocalBreachUpdateOne
SetContainsEmails sets the "contains_emails" field.
func (*LocalBreachUpdateOne) SetContainsHashes ¶
func (lbuo *LocalBreachUpdateOne) SetContainsHashes(b bool) *LocalBreachUpdateOne
SetContainsHashes sets the "contains_hashes" field.
func (*LocalBreachUpdateOne) SetContainsPasswords ¶
func (lbuo *LocalBreachUpdateOne) SetContainsPasswords(b bool) *LocalBreachUpdateOne
SetContainsPasswords sets the "contains_passwords" field.
func (*LocalBreachUpdateOne) SetContainsUsernames ¶
func (lbuo *LocalBreachUpdateOne) SetContainsUsernames(b bool) *LocalBreachUpdateOne
SetContainsUsernames sets the "contains_usernames" field.
func (*LocalBreachUpdateOne) SetData ¶
func (lbuo *LocalBreachUpdateOne) SetData(s *schema.Data) *LocalBreachUpdateOne
SetData sets the "data" field.
func (*LocalBreachUpdateOne) SetDate ¶
func (lbuo *LocalBreachUpdateOne) SetDate(t time.Time) *LocalBreachUpdateOne
SetDate sets the "date" field.
func (*LocalBreachUpdateOne) SetDescription ¶
func (lbuo *LocalBreachUpdateOne) SetDescription(s string) *LocalBreachUpdateOne
SetDescription sets the "description" field.
func (*LocalBreachUpdateOne) SetHashPeppered ¶
func (lbuo *LocalBreachUpdateOne) SetHashPeppered(b bool) *LocalBreachUpdateOne
SetHashPeppered sets the "hash_peppered" field.
func (*LocalBreachUpdateOne) SetHashSalted ¶
func (lbuo *LocalBreachUpdateOne) SetHashSalted(b bool) *LocalBreachUpdateOne
SetHashSalted sets the "hash_salted" field.
func (*LocalBreachUpdateOne) SetHashType ¶
func (lbuo *LocalBreachUpdateOne) SetHashType(s string) *LocalBreachUpdateOne
SetHashType sets the "hash_type" field.
func (*LocalBreachUpdateOne) SetIsVerified ¶
func (lbuo *LocalBreachUpdateOne) SetIsVerified(b bool) *LocalBreachUpdateOne
SetIsVerified sets the "is_verified" field.
func (*LocalBreachUpdateOne) SetName ¶
func (lbuo *LocalBreachUpdateOne) SetName(s string) *LocalBreachUpdateOne
SetName sets the "name" field.
func (*LocalBreachUpdateOne) SetNillableDate ¶
func (lbuo *LocalBreachUpdateOne) SetNillableDate(t *time.Time) *LocalBreachUpdateOne
SetNillableDate sets the "date" field if the given value is not nil.
func (*LocalBreachUpdateOne) SetNillableDescription ¶
func (lbuo *LocalBreachUpdateOne) SetNillableDescription(s *string) *LocalBreachUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*LocalBreachUpdateOne) SetNillableHashPeppered ¶
func (lbuo *LocalBreachUpdateOne) SetNillableHashPeppered(b *bool) *LocalBreachUpdateOne
SetNillableHashPeppered sets the "hash_peppered" field if the given value is not nil.
func (*LocalBreachUpdateOne) SetNillableHashSalted ¶
func (lbuo *LocalBreachUpdateOne) SetNillableHashSalted(b *bool) *LocalBreachUpdateOne
SetNillableHashSalted sets the "hash_salted" field if the given value is not nil.
func (*LocalBreachUpdateOne) SetNillableHashType ¶
func (lbuo *LocalBreachUpdateOne) SetNillableHashType(s *string) *LocalBreachUpdateOne
SetNillableHashType sets the "hash_type" field if the given value is not nil.
func (*LocalBreachUpdateOne) Where ¶
func (lbuo *LocalBreachUpdateOne) Where(ps ...predicate.LocalBreach) *LocalBreachUpdateOne
Where appends a list predicates to the LocalBreachUpdate builder.
type LocalBreaches ¶
type LocalBreaches []*LocalBreach
LocalBreaches is a parsable slice of LocalBreach.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
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 OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type SearchQueries ¶
type SearchQueries []*SearchQuery
SearchQueries is a parsable slice of SearchQuery.
type SearchQuery ¶
type SearchQuery struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Query holds the value of the "query" field. Query string `json:"query,omitempty"` // Created holds the value of the "created" field. Created time.Time `json:"created,omitempty"` // id of the user that's done the search query Owner uuid.UUID `json:"owner,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SearchQueryQuery when eager-loading is set. Edges SearchQueryEdges `json:"edges"` // contains filtered or unexported fields }
SearchQuery is the model entity for the SearchQuery schema.
func (*SearchQuery) QueryUser ¶
func (sq *SearchQuery) QueryUser() *UserQuery
QueryUser queries the "user" edge of the SearchQuery entity.
func (*SearchQuery) String ¶
func (sq *SearchQuery) String() string
String implements the fmt.Stringer.
func (*SearchQuery) Unwrap ¶
func (sq *SearchQuery) Unwrap() *SearchQuery
Unwrap unwraps the SearchQuery 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 (*SearchQuery) Update ¶
func (sq *SearchQuery) Update() *SearchQueryUpdateOne
Update returns a builder for updating this SearchQuery. Note that you need to call SearchQuery.Unwrap() before calling this method if this SearchQuery was returned from a transaction, and the transaction was committed or rolled back.
type SearchQueryClient ¶
type SearchQueryClient struct {
// contains filtered or unexported fields
}
SearchQueryClient is a client for the SearchQuery schema.
func NewSearchQueryClient ¶
func NewSearchQueryClient(c config) *SearchQueryClient
NewSearchQueryClient returns a client for the SearchQuery from the given config.
func (*SearchQueryClient) Create ¶
func (c *SearchQueryClient) Create() *SearchQueryCreate
Create returns a builder for creating a SearchQuery entity.
func (*SearchQueryClient) CreateBulk ¶
func (c *SearchQueryClient) CreateBulk(builders ...*SearchQueryCreate) *SearchQueryCreateBulk
CreateBulk returns a builder for creating a bulk of SearchQuery entities.
func (*SearchQueryClient) Delete ¶
func (c *SearchQueryClient) Delete() *SearchQueryDelete
Delete returns a delete builder for SearchQuery.
func (*SearchQueryClient) DeleteOne ¶
func (c *SearchQueryClient) DeleteOne(sq *SearchQuery) *SearchQueryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SearchQueryClient) DeleteOneID ¶
func (c *SearchQueryClient) DeleteOneID(id uuid.UUID) *SearchQueryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SearchQueryClient) Get ¶
func (c *SearchQueryClient) Get(ctx context.Context, id uuid.UUID) (*SearchQuery, error)
Get returns a SearchQuery entity by its id.
func (*SearchQueryClient) GetX ¶
func (c *SearchQueryClient) GetX(ctx context.Context, id uuid.UUID) *SearchQuery
GetX is like Get, but panics if an error occurs.
func (*SearchQueryClient) Hooks ¶
func (c *SearchQueryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SearchQueryClient) Intercept ¶
func (c *SearchQueryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `searchquery.Intercept(f(g(h())))`.
func (*SearchQueryClient) Interceptors ¶
func (c *SearchQueryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SearchQueryClient) Query ¶
func (c *SearchQueryClient) Query() *SearchQueryQuery
Query returns a query builder for SearchQuery.
func (*SearchQueryClient) QueryUser ¶
func (c *SearchQueryClient) QueryUser(sq *SearchQuery) *UserQuery
QueryUser queries the user edge of a SearchQuery.
func (*SearchQueryClient) Update ¶
func (c *SearchQueryClient) Update() *SearchQueryUpdate
Update returns an update builder for SearchQuery.
func (*SearchQueryClient) UpdateOne ¶
func (c *SearchQueryClient) UpdateOne(sq *SearchQuery) *SearchQueryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SearchQueryClient) UpdateOneID ¶
func (c *SearchQueryClient) UpdateOneID(id uuid.UUID) *SearchQueryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SearchQueryClient) Use ¶
func (c *SearchQueryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `searchquery.Hooks(f(g(h())))`.
type SearchQueryCreate ¶
type SearchQueryCreate struct {
// contains filtered or unexported fields
}
SearchQueryCreate is the builder for creating a SearchQuery entity.
func (*SearchQueryCreate) Exec ¶
func (sqc *SearchQueryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SearchQueryCreate) ExecX ¶
func (sqc *SearchQueryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SearchQueryCreate) Mutation ¶
func (sqc *SearchQueryCreate) Mutation() *SearchQueryMutation
Mutation returns the SearchQueryMutation object of the builder.
func (*SearchQueryCreate) Save ¶
func (sqc *SearchQueryCreate) Save(ctx context.Context) (*SearchQuery, error)
Save creates the SearchQuery in the database.
func (*SearchQueryCreate) SaveX ¶
func (sqc *SearchQueryCreate) SaveX(ctx context.Context) *SearchQuery
SaveX calls Save and panics if Save returns an error.
func (*SearchQueryCreate) SetCreated ¶
func (sqc *SearchQueryCreate) SetCreated(t time.Time) *SearchQueryCreate
SetCreated sets the "created" field.
func (*SearchQueryCreate) SetID ¶
func (sqc *SearchQueryCreate) SetID(u uuid.UUID) *SearchQueryCreate
SetID sets the "id" field.
func (*SearchQueryCreate) SetNillableCreated ¶
func (sqc *SearchQueryCreate) SetNillableCreated(t *time.Time) *SearchQueryCreate
SetNillableCreated sets the "created" field if the given value is not nil.
func (*SearchQueryCreate) SetNillableID ¶
func (sqc *SearchQueryCreate) SetNillableID(u *uuid.UUID) *SearchQueryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SearchQueryCreate) SetOwner ¶
func (sqc *SearchQueryCreate) SetOwner(u uuid.UUID) *SearchQueryCreate
SetOwner sets the "owner" field.
func (*SearchQueryCreate) SetQuery ¶
func (sqc *SearchQueryCreate) SetQuery(s string) *SearchQueryCreate
SetQuery sets the "query" field.
func (*SearchQueryCreate) SetUser ¶
func (sqc *SearchQueryCreate) SetUser(u *User) *SearchQueryCreate
SetUser sets the "user" edge to the User entity.
func (*SearchQueryCreate) SetUserID ¶
func (sqc *SearchQueryCreate) SetUserID(id uuid.UUID) *SearchQueryCreate
SetUserID sets the "user" edge to the User entity by ID.
type SearchQueryCreateBulk ¶
type SearchQueryCreateBulk struct {
// contains filtered or unexported fields
}
SearchQueryCreateBulk is the builder for creating many SearchQuery entities in bulk.
func (*SearchQueryCreateBulk) Exec ¶
func (sqcb *SearchQueryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SearchQueryCreateBulk) ExecX ¶
func (sqcb *SearchQueryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SearchQueryCreateBulk) Save ¶
func (sqcb *SearchQueryCreateBulk) Save(ctx context.Context) ([]*SearchQuery, error)
Save creates the SearchQuery entities in the database.
func (*SearchQueryCreateBulk) SaveX ¶
func (sqcb *SearchQueryCreateBulk) SaveX(ctx context.Context) []*SearchQuery
SaveX is like Save, but panics if an error occurs.
type SearchQueryDelete ¶
type SearchQueryDelete struct {
// contains filtered or unexported fields
}
SearchQueryDelete is the builder for deleting a SearchQuery entity.
func (*SearchQueryDelete) Exec ¶
func (sqd *SearchQueryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SearchQueryDelete) ExecX ¶
func (sqd *SearchQueryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SearchQueryDelete) Where ¶
func (sqd *SearchQueryDelete) Where(ps ...predicate.SearchQuery) *SearchQueryDelete
Where appends a list predicates to the SearchQueryDelete builder.
type SearchQueryDeleteOne ¶
type SearchQueryDeleteOne struct {
// contains filtered or unexported fields
}
SearchQueryDeleteOne is the builder for deleting a single SearchQuery entity.
func (*SearchQueryDeleteOne) Exec ¶
func (sqdo *SearchQueryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SearchQueryDeleteOne) ExecX ¶
func (sqdo *SearchQueryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SearchQueryDeleteOne) Where ¶
func (sqdo *SearchQueryDeleteOne) Where(ps ...predicate.SearchQuery) *SearchQueryDeleteOne
Where appends a list predicates to the SearchQueryDelete builder.
type SearchQueryEdges ¶
type SearchQueryEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
SearchQueryEdges holds the relations/edges for other nodes in the graph.
func (SearchQueryEdges) UserOrErr ¶
func (e SearchQueryEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SearchQueryGroupBy ¶
type SearchQueryGroupBy struct {
// contains filtered or unexported fields
}
SearchQueryGroupBy is the group-by builder for SearchQuery entities.
func (*SearchQueryGroupBy) Aggregate ¶
func (sqgb *SearchQueryGroupBy) Aggregate(fns ...AggregateFunc) *SearchQueryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SearchQueryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SearchQueryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SearchQueryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SearchQueryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SearchQueryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SearchQueryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SearchQueryGroupBy) Scan ¶
func (sqgb *SearchQueryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SearchQueryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SearchQueryMutation ¶
type SearchQueryMutation struct {
// contains filtered or unexported fields
}
SearchQueryMutation represents an operation that mutates the SearchQuery nodes in the graph.
func (*SearchQueryMutation) AddField ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) AddedEdges ¶
func (m *SearchQueryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SearchQueryMutation) AddedField ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) AddedFields ¶
func (m *SearchQueryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SearchQueryMutation) AddedIDs ¶
func (m *SearchQueryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SearchQueryMutation) ClearEdge ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) ClearField ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) ClearUser ¶
func (m *SearchQueryMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*SearchQueryMutation) ClearedEdges ¶
func (m *SearchQueryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SearchQueryMutation) ClearedFields ¶
func (m *SearchQueryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SearchQueryMutation) Client ¶
func (m SearchQueryMutation) 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 (*SearchQueryMutation) Created ¶
func (m *SearchQueryMutation) Created() (r time.Time, exists bool)
Created returns the value of the "created" field in the mutation.
func (*SearchQueryMutation) EdgeCleared ¶
func (m *SearchQueryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SearchQueryMutation) Field ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) FieldCleared ¶
func (m *SearchQueryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SearchQueryMutation) Fields ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) ID ¶
func (m *SearchQueryMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SearchQueryMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SearchQueryMutation) OldCreated ¶
OldCreated returns the old "created" field's value of the SearchQuery entity. If the SearchQuery 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 (*SearchQueryMutation) 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 (*SearchQueryMutation) OldOwner ¶
OldOwner returns the old "owner" field's value of the SearchQuery entity. If the SearchQuery 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 (*SearchQueryMutation) OldQuery ¶
func (m *SearchQueryMutation) OldQuery(ctx context.Context) (v string, err error)
OldQuery returns the old "query" field's value of the SearchQuery entity. If the SearchQuery 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 (*SearchQueryMutation) Op ¶
func (m *SearchQueryMutation) Op() Op
Op returns the operation name.
func (*SearchQueryMutation) Owner ¶
func (m *SearchQueryMutation) Owner() (r uuid.UUID, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*SearchQueryMutation) Query ¶
func (m *SearchQueryMutation) Query() (r string, exists bool)
Query returns the value of the "query" field in the mutation.
func (*SearchQueryMutation) RemovedEdges ¶
func (m *SearchQueryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SearchQueryMutation) RemovedIDs ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) ResetCreated ¶
func (m *SearchQueryMutation) ResetCreated()
ResetCreated resets all changes to the "created" field.
func (*SearchQueryMutation) ResetEdge ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) ResetField ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) ResetOwner ¶
func (m *SearchQueryMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*SearchQueryMutation) ResetQuery ¶
func (m *SearchQueryMutation) ResetQuery()
ResetQuery resets all changes to the "query" field.
func (*SearchQueryMutation) ResetUser ¶
func (m *SearchQueryMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*SearchQueryMutation) SetCreated ¶
func (m *SearchQueryMutation) SetCreated(t time.Time)
SetCreated sets the "created" field.
func (*SearchQueryMutation) SetField ¶
func (m *SearchQueryMutation) 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 (*SearchQueryMutation) SetID ¶
func (m *SearchQueryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of SearchQuery entities.
func (*SearchQueryMutation) SetOp ¶
func (m *SearchQueryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SearchQueryMutation) SetOwner ¶
func (m *SearchQueryMutation) SetOwner(u uuid.UUID)
SetOwner sets the "owner" field.
func (*SearchQueryMutation) SetQuery ¶
func (m *SearchQueryMutation) SetQuery(s string)
SetQuery sets the "query" field.
func (*SearchQueryMutation) SetUserID ¶
func (m *SearchQueryMutation) SetUserID(id uuid.UUID)
SetUserID sets the "user" edge to the User entity by id.
func (SearchQueryMutation) Tx ¶
func (m SearchQueryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SearchQueryMutation) Type ¶
func (m *SearchQueryMutation) Type() string
Type returns the node type of this mutation (SearchQuery).
func (*SearchQueryMutation) UserCleared ¶
func (m *SearchQueryMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*SearchQueryMutation) UserID ¶
func (m *SearchQueryMutation) UserID() (id uuid.UUID, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*SearchQueryMutation) UserIDs ¶
func (m *SearchQueryMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*SearchQueryMutation) Where ¶
func (m *SearchQueryMutation) Where(ps ...predicate.SearchQuery)
Where appends a list predicates to the SearchQueryMutation builder.
func (*SearchQueryMutation) WhereP ¶
func (m *SearchQueryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SearchQueryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SearchQueryQuery ¶
type SearchQueryQuery struct {
// contains filtered or unexported fields
}
SearchQueryQuery is the builder for querying SearchQuery entities.
func (*SearchQueryQuery) Aggregate ¶
func (sqq *SearchQueryQuery) Aggregate(fns ...AggregateFunc) *SearchQuerySelect
Aggregate returns a SearchQuerySelect configured with the given aggregations.
func (*SearchQueryQuery) All ¶
func (sqq *SearchQueryQuery) All(ctx context.Context) ([]*SearchQuery, error)
All executes the query and returns a list of SearchQueries.
func (*SearchQueryQuery) AllX ¶
func (sqq *SearchQueryQuery) AllX(ctx context.Context) []*SearchQuery
AllX is like All, but panics if an error occurs.
func (*SearchQueryQuery) Clone ¶
func (sqq *SearchQueryQuery) Clone() *SearchQueryQuery
Clone returns a duplicate of the SearchQueryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SearchQueryQuery) Count ¶
func (sqq *SearchQueryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SearchQueryQuery) CountX ¶
func (sqq *SearchQueryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SearchQueryQuery) Exist ¶
func (sqq *SearchQueryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SearchQueryQuery) ExistX ¶
func (sqq *SearchQueryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SearchQueryQuery) First ¶
func (sqq *SearchQueryQuery) First(ctx context.Context) (*SearchQuery, error)
First returns the first SearchQuery entity from the query. Returns a *NotFoundError when no SearchQuery was found.
func (*SearchQueryQuery) FirstID ¶
FirstID returns the first SearchQuery ID from the query. Returns a *NotFoundError when no SearchQuery ID was found.
func (*SearchQueryQuery) FirstIDX ¶
func (sqq *SearchQueryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SearchQueryQuery) FirstX ¶
func (sqq *SearchQueryQuery) FirstX(ctx context.Context) *SearchQuery
FirstX is like First, but panics if an error occurs.
func (*SearchQueryQuery) GroupBy ¶
func (sqq *SearchQueryQuery) GroupBy(field string, fields ...string) *SearchQueryGroupBy
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 { Query string `json:"query,omitempty"` Count int `json:"count,omitempty"` } client.SearchQuery.Query(). GroupBy(searchquery.FieldQuery). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SearchQueryQuery) IDsX ¶
func (sqq *SearchQueryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SearchQueryQuery) Limit ¶
func (sqq *SearchQueryQuery) Limit(limit int) *SearchQueryQuery
Limit the number of records to be returned by this query.
func (*SearchQueryQuery) Offset ¶
func (sqq *SearchQueryQuery) Offset(offset int) *SearchQueryQuery
Offset to start from.
func (*SearchQueryQuery) Only ¶
func (sqq *SearchQueryQuery) Only(ctx context.Context) (*SearchQuery, error)
Only returns a single SearchQuery entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SearchQuery entity is found. Returns a *NotFoundError when no SearchQuery entities are found.
func (*SearchQueryQuery) OnlyID ¶
OnlyID is like Only, but returns the only SearchQuery ID in the query. Returns a *NotSingularError when more than one SearchQuery ID is found. Returns a *NotFoundError when no entities are found.
func (*SearchQueryQuery) OnlyIDX ¶
func (sqq *SearchQueryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SearchQueryQuery) OnlyX ¶
func (sqq *SearchQueryQuery) OnlyX(ctx context.Context) *SearchQuery
OnlyX is like Only, but panics if an error occurs.
func (*SearchQueryQuery) Order ¶
func (sqq *SearchQueryQuery) Order(o ...searchquery.OrderOption) *SearchQueryQuery
Order specifies how the records should be ordered.
func (*SearchQueryQuery) QueryUser ¶
func (sqq *SearchQueryQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*SearchQueryQuery) Select ¶
func (sqq *SearchQueryQuery) Select(fields ...string) *SearchQuerySelect
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 { Query string `json:"query,omitempty"` } client.SearchQuery.Query(). Select(searchquery.FieldQuery). Scan(ctx, &v)
func (*SearchQueryQuery) Unique ¶
func (sqq *SearchQueryQuery) Unique(unique bool) *SearchQueryQuery
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 (*SearchQueryQuery) Where ¶
func (sqq *SearchQueryQuery) Where(ps ...predicate.SearchQuery) *SearchQueryQuery
Where adds a new predicate for the SearchQueryQuery builder.
func (*SearchQueryQuery) WithUser ¶
func (sqq *SearchQueryQuery) WithUser(opts ...func(*UserQuery)) *SearchQueryQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type SearchQuerySelect ¶
type SearchQuerySelect struct { *SearchQueryQuery // contains filtered or unexported fields }
SearchQuerySelect is the builder for selecting fields of SearchQuery entities.
func (*SearchQuerySelect) Aggregate ¶
func (sqs *SearchQuerySelect) Aggregate(fns ...AggregateFunc) *SearchQuerySelect
Aggregate adds the given aggregation functions to the selector query.
func (*SearchQuerySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SearchQuerySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SearchQuerySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SearchQuerySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SearchQuerySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SearchQuerySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SearchQuerySelect) Scan ¶
func (sqs *SearchQuerySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SearchQuerySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SearchQueryUpdate ¶
type SearchQueryUpdate struct {
// contains filtered or unexported fields
}
SearchQueryUpdate is the builder for updating SearchQuery entities.
func (*SearchQueryUpdate) Exec ¶
func (squ *SearchQueryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SearchQueryUpdate) ExecX ¶
func (squ *SearchQueryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SearchQueryUpdate) Mutation ¶
func (squ *SearchQueryUpdate) Mutation() *SearchQueryMutation
Mutation returns the SearchQueryMutation object of the builder.
func (*SearchQueryUpdate) Save ¶
func (squ *SearchQueryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SearchQueryUpdate) SaveX ¶
func (squ *SearchQueryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SearchQueryUpdate) Where ¶
func (squ *SearchQueryUpdate) Where(ps ...predicate.SearchQuery) *SearchQueryUpdate
Where appends a list predicates to the SearchQueryUpdate builder.
type SearchQueryUpdateOne ¶
type SearchQueryUpdateOne struct {
// contains filtered or unexported fields
}
SearchQueryUpdateOne is the builder for updating a single SearchQuery entity.
func (*SearchQueryUpdateOne) Exec ¶
func (squo *SearchQueryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SearchQueryUpdateOne) ExecX ¶
func (squo *SearchQueryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SearchQueryUpdateOne) Mutation ¶
func (squo *SearchQueryUpdateOne) Mutation() *SearchQueryMutation
Mutation returns the SearchQueryMutation object of the builder.
func (*SearchQueryUpdateOne) Save ¶
func (squo *SearchQueryUpdateOne) Save(ctx context.Context) (*SearchQuery, error)
Save executes the query and returns the updated SearchQuery entity.
func (*SearchQueryUpdateOne) SaveX ¶
func (squo *SearchQueryUpdateOne) SaveX(ctx context.Context) *SearchQuery
SaveX is like Save, but panics if an error occurs.
func (*SearchQueryUpdateOne) Select ¶
func (squo *SearchQueryUpdateOne) Select(field string, fields ...string) *SearchQueryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SearchQueryUpdateOne) Where ¶
func (squo *SearchQueryUpdateOne) Where(ps ...predicate.SearchQuery) *SearchQueryUpdateOne
Where appends a list predicates to the SearchQueryUpdate builder.
type Settings ¶
type Settings struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // api key for the hibp service HibpAPIKey string `json:"-"` // api key for the dehashed.com service DehashedAPIKey string `json:"-"` // the number of searches performed Searches uint64 `json:"searches,omitempty"` // contains filtered or unexported fields }
Settings is the model entity for the Settings schema.
func (*Settings) Unwrap ¶
Unwrap unwraps the Settings 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 (*Settings) Update ¶
func (s *Settings) Update() *SettingsUpdateOne
Update returns a builder for updating this Settings. Note that you need to call Settings.Unwrap() before calling this method if this Settings was returned from a transaction, and the transaction was committed or rolled back.
type SettingsClient ¶
type SettingsClient struct {
// contains filtered or unexported fields
}
SettingsClient is a client for the Settings schema.
func NewSettingsClient ¶
func NewSettingsClient(c config) *SettingsClient
NewSettingsClient returns a client for the Settings from the given config.
func (*SettingsClient) Create ¶
func (c *SettingsClient) Create() *SettingsCreate
Create returns a builder for creating a Settings entity.
func (*SettingsClient) CreateBulk ¶
func (c *SettingsClient) CreateBulk(builders ...*SettingsCreate) *SettingsCreateBulk
CreateBulk returns a builder for creating a bulk of Settings entities.
func (*SettingsClient) Delete ¶
func (c *SettingsClient) Delete() *SettingsDelete
Delete returns a delete builder for Settings.
func (*SettingsClient) DeleteOne ¶
func (c *SettingsClient) DeleteOne(s *Settings) *SettingsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SettingsClient) DeleteOneID ¶
func (c *SettingsClient) DeleteOneID(id uuid.UUID) *SettingsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SettingsClient) Hooks ¶
func (c *SettingsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SettingsClient) Intercept ¶
func (c *SettingsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `settings.Intercept(f(g(h())))`.
func (*SettingsClient) Interceptors ¶
func (c *SettingsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SettingsClient) Query ¶
func (c *SettingsClient) Query() *SettingsQuery
Query returns a query builder for Settings.
func (*SettingsClient) Update ¶
func (c *SettingsClient) Update() *SettingsUpdate
Update returns an update builder for Settings.
func (*SettingsClient) UpdateOne ¶
func (c *SettingsClient) UpdateOne(s *Settings) *SettingsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SettingsClient) UpdateOneID ¶
func (c *SettingsClient) UpdateOneID(id uuid.UUID) *SettingsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SettingsClient) Use ¶
func (c *SettingsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `settings.Hooks(f(g(h())))`.
type SettingsCreate ¶
type SettingsCreate struct {
// contains filtered or unexported fields
}
SettingsCreate is the builder for creating a Settings entity.
func (*SettingsCreate) Exec ¶
func (sc *SettingsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SettingsCreate) ExecX ¶
func (sc *SettingsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingsCreate) Mutation ¶
func (sc *SettingsCreate) Mutation() *SettingsMutation
Mutation returns the SettingsMutation object of the builder.
func (*SettingsCreate) Save ¶
func (sc *SettingsCreate) Save(ctx context.Context) (*Settings, error)
Save creates the Settings in the database.
func (*SettingsCreate) SaveX ¶
func (sc *SettingsCreate) SaveX(ctx context.Context) *Settings
SaveX calls Save and panics if Save returns an error.
func (*SettingsCreate) SetDehashedAPIKey ¶
func (sc *SettingsCreate) SetDehashedAPIKey(s string) *SettingsCreate
SetDehashedAPIKey sets the "dehashed_api_key" field.
func (*SettingsCreate) SetHibpAPIKey ¶
func (sc *SettingsCreate) SetHibpAPIKey(s string) *SettingsCreate
SetHibpAPIKey sets the "hibp_api_key" field.
func (*SettingsCreate) SetID ¶
func (sc *SettingsCreate) SetID(u uuid.UUID) *SettingsCreate
SetID sets the "id" field.
func (*SettingsCreate) SetNillableDehashedAPIKey ¶
func (sc *SettingsCreate) SetNillableDehashedAPIKey(s *string) *SettingsCreate
SetNillableDehashedAPIKey sets the "dehashed_api_key" field if the given value is not nil.
func (*SettingsCreate) SetNillableHibpAPIKey ¶
func (sc *SettingsCreate) SetNillableHibpAPIKey(s *string) *SettingsCreate
SetNillableHibpAPIKey sets the "hibp_api_key" field if the given value is not nil.
func (*SettingsCreate) SetNillableID ¶
func (sc *SettingsCreate) SetNillableID(u *uuid.UUID) *SettingsCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SettingsCreate) SetNillableSearches ¶
func (sc *SettingsCreate) SetNillableSearches(u *uint64) *SettingsCreate
SetNillableSearches sets the "searches" field if the given value is not nil.
func (*SettingsCreate) SetSearches ¶
func (sc *SettingsCreate) SetSearches(u uint64) *SettingsCreate
SetSearches sets the "searches" field.
type SettingsCreateBulk ¶
type SettingsCreateBulk struct {
// contains filtered or unexported fields
}
SettingsCreateBulk is the builder for creating many Settings entities in bulk.
func (*SettingsCreateBulk) Exec ¶
func (scb *SettingsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SettingsCreateBulk) ExecX ¶
func (scb *SettingsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SettingsDelete ¶
type SettingsDelete struct {
// contains filtered or unexported fields
}
SettingsDelete is the builder for deleting a Settings entity.
func (*SettingsDelete) Exec ¶
func (sd *SettingsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SettingsDelete) ExecX ¶
func (sd *SettingsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SettingsDelete) Where ¶
func (sd *SettingsDelete) Where(ps ...predicate.Settings) *SettingsDelete
Where appends a list predicates to the SettingsDelete builder.
type SettingsDeleteOne ¶
type SettingsDeleteOne struct {
// contains filtered or unexported fields
}
SettingsDeleteOne is the builder for deleting a single Settings entity.
func (*SettingsDeleteOne) Exec ¶
func (sdo *SettingsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SettingsDeleteOne) ExecX ¶
func (sdo *SettingsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingsDeleteOne) Where ¶
func (sdo *SettingsDeleteOne) Where(ps ...predicate.Settings) *SettingsDeleteOne
Where appends a list predicates to the SettingsDelete builder.
type SettingsGroupBy ¶
type SettingsGroupBy struct {
// contains filtered or unexported fields
}
SettingsGroupBy is the group-by builder for Settings entities.
func (*SettingsGroupBy) Aggregate ¶
func (sgb *SettingsGroupBy) Aggregate(fns ...AggregateFunc) *SettingsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SettingsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SettingsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SettingsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SettingsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SettingsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SettingsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SettingsGroupBy) Scan ¶
func (sgb *SettingsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SettingsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SettingsMutation ¶
type SettingsMutation struct {
// contains filtered or unexported fields
}
SettingsMutation represents an operation that mutates the Settings nodes in the graph.
func (*SettingsMutation) AddField ¶
func (m *SettingsMutation) 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 (*SettingsMutation) AddSearches ¶
func (m *SettingsMutation) AddSearches(u int64)
AddSearches adds u to the "searches" field.
func (*SettingsMutation) AddedEdges ¶
func (m *SettingsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SettingsMutation) AddedField ¶
func (m *SettingsMutation) 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 (*SettingsMutation) AddedFields ¶
func (m *SettingsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SettingsMutation) AddedIDs ¶
func (m *SettingsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SettingsMutation) AddedSearches ¶
func (m *SettingsMutation) AddedSearches() (r int64, exists bool)
AddedSearches returns the value that was added to the "searches" field in this mutation.
func (*SettingsMutation) ClearDehashedAPIKey ¶
func (m *SettingsMutation) ClearDehashedAPIKey()
ClearDehashedAPIKey clears the value of the "dehashed_api_key" field.
func (*SettingsMutation) ClearEdge ¶
func (m *SettingsMutation) 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 (*SettingsMutation) ClearField ¶
func (m *SettingsMutation) 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 (*SettingsMutation) ClearHibpAPIKey ¶
func (m *SettingsMutation) ClearHibpAPIKey()
ClearHibpAPIKey clears the value of the "hibp_api_key" field.
func (*SettingsMutation) ClearedEdges ¶
func (m *SettingsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SettingsMutation) ClearedFields ¶
func (m *SettingsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SettingsMutation) Client ¶
func (m SettingsMutation) 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 (*SettingsMutation) DehashedAPIKey ¶
func (m *SettingsMutation) DehashedAPIKey() (r string, exists bool)
DehashedAPIKey returns the value of the "dehashed_api_key" field in the mutation.
func (*SettingsMutation) DehashedAPIKeyCleared ¶
func (m *SettingsMutation) DehashedAPIKeyCleared() bool
DehashedAPIKeyCleared returns if the "dehashed_api_key" field was cleared in this mutation.
func (*SettingsMutation) EdgeCleared ¶
func (m *SettingsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SettingsMutation) Field ¶
func (m *SettingsMutation) 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 (*SettingsMutation) FieldCleared ¶
func (m *SettingsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SettingsMutation) Fields ¶
func (m *SettingsMutation) 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 (*SettingsMutation) HibpAPIKey ¶
func (m *SettingsMutation) HibpAPIKey() (r string, exists bool)
HibpAPIKey returns the value of the "hibp_api_key" field in the mutation.
func (*SettingsMutation) HibpAPIKeyCleared ¶
func (m *SettingsMutation) HibpAPIKeyCleared() bool
HibpAPIKeyCleared returns if the "hibp_api_key" field was cleared in this mutation.
func (*SettingsMutation) ID ¶
func (m *SettingsMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SettingsMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SettingsMutation) OldDehashedAPIKey ¶
func (m *SettingsMutation) OldDehashedAPIKey(ctx context.Context) (v string, err error)
OldDehashedAPIKey returns the old "dehashed_api_key" field's value of the Settings entity. If the Settings 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 (*SettingsMutation) 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 (*SettingsMutation) OldHibpAPIKey ¶
func (m *SettingsMutation) OldHibpAPIKey(ctx context.Context) (v string, err error)
OldHibpAPIKey returns the old "hibp_api_key" field's value of the Settings entity. If the Settings 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 (*SettingsMutation) OldSearches ¶
func (m *SettingsMutation) OldSearches(ctx context.Context) (v uint64, err error)
OldSearches returns the old "searches" field's value of the Settings entity. If the Settings 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 (*SettingsMutation) RemovedEdges ¶
func (m *SettingsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SettingsMutation) RemovedIDs ¶
func (m *SettingsMutation) 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 (*SettingsMutation) ResetDehashedAPIKey ¶
func (m *SettingsMutation) ResetDehashedAPIKey()
ResetDehashedAPIKey resets all changes to the "dehashed_api_key" field.
func (*SettingsMutation) ResetEdge ¶
func (m *SettingsMutation) 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 (*SettingsMutation) ResetField ¶
func (m *SettingsMutation) 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 (*SettingsMutation) ResetHibpAPIKey ¶
func (m *SettingsMutation) ResetHibpAPIKey()
ResetHibpAPIKey resets all changes to the "hibp_api_key" field.
func (*SettingsMutation) ResetSearches ¶
func (m *SettingsMutation) ResetSearches()
ResetSearches resets all changes to the "searches" field.
func (*SettingsMutation) Searches ¶
func (m *SettingsMutation) Searches() (r uint64, exists bool)
Searches returns the value of the "searches" field in the mutation.
func (*SettingsMutation) SetDehashedAPIKey ¶
func (m *SettingsMutation) SetDehashedAPIKey(s string)
SetDehashedAPIKey sets the "dehashed_api_key" field.
func (*SettingsMutation) SetField ¶
func (m *SettingsMutation) 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 (*SettingsMutation) SetHibpAPIKey ¶
func (m *SettingsMutation) SetHibpAPIKey(s string)
SetHibpAPIKey sets the "hibp_api_key" field.
func (*SettingsMutation) SetID ¶
func (m *SettingsMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Settings entities.
func (*SettingsMutation) SetOp ¶
func (m *SettingsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SettingsMutation) SetSearches ¶
func (m *SettingsMutation) SetSearches(u uint64)
SetSearches sets the "searches" field.
func (SettingsMutation) Tx ¶
func (m SettingsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SettingsMutation) Type ¶
func (m *SettingsMutation) Type() string
Type returns the node type of this mutation (Settings).
func (*SettingsMutation) Where ¶
func (m *SettingsMutation) Where(ps ...predicate.Settings)
Where appends a list predicates to the SettingsMutation builder.
func (*SettingsMutation) WhereP ¶
func (m *SettingsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SettingsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SettingsQuery ¶
type SettingsQuery struct {
// contains filtered or unexported fields
}
SettingsQuery is the builder for querying Settings entities.
func (*SettingsQuery) Aggregate ¶
func (sq *SettingsQuery) Aggregate(fns ...AggregateFunc) *SettingsSelect
Aggregate returns a SettingsSelect configured with the given aggregations.
func (*SettingsQuery) All ¶
func (sq *SettingsQuery) All(ctx context.Context) ([]*Settings, error)
All executes the query and returns a list of SettingsSlice.
func (*SettingsQuery) AllX ¶
func (sq *SettingsQuery) AllX(ctx context.Context) []*Settings
AllX is like All, but panics if an error occurs.
func (*SettingsQuery) Clone ¶
func (sq *SettingsQuery) Clone() *SettingsQuery
Clone returns a duplicate of the SettingsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SettingsQuery) Count ¶
func (sq *SettingsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SettingsQuery) CountX ¶
func (sq *SettingsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SettingsQuery) Exist ¶
func (sq *SettingsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SettingsQuery) ExistX ¶
func (sq *SettingsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SettingsQuery) First ¶
func (sq *SettingsQuery) First(ctx context.Context) (*Settings, error)
First returns the first Settings entity from the query. Returns a *NotFoundError when no Settings was found.
func (*SettingsQuery) FirstID ¶
FirstID returns the first Settings ID from the query. Returns a *NotFoundError when no Settings ID was found.
func (*SettingsQuery) FirstIDX ¶
func (sq *SettingsQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SettingsQuery) FirstX ¶
func (sq *SettingsQuery) FirstX(ctx context.Context) *Settings
FirstX is like First, but panics if an error occurs.
func (*SettingsQuery) GroupBy ¶
func (sq *SettingsQuery) GroupBy(field string, fields ...string) *SettingsGroupBy
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 { HibpAPIKey string `json:"hibp_api_key,omitempty"` Count int `json:"count,omitempty"` } client.Settings.Query(). GroupBy(settings.FieldHibpAPIKey). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SettingsQuery) IDsX ¶
func (sq *SettingsQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SettingsQuery) Limit ¶
func (sq *SettingsQuery) Limit(limit int) *SettingsQuery
Limit the number of records to be returned by this query.
func (*SettingsQuery) Offset ¶
func (sq *SettingsQuery) Offset(offset int) *SettingsQuery
Offset to start from.
func (*SettingsQuery) Only ¶
func (sq *SettingsQuery) Only(ctx context.Context) (*Settings, error)
Only returns a single Settings entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Settings entity is found. Returns a *NotFoundError when no Settings entities are found.
func (*SettingsQuery) OnlyID ¶
OnlyID is like Only, but returns the only Settings ID in the query. Returns a *NotSingularError when more than one Settings ID is found. Returns a *NotFoundError when no entities are found.
func (*SettingsQuery) OnlyIDX ¶
func (sq *SettingsQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SettingsQuery) OnlyX ¶
func (sq *SettingsQuery) OnlyX(ctx context.Context) *Settings
OnlyX is like Only, but panics if an error occurs.
func (*SettingsQuery) Order ¶
func (sq *SettingsQuery) Order(o ...settings.OrderOption) *SettingsQuery
Order specifies how the records should be ordered.
func (*SettingsQuery) Select ¶
func (sq *SettingsQuery) Select(fields ...string) *SettingsSelect
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 { HibpAPIKey string `json:"hibp_api_key,omitempty"` } client.Settings.Query(). Select(settings.FieldHibpAPIKey). Scan(ctx, &v)
func (*SettingsQuery) Unique ¶
func (sq *SettingsQuery) Unique(unique bool) *SettingsQuery
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 (*SettingsQuery) Where ¶
func (sq *SettingsQuery) Where(ps ...predicate.Settings) *SettingsQuery
Where adds a new predicate for the SettingsQuery builder.
type SettingsSelect ¶
type SettingsSelect struct { *SettingsQuery // contains filtered or unexported fields }
SettingsSelect is the builder for selecting fields of Settings entities.
func (*SettingsSelect) Aggregate ¶
func (ss *SettingsSelect) Aggregate(fns ...AggregateFunc) *SettingsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SettingsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SettingsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SettingsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SettingsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SettingsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SettingsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SettingsSelect) Scan ¶
func (ss *SettingsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SettingsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SettingsUpdate ¶
type SettingsUpdate struct {
// contains filtered or unexported fields
}
SettingsUpdate is the builder for updating Settings entities.
func (*SettingsUpdate) AddSearches ¶
func (su *SettingsUpdate) AddSearches(u int64) *SettingsUpdate
AddSearches adds u to the "searches" field.
func (*SettingsUpdate) ClearDehashedAPIKey ¶
func (su *SettingsUpdate) ClearDehashedAPIKey() *SettingsUpdate
ClearDehashedAPIKey clears the value of the "dehashed_api_key" field.
func (*SettingsUpdate) ClearHibpAPIKey ¶
func (su *SettingsUpdate) ClearHibpAPIKey() *SettingsUpdate
ClearHibpAPIKey clears the value of the "hibp_api_key" field.
func (*SettingsUpdate) Exec ¶
func (su *SettingsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SettingsUpdate) ExecX ¶
func (su *SettingsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingsUpdate) Mutation ¶
func (su *SettingsUpdate) Mutation() *SettingsMutation
Mutation returns the SettingsMutation object of the builder.
func (*SettingsUpdate) Save ¶
func (su *SettingsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SettingsUpdate) SaveX ¶
func (su *SettingsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SettingsUpdate) SetDehashedAPIKey ¶
func (su *SettingsUpdate) SetDehashedAPIKey(s string) *SettingsUpdate
SetDehashedAPIKey sets the "dehashed_api_key" field.
func (*SettingsUpdate) SetHibpAPIKey ¶
func (su *SettingsUpdate) SetHibpAPIKey(s string) *SettingsUpdate
SetHibpAPIKey sets the "hibp_api_key" field.
func (*SettingsUpdate) SetNillableDehashedAPIKey ¶
func (su *SettingsUpdate) SetNillableDehashedAPIKey(s *string) *SettingsUpdate
SetNillableDehashedAPIKey sets the "dehashed_api_key" field if the given value is not nil.
func (*SettingsUpdate) SetNillableHibpAPIKey ¶
func (su *SettingsUpdate) SetNillableHibpAPIKey(s *string) *SettingsUpdate
SetNillableHibpAPIKey sets the "hibp_api_key" field if the given value is not nil.
func (*SettingsUpdate) SetNillableSearches ¶
func (su *SettingsUpdate) SetNillableSearches(u *uint64) *SettingsUpdate
SetNillableSearches sets the "searches" field if the given value is not nil.
func (*SettingsUpdate) SetSearches ¶
func (su *SettingsUpdate) SetSearches(u uint64) *SettingsUpdate
SetSearches sets the "searches" field.
func (*SettingsUpdate) Where ¶
func (su *SettingsUpdate) Where(ps ...predicate.Settings) *SettingsUpdate
Where appends a list predicates to the SettingsUpdate builder.
type SettingsUpdateOne ¶
type SettingsUpdateOne struct {
// contains filtered or unexported fields
}
SettingsUpdateOne is the builder for updating a single Settings entity.
func (*SettingsUpdateOne) AddSearches ¶
func (suo *SettingsUpdateOne) AddSearches(u int64) *SettingsUpdateOne
AddSearches adds u to the "searches" field.
func (*SettingsUpdateOne) ClearDehashedAPIKey ¶
func (suo *SettingsUpdateOne) ClearDehashedAPIKey() *SettingsUpdateOne
ClearDehashedAPIKey clears the value of the "dehashed_api_key" field.
func (*SettingsUpdateOne) ClearHibpAPIKey ¶
func (suo *SettingsUpdateOne) ClearHibpAPIKey() *SettingsUpdateOne
ClearHibpAPIKey clears the value of the "hibp_api_key" field.
func (*SettingsUpdateOne) Exec ¶
func (suo *SettingsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SettingsUpdateOne) ExecX ¶
func (suo *SettingsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SettingsUpdateOne) Mutation ¶
func (suo *SettingsUpdateOne) Mutation() *SettingsMutation
Mutation returns the SettingsMutation object of the builder.
func (*SettingsUpdateOne) Save ¶
func (suo *SettingsUpdateOne) Save(ctx context.Context) (*Settings, error)
Save executes the query and returns the updated Settings entity.
func (*SettingsUpdateOne) SaveX ¶
func (suo *SettingsUpdateOne) SaveX(ctx context.Context) *Settings
SaveX is like Save, but panics if an error occurs.
func (*SettingsUpdateOne) Select ¶
func (suo *SettingsUpdateOne) Select(field string, fields ...string) *SettingsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SettingsUpdateOne) SetDehashedAPIKey ¶
func (suo *SettingsUpdateOne) SetDehashedAPIKey(s string) *SettingsUpdateOne
SetDehashedAPIKey sets the "dehashed_api_key" field.
func (*SettingsUpdateOne) SetHibpAPIKey ¶
func (suo *SettingsUpdateOne) SetHibpAPIKey(s string) *SettingsUpdateOne
SetHibpAPIKey sets the "hibp_api_key" field.
func (*SettingsUpdateOne) SetNillableDehashedAPIKey ¶
func (suo *SettingsUpdateOne) SetNillableDehashedAPIKey(s *string) *SettingsUpdateOne
SetNillableDehashedAPIKey sets the "dehashed_api_key" field if the given value is not nil.
func (*SettingsUpdateOne) SetNillableHibpAPIKey ¶
func (suo *SettingsUpdateOne) SetNillableHibpAPIKey(s *string) *SettingsUpdateOne
SetNillableHibpAPIKey sets the "hibp_api_key" field if the given value is not nil.
func (*SettingsUpdateOne) SetNillableSearches ¶
func (suo *SettingsUpdateOne) SetNillableSearches(u *uint64) *SettingsUpdateOne
SetNillableSearches sets the "searches" field if the given value is not nil.
func (*SettingsUpdateOne) SetSearches ¶
func (suo *SettingsUpdateOne) SetSearches(u uint64) *SettingsUpdateOne
SetSearches sets the "searches" field.
func (*SettingsUpdateOne) Where ¶
func (suo *SettingsUpdateOne) Where(ps ...predicate.Settings) *SettingsUpdateOne
Where appends a list predicates to the SettingsUpdate builder.
type Setup ¶
type Setup struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // SetUpAt holds the value of the "set_up_at" field. SetUpAt time.Time `json:"set_up_at,omitempty"` // contains filtered or unexported fields }
Setup is the model entity for the Setup schema.
func (*Setup) Unwrap ¶
Unwrap unwraps the Setup 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 (*Setup) Update ¶
func (s *Setup) Update() *SetupUpdateOne
Update returns a builder for updating this Setup. Note that you need to call Setup.Unwrap() before calling this method if this Setup was returned from a transaction, and the transaction was committed or rolled back.
type SetupClient ¶
type SetupClient struct {
// contains filtered or unexported fields
}
SetupClient is a client for the Setup schema.
func NewSetupClient ¶
func NewSetupClient(c config) *SetupClient
NewSetupClient returns a client for the Setup from the given config.
func (*SetupClient) Create ¶
func (c *SetupClient) Create() *SetupCreate
Create returns a builder for creating a Setup entity.
func (*SetupClient) CreateBulk ¶
func (c *SetupClient) CreateBulk(builders ...*SetupCreate) *SetupCreateBulk
CreateBulk returns a builder for creating a bulk of Setup entities.
func (*SetupClient) Delete ¶
func (c *SetupClient) Delete() *SetupDelete
Delete returns a delete builder for Setup.
func (*SetupClient) DeleteOne ¶
func (c *SetupClient) DeleteOne(s *Setup) *SetupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SetupClient) DeleteOneID ¶
func (c *SetupClient) DeleteOneID(id uuid.UUID) *SetupDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SetupClient) Intercept ¶
func (c *SetupClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `setup.Intercept(f(g(h())))`.
func (*SetupClient) Interceptors ¶
func (c *SetupClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SetupClient) Query ¶
func (c *SetupClient) Query() *SetupQuery
Query returns a query builder for Setup.
func (*SetupClient) Update ¶
func (c *SetupClient) Update() *SetupUpdate
Update returns an update builder for Setup.
func (*SetupClient) UpdateOne ¶
func (c *SetupClient) UpdateOne(s *Setup) *SetupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SetupClient) UpdateOneID ¶
func (c *SetupClient) UpdateOneID(id uuid.UUID) *SetupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SetupClient) Use ¶
func (c *SetupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `setup.Hooks(f(g(h())))`.
type SetupCreate ¶
type SetupCreate struct {
// contains filtered or unexported fields
}
SetupCreate is the builder for creating a Setup entity.
func (*SetupCreate) Exec ¶
func (sc *SetupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SetupCreate) ExecX ¶
func (sc *SetupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SetupCreate) Mutation ¶
func (sc *SetupCreate) Mutation() *SetupMutation
Mutation returns the SetupMutation object of the builder.
func (*SetupCreate) Save ¶
func (sc *SetupCreate) Save(ctx context.Context) (*Setup, error)
Save creates the Setup in the database.
func (*SetupCreate) SaveX ¶
func (sc *SetupCreate) SaveX(ctx context.Context) *Setup
SaveX calls Save and panics if Save returns an error.
func (*SetupCreate) SetID ¶
func (sc *SetupCreate) SetID(u uuid.UUID) *SetupCreate
SetID sets the "id" field.
func (*SetupCreate) SetNillableID ¶
func (sc *SetupCreate) SetNillableID(u *uuid.UUID) *SetupCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SetupCreate) SetNillableSetUpAt ¶
func (sc *SetupCreate) SetNillableSetUpAt(t *time.Time) *SetupCreate
SetNillableSetUpAt sets the "set_up_at" field if the given value is not nil.
func (*SetupCreate) SetSetUpAt ¶
func (sc *SetupCreate) SetSetUpAt(t time.Time) *SetupCreate
SetSetUpAt sets the "set_up_at" field.
type SetupCreateBulk ¶
type SetupCreateBulk struct {
// contains filtered or unexported fields
}
SetupCreateBulk is the builder for creating many Setup entities in bulk.
func (*SetupCreateBulk) Exec ¶
func (scb *SetupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SetupCreateBulk) ExecX ¶
func (scb *SetupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SetupDelete ¶
type SetupDelete struct {
// contains filtered or unexported fields
}
SetupDelete is the builder for deleting a Setup entity.
func (*SetupDelete) Exec ¶
func (sd *SetupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SetupDelete) ExecX ¶
func (sd *SetupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SetupDelete) Where ¶
func (sd *SetupDelete) Where(ps ...predicate.Setup) *SetupDelete
Where appends a list predicates to the SetupDelete builder.
type SetupDeleteOne ¶
type SetupDeleteOne struct {
// contains filtered or unexported fields
}
SetupDeleteOne is the builder for deleting a single Setup entity.
func (*SetupDeleteOne) Exec ¶
func (sdo *SetupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SetupDeleteOne) ExecX ¶
func (sdo *SetupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SetupDeleteOne) Where ¶
func (sdo *SetupDeleteOne) Where(ps ...predicate.Setup) *SetupDeleteOne
Where appends a list predicates to the SetupDelete builder.
type SetupGroupBy ¶
type SetupGroupBy struct {
// contains filtered or unexported fields
}
SetupGroupBy is the group-by builder for Setup entities.
func (*SetupGroupBy) Aggregate ¶
func (sgb *SetupGroupBy) Aggregate(fns ...AggregateFunc) *SetupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SetupGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SetupGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SetupGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SetupGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SetupGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SetupGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SetupGroupBy) Scan ¶
func (sgb *SetupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SetupGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SetupMutation ¶
type SetupMutation struct {
// contains filtered or unexported fields
}
SetupMutation represents an operation that mutates the Setup nodes in the graph.
func (*SetupMutation) AddField ¶
func (m *SetupMutation) 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 (*SetupMutation) AddedEdges ¶
func (m *SetupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SetupMutation) AddedField ¶
func (m *SetupMutation) 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 (*SetupMutation) AddedFields ¶
func (m *SetupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SetupMutation) AddedIDs ¶
func (m *SetupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SetupMutation) ClearEdge ¶
func (m *SetupMutation) 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 (*SetupMutation) ClearField ¶
func (m *SetupMutation) 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 (*SetupMutation) ClearedEdges ¶
func (m *SetupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SetupMutation) ClearedFields ¶
func (m *SetupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SetupMutation) Client ¶
func (m SetupMutation) 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 (*SetupMutation) EdgeCleared ¶
func (m *SetupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SetupMutation) Field ¶
func (m *SetupMutation) 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 (*SetupMutation) FieldCleared ¶
func (m *SetupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SetupMutation) Fields ¶
func (m *SetupMutation) 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 (*SetupMutation) ID ¶
func (m *SetupMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SetupMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SetupMutation) 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 (*SetupMutation) OldSetUpAt ¶
OldSetUpAt returns the old "set_up_at" field's value of the Setup entity. If the Setup 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 (*SetupMutation) RemovedEdges ¶
func (m *SetupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SetupMutation) RemovedIDs ¶
func (m *SetupMutation) 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 (*SetupMutation) ResetEdge ¶
func (m *SetupMutation) 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 (*SetupMutation) ResetField ¶
func (m *SetupMutation) 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 (*SetupMutation) ResetSetUpAt ¶
func (m *SetupMutation) ResetSetUpAt()
ResetSetUpAt resets all changes to the "set_up_at" field.
func (*SetupMutation) SetField ¶
func (m *SetupMutation) 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 (*SetupMutation) SetID ¶
func (m *SetupMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Setup entities.
func (*SetupMutation) SetOp ¶
func (m *SetupMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SetupMutation) SetSetUpAt ¶
func (m *SetupMutation) SetSetUpAt(t time.Time)
SetSetUpAt sets the "set_up_at" field.
func (*SetupMutation) SetUpAt ¶
func (m *SetupMutation) SetUpAt() (r time.Time, exists bool)
SetUpAt returns the value of the "set_up_at" field in the mutation.
func (SetupMutation) Tx ¶
func (m SetupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SetupMutation) Type ¶
func (m *SetupMutation) Type() string
Type returns the node type of this mutation (Setup).
func (*SetupMutation) Where ¶
func (m *SetupMutation) Where(ps ...predicate.Setup)
Where appends a list predicates to the SetupMutation builder.
func (*SetupMutation) WhereP ¶
func (m *SetupMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SetupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SetupQuery ¶
type SetupQuery struct {
// contains filtered or unexported fields
}
SetupQuery is the builder for querying Setup entities.
func (*SetupQuery) Aggregate ¶
func (sq *SetupQuery) Aggregate(fns ...AggregateFunc) *SetupSelect
Aggregate returns a SetupSelect configured with the given aggregations.
func (*SetupQuery) All ¶
func (sq *SetupQuery) All(ctx context.Context) ([]*Setup, error)
All executes the query and returns a list of Setups.
func (*SetupQuery) AllX ¶
func (sq *SetupQuery) AllX(ctx context.Context) []*Setup
AllX is like All, but panics if an error occurs.
func (*SetupQuery) Clone ¶
func (sq *SetupQuery) Clone() *SetupQuery
Clone returns a duplicate of the SetupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SetupQuery) Count ¶
func (sq *SetupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SetupQuery) CountX ¶
func (sq *SetupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SetupQuery) Exist ¶
func (sq *SetupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SetupQuery) ExistX ¶
func (sq *SetupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SetupQuery) First ¶
func (sq *SetupQuery) First(ctx context.Context) (*Setup, error)
First returns the first Setup entity from the query. Returns a *NotFoundError when no Setup was found.
func (*SetupQuery) FirstID ¶
FirstID returns the first Setup ID from the query. Returns a *NotFoundError when no Setup ID was found.
func (*SetupQuery) FirstIDX ¶
func (sq *SetupQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SetupQuery) FirstX ¶
func (sq *SetupQuery) FirstX(ctx context.Context) *Setup
FirstX is like First, but panics if an error occurs.
func (*SetupQuery) GroupBy ¶
func (sq *SetupQuery) GroupBy(field string, fields ...string) *SetupGroupBy
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 { SetUpAt time.Time `json:"set_up_at,omitempty"` Count int `json:"count,omitempty"` } client.Setup.Query(). GroupBy(setup.FieldSetUpAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SetupQuery) IDsX ¶
func (sq *SetupQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SetupQuery) Limit ¶
func (sq *SetupQuery) Limit(limit int) *SetupQuery
Limit the number of records to be returned by this query.
func (*SetupQuery) Offset ¶
func (sq *SetupQuery) Offset(offset int) *SetupQuery
Offset to start from.
func (*SetupQuery) Only ¶
func (sq *SetupQuery) Only(ctx context.Context) (*Setup, error)
Only returns a single Setup entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Setup entity is found. Returns a *NotFoundError when no Setup entities are found.
func (*SetupQuery) OnlyID ¶
OnlyID is like Only, but returns the only Setup ID in the query. Returns a *NotSingularError when more than one Setup ID is found. Returns a *NotFoundError when no entities are found.
func (*SetupQuery) OnlyIDX ¶
func (sq *SetupQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SetupQuery) OnlyX ¶
func (sq *SetupQuery) OnlyX(ctx context.Context) *Setup
OnlyX is like Only, but panics if an error occurs.
func (*SetupQuery) Order ¶
func (sq *SetupQuery) Order(o ...setup.OrderOption) *SetupQuery
Order specifies how the records should be ordered.
func (*SetupQuery) Select ¶
func (sq *SetupQuery) Select(fields ...string) *SetupSelect
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 { SetUpAt time.Time `json:"set_up_at,omitempty"` } client.Setup.Query(). Select(setup.FieldSetUpAt). Scan(ctx, &v)
func (*SetupQuery) Unique ¶
func (sq *SetupQuery) Unique(unique bool) *SetupQuery
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 (*SetupQuery) Where ¶
func (sq *SetupQuery) Where(ps ...predicate.Setup) *SetupQuery
Where adds a new predicate for the SetupQuery builder.
type SetupSelect ¶
type SetupSelect struct { *SetupQuery // contains filtered or unexported fields }
SetupSelect is the builder for selecting fields of Setup entities.
func (*SetupSelect) Aggregate ¶
func (ss *SetupSelect) Aggregate(fns ...AggregateFunc) *SetupSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SetupSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SetupSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SetupSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SetupSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SetupSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SetupSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SetupSelect) Scan ¶
func (ss *SetupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SetupSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SetupUpdate ¶
type SetupUpdate struct {
// contains filtered or unexported fields
}
SetupUpdate is the builder for updating Setup entities.
func (*SetupUpdate) Exec ¶
func (su *SetupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SetupUpdate) ExecX ¶
func (su *SetupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SetupUpdate) Mutation ¶
func (su *SetupUpdate) Mutation() *SetupMutation
Mutation returns the SetupMutation object of the builder.
func (*SetupUpdate) Save ¶
func (su *SetupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SetupUpdate) SaveX ¶
func (su *SetupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SetupUpdate) Where ¶
func (su *SetupUpdate) Where(ps ...predicate.Setup) *SetupUpdate
Where appends a list predicates to the SetupUpdate builder.
type SetupUpdateOne ¶
type SetupUpdateOne struct {
// contains filtered or unexported fields
}
SetupUpdateOne is the builder for updating a single Setup entity.
func (*SetupUpdateOne) Exec ¶
func (suo *SetupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SetupUpdateOne) ExecX ¶
func (suo *SetupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SetupUpdateOne) Mutation ¶
func (suo *SetupUpdateOne) Mutation() *SetupMutation
Mutation returns the SetupMutation object of the builder.
func (*SetupUpdateOne) Save ¶
func (suo *SetupUpdateOne) Save(ctx context.Context) (*Setup, error)
Save executes the query and returns the updated Setup entity.
func (*SetupUpdateOne) SaveX ¶
func (suo *SetupUpdateOne) SaveX(ctx context.Context) *Setup
SaveX is like Save, but panics if an error occurs.
func (*SetupUpdateOne) Select ¶
func (suo *SetupUpdateOne) Select(field string, fields ...string) *SetupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SetupUpdateOne) Where ¶
func (suo *SetupUpdateOne) Where(ps ...predicate.Setup) *SetupUpdateOne
Where appends a list predicates to the SetupUpdate builder.
type TrackedBreaches ¶
type TrackedBreaches struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Breach holds the value of the "breach" field. Breach uuid.UUID `json:"breach,omitempty"` // Whether the breach is a locally added one or obtained from an online service Online bool `json:"online,omitempty"` // id of the user tracking the breach Owner uuid.UUID `json:"owner,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TrackedBreachesQuery when eager-loading is set. Edges TrackedBreachesEdges `json:"edges"` // contains filtered or unexported fields }
TrackedBreaches is the model entity for the TrackedBreaches schema.
func (*TrackedBreaches) QueryHibp ¶
func (tb *TrackedBreaches) QueryHibp() *HIBPQuery
QueryHibp queries the "hibp" edge of the TrackedBreaches entity.
func (*TrackedBreaches) QueryLocalbreach ¶
func (tb *TrackedBreaches) QueryLocalbreach() *LocalBreachQuery
QueryLocalbreach queries the "localbreach" edge of the TrackedBreaches entity.
func (*TrackedBreaches) QueryUser ¶
func (tb *TrackedBreaches) QueryUser() *UserQuery
QueryUser queries the "user" edge of the TrackedBreaches entity.
func (*TrackedBreaches) String ¶
func (tb *TrackedBreaches) String() string
String implements the fmt.Stringer.
func (*TrackedBreaches) Unwrap ¶
func (tb *TrackedBreaches) Unwrap() *TrackedBreaches
Unwrap unwraps the TrackedBreaches 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 (*TrackedBreaches) Update ¶
func (tb *TrackedBreaches) Update() *TrackedBreachesUpdateOne
Update returns a builder for updating this TrackedBreaches. Note that you need to call TrackedBreaches.Unwrap() before calling this method if this TrackedBreaches was returned from a transaction, and the transaction was committed or rolled back.
type TrackedBreachesClient ¶
type TrackedBreachesClient struct {
// contains filtered or unexported fields
}
TrackedBreachesClient is a client for the TrackedBreaches schema.
func NewTrackedBreachesClient ¶
func NewTrackedBreachesClient(c config) *TrackedBreachesClient
NewTrackedBreachesClient returns a client for the TrackedBreaches from the given config.
func (*TrackedBreachesClient) Create ¶
func (c *TrackedBreachesClient) Create() *TrackedBreachesCreate
Create returns a builder for creating a TrackedBreaches entity.
func (*TrackedBreachesClient) CreateBulk ¶
func (c *TrackedBreachesClient) CreateBulk(builders ...*TrackedBreachesCreate) *TrackedBreachesCreateBulk
CreateBulk returns a builder for creating a bulk of TrackedBreaches entities.
func (*TrackedBreachesClient) Delete ¶
func (c *TrackedBreachesClient) Delete() *TrackedBreachesDelete
Delete returns a delete builder for TrackedBreaches.
func (*TrackedBreachesClient) DeleteOne ¶
func (c *TrackedBreachesClient) DeleteOne(tb *TrackedBreaches) *TrackedBreachesDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TrackedBreachesClient) DeleteOneID ¶
func (c *TrackedBreachesClient) DeleteOneID(id uuid.UUID) *TrackedBreachesDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TrackedBreachesClient) Get ¶
func (c *TrackedBreachesClient) Get(ctx context.Context, id uuid.UUID) (*TrackedBreaches, error)
Get returns a TrackedBreaches entity by its id.
func (*TrackedBreachesClient) GetX ¶
func (c *TrackedBreachesClient) GetX(ctx context.Context, id uuid.UUID) *TrackedBreaches
GetX is like Get, but panics if an error occurs.
func (*TrackedBreachesClient) Hooks ¶
func (c *TrackedBreachesClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TrackedBreachesClient) Intercept ¶
func (c *TrackedBreachesClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `trackedbreaches.Intercept(f(g(h())))`.
func (*TrackedBreachesClient) Interceptors ¶
func (c *TrackedBreachesClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TrackedBreachesClient) Query ¶
func (c *TrackedBreachesClient) Query() *TrackedBreachesQuery
Query returns a query builder for TrackedBreaches.
func (*TrackedBreachesClient) QueryHibp ¶
func (c *TrackedBreachesClient) QueryHibp(tb *TrackedBreaches) *HIBPQuery
QueryHibp queries the hibp edge of a TrackedBreaches.
func (*TrackedBreachesClient) QueryLocalbreach ¶
func (c *TrackedBreachesClient) QueryLocalbreach(tb *TrackedBreaches) *LocalBreachQuery
QueryLocalbreach queries the localbreach edge of a TrackedBreaches.
func (*TrackedBreachesClient) QueryUser ¶
func (c *TrackedBreachesClient) QueryUser(tb *TrackedBreaches) *UserQuery
QueryUser queries the user edge of a TrackedBreaches.
func (*TrackedBreachesClient) Update ¶
func (c *TrackedBreachesClient) Update() *TrackedBreachesUpdate
Update returns an update builder for TrackedBreaches.
func (*TrackedBreachesClient) UpdateOne ¶
func (c *TrackedBreachesClient) UpdateOne(tb *TrackedBreaches) *TrackedBreachesUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TrackedBreachesClient) UpdateOneID ¶
func (c *TrackedBreachesClient) UpdateOneID(id uuid.UUID) *TrackedBreachesUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TrackedBreachesClient) Use ¶
func (c *TrackedBreachesClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `trackedbreaches.Hooks(f(g(h())))`.
type TrackedBreachesCreate ¶
type TrackedBreachesCreate struct {
// contains filtered or unexported fields
}
TrackedBreachesCreate is the builder for creating a TrackedBreaches entity.
func (*TrackedBreachesCreate) AddHibp ¶
func (tbc *TrackedBreachesCreate) AddHibp(h ...*HIBP) *TrackedBreachesCreate
AddHibp adds the "hibp" edges to the HIBP entity.
func (*TrackedBreachesCreate) AddHibpIDs ¶
func (tbc *TrackedBreachesCreate) AddHibpIDs(ids ...uuid.UUID) *TrackedBreachesCreate
AddHibpIDs adds the "hibp" edge to the HIBP entity by IDs.
func (*TrackedBreachesCreate) AddLocalbreach ¶
func (tbc *TrackedBreachesCreate) AddLocalbreach(l ...*LocalBreach) *TrackedBreachesCreate
AddLocalbreach adds the "localbreach" edges to the LocalBreach entity.
func (*TrackedBreachesCreate) AddLocalbreachIDs ¶
func (tbc *TrackedBreachesCreate) AddLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesCreate
AddLocalbreachIDs adds the "localbreach" edge to the LocalBreach entity by IDs.
func (*TrackedBreachesCreate) Exec ¶
func (tbc *TrackedBreachesCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TrackedBreachesCreate) ExecX ¶
func (tbc *TrackedBreachesCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TrackedBreachesCreate) Mutation ¶
func (tbc *TrackedBreachesCreate) Mutation() *TrackedBreachesMutation
Mutation returns the TrackedBreachesMutation object of the builder.
func (*TrackedBreachesCreate) Save ¶
func (tbc *TrackedBreachesCreate) Save(ctx context.Context) (*TrackedBreaches, error)
Save creates the TrackedBreaches in the database.
func (*TrackedBreachesCreate) SaveX ¶
func (tbc *TrackedBreachesCreate) SaveX(ctx context.Context) *TrackedBreaches
SaveX calls Save and panics if Save returns an error.
func (*TrackedBreachesCreate) SetBreach ¶
func (tbc *TrackedBreachesCreate) SetBreach(u uuid.UUID) *TrackedBreachesCreate
SetBreach sets the "breach" field.
func (*TrackedBreachesCreate) SetID ¶
func (tbc *TrackedBreachesCreate) SetID(u uuid.UUID) *TrackedBreachesCreate
SetID sets the "id" field.
func (*TrackedBreachesCreate) SetNillableID ¶
func (tbc *TrackedBreachesCreate) SetNillableID(u *uuid.UUID) *TrackedBreachesCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TrackedBreachesCreate) SetNillableOnline ¶
func (tbc *TrackedBreachesCreate) SetNillableOnline(b *bool) *TrackedBreachesCreate
SetNillableOnline sets the "online" field if the given value is not nil.
func (*TrackedBreachesCreate) SetOnline ¶
func (tbc *TrackedBreachesCreate) SetOnline(b bool) *TrackedBreachesCreate
SetOnline sets the "online" field.
func (*TrackedBreachesCreate) SetOwner ¶
func (tbc *TrackedBreachesCreate) SetOwner(u uuid.UUID) *TrackedBreachesCreate
SetOwner sets the "owner" field.
func (*TrackedBreachesCreate) SetUser ¶
func (tbc *TrackedBreachesCreate) SetUser(u *User) *TrackedBreachesCreate
SetUser sets the "user" edge to the User entity.
func (*TrackedBreachesCreate) SetUserID ¶
func (tbc *TrackedBreachesCreate) SetUserID(id uuid.UUID) *TrackedBreachesCreate
SetUserID sets the "user" edge to the User entity by ID.
type TrackedBreachesCreateBulk ¶
type TrackedBreachesCreateBulk struct {
// contains filtered or unexported fields
}
TrackedBreachesCreateBulk is the builder for creating many TrackedBreaches entities in bulk.
func (*TrackedBreachesCreateBulk) Exec ¶
func (tbcb *TrackedBreachesCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TrackedBreachesCreateBulk) ExecX ¶
func (tbcb *TrackedBreachesCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TrackedBreachesCreateBulk) Save ¶
func (tbcb *TrackedBreachesCreateBulk) Save(ctx context.Context) ([]*TrackedBreaches, error)
Save creates the TrackedBreaches entities in the database.
func (*TrackedBreachesCreateBulk) SaveX ¶
func (tbcb *TrackedBreachesCreateBulk) SaveX(ctx context.Context) []*TrackedBreaches
SaveX is like Save, but panics if an error occurs.
type TrackedBreachesDelete ¶
type TrackedBreachesDelete struct {
// contains filtered or unexported fields
}
TrackedBreachesDelete is the builder for deleting a TrackedBreaches entity.
func (*TrackedBreachesDelete) Exec ¶
func (tbd *TrackedBreachesDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TrackedBreachesDelete) ExecX ¶
func (tbd *TrackedBreachesDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TrackedBreachesDelete) Where ¶
func (tbd *TrackedBreachesDelete) Where(ps ...predicate.TrackedBreaches) *TrackedBreachesDelete
Where appends a list predicates to the TrackedBreachesDelete builder.
type TrackedBreachesDeleteOne ¶
type TrackedBreachesDeleteOne struct {
// contains filtered or unexported fields
}
TrackedBreachesDeleteOne is the builder for deleting a single TrackedBreaches entity.
func (*TrackedBreachesDeleteOne) Exec ¶
func (tbdo *TrackedBreachesDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TrackedBreachesDeleteOne) ExecX ¶
func (tbdo *TrackedBreachesDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TrackedBreachesDeleteOne) Where ¶
func (tbdo *TrackedBreachesDeleteOne) Where(ps ...predicate.TrackedBreaches) *TrackedBreachesDeleteOne
Where appends a list predicates to the TrackedBreachesDelete builder.
type TrackedBreachesEdges ¶
type TrackedBreachesEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Localbreach holds the value of the localbreach edge. Localbreach []*LocalBreach `json:"localbreach,omitempty"` // Hibp holds the value of the hibp edge. Hibp []*HIBP `json:"hibp,omitempty"` // contains filtered or unexported fields }
TrackedBreachesEdges holds the relations/edges for other nodes in the graph.
func (TrackedBreachesEdges) HibpOrErr ¶
func (e TrackedBreachesEdges) HibpOrErr() ([]*HIBP, error)
HibpOrErr returns the Hibp value or an error if the edge was not loaded in eager-loading.
func (TrackedBreachesEdges) LocalbreachOrErr ¶
func (e TrackedBreachesEdges) LocalbreachOrErr() ([]*LocalBreach, error)
LocalbreachOrErr returns the Localbreach value or an error if the edge was not loaded in eager-loading.
func (TrackedBreachesEdges) UserOrErr ¶
func (e TrackedBreachesEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TrackedBreachesGroupBy ¶
type TrackedBreachesGroupBy struct {
// contains filtered or unexported fields
}
TrackedBreachesGroupBy is the group-by builder for TrackedBreaches entities.
func (*TrackedBreachesGroupBy) Aggregate ¶
func (tbgb *TrackedBreachesGroupBy) Aggregate(fns ...AggregateFunc) *TrackedBreachesGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TrackedBreachesGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TrackedBreachesGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesGroupBy) Scan ¶
func (tbgb *TrackedBreachesGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TrackedBreachesGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TrackedBreachesMutation ¶
type TrackedBreachesMutation struct {
// contains filtered or unexported fields
}
TrackedBreachesMutation represents an operation that mutates the TrackedBreaches nodes in the graph.
func (*TrackedBreachesMutation) AddField ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) AddHibpIDs ¶
func (m *TrackedBreachesMutation) AddHibpIDs(ids ...uuid.UUID)
AddHibpIDs adds the "hibp" edge to the HIBP entity by ids.
func (*TrackedBreachesMutation) AddLocalbreachIDs ¶
func (m *TrackedBreachesMutation) AddLocalbreachIDs(ids ...uuid.UUID)
AddLocalbreachIDs adds the "localbreach" edge to the LocalBreach entity by ids.
func (*TrackedBreachesMutation) AddedEdges ¶
func (m *TrackedBreachesMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TrackedBreachesMutation) AddedField ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) AddedFields ¶
func (m *TrackedBreachesMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TrackedBreachesMutation) AddedIDs ¶
func (m *TrackedBreachesMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TrackedBreachesMutation) Breach ¶
func (m *TrackedBreachesMutation) Breach() (r uuid.UUID, exists bool)
Breach returns the value of the "breach" field in the mutation.
func (*TrackedBreachesMutation) ClearEdge ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) ClearField ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) ClearHibp ¶
func (m *TrackedBreachesMutation) ClearHibp()
ClearHibp clears the "hibp" edge to the HIBP entity.
func (*TrackedBreachesMutation) ClearLocalbreach ¶
func (m *TrackedBreachesMutation) ClearLocalbreach()
ClearLocalbreach clears the "localbreach" edge to the LocalBreach entity.
func (*TrackedBreachesMutation) ClearUser ¶
func (m *TrackedBreachesMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*TrackedBreachesMutation) ClearedEdges ¶
func (m *TrackedBreachesMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TrackedBreachesMutation) ClearedFields ¶
func (m *TrackedBreachesMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TrackedBreachesMutation) Client ¶
func (m TrackedBreachesMutation) 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 (*TrackedBreachesMutation) EdgeCleared ¶
func (m *TrackedBreachesMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TrackedBreachesMutation) Field ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) FieldCleared ¶
func (m *TrackedBreachesMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TrackedBreachesMutation) Fields ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) HibpCleared ¶
func (m *TrackedBreachesMutation) HibpCleared() bool
HibpCleared reports if the "hibp" edge to the HIBP entity was cleared.
func (*TrackedBreachesMutation) HibpIDs ¶
func (m *TrackedBreachesMutation) HibpIDs() (ids []uuid.UUID)
HibpIDs returns the "hibp" edge IDs in the mutation.
func (*TrackedBreachesMutation) ID ¶
func (m *TrackedBreachesMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TrackedBreachesMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TrackedBreachesMutation) LocalbreachCleared ¶
func (m *TrackedBreachesMutation) LocalbreachCleared() bool
LocalbreachCleared reports if the "localbreach" edge to the LocalBreach entity was cleared.
func (*TrackedBreachesMutation) LocalbreachIDs ¶
func (m *TrackedBreachesMutation) LocalbreachIDs() (ids []uuid.UUID)
LocalbreachIDs returns the "localbreach" edge IDs in the mutation.
func (*TrackedBreachesMutation) OldBreach ¶
OldBreach returns the old "breach" field's value of the TrackedBreaches entity. If the TrackedBreaches 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 (*TrackedBreachesMutation) 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 (*TrackedBreachesMutation) OldOnline ¶
func (m *TrackedBreachesMutation) OldOnline(ctx context.Context) (v bool, err error)
OldOnline returns the old "online" field's value of the TrackedBreaches entity. If the TrackedBreaches 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 (*TrackedBreachesMutation) OldOwner ¶
OldOwner returns the old "owner" field's value of the TrackedBreaches entity. If the TrackedBreaches 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 (*TrackedBreachesMutation) Online ¶
func (m *TrackedBreachesMutation) Online() (r bool, exists bool)
Online returns the value of the "online" field in the mutation.
func (*TrackedBreachesMutation) Op ¶
func (m *TrackedBreachesMutation) Op() Op
Op returns the operation name.
func (*TrackedBreachesMutation) Owner ¶
func (m *TrackedBreachesMutation) Owner() (r uuid.UUID, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*TrackedBreachesMutation) RemoveHibpIDs ¶
func (m *TrackedBreachesMutation) RemoveHibpIDs(ids ...uuid.UUID)
RemoveHibpIDs removes the "hibp" edge to the HIBP entity by IDs.
func (*TrackedBreachesMutation) RemoveLocalbreachIDs ¶
func (m *TrackedBreachesMutation) RemoveLocalbreachIDs(ids ...uuid.UUID)
RemoveLocalbreachIDs removes the "localbreach" edge to the LocalBreach entity by IDs.
func (*TrackedBreachesMutation) RemovedEdges ¶
func (m *TrackedBreachesMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TrackedBreachesMutation) RemovedHibpIDs ¶
func (m *TrackedBreachesMutation) RemovedHibpIDs() (ids []uuid.UUID)
RemovedHibp returns the removed IDs of the "hibp" edge to the HIBP entity.
func (*TrackedBreachesMutation) RemovedIDs ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) RemovedLocalbreachIDs ¶
func (m *TrackedBreachesMutation) RemovedLocalbreachIDs() (ids []uuid.UUID)
RemovedLocalbreach returns the removed IDs of the "localbreach" edge to the LocalBreach entity.
func (*TrackedBreachesMutation) ResetBreach ¶
func (m *TrackedBreachesMutation) ResetBreach()
ResetBreach resets all changes to the "breach" field.
func (*TrackedBreachesMutation) ResetEdge ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) ResetField ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) ResetHibp ¶
func (m *TrackedBreachesMutation) ResetHibp()
ResetHibp resets all changes to the "hibp" edge.
func (*TrackedBreachesMutation) ResetLocalbreach ¶
func (m *TrackedBreachesMutation) ResetLocalbreach()
ResetLocalbreach resets all changes to the "localbreach" edge.
func (*TrackedBreachesMutation) ResetOnline ¶
func (m *TrackedBreachesMutation) ResetOnline()
ResetOnline resets all changes to the "online" field.
func (*TrackedBreachesMutation) ResetOwner ¶
func (m *TrackedBreachesMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*TrackedBreachesMutation) ResetUser ¶
func (m *TrackedBreachesMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*TrackedBreachesMutation) SetBreach ¶
func (m *TrackedBreachesMutation) SetBreach(u uuid.UUID)
SetBreach sets the "breach" field.
func (*TrackedBreachesMutation) SetField ¶
func (m *TrackedBreachesMutation) 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 (*TrackedBreachesMutation) SetID ¶
func (m *TrackedBreachesMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TrackedBreaches entities.
func (*TrackedBreachesMutation) SetOnline ¶
func (m *TrackedBreachesMutation) SetOnline(b bool)
SetOnline sets the "online" field.
func (*TrackedBreachesMutation) SetOp ¶
func (m *TrackedBreachesMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TrackedBreachesMutation) SetOwner ¶
func (m *TrackedBreachesMutation) SetOwner(u uuid.UUID)
SetOwner sets the "owner" field.
func (*TrackedBreachesMutation) SetUserID ¶
func (m *TrackedBreachesMutation) SetUserID(id uuid.UUID)
SetUserID sets the "user" edge to the User entity by id.
func (TrackedBreachesMutation) Tx ¶
func (m TrackedBreachesMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TrackedBreachesMutation) Type ¶
func (m *TrackedBreachesMutation) Type() string
Type returns the node type of this mutation (TrackedBreaches).
func (*TrackedBreachesMutation) UserCleared ¶
func (m *TrackedBreachesMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*TrackedBreachesMutation) UserID ¶
func (m *TrackedBreachesMutation) UserID() (id uuid.UUID, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*TrackedBreachesMutation) UserIDs ¶
func (m *TrackedBreachesMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*TrackedBreachesMutation) Where ¶
func (m *TrackedBreachesMutation) Where(ps ...predicate.TrackedBreaches)
Where appends a list predicates to the TrackedBreachesMutation builder.
func (*TrackedBreachesMutation) WhereP ¶
func (m *TrackedBreachesMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TrackedBreachesMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TrackedBreachesQuery ¶
type TrackedBreachesQuery struct {
// contains filtered or unexported fields
}
TrackedBreachesQuery is the builder for querying TrackedBreaches entities.
func (*TrackedBreachesQuery) Aggregate ¶
func (tbq *TrackedBreachesQuery) Aggregate(fns ...AggregateFunc) *TrackedBreachesSelect
Aggregate returns a TrackedBreachesSelect configured with the given aggregations.
func (*TrackedBreachesQuery) All ¶
func (tbq *TrackedBreachesQuery) All(ctx context.Context) ([]*TrackedBreaches, error)
All executes the query and returns a list of TrackedBreachesSlice.
func (*TrackedBreachesQuery) AllX ¶
func (tbq *TrackedBreachesQuery) AllX(ctx context.Context) []*TrackedBreaches
AllX is like All, but panics if an error occurs.
func (*TrackedBreachesQuery) Clone ¶
func (tbq *TrackedBreachesQuery) Clone() *TrackedBreachesQuery
Clone returns a duplicate of the TrackedBreachesQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TrackedBreachesQuery) Count ¶
func (tbq *TrackedBreachesQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TrackedBreachesQuery) CountX ¶
func (tbq *TrackedBreachesQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TrackedBreachesQuery) Exist ¶
func (tbq *TrackedBreachesQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TrackedBreachesQuery) ExistX ¶
func (tbq *TrackedBreachesQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TrackedBreachesQuery) First ¶
func (tbq *TrackedBreachesQuery) First(ctx context.Context) (*TrackedBreaches, error)
First returns the first TrackedBreaches entity from the query. Returns a *NotFoundError when no TrackedBreaches was found.
func (*TrackedBreachesQuery) FirstID ¶
FirstID returns the first TrackedBreaches ID from the query. Returns a *NotFoundError when no TrackedBreaches ID was found.
func (*TrackedBreachesQuery) FirstIDX ¶
func (tbq *TrackedBreachesQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*TrackedBreachesQuery) FirstX ¶
func (tbq *TrackedBreachesQuery) FirstX(ctx context.Context) *TrackedBreaches
FirstX is like First, but panics if an error occurs.
func (*TrackedBreachesQuery) GroupBy ¶
func (tbq *TrackedBreachesQuery) GroupBy(field string, fields ...string) *TrackedBreachesGroupBy
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 { Breach uuid.UUID `json:"breach,omitempty"` Count int `json:"count,omitempty"` } client.TrackedBreaches.Query(). GroupBy(trackedbreaches.FieldBreach). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TrackedBreachesQuery) IDs ¶
IDs executes the query and returns a list of TrackedBreaches IDs.
func (*TrackedBreachesQuery) IDsX ¶
func (tbq *TrackedBreachesQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*TrackedBreachesQuery) Limit ¶
func (tbq *TrackedBreachesQuery) Limit(limit int) *TrackedBreachesQuery
Limit the number of records to be returned by this query.
func (*TrackedBreachesQuery) Offset ¶
func (tbq *TrackedBreachesQuery) Offset(offset int) *TrackedBreachesQuery
Offset to start from.
func (*TrackedBreachesQuery) Only ¶
func (tbq *TrackedBreachesQuery) Only(ctx context.Context) (*TrackedBreaches, error)
Only returns a single TrackedBreaches entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TrackedBreaches entity is found. Returns a *NotFoundError when no TrackedBreaches entities are found.
func (*TrackedBreachesQuery) OnlyID ¶
OnlyID is like Only, but returns the only TrackedBreaches ID in the query. Returns a *NotSingularError when more than one TrackedBreaches ID is found. Returns a *NotFoundError when no entities are found.
func (*TrackedBreachesQuery) OnlyIDX ¶
func (tbq *TrackedBreachesQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TrackedBreachesQuery) OnlyX ¶
func (tbq *TrackedBreachesQuery) OnlyX(ctx context.Context) *TrackedBreaches
OnlyX is like Only, but panics if an error occurs.
func (*TrackedBreachesQuery) Order ¶
func (tbq *TrackedBreachesQuery) Order(o ...trackedbreaches.OrderOption) *TrackedBreachesQuery
Order specifies how the records should be ordered.
func (*TrackedBreachesQuery) QueryHibp ¶
func (tbq *TrackedBreachesQuery) QueryHibp() *HIBPQuery
QueryHibp chains the current query on the "hibp" edge.
func (*TrackedBreachesQuery) QueryLocalbreach ¶
func (tbq *TrackedBreachesQuery) QueryLocalbreach() *LocalBreachQuery
QueryLocalbreach chains the current query on the "localbreach" edge.
func (*TrackedBreachesQuery) QueryUser ¶
func (tbq *TrackedBreachesQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*TrackedBreachesQuery) Select ¶
func (tbq *TrackedBreachesQuery) Select(fields ...string) *TrackedBreachesSelect
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 { Breach uuid.UUID `json:"breach,omitempty"` } client.TrackedBreaches.Query(). Select(trackedbreaches.FieldBreach). Scan(ctx, &v)
func (*TrackedBreachesQuery) Unique ¶
func (tbq *TrackedBreachesQuery) Unique(unique bool) *TrackedBreachesQuery
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 (*TrackedBreachesQuery) Where ¶
func (tbq *TrackedBreachesQuery) Where(ps ...predicate.TrackedBreaches) *TrackedBreachesQuery
Where adds a new predicate for the TrackedBreachesQuery builder.
func (*TrackedBreachesQuery) WithHibp ¶
func (tbq *TrackedBreachesQuery) WithHibp(opts ...func(*HIBPQuery)) *TrackedBreachesQuery
WithHibp tells the query-builder to eager-load the nodes that are connected to the "hibp" edge. The optional arguments are used to configure the query builder of the edge.
func (*TrackedBreachesQuery) WithLocalbreach ¶
func (tbq *TrackedBreachesQuery) WithLocalbreach(opts ...func(*LocalBreachQuery)) *TrackedBreachesQuery
WithLocalbreach tells the query-builder to eager-load the nodes that are connected to the "localbreach" edge. The optional arguments are used to configure the query builder of the edge.
func (*TrackedBreachesQuery) WithUser ¶
func (tbq *TrackedBreachesQuery) WithUser(opts ...func(*UserQuery)) *TrackedBreachesQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type TrackedBreachesSelect ¶
type TrackedBreachesSelect struct { *TrackedBreachesQuery // contains filtered or unexported fields }
TrackedBreachesSelect is the builder for selecting fields of TrackedBreaches entities.
func (*TrackedBreachesSelect) Aggregate ¶
func (tbs *TrackedBreachesSelect) Aggregate(fns ...AggregateFunc) *TrackedBreachesSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TrackedBreachesSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TrackedBreachesSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TrackedBreachesSelect) Scan ¶
func (tbs *TrackedBreachesSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TrackedBreachesSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TrackedBreachesSlice ¶
type TrackedBreachesSlice []*TrackedBreaches
TrackedBreachesSlice is a parsable slice of TrackedBreaches.
type TrackedBreachesUpdate ¶
type TrackedBreachesUpdate struct {
// contains filtered or unexported fields
}
TrackedBreachesUpdate is the builder for updating TrackedBreaches entities.
func (*TrackedBreachesUpdate) AddHibp ¶
func (tbu *TrackedBreachesUpdate) AddHibp(h ...*HIBP) *TrackedBreachesUpdate
AddHibp adds the "hibp" edges to the HIBP entity.
func (*TrackedBreachesUpdate) AddHibpIDs ¶
func (tbu *TrackedBreachesUpdate) AddHibpIDs(ids ...uuid.UUID) *TrackedBreachesUpdate
AddHibpIDs adds the "hibp" edge to the HIBP entity by IDs.
func (*TrackedBreachesUpdate) AddLocalbreach ¶
func (tbu *TrackedBreachesUpdate) AddLocalbreach(l ...*LocalBreach) *TrackedBreachesUpdate
AddLocalbreach adds the "localbreach" edges to the LocalBreach entity.
func (*TrackedBreachesUpdate) AddLocalbreachIDs ¶
func (tbu *TrackedBreachesUpdate) AddLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesUpdate
AddLocalbreachIDs adds the "localbreach" edge to the LocalBreach entity by IDs.
func (*TrackedBreachesUpdate) ClearHibp ¶
func (tbu *TrackedBreachesUpdate) ClearHibp() *TrackedBreachesUpdate
ClearHibp clears all "hibp" edges to the HIBP entity.
func (*TrackedBreachesUpdate) ClearLocalbreach ¶
func (tbu *TrackedBreachesUpdate) ClearLocalbreach() *TrackedBreachesUpdate
ClearLocalbreach clears all "localbreach" edges to the LocalBreach entity.
func (*TrackedBreachesUpdate) Exec ¶
func (tbu *TrackedBreachesUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TrackedBreachesUpdate) ExecX ¶
func (tbu *TrackedBreachesUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TrackedBreachesUpdate) Mutation ¶
func (tbu *TrackedBreachesUpdate) Mutation() *TrackedBreachesMutation
Mutation returns the TrackedBreachesMutation object of the builder.
func (*TrackedBreachesUpdate) RemoveHibp ¶
func (tbu *TrackedBreachesUpdate) RemoveHibp(h ...*HIBP) *TrackedBreachesUpdate
RemoveHibp removes "hibp" edges to HIBP entities.
func (*TrackedBreachesUpdate) RemoveHibpIDs ¶
func (tbu *TrackedBreachesUpdate) RemoveHibpIDs(ids ...uuid.UUID) *TrackedBreachesUpdate
RemoveHibpIDs removes the "hibp" edge to HIBP entities by IDs.
func (*TrackedBreachesUpdate) RemoveLocalbreach ¶
func (tbu *TrackedBreachesUpdate) RemoveLocalbreach(l ...*LocalBreach) *TrackedBreachesUpdate
RemoveLocalbreach removes "localbreach" edges to LocalBreach entities.
func (*TrackedBreachesUpdate) RemoveLocalbreachIDs ¶
func (tbu *TrackedBreachesUpdate) RemoveLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesUpdate
RemoveLocalbreachIDs removes the "localbreach" edge to LocalBreach entities by IDs.
func (*TrackedBreachesUpdate) Save ¶
func (tbu *TrackedBreachesUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TrackedBreachesUpdate) SaveX ¶
func (tbu *TrackedBreachesUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TrackedBreachesUpdate) SetBreach ¶
func (tbu *TrackedBreachesUpdate) SetBreach(u uuid.UUID) *TrackedBreachesUpdate
SetBreach sets the "breach" field.
func (*TrackedBreachesUpdate) Where ¶
func (tbu *TrackedBreachesUpdate) Where(ps ...predicate.TrackedBreaches) *TrackedBreachesUpdate
Where appends a list predicates to the TrackedBreachesUpdate builder.
type TrackedBreachesUpdateOne ¶
type TrackedBreachesUpdateOne struct {
// contains filtered or unexported fields
}
TrackedBreachesUpdateOne is the builder for updating a single TrackedBreaches entity.
func (*TrackedBreachesUpdateOne) AddHibp ¶
func (tbuo *TrackedBreachesUpdateOne) AddHibp(h ...*HIBP) *TrackedBreachesUpdateOne
AddHibp adds the "hibp" edges to the HIBP entity.
func (*TrackedBreachesUpdateOne) AddHibpIDs ¶
func (tbuo *TrackedBreachesUpdateOne) AddHibpIDs(ids ...uuid.UUID) *TrackedBreachesUpdateOne
AddHibpIDs adds the "hibp" edge to the HIBP entity by IDs.
func (*TrackedBreachesUpdateOne) AddLocalbreach ¶
func (tbuo *TrackedBreachesUpdateOne) AddLocalbreach(l ...*LocalBreach) *TrackedBreachesUpdateOne
AddLocalbreach adds the "localbreach" edges to the LocalBreach entity.
func (*TrackedBreachesUpdateOne) AddLocalbreachIDs ¶
func (tbuo *TrackedBreachesUpdateOne) AddLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesUpdateOne
AddLocalbreachIDs adds the "localbreach" edge to the LocalBreach entity by IDs.
func (*TrackedBreachesUpdateOne) ClearHibp ¶
func (tbuo *TrackedBreachesUpdateOne) ClearHibp() *TrackedBreachesUpdateOne
ClearHibp clears all "hibp" edges to the HIBP entity.
func (*TrackedBreachesUpdateOne) ClearLocalbreach ¶
func (tbuo *TrackedBreachesUpdateOne) ClearLocalbreach() *TrackedBreachesUpdateOne
ClearLocalbreach clears all "localbreach" edges to the LocalBreach entity.
func (*TrackedBreachesUpdateOne) Exec ¶
func (tbuo *TrackedBreachesUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TrackedBreachesUpdateOne) ExecX ¶
func (tbuo *TrackedBreachesUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TrackedBreachesUpdateOne) Mutation ¶
func (tbuo *TrackedBreachesUpdateOne) Mutation() *TrackedBreachesMutation
Mutation returns the TrackedBreachesMutation object of the builder.
func (*TrackedBreachesUpdateOne) RemoveHibp ¶
func (tbuo *TrackedBreachesUpdateOne) RemoveHibp(h ...*HIBP) *TrackedBreachesUpdateOne
RemoveHibp removes "hibp" edges to HIBP entities.
func (*TrackedBreachesUpdateOne) RemoveHibpIDs ¶
func (tbuo *TrackedBreachesUpdateOne) RemoveHibpIDs(ids ...uuid.UUID) *TrackedBreachesUpdateOne
RemoveHibpIDs removes the "hibp" edge to HIBP entities by IDs.
func (*TrackedBreachesUpdateOne) RemoveLocalbreach ¶
func (tbuo *TrackedBreachesUpdateOne) RemoveLocalbreach(l ...*LocalBreach) *TrackedBreachesUpdateOne
RemoveLocalbreach removes "localbreach" edges to LocalBreach entities.
func (*TrackedBreachesUpdateOne) RemoveLocalbreachIDs ¶
func (tbuo *TrackedBreachesUpdateOne) RemoveLocalbreachIDs(ids ...uuid.UUID) *TrackedBreachesUpdateOne
RemoveLocalbreachIDs removes the "localbreach" edge to LocalBreach entities by IDs.
func (*TrackedBreachesUpdateOne) Save ¶
func (tbuo *TrackedBreachesUpdateOne) Save(ctx context.Context) (*TrackedBreaches, error)
Save executes the query and returns the updated TrackedBreaches entity.
func (*TrackedBreachesUpdateOne) SaveX ¶
func (tbuo *TrackedBreachesUpdateOne) SaveX(ctx context.Context) *TrackedBreaches
SaveX is like Save, but panics if an error occurs.
func (*TrackedBreachesUpdateOne) Select ¶
func (tbuo *TrackedBreachesUpdateOne) Select(field string, fields ...string) *TrackedBreachesUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TrackedBreachesUpdateOne) SetBreach ¶
func (tbuo *TrackedBreachesUpdateOne) SetBreach(u uuid.UUID) *TrackedBreachesUpdateOne
SetBreach sets the "breach" field.
func (*TrackedBreachesUpdateOne) Where ¶
func (tbuo *TrackedBreachesUpdateOne) Where(ps ...predicate.TrackedBreaches) *TrackedBreachesUpdateOne
Where appends a list predicates to the TrackedBreachesUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // AgeKey is the client for interacting with the AgeKey builders. AgeKey *AgeKeyClient // HIBP is the client for interacting with the HIBP builders. HIBP *HIBPClient // LocalBreach is the client for interacting with the LocalBreach builders. LocalBreach *LocalBreachClient // SearchQuery is the client for interacting with the SearchQuery builders. SearchQuery *SearchQueryClient // Settings is the client for interacting with the Settings builders. Settings *SettingsClient // Setup is the client for interacting with the Setup builders. Setup *SetupClient // TrackedBreaches is the client for interacting with the TrackedBreaches builders. TrackedBreaches *TrackedBreachesClient // User is the client for interacting with the User builders. User *UserClient // 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 User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // user's handle, allowed `<>~+-_` symbols and alphanumeric ASCII characters, including capital letters Username string `json:"username,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Password holds the value of the "password" field. Password []byte `json:"-"` // IsAdmin holds the value of the "is_admin" field. IsAdmin bool `json:"is_admin,omitempty"` // IsActive holds the value of the "is_active" field. IsActive bool `json:"is_active,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // LastLogin holds the value of the "last_login" field. LastLogin time.Time `json:"last_login,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryAgekey ¶
func (u *User) QueryAgekey() *AgeKeyQuery
QueryAgekey queries the "agekey" edge of the User entity.
func (*User) QuerySearchQueries ¶
func (u *User) QuerySearchQueries() *SearchQueryQuery
QuerySearchQueries queries the "search_queries" edge of the User entity.
func (*User) QueryTrackedBreaches ¶
func (u *User) QueryTrackedBreaches() *TrackedBreachesQuery
QueryTrackedBreaches queries the "tracked_breaches" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryAgekey ¶
func (c *UserClient) QueryAgekey(u *User) *AgeKeyQuery
QueryAgekey queries the agekey edge of a User.
func (*UserClient) QuerySearchQueries ¶
func (c *UserClient) QuerySearchQueries(u *User) *SearchQueryQuery
QuerySearchQueries queries the search_queries edge of a User.
func (*UserClient) QueryTrackedBreaches ¶
func (c *UserClient) QueryTrackedBreaches(u *User) *TrackedBreachesQuery
QueryTrackedBreaches queries the tracked_breaches edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddSearchQueries ¶
func (uc *UserCreate) AddSearchQueries(s ...*SearchQuery) *UserCreate
AddSearchQueries adds the "search_queries" edges to the SearchQuery entity.
func (*UserCreate) AddSearchQueryIDs ¶
func (uc *UserCreate) AddSearchQueryIDs(ids ...uuid.UUID) *UserCreate
AddSearchQueryIDs adds the "search_queries" edge to the SearchQuery entity by IDs.
func (*UserCreate) AddTrackedBreachIDs ¶
func (uc *UserCreate) AddTrackedBreachIDs(ids ...uuid.UUID) *UserCreate
AddTrackedBreachIDs adds the "tracked_breaches" edge to the TrackedBreaches entity by IDs.
func (*UserCreate) AddTrackedBreaches ¶
func (uc *UserCreate) AddTrackedBreaches(t ...*TrackedBreaches) *UserCreate
AddTrackedBreaches adds the "tracked_breaches" edges to the TrackedBreaches entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAgekey ¶
func (uc *UserCreate) SetAgekey(a *AgeKey) *UserCreate
SetAgekey sets the "agekey" edge to the AgeKey entity.
func (*UserCreate) SetAgekeyID ¶
func (uc *UserCreate) SetAgekeyID(id uuid.UUID) *UserCreate
SetAgekeyID sets the "agekey" edge to the AgeKey entity by ID.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIsActive ¶
func (uc *UserCreate) SetIsActive(b bool) *UserCreate
SetIsActive sets the "is_active" field.
func (*UserCreate) SetIsAdmin ¶
func (uc *UserCreate) SetIsAdmin(b bool) *UserCreate
SetIsAdmin sets the "is_admin" field.
func (*UserCreate) SetLastLogin ¶
func (uc *UserCreate) SetLastLogin(t time.Time) *UserCreate
SetLastLogin sets the "last_login" field.
func (*UserCreate) SetNillableAgekeyID ¶
func (uc *UserCreate) SetNillableAgekeyID(id *uuid.UUID) *UserCreate
SetNillableAgekeyID sets the "agekey" edge to the AgeKey entity by ID if the given value is not nil.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableIsActive ¶
func (uc *UserCreate) SetNillableIsActive(b *bool) *UserCreate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*UserCreate) SetNillableIsAdmin ¶
func (uc *UserCreate) SetNillableIsAdmin(b *bool) *UserCreate
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserCreate) SetNillableLastLogin ¶
func (uc *UserCreate) SetNillableLastLogin(t *time.Time) *UserCreate
SetNillableLastLogin sets the "last_login" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(b []byte) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Agekey holds the value of the agekey edge. Agekey *AgeKey `json:"agekey,omitempty"` // TrackedBreaches holds the value of the tracked_breaches edge. TrackedBreaches []*TrackedBreaches `json:"tracked_breaches,omitempty"` // SearchQueries holds the value of the search_queries edge. SearchQueries []*SearchQuery `json:"search_queries,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) AgekeyOrErr ¶
AgekeyOrErr returns the Agekey value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) SearchQueriesOrErr ¶
func (e UserEdges) SearchQueriesOrErr() ([]*SearchQuery, error)
SearchQueriesOrErr returns the SearchQueries value or an error if the edge was not loaded in eager-loading.
func (UserEdges) TrackedBreachesOrErr ¶
func (e UserEdges) TrackedBreachesOrErr() ([]*TrackedBreaches, error)
TrackedBreachesOrErr returns the TrackedBreaches value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddSearchQueryIDs ¶
func (m *UserMutation) AddSearchQueryIDs(ids ...uuid.UUID)
AddSearchQueryIDs adds the "search_queries" edge to the SearchQuery entity by ids.
func (*UserMutation) AddTrackedBreachIDs ¶
func (m *UserMutation) AddTrackedBreachIDs(ids ...uuid.UUID)
AddTrackedBreachIDs adds the "tracked_breaches" edge to the TrackedBreaches entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AgekeyCleared ¶
func (m *UserMutation) AgekeyCleared() bool
AgekeyCleared reports if the "agekey" edge to the AgeKey entity was cleared.
func (*UserMutation) AgekeyID ¶
func (m *UserMutation) AgekeyID() (id uuid.UUID, exists bool)
AgekeyID returns the "agekey" edge ID in the mutation.
func (*UserMutation) AgekeyIDs ¶
func (m *UserMutation) AgekeyIDs() (ids []uuid.UUID)
AgekeyIDs returns the "agekey" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AgekeyID instead. It exists only for internal usage by the builders.
func (*UserMutation) ClearAgekey ¶
func (m *UserMutation) ClearAgekey()
ClearAgekey clears the "agekey" edge to the AgeKey entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearSearchQueries ¶
func (m *UserMutation) ClearSearchQueries()
ClearSearchQueries clears the "search_queries" edge to the SearchQuery entity.
func (*UserMutation) ClearTrackedBreaches ¶
func (m *UserMutation) ClearTrackedBreaches()
ClearTrackedBreaches clears the "tracked_breaches" edge to the TrackedBreaches entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) IsActive ¶
func (m *UserMutation) IsActive() (r bool, exists bool)
IsActive returns the value of the "is_active" field in the mutation.
func (*UserMutation) IsAdmin ¶
func (m *UserMutation) IsAdmin() (r bool, exists bool)
IsAdmin returns the value of the "is_admin" field in the mutation.
func (*UserMutation) LastLogin ¶
func (m *UserMutation) LastLogin() (r time.Time, exists bool)
LastLogin returns the value of the "last_login" field in the mutation.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User 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 (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User 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 (*UserMutation) 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 (*UserMutation) OldIsActive ¶
func (m *UserMutation) OldIsActive(ctx context.Context) (v bool, err error)
OldIsActive returns the old "is_active" field's value of the User entity. If the User 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 (*UserMutation) OldIsAdmin ¶
func (m *UserMutation) OldIsAdmin(ctx context.Context) (v bool, err error)
OldIsAdmin returns the old "is_admin" field's value of the User entity. If the User 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 (*UserMutation) OldLastLogin ¶
OldLastLogin returns the old "last_login" field's value of the User entity. If the User 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 (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v []byte, err error)
OldPassword returns the old "password" field's value of the User entity. If the User 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 (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User 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 (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User 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 (*UserMutation) Password ¶
func (m *UserMutation) Password() (r []byte, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemoveSearchQueryIDs ¶
func (m *UserMutation) RemoveSearchQueryIDs(ids ...uuid.UUID)
RemoveSearchQueryIDs removes the "search_queries" edge to the SearchQuery entity by IDs.
func (*UserMutation) RemoveTrackedBreachIDs ¶
func (m *UserMutation) RemoveTrackedBreachIDs(ids ...uuid.UUID)
RemoveTrackedBreachIDs removes the "tracked_breaches" edge to the TrackedBreaches entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) RemovedSearchQueriesIDs ¶
func (m *UserMutation) RemovedSearchQueriesIDs() (ids []uuid.UUID)
RemovedSearchQueries returns the removed IDs of the "search_queries" edge to the SearchQuery entity.
func (*UserMutation) RemovedTrackedBreachesIDs ¶
func (m *UserMutation) RemovedTrackedBreachesIDs() (ids []uuid.UUID)
RemovedTrackedBreaches returns the removed IDs of the "tracked_breaches" edge to the TrackedBreaches entity.
func (*UserMutation) ResetAgekey ¶
func (m *UserMutation) ResetAgekey()
ResetAgekey resets all changes to the "agekey" edge.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetIsActive ¶
func (m *UserMutation) ResetIsActive()
ResetIsActive resets all changes to the "is_active" field.
func (*UserMutation) ResetIsAdmin ¶
func (m *UserMutation) ResetIsAdmin()
ResetIsAdmin resets all changes to the "is_admin" field.
func (*UserMutation) ResetLastLogin ¶
func (m *UserMutation) ResetLastLogin()
ResetLastLogin resets all changes to the "last_login" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetSearchQueries ¶
func (m *UserMutation) ResetSearchQueries()
ResetSearchQueries resets all changes to the "search_queries" edge.
func (*UserMutation) ResetTrackedBreaches ¶
func (m *UserMutation) ResetTrackedBreaches()
ResetTrackedBreaches resets all changes to the "tracked_breaches" edge.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SearchQueriesCleared ¶
func (m *UserMutation) SearchQueriesCleared() bool
SearchQueriesCleared reports if the "search_queries" edge to the SearchQuery entity was cleared.
func (*UserMutation) SearchQueriesIDs ¶
func (m *UserMutation) SearchQueriesIDs() (ids []uuid.UUID)
SearchQueriesIDs returns the "search_queries" edge IDs in the mutation.
func (*UserMutation) SetAgekeyID ¶
func (m *UserMutation) SetAgekeyID(id uuid.UUID)
SetAgekeyID sets the "agekey" edge to the AgeKey entity by id.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIsActive ¶
func (m *UserMutation) SetIsActive(b bool)
SetIsActive sets the "is_active" field.
func (*UserMutation) SetIsAdmin ¶
func (m *UserMutation) SetIsAdmin(b bool)
SetIsAdmin sets the "is_admin" field.
func (*UserMutation) SetLastLogin ¶
func (m *UserMutation) SetLastLogin(t time.Time)
SetLastLogin sets the "last_login" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(b []byte)
SetPassword sets the "password" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UserMutation) TrackedBreachesCleared ¶
func (m *UserMutation) TrackedBreachesCleared() bool
TrackedBreachesCleared reports if the "tracked_breaches" edge to the TrackedBreaches entity was cleared.
func (*UserMutation) TrackedBreachesIDs ¶
func (m *UserMutation) TrackedBreachesIDs() (ids []uuid.UUID)
TrackedBreachesIDs returns the "tracked_breaches" edge IDs in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
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.User.Query(). GroupBy(user.FieldUsername). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryAgekey ¶
func (uq *UserQuery) QueryAgekey() *AgeKeyQuery
QueryAgekey chains the current query on the "agekey" edge.
func (*UserQuery) QuerySearchQueries ¶
func (uq *UserQuery) QuerySearchQueries() *SearchQueryQuery
QuerySearchQueries chains the current query on the "search_queries" edge.
func (*UserQuery) QueryTrackedBreaches ¶
func (uq *UserQuery) QueryTrackedBreaches() *TrackedBreachesQuery
QueryTrackedBreaches chains the current query on the "tracked_breaches" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
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.User.Query(). Select(user.FieldUsername). Scan(ctx, &v)
func (*UserQuery) 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 (*UserQuery) WithAgekey ¶
func (uq *UserQuery) WithAgekey(opts ...func(*AgeKeyQuery)) *UserQuery
WithAgekey tells the query-builder to eager-load the nodes that are connected to the "agekey" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithSearchQueries ¶
func (uq *UserQuery) WithSearchQueries(opts ...func(*SearchQueryQuery)) *UserQuery
WithSearchQueries tells the query-builder to eager-load the nodes that are connected to the "search_queries" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithTrackedBreaches ¶
func (uq *UserQuery) WithTrackedBreaches(opts ...func(*TrackedBreachesQuery)) *UserQuery
WithTrackedBreaches tells the query-builder to eager-load the nodes that are connected to the "tracked_breaches" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddSearchQueries ¶
func (uu *UserUpdate) AddSearchQueries(s ...*SearchQuery) *UserUpdate
AddSearchQueries adds the "search_queries" edges to the SearchQuery entity.
func (*UserUpdate) AddSearchQueryIDs ¶
func (uu *UserUpdate) AddSearchQueryIDs(ids ...uuid.UUID) *UserUpdate
AddSearchQueryIDs adds the "search_queries" edge to the SearchQuery entity by IDs.
func (*UserUpdate) AddTrackedBreachIDs ¶
func (uu *UserUpdate) AddTrackedBreachIDs(ids ...uuid.UUID) *UserUpdate
AddTrackedBreachIDs adds the "tracked_breaches" edge to the TrackedBreaches entity by IDs.
func (*UserUpdate) AddTrackedBreaches ¶
func (uu *UserUpdate) AddTrackedBreaches(t ...*TrackedBreaches) *UserUpdate
AddTrackedBreaches adds the "tracked_breaches" edges to the TrackedBreaches entity.
func (*UserUpdate) ClearSearchQueries ¶
func (uu *UserUpdate) ClearSearchQueries() *UserUpdate
ClearSearchQueries clears all "search_queries" edges to the SearchQuery entity.
func (*UserUpdate) ClearTrackedBreaches ¶
func (uu *UserUpdate) ClearTrackedBreaches() *UserUpdate
ClearTrackedBreaches clears all "tracked_breaches" edges to the TrackedBreaches entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveSearchQueries ¶
func (uu *UserUpdate) RemoveSearchQueries(s ...*SearchQuery) *UserUpdate
RemoveSearchQueries removes "search_queries" edges to SearchQuery entities.
func (*UserUpdate) RemoveSearchQueryIDs ¶
func (uu *UserUpdate) RemoveSearchQueryIDs(ids ...uuid.UUID) *UserUpdate
RemoveSearchQueryIDs removes the "search_queries" edge to SearchQuery entities by IDs.
func (*UserUpdate) RemoveTrackedBreachIDs ¶
func (uu *UserUpdate) RemoveTrackedBreachIDs(ids ...uuid.UUID) *UserUpdate
RemoveTrackedBreachIDs removes the "tracked_breaches" edge to TrackedBreaches entities by IDs.
func (*UserUpdate) RemoveTrackedBreaches ¶
func (uu *UserUpdate) RemoveTrackedBreaches(t ...*TrackedBreaches) *UserUpdate
RemoveTrackedBreaches removes "tracked_breaches" edges to TrackedBreaches entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetIsActive ¶
func (uu *UserUpdate) SetIsActive(b bool) *UserUpdate
SetIsActive sets the "is_active" field.
func (*UserUpdate) SetIsAdmin ¶
func (uu *UserUpdate) SetIsAdmin(b bool) *UserUpdate
SetIsAdmin sets the "is_admin" field.
func (*UserUpdate) SetLastLogin ¶
func (uu *UserUpdate) SetLastLogin(t time.Time) *UserUpdate
SetLastLogin sets the "last_login" field.
func (*UserUpdate) SetNillableIsActive ¶
func (uu *UserUpdate) SetNillableIsActive(b *bool) *UserUpdate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*UserUpdate) SetNillableIsAdmin ¶
func (uu *UserUpdate) SetNillableIsAdmin(b *bool) *UserUpdate
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserUpdate) SetNillableLastLogin ¶
func (uu *UserUpdate) SetNillableLastLogin(t *time.Time) *UserUpdate
SetNillableLastLogin sets the "last_login" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(b []byte) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddSearchQueries ¶
func (uuo *UserUpdateOne) AddSearchQueries(s ...*SearchQuery) *UserUpdateOne
AddSearchQueries adds the "search_queries" edges to the SearchQuery entity.
func (*UserUpdateOne) AddSearchQueryIDs ¶
func (uuo *UserUpdateOne) AddSearchQueryIDs(ids ...uuid.UUID) *UserUpdateOne
AddSearchQueryIDs adds the "search_queries" edge to the SearchQuery entity by IDs.
func (*UserUpdateOne) AddTrackedBreachIDs ¶
func (uuo *UserUpdateOne) AddTrackedBreachIDs(ids ...uuid.UUID) *UserUpdateOne
AddTrackedBreachIDs adds the "tracked_breaches" edge to the TrackedBreaches entity by IDs.
func (*UserUpdateOne) AddTrackedBreaches ¶
func (uuo *UserUpdateOne) AddTrackedBreaches(t ...*TrackedBreaches) *UserUpdateOne
AddTrackedBreaches adds the "tracked_breaches" edges to the TrackedBreaches entity.
func (*UserUpdateOne) ClearSearchQueries ¶
func (uuo *UserUpdateOne) ClearSearchQueries() *UserUpdateOne
ClearSearchQueries clears all "search_queries" edges to the SearchQuery entity.
func (*UserUpdateOne) ClearTrackedBreaches ¶
func (uuo *UserUpdateOne) ClearTrackedBreaches() *UserUpdateOne
ClearTrackedBreaches clears all "tracked_breaches" edges to the TrackedBreaches entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveSearchQueries ¶
func (uuo *UserUpdateOne) RemoveSearchQueries(s ...*SearchQuery) *UserUpdateOne
RemoveSearchQueries removes "search_queries" edges to SearchQuery entities.
func (*UserUpdateOne) RemoveSearchQueryIDs ¶
func (uuo *UserUpdateOne) RemoveSearchQueryIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveSearchQueryIDs removes the "search_queries" edge to SearchQuery entities by IDs.
func (*UserUpdateOne) RemoveTrackedBreachIDs ¶
func (uuo *UserUpdateOne) RemoveTrackedBreachIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveTrackedBreachIDs removes the "tracked_breaches" edge to TrackedBreaches entities by IDs.
func (*UserUpdateOne) RemoveTrackedBreaches ¶
func (uuo *UserUpdateOne) RemoveTrackedBreaches(t ...*TrackedBreaches) *UserUpdateOne
RemoveTrackedBreaches removes "tracked_breaches" edges to TrackedBreaches entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetIsActive ¶
func (uuo *UserUpdateOne) SetIsActive(b bool) *UserUpdateOne
SetIsActive sets the "is_active" field.
func (*UserUpdateOne) SetIsAdmin ¶
func (uuo *UserUpdateOne) SetIsAdmin(b bool) *UserUpdateOne
SetIsAdmin sets the "is_admin" field.
func (*UserUpdateOne) SetLastLogin ¶
func (uuo *UserUpdateOne) SetLastLogin(t time.Time) *UserUpdateOne
SetLastLogin sets the "last_login" field.
func (*UserUpdateOne) SetNillableIsActive ¶
func (uuo *UserUpdateOne) SetNillableIsActive(b *bool) *UserUpdateOne
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsAdmin ¶
func (uuo *UserUpdateOne) SetNillableIsAdmin(b *bool) *UserUpdateOne
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastLogin ¶
func (uuo *UserUpdateOne) SetNillableLastLogin(t *time.Time) *UserUpdateOne
SetNillableLastLogin sets the "last_login" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(b []byte) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- agekey.go
- agekey_create.go
- agekey_delete.go
- agekey_query.go
- agekey_update.go
- client.go
- ent.go
- generate.go
- hibp.go
- hibp_create.go
- hibp_delete.go
- hibp_query.go
- hibp_update.go
- localbreach.go
- localbreach_create.go
- localbreach_delete.go
- localbreach_query.go
- localbreach_update.go
- mutation.go
- runtime.go
- searchquery.go
- searchquery_create.go
- searchquery_delete.go
- searchquery_query.go
- searchquery_update.go
- settings.go
- settings_create.go
- settings_delete.go
- settings_query.go
- settings_update.go
- setup.go
- setup_create.go
- setup_delete.go
- setup_query.go
- setup_update.go
- trackedbreaches.go
- trackedbreaches_create.go
- trackedbreaches_delete.go
- trackedbreaches_query.go
- trackedbreaches_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go