Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Event
- type EventClient
- func (c *EventClient) Create() *EventCreate
- func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk
- func (c *EventClient) Delete() *EventDelete
- func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne
- func (c *EventClient) DeleteOneID(id uuid.UUID) *EventDeleteOne
- func (c *EventClient) Get(ctx context.Context, id uuid.UUID) (*Event, error)
- func (c *EventClient) GetX(ctx context.Context, id uuid.UUID) *Event
- func (c *EventClient) Hooks() []Hook
- func (c *EventClient) Query() *EventQuery
- func (c *EventClient) Update() *EventUpdate
- func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne
- func (c *EventClient) UpdateOneID(id uuid.UUID) *EventUpdateOne
- func (c *EventClient) Use(hooks ...Hook)
- type EventCreate
- func (ec *EventCreate) Exec(ctx context.Context) error
- func (ec *EventCreate) ExecX(ctx context.Context)
- func (ec *EventCreate) Mutation() *EventMutation
- func (ec *EventCreate) Save(ctx context.Context) (*Event, error)
- func (ec *EventCreate) SaveX(ctx context.Context) *Event
- func (ec *EventCreate) SetEventData(m map[string]interface{}) *EventCreate
- func (ec *EventCreate) SetEventName(s string) *EventCreate
- func (ec *EventCreate) SetEventSource(s string) *EventCreate
- func (ec *EventCreate) SetEventTime(t time.Time) *EventCreate
- func (ec *EventCreate) SetID(u uuid.UUID) *EventCreate
- func (ec *EventCreate) SetNillableEventSource(s *string) *EventCreate
- func (ec *EventCreate) SetNillableEventTime(t *time.Time) *EventCreate
- func (ec *EventCreate) SetNillableID(u *uuid.UUID) *EventCreate
- func (ec *EventCreate) SetNillableReadOnly(b *bool) *EventCreate
- func (ec *EventCreate) SetNillableRequestID(s *string) *EventCreate
- func (ec *EventCreate) SetNillableResource(s *string) *EventCreate
- func (ec *EventCreate) SetNillableSourceIP(s *string) *EventCreate
- func (ec *EventCreate) SetReadOnly(b bool) *EventCreate
- func (ec *EventCreate) SetRequestID(s string) *EventCreate
- func (ec *EventCreate) SetResource(s string) *EventCreate
- func (ec *EventCreate) SetSourceIP(s string) *EventCreate
- func (ec *EventCreate) SetUsername(s string) *EventCreate
- type EventCreateBulk
- type EventDelete
- type EventDeleteOne
- type EventGroupBy
- func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy
- func (egb *EventGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (egb *EventGroupBy) BoolX(ctx context.Context) bool
- func (egb *EventGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (egb *EventGroupBy) BoolsX(ctx context.Context) []bool
- func (egb *EventGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (egb *EventGroupBy) Float64X(ctx context.Context) float64
- func (egb *EventGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (egb *EventGroupBy) Float64sX(ctx context.Context) []float64
- func (egb *EventGroupBy) Int(ctx context.Context) (_ int, err error)
- func (egb *EventGroupBy) IntX(ctx context.Context) int
- func (egb *EventGroupBy) Ints(ctx context.Context) ([]int, error)
- func (egb *EventGroupBy) IntsX(ctx context.Context) []int
- func (egb *EventGroupBy) Scan(ctx context.Context, v interface{}) error
- func (egb *EventGroupBy) ScanX(ctx context.Context, v interface{})
- func (egb *EventGroupBy) String(ctx context.Context) (_ string, err error)
- func (egb *EventGroupBy) StringX(ctx context.Context) string
- func (egb *EventGroupBy) Strings(ctx context.Context) ([]string, error)
- func (egb *EventGroupBy) StringsX(ctx context.Context) []string
- type EventMutation
- func (m *EventMutation) AddField(name string, value ent.Value) error
- func (m *EventMutation) AddedEdges() []string
- func (m *EventMutation) AddedField(name string) (ent.Value, bool)
- func (m *EventMutation) AddedFields() []string
- func (m *EventMutation) AddedIDs(name string) []ent.Value
- func (m *EventMutation) ClearEdge(name string) error
- func (m *EventMutation) ClearField(name string) error
- func (m *EventMutation) ClearedEdges() []string
- func (m *EventMutation) ClearedFields() []string
- func (m EventMutation) Client() *Client
- func (m *EventMutation) EdgeCleared(name string) bool
- func (m *EventMutation) EventData() (r map[string]interface{}, exists bool)
- func (m *EventMutation) EventName() (r string, exists bool)
- func (m *EventMutation) EventSource() (r string, exists bool)
- func (m *EventMutation) EventTime() (r time.Time, exists bool)
- func (m *EventMutation) Field(name string) (ent.Value, bool)
- func (m *EventMutation) FieldCleared(name string) bool
- func (m *EventMutation) Fields() []string
- func (m *EventMutation) ID() (id uuid.UUID, exists bool)
- func (m *EventMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *EventMutation) OldEventData(ctx context.Context) (v map[string]interface{}, err error)
- func (m *EventMutation) OldEventName(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldEventSource(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldEventTime(ctx context.Context) (v time.Time, err error)
- func (m *EventMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EventMutation) OldReadOnly(ctx context.Context) (v bool, err error)
- func (m *EventMutation) OldRequestID(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldResource(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldSourceIP(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *EventMutation) Op() Op
- func (m *EventMutation) ReadOnly() (r bool, exists bool)
- func (m *EventMutation) RemovedEdges() []string
- func (m *EventMutation) RemovedIDs(name string) []ent.Value
- func (m *EventMutation) RequestID() (r string, exists bool)
- func (m *EventMutation) ResetEdge(name string) error
- func (m *EventMutation) ResetEventData()
- func (m *EventMutation) ResetEventName()
- func (m *EventMutation) ResetEventSource()
- func (m *EventMutation) ResetEventTime()
- func (m *EventMutation) ResetField(name string) error
- func (m *EventMutation) ResetReadOnly()
- func (m *EventMutation) ResetRequestID()
- func (m *EventMutation) ResetResource()
- func (m *EventMutation) ResetSourceIP()
- func (m *EventMutation) ResetUsername()
- func (m *EventMutation) Resource() (r string, exists bool)
- func (m *EventMutation) SetEventData(value map[string]interface{})
- func (m *EventMutation) SetEventName(s string)
- func (m *EventMutation) SetEventSource(s string)
- func (m *EventMutation) SetEventTime(t time.Time)
- func (m *EventMutation) SetField(name string, value ent.Value) error
- func (m *EventMutation) SetID(id uuid.UUID)
- func (m *EventMutation) SetReadOnly(b bool)
- func (m *EventMutation) SetRequestID(s string)
- func (m *EventMutation) SetResource(s string)
- func (m *EventMutation) SetSourceIP(s string)
- func (m *EventMutation) SetUsername(s string)
- func (m *EventMutation) SourceIP() (r string, exists bool)
- func (m EventMutation) Tx() (*Tx, error)
- func (m *EventMutation) Type() string
- func (m *EventMutation) Username() (r string, exists bool)
- func (m *EventMutation) Where(ps ...predicate.Event)
- type EventNameAutofill
- type EventNameAutofillClient
- func (c *EventNameAutofillClient) Create() *EventNameAutofillCreate
- func (c *EventNameAutofillClient) CreateBulk(builders ...*EventNameAutofillCreate) *EventNameAutofillCreateBulk
- func (c *EventNameAutofillClient) Delete() *EventNameAutofillDelete
- func (c *EventNameAutofillClient) DeleteOne(ena *EventNameAutofill) *EventNameAutofillDeleteOne
- func (c *EventNameAutofillClient) DeleteOneID(id int) *EventNameAutofillDeleteOne
- func (c *EventNameAutofillClient) Get(ctx context.Context, id int) (*EventNameAutofill, error)
- func (c *EventNameAutofillClient) GetX(ctx context.Context, id int) *EventNameAutofill
- func (c *EventNameAutofillClient) Hooks() []Hook
- func (c *EventNameAutofillClient) Query() *EventNameAutofillQuery
- func (c *EventNameAutofillClient) Update() *EventNameAutofillUpdate
- func (c *EventNameAutofillClient) UpdateOne(ena *EventNameAutofill) *EventNameAutofillUpdateOne
- func (c *EventNameAutofillClient) UpdateOneID(id int) *EventNameAutofillUpdateOne
- func (c *EventNameAutofillClient) Use(hooks ...Hook)
- type EventNameAutofillCreate
- func (enac *EventNameAutofillCreate) Exec(ctx context.Context) error
- func (enac *EventNameAutofillCreate) ExecX(ctx context.Context)
- func (enac *EventNameAutofillCreate) Mutation() *EventNameAutofillMutation
- func (enac *EventNameAutofillCreate) Save(ctx context.Context) (*EventNameAutofill, error)
- func (enac *EventNameAutofillCreate) SaveX(ctx context.Context) *EventNameAutofill
- func (enac *EventNameAutofillCreate) SetEventName(s string) *EventNameAutofillCreate
- type EventNameAutofillCreateBulk
- func (enacb *EventNameAutofillCreateBulk) Exec(ctx context.Context) error
- func (enacb *EventNameAutofillCreateBulk) ExecX(ctx context.Context)
- func (enacb *EventNameAutofillCreateBulk) Save(ctx context.Context) ([]*EventNameAutofill, error)
- func (enacb *EventNameAutofillCreateBulk) SaveX(ctx context.Context) []*EventNameAutofill
- type EventNameAutofillDelete
- type EventNameAutofillDeleteOne
- type EventNameAutofillGroupBy
- func (enagb *EventNameAutofillGroupBy) Aggregate(fns ...AggregateFunc) *EventNameAutofillGroupBy
- func (enagb *EventNameAutofillGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (enagb *EventNameAutofillGroupBy) BoolX(ctx context.Context) bool
- func (enagb *EventNameAutofillGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (enagb *EventNameAutofillGroupBy) BoolsX(ctx context.Context) []bool
- func (enagb *EventNameAutofillGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (enagb *EventNameAutofillGroupBy) Float64X(ctx context.Context) float64
- func (enagb *EventNameAutofillGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (enagb *EventNameAutofillGroupBy) Float64sX(ctx context.Context) []float64
- func (enagb *EventNameAutofillGroupBy) Int(ctx context.Context) (_ int, err error)
- func (enagb *EventNameAutofillGroupBy) IntX(ctx context.Context) int
- func (enagb *EventNameAutofillGroupBy) Ints(ctx context.Context) ([]int, error)
- func (enagb *EventNameAutofillGroupBy) IntsX(ctx context.Context) []int
- func (enagb *EventNameAutofillGroupBy) Scan(ctx context.Context, v interface{}) error
- func (enagb *EventNameAutofillGroupBy) ScanX(ctx context.Context, v interface{})
- func (enagb *EventNameAutofillGroupBy) String(ctx context.Context) (_ string, err error)
- func (enagb *EventNameAutofillGroupBy) StringX(ctx context.Context) string
- func (enagb *EventNameAutofillGroupBy) Strings(ctx context.Context) ([]string, error)
- func (enagb *EventNameAutofillGroupBy) StringsX(ctx context.Context) []string
- type EventNameAutofillMutation
- func (m *EventNameAutofillMutation) AddField(name string, value ent.Value) error
- func (m *EventNameAutofillMutation) AddedEdges() []string
- func (m *EventNameAutofillMutation) AddedField(name string) (ent.Value, bool)
- func (m *EventNameAutofillMutation) AddedFields() []string
- func (m *EventNameAutofillMutation) AddedIDs(name string) []ent.Value
- func (m *EventNameAutofillMutation) ClearEdge(name string) error
- func (m *EventNameAutofillMutation) ClearField(name string) error
- func (m *EventNameAutofillMutation) ClearedEdges() []string
- func (m *EventNameAutofillMutation) ClearedFields() []string
- func (m EventNameAutofillMutation) Client() *Client
- func (m *EventNameAutofillMutation) EdgeCleared(name string) bool
- func (m *EventNameAutofillMutation) EventName() (r string, exists bool)
- func (m *EventNameAutofillMutation) Field(name string) (ent.Value, bool)
- func (m *EventNameAutofillMutation) FieldCleared(name string) bool
- func (m *EventNameAutofillMutation) Fields() []string
- func (m *EventNameAutofillMutation) ID() (id int, exists bool)
- func (m *EventNameAutofillMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EventNameAutofillMutation) OldEventName(ctx context.Context) (v string, err error)
- func (m *EventNameAutofillMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EventNameAutofillMutation) Op() Op
- func (m *EventNameAutofillMutation) RemovedEdges() []string
- func (m *EventNameAutofillMutation) RemovedIDs(name string) []ent.Value
- func (m *EventNameAutofillMutation) ResetEdge(name string) error
- func (m *EventNameAutofillMutation) ResetEventName()
- func (m *EventNameAutofillMutation) ResetField(name string) error
- func (m *EventNameAutofillMutation) SetEventName(s string)
- func (m *EventNameAutofillMutation) SetField(name string, value ent.Value) error
- func (m EventNameAutofillMutation) Tx() (*Tx, error)
- func (m *EventNameAutofillMutation) Type() string
- func (m *EventNameAutofillMutation) Where(ps ...predicate.EventNameAutofill)
- type EventNameAutofillQuery
- func (enaq *EventNameAutofillQuery) All(ctx context.Context) ([]*EventNameAutofill, error)
- func (enaq *EventNameAutofillQuery) AllX(ctx context.Context) []*EventNameAutofill
- func (enaq *EventNameAutofillQuery) Clone() *EventNameAutofillQuery
- func (enaq *EventNameAutofillQuery) Count(ctx context.Context) (int, error)
- func (enaq *EventNameAutofillQuery) CountX(ctx context.Context) int
- func (enaq *EventNameAutofillQuery) Exist(ctx context.Context) (bool, error)
- func (enaq *EventNameAutofillQuery) ExistX(ctx context.Context) bool
- func (enaq *EventNameAutofillQuery) First(ctx context.Context) (*EventNameAutofill, error)
- func (enaq *EventNameAutofillQuery) FirstID(ctx context.Context) (id int, err error)
- func (enaq *EventNameAutofillQuery) FirstIDX(ctx context.Context) int
- func (enaq *EventNameAutofillQuery) FirstX(ctx context.Context) *EventNameAutofill
- func (enaq *EventNameAutofillQuery) GroupBy(field string, fields ...string) *EventNameAutofillGroupBy
- func (enaq *EventNameAutofillQuery) IDs(ctx context.Context) ([]int, error)
- func (enaq *EventNameAutofillQuery) IDsX(ctx context.Context) []int
- func (enaq *EventNameAutofillQuery) Limit(limit int) *EventNameAutofillQuery
- func (enaq *EventNameAutofillQuery) Offset(offset int) *EventNameAutofillQuery
- func (enaq *EventNameAutofillQuery) Only(ctx context.Context) (*EventNameAutofill, error)
- func (enaq *EventNameAutofillQuery) OnlyID(ctx context.Context) (id int, err error)
- func (enaq *EventNameAutofillQuery) OnlyIDX(ctx context.Context) int
- func (enaq *EventNameAutofillQuery) OnlyX(ctx context.Context) *EventNameAutofill
- func (enaq *EventNameAutofillQuery) Order(o ...OrderFunc) *EventNameAutofillQuery
- func (enaq *EventNameAutofillQuery) Select(fields ...string) *EventNameAutofillSelect
- func (enaq *EventNameAutofillQuery) Unique(unique bool) *EventNameAutofillQuery
- func (enaq *EventNameAutofillQuery) Where(ps ...predicate.EventNameAutofill) *EventNameAutofillQuery
- type EventNameAutofillSelect
- func (enas *EventNameAutofillSelect) Bool(ctx context.Context) (_ bool, err error)
- func (enas *EventNameAutofillSelect) BoolX(ctx context.Context) bool
- func (enas *EventNameAutofillSelect) Bools(ctx context.Context) ([]bool, error)
- func (enas *EventNameAutofillSelect) BoolsX(ctx context.Context) []bool
- func (enas *EventNameAutofillSelect) Float64(ctx context.Context) (_ float64, err error)
- func (enas *EventNameAutofillSelect) Float64X(ctx context.Context) float64
- func (enas *EventNameAutofillSelect) Float64s(ctx context.Context) ([]float64, error)
- func (enas *EventNameAutofillSelect) Float64sX(ctx context.Context) []float64
- func (enas *EventNameAutofillSelect) Int(ctx context.Context) (_ int, err error)
- func (enas *EventNameAutofillSelect) IntX(ctx context.Context) int
- func (enas *EventNameAutofillSelect) Ints(ctx context.Context) ([]int, error)
- func (enas *EventNameAutofillSelect) IntsX(ctx context.Context) []int
- func (enas *EventNameAutofillSelect) Scan(ctx context.Context, v interface{}) error
- func (enas *EventNameAutofillSelect) ScanX(ctx context.Context, v interface{})
- func (enas *EventNameAutofillSelect) String(ctx context.Context) (_ string, err error)
- func (enas *EventNameAutofillSelect) StringX(ctx context.Context) string
- func (enas *EventNameAutofillSelect) Strings(ctx context.Context) ([]string, error)
- func (enas *EventNameAutofillSelect) StringsX(ctx context.Context) []string
- type EventNameAutofillUpdate
- func (enau *EventNameAutofillUpdate) Exec(ctx context.Context) error
- func (enau *EventNameAutofillUpdate) ExecX(ctx context.Context)
- func (enau *EventNameAutofillUpdate) Mutation() *EventNameAutofillMutation
- func (enau *EventNameAutofillUpdate) Save(ctx context.Context) (int, error)
- func (enau *EventNameAutofillUpdate) SaveX(ctx context.Context) int
- func (enau *EventNameAutofillUpdate) SetEventName(s string) *EventNameAutofillUpdate
- func (enau *EventNameAutofillUpdate) Where(ps ...predicate.EventNameAutofill) *EventNameAutofillUpdate
- type EventNameAutofillUpdateOne
- func (enauo *EventNameAutofillUpdateOne) Exec(ctx context.Context) error
- func (enauo *EventNameAutofillUpdateOne) ExecX(ctx context.Context)
- func (enauo *EventNameAutofillUpdateOne) Mutation() *EventNameAutofillMutation
- func (enauo *EventNameAutofillUpdateOne) Save(ctx context.Context) (*EventNameAutofill, error)
- func (enauo *EventNameAutofillUpdateOne) SaveX(ctx context.Context) *EventNameAutofill
- func (enauo *EventNameAutofillUpdateOne) Select(field string, fields ...string) *EventNameAutofillUpdateOne
- func (enauo *EventNameAutofillUpdateOne) SetEventName(s string) *EventNameAutofillUpdateOne
- type EventNameAutofills
- type EventQuery
- func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)
- func (eq *EventQuery) AllX(ctx context.Context) []*Event
- func (eq *EventQuery) Clone() *EventQuery
- func (eq *EventQuery) Count(ctx context.Context) (int, error)
- func (eq *EventQuery) CountX(ctx context.Context) int
- func (eq *EventQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EventQuery) ExistX(ctx context.Context) bool
- func (eq *EventQuery) First(ctx context.Context) (*Event, error)
- func (eq *EventQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (eq *EventQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (eq *EventQuery) FirstX(ctx context.Context) *Event
- func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy
- func (eq *EventQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (eq *EventQuery) IDsX(ctx context.Context) []uuid.UUID
- func (eq *EventQuery) Limit(limit int) *EventQuery
- func (eq *EventQuery) Offset(offset int) *EventQuery
- func (eq *EventQuery) Only(ctx context.Context) (*Event, error)
- func (eq *EventQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (eq *EventQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (eq *EventQuery) OnlyX(ctx context.Context) *Event
- func (eq *EventQuery) Order(o ...OrderFunc) *EventQuery
- func (eq *EventQuery) Select(fields ...string) *EventSelect
- func (eq *EventQuery) Unique(unique bool) *EventQuery
- func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery
- type EventSelect
- func (es *EventSelect) Bool(ctx context.Context) (_ bool, err error)
- func (es *EventSelect) BoolX(ctx context.Context) bool
- func (es *EventSelect) Bools(ctx context.Context) ([]bool, error)
- func (es *EventSelect) BoolsX(ctx context.Context) []bool
- func (es *EventSelect) Float64(ctx context.Context) (_ float64, err error)
- func (es *EventSelect) Float64X(ctx context.Context) float64
- func (es *EventSelect) Float64s(ctx context.Context) ([]float64, error)
- func (es *EventSelect) Float64sX(ctx context.Context) []float64
- func (es *EventSelect) Int(ctx context.Context) (_ int, err error)
- func (es *EventSelect) IntX(ctx context.Context) int
- func (es *EventSelect) Ints(ctx context.Context) ([]int, error)
- func (es *EventSelect) IntsX(ctx context.Context) []int
- func (es *EventSelect) Scan(ctx context.Context, v interface{}) error
- func (es *EventSelect) ScanX(ctx context.Context, v interface{})
- func (es *EventSelect) String(ctx context.Context) (_ string, err error)
- func (es *EventSelect) StringX(ctx context.Context) string
- func (es *EventSelect) Strings(ctx context.Context) ([]string, error)
- func (es *EventSelect) StringsX(ctx context.Context) []string
- type EventUpdate
- func (eu *EventUpdate) Exec(ctx context.Context) error
- func (eu *EventUpdate) ExecX(ctx context.Context)
- func (eu *EventUpdate) Mutation() *EventMutation
- func (eu *EventUpdate) Save(ctx context.Context) (int, error)
- func (eu *EventUpdate) SaveX(ctx context.Context) int
- func (eu *EventUpdate) SetEventData(m map[string]interface{}) *EventUpdate
- func (eu *EventUpdate) SetEventName(s string) *EventUpdate
- func (eu *EventUpdate) SetEventSource(s string) *EventUpdate
- func (eu *EventUpdate) SetEventTime(t time.Time) *EventUpdate
- func (eu *EventUpdate) SetNillableEventSource(s *string) *EventUpdate
- func (eu *EventUpdate) SetNillableEventTime(t *time.Time) *EventUpdate
- func (eu *EventUpdate) SetNillableReadOnly(b *bool) *EventUpdate
- func (eu *EventUpdate) SetNillableRequestID(s *string) *EventUpdate
- func (eu *EventUpdate) SetNillableResource(s *string) *EventUpdate
- func (eu *EventUpdate) SetNillableSourceIP(s *string) *EventUpdate
- func (eu *EventUpdate) SetReadOnly(b bool) *EventUpdate
- func (eu *EventUpdate) SetRequestID(s string) *EventUpdate
- func (eu *EventUpdate) SetResource(s string) *EventUpdate
- func (eu *EventUpdate) SetSourceIP(s string) *EventUpdate
- func (eu *EventUpdate) SetUsername(s string) *EventUpdate
- func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate
- type EventUpdateOne
- func (euo *EventUpdateOne) Exec(ctx context.Context) error
- func (euo *EventUpdateOne) ExecX(ctx context.Context)
- func (euo *EventUpdateOne) Mutation() *EventMutation
- func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)
- func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event
- func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne
- func (euo *EventUpdateOne) SetEventData(m map[string]interface{}) *EventUpdateOne
- func (euo *EventUpdateOne) SetEventName(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetEventSource(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetEventTime(t time.Time) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableEventSource(s *string) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableEventTime(t *time.Time) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableReadOnly(b *bool) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableRequestID(s *string) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableResource(s *string) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableSourceIP(s *string) *EventUpdateOne
- func (euo *EventUpdateOne) SetReadOnly(b bool) *EventUpdateOne
- func (euo *EventUpdateOne) SetRequestID(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetResource(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetSourceIP(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetUsername(s string) *EventUpdateOne
- type Events
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tx
- type User
- 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) Query() *UserQuery
- 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) 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) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetFailedLogins(i int) *UserCreate
- func (uc *UserCreate) SetForcePasswordChange(b bool) *UserCreate
- func (uc *UserCreate) SetHashedPassword(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetLastLogin(t time.Time) *UserCreate
- func (uc *UserCreate) SetLocked(b bool) *UserCreate
- func (uc *UserCreate) SetLockedUntil(t time.Time) *UserCreate
- func (uc *UserCreate) SetMfaImage(b []byte) *UserCreate
- func (uc *UserCreate) SetMfaSecret(s string) *UserCreate
- func (uc *UserCreate) SetMfaSetupCompleted(b bool) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableFailedLogins(i *int) *UserCreate
- func (uc *UserCreate) SetNillableForcePasswordChange(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableLastLogin(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableLocked(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableLockedUntil(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableMfaSecret(s *string) *UserCreate
- func (uc *UserCreate) SetNillableMfaSetupCompleted(b *bool) *UserCreate
- func (uc *UserCreate) SetNillablePasswordLastSetAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableTimezone(s *string) *UserCreate
- func (uc *UserCreate) SetPasswordLastSetAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetRecentPasswords(s []string) *UserCreate
- func (uc *UserCreate) SetRole(s string) *UserCreate
- func (uc *UserCreate) SetTimezone(s string) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UserGroupBy) IntX(ctx context.Context) int
- func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (ugb *UserGroupBy) StringX(ctx context.Context) string
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddFailedLogins(i int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedFailedLogins() (r int, exists bool)
- 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) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearMfaImage()
- func (m *UserMutation) ClearMfaSecret()
- func (m *UserMutation) ClearRecentPasswords()
- func (m *UserMutation) ClearTimezone()
- 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) FailedLogins() (r int, 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) ForcePasswordChange() (r bool, exists bool)
- func (m *UserMutation) HashedPassword() (r string, exists bool)
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) LastLogin() (r time.Time, exists bool)
- func (m *UserMutation) Locked() (r bool, exists bool)
- func (m *UserMutation) LockedUntil() (r time.Time, exists bool)
- func (m *UserMutation) MfaImage() (r []byte, exists bool)
- func (m *UserMutation) MfaImageCleared() bool
- func (m *UserMutation) MfaSecret() (r string, exists bool)
- func (m *UserMutation) MfaSecretCleared() bool
- func (m *UserMutation) MfaSetupCompleted() (r bool, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldFailedLogins(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldForcePasswordChange(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldHashedPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldLastLogin(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldLocked(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldLockedUntil(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldMfaImage(ctx context.Context) (v []byte, err error)
- func (m *UserMutation) OldMfaSecret(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldMfaSetupCompleted(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldPasswordLastSetAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldRecentPasswords(ctx context.Context) (v []string, err error)
- func (m *UserMutation) OldRole(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldTimezone(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) PasswordLastSetAt() (r time.Time, exists bool)
- func (m *UserMutation) RecentPasswords() (r []string, exists bool)
- func (m *UserMutation) RecentPasswordsCleared() bool
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetFailedLogins()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetForcePasswordChange()
- func (m *UserMutation) ResetHashedPassword()
- func (m *UserMutation) ResetLastLogin()
- func (m *UserMutation) ResetLocked()
- func (m *UserMutation) ResetLockedUntil()
- func (m *UserMutation) ResetMfaImage()
- func (m *UserMutation) ResetMfaSecret()
- func (m *UserMutation) ResetMfaSetupCompleted()
- func (m *UserMutation) ResetPasswordLastSetAt()
- func (m *UserMutation) ResetRecentPasswords()
- func (m *UserMutation) ResetRole()
- func (m *UserMutation) ResetTimezone()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) Role() (r string, exists bool)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetFailedLogins(i int)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetForcePasswordChange(b bool)
- func (m *UserMutation) SetHashedPassword(s string)
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetLastLogin(t time.Time)
- func (m *UserMutation) SetLocked(b bool)
- func (m *UserMutation) SetLockedUntil(t time.Time)
- func (m *UserMutation) SetMfaImage(b []byte)
- func (m *UserMutation) SetMfaSecret(s string)
- func (m *UserMutation) SetMfaSetupCompleted(b bool)
- func (m *UserMutation) SetPasswordLastSetAt(t time.Time)
- func (m *UserMutation) SetRecentPasswords(s []string)
- func (m *UserMutation) SetRole(s string)
- func (m *UserMutation) SetTimezone(s string)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) Timezone() (r string, exists bool)
- func (m *UserMutation) TimezoneCleared() bool
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- type UserQuery
- 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) ([]uuid.UUID, 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 ...OrderFunc) *UserQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UserSelect) BoolX(ctx context.Context) bool
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UserSelect) Float64X(ctx context.Context) float64
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UserSelect) IntX(ctx context.Context) int
- func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UserSelect) ScanX(ctx context.Context, v interface{})
- func (us *UserSelect) String(ctx context.Context) (_ string, err error)
- func (us *UserSelect) StringX(ctx context.Context) string
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddFailedLogins(i int) *UserUpdate
- func (uu *UserUpdate) ClearMfaImage() *UserUpdate
- func (uu *UserUpdate) ClearMfaSecret() *UserUpdate
- func (uu *UserUpdate) ClearRecentPasswords() *UserUpdate
- func (uu *UserUpdate) ClearTimezone() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetFailedLogins(i int) *UserUpdate
- func (uu *UserUpdate) SetForcePasswordChange(b bool) *UserUpdate
- func (uu *UserUpdate) SetHashedPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetLastLogin(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetLocked(b bool) *UserUpdate
- func (uu *UserUpdate) SetLockedUntil(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetMfaImage(b []byte) *UserUpdate
- func (uu *UserUpdate) SetMfaSecret(s string) *UserUpdate
- func (uu *UserUpdate) SetMfaSetupCompleted(b bool) *UserUpdate
- func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableFailedLogins(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableForcePasswordChange(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableLastLogin(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableLocked(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableLockedUntil(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableMfaSecret(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableMfaSetupCompleted(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillablePasswordLastSetAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableTimezone(s *string) *UserUpdate
- func (uu *UserUpdate) SetPasswordLastSetAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetRecentPasswords(s []string) *UserUpdate
- func (uu *UserUpdate) SetRole(s string) *UserUpdate
- func (uu *UserUpdate) SetTimezone(s string) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddFailedLogins(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMfaImage() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMfaSecret() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRecentPasswords() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTimezone() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- 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) SetCreatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFailedLogins(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetForcePasswordChange(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetHashedPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastLogin(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLocked(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLockedUntil(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMfaImage(b []byte) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMfaSecret(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMfaSetupCompleted(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableFailedLogins(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableForcePasswordChange(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastLogin(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLocked(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLockedUntil(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableMfaSecret(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableMfaSetupCompleted(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePasswordLastSetAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTimezone(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPasswordLastSetAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRecentPasswords(s []string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRole(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTimezone(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- type UsernameAutofill
- type UsernameAutofillClient
- func (c *UsernameAutofillClient) Create() *UsernameAutofillCreate
- func (c *UsernameAutofillClient) CreateBulk(builders ...*UsernameAutofillCreate) *UsernameAutofillCreateBulk
- func (c *UsernameAutofillClient) Delete() *UsernameAutofillDelete
- func (c *UsernameAutofillClient) DeleteOne(ua *UsernameAutofill) *UsernameAutofillDeleteOne
- func (c *UsernameAutofillClient) DeleteOneID(id int) *UsernameAutofillDeleteOne
- func (c *UsernameAutofillClient) Get(ctx context.Context, id int) (*UsernameAutofill, error)
- func (c *UsernameAutofillClient) GetX(ctx context.Context, id int) *UsernameAutofill
- func (c *UsernameAutofillClient) Hooks() []Hook
- func (c *UsernameAutofillClient) Query() *UsernameAutofillQuery
- func (c *UsernameAutofillClient) Update() *UsernameAutofillUpdate
- func (c *UsernameAutofillClient) UpdateOne(ua *UsernameAutofill) *UsernameAutofillUpdateOne
- func (c *UsernameAutofillClient) UpdateOneID(id int) *UsernameAutofillUpdateOne
- func (c *UsernameAutofillClient) Use(hooks ...Hook)
- type UsernameAutofillCreate
- func (uac *UsernameAutofillCreate) Exec(ctx context.Context) error
- func (uac *UsernameAutofillCreate) ExecX(ctx context.Context)
- func (uac *UsernameAutofillCreate) Mutation() *UsernameAutofillMutation
- func (uac *UsernameAutofillCreate) Save(ctx context.Context) (*UsernameAutofill, error)
- func (uac *UsernameAutofillCreate) SaveX(ctx context.Context) *UsernameAutofill
- func (uac *UsernameAutofillCreate) SetUsername(s string) *UsernameAutofillCreate
- type UsernameAutofillCreateBulk
- func (uacb *UsernameAutofillCreateBulk) Exec(ctx context.Context) error
- func (uacb *UsernameAutofillCreateBulk) ExecX(ctx context.Context)
- func (uacb *UsernameAutofillCreateBulk) Save(ctx context.Context) ([]*UsernameAutofill, error)
- func (uacb *UsernameAutofillCreateBulk) SaveX(ctx context.Context) []*UsernameAutofill
- type UsernameAutofillDelete
- type UsernameAutofillDeleteOne
- type UsernameAutofillGroupBy
- func (uagb *UsernameAutofillGroupBy) Aggregate(fns ...AggregateFunc) *UsernameAutofillGroupBy
- func (uagb *UsernameAutofillGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (uagb *UsernameAutofillGroupBy) BoolX(ctx context.Context) bool
- func (uagb *UsernameAutofillGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (uagb *UsernameAutofillGroupBy) BoolsX(ctx context.Context) []bool
- func (uagb *UsernameAutofillGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (uagb *UsernameAutofillGroupBy) Float64X(ctx context.Context) float64
- func (uagb *UsernameAutofillGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (uagb *UsernameAutofillGroupBy) Float64sX(ctx context.Context) []float64
- func (uagb *UsernameAutofillGroupBy) Int(ctx context.Context) (_ int, err error)
- func (uagb *UsernameAutofillGroupBy) IntX(ctx context.Context) int
- func (uagb *UsernameAutofillGroupBy) Ints(ctx context.Context) ([]int, error)
- func (uagb *UsernameAutofillGroupBy) IntsX(ctx context.Context) []int
- func (uagb *UsernameAutofillGroupBy) Scan(ctx context.Context, v interface{}) error
- func (uagb *UsernameAutofillGroupBy) ScanX(ctx context.Context, v interface{})
- func (uagb *UsernameAutofillGroupBy) String(ctx context.Context) (_ string, err error)
- func (uagb *UsernameAutofillGroupBy) StringX(ctx context.Context) string
- func (uagb *UsernameAutofillGroupBy) Strings(ctx context.Context) ([]string, error)
- func (uagb *UsernameAutofillGroupBy) StringsX(ctx context.Context) []string
- type UsernameAutofillMutation
- func (m *UsernameAutofillMutation) AddField(name string, value ent.Value) error
- func (m *UsernameAutofillMutation) AddedEdges() []string
- func (m *UsernameAutofillMutation) AddedField(name string) (ent.Value, bool)
- func (m *UsernameAutofillMutation) AddedFields() []string
- func (m *UsernameAutofillMutation) AddedIDs(name string) []ent.Value
- func (m *UsernameAutofillMutation) ClearEdge(name string) error
- func (m *UsernameAutofillMutation) ClearField(name string) error
- func (m *UsernameAutofillMutation) ClearedEdges() []string
- func (m *UsernameAutofillMutation) ClearedFields() []string
- func (m UsernameAutofillMutation) Client() *Client
- func (m *UsernameAutofillMutation) EdgeCleared(name string) bool
- func (m *UsernameAutofillMutation) Field(name string) (ent.Value, bool)
- func (m *UsernameAutofillMutation) FieldCleared(name string) bool
- func (m *UsernameAutofillMutation) Fields() []string
- func (m *UsernameAutofillMutation) ID() (id int, exists bool)
- func (m *UsernameAutofillMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UsernameAutofillMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UsernameAutofillMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UsernameAutofillMutation) Op() Op
- func (m *UsernameAutofillMutation) RemovedEdges() []string
- func (m *UsernameAutofillMutation) RemovedIDs(name string) []ent.Value
- func (m *UsernameAutofillMutation) ResetEdge(name string) error
- func (m *UsernameAutofillMutation) ResetField(name string) error
- func (m *UsernameAutofillMutation) ResetUsername()
- func (m *UsernameAutofillMutation) SetField(name string, value ent.Value) error
- func (m *UsernameAutofillMutation) SetUsername(s string)
- func (m UsernameAutofillMutation) Tx() (*Tx, error)
- func (m *UsernameAutofillMutation) Type() string
- func (m *UsernameAutofillMutation) Username() (r string, exists bool)
- func (m *UsernameAutofillMutation) Where(ps ...predicate.UsernameAutofill)
- type UsernameAutofillQuery
- func (uaq *UsernameAutofillQuery) All(ctx context.Context) ([]*UsernameAutofill, error)
- func (uaq *UsernameAutofillQuery) AllX(ctx context.Context) []*UsernameAutofill
- func (uaq *UsernameAutofillQuery) Clone() *UsernameAutofillQuery
- func (uaq *UsernameAutofillQuery) Count(ctx context.Context) (int, error)
- func (uaq *UsernameAutofillQuery) CountX(ctx context.Context) int
- func (uaq *UsernameAutofillQuery) Exist(ctx context.Context) (bool, error)
- func (uaq *UsernameAutofillQuery) ExistX(ctx context.Context) bool
- func (uaq *UsernameAutofillQuery) First(ctx context.Context) (*UsernameAutofill, error)
- func (uaq *UsernameAutofillQuery) FirstID(ctx context.Context) (id int, err error)
- func (uaq *UsernameAutofillQuery) FirstIDX(ctx context.Context) int
- func (uaq *UsernameAutofillQuery) FirstX(ctx context.Context) *UsernameAutofill
- func (uaq *UsernameAutofillQuery) GroupBy(field string, fields ...string) *UsernameAutofillGroupBy
- func (uaq *UsernameAutofillQuery) IDs(ctx context.Context) ([]int, error)
- func (uaq *UsernameAutofillQuery) IDsX(ctx context.Context) []int
- func (uaq *UsernameAutofillQuery) Limit(limit int) *UsernameAutofillQuery
- func (uaq *UsernameAutofillQuery) Offset(offset int) *UsernameAutofillQuery
- func (uaq *UsernameAutofillQuery) Only(ctx context.Context) (*UsernameAutofill, error)
- func (uaq *UsernameAutofillQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uaq *UsernameAutofillQuery) OnlyIDX(ctx context.Context) int
- func (uaq *UsernameAutofillQuery) OnlyX(ctx context.Context) *UsernameAutofill
- func (uaq *UsernameAutofillQuery) Order(o ...OrderFunc) *UsernameAutofillQuery
- func (uaq *UsernameAutofillQuery) Select(fields ...string) *UsernameAutofillSelect
- func (uaq *UsernameAutofillQuery) Unique(unique bool) *UsernameAutofillQuery
- func (uaq *UsernameAutofillQuery) Where(ps ...predicate.UsernameAutofill) *UsernameAutofillQuery
- type UsernameAutofillSelect
- func (uas *UsernameAutofillSelect) Bool(ctx context.Context) (_ bool, err error)
- func (uas *UsernameAutofillSelect) BoolX(ctx context.Context) bool
- func (uas *UsernameAutofillSelect) Bools(ctx context.Context) ([]bool, error)
- func (uas *UsernameAutofillSelect) BoolsX(ctx context.Context) []bool
- func (uas *UsernameAutofillSelect) Float64(ctx context.Context) (_ float64, err error)
- func (uas *UsernameAutofillSelect) Float64X(ctx context.Context) float64
- func (uas *UsernameAutofillSelect) Float64s(ctx context.Context) ([]float64, error)
- func (uas *UsernameAutofillSelect) Float64sX(ctx context.Context) []float64
- func (uas *UsernameAutofillSelect) Int(ctx context.Context) (_ int, err error)
- func (uas *UsernameAutofillSelect) IntX(ctx context.Context) int
- func (uas *UsernameAutofillSelect) Ints(ctx context.Context) ([]int, error)
- func (uas *UsernameAutofillSelect) IntsX(ctx context.Context) []int
- func (uas *UsernameAutofillSelect) Scan(ctx context.Context, v interface{}) error
- func (uas *UsernameAutofillSelect) ScanX(ctx context.Context, v interface{})
- func (uas *UsernameAutofillSelect) String(ctx context.Context) (_ string, err error)
- func (uas *UsernameAutofillSelect) StringX(ctx context.Context) string
- func (uas *UsernameAutofillSelect) Strings(ctx context.Context) ([]string, error)
- func (uas *UsernameAutofillSelect) StringsX(ctx context.Context) []string
- type UsernameAutofillUpdate
- func (uau *UsernameAutofillUpdate) Exec(ctx context.Context) error
- func (uau *UsernameAutofillUpdate) ExecX(ctx context.Context)
- func (uau *UsernameAutofillUpdate) Mutation() *UsernameAutofillMutation
- func (uau *UsernameAutofillUpdate) Save(ctx context.Context) (int, error)
- func (uau *UsernameAutofillUpdate) SaveX(ctx context.Context) int
- func (uau *UsernameAutofillUpdate) SetUsername(s string) *UsernameAutofillUpdate
- func (uau *UsernameAutofillUpdate) Where(ps ...predicate.UsernameAutofill) *UsernameAutofillUpdate
- type UsernameAutofillUpdateOne
- func (uauo *UsernameAutofillUpdateOne) Exec(ctx context.Context) error
- func (uauo *UsernameAutofillUpdateOne) ExecX(ctx context.Context)
- func (uauo *UsernameAutofillUpdateOne) Mutation() *UsernameAutofillMutation
- func (uauo *UsernameAutofillUpdateOne) Save(ctx context.Context) (*UsernameAutofill, error)
- func (uauo *UsernameAutofillUpdateOne) SaveX(ctx context.Context) *UsernameAutofill
- func (uauo *UsernameAutofillUpdateOne) Select(field string, fields ...string) *UsernameAutofillUpdateOne
- func (uauo *UsernameAutofillUpdateOne) SetUsername(s string) *UsernameAutofillUpdateOne
- type UsernameAutofills
- 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. TypeEvent = "Event" TypeEventNameAutofill = "EventNameAutofill" TypeUser = "User" TypeUsernameAutofill = "UsernameAutofill" )
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 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 // Event is the client for interacting with the Event builders. Event *EventClient // EventNameAutofill is the client for interacting with the EventNameAutofill builders. EventNameAutofill *EventNameAutofillClient // User is the client for interacting with the User builders. User *UserClient // UsernameAutofill is the client for interacting with the UsernameAutofill builders. UsernameAutofill *UsernameAutofillClient // 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(). Event. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(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 Event ¶
type Event struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // EventTime holds the value of the "event_time" field. EventTime time.Time `json:"event_time,omitempty"` // EventName holds the value of the "event_name" field. EventName string `json:"event_name,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Resource holds the value of the "resource" field. Resource string `json:"resource,omitempty"` // SourceIP holds the value of the "source_ip" field. SourceIP string `json:"source_ip,omitempty"` // RequestID holds the value of the "request_id" field. RequestID string `json:"request_id,omitempty"` // ReadOnly holds the value of the "read_only" field. ReadOnly bool `json:"read_only,omitempty"` // EventData holds the value of the "event_data" field. EventData map[string]interface{} `json:"event_data,omitempty"` // EventSource holds the value of the "event_source" field. EventSource string `json:"event_source,omitempty"` // contains filtered or unexported fields }
Event is the model entity for the Event schema.
func (*Event) Unwrap ¶
Unwrap unwraps the Event 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 (*Event) Update ¶
func (e *Event) Update() *EventUpdateOne
Update returns a builder for updating this Event. Note that you need to call Event.Unwrap() before calling this method if this Event was returned from a transaction, and the transaction was committed or rolled back.
type EventClient ¶
type EventClient struct {
// contains filtered or unexported fields
}
EventClient is a client for the Event schema.
func NewEventClient ¶
func NewEventClient(c config) *EventClient
NewEventClient returns a client for the Event from the given config.
func (*EventClient) Create ¶
func (c *EventClient) Create() *EventCreate
Create returns a create builder for Event.
func (*EventClient) CreateBulk ¶
func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk
CreateBulk returns a builder for creating a bulk of Event entities.
func (*EventClient) Delete ¶
func (c *EventClient) Delete() *EventDelete
Delete returns a delete builder for Event.
func (*EventClient) DeleteOne ¶
func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*EventClient) DeleteOneID ¶
func (c *EventClient) DeleteOneID(id uuid.UUID) *EventDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*EventClient) Query ¶
func (c *EventClient) Query() *EventQuery
Query returns a query builder for Event.
func (*EventClient) Update ¶
func (c *EventClient) Update() *EventUpdate
Update returns an update builder for Event.
func (*EventClient) UpdateOne ¶
func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EventClient) UpdateOneID ¶
func (c *EventClient) UpdateOneID(id uuid.UUID) *EventUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EventClient) Use ¶
func (c *EventClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `event.Hooks(f(g(h())))`.
type EventCreate ¶
type EventCreate struct {
// contains filtered or unexported fields
}
EventCreate is the builder for creating a Event entity.
func (*EventCreate) Exec ¶
func (ec *EventCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventCreate) ExecX ¶
func (ec *EventCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventCreate) Mutation ¶
func (ec *EventCreate) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventCreate) Save ¶
func (ec *EventCreate) Save(ctx context.Context) (*Event, error)
Save creates the Event in the database.
func (*EventCreate) SaveX ¶
func (ec *EventCreate) SaveX(ctx context.Context) *Event
SaveX calls Save and panics if Save returns an error.
func (*EventCreate) SetEventData ¶
func (ec *EventCreate) SetEventData(m map[string]interface{}) *EventCreate
SetEventData sets the "event_data" field.
func (*EventCreate) SetEventName ¶
func (ec *EventCreate) SetEventName(s string) *EventCreate
SetEventName sets the "event_name" field.
func (*EventCreate) SetEventSource ¶
func (ec *EventCreate) SetEventSource(s string) *EventCreate
SetEventSource sets the "event_source" field.
func (*EventCreate) SetEventTime ¶
func (ec *EventCreate) SetEventTime(t time.Time) *EventCreate
SetEventTime sets the "event_time" field.
func (*EventCreate) SetID ¶
func (ec *EventCreate) SetID(u uuid.UUID) *EventCreate
SetID sets the "id" field.
func (*EventCreate) SetNillableEventSource ¶
func (ec *EventCreate) SetNillableEventSource(s *string) *EventCreate
SetNillableEventSource sets the "event_source" field if the given value is not nil.
func (*EventCreate) SetNillableEventTime ¶
func (ec *EventCreate) SetNillableEventTime(t *time.Time) *EventCreate
SetNillableEventTime sets the "event_time" field if the given value is not nil.
func (*EventCreate) SetNillableID ¶
func (ec *EventCreate) SetNillableID(u *uuid.UUID) *EventCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*EventCreate) SetNillableReadOnly ¶
func (ec *EventCreate) SetNillableReadOnly(b *bool) *EventCreate
SetNillableReadOnly sets the "read_only" field if the given value is not nil.
func (*EventCreate) SetNillableRequestID ¶
func (ec *EventCreate) SetNillableRequestID(s *string) *EventCreate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*EventCreate) SetNillableResource ¶
func (ec *EventCreate) SetNillableResource(s *string) *EventCreate
SetNillableResource sets the "resource" field if the given value is not nil.
func (*EventCreate) SetNillableSourceIP ¶
func (ec *EventCreate) SetNillableSourceIP(s *string) *EventCreate
SetNillableSourceIP sets the "source_ip" field if the given value is not nil.
func (*EventCreate) SetReadOnly ¶
func (ec *EventCreate) SetReadOnly(b bool) *EventCreate
SetReadOnly sets the "read_only" field.
func (*EventCreate) SetRequestID ¶
func (ec *EventCreate) SetRequestID(s string) *EventCreate
SetRequestID sets the "request_id" field.
func (*EventCreate) SetResource ¶
func (ec *EventCreate) SetResource(s string) *EventCreate
SetResource sets the "resource" field.
func (*EventCreate) SetSourceIP ¶
func (ec *EventCreate) SetSourceIP(s string) *EventCreate
SetSourceIP sets the "source_ip" field.
func (*EventCreate) SetUsername ¶
func (ec *EventCreate) SetUsername(s string) *EventCreate
SetUsername sets the "username" field.
type EventCreateBulk ¶
type EventCreateBulk struct {
// contains filtered or unexported fields
}
EventCreateBulk is the builder for creating many Event entities in bulk.
func (*EventCreateBulk) Exec ¶
func (ecb *EventCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EventCreateBulk) ExecX ¶
func (ecb *EventCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EventDelete ¶
type EventDelete struct {
// contains filtered or unexported fields
}
EventDelete is the builder for deleting a Event entity.
func (*EventDelete) Exec ¶
func (ed *EventDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EventDelete) ExecX ¶
func (ed *EventDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EventDelete) Where ¶
func (ed *EventDelete) Where(ps ...predicate.Event) *EventDelete
Where appends a list predicates to the EventDelete builder.
type EventDeleteOne ¶
type EventDeleteOne struct {
// contains filtered or unexported fields
}
EventDeleteOne is the builder for deleting a single Event entity.
func (*EventDeleteOne) Exec ¶
func (edo *EventDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EventDeleteOne) ExecX ¶
func (edo *EventDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EventGroupBy ¶
type EventGroupBy struct {
// contains filtered or unexported fields
}
EventGroupBy is the group-by builder for Event entities.
func (*EventGroupBy) Aggregate ¶
func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EventGroupBy) Bool ¶
func (egb *EventGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*EventGroupBy) BoolX ¶
func (egb *EventGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*EventGroupBy) Bools ¶
func (egb *EventGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*EventGroupBy) BoolsX ¶
func (egb *EventGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*EventGroupBy) Float64 ¶
func (egb *EventGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*EventGroupBy) Float64X ¶
func (egb *EventGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*EventGroupBy) Float64s ¶
func (egb *EventGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*EventGroupBy) Float64sX ¶
func (egb *EventGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*EventGroupBy) Int ¶
func (egb *EventGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*EventGroupBy) IntX ¶
func (egb *EventGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*EventGroupBy) Ints ¶
func (egb *EventGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*EventGroupBy) IntsX ¶
func (egb *EventGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*EventGroupBy) Scan ¶
func (egb *EventGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*EventGroupBy) ScanX ¶
func (egb *EventGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*EventGroupBy) String ¶
func (egb *EventGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*EventGroupBy) StringX ¶
func (egb *EventGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type EventMutation ¶
type EventMutation struct {
// contains filtered or unexported fields
}
EventMutation represents an operation that mutates the Event nodes in the graph.
func (*EventMutation) AddField ¶
func (m *EventMutation) 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 (*EventMutation) AddedEdges ¶
func (m *EventMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EventMutation) AddedField ¶
func (m *EventMutation) 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 (*EventMutation) AddedFields ¶
func (m *EventMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EventMutation) AddedIDs ¶
func (m *EventMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EventMutation) ClearEdge ¶
func (m *EventMutation) 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 (*EventMutation) ClearField ¶
func (m *EventMutation) 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 (*EventMutation) ClearedEdges ¶
func (m *EventMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EventMutation) ClearedFields ¶
func (m *EventMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EventMutation) Client ¶
func (m EventMutation) 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 (*EventMutation) EdgeCleared ¶
func (m *EventMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EventMutation) EventData ¶
func (m *EventMutation) EventData() (r map[string]interface{}, exists bool)
EventData returns the value of the "event_data" field in the mutation.
func (*EventMutation) EventName ¶
func (m *EventMutation) EventName() (r string, exists bool)
EventName returns the value of the "event_name" field in the mutation.
func (*EventMutation) EventSource ¶
func (m *EventMutation) EventSource() (r string, exists bool)
EventSource returns the value of the "event_source" field in the mutation.
func (*EventMutation) EventTime ¶
func (m *EventMutation) EventTime() (r time.Time, exists bool)
EventTime returns the value of the "event_time" field in the mutation.
func (*EventMutation) Field ¶
func (m *EventMutation) 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 (*EventMutation) FieldCleared ¶
func (m *EventMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EventMutation) Fields ¶
func (m *EventMutation) 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 (*EventMutation) ID ¶
func (m *EventMutation) 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 (*EventMutation) 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 (*EventMutation) OldEventData ¶
func (m *EventMutation) OldEventData(ctx context.Context) (v map[string]interface{}, err error)
OldEventData returns the old "event_data" field's value of the Event entity. If the Event 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 (*EventMutation) OldEventName ¶
func (m *EventMutation) OldEventName(ctx context.Context) (v string, err error)
OldEventName returns the old "event_name" field's value of the Event entity. If the Event 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 (*EventMutation) OldEventSource ¶
func (m *EventMutation) OldEventSource(ctx context.Context) (v string, err error)
OldEventSource returns the old "event_source" field's value of the Event entity. If the Event 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 (*EventMutation) OldEventTime ¶
OldEventTime returns the old "event_time" field's value of the Event entity. If the Event 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 (*EventMutation) 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 (*EventMutation) OldReadOnly ¶
func (m *EventMutation) OldReadOnly(ctx context.Context) (v bool, err error)
OldReadOnly returns the old "read_only" field's value of the Event entity. If the Event 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 (*EventMutation) OldRequestID ¶
func (m *EventMutation) OldRequestID(ctx context.Context) (v string, err error)
OldRequestID returns the old "request_id" field's value of the Event entity. If the Event 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 (*EventMutation) OldResource ¶
func (m *EventMutation) OldResource(ctx context.Context) (v string, err error)
OldResource returns the old "resource" field's value of the Event entity. If the Event 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 (*EventMutation) OldSourceIP ¶
func (m *EventMutation) OldSourceIP(ctx context.Context) (v string, err error)
OldSourceIP returns the old "source_ip" field's value of the Event entity. If the Event 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 (*EventMutation) OldUsername ¶
func (m *EventMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the Event entity. If the Event 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 (*EventMutation) ReadOnly ¶
func (m *EventMutation) ReadOnly() (r bool, exists bool)
ReadOnly returns the value of the "read_only" field in the mutation.
func (*EventMutation) RemovedEdges ¶
func (m *EventMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EventMutation) RemovedIDs ¶
func (m *EventMutation) 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 (*EventMutation) RequestID ¶
func (m *EventMutation) RequestID() (r string, exists bool)
RequestID returns the value of the "request_id" field in the mutation.
func (*EventMutation) ResetEdge ¶
func (m *EventMutation) 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 (*EventMutation) ResetEventData ¶
func (m *EventMutation) ResetEventData()
ResetEventData resets all changes to the "event_data" field.
func (*EventMutation) ResetEventName ¶
func (m *EventMutation) ResetEventName()
ResetEventName resets all changes to the "event_name" field.
func (*EventMutation) ResetEventSource ¶
func (m *EventMutation) ResetEventSource()
ResetEventSource resets all changes to the "event_source" field.
func (*EventMutation) ResetEventTime ¶
func (m *EventMutation) ResetEventTime()
ResetEventTime resets all changes to the "event_time" field.
func (*EventMutation) ResetField ¶
func (m *EventMutation) 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 (*EventMutation) ResetReadOnly ¶
func (m *EventMutation) ResetReadOnly()
ResetReadOnly resets all changes to the "read_only" field.
func (*EventMutation) ResetRequestID ¶
func (m *EventMutation) ResetRequestID()
ResetRequestID resets all changes to the "request_id" field.
func (*EventMutation) ResetResource ¶
func (m *EventMutation) ResetResource()
ResetResource resets all changes to the "resource" field.
func (*EventMutation) ResetSourceIP ¶
func (m *EventMutation) ResetSourceIP()
ResetSourceIP resets all changes to the "source_ip" field.
func (*EventMutation) ResetUsername ¶
func (m *EventMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*EventMutation) Resource ¶
func (m *EventMutation) Resource() (r string, exists bool)
Resource returns the value of the "resource" field in the mutation.
func (*EventMutation) SetEventData ¶
func (m *EventMutation) SetEventData(value map[string]interface{})
SetEventData sets the "event_data" field.
func (*EventMutation) SetEventName ¶
func (m *EventMutation) SetEventName(s string)
SetEventName sets the "event_name" field.
func (*EventMutation) SetEventSource ¶
func (m *EventMutation) SetEventSource(s string)
SetEventSource sets the "event_source" field.
func (*EventMutation) SetEventTime ¶
func (m *EventMutation) SetEventTime(t time.Time)
SetEventTime sets the "event_time" field.
func (*EventMutation) SetField ¶
func (m *EventMutation) 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 (*EventMutation) SetID ¶
func (m *EventMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Event entities.
func (*EventMutation) SetReadOnly ¶
func (m *EventMutation) SetReadOnly(b bool)
SetReadOnly sets the "read_only" field.
func (*EventMutation) SetRequestID ¶
func (m *EventMutation) SetRequestID(s string)
SetRequestID sets the "request_id" field.
func (*EventMutation) SetResource ¶
func (m *EventMutation) SetResource(s string)
SetResource sets the "resource" field.
func (*EventMutation) SetSourceIP ¶
func (m *EventMutation) SetSourceIP(s string)
SetSourceIP sets the "source_ip" field.
func (*EventMutation) SetUsername ¶
func (m *EventMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*EventMutation) SourceIP ¶
func (m *EventMutation) SourceIP() (r string, exists bool)
SourceIP returns the value of the "source_ip" field in the mutation.
func (EventMutation) Tx ¶
func (m EventMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EventMutation) Type ¶
func (m *EventMutation) Type() string
Type returns the node type of this mutation (Event).
func (*EventMutation) Username ¶
func (m *EventMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*EventMutation) Where ¶
func (m *EventMutation) Where(ps ...predicate.Event)
Where appends a list predicates to the EventMutation builder.
type EventNameAutofill ¶
type EventNameAutofill struct { // ID of the ent. ID int `json:"id,omitempty"` // EventName holds the value of the "eventName" field. EventName string `json:"eventName,omitempty"` // contains filtered or unexported fields }
EventNameAutofill is the model entity for the EventNameAutofill schema.
func (*EventNameAutofill) String ¶
func (ena *EventNameAutofill) String() string
String implements the fmt.Stringer.
func (*EventNameAutofill) Unwrap ¶
func (ena *EventNameAutofill) Unwrap() *EventNameAutofill
Unwrap unwraps the EventNameAutofill 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 (*EventNameAutofill) Update ¶
func (ena *EventNameAutofill) Update() *EventNameAutofillUpdateOne
Update returns a builder for updating this EventNameAutofill. Note that you need to call EventNameAutofill.Unwrap() before calling this method if this EventNameAutofill was returned from a transaction, and the transaction was committed or rolled back.
type EventNameAutofillClient ¶
type EventNameAutofillClient struct {
// contains filtered or unexported fields
}
EventNameAutofillClient is a client for the EventNameAutofill schema.
func NewEventNameAutofillClient ¶
func NewEventNameAutofillClient(c config) *EventNameAutofillClient
NewEventNameAutofillClient returns a client for the EventNameAutofill from the given config.
func (*EventNameAutofillClient) Create ¶
func (c *EventNameAutofillClient) Create() *EventNameAutofillCreate
Create returns a create builder for EventNameAutofill.
func (*EventNameAutofillClient) CreateBulk ¶
func (c *EventNameAutofillClient) CreateBulk(builders ...*EventNameAutofillCreate) *EventNameAutofillCreateBulk
CreateBulk returns a builder for creating a bulk of EventNameAutofill entities.
func (*EventNameAutofillClient) Delete ¶
func (c *EventNameAutofillClient) Delete() *EventNameAutofillDelete
Delete returns a delete builder for EventNameAutofill.
func (*EventNameAutofillClient) DeleteOne ¶
func (c *EventNameAutofillClient) DeleteOne(ena *EventNameAutofill) *EventNameAutofillDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*EventNameAutofillClient) DeleteOneID ¶
func (c *EventNameAutofillClient) DeleteOneID(id int) *EventNameAutofillDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*EventNameAutofillClient) Get ¶
func (c *EventNameAutofillClient) Get(ctx context.Context, id int) (*EventNameAutofill, error)
Get returns a EventNameAutofill entity by its id.
func (*EventNameAutofillClient) GetX ¶
func (c *EventNameAutofillClient) GetX(ctx context.Context, id int) *EventNameAutofill
GetX is like Get, but panics if an error occurs.
func (*EventNameAutofillClient) Hooks ¶
func (c *EventNameAutofillClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EventNameAutofillClient) Query ¶
func (c *EventNameAutofillClient) Query() *EventNameAutofillQuery
Query returns a query builder for EventNameAutofill.
func (*EventNameAutofillClient) Update ¶
func (c *EventNameAutofillClient) Update() *EventNameAutofillUpdate
Update returns an update builder for EventNameAutofill.
func (*EventNameAutofillClient) UpdateOne ¶
func (c *EventNameAutofillClient) UpdateOne(ena *EventNameAutofill) *EventNameAutofillUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EventNameAutofillClient) UpdateOneID ¶
func (c *EventNameAutofillClient) UpdateOneID(id int) *EventNameAutofillUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EventNameAutofillClient) Use ¶
func (c *EventNameAutofillClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `eventnameautofill.Hooks(f(g(h())))`.
type EventNameAutofillCreate ¶
type EventNameAutofillCreate struct {
// contains filtered or unexported fields
}
EventNameAutofillCreate is the builder for creating a EventNameAutofill entity.
func (*EventNameAutofillCreate) Exec ¶
func (enac *EventNameAutofillCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventNameAutofillCreate) ExecX ¶
func (enac *EventNameAutofillCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventNameAutofillCreate) Mutation ¶
func (enac *EventNameAutofillCreate) Mutation() *EventNameAutofillMutation
Mutation returns the EventNameAutofillMutation object of the builder.
func (*EventNameAutofillCreate) Save ¶
func (enac *EventNameAutofillCreate) Save(ctx context.Context) (*EventNameAutofill, error)
Save creates the EventNameAutofill in the database.
func (*EventNameAutofillCreate) SaveX ¶
func (enac *EventNameAutofillCreate) SaveX(ctx context.Context) *EventNameAutofill
SaveX calls Save and panics if Save returns an error.
func (*EventNameAutofillCreate) SetEventName ¶
func (enac *EventNameAutofillCreate) SetEventName(s string) *EventNameAutofillCreate
SetEventName sets the "eventName" field.
type EventNameAutofillCreateBulk ¶
type EventNameAutofillCreateBulk struct {
// contains filtered or unexported fields
}
EventNameAutofillCreateBulk is the builder for creating many EventNameAutofill entities in bulk.
func (*EventNameAutofillCreateBulk) Exec ¶
func (enacb *EventNameAutofillCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EventNameAutofillCreateBulk) ExecX ¶
func (enacb *EventNameAutofillCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventNameAutofillCreateBulk) Save ¶
func (enacb *EventNameAutofillCreateBulk) Save(ctx context.Context) ([]*EventNameAutofill, error)
Save creates the EventNameAutofill entities in the database.
func (*EventNameAutofillCreateBulk) SaveX ¶
func (enacb *EventNameAutofillCreateBulk) SaveX(ctx context.Context) []*EventNameAutofill
SaveX is like Save, but panics if an error occurs.
type EventNameAutofillDelete ¶
type EventNameAutofillDelete struct {
// contains filtered or unexported fields
}
EventNameAutofillDelete is the builder for deleting a EventNameAutofill entity.
func (*EventNameAutofillDelete) Exec ¶
func (enad *EventNameAutofillDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EventNameAutofillDelete) ExecX ¶
func (enad *EventNameAutofillDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EventNameAutofillDelete) Where ¶
func (enad *EventNameAutofillDelete) Where(ps ...predicate.EventNameAutofill) *EventNameAutofillDelete
Where appends a list predicates to the EventNameAutofillDelete builder.
type EventNameAutofillDeleteOne ¶
type EventNameAutofillDeleteOne struct {
// contains filtered or unexported fields
}
EventNameAutofillDeleteOne is the builder for deleting a single EventNameAutofill entity.
func (*EventNameAutofillDeleteOne) Exec ¶
func (enado *EventNameAutofillDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EventNameAutofillDeleteOne) ExecX ¶
func (enado *EventNameAutofillDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EventNameAutofillGroupBy ¶
type EventNameAutofillGroupBy struct {
// contains filtered or unexported fields
}
EventNameAutofillGroupBy is the group-by builder for EventNameAutofill entities.
func (*EventNameAutofillGroupBy) Aggregate ¶
func (enagb *EventNameAutofillGroupBy) Aggregate(fns ...AggregateFunc) *EventNameAutofillGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EventNameAutofillGroupBy) Bool ¶
func (enagb *EventNameAutofillGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*EventNameAutofillGroupBy) BoolX ¶
func (enagb *EventNameAutofillGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*EventNameAutofillGroupBy) Bools ¶
func (enagb *EventNameAutofillGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*EventNameAutofillGroupBy) BoolsX ¶
func (enagb *EventNameAutofillGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*EventNameAutofillGroupBy) Float64 ¶
func (enagb *EventNameAutofillGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*EventNameAutofillGroupBy) Float64X ¶
func (enagb *EventNameAutofillGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*EventNameAutofillGroupBy) Float64s ¶
func (enagb *EventNameAutofillGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*EventNameAutofillGroupBy) Float64sX ¶
func (enagb *EventNameAutofillGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*EventNameAutofillGroupBy) Int ¶
func (enagb *EventNameAutofillGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*EventNameAutofillGroupBy) IntX ¶
func (enagb *EventNameAutofillGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*EventNameAutofillGroupBy) Ints ¶
func (enagb *EventNameAutofillGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*EventNameAutofillGroupBy) IntsX ¶
func (enagb *EventNameAutofillGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*EventNameAutofillGroupBy) Scan ¶
func (enagb *EventNameAutofillGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*EventNameAutofillGroupBy) ScanX ¶
func (enagb *EventNameAutofillGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*EventNameAutofillGroupBy) String ¶
func (enagb *EventNameAutofillGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*EventNameAutofillGroupBy) StringX ¶
func (enagb *EventNameAutofillGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type EventNameAutofillMutation ¶
type EventNameAutofillMutation struct {
// contains filtered or unexported fields
}
EventNameAutofillMutation represents an operation that mutates the EventNameAutofill nodes in the graph.
func (*EventNameAutofillMutation) AddField ¶
func (m *EventNameAutofillMutation) 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 (*EventNameAutofillMutation) AddedEdges ¶
func (m *EventNameAutofillMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EventNameAutofillMutation) AddedField ¶
func (m *EventNameAutofillMutation) 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 (*EventNameAutofillMutation) AddedFields ¶
func (m *EventNameAutofillMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EventNameAutofillMutation) AddedIDs ¶
func (m *EventNameAutofillMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EventNameAutofillMutation) ClearEdge ¶
func (m *EventNameAutofillMutation) 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 (*EventNameAutofillMutation) ClearField ¶
func (m *EventNameAutofillMutation) 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 (*EventNameAutofillMutation) ClearedEdges ¶
func (m *EventNameAutofillMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EventNameAutofillMutation) ClearedFields ¶
func (m *EventNameAutofillMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EventNameAutofillMutation) Client ¶
func (m EventNameAutofillMutation) 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 (*EventNameAutofillMutation) EdgeCleared ¶
func (m *EventNameAutofillMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EventNameAutofillMutation) EventName ¶
func (m *EventNameAutofillMutation) EventName() (r string, exists bool)
EventName returns the value of the "eventName" field in the mutation.
func (*EventNameAutofillMutation) Field ¶
func (m *EventNameAutofillMutation) 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 (*EventNameAutofillMutation) FieldCleared ¶
func (m *EventNameAutofillMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EventNameAutofillMutation) Fields ¶
func (m *EventNameAutofillMutation) 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 (*EventNameAutofillMutation) ID ¶
func (m *EventNameAutofillMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*EventNameAutofillMutation) IDs ¶
func (m *EventNameAutofillMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*EventNameAutofillMutation) OldEventName ¶
func (m *EventNameAutofillMutation) OldEventName(ctx context.Context) (v string, err error)
OldEventName returns the old "eventName" field's value of the EventNameAutofill entity. If the EventNameAutofill 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 (*EventNameAutofillMutation) 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 (*EventNameAutofillMutation) Op ¶
func (m *EventNameAutofillMutation) Op() Op
Op returns the operation name.
func (*EventNameAutofillMutation) RemovedEdges ¶
func (m *EventNameAutofillMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EventNameAutofillMutation) RemovedIDs ¶
func (m *EventNameAutofillMutation) 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 (*EventNameAutofillMutation) ResetEdge ¶
func (m *EventNameAutofillMutation) 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 (*EventNameAutofillMutation) ResetEventName ¶
func (m *EventNameAutofillMutation) ResetEventName()
ResetEventName resets all changes to the "eventName" field.
func (*EventNameAutofillMutation) ResetField ¶
func (m *EventNameAutofillMutation) 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 (*EventNameAutofillMutation) SetEventName ¶
func (m *EventNameAutofillMutation) SetEventName(s string)
SetEventName sets the "eventName" field.
func (*EventNameAutofillMutation) SetField ¶
func (m *EventNameAutofillMutation) 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 (EventNameAutofillMutation) Tx ¶
func (m EventNameAutofillMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EventNameAutofillMutation) Type ¶
func (m *EventNameAutofillMutation) Type() string
Type returns the node type of this mutation (EventNameAutofill).
func (*EventNameAutofillMutation) Where ¶
func (m *EventNameAutofillMutation) Where(ps ...predicate.EventNameAutofill)
Where appends a list predicates to the EventNameAutofillMutation builder.
type EventNameAutofillQuery ¶
type EventNameAutofillQuery struct {
// contains filtered or unexported fields
}
EventNameAutofillQuery is the builder for querying EventNameAutofill entities.
func (*EventNameAutofillQuery) All ¶
func (enaq *EventNameAutofillQuery) All(ctx context.Context) ([]*EventNameAutofill, error)
All executes the query and returns a list of EventNameAutofills.
func (*EventNameAutofillQuery) AllX ¶
func (enaq *EventNameAutofillQuery) AllX(ctx context.Context) []*EventNameAutofill
AllX is like All, but panics if an error occurs.
func (*EventNameAutofillQuery) Clone ¶
func (enaq *EventNameAutofillQuery) Clone() *EventNameAutofillQuery
Clone returns a duplicate of the EventNameAutofillQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EventNameAutofillQuery) Count ¶
func (enaq *EventNameAutofillQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EventNameAutofillQuery) CountX ¶
func (enaq *EventNameAutofillQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EventNameAutofillQuery) Exist ¶
func (enaq *EventNameAutofillQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EventNameAutofillQuery) ExistX ¶
func (enaq *EventNameAutofillQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EventNameAutofillQuery) First ¶
func (enaq *EventNameAutofillQuery) First(ctx context.Context) (*EventNameAutofill, error)
First returns the first EventNameAutofill entity from the query. Returns a *NotFoundError when no EventNameAutofill was found.
func (*EventNameAutofillQuery) FirstID ¶
func (enaq *EventNameAutofillQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first EventNameAutofill ID from the query. Returns a *NotFoundError when no EventNameAutofill ID was found.
func (*EventNameAutofillQuery) FirstIDX ¶
func (enaq *EventNameAutofillQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EventNameAutofillQuery) FirstX ¶
func (enaq *EventNameAutofillQuery) FirstX(ctx context.Context) *EventNameAutofill
FirstX is like First, but panics if an error occurs.
func (*EventNameAutofillQuery) GroupBy ¶
func (enaq *EventNameAutofillQuery) GroupBy(field string, fields ...string) *EventNameAutofillGroupBy
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 { EventName string `json:"eventName,omitempty"` Count int `json:"count,omitempty"` } client.EventNameAutofill.Query(). GroupBy(eventnameautofill.FieldEventName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EventNameAutofillQuery) IDs ¶
func (enaq *EventNameAutofillQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of EventNameAutofill IDs.
func (*EventNameAutofillQuery) IDsX ¶
func (enaq *EventNameAutofillQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EventNameAutofillQuery) Limit ¶
func (enaq *EventNameAutofillQuery) Limit(limit int) *EventNameAutofillQuery
Limit adds a limit step to the query.
func (*EventNameAutofillQuery) Offset ¶
func (enaq *EventNameAutofillQuery) Offset(offset int) *EventNameAutofillQuery
Offset adds an offset step to the query.
func (*EventNameAutofillQuery) Only ¶
func (enaq *EventNameAutofillQuery) Only(ctx context.Context) (*EventNameAutofill, error)
Only returns a single EventNameAutofill entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EventNameAutofill entity is found. Returns a *NotFoundError when no EventNameAutofill entities are found.
func (*EventNameAutofillQuery) OnlyID ¶
func (enaq *EventNameAutofillQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only EventNameAutofill ID in the query. Returns a *NotSingularError when more than one EventNameAutofill ID is found. Returns a *NotFoundError when no entities are found.
func (*EventNameAutofillQuery) OnlyIDX ¶
func (enaq *EventNameAutofillQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EventNameAutofillQuery) OnlyX ¶
func (enaq *EventNameAutofillQuery) OnlyX(ctx context.Context) *EventNameAutofill
OnlyX is like Only, but panics if an error occurs.
func (*EventNameAutofillQuery) Order ¶
func (enaq *EventNameAutofillQuery) Order(o ...OrderFunc) *EventNameAutofillQuery
Order adds an order step to the query.
func (*EventNameAutofillQuery) Select ¶
func (enaq *EventNameAutofillQuery) Select(fields ...string) *EventNameAutofillSelect
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 { EventName string `json:"eventName,omitempty"` } client.EventNameAutofill.Query(). Select(eventnameautofill.FieldEventName). Scan(ctx, &v)
func (*EventNameAutofillQuery) Unique ¶
func (enaq *EventNameAutofillQuery) Unique(unique bool) *EventNameAutofillQuery
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 (*EventNameAutofillQuery) Where ¶
func (enaq *EventNameAutofillQuery) Where(ps ...predicate.EventNameAutofill) *EventNameAutofillQuery
Where adds a new predicate for the EventNameAutofillQuery builder.
type EventNameAutofillSelect ¶
type EventNameAutofillSelect struct { *EventNameAutofillQuery // contains filtered or unexported fields }
EventNameAutofillSelect is the builder for selecting fields of EventNameAutofill entities.
func (*EventNameAutofillSelect) Bool ¶
func (enas *EventNameAutofillSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EventNameAutofillSelect) BoolX ¶
func (enas *EventNameAutofillSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*EventNameAutofillSelect) Bools ¶
func (enas *EventNameAutofillSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EventNameAutofillSelect) BoolsX ¶
func (enas *EventNameAutofillSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*EventNameAutofillSelect) Float64 ¶
func (enas *EventNameAutofillSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EventNameAutofillSelect) Float64X ¶
func (enas *EventNameAutofillSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*EventNameAutofillSelect) Float64s ¶
func (enas *EventNameAutofillSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EventNameAutofillSelect) Float64sX ¶
func (enas *EventNameAutofillSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*EventNameAutofillSelect) Int ¶
func (enas *EventNameAutofillSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EventNameAutofillSelect) IntX ¶
func (enas *EventNameAutofillSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*EventNameAutofillSelect) Ints ¶
func (enas *EventNameAutofillSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EventNameAutofillSelect) IntsX ¶
func (enas *EventNameAutofillSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*EventNameAutofillSelect) Scan ¶
func (enas *EventNameAutofillSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*EventNameAutofillSelect) ScanX ¶
func (enas *EventNameAutofillSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*EventNameAutofillSelect) String ¶
func (enas *EventNameAutofillSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*EventNameAutofillSelect) StringX ¶
func (enas *EventNameAutofillSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type EventNameAutofillUpdate ¶
type EventNameAutofillUpdate struct {
// contains filtered or unexported fields
}
EventNameAutofillUpdate is the builder for updating EventNameAutofill entities.
func (*EventNameAutofillUpdate) Exec ¶
func (enau *EventNameAutofillUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventNameAutofillUpdate) ExecX ¶
func (enau *EventNameAutofillUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventNameAutofillUpdate) Mutation ¶
func (enau *EventNameAutofillUpdate) Mutation() *EventNameAutofillMutation
Mutation returns the EventNameAutofillMutation object of the builder.
func (*EventNameAutofillUpdate) Save ¶
func (enau *EventNameAutofillUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EventNameAutofillUpdate) SaveX ¶
func (enau *EventNameAutofillUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EventNameAutofillUpdate) SetEventName ¶
func (enau *EventNameAutofillUpdate) SetEventName(s string) *EventNameAutofillUpdate
SetEventName sets the "eventName" field.
func (*EventNameAutofillUpdate) Where ¶
func (enau *EventNameAutofillUpdate) Where(ps ...predicate.EventNameAutofill) *EventNameAutofillUpdate
Where appends a list predicates to the EventNameAutofillUpdate builder.
type EventNameAutofillUpdateOne ¶
type EventNameAutofillUpdateOne struct {
// contains filtered or unexported fields
}
EventNameAutofillUpdateOne is the builder for updating a single EventNameAutofill entity.
func (*EventNameAutofillUpdateOne) Exec ¶
func (enauo *EventNameAutofillUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EventNameAutofillUpdateOne) ExecX ¶
func (enauo *EventNameAutofillUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventNameAutofillUpdateOne) Mutation ¶
func (enauo *EventNameAutofillUpdateOne) Mutation() *EventNameAutofillMutation
Mutation returns the EventNameAutofillMutation object of the builder.
func (*EventNameAutofillUpdateOne) Save ¶
func (enauo *EventNameAutofillUpdateOne) Save(ctx context.Context) (*EventNameAutofill, error)
Save executes the query and returns the updated EventNameAutofill entity.
func (*EventNameAutofillUpdateOne) SaveX ¶
func (enauo *EventNameAutofillUpdateOne) SaveX(ctx context.Context) *EventNameAutofill
SaveX is like Save, but panics if an error occurs.
func (*EventNameAutofillUpdateOne) Select ¶
func (enauo *EventNameAutofillUpdateOne) Select(field string, fields ...string) *EventNameAutofillUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EventNameAutofillUpdateOne) SetEventName ¶
func (enauo *EventNameAutofillUpdateOne) SetEventName(s string) *EventNameAutofillUpdateOne
SetEventName sets the "eventName" field.
type EventNameAutofills ¶
type EventNameAutofills []*EventNameAutofill
EventNameAutofills is a parsable slice of EventNameAutofill.
type EventQuery ¶
type EventQuery struct {
// contains filtered or unexported fields
}
EventQuery is the builder for querying Event entities.
func (*EventQuery) All ¶
func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)
All executes the query and returns a list of Events.
func (*EventQuery) AllX ¶
func (eq *EventQuery) AllX(ctx context.Context) []*Event
AllX is like All, but panics if an error occurs.
func (*EventQuery) Clone ¶
func (eq *EventQuery) Clone() *EventQuery
Clone returns a duplicate of the EventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EventQuery) Count ¶
func (eq *EventQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EventQuery) CountX ¶
func (eq *EventQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EventQuery) Exist ¶
func (eq *EventQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EventQuery) ExistX ¶
func (eq *EventQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EventQuery) First ¶
func (eq *EventQuery) First(ctx context.Context) (*Event, error)
First returns the first Event entity from the query. Returns a *NotFoundError when no Event was found.
func (*EventQuery) FirstID ¶
FirstID returns the first Event ID from the query. Returns a *NotFoundError when no Event ID was found.
func (*EventQuery) FirstIDX ¶
func (eq *EventQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*EventQuery) FirstX ¶
func (eq *EventQuery) FirstX(ctx context.Context) *Event
FirstX is like First, but panics if an error occurs.
func (*EventQuery) GroupBy ¶
func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy
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 { EventTime time.Time `json:"event_time,omitempty"` Count int `json:"count,omitempty"` } client.Event.Query(). GroupBy(event.FieldEventTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EventQuery) IDsX ¶
func (eq *EventQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*EventQuery) Limit ¶
func (eq *EventQuery) Limit(limit int) *EventQuery
Limit adds a limit step to the query.
func (*EventQuery) Offset ¶
func (eq *EventQuery) Offset(offset int) *EventQuery
Offset adds an offset step to the query.
func (*EventQuery) Only ¶
func (eq *EventQuery) Only(ctx context.Context) (*Event, error)
Only returns a single Event entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Event entity is found. Returns a *NotFoundError when no Event entities are found.
func (*EventQuery) OnlyID ¶
OnlyID is like Only, but returns the only Event ID in the query. Returns a *NotSingularError when more than one Event ID is found. Returns a *NotFoundError when no entities are found.
func (*EventQuery) OnlyIDX ¶
func (eq *EventQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EventQuery) OnlyX ¶
func (eq *EventQuery) OnlyX(ctx context.Context) *Event
OnlyX is like Only, but panics if an error occurs.
func (*EventQuery) Order ¶
func (eq *EventQuery) Order(o ...OrderFunc) *EventQuery
Order adds an order step to the query.
func (*EventQuery) Select ¶
func (eq *EventQuery) Select(fields ...string) *EventSelect
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 { EventTime time.Time `json:"event_time,omitempty"` } client.Event.Query(). Select(event.FieldEventTime). Scan(ctx, &v)
func (*EventQuery) Unique ¶
func (eq *EventQuery) Unique(unique bool) *EventQuery
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 (*EventQuery) Where ¶
func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery
Where adds a new predicate for the EventQuery builder.
type EventSelect ¶
type EventSelect struct { *EventQuery // contains filtered or unexported fields }
EventSelect is the builder for selecting fields of Event entities.
func (*EventSelect) Bool ¶
func (es *EventSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EventSelect) BoolX ¶
func (es *EventSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*EventSelect) Bools ¶
func (es *EventSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EventSelect) BoolsX ¶
func (es *EventSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*EventSelect) Float64 ¶
func (es *EventSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EventSelect) Float64X ¶
func (es *EventSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*EventSelect) Float64s ¶
func (es *EventSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EventSelect) Float64sX ¶
func (es *EventSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*EventSelect) Int ¶
func (es *EventSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EventSelect) IntX ¶
func (es *EventSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*EventSelect) Ints ¶
func (es *EventSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EventSelect) IntsX ¶
func (es *EventSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*EventSelect) Scan ¶
func (es *EventSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*EventSelect) ScanX ¶
func (es *EventSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*EventSelect) String ¶
func (es *EventSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*EventSelect) StringX ¶
func (es *EventSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type EventUpdate ¶
type EventUpdate struct {
// contains filtered or unexported fields
}
EventUpdate is the builder for updating Event entities.
func (*EventUpdate) Exec ¶
func (eu *EventUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventUpdate) ExecX ¶
func (eu *EventUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpdate) Mutation ¶
func (eu *EventUpdate) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventUpdate) Save ¶
func (eu *EventUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EventUpdate) SaveX ¶
func (eu *EventUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EventUpdate) SetEventData ¶
func (eu *EventUpdate) SetEventData(m map[string]interface{}) *EventUpdate
SetEventData sets the "event_data" field.
func (*EventUpdate) SetEventName ¶
func (eu *EventUpdate) SetEventName(s string) *EventUpdate
SetEventName sets the "event_name" field.
func (*EventUpdate) SetEventSource ¶
func (eu *EventUpdate) SetEventSource(s string) *EventUpdate
SetEventSource sets the "event_source" field.
func (*EventUpdate) SetEventTime ¶
func (eu *EventUpdate) SetEventTime(t time.Time) *EventUpdate
SetEventTime sets the "event_time" field.
func (*EventUpdate) SetNillableEventSource ¶
func (eu *EventUpdate) SetNillableEventSource(s *string) *EventUpdate
SetNillableEventSource sets the "event_source" field if the given value is not nil.
func (*EventUpdate) SetNillableEventTime ¶
func (eu *EventUpdate) SetNillableEventTime(t *time.Time) *EventUpdate
SetNillableEventTime sets the "event_time" field if the given value is not nil.
func (*EventUpdate) SetNillableReadOnly ¶
func (eu *EventUpdate) SetNillableReadOnly(b *bool) *EventUpdate
SetNillableReadOnly sets the "read_only" field if the given value is not nil.
func (*EventUpdate) SetNillableRequestID ¶
func (eu *EventUpdate) SetNillableRequestID(s *string) *EventUpdate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*EventUpdate) SetNillableResource ¶
func (eu *EventUpdate) SetNillableResource(s *string) *EventUpdate
SetNillableResource sets the "resource" field if the given value is not nil.
func (*EventUpdate) SetNillableSourceIP ¶
func (eu *EventUpdate) SetNillableSourceIP(s *string) *EventUpdate
SetNillableSourceIP sets the "source_ip" field if the given value is not nil.
func (*EventUpdate) SetReadOnly ¶
func (eu *EventUpdate) SetReadOnly(b bool) *EventUpdate
SetReadOnly sets the "read_only" field.
func (*EventUpdate) SetRequestID ¶
func (eu *EventUpdate) SetRequestID(s string) *EventUpdate
SetRequestID sets the "request_id" field.
func (*EventUpdate) SetResource ¶
func (eu *EventUpdate) SetResource(s string) *EventUpdate
SetResource sets the "resource" field.
func (*EventUpdate) SetSourceIP ¶
func (eu *EventUpdate) SetSourceIP(s string) *EventUpdate
SetSourceIP sets the "source_ip" field.
func (*EventUpdate) SetUsername ¶
func (eu *EventUpdate) SetUsername(s string) *EventUpdate
SetUsername sets the "username" field.
func (*EventUpdate) Where ¶
func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate
Where appends a list predicates to the EventUpdate builder.
type EventUpdateOne ¶
type EventUpdateOne struct {
// contains filtered or unexported fields
}
EventUpdateOne is the builder for updating a single Event entity.
func (*EventUpdateOne) Exec ¶
func (euo *EventUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EventUpdateOne) ExecX ¶
func (euo *EventUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpdateOne) Mutation ¶
func (euo *EventUpdateOne) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventUpdateOne) Save ¶
func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)
Save executes the query and returns the updated Event entity.
func (*EventUpdateOne) SaveX ¶
func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event
SaveX is like Save, but panics if an error occurs.
func (*EventUpdateOne) Select ¶
func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EventUpdateOne) SetEventData ¶
func (euo *EventUpdateOne) SetEventData(m map[string]interface{}) *EventUpdateOne
SetEventData sets the "event_data" field.
func (*EventUpdateOne) SetEventName ¶
func (euo *EventUpdateOne) SetEventName(s string) *EventUpdateOne
SetEventName sets the "event_name" field.
func (*EventUpdateOne) SetEventSource ¶
func (euo *EventUpdateOne) SetEventSource(s string) *EventUpdateOne
SetEventSource sets the "event_source" field.
func (*EventUpdateOne) SetEventTime ¶
func (euo *EventUpdateOne) SetEventTime(t time.Time) *EventUpdateOne
SetEventTime sets the "event_time" field.
func (*EventUpdateOne) SetNillableEventSource ¶
func (euo *EventUpdateOne) SetNillableEventSource(s *string) *EventUpdateOne
SetNillableEventSource sets the "event_source" field if the given value is not nil.
func (*EventUpdateOne) SetNillableEventTime ¶
func (euo *EventUpdateOne) SetNillableEventTime(t *time.Time) *EventUpdateOne
SetNillableEventTime sets the "event_time" field if the given value is not nil.
func (*EventUpdateOne) SetNillableReadOnly ¶
func (euo *EventUpdateOne) SetNillableReadOnly(b *bool) *EventUpdateOne
SetNillableReadOnly sets the "read_only" field if the given value is not nil.
func (*EventUpdateOne) SetNillableRequestID ¶
func (euo *EventUpdateOne) SetNillableRequestID(s *string) *EventUpdateOne
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*EventUpdateOne) SetNillableResource ¶
func (euo *EventUpdateOne) SetNillableResource(s *string) *EventUpdateOne
SetNillableResource sets the "resource" field if the given value is not nil.
func (*EventUpdateOne) SetNillableSourceIP ¶
func (euo *EventUpdateOne) SetNillableSourceIP(s *string) *EventUpdateOne
SetNillableSourceIP sets the "source_ip" field if the given value is not nil.
func (*EventUpdateOne) SetReadOnly ¶
func (euo *EventUpdateOne) SetReadOnly(b bool) *EventUpdateOne
SetReadOnly sets the "read_only" field.
func (*EventUpdateOne) SetRequestID ¶
func (euo *EventUpdateOne) SetRequestID(s string) *EventUpdateOne
SetRequestID sets the "request_id" field.
func (*EventUpdateOne) SetResource ¶
func (euo *EventUpdateOne) SetResource(s string) *EventUpdateOne
SetResource sets the "resource" field.
func (*EventUpdateOne) SetSourceIP ¶
func (euo *EventUpdateOne) SetSourceIP(s string) *EventUpdateOne
SetSourceIP sets the "source_ip" field.
func (*EventUpdateOne) SetUsername ¶
func (euo *EventUpdateOne) SetUsername(s string) *EventUpdateOne
SetUsername sets the "username" field.
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 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 Tx ¶
type Tx struct { // Event is the client for interacting with the Event builders. Event *EventClient // EventNameAutofill is the client for interacting with the EventNameAutofill builders. EventNameAutofill *EventNameAutofillClient // User is the client for interacting with the User builders. User *UserClient // UsernameAutofill is the client for interacting with the UsernameAutofill builders. UsernameAutofill *UsernameAutofillClient // 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"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // HashedPassword holds the value of the "hashed_password" field. HashedPassword string `json:"hashed_password,omitempty"` // Role holds the value of the "role" field. Role string `json:"role,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // PasswordLastSetAt holds the value of the "password_last_set_at" field. PasswordLastSetAt time.Time `json:"password_last_set_at,omitempty"` // ForcePasswordChange holds the value of the "force_password_change" field. ForcePasswordChange bool `json:"force_password_change,omitempty"` // LastLogin holds the value of the "last_login" field. LastLogin time.Time `json:"last_login,omitempty"` // FailedLogins holds the value of the "failed_logins" field. FailedLogins int `json:"failed_logins,omitempty"` // Locked holds the value of the "locked" field. Locked bool `json:"locked,omitempty"` // LockedUntil holds the value of the "locked_until" field. LockedUntil time.Time `json:"locked_until,omitempty"` // MfaSecret holds the value of the "mfa_secret" field. MfaSecret string `json:"mfa_secret,omitempty"` // MfaSetupCompleted holds the value of the "mfa_setup_completed" field. MfaSetupCompleted bool `json:"mfa_setup_completed,omitempty"` // RecentPasswords holds the value of the "recent_passwords" field. RecentPasswords []string `json:"recent_passwords,omitempty"` // MfaImage holds the value of the "mfa_image" field. MfaImage []byte `json:"mfa_image,omitempty"` // Timezone holds the value of the "timezone" field. Timezone string `json:"timezone,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
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 create builder for User.
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 delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for 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) 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) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetFailedLogins ¶
func (uc *UserCreate) SetFailedLogins(i int) *UserCreate
SetFailedLogins sets the "failed_logins" field.
func (*UserCreate) SetForcePasswordChange ¶
func (uc *UserCreate) SetForcePasswordChange(b bool) *UserCreate
SetForcePasswordChange sets the "force_password_change" field.
func (*UserCreate) SetHashedPassword ¶
func (uc *UserCreate) SetHashedPassword(s string) *UserCreate
SetHashedPassword sets the "hashed_password" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetLastLogin ¶
func (uc *UserCreate) SetLastLogin(t time.Time) *UserCreate
SetLastLogin sets the "last_login" field.
func (*UserCreate) SetLocked ¶
func (uc *UserCreate) SetLocked(b bool) *UserCreate
SetLocked sets the "locked" field.
func (*UserCreate) SetLockedUntil ¶
func (uc *UserCreate) SetLockedUntil(t time.Time) *UserCreate
SetLockedUntil sets the "locked_until" field.
func (*UserCreate) SetMfaImage ¶
func (uc *UserCreate) SetMfaImage(b []byte) *UserCreate
SetMfaImage sets the "mfa_image" field.
func (*UserCreate) SetMfaSecret ¶
func (uc *UserCreate) SetMfaSecret(s string) *UserCreate
SetMfaSecret sets the "mfa_secret" field.
func (*UserCreate) SetMfaSetupCompleted ¶
func (uc *UserCreate) SetMfaSetupCompleted(b bool) *UserCreate
SetMfaSetupCompleted sets the "mfa_setup_completed" field.
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) SetNillableFailedLogins ¶
func (uc *UserCreate) SetNillableFailedLogins(i *int) *UserCreate
SetNillableFailedLogins sets the "failed_logins" field if the given value is not nil.
func (*UserCreate) SetNillableForcePasswordChange ¶
func (uc *UserCreate) SetNillableForcePasswordChange(b *bool) *UserCreate
SetNillableForcePasswordChange sets the "force_password_change" 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) SetNillableLastLogin ¶
func (uc *UserCreate) SetNillableLastLogin(t *time.Time) *UserCreate
SetNillableLastLogin sets the "last_login" field if the given value is not nil.
func (*UserCreate) SetNillableLocked ¶
func (uc *UserCreate) SetNillableLocked(b *bool) *UserCreate
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*UserCreate) SetNillableLockedUntil ¶
func (uc *UserCreate) SetNillableLockedUntil(t *time.Time) *UserCreate
SetNillableLockedUntil sets the "locked_until" field if the given value is not nil.
func (*UserCreate) SetNillableMfaSecret ¶
func (uc *UserCreate) SetNillableMfaSecret(s *string) *UserCreate
SetNillableMfaSecret sets the "mfa_secret" field if the given value is not nil.
func (*UserCreate) SetNillableMfaSetupCompleted ¶
func (uc *UserCreate) SetNillableMfaSetupCompleted(b *bool) *UserCreate
SetNillableMfaSetupCompleted sets the "mfa_setup_completed" field if the given value is not nil.
func (*UserCreate) SetNillablePasswordLastSetAt ¶
func (uc *UserCreate) SetNillablePasswordLastSetAt(t *time.Time) *UserCreate
SetNillablePasswordLastSetAt sets the "password_last_set_at" field if the given value is not nil.
func (*UserCreate) SetNillableTimezone ¶
func (uc *UserCreate) SetNillableTimezone(s *string) *UserCreate
SetNillableTimezone sets the "timezone" field if the given value is not nil.
func (*UserCreate) SetPasswordLastSetAt ¶
func (uc *UserCreate) SetPasswordLastSetAt(t time.Time) *UserCreate
SetPasswordLastSetAt sets the "password_last_set_at" field.
func (*UserCreate) SetRecentPasswords ¶
func (uc *UserCreate) SetRecentPasswords(s []string) *UserCreate
SetRecentPasswords sets the "recent_passwords" field.
func (*UserCreate) SetRole ¶
func (uc *UserCreate) SetRole(s string) *UserCreate
SetRole sets the "role" field.
func (*UserCreate) SetTimezone ¶
func (uc *UserCreate) SetTimezone(s string) *UserCreate
SetTimezone sets the "timezone" 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.
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 ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolX ¶
func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserGroupBy) Bools ¶
func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolsX ¶
func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupBy) Float64 ¶
func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64X ¶
func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶
func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64sX ¶
func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Int ¶
func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntX ¶
func (ugb *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserGroupBy) Ints ¶
func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntsX ¶
func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) ScanX ¶
func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserGroupBy) String ¶
func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) StringX ¶
func (ugb *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddFailedLogins ¶
func (m *UserMutation) AddFailedLogins(i int)
AddFailedLogins adds i to the "failed_logins" field.
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) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedFailedLogins ¶
func (m *UserMutation) AddedFailedLogins() (r int, exists bool)
AddedFailedLogins returns the value that was added to the "failed_logins" field 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) 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) ClearMfaImage ¶
func (m *UserMutation) ClearMfaImage()
ClearMfaImage clears the value of the "mfa_image" field.
func (*UserMutation) ClearMfaSecret ¶
func (m *UserMutation) ClearMfaSecret()
ClearMfaSecret clears the value of the "mfa_secret" field.
func (*UserMutation) ClearRecentPasswords ¶
func (m *UserMutation) ClearRecentPasswords()
ClearRecentPasswords clears the value of the "recent_passwords" field.
func (*UserMutation) ClearTimezone ¶
func (m *UserMutation) ClearTimezone()
ClearTimezone clears the value of the "timezone" field.
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) FailedLogins ¶
func (m *UserMutation) FailedLogins() (r int, exists bool)
FailedLogins returns the value of the "failed_logins" 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) ForcePasswordChange ¶
func (m *UserMutation) ForcePasswordChange() (r bool, exists bool)
ForcePasswordChange returns the value of the "force_password_change" field in the mutation.
func (*UserMutation) HashedPassword ¶
func (m *UserMutation) HashedPassword() (r string, exists bool)
HashedPassword returns the value of the "hashed_password" field in the mutation.
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) LastLogin ¶
func (m *UserMutation) LastLogin() (r time.Time, exists bool)
LastLogin returns the value of the "last_login" field in the mutation.
func (*UserMutation) Locked ¶
func (m *UserMutation) Locked() (r bool, exists bool)
Locked returns the value of the "locked" field in the mutation.
func (*UserMutation) LockedUntil ¶
func (m *UserMutation) LockedUntil() (r time.Time, exists bool)
LockedUntil returns the value of the "locked_until" field in the mutation.
func (*UserMutation) MfaImage ¶
func (m *UserMutation) MfaImage() (r []byte, exists bool)
MfaImage returns the value of the "mfa_image" field in the mutation.
func (*UserMutation) MfaImageCleared ¶
func (m *UserMutation) MfaImageCleared() bool
MfaImageCleared returns if the "mfa_image" field was cleared in this mutation.
func (*UserMutation) MfaSecret ¶
func (m *UserMutation) MfaSecret() (r string, exists bool)
MfaSecret returns the value of the "mfa_secret" field in the mutation.
func (*UserMutation) MfaSecretCleared ¶
func (m *UserMutation) MfaSecretCleared() bool
MfaSecretCleared returns if the "mfa_secret" field was cleared in this mutation.
func (*UserMutation) MfaSetupCompleted ¶
func (m *UserMutation) MfaSetupCompleted() (r bool, exists bool)
MfaSetupCompleted returns the value of the "mfa_setup_completed" 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) OldFailedLogins ¶
func (m *UserMutation) OldFailedLogins(ctx context.Context) (v int, err error)
OldFailedLogins returns the old "failed_logins" 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) OldForcePasswordChange ¶
func (m *UserMutation) OldForcePasswordChange(ctx context.Context) (v bool, err error)
OldForcePasswordChange returns the old "force_password_change" 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) OldHashedPassword ¶
func (m *UserMutation) OldHashedPassword(ctx context.Context) (v string, err error)
OldHashedPassword returns the old "hashed_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) 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) OldLocked ¶
func (m *UserMutation) OldLocked(ctx context.Context) (v bool, err error)
OldLocked returns the old "locked" 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) OldLockedUntil ¶
OldLockedUntil returns the old "locked_until" 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) OldMfaImage ¶
func (m *UserMutation) OldMfaImage(ctx context.Context) (v []byte, err error)
OldMfaImage returns the old "mfa_image" 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) OldMfaSecret ¶
func (m *UserMutation) OldMfaSecret(ctx context.Context) (v string, err error)
OldMfaSecret returns the old "mfa_secret" 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) OldMfaSetupCompleted ¶
func (m *UserMutation) OldMfaSetupCompleted(ctx context.Context) (v bool, err error)
OldMfaSetupCompleted returns the old "mfa_setup_completed" 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) OldPasswordLastSetAt ¶
OldPasswordLastSetAt returns the old "password_last_set_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) OldRecentPasswords ¶
func (m *UserMutation) OldRecentPasswords(ctx context.Context) (v []string, err error)
OldRecentPasswords returns the old "recent_passwords" 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) OldRole ¶
func (m *UserMutation) OldRole(ctx context.Context) (v string, err error)
OldRole returns the old "role" 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) OldTimezone ¶
func (m *UserMutation) OldTimezone(ctx context.Context) (v string, err error)
OldTimezone returns the old "timezone" 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) PasswordLastSetAt ¶
func (m *UserMutation) PasswordLastSetAt() (r time.Time, exists bool)
PasswordLastSetAt returns the value of the "password_last_set_at" field in the mutation.
func (*UserMutation) RecentPasswords ¶
func (m *UserMutation) RecentPasswords() (r []string, exists bool)
RecentPasswords returns the value of the "recent_passwords" field in the mutation.
func (*UserMutation) RecentPasswordsCleared ¶
func (m *UserMutation) RecentPasswordsCleared() bool
RecentPasswordsCleared returns if the "recent_passwords" field was cleared in this mutation.
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) 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) ResetFailedLogins ¶
func (m *UserMutation) ResetFailedLogins()
ResetFailedLogins resets all changes to the "failed_logins" 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) ResetForcePasswordChange ¶
func (m *UserMutation) ResetForcePasswordChange()
ResetForcePasswordChange resets all changes to the "force_password_change" field.
func (*UserMutation) ResetHashedPassword ¶
func (m *UserMutation) ResetHashedPassword()
ResetHashedPassword resets all changes to the "hashed_password" field.
func (*UserMutation) ResetLastLogin ¶
func (m *UserMutation) ResetLastLogin()
ResetLastLogin resets all changes to the "last_login" field.
func (*UserMutation) ResetLocked ¶
func (m *UserMutation) ResetLocked()
ResetLocked resets all changes to the "locked" field.
func (*UserMutation) ResetLockedUntil ¶
func (m *UserMutation) ResetLockedUntil()
ResetLockedUntil resets all changes to the "locked_until" field.
func (*UserMutation) ResetMfaImage ¶
func (m *UserMutation) ResetMfaImage()
ResetMfaImage resets all changes to the "mfa_image" field.
func (*UserMutation) ResetMfaSecret ¶
func (m *UserMutation) ResetMfaSecret()
ResetMfaSecret resets all changes to the "mfa_secret" field.
func (*UserMutation) ResetMfaSetupCompleted ¶
func (m *UserMutation) ResetMfaSetupCompleted()
ResetMfaSetupCompleted resets all changes to the "mfa_setup_completed" field.
func (*UserMutation) ResetPasswordLastSetAt ¶
func (m *UserMutation) ResetPasswordLastSetAt()
ResetPasswordLastSetAt resets all changes to the "password_last_set_at" field.
func (*UserMutation) ResetRecentPasswords ¶
func (m *UserMutation) ResetRecentPasswords()
ResetRecentPasswords resets all changes to the "recent_passwords" field.
func (*UserMutation) ResetRole ¶
func (m *UserMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*UserMutation) ResetTimezone ¶
func (m *UserMutation) ResetTimezone()
ResetTimezone resets all changes to the "timezone" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) Role ¶
func (m *UserMutation) Role() (r string, exists bool)
Role returns the value of the "role" field in the mutation.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetFailedLogins ¶
func (m *UserMutation) SetFailedLogins(i int)
SetFailedLogins sets the "failed_logins" 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) SetForcePasswordChange ¶
func (m *UserMutation) SetForcePasswordChange(b bool)
SetForcePasswordChange sets the "force_password_change" field.
func (*UserMutation) SetHashedPassword ¶
func (m *UserMutation) SetHashedPassword(s string)
SetHashedPassword sets the "hashed_password" field.
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) SetLastLogin ¶
func (m *UserMutation) SetLastLogin(t time.Time)
SetLastLogin sets the "last_login" field.
func (*UserMutation) SetLocked ¶
func (m *UserMutation) SetLocked(b bool)
SetLocked sets the "locked" field.
func (*UserMutation) SetLockedUntil ¶
func (m *UserMutation) SetLockedUntil(t time.Time)
SetLockedUntil sets the "locked_until" field.
func (*UserMutation) SetMfaImage ¶
func (m *UserMutation) SetMfaImage(b []byte)
SetMfaImage sets the "mfa_image" field.
func (*UserMutation) SetMfaSecret ¶
func (m *UserMutation) SetMfaSecret(s string)
SetMfaSecret sets the "mfa_secret" field.
func (*UserMutation) SetMfaSetupCompleted ¶
func (m *UserMutation) SetMfaSetupCompleted(b bool)
SetMfaSetupCompleted sets the "mfa_setup_completed" field.
func (*UserMutation) SetPasswordLastSetAt ¶
func (m *UserMutation) SetPasswordLastSetAt(t time.Time)
SetPasswordLastSetAt sets the "password_last_set_at" field.
func (*UserMutation) SetRecentPasswords ¶
func (m *UserMutation) SetRecentPasswords(s []string)
SetRecentPasswords sets the "recent_passwords" field.
func (*UserMutation) SetRole ¶
func (m *UserMutation) SetRole(s string)
SetRole sets the "role" field.
func (*UserMutation) SetTimezone ¶
func (m *UserMutation) SetTimezone(s string)
SetTimezone sets the "timezone" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UserMutation) Timezone ¶
func (m *UserMutation) Timezone() (r string, exists bool)
Timezone returns the value of the "timezone" field in the mutation.
func (*UserMutation) TimezoneCleared ¶
func (m *UserMutation) TimezoneCleared() bool
TimezoneCleared returns if the "timezone" field was cleared in this 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) 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.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
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) 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)
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolX ¶
func (us *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSelect) Bools ¶
func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolsX ¶
func (us *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSelect) Float64 ¶
func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶
func (us *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSelect) Float64s ¶
func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶
func (us *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Int ¶
func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntX ¶
func (us *UserSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSelect) Ints ¶
func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntsX ¶
func (us *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) ScanX ¶
func (us *UserSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSelect) String ¶
func (us *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSelect) StringX ¶
func (us *UserSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddFailedLogins ¶
func (uu *UserUpdate) AddFailedLogins(i int) *UserUpdate
AddFailedLogins adds i to the "failed_logins" field.
func (*UserUpdate) ClearMfaImage ¶
func (uu *UserUpdate) ClearMfaImage() *UserUpdate
ClearMfaImage clears the value of the "mfa_image" field.
func (*UserUpdate) ClearMfaSecret ¶
func (uu *UserUpdate) ClearMfaSecret() *UserUpdate
ClearMfaSecret clears the value of the "mfa_secret" field.
func (*UserUpdate) ClearRecentPasswords ¶
func (uu *UserUpdate) ClearRecentPasswords() *UserUpdate
ClearRecentPasswords clears the value of the "recent_passwords" field.
func (*UserUpdate) ClearTimezone ¶
func (uu *UserUpdate) ClearTimezone() *UserUpdate
ClearTimezone clears the value of the "timezone" field.
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) 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) SetCreatedAt ¶
func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
SetCreatedAt sets the "created_at" field.
func (*UserUpdate) SetFailedLogins ¶
func (uu *UserUpdate) SetFailedLogins(i int) *UserUpdate
SetFailedLogins sets the "failed_logins" field.
func (*UserUpdate) SetForcePasswordChange ¶
func (uu *UserUpdate) SetForcePasswordChange(b bool) *UserUpdate
SetForcePasswordChange sets the "force_password_change" field.
func (*UserUpdate) SetHashedPassword ¶
func (uu *UserUpdate) SetHashedPassword(s string) *UserUpdate
SetHashedPassword sets the "hashed_password" field.
func (*UserUpdate) SetLastLogin ¶
func (uu *UserUpdate) SetLastLogin(t time.Time) *UserUpdate
SetLastLogin sets the "last_login" field.
func (*UserUpdate) SetLocked ¶
func (uu *UserUpdate) SetLocked(b bool) *UserUpdate
SetLocked sets the "locked" field.
func (*UserUpdate) SetLockedUntil ¶
func (uu *UserUpdate) SetLockedUntil(t time.Time) *UserUpdate
SetLockedUntil sets the "locked_until" field.
func (*UserUpdate) SetMfaImage ¶
func (uu *UserUpdate) SetMfaImage(b []byte) *UserUpdate
SetMfaImage sets the "mfa_image" field.
func (*UserUpdate) SetMfaSecret ¶
func (uu *UserUpdate) SetMfaSecret(s string) *UserUpdate
SetMfaSecret sets the "mfa_secret" field.
func (*UserUpdate) SetMfaSetupCompleted ¶
func (uu *UserUpdate) SetMfaSetupCompleted(b bool) *UserUpdate
SetMfaSetupCompleted sets the "mfa_setup_completed" field.
func (*UserUpdate) SetNillableCreatedAt ¶
func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdate) SetNillableFailedLogins ¶
func (uu *UserUpdate) SetNillableFailedLogins(i *int) *UserUpdate
SetNillableFailedLogins sets the "failed_logins" field if the given value is not nil.
func (*UserUpdate) SetNillableForcePasswordChange ¶
func (uu *UserUpdate) SetNillableForcePasswordChange(b *bool) *UserUpdate
SetNillableForcePasswordChange sets the "force_password_change" 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) SetNillableLocked ¶
func (uu *UserUpdate) SetNillableLocked(b *bool) *UserUpdate
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*UserUpdate) SetNillableLockedUntil ¶
func (uu *UserUpdate) SetNillableLockedUntil(t *time.Time) *UserUpdate
SetNillableLockedUntil sets the "locked_until" field if the given value is not nil.
func (*UserUpdate) SetNillableMfaSecret ¶
func (uu *UserUpdate) SetNillableMfaSecret(s *string) *UserUpdate
SetNillableMfaSecret sets the "mfa_secret" field if the given value is not nil.
func (*UserUpdate) SetNillableMfaSetupCompleted ¶
func (uu *UserUpdate) SetNillableMfaSetupCompleted(b *bool) *UserUpdate
SetNillableMfaSetupCompleted sets the "mfa_setup_completed" field if the given value is not nil.
func (*UserUpdate) SetNillablePasswordLastSetAt ¶
func (uu *UserUpdate) SetNillablePasswordLastSetAt(t *time.Time) *UserUpdate
SetNillablePasswordLastSetAt sets the "password_last_set_at" field if the given value is not nil.
func (*UserUpdate) SetNillableTimezone ¶
func (uu *UserUpdate) SetNillableTimezone(s *string) *UserUpdate
SetNillableTimezone sets the "timezone" field if the given value is not nil.
func (*UserUpdate) SetPasswordLastSetAt ¶
func (uu *UserUpdate) SetPasswordLastSetAt(t time.Time) *UserUpdate
SetPasswordLastSetAt sets the "password_last_set_at" field.
func (*UserUpdate) SetRecentPasswords ¶
func (uu *UserUpdate) SetRecentPasswords(s []string) *UserUpdate
SetRecentPasswords sets the "recent_passwords" field.
func (*UserUpdate) SetRole ¶
func (uu *UserUpdate) SetRole(s string) *UserUpdate
SetRole sets the "role" field.
func (*UserUpdate) SetTimezone ¶
func (uu *UserUpdate) SetTimezone(s string) *UserUpdate
SetTimezone sets the "timezone" 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) AddFailedLogins ¶
func (uuo *UserUpdateOne) AddFailedLogins(i int) *UserUpdateOne
AddFailedLogins adds i to the "failed_logins" field.
func (*UserUpdateOne) ClearMfaImage ¶
func (uuo *UserUpdateOne) ClearMfaImage() *UserUpdateOne
ClearMfaImage clears the value of the "mfa_image" field.
func (*UserUpdateOne) ClearMfaSecret ¶
func (uuo *UserUpdateOne) ClearMfaSecret() *UserUpdateOne
ClearMfaSecret clears the value of the "mfa_secret" field.
func (*UserUpdateOne) ClearRecentPasswords ¶
func (uuo *UserUpdateOne) ClearRecentPasswords() *UserUpdateOne
ClearRecentPasswords clears the value of the "recent_passwords" field.
func (*UserUpdateOne) ClearTimezone ¶
func (uuo *UserUpdateOne) ClearTimezone() *UserUpdateOne
ClearTimezone clears the value of the "timezone" field.
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) 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) SetCreatedAt ¶
func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserUpdateOne) SetFailedLogins ¶
func (uuo *UserUpdateOne) SetFailedLogins(i int) *UserUpdateOne
SetFailedLogins sets the "failed_logins" field.
func (*UserUpdateOne) SetForcePasswordChange ¶
func (uuo *UserUpdateOne) SetForcePasswordChange(b bool) *UserUpdateOne
SetForcePasswordChange sets the "force_password_change" field.
func (*UserUpdateOne) SetHashedPassword ¶
func (uuo *UserUpdateOne) SetHashedPassword(s string) *UserUpdateOne
SetHashedPassword sets the "hashed_password" field.
func (*UserUpdateOne) SetLastLogin ¶
func (uuo *UserUpdateOne) SetLastLogin(t time.Time) *UserUpdateOne
SetLastLogin sets the "last_login" field.
func (*UserUpdateOne) SetLocked ¶
func (uuo *UserUpdateOne) SetLocked(b bool) *UserUpdateOne
SetLocked sets the "locked" field.
func (*UserUpdateOne) SetLockedUntil ¶
func (uuo *UserUpdateOne) SetLockedUntil(t time.Time) *UserUpdateOne
SetLockedUntil sets the "locked_until" field.
func (*UserUpdateOne) SetMfaImage ¶
func (uuo *UserUpdateOne) SetMfaImage(b []byte) *UserUpdateOne
SetMfaImage sets the "mfa_image" field.
func (*UserUpdateOne) SetMfaSecret ¶
func (uuo *UserUpdateOne) SetMfaSecret(s string) *UserUpdateOne
SetMfaSecret sets the "mfa_secret" field.
func (*UserUpdateOne) SetMfaSetupCompleted ¶
func (uuo *UserUpdateOne) SetMfaSetupCompleted(b bool) *UserUpdateOne
SetMfaSetupCompleted sets the "mfa_setup_completed" field.
func (*UserUpdateOne) SetNillableCreatedAt ¶
func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableFailedLogins ¶
func (uuo *UserUpdateOne) SetNillableFailedLogins(i *int) *UserUpdateOne
SetNillableFailedLogins sets the "failed_logins" field if the given value is not nil.
func (*UserUpdateOne) SetNillableForcePasswordChange ¶
func (uuo *UserUpdateOne) SetNillableForcePasswordChange(b *bool) *UserUpdateOne
SetNillableForcePasswordChange sets the "force_password_change" 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) SetNillableLocked ¶
func (uuo *UserUpdateOne) SetNillableLocked(b *bool) *UserUpdateOne
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLockedUntil ¶
func (uuo *UserUpdateOne) SetNillableLockedUntil(t *time.Time) *UserUpdateOne
SetNillableLockedUntil sets the "locked_until" field if the given value is not nil.
func (*UserUpdateOne) SetNillableMfaSecret ¶
func (uuo *UserUpdateOne) SetNillableMfaSecret(s *string) *UserUpdateOne
SetNillableMfaSecret sets the "mfa_secret" field if the given value is not nil.
func (*UserUpdateOne) SetNillableMfaSetupCompleted ¶
func (uuo *UserUpdateOne) SetNillableMfaSetupCompleted(b *bool) *UserUpdateOne
SetNillableMfaSetupCompleted sets the "mfa_setup_completed" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePasswordLastSetAt ¶
func (uuo *UserUpdateOne) SetNillablePasswordLastSetAt(t *time.Time) *UserUpdateOne
SetNillablePasswordLastSetAt sets the "password_last_set_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTimezone ¶
func (uuo *UserUpdateOne) SetNillableTimezone(s *string) *UserUpdateOne
SetNillableTimezone sets the "timezone" field if the given value is not nil.
func (*UserUpdateOne) SetPasswordLastSetAt ¶
func (uuo *UserUpdateOne) SetPasswordLastSetAt(t time.Time) *UserUpdateOne
SetPasswordLastSetAt sets the "password_last_set_at" field.
func (*UserUpdateOne) SetRecentPasswords ¶
func (uuo *UserUpdateOne) SetRecentPasswords(s []string) *UserUpdateOne
SetRecentPasswords sets the "recent_passwords" field.
func (*UserUpdateOne) SetRole ¶
func (uuo *UserUpdateOne) SetRole(s string) *UserUpdateOne
SetRole sets the "role" field.
func (*UserUpdateOne) SetTimezone ¶
func (uuo *UserUpdateOne) SetTimezone(s string) *UserUpdateOne
SetTimezone sets the "timezone" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
type UsernameAutofill ¶
type UsernameAutofill struct { // ID of the ent. ID int `json:"id,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // contains filtered or unexported fields }
UsernameAutofill is the model entity for the UsernameAutofill schema.
func (*UsernameAutofill) String ¶
func (ua *UsernameAutofill) String() string
String implements the fmt.Stringer.
func (*UsernameAutofill) Unwrap ¶
func (ua *UsernameAutofill) Unwrap() *UsernameAutofill
Unwrap unwraps the UsernameAutofill 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 (*UsernameAutofill) Update ¶
func (ua *UsernameAutofill) Update() *UsernameAutofillUpdateOne
Update returns a builder for updating this UsernameAutofill. Note that you need to call UsernameAutofill.Unwrap() before calling this method if this UsernameAutofill was returned from a transaction, and the transaction was committed or rolled back.
type UsernameAutofillClient ¶
type UsernameAutofillClient struct {
// contains filtered or unexported fields
}
UsernameAutofillClient is a client for the UsernameAutofill schema.
func NewUsernameAutofillClient ¶
func NewUsernameAutofillClient(c config) *UsernameAutofillClient
NewUsernameAutofillClient returns a client for the UsernameAutofill from the given config.
func (*UsernameAutofillClient) Create ¶
func (c *UsernameAutofillClient) Create() *UsernameAutofillCreate
Create returns a create builder for UsernameAutofill.
func (*UsernameAutofillClient) CreateBulk ¶
func (c *UsernameAutofillClient) CreateBulk(builders ...*UsernameAutofillCreate) *UsernameAutofillCreateBulk
CreateBulk returns a builder for creating a bulk of UsernameAutofill entities.
func (*UsernameAutofillClient) Delete ¶
func (c *UsernameAutofillClient) Delete() *UsernameAutofillDelete
Delete returns a delete builder for UsernameAutofill.
func (*UsernameAutofillClient) DeleteOne ¶
func (c *UsernameAutofillClient) DeleteOne(ua *UsernameAutofill) *UsernameAutofillDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UsernameAutofillClient) DeleteOneID ¶
func (c *UsernameAutofillClient) DeleteOneID(id int) *UsernameAutofillDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UsernameAutofillClient) Get ¶
func (c *UsernameAutofillClient) Get(ctx context.Context, id int) (*UsernameAutofill, error)
Get returns a UsernameAutofill entity by its id.
func (*UsernameAutofillClient) GetX ¶
func (c *UsernameAutofillClient) GetX(ctx context.Context, id int) *UsernameAutofill
GetX is like Get, but panics if an error occurs.
func (*UsernameAutofillClient) Hooks ¶
func (c *UsernameAutofillClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UsernameAutofillClient) Query ¶
func (c *UsernameAutofillClient) Query() *UsernameAutofillQuery
Query returns a query builder for UsernameAutofill.
func (*UsernameAutofillClient) Update ¶
func (c *UsernameAutofillClient) Update() *UsernameAutofillUpdate
Update returns an update builder for UsernameAutofill.
func (*UsernameAutofillClient) UpdateOne ¶
func (c *UsernameAutofillClient) UpdateOne(ua *UsernameAutofill) *UsernameAutofillUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UsernameAutofillClient) UpdateOneID ¶
func (c *UsernameAutofillClient) UpdateOneID(id int) *UsernameAutofillUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UsernameAutofillClient) Use ¶
func (c *UsernameAutofillClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usernameautofill.Hooks(f(g(h())))`.
type UsernameAutofillCreate ¶
type UsernameAutofillCreate struct {
// contains filtered or unexported fields
}
UsernameAutofillCreate is the builder for creating a UsernameAutofill entity.
func (*UsernameAutofillCreate) Exec ¶
func (uac *UsernameAutofillCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UsernameAutofillCreate) ExecX ¶
func (uac *UsernameAutofillCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsernameAutofillCreate) Mutation ¶
func (uac *UsernameAutofillCreate) Mutation() *UsernameAutofillMutation
Mutation returns the UsernameAutofillMutation object of the builder.
func (*UsernameAutofillCreate) Save ¶
func (uac *UsernameAutofillCreate) Save(ctx context.Context) (*UsernameAutofill, error)
Save creates the UsernameAutofill in the database.
func (*UsernameAutofillCreate) SaveX ¶
func (uac *UsernameAutofillCreate) SaveX(ctx context.Context) *UsernameAutofill
SaveX calls Save and panics if Save returns an error.
func (*UsernameAutofillCreate) SetUsername ¶
func (uac *UsernameAutofillCreate) SetUsername(s string) *UsernameAutofillCreate
SetUsername sets the "username" field.
type UsernameAutofillCreateBulk ¶
type UsernameAutofillCreateBulk struct {
// contains filtered or unexported fields
}
UsernameAutofillCreateBulk is the builder for creating many UsernameAutofill entities in bulk.
func (*UsernameAutofillCreateBulk) Exec ¶
func (uacb *UsernameAutofillCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UsernameAutofillCreateBulk) ExecX ¶
func (uacb *UsernameAutofillCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsernameAutofillCreateBulk) Save ¶
func (uacb *UsernameAutofillCreateBulk) Save(ctx context.Context) ([]*UsernameAutofill, error)
Save creates the UsernameAutofill entities in the database.
func (*UsernameAutofillCreateBulk) SaveX ¶
func (uacb *UsernameAutofillCreateBulk) SaveX(ctx context.Context) []*UsernameAutofill
SaveX is like Save, but panics if an error occurs.
type UsernameAutofillDelete ¶
type UsernameAutofillDelete struct {
// contains filtered or unexported fields
}
UsernameAutofillDelete is the builder for deleting a UsernameAutofill entity.
func (*UsernameAutofillDelete) Exec ¶
func (uad *UsernameAutofillDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UsernameAutofillDelete) ExecX ¶
func (uad *UsernameAutofillDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UsernameAutofillDelete) Where ¶
func (uad *UsernameAutofillDelete) Where(ps ...predicate.UsernameAutofill) *UsernameAutofillDelete
Where appends a list predicates to the UsernameAutofillDelete builder.
type UsernameAutofillDeleteOne ¶
type UsernameAutofillDeleteOne struct {
// contains filtered or unexported fields
}
UsernameAutofillDeleteOne is the builder for deleting a single UsernameAutofill entity.
func (*UsernameAutofillDeleteOne) Exec ¶
func (uado *UsernameAutofillDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UsernameAutofillDeleteOne) ExecX ¶
func (uado *UsernameAutofillDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UsernameAutofillGroupBy ¶
type UsernameAutofillGroupBy struct {
// contains filtered or unexported fields
}
UsernameAutofillGroupBy is the group-by builder for UsernameAutofill entities.
func (*UsernameAutofillGroupBy) Aggregate ¶
func (uagb *UsernameAutofillGroupBy) Aggregate(fns ...AggregateFunc) *UsernameAutofillGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UsernameAutofillGroupBy) Bool ¶
func (uagb *UsernameAutofillGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UsernameAutofillGroupBy) BoolX ¶
func (uagb *UsernameAutofillGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UsernameAutofillGroupBy) Bools ¶
func (uagb *UsernameAutofillGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UsernameAutofillGroupBy) BoolsX ¶
func (uagb *UsernameAutofillGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UsernameAutofillGroupBy) Float64 ¶
func (uagb *UsernameAutofillGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UsernameAutofillGroupBy) Float64X ¶
func (uagb *UsernameAutofillGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UsernameAutofillGroupBy) Float64s ¶
func (uagb *UsernameAutofillGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UsernameAutofillGroupBy) Float64sX ¶
func (uagb *UsernameAutofillGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UsernameAutofillGroupBy) Int ¶
func (uagb *UsernameAutofillGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UsernameAutofillGroupBy) IntX ¶
func (uagb *UsernameAutofillGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UsernameAutofillGroupBy) Ints ¶
func (uagb *UsernameAutofillGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UsernameAutofillGroupBy) IntsX ¶
func (uagb *UsernameAutofillGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UsernameAutofillGroupBy) Scan ¶
func (uagb *UsernameAutofillGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UsernameAutofillGroupBy) ScanX ¶
func (uagb *UsernameAutofillGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UsernameAutofillGroupBy) String ¶
func (uagb *UsernameAutofillGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UsernameAutofillGroupBy) StringX ¶
func (uagb *UsernameAutofillGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UsernameAutofillMutation ¶
type UsernameAutofillMutation struct {
// contains filtered or unexported fields
}
UsernameAutofillMutation represents an operation that mutates the UsernameAutofill nodes in the graph.
func (*UsernameAutofillMutation) AddField ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) AddedEdges ¶
func (m *UsernameAutofillMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UsernameAutofillMutation) AddedField ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) AddedFields ¶
func (m *UsernameAutofillMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UsernameAutofillMutation) AddedIDs ¶
func (m *UsernameAutofillMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UsernameAutofillMutation) ClearEdge ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) ClearField ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) ClearedEdges ¶
func (m *UsernameAutofillMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UsernameAutofillMutation) ClearedFields ¶
func (m *UsernameAutofillMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UsernameAutofillMutation) Client ¶
func (m UsernameAutofillMutation) 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 (*UsernameAutofillMutation) EdgeCleared ¶
func (m *UsernameAutofillMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UsernameAutofillMutation) Field ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) FieldCleared ¶
func (m *UsernameAutofillMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UsernameAutofillMutation) Fields ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) ID ¶
func (m *UsernameAutofillMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UsernameAutofillMutation) IDs ¶
func (m *UsernameAutofillMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UsernameAutofillMutation) 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 (*UsernameAutofillMutation) OldUsername ¶
func (m *UsernameAutofillMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the UsernameAutofill entity. If the UsernameAutofill 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 (*UsernameAutofillMutation) Op ¶
func (m *UsernameAutofillMutation) Op() Op
Op returns the operation name.
func (*UsernameAutofillMutation) RemovedEdges ¶
func (m *UsernameAutofillMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UsernameAutofillMutation) RemovedIDs ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) ResetEdge ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) ResetField ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) ResetUsername ¶
func (m *UsernameAutofillMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UsernameAutofillMutation) SetField ¶
func (m *UsernameAutofillMutation) 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 (*UsernameAutofillMutation) SetUsername ¶
func (m *UsernameAutofillMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (UsernameAutofillMutation) Tx ¶
func (m UsernameAutofillMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UsernameAutofillMutation) Type ¶
func (m *UsernameAutofillMutation) Type() string
Type returns the node type of this mutation (UsernameAutofill).
func (*UsernameAutofillMutation) Username ¶
func (m *UsernameAutofillMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UsernameAutofillMutation) Where ¶
func (m *UsernameAutofillMutation) Where(ps ...predicate.UsernameAutofill)
Where appends a list predicates to the UsernameAutofillMutation builder.
type UsernameAutofillQuery ¶
type UsernameAutofillQuery struct {
// contains filtered or unexported fields
}
UsernameAutofillQuery is the builder for querying UsernameAutofill entities.
func (*UsernameAutofillQuery) All ¶
func (uaq *UsernameAutofillQuery) All(ctx context.Context) ([]*UsernameAutofill, error)
All executes the query and returns a list of UsernameAutofills.
func (*UsernameAutofillQuery) AllX ¶
func (uaq *UsernameAutofillQuery) AllX(ctx context.Context) []*UsernameAutofill
AllX is like All, but panics if an error occurs.
func (*UsernameAutofillQuery) Clone ¶
func (uaq *UsernameAutofillQuery) Clone() *UsernameAutofillQuery
Clone returns a duplicate of the UsernameAutofillQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UsernameAutofillQuery) Count ¶
func (uaq *UsernameAutofillQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UsernameAutofillQuery) CountX ¶
func (uaq *UsernameAutofillQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UsernameAutofillQuery) Exist ¶
func (uaq *UsernameAutofillQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UsernameAutofillQuery) ExistX ¶
func (uaq *UsernameAutofillQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UsernameAutofillQuery) First ¶
func (uaq *UsernameAutofillQuery) First(ctx context.Context) (*UsernameAutofill, error)
First returns the first UsernameAutofill entity from the query. Returns a *NotFoundError when no UsernameAutofill was found.
func (*UsernameAutofillQuery) FirstID ¶
func (uaq *UsernameAutofillQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UsernameAutofill ID from the query. Returns a *NotFoundError when no UsernameAutofill ID was found.
func (*UsernameAutofillQuery) FirstIDX ¶
func (uaq *UsernameAutofillQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UsernameAutofillQuery) FirstX ¶
func (uaq *UsernameAutofillQuery) FirstX(ctx context.Context) *UsernameAutofill
FirstX is like First, but panics if an error occurs.
func (*UsernameAutofillQuery) GroupBy ¶
func (uaq *UsernameAutofillQuery) GroupBy(field string, fields ...string) *UsernameAutofillGroupBy
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.UsernameAutofill.Query(). GroupBy(usernameautofill.FieldUsername). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UsernameAutofillQuery) IDs ¶
func (uaq *UsernameAutofillQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UsernameAutofill IDs.
func (*UsernameAutofillQuery) IDsX ¶
func (uaq *UsernameAutofillQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UsernameAutofillQuery) Limit ¶
func (uaq *UsernameAutofillQuery) Limit(limit int) *UsernameAutofillQuery
Limit adds a limit step to the query.
func (*UsernameAutofillQuery) Offset ¶
func (uaq *UsernameAutofillQuery) Offset(offset int) *UsernameAutofillQuery
Offset adds an offset step to the query.
func (*UsernameAutofillQuery) Only ¶
func (uaq *UsernameAutofillQuery) Only(ctx context.Context) (*UsernameAutofill, error)
Only returns a single UsernameAutofill entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UsernameAutofill entity is found. Returns a *NotFoundError when no UsernameAutofill entities are found.
func (*UsernameAutofillQuery) OnlyID ¶
func (uaq *UsernameAutofillQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UsernameAutofill ID in the query. Returns a *NotSingularError when more than one UsernameAutofill ID is found. Returns a *NotFoundError when no entities are found.
func (*UsernameAutofillQuery) OnlyIDX ¶
func (uaq *UsernameAutofillQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UsernameAutofillQuery) OnlyX ¶
func (uaq *UsernameAutofillQuery) OnlyX(ctx context.Context) *UsernameAutofill
OnlyX is like Only, but panics if an error occurs.
func (*UsernameAutofillQuery) Order ¶
func (uaq *UsernameAutofillQuery) Order(o ...OrderFunc) *UsernameAutofillQuery
Order adds an order step to the query.
func (*UsernameAutofillQuery) Select ¶
func (uaq *UsernameAutofillQuery) Select(fields ...string) *UsernameAutofillSelect
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.UsernameAutofill.Query(). Select(usernameautofill.FieldUsername). Scan(ctx, &v)
func (*UsernameAutofillQuery) Unique ¶
func (uaq *UsernameAutofillQuery) Unique(unique bool) *UsernameAutofillQuery
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 (*UsernameAutofillQuery) Where ¶
func (uaq *UsernameAutofillQuery) Where(ps ...predicate.UsernameAutofill) *UsernameAutofillQuery
Where adds a new predicate for the UsernameAutofillQuery builder.
type UsernameAutofillSelect ¶
type UsernameAutofillSelect struct { *UsernameAutofillQuery // contains filtered or unexported fields }
UsernameAutofillSelect is the builder for selecting fields of UsernameAutofill entities.
func (*UsernameAutofillSelect) Bool ¶
func (uas *UsernameAutofillSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UsernameAutofillSelect) BoolX ¶
func (uas *UsernameAutofillSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UsernameAutofillSelect) Bools ¶
func (uas *UsernameAutofillSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UsernameAutofillSelect) BoolsX ¶
func (uas *UsernameAutofillSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UsernameAutofillSelect) Float64 ¶
func (uas *UsernameAutofillSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UsernameAutofillSelect) Float64X ¶
func (uas *UsernameAutofillSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UsernameAutofillSelect) Float64s ¶
func (uas *UsernameAutofillSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UsernameAutofillSelect) Float64sX ¶
func (uas *UsernameAutofillSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UsernameAutofillSelect) Int ¶
func (uas *UsernameAutofillSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UsernameAutofillSelect) IntX ¶
func (uas *UsernameAutofillSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UsernameAutofillSelect) Ints ¶
func (uas *UsernameAutofillSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UsernameAutofillSelect) IntsX ¶
func (uas *UsernameAutofillSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UsernameAutofillSelect) Scan ¶
func (uas *UsernameAutofillSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UsernameAutofillSelect) ScanX ¶
func (uas *UsernameAutofillSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UsernameAutofillSelect) String ¶
func (uas *UsernameAutofillSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UsernameAutofillSelect) StringX ¶
func (uas *UsernameAutofillSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UsernameAutofillUpdate ¶
type UsernameAutofillUpdate struct {
// contains filtered or unexported fields
}
UsernameAutofillUpdate is the builder for updating UsernameAutofill entities.
func (*UsernameAutofillUpdate) Exec ¶
func (uau *UsernameAutofillUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UsernameAutofillUpdate) ExecX ¶
func (uau *UsernameAutofillUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsernameAutofillUpdate) Mutation ¶
func (uau *UsernameAutofillUpdate) Mutation() *UsernameAutofillMutation
Mutation returns the UsernameAutofillMutation object of the builder.
func (*UsernameAutofillUpdate) Save ¶
func (uau *UsernameAutofillUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UsernameAutofillUpdate) SaveX ¶
func (uau *UsernameAutofillUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UsernameAutofillUpdate) SetUsername ¶
func (uau *UsernameAutofillUpdate) SetUsername(s string) *UsernameAutofillUpdate
SetUsername sets the "username" field.
func (*UsernameAutofillUpdate) Where ¶
func (uau *UsernameAutofillUpdate) Where(ps ...predicate.UsernameAutofill) *UsernameAutofillUpdate
Where appends a list predicates to the UsernameAutofillUpdate builder.
type UsernameAutofillUpdateOne ¶
type UsernameAutofillUpdateOne struct {
// contains filtered or unexported fields
}
UsernameAutofillUpdateOne is the builder for updating a single UsernameAutofill entity.
func (*UsernameAutofillUpdateOne) Exec ¶
func (uauo *UsernameAutofillUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UsernameAutofillUpdateOne) ExecX ¶
func (uauo *UsernameAutofillUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsernameAutofillUpdateOne) Mutation ¶
func (uauo *UsernameAutofillUpdateOne) Mutation() *UsernameAutofillMutation
Mutation returns the UsernameAutofillMutation object of the builder.
func (*UsernameAutofillUpdateOne) Save ¶
func (uauo *UsernameAutofillUpdateOne) Save(ctx context.Context) (*UsernameAutofill, error)
Save executes the query and returns the updated UsernameAutofill entity.
func (*UsernameAutofillUpdateOne) SaveX ¶
func (uauo *UsernameAutofillUpdateOne) SaveX(ctx context.Context) *UsernameAutofill
SaveX is like Save, but panics if an error occurs.
func (*UsernameAutofillUpdateOne) Select ¶
func (uauo *UsernameAutofillUpdateOne) Select(field string, fields ...string) *UsernameAutofillUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UsernameAutofillUpdateOne) SetUsername ¶
func (uauo *UsernameAutofillUpdateOne) SetUsername(s string) *UsernameAutofillUpdateOne
SetUsername sets the "username" field.
type UsernameAutofills ¶
type UsernameAutofills []*UsernameAutofill
UsernameAutofills is a parsable slice of UsernameAutofill.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- config.go
- context.go
- ent.go
- event.go
- event_create.go
- event_delete.go
- event_query.go
- event_update.go
- eventnameautofill.go
- eventnameautofill_create.go
- eventnameautofill_delete.go
- eventnameautofill_query.go
- eventnameautofill_update.go
- generate.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- usernameautofill.go
- usernameautofill_create.go
- usernameautofill_delete.go
- usernameautofill_query.go
- usernameautofill_update.go