Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type APIAudit
- type APIAuditClient
- func (c *APIAuditClient) Create() *APIAuditCreate
- func (c *APIAuditClient) CreateBulk(builders ...*APIAuditCreate) *APIAuditCreateBulk
- func (c *APIAuditClient) Delete() *APIAuditDelete
- func (c *APIAuditClient) DeleteOne(aa *APIAudit) *APIAuditDeleteOne
- func (c *APIAuditClient) DeleteOneID(id string) *APIAuditDeleteOne
- func (c *APIAuditClient) Get(ctx context.Context, id string) (*APIAudit, error)
- func (c *APIAuditClient) GetX(ctx context.Context, id string) *APIAudit
- func (c *APIAuditClient) Hooks() []Hook
- func (c *APIAuditClient) Intercept(interceptors ...Interceptor)
- func (c *APIAuditClient) Interceptors() []Interceptor
- func (c *APIAuditClient) MapCreateBulk(slice any, setFunc func(*APIAuditCreate, int)) *APIAuditCreateBulk
- func (c *APIAuditClient) Query() *APIAuditQuery
- func (c *APIAuditClient) Update() *APIAuditUpdate
- func (c *APIAuditClient) UpdateOne(aa *APIAudit) *APIAuditUpdateOne
- func (c *APIAuditClient) UpdateOneID(id string) *APIAuditUpdateOne
- func (c *APIAuditClient) Use(hooks ...Hook)
- type APIAuditCreate
- func (aac *APIAuditCreate) Exec(ctx context.Context) error
- func (aac *APIAuditCreate) ExecX(ctx context.Context)
- func (aac *APIAuditCreate) Mutation() *APIAuditMutation
- func (aac *APIAuditCreate) Save(ctx context.Context) (*APIAudit, error)
- func (aac *APIAuditCreate) SaveX(ctx context.Context) *APIAudit
- func (aac *APIAuditCreate) SetCreatedAt(t time.Time) *APIAuditCreate
- func (aac *APIAuditCreate) SetDeletedAt(t time.Time) *APIAuditCreate
- func (aac *APIAuditCreate) SetDomain(s string) *APIAuditCreate
- func (aac *APIAuditCreate) SetHTTPMethod(s string) *APIAuditCreate
- func (aac *APIAuditCreate) SetHTTPPath(s string) *APIAuditCreate
- func (aac *APIAuditCreate) SetHashedGrantToken(s string) *APIAuditCreate
- func (aac *APIAuditCreate) SetID(s string) *APIAuditCreate
- func (aac *APIAuditCreate) SetNillableCreatedAt(t *time.Time) *APIAuditCreate
- func (aac *APIAuditCreate) SetNillableDeletedAt(t *time.Time) *APIAuditCreate
- func (aac *APIAuditCreate) SetNillableDomain(s *string) *APIAuditCreate
- func (aac *APIAuditCreate) SetNillableHTTPMethod(s *string) *APIAuditCreate
- func (aac *APIAuditCreate) SetNillableHTTPPath(s *string) *APIAuditCreate
- func (aac *APIAuditCreate) SetNillableHashedGrantToken(s *string) *APIAuditCreate
- func (aac *APIAuditCreate) SetNillableID(s *string) *APIAuditCreate
- func (aac *APIAuditCreate) SetNillableSentHTTPStatus(i *int) *APIAuditCreate
- func (aac *APIAuditCreate) SetNillableUpdatedAt(t *time.Time) *APIAuditCreate
- func (aac *APIAuditCreate) SetPlane(s string) *APIAuditCreate
- func (aac *APIAuditCreate) SetSentHTTPStatus(i int) *APIAuditCreate
- func (aac *APIAuditCreate) SetUpdatedAt(t time.Time) *APIAuditCreate
- type APIAuditCreateBulk
- type APIAuditDelete
- type APIAuditDeleteOne
- type APIAuditFilter
- func (f *APIAuditFilter) Where(p entql.P)
- func (f *APIAuditFilter) WhereCreatedAt(p entql.TimeP)
- func (f *APIAuditFilter) WhereDeletedAt(p entql.TimeP)
- func (f *APIAuditFilter) WhereDomain(p entql.StringP)
- func (f *APIAuditFilter) WhereHTTPMethod(p entql.StringP)
- func (f *APIAuditFilter) WhereHTTPPath(p entql.StringP)
- func (f *APIAuditFilter) WhereHashedGrantToken(p entql.StringP)
- func (f *APIAuditFilter) WhereID(p entql.StringP)
- func (f *APIAuditFilter) WherePlane(p entql.StringP)
- func (f *APIAuditFilter) WhereSentHTTPStatus(p entql.IntP)
- func (f *APIAuditFilter) WhereUpdatedAt(p entql.TimeP)
- type APIAuditGroupBy
- func (aagb *APIAuditGroupBy) Aggregate(fns ...AggregateFunc) *APIAuditGroupBy
- func (s *APIAuditGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *APIAuditGroupBy) BoolX(ctx context.Context) bool
- func (s *APIAuditGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *APIAuditGroupBy) BoolsX(ctx context.Context) []bool
- func (s *APIAuditGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *APIAuditGroupBy) Float64X(ctx context.Context) float64
- func (s *APIAuditGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *APIAuditGroupBy) Float64sX(ctx context.Context) []float64
- func (s *APIAuditGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *APIAuditGroupBy) IntX(ctx context.Context) int
- func (s *APIAuditGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *APIAuditGroupBy) IntsX(ctx context.Context) []int
- func (aagb *APIAuditGroupBy) Scan(ctx context.Context, v any) error
- func (s *APIAuditGroupBy) ScanX(ctx context.Context, v any)
- func (s *APIAuditGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *APIAuditGroupBy) StringX(ctx context.Context) string
- func (s *APIAuditGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *APIAuditGroupBy) StringsX(ctx context.Context) []string
- type APIAuditMutation
- func (m *APIAuditMutation) AddField(name string, value ent.Value) error
- func (m *APIAuditMutation) AddSentHTTPStatus(i int)
- func (m *APIAuditMutation) AddedEdges() []string
- func (m *APIAuditMutation) AddedField(name string) (ent.Value, bool)
- func (m *APIAuditMutation) AddedFields() []string
- func (m *APIAuditMutation) AddedIDs(name string) []ent.Value
- func (m *APIAuditMutation) AddedSentHTTPStatus() (r int, exists bool)
- func (m *APIAuditMutation) ClearDeletedAt()
- func (m *APIAuditMutation) ClearDomain()
- func (m *APIAuditMutation) ClearEdge(name string) error
- func (m *APIAuditMutation) ClearField(name string) error
- func (m *APIAuditMutation) ClearHTTPMethod()
- func (m *APIAuditMutation) ClearHTTPPath()
- func (m *APIAuditMutation) ClearHashedGrantToken()
- func (m *APIAuditMutation) ClearSentHTTPStatus()
- func (m *APIAuditMutation) ClearedEdges() []string
- func (m *APIAuditMutation) ClearedFields() []string
- func (m APIAuditMutation) Client() *Client
- func (m *APIAuditMutation) CreatedAt() (r time.Time, exists bool)
- func (m *APIAuditMutation) DeletedAt() (r time.Time, exists bool)
- func (m *APIAuditMutation) DeletedAtCleared() bool
- func (m *APIAuditMutation) Domain() (r string, exists bool)
- func (m *APIAuditMutation) DomainCleared() bool
- func (m *APIAuditMutation) EdgeCleared(name string) bool
- func (m *APIAuditMutation) Field(name string) (ent.Value, bool)
- func (m *APIAuditMutation) FieldCleared(name string) bool
- func (m *APIAuditMutation) Fields() []string
- func (m *APIAuditMutation) Filter() *APIAuditFilter
- func (m *APIAuditMutation) HTTPMethod() (r string, exists bool)
- func (m *APIAuditMutation) HTTPMethodCleared() bool
- func (m *APIAuditMutation) HTTPPath() (r string, exists bool)
- func (m *APIAuditMutation) HTTPPathCleared() bool
- func (m *APIAuditMutation) HashedGrantToken() (r string, exists bool)
- func (m *APIAuditMutation) HashedGrantTokenCleared() bool
- func (m *APIAuditMutation) ID() (id string, exists bool)
- func (m *APIAuditMutation) IDs(ctx context.Context) ([]string, error)
- func (m *APIAuditMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *APIAuditMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *APIAuditMutation) OldDomain(ctx context.Context) (v string, err error)
- func (m *APIAuditMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *APIAuditMutation) OldHTTPMethod(ctx context.Context) (v string, err error)
- func (m *APIAuditMutation) OldHTTPPath(ctx context.Context) (v string, err error)
- func (m *APIAuditMutation) OldHashedGrantToken(ctx context.Context) (v string, err error)
- func (m *APIAuditMutation) OldPlane(ctx context.Context) (v string, err error)
- func (m *APIAuditMutation) OldSentHTTPStatus(ctx context.Context) (v int, err error)
- func (m *APIAuditMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *APIAuditMutation) Op() Op
- func (m *APIAuditMutation) Plane() (r string, exists bool)
- func (m *APIAuditMutation) RemovedEdges() []string
- func (m *APIAuditMutation) RemovedIDs(name string) []ent.Value
- func (m *APIAuditMutation) ResetCreatedAt()
- func (m *APIAuditMutation) ResetDeletedAt()
- func (m *APIAuditMutation) ResetDomain()
- func (m *APIAuditMutation) ResetEdge(name string) error
- func (m *APIAuditMutation) ResetField(name string) error
- func (m *APIAuditMutation) ResetHTTPMethod()
- func (m *APIAuditMutation) ResetHTTPPath()
- func (m *APIAuditMutation) ResetHashedGrantToken()
- func (m *APIAuditMutation) ResetPlane()
- func (m *APIAuditMutation) ResetSentHTTPStatus()
- func (m *APIAuditMutation) ResetUpdatedAt()
- func (m *APIAuditMutation) SentHTTPStatus() (r int, exists bool)
- func (m *APIAuditMutation) SentHTTPStatusCleared() bool
- func (m *APIAuditMutation) SetCreatedAt(t time.Time)
- func (m *APIAuditMutation) SetDeletedAt(t time.Time)
- func (m *APIAuditMutation) SetDomain(s string)
- func (m *APIAuditMutation) SetField(name string, value ent.Value) error
- func (m *APIAuditMutation) SetHTTPMethod(s string)
- func (m *APIAuditMutation) SetHTTPPath(s string)
- func (m *APIAuditMutation) SetHashedGrantToken(s string)
- func (m *APIAuditMutation) SetID(id string)
- func (m *APIAuditMutation) SetOp(op Op)
- func (m *APIAuditMutation) SetPlane(s string)
- func (m *APIAuditMutation) SetSentHTTPStatus(i int)
- func (m *APIAuditMutation) SetUpdatedAt(t time.Time)
- func (m APIAuditMutation) Tx() (*Tx, error)
- func (m *APIAuditMutation) Type() string
- func (m *APIAuditMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *APIAuditMutation) Where(ps ...predicate.APIAudit)
- func (m *APIAuditMutation) WhereP(ps ...func(*sql.Selector))
- type APIAuditQuery
- func (aaq *APIAuditQuery) Aggregate(fns ...AggregateFunc) *APIAuditSelect
- func (aaq *APIAuditQuery) All(ctx context.Context) ([]*APIAudit, error)
- func (aaq *APIAuditQuery) AllX(ctx context.Context) []*APIAudit
- func (aaq *APIAuditQuery) Clone() *APIAuditQuery
- func (aaq *APIAuditQuery) Count(ctx context.Context) (int, error)
- func (aaq *APIAuditQuery) CountX(ctx context.Context) int
- func (aaq *APIAuditQuery) Exist(ctx context.Context) (bool, error)
- func (aaq *APIAuditQuery) ExistX(ctx context.Context) bool
- func (aaq *APIAuditQuery) Filter() *APIAuditFilter
- func (aaq *APIAuditQuery) First(ctx context.Context) (*APIAudit, error)
- func (aaq *APIAuditQuery) FirstID(ctx context.Context) (id string, err error)
- func (aaq *APIAuditQuery) FirstIDX(ctx context.Context) string
- func (aaq *APIAuditQuery) FirstX(ctx context.Context) *APIAudit
- func (aaq *APIAuditQuery) GroupBy(field string, fields ...string) *APIAuditGroupBy
- func (aaq *APIAuditQuery) IDs(ctx context.Context) (ids []string, err error)
- func (aaq *APIAuditQuery) IDsX(ctx context.Context) []string
- func (aaq *APIAuditQuery) Limit(limit int) *APIAuditQuery
- func (aaq *APIAuditQuery) Offset(offset int) *APIAuditQuery
- func (aaq *APIAuditQuery) Only(ctx context.Context) (*APIAudit, error)
- func (aaq *APIAuditQuery) OnlyID(ctx context.Context) (id string, err error)
- func (aaq *APIAuditQuery) OnlyIDX(ctx context.Context) string
- func (aaq *APIAuditQuery) OnlyX(ctx context.Context) *APIAudit
- func (aaq *APIAuditQuery) Order(o ...apiaudit.OrderOption) *APIAuditQuery
- func (aaq *APIAuditQuery) Select(fields ...string) *APIAuditSelect
- func (aaq *APIAuditQuery) Unique(unique bool) *APIAuditQuery
- func (aaq *APIAuditQuery) Where(ps ...predicate.APIAudit) *APIAuditQuery
- type APIAuditSelect
- func (aas *APIAuditSelect) Aggregate(fns ...AggregateFunc) *APIAuditSelect
- func (s *APIAuditSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *APIAuditSelect) BoolX(ctx context.Context) bool
- func (s *APIAuditSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *APIAuditSelect) BoolsX(ctx context.Context) []bool
- func (s *APIAuditSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *APIAuditSelect) Float64X(ctx context.Context) float64
- func (s *APIAuditSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *APIAuditSelect) Float64sX(ctx context.Context) []float64
- func (s *APIAuditSelect) Int(ctx context.Context) (_ int, err error)
- func (s *APIAuditSelect) IntX(ctx context.Context) int
- func (s *APIAuditSelect) Ints(ctx context.Context) ([]int, error)
- func (s *APIAuditSelect) IntsX(ctx context.Context) []int
- func (aas *APIAuditSelect) Scan(ctx context.Context, v any) error
- func (s *APIAuditSelect) ScanX(ctx context.Context, v any)
- func (s *APIAuditSelect) String(ctx context.Context) (_ string, err error)
- func (s *APIAuditSelect) StringX(ctx context.Context) string
- func (s *APIAuditSelect) Strings(ctx context.Context) ([]string, error)
- func (s *APIAuditSelect) StringsX(ctx context.Context) []string
- type APIAuditUpdate
- func (aau *APIAuditUpdate) AddSentHTTPStatus(i int) *APIAuditUpdate
- func (aau *APIAuditUpdate) ClearDeletedAt() *APIAuditUpdate
- func (aau *APIAuditUpdate) ClearDomain() *APIAuditUpdate
- func (aau *APIAuditUpdate) ClearHTTPMethod() *APIAuditUpdate
- func (aau *APIAuditUpdate) ClearHTTPPath() *APIAuditUpdate
- func (aau *APIAuditUpdate) ClearHashedGrantToken() *APIAuditUpdate
- func (aau *APIAuditUpdate) ClearSentHTTPStatus() *APIAuditUpdate
- func (aau *APIAuditUpdate) Exec(ctx context.Context) error
- func (aau *APIAuditUpdate) ExecX(ctx context.Context)
- func (aau *APIAuditUpdate) Mutation() *APIAuditMutation
- func (aau *APIAuditUpdate) Save(ctx context.Context) (int, error)
- func (aau *APIAuditUpdate) SaveX(ctx context.Context) int
- func (aau *APIAuditUpdate) SetDeletedAt(t time.Time) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetDomain(s string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetHTTPMethod(s string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetHTTPPath(s string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetHashedGrantToken(s string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetNillableDeletedAt(t *time.Time) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetNillableDomain(s *string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetNillableHTTPMethod(s *string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetNillableHTTPPath(s *string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetNillableHashedGrantToken(s *string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetNillablePlane(s *string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetNillableSentHTTPStatus(i *int) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetPlane(s string) *APIAuditUpdate
- func (aau *APIAuditUpdate) SetSentHTTPStatus(i int) *APIAuditUpdate
- func (aau *APIAuditUpdate) Where(ps ...predicate.APIAudit) *APIAuditUpdate
- type APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) AddSentHTTPStatus(i int) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) ClearDeletedAt() *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) ClearDomain() *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) ClearHTTPMethod() *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) ClearHTTPPath() *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) ClearHashedGrantToken() *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) ClearSentHTTPStatus() *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) Exec(ctx context.Context) error
- func (aauo *APIAuditUpdateOne) ExecX(ctx context.Context)
- func (aauo *APIAuditUpdateOne) Mutation() *APIAuditMutation
- func (aauo *APIAuditUpdateOne) Save(ctx context.Context) (*APIAudit, error)
- func (aauo *APIAuditUpdateOne) SaveX(ctx context.Context) *APIAudit
- func (aauo *APIAuditUpdateOne) Select(field string, fields ...string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetDeletedAt(t time.Time) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetDomain(s string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetHTTPMethod(s string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetHTTPPath(s string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetHashedGrantToken(s string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetNillableDeletedAt(t *time.Time) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetNillableDomain(s *string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetNillableHTTPMethod(s *string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetNillableHTTPPath(s *string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetNillableHashedGrantToken(s *string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetNillablePlane(s *string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetNillableSentHTTPStatus(i *int) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetPlane(s string) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) SetSentHTTPStatus(i int) *APIAuditUpdateOne
- func (aauo *APIAuditUpdateOne) Where(ps ...predicate.APIAudit) *APIAuditUpdateOne
- type APIAudits
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Fact
- type FactClient
- func (c *FactClient) Create() *FactCreate
- func (c *FactClient) CreateBulk(builders ...*FactCreate) *FactCreateBulk
- func (c *FactClient) Delete() *FactDelete
- func (c *FactClient) DeleteOne(f *Fact) *FactDeleteOne
- func (c *FactClient) DeleteOneID(id string) *FactDeleteOne
- func (c *FactClient) Get(ctx context.Context, id string) (*Fact, error)
- func (c *FactClient) GetX(ctx context.Context, id string) *Fact
- func (c *FactClient) Hooks() []Hook
- func (c *FactClient) Intercept(interceptors ...Interceptor)
- func (c *FactClient) Interceptors() []Interceptor
- func (c *FactClient) MapCreateBulk(slice any, setFunc func(*FactCreate, int)) *FactCreateBulk
- func (c *FactClient) Query() *FactQuery
- func (c *FactClient) QueryScope(f *Fact) *ScopeQuery
- func (c *FactClient) Update() *FactUpdate
- func (c *FactClient) UpdateOne(f *Fact) *FactUpdateOne
- func (c *FactClient) UpdateOneID(id string) *FactUpdateOne
- func (c *FactClient) Use(hooks ...Hook)
- type FactCreate
- func (fc *FactCreate) Exec(ctx context.Context) error
- func (fc *FactCreate) ExecX(ctx context.Context)
- func (fc *FactCreate) Mutation() *FactMutation
- func (fc *FactCreate) Save(ctx context.Context) (*Fact, error)
- func (fc *FactCreate) SaveX(ctx context.Context) *Fact
- func (fc *FactCreate) SetBlindIndexes(s []string) *FactCreate
- func (fc *FactCreate) SetCollection(s string) *FactCreate
- func (fc *FactCreate) SetCreatedAt(t time.Time) *FactCreate
- func (fc *FactCreate) SetDeletedAt(t time.Time) *FactCreate
- func (fc *FactCreate) SetDomain(s string) *FactCreate
- func (fc *FactCreate) SetEncryptedValue(s string) *FactCreate
- func (fc *FactCreate) SetHashedValue(s string) *FactCreate
- func (fc *FactCreate) SetID(s string) *FactCreate
- func (fc *FactCreate) SetKey(s string) *FactCreate
- func (fc *FactCreate) SetNillableCreatedAt(t *time.Time) *FactCreate
- func (fc *FactCreate) SetNillableDeletedAt(t *time.Time) *FactCreate
- func (fc *FactCreate) SetNillableID(s *string) *FactCreate
- func (fc *FactCreate) SetNillableScopeID(id *string) *FactCreate
- func (fc *FactCreate) SetNillableUpdatedAt(t *time.Time) *FactCreate
- func (fc *FactCreate) SetScope(s *Scope) *FactCreate
- func (fc *FactCreate) SetScopeID(id string) *FactCreate
- func (fc *FactCreate) SetUpdatedAt(t time.Time) *FactCreate
- type FactCreateBulk
- type FactDelete
- type FactDeleteOne
- type FactEdges
- type FactFilter
- func (f *FactFilter) Where(p entql.P)
- func (f *FactFilter) WhereBlindIndexes(p entql.BytesP)
- func (f *FactFilter) WhereCollection(p entql.StringP)
- func (f *FactFilter) WhereCreatedAt(p entql.TimeP)
- func (f *FactFilter) WhereDeletedAt(p entql.TimeP)
- func (f *FactFilter) WhereDomain(p entql.StringP)
- func (f *FactFilter) WhereEncryptedValue(p entql.StringP)
- func (f *FactFilter) WhereHasScope()
- func (f *FactFilter) WhereHasScopeWith(preds ...predicate.Scope)
- func (f *FactFilter) WhereHashedValue(p entql.StringP)
- func (f *FactFilter) WhereID(p entql.StringP)
- func (f *FactFilter) WhereKey(p entql.StringP)
- func (f *FactFilter) WhereUpdatedAt(p entql.TimeP)
- type FactGroupBy
- func (fgb *FactGroupBy) Aggregate(fns ...AggregateFunc) *FactGroupBy
- func (s *FactGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FactGroupBy) BoolX(ctx context.Context) bool
- func (s *FactGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FactGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FactGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FactGroupBy) Float64X(ctx context.Context) float64
- func (s *FactGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FactGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FactGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FactGroupBy) IntX(ctx context.Context) int
- func (s *FactGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FactGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FactGroupBy) Scan(ctx context.Context, v any) error
- func (s *FactGroupBy) ScanX(ctx context.Context, v any)
- func (s *FactGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FactGroupBy) StringX(ctx context.Context) string
- func (s *FactGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FactGroupBy) StringsX(ctx context.Context) []string
- type FactMutation
- func (m *FactMutation) AddField(name string, value ent.Value) error
- func (m *FactMutation) AddedEdges() []string
- func (m *FactMutation) AddedField(name string) (ent.Value, bool)
- func (m *FactMutation) AddedFields() []string
- func (m *FactMutation) AddedIDs(name string) []ent.Value
- func (m *FactMutation) AppendBlindIndexes(s []string)
- func (m *FactMutation) AppendedBlindIndexes() ([]string, bool)
- func (m *FactMutation) BlindIndexes() (r []string, exists bool)
- func (m *FactMutation) ClearDeletedAt()
- func (m *FactMutation) ClearEdge(name string) error
- func (m *FactMutation) ClearField(name string) error
- func (m *FactMutation) ClearScope()
- func (m *FactMutation) ClearedEdges() []string
- func (m *FactMutation) ClearedFields() []string
- func (m FactMutation) Client() *Client
- func (m *FactMutation) Collection() (r string, exists bool)
- func (m *FactMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FactMutation) DeletedAt() (r time.Time, exists bool)
- func (m *FactMutation) DeletedAtCleared() bool
- func (m *FactMutation) Domain() (r string, exists bool)
- func (m *FactMutation) EdgeCleared(name string) bool
- func (m *FactMutation) EncryptedValue() (r string, exists bool)
- func (m *FactMutation) Field(name string) (ent.Value, bool)
- func (m *FactMutation) FieldCleared(name string) bool
- func (m *FactMutation) Fields() []string
- func (m *FactMutation) Filter() *FactFilter
- func (m *FactMutation) HashedValue() (r string, exists bool)
- func (m *FactMutation) ID() (id string, exists bool)
- func (m *FactMutation) IDs(ctx context.Context) ([]string, error)
- func (m *FactMutation) Key() (r string, exists bool)
- func (m *FactMutation) OldBlindIndexes(ctx context.Context) (v []string, err error)
- func (m *FactMutation) OldCollection(ctx context.Context) (v *string, err error)
- func (m *FactMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FactMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *FactMutation) OldDomain(ctx context.Context) (v string, err error)
- func (m *FactMutation) OldEncryptedValue(ctx context.Context) (v string, err error)
- func (m *FactMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FactMutation) OldHashedValue(ctx context.Context) (v string, err error)
- func (m *FactMutation) OldKey(ctx context.Context) (v *string, err error)
- func (m *FactMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FactMutation) Op() Op
- func (m *FactMutation) RemovedEdges() []string
- func (m *FactMutation) RemovedIDs(name string) []ent.Value
- func (m *FactMutation) ResetBlindIndexes()
- func (m *FactMutation) ResetCollection()
- func (m *FactMutation) ResetCreatedAt()
- func (m *FactMutation) ResetDeletedAt()
- func (m *FactMutation) ResetDomain()
- func (m *FactMutation) ResetEdge(name string) error
- func (m *FactMutation) ResetEncryptedValue()
- func (m *FactMutation) ResetField(name string) error
- func (m *FactMutation) ResetHashedValue()
- func (m *FactMutation) ResetKey()
- func (m *FactMutation) ResetScope()
- func (m *FactMutation) ResetUpdatedAt()
- func (m *FactMutation) ScopeCleared() bool
- func (m *FactMutation) ScopeID() (id string, exists bool)
- func (m *FactMutation) ScopeIDs() (ids []string)
- func (m *FactMutation) SetBlindIndexes(s []string)
- func (m *FactMutation) SetCollection(s string)
- func (m *FactMutation) SetCreatedAt(t time.Time)
- func (m *FactMutation) SetDeletedAt(t time.Time)
- func (m *FactMutation) SetDomain(s string)
- func (m *FactMutation) SetEncryptedValue(s string)
- func (m *FactMutation) SetField(name string, value ent.Value) error
- func (m *FactMutation) SetHashedValue(s string)
- func (m *FactMutation) SetID(id string)
- func (m *FactMutation) SetKey(s string)
- func (m *FactMutation) SetOp(op Op)
- func (m *FactMutation) SetScopeID(id string)
- func (m *FactMutation) SetUpdatedAt(t time.Time)
- func (m FactMutation) Tx() (*Tx, error)
- func (m *FactMutation) Type() string
- func (m *FactMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FactMutation) Where(ps ...predicate.Fact)
- func (m *FactMutation) WhereP(ps ...func(*sql.Selector))
- type FactQuery
- func (fq *FactQuery) Aggregate(fns ...AggregateFunc) *FactSelect
- func (fq *FactQuery) All(ctx context.Context) ([]*Fact, error)
- func (fq *FactQuery) AllX(ctx context.Context) []*Fact
- func (fq *FactQuery) Clone() *FactQuery
- func (fq *FactQuery) Count(ctx context.Context) (int, error)
- func (fq *FactQuery) CountX(ctx context.Context) int
- func (fq *FactQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FactQuery) ExistX(ctx context.Context) bool
- func (fq *FactQuery) Filter() *FactFilter
- func (fq *FactQuery) First(ctx context.Context) (*Fact, error)
- func (fq *FactQuery) FirstID(ctx context.Context) (id string, err error)
- func (fq *FactQuery) FirstIDX(ctx context.Context) string
- func (fq *FactQuery) FirstX(ctx context.Context) *Fact
- func (fq *FactQuery) GroupBy(field string, fields ...string) *FactGroupBy
- func (fq *FactQuery) IDs(ctx context.Context) (ids []string, err error)
- func (fq *FactQuery) IDsX(ctx context.Context) []string
- func (fq *FactQuery) Limit(limit int) *FactQuery
- func (fq *FactQuery) Offset(offset int) *FactQuery
- func (fq *FactQuery) Only(ctx context.Context) (*Fact, error)
- func (fq *FactQuery) OnlyID(ctx context.Context) (id string, err error)
- func (fq *FactQuery) OnlyIDX(ctx context.Context) string
- func (fq *FactQuery) OnlyX(ctx context.Context) *Fact
- func (fq *FactQuery) Order(o ...fact.OrderOption) *FactQuery
- func (fq *FactQuery) QueryScope() *ScopeQuery
- func (fq *FactQuery) Select(fields ...string) *FactSelect
- func (fq *FactQuery) Unique(unique bool) *FactQuery
- func (fq *FactQuery) Where(ps ...predicate.Fact) *FactQuery
- func (fq *FactQuery) WithScope(opts ...func(*ScopeQuery)) *FactQuery
- type FactSelect
- func (fs *FactSelect) Aggregate(fns ...AggregateFunc) *FactSelect
- func (s *FactSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FactSelect) BoolX(ctx context.Context) bool
- func (s *FactSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FactSelect) BoolsX(ctx context.Context) []bool
- func (s *FactSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FactSelect) Float64X(ctx context.Context) float64
- func (s *FactSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FactSelect) Float64sX(ctx context.Context) []float64
- func (s *FactSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FactSelect) IntX(ctx context.Context) int
- func (s *FactSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FactSelect) IntsX(ctx context.Context) []int
- func (fs *FactSelect) Scan(ctx context.Context, v any) error
- func (s *FactSelect) ScanX(ctx context.Context, v any)
- func (s *FactSelect) String(ctx context.Context) (_ string, err error)
- func (s *FactSelect) StringX(ctx context.Context) string
- func (s *FactSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FactSelect) StringsX(ctx context.Context) []string
- type FactUpdate
- func (fu *FactUpdate) AppendBlindIndexes(s []string) *FactUpdate
- func (fu *FactUpdate) ClearDeletedAt() *FactUpdate
- func (fu *FactUpdate) ClearScope() *FactUpdate
- func (fu *FactUpdate) Exec(ctx context.Context) error
- func (fu *FactUpdate) ExecX(ctx context.Context)
- func (fu *FactUpdate) Mutation() *FactMutation
- func (fu *FactUpdate) Save(ctx context.Context) (int, error)
- func (fu *FactUpdate) SaveX(ctx context.Context) int
- func (fu *FactUpdate) SetBlindIndexes(s []string) *FactUpdate
- func (fu *FactUpdate) SetCollection(s string) *FactUpdate
- func (fu *FactUpdate) SetDeletedAt(t time.Time) *FactUpdate
- func (fu *FactUpdate) SetDomain(s string) *FactUpdate
- func (fu *FactUpdate) SetEncryptedValue(s string) *FactUpdate
- func (fu *FactUpdate) SetHashedValue(s string) *FactUpdate
- func (fu *FactUpdate) SetKey(s string) *FactUpdate
- func (fu *FactUpdate) SetNillableCollection(s *string) *FactUpdate
- func (fu *FactUpdate) SetNillableDeletedAt(t *time.Time) *FactUpdate
- func (fu *FactUpdate) SetNillableDomain(s *string) *FactUpdate
- func (fu *FactUpdate) SetNillableEncryptedValue(s *string) *FactUpdate
- func (fu *FactUpdate) SetNillableHashedValue(s *string) *FactUpdate
- func (fu *FactUpdate) SetNillableKey(s *string) *FactUpdate
- func (fu *FactUpdate) SetNillableScopeID(id *string) *FactUpdate
- func (fu *FactUpdate) SetScope(s *Scope) *FactUpdate
- func (fu *FactUpdate) SetScopeID(id string) *FactUpdate
- func (fu *FactUpdate) Where(ps ...predicate.Fact) *FactUpdate
- type FactUpdateOne
- func (fuo *FactUpdateOne) AppendBlindIndexes(s []string) *FactUpdateOne
- func (fuo *FactUpdateOne) ClearDeletedAt() *FactUpdateOne
- func (fuo *FactUpdateOne) ClearScope() *FactUpdateOne
- func (fuo *FactUpdateOne) Exec(ctx context.Context) error
- func (fuo *FactUpdateOne) ExecX(ctx context.Context)
- func (fuo *FactUpdateOne) Mutation() *FactMutation
- func (fuo *FactUpdateOne) Save(ctx context.Context) (*Fact, error)
- func (fuo *FactUpdateOne) SaveX(ctx context.Context) *Fact
- func (fuo *FactUpdateOne) Select(field string, fields ...string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetBlindIndexes(s []string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetCollection(s string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetDeletedAt(t time.Time) *FactUpdateOne
- func (fuo *FactUpdateOne) SetDomain(s string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetEncryptedValue(s string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetHashedValue(s string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetKey(s string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetNillableCollection(s *string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetNillableDeletedAt(t *time.Time) *FactUpdateOne
- func (fuo *FactUpdateOne) SetNillableDomain(s *string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetNillableEncryptedValue(s *string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetNillableHashedValue(s *string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetNillableKey(s *string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetNillableScopeID(id *string) *FactUpdateOne
- func (fuo *FactUpdateOne) SetScope(s *Scope) *FactUpdateOne
- func (fuo *FactUpdateOne) SetScopeID(id string) *FactUpdateOne
- func (fuo *FactUpdateOne) Where(ps ...predicate.Fact) *FactUpdateOne
- type Facts
- type Grant
- type GrantClient
- func (c *GrantClient) Create() *GrantCreate
- func (c *GrantClient) CreateBulk(builders ...*GrantCreate) *GrantCreateBulk
- func (c *GrantClient) Delete() *GrantDelete
- func (c *GrantClient) DeleteOne(gr *Grant) *GrantDeleteOne
- func (c *GrantClient) DeleteOneID(id string) *GrantDeleteOne
- func (c *GrantClient) Get(ctx context.Context, id string) (*Grant, error)
- func (c *GrantClient) GetX(ctx context.Context, id string) *Grant
- func (c *GrantClient) Hooks() []Hook
- func (c *GrantClient) Intercept(interceptors ...Interceptor)
- func (c *GrantClient) Interceptors() []Interceptor
- func (c *GrantClient) MapCreateBulk(slice any, setFunc func(*GrantCreate, int)) *GrantCreateBulk
- func (c *GrantClient) Query() *GrantQuery
- func (c *GrantClient) Update() *GrantUpdate
- func (c *GrantClient) UpdateOne(gr *Grant) *GrantUpdateOne
- func (c *GrantClient) UpdateOneID(id string) *GrantUpdateOne
- func (c *GrantClient) Use(hooks ...Hook)
- type GrantCreate
- func (gc *GrantCreate) Exec(ctx context.Context) error
- func (gc *GrantCreate) ExecX(ctx context.Context)
- func (gc *GrantCreate) Mutation() *GrantMutation
- func (gc *GrantCreate) Save(ctx context.Context) (*Grant, error)
- func (gc *GrantCreate) SaveX(ctx context.Context) *Grant
- func (gc *GrantCreate) SetAllowedHTTPMethods(s string) *GrantCreate
- func (gc *GrantCreate) SetCreatedAt(t time.Time) *GrantCreate
- func (gc *GrantCreate) SetDeletedAt(t time.Time) *GrantCreate
- func (gc *GrantCreate) SetDomain(s string) *GrantCreate
- func (gc *GrantCreate) SetHashedGrantToken(s string) *GrantCreate
- func (gc *GrantCreate) SetID(s string) *GrantCreate
- func (gc *GrantCreate) SetNillableCreatedAt(t *time.Time) *GrantCreate
- func (gc *GrantCreate) SetNillableDeletedAt(t *time.Time) *GrantCreate
- func (gc *GrantCreate) SetNillableID(s *string) *GrantCreate
- func (gc *GrantCreate) SetNillableUpdatedAt(t *time.Time) *GrantCreate
- func (gc *GrantCreate) SetPaths(s []string) *GrantCreate
- func (gc *GrantCreate) SetUpdatedAt(t time.Time) *GrantCreate
- func (gc *GrantCreate) SetVersion(s string) *GrantCreate
- type GrantCreateBulk
- type GrantDelete
- type GrantDeleteOne
- type GrantFilter
- func (f *GrantFilter) Where(p entql.P)
- func (f *GrantFilter) WhereAllowedHTTPMethods(p entql.StringP)
- func (f *GrantFilter) WhereCreatedAt(p entql.TimeP)
- func (f *GrantFilter) WhereDeletedAt(p entql.TimeP)
- func (f *GrantFilter) WhereDomain(p entql.StringP)
- func (f *GrantFilter) WhereHashedGrantToken(p entql.StringP)
- func (f *GrantFilter) WhereID(p entql.StringP)
- func (f *GrantFilter) WherePaths(p entql.BytesP)
- func (f *GrantFilter) WhereUpdatedAt(p entql.TimeP)
- func (f *GrantFilter) WhereVersion(p entql.StringP)
- type GrantGroupBy
- func (ggb *GrantGroupBy) Aggregate(fns ...AggregateFunc) *GrantGroupBy
- func (s *GrantGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GrantGroupBy) BoolX(ctx context.Context) bool
- func (s *GrantGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GrantGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GrantGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GrantGroupBy) Float64X(ctx context.Context) float64
- func (s *GrantGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GrantGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GrantGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GrantGroupBy) IntX(ctx context.Context) int
- func (s *GrantGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GrantGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GrantGroupBy) Scan(ctx context.Context, v any) error
- func (s *GrantGroupBy) ScanX(ctx context.Context, v any)
- func (s *GrantGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GrantGroupBy) StringX(ctx context.Context) string
- func (s *GrantGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GrantGroupBy) StringsX(ctx context.Context) []string
- type GrantMutation
- func (m *GrantMutation) AddField(name string, value ent.Value) error
- func (m *GrantMutation) AddedEdges() []string
- func (m *GrantMutation) AddedField(name string) (ent.Value, bool)
- func (m *GrantMutation) AddedFields() []string
- func (m *GrantMutation) AddedIDs(name string) []ent.Value
- func (m *GrantMutation) AllowedHTTPMethods() (r string, exists bool)
- func (m *GrantMutation) AppendPaths(s []string)
- func (m *GrantMutation) AppendedPaths() ([]string, bool)
- func (m *GrantMutation) ClearDeletedAt()
- func (m *GrantMutation) ClearEdge(name string) error
- func (m *GrantMutation) ClearField(name string) error
- func (m *GrantMutation) ClearedEdges() []string
- func (m *GrantMutation) ClearedFields() []string
- func (m GrantMutation) Client() *Client
- func (m *GrantMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GrantMutation) DeletedAt() (r time.Time, exists bool)
- func (m *GrantMutation) DeletedAtCleared() bool
- func (m *GrantMutation) Domain() (r string, exists bool)
- func (m *GrantMutation) EdgeCleared(name string) bool
- func (m *GrantMutation) Field(name string) (ent.Value, bool)
- func (m *GrantMutation) FieldCleared(name string) bool
- func (m *GrantMutation) Fields() []string
- func (m *GrantMutation) Filter() *GrantFilter
- func (m *GrantMutation) HashedGrantToken() (r string, exists bool)
- func (m *GrantMutation) ID() (id string, exists bool)
- func (m *GrantMutation) IDs(ctx context.Context) ([]string, error)
- func (m *GrantMutation) OldAllowedHTTPMethods(ctx context.Context) (v string, err error)
- func (m *GrantMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GrantMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *GrantMutation) OldDomain(ctx context.Context) (v string, err error)
- func (m *GrantMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GrantMutation) OldHashedGrantToken(ctx context.Context) (v string, err error)
- func (m *GrantMutation) OldPaths(ctx context.Context) (v []string, err error)
- func (m *GrantMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GrantMutation) OldVersion(ctx context.Context) (v string, err error)
- func (m *GrantMutation) Op() Op
- func (m *GrantMutation) Paths() (r []string, exists bool)
- func (m *GrantMutation) RemovedEdges() []string
- func (m *GrantMutation) RemovedIDs(name string) []ent.Value
- func (m *GrantMutation) ResetAllowedHTTPMethods()
- func (m *GrantMutation) ResetCreatedAt()
- func (m *GrantMutation) ResetDeletedAt()
- func (m *GrantMutation) ResetDomain()
- func (m *GrantMutation) ResetEdge(name string) error
- func (m *GrantMutation) ResetField(name string) error
- func (m *GrantMutation) ResetHashedGrantToken()
- func (m *GrantMutation) ResetPaths()
- func (m *GrantMutation) ResetUpdatedAt()
- func (m *GrantMutation) ResetVersion()
- func (m *GrantMutation) SetAllowedHTTPMethods(s string)
- func (m *GrantMutation) SetCreatedAt(t time.Time)
- func (m *GrantMutation) SetDeletedAt(t time.Time)
- func (m *GrantMutation) SetDomain(s string)
- func (m *GrantMutation) SetField(name string, value ent.Value) error
- func (m *GrantMutation) SetHashedGrantToken(s string)
- func (m *GrantMutation) SetID(id string)
- func (m *GrantMutation) SetOp(op Op)
- func (m *GrantMutation) SetPaths(s []string)
- func (m *GrantMutation) SetUpdatedAt(t time.Time)
- func (m *GrantMutation) SetVersion(s string)
- func (m GrantMutation) Tx() (*Tx, error)
- func (m *GrantMutation) Type() string
- func (m *GrantMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *GrantMutation) Version() (r string, exists bool)
- func (m *GrantMutation) Where(ps ...predicate.Grant)
- func (m *GrantMutation) WhereP(ps ...func(*sql.Selector))
- type GrantQuery
- func (gq *GrantQuery) Aggregate(fns ...AggregateFunc) *GrantSelect
- func (gq *GrantQuery) All(ctx context.Context) ([]*Grant, error)
- func (gq *GrantQuery) AllX(ctx context.Context) []*Grant
- func (gq *GrantQuery) Clone() *GrantQuery
- func (gq *GrantQuery) Count(ctx context.Context) (int, error)
- func (gq *GrantQuery) CountX(ctx context.Context) int
- func (gq *GrantQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GrantQuery) ExistX(ctx context.Context) bool
- func (gq *GrantQuery) Filter() *GrantFilter
- func (gq *GrantQuery) First(ctx context.Context) (*Grant, error)
- func (gq *GrantQuery) FirstID(ctx context.Context) (id string, err error)
- func (gq *GrantQuery) FirstIDX(ctx context.Context) string
- func (gq *GrantQuery) FirstX(ctx context.Context) *Grant
- func (gq *GrantQuery) GroupBy(field string, fields ...string) *GrantGroupBy
- func (gq *GrantQuery) IDs(ctx context.Context) (ids []string, err error)
- func (gq *GrantQuery) IDsX(ctx context.Context) []string
- func (gq *GrantQuery) Limit(limit int) *GrantQuery
- func (gq *GrantQuery) Offset(offset int) *GrantQuery
- func (gq *GrantQuery) Only(ctx context.Context) (*Grant, error)
- func (gq *GrantQuery) OnlyID(ctx context.Context) (id string, err error)
- func (gq *GrantQuery) OnlyIDX(ctx context.Context) string
- func (gq *GrantQuery) OnlyX(ctx context.Context) *Grant
- func (gq *GrantQuery) Order(o ...grant.OrderOption) *GrantQuery
- func (gq *GrantQuery) Select(fields ...string) *GrantSelect
- func (gq *GrantQuery) Unique(unique bool) *GrantQuery
- func (gq *GrantQuery) Where(ps ...predicate.Grant) *GrantQuery
- type GrantSelect
- func (gs *GrantSelect) Aggregate(fns ...AggregateFunc) *GrantSelect
- func (s *GrantSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GrantSelect) BoolX(ctx context.Context) bool
- func (s *GrantSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GrantSelect) BoolsX(ctx context.Context) []bool
- func (s *GrantSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GrantSelect) Float64X(ctx context.Context) float64
- func (s *GrantSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GrantSelect) Float64sX(ctx context.Context) []float64
- func (s *GrantSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GrantSelect) IntX(ctx context.Context) int
- func (s *GrantSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GrantSelect) IntsX(ctx context.Context) []int
- func (gs *GrantSelect) Scan(ctx context.Context, v any) error
- func (s *GrantSelect) ScanX(ctx context.Context, v any)
- func (s *GrantSelect) String(ctx context.Context) (_ string, err error)
- func (s *GrantSelect) StringX(ctx context.Context) string
- func (s *GrantSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GrantSelect) StringsX(ctx context.Context) []string
- type GrantUpdate
- func (gu *GrantUpdate) AppendPaths(s []string) *GrantUpdate
- func (gu *GrantUpdate) ClearDeletedAt() *GrantUpdate
- func (gu *GrantUpdate) Exec(ctx context.Context) error
- func (gu *GrantUpdate) ExecX(ctx context.Context)
- func (gu *GrantUpdate) Mutation() *GrantMutation
- func (gu *GrantUpdate) Save(ctx context.Context) (int, error)
- func (gu *GrantUpdate) SaveX(ctx context.Context) int
- func (gu *GrantUpdate) SetAllowedHTTPMethods(s string) *GrantUpdate
- func (gu *GrantUpdate) SetDeletedAt(t time.Time) *GrantUpdate
- func (gu *GrantUpdate) SetDomain(s string) *GrantUpdate
- func (gu *GrantUpdate) SetHashedGrantToken(s string) *GrantUpdate
- func (gu *GrantUpdate) SetNillableAllowedHTTPMethods(s *string) *GrantUpdate
- func (gu *GrantUpdate) SetNillableDeletedAt(t *time.Time) *GrantUpdate
- func (gu *GrantUpdate) SetNillableDomain(s *string) *GrantUpdate
- func (gu *GrantUpdate) SetNillableHashedGrantToken(s *string) *GrantUpdate
- func (gu *GrantUpdate) SetNillableVersion(s *string) *GrantUpdate
- func (gu *GrantUpdate) SetPaths(s []string) *GrantUpdate
- func (gu *GrantUpdate) SetVersion(s string) *GrantUpdate
- func (gu *GrantUpdate) Where(ps ...predicate.Grant) *GrantUpdate
- type GrantUpdateOne
- func (guo *GrantUpdateOne) AppendPaths(s []string) *GrantUpdateOne
- func (guo *GrantUpdateOne) ClearDeletedAt() *GrantUpdateOne
- func (guo *GrantUpdateOne) Exec(ctx context.Context) error
- func (guo *GrantUpdateOne) ExecX(ctx context.Context)
- func (guo *GrantUpdateOne) Mutation() *GrantMutation
- func (guo *GrantUpdateOne) Save(ctx context.Context) (*Grant, error)
- func (guo *GrantUpdateOne) SaveX(ctx context.Context) *Grant
- func (guo *GrantUpdateOne) Select(field string, fields ...string) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetAllowedHTTPMethods(s string) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetDeletedAt(t time.Time) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetDomain(s string) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetHashedGrantToken(s string) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetNillableAllowedHTTPMethods(s *string) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetNillableDeletedAt(t *time.Time) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetNillableDomain(s *string) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetNillableHashedGrantToken(s *string) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetNillableVersion(s *string) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetPaths(s []string) *GrantUpdateOne
- func (guo *GrantUpdateOne) SetVersion(s string) *GrantUpdateOne
- func (guo *GrantUpdateOne) Where(ps ...predicate.Grant) *GrantUpdateOne
- type Grants
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Scope
- type ScopeClient
- func (c *ScopeClient) Create() *ScopeCreate
- func (c *ScopeClient) CreateBulk(builders ...*ScopeCreate) *ScopeCreateBulk
- func (c *ScopeClient) Delete() *ScopeDelete
- func (c *ScopeClient) DeleteOne(s *Scope) *ScopeDeleteOne
- func (c *ScopeClient) DeleteOneID(id string) *ScopeDeleteOne
- func (c *ScopeClient) Get(ctx context.Context, id string) (*Scope, error)
- func (c *ScopeClient) GetX(ctx context.Context, id string) *Scope
- func (c *ScopeClient) Hooks() []Hook
- func (c *ScopeClient) Intercept(interceptors ...Interceptor)
- func (c *ScopeClient) Interceptors() []Interceptor
- func (c *ScopeClient) MapCreateBulk(slice any, setFunc func(*ScopeCreate, int)) *ScopeCreateBulk
- func (c *ScopeClient) Query() *ScopeQuery
- func (c *ScopeClient) QueryFacts(s *Scope) *FactQuery
- func (c *ScopeClient) Update() *ScopeUpdate
- func (c *ScopeClient) UpdateOne(s *Scope) *ScopeUpdateOne
- func (c *ScopeClient) UpdateOneID(id string) *ScopeUpdateOne
- func (c *ScopeClient) Use(hooks ...Hook)
- type ScopeCreate
- func (sc *ScopeCreate) AddFactIDs(ids ...string) *ScopeCreate
- func (sc *ScopeCreate) AddFacts(f ...*Fact) *ScopeCreate
- func (sc *ScopeCreate) Exec(ctx context.Context) error
- func (sc *ScopeCreate) ExecX(ctx context.Context)
- func (sc *ScopeCreate) Mutation() *ScopeMutation
- func (sc *ScopeCreate) Save(ctx context.Context) (*Scope, error)
- func (sc *ScopeCreate) SaveX(ctx context.Context) *Scope
- func (sc *ScopeCreate) SetCreatedAt(t time.Time) *ScopeCreate
- func (sc *ScopeCreate) SetCustomID(s string) *ScopeCreate
- func (sc *ScopeCreate) SetDeletedAt(t time.Time) *ScopeCreate
- func (sc *ScopeCreate) SetDomain(s string) *ScopeCreate
- func (sc *ScopeCreate) SetID(s string) *ScopeCreate
- func (sc *ScopeCreate) SetNillableCreatedAt(t *time.Time) *ScopeCreate
- func (sc *ScopeCreate) SetNillableDeletedAt(t *time.Time) *ScopeCreate
- func (sc *ScopeCreate) SetNillableID(s *string) *ScopeCreate
- func (sc *ScopeCreate) SetNillableNonce(s *string) *ScopeCreate
- func (sc *ScopeCreate) SetNillableUpdatedAt(t *time.Time) *ScopeCreate
- func (sc *ScopeCreate) SetNonce(s string) *ScopeCreate
- func (sc *ScopeCreate) SetUpdatedAt(t time.Time) *ScopeCreate
- type ScopeCreateBulk
- type ScopeDelete
- type ScopeDeleteOne
- type ScopeEdges
- type ScopeFilter
- func (f *ScopeFilter) Where(p entql.P)
- func (f *ScopeFilter) WhereCreatedAt(p entql.TimeP)
- func (f *ScopeFilter) WhereCustomID(p entql.StringP)
- func (f *ScopeFilter) WhereDeletedAt(p entql.TimeP)
- func (f *ScopeFilter) WhereDomain(p entql.StringP)
- func (f *ScopeFilter) WhereHasFacts()
- func (f *ScopeFilter) WhereHasFactsWith(preds ...predicate.Fact)
- func (f *ScopeFilter) WhereID(p entql.StringP)
- func (f *ScopeFilter) WhereNonce(p entql.StringP)
- func (f *ScopeFilter) WhereUpdatedAt(p entql.TimeP)
- type ScopeGroupBy
- func (sgb *ScopeGroupBy) Aggregate(fns ...AggregateFunc) *ScopeGroupBy
- func (s *ScopeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScopeGroupBy) BoolX(ctx context.Context) bool
- func (s *ScopeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScopeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScopeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScopeGroupBy) Float64X(ctx context.Context) float64
- func (s *ScopeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScopeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScopeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScopeGroupBy) IntX(ctx context.Context) int
- func (s *ScopeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScopeGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ScopeGroupBy) Scan(ctx context.Context, v any) error
- func (s *ScopeGroupBy) ScanX(ctx context.Context, v any)
- func (s *ScopeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScopeGroupBy) StringX(ctx context.Context) string
- func (s *ScopeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScopeGroupBy) StringsX(ctx context.Context) []string
- type ScopeMutation
- func (m *ScopeMutation) AddFactIDs(ids ...string)
- func (m *ScopeMutation) AddField(name string, value ent.Value) error
- func (m *ScopeMutation) AddedEdges() []string
- func (m *ScopeMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScopeMutation) AddedFields() []string
- func (m *ScopeMutation) AddedIDs(name string) []ent.Value
- func (m *ScopeMutation) ClearDeletedAt()
- func (m *ScopeMutation) ClearEdge(name string) error
- func (m *ScopeMutation) ClearFacts()
- func (m *ScopeMutation) ClearField(name string) error
- func (m *ScopeMutation) ClearedEdges() []string
- func (m *ScopeMutation) ClearedFields() []string
- func (m ScopeMutation) Client() *Client
- func (m *ScopeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ScopeMutation) CustomID() (r string, exists bool)
- func (m *ScopeMutation) DeletedAt() (r time.Time, exists bool)
- func (m *ScopeMutation) DeletedAtCleared() bool
- func (m *ScopeMutation) Domain() (r string, exists bool)
- func (m *ScopeMutation) EdgeCleared(name string) bool
- func (m *ScopeMutation) FactsCleared() bool
- func (m *ScopeMutation) FactsIDs() (ids []string)
- func (m *ScopeMutation) Field(name string) (ent.Value, bool)
- func (m *ScopeMutation) FieldCleared(name string) bool
- func (m *ScopeMutation) Fields() []string
- func (m *ScopeMutation) Filter() *ScopeFilter
- func (m *ScopeMutation) ID() (id string, exists bool)
- func (m *ScopeMutation) IDs(ctx context.Context) ([]string, error)
- func (m *ScopeMutation) Nonce() (r string, exists bool)
- func (m *ScopeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ScopeMutation) OldCustomID(ctx context.Context) (v string, err error)
- func (m *ScopeMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ScopeMutation) OldDomain(ctx context.Context) (v string, err error)
- func (m *ScopeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScopeMutation) OldNonce(ctx context.Context) (v string, err error)
- func (m *ScopeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ScopeMutation) Op() Op
- func (m *ScopeMutation) RemoveFactIDs(ids ...string)
- func (m *ScopeMutation) RemovedEdges() []string
- func (m *ScopeMutation) RemovedFactsIDs() (ids []string)
- func (m *ScopeMutation) RemovedIDs(name string) []ent.Value
- func (m *ScopeMutation) ResetCreatedAt()
- func (m *ScopeMutation) ResetCustomID()
- func (m *ScopeMutation) ResetDeletedAt()
- func (m *ScopeMutation) ResetDomain()
- func (m *ScopeMutation) ResetEdge(name string) error
- func (m *ScopeMutation) ResetFacts()
- func (m *ScopeMutation) ResetField(name string) error
- func (m *ScopeMutation) ResetNonce()
- func (m *ScopeMutation) ResetUpdatedAt()
- func (m *ScopeMutation) SetCreatedAt(t time.Time)
- func (m *ScopeMutation) SetCustomID(s string)
- func (m *ScopeMutation) SetDeletedAt(t time.Time)
- func (m *ScopeMutation) SetDomain(s string)
- func (m *ScopeMutation) SetField(name string, value ent.Value) error
- func (m *ScopeMutation) SetID(id string)
- func (m *ScopeMutation) SetNonce(s string)
- func (m *ScopeMutation) SetOp(op Op)
- func (m *ScopeMutation) SetUpdatedAt(t time.Time)
- func (m ScopeMutation) Tx() (*Tx, error)
- func (m *ScopeMutation) Type() string
- func (m *ScopeMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ScopeMutation) Where(ps ...predicate.Scope)
- func (m *ScopeMutation) WhereP(ps ...func(*sql.Selector))
- type ScopeQuery
- func (sq *ScopeQuery) Aggregate(fns ...AggregateFunc) *ScopeSelect
- func (sq *ScopeQuery) All(ctx context.Context) ([]*Scope, error)
- func (sq *ScopeQuery) AllX(ctx context.Context) []*Scope
- func (sq *ScopeQuery) Clone() *ScopeQuery
- func (sq *ScopeQuery) Count(ctx context.Context) (int, error)
- func (sq *ScopeQuery) CountX(ctx context.Context) int
- func (sq *ScopeQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ScopeQuery) ExistX(ctx context.Context) bool
- func (sq *ScopeQuery) Filter() *ScopeFilter
- func (sq *ScopeQuery) First(ctx context.Context) (*Scope, error)
- func (sq *ScopeQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *ScopeQuery) FirstIDX(ctx context.Context) string
- func (sq *ScopeQuery) FirstX(ctx context.Context) *Scope
- func (sq *ScopeQuery) GroupBy(field string, fields ...string) *ScopeGroupBy
- func (sq *ScopeQuery) IDs(ctx context.Context) (ids []string, err error)
- func (sq *ScopeQuery) IDsX(ctx context.Context) []string
- func (sq *ScopeQuery) Limit(limit int) *ScopeQuery
- func (sq *ScopeQuery) Offset(offset int) *ScopeQuery
- func (sq *ScopeQuery) Only(ctx context.Context) (*Scope, error)
- func (sq *ScopeQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *ScopeQuery) OnlyIDX(ctx context.Context) string
- func (sq *ScopeQuery) OnlyX(ctx context.Context) *Scope
- func (sq *ScopeQuery) Order(o ...scope.OrderOption) *ScopeQuery
- func (sq *ScopeQuery) QueryFacts() *FactQuery
- func (sq *ScopeQuery) Select(fields ...string) *ScopeSelect
- func (sq *ScopeQuery) Unique(unique bool) *ScopeQuery
- func (sq *ScopeQuery) Where(ps ...predicate.Scope) *ScopeQuery
- func (sq *ScopeQuery) WithFacts(opts ...func(*FactQuery)) *ScopeQuery
- type ScopeSelect
- func (ss *ScopeSelect) Aggregate(fns ...AggregateFunc) *ScopeSelect
- func (s *ScopeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScopeSelect) BoolX(ctx context.Context) bool
- func (s *ScopeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScopeSelect) BoolsX(ctx context.Context) []bool
- func (s *ScopeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScopeSelect) Float64X(ctx context.Context) float64
- func (s *ScopeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScopeSelect) Float64sX(ctx context.Context) []float64
- func (s *ScopeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScopeSelect) IntX(ctx context.Context) int
- func (s *ScopeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScopeSelect) IntsX(ctx context.Context) []int
- func (ss *ScopeSelect) Scan(ctx context.Context, v any) error
- func (s *ScopeSelect) ScanX(ctx context.Context, v any)
- func (s *ScopeSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScopeSelect) StringX(ctx context.Context) string
- func (s *ScopeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScopeSelect) StringsX(ctx context.Context) []string
- type ScopeUpdate
- func (su *ScopeUpdate) AddFactIDs(ids ...string) *ScopeUpdate
- func (su *ScopeUpdate) AddFacts(f ...*Fact) *ScopeUpdate
- func (su *ScopeUpdate) ClearDeletedAt() *ScopeUpdate
- func (su *ScopeUpdate) ClearFacts() *ScopeUpdate
- func (su *ScopeUpdate) Exec(ctx context.Context) error
- func (su *ScopeUpdate) ExecX(ctx context.Context)
- func (su *ScopeUpdate) Mutation() *ScopeMutation
- func (su *ScopeUpdate) RemoveFactIDs(ids ...string) *ScopeUpdate
- func (su *ScopeUpdate) RemoveFacts(f ...*Fact) *ScopeUpdate
- func (su *ScopeUpdate) Save(ctx context.Context) (int, error)
- func (su *ScopeUpdate) SaveX(ctx context.Context) int
- func (su *ScopeUpdate) SetCustomID(s string) *ScopeUpdate
- func (su *ScopeUpdate) SetDeletedAt(t time.Time) *ScopeUpdate
- func (su *ScopeUpdate) SetDomain(s string) *ScopeUpdate
- func (su *ScopeUpdate) SetNillableCustomID(s *string) *ScopeUpdate
- func (su *ScopeUpdate) SetNillableDeletedAt(t *time.Time) *ScopeUpdate
- func (su *ScopeUpdate) SetNillableDomain(s *string) *ScopeUpdate
- func (su *ScopeUpdate) SetNillableNonce(s *string) *ScopeUpdate
- func (su *ScopeUpdate) SetNonce(s string) *ScopeUpdate
- func (su *ScopeUpdate) Where(ps ...predicate.Scope) *ScopeUpdate
- type ScopeUpdateOne
- func (suo *ScopeUpdateOne) AddFactIDs(ids ...string) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) AddFacts(f ...*Fact) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) ClearDeletedAt() *ScopeUpdateOne
- func (suo *ScopeUpdateOne) ClearFacts() *ScopeUpdateOne
- func (suo *ScopeUpdateOne) Exec(ctx context.Context) error
- func (suo *ScopeUpdateOne) ExecX(ctx context.Context)
- func (suo *ScopeUpdateOne) Mutation() *ScopeMutation
- func (suo *ScopeUpdateOne) RemoveFactIDs(ids ...string) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) RemoveFacts(f ...*Fact) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) Save(ctx context.Context) (*Scope, error)
- func (suo *ScopeUpdateOne) SaveX(ctx context.Context) *Scope
- func (suo *ScopeUpdateOne) Select(field string, fields ...string) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) SetCustomID(s string) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) SetDeletedAt(t time.Time) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) SetDomain(s string) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) SetNillableCustomID(s *string) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) SetNillableDeletedAt(t *time.Time) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) SetNillableDomain(s *string) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) SetNillableNonce(s *string) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) SetNonce(s string) *ScopeUpdateOne
- func (suo *ScopeUpdateOne) Where(ps ...predicate.Scope) *ScopeUpdateOne
- type Scopes
- type TraverseFunc
- type Traverser
- type Tx
- 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. TypeAPIAudit = "APIAudit" TypeFact = "Fact" TypeGrant = "Grant" TypeScope = "Scope" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type APIAudit ¶
type APIAudit struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt *time.Time `json:"deleted_at,omitempty"` // Plane holds the value of the "plane" field. Plane string `json:"plane,omitempty"` // HashedGrantToken holds the value of the "hashed_grant_token" field. HashedGrantToken string `json:"-"` // Domain holds the value of the "domain" field. Domain string `json:"domain,omitempty"` // HTTPPath holds the value of the "http_path" field. HTTPPath string `json:"http_path,omitempty"` // HTTPMethod holds the value of the "http_method" field. HTTPMethod string `json:"http_method,omitempty"` // SentHTTPStatus holds the value of the "sent_http_status" field. SentHTTPStatus int `json:"sent_http_status,omitempty"` // contains filtered or unexported fields }
APIAudit is the model entity for the APIAudit schema.
func (*APIAudit) Unwrap ¶
Unwrap unwraps the APIAudit 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 (*APIAudit) Update ¶
func (aa *APIAudit) Update() *APIAuditUpdateOne
Update returns a builder for updating this APIAudit. Note that you need to call APIAudit.Unwrap() before calling this method if this APIAudit was returned from a transaction, and the transaction was committed or rolled back.
type APIAuditClient ¶
type APIAuditClient struct {
// contains filtered or unexported fields
}
APIAuditClient is a client for the APIAudit schema.
func NewAPIAuditClient ¶
func NewAPIAuditClient(c config) *APIAuditClient
NewAPIAuditClient returns a client for the APIAudit from the given config.
func (*APIAuditClient) Create ¶
func (c *APIAuditClient) Create() *APIAuditCreate
Create returns a builder for creating a APIAudit entity.
func (*APIAuditClient) CreateBulk ¶
func (c *APIAuditClient) CreateBulk(builders ...*APIAuditCreate) *APIAuditCreateBulk
CreateBulk returns a builder for creating a bulk of APIAudit entities.
func (*APIAuditClient) Delete ¶
func (c *APIAuditClient) Delete() *APIAuditDelete
Delete returns a delete builder for APIAudit.
func (*APIAuditClient) DeleteOne ¶
func (c *APIAuditClient) DeleteOne(aa *APIAudit) *APIAuditDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*APIAuditClient) DeleteOneID ¶
func (c *APIAuditClient) DeleteOneID(id string) *APIAuditDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*APIAuditClient) GetX ¶
func (c *APIAuditClient) GetX(ctx context.Context, id string) *APIAudit
GetX is like Get, but panics if an error occurs.
func (*APIAuditClient) Hooks ¶
func (c *APIAuditClient) Hooks() []Hook
Hooks returns the client hooks.
func (*APIAuditClient) Intercept ¶
func (c *APIAuditClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `apiaudit.Intercept(f(g(h())))`.
func (*APIAuditClient) Interceptors ¶
func (c *APIAuditClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*APIAuditClient) MapCreateBulk ¶
func (c *APIAuditClient) MapCreateBulk(slice any, setFunc func(*APIAuditCreate, int)) *APIAuditCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*APIAuditClient) Query ¶
func (c *APIAuditClient) Query() *APIAuditQuery
Query returns a query builder for APIAudit.
func (*APIAuditClient) Update ¶
func (c *APIAuditClient) Update() *APIAuditUpdate
Update returns an update builder for APIAudit.
func (*APIAuditClient) UpdateOne ¶
func (c *APIAuditClient) UpdateOne(aa *APIAudit) *APIAuditUpdateOne
UpdateOne returns an update builder for the given entity.
func (*APIAuditClient) UpdateOneID ¶
func (c *APIAuditClient) UpdateOneID(id string) *APIAuditUpdateOne
UpdateOneID returns an update builder for the given id.
func (*APIAuditClient) Use ¶
func (c *APIAuditClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `apiaudit.Hooks(f(g(h())))`.
type APIAuditCreate ¶
type APIAuditCreate struct {
// contains filtered or unexported fields
}
APIAuditCreate is the builder for creating a APIAudit entity.
func (*APIAuditCreate) Exec ¶
func (aac *APIAuditCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*APIAuditCreate) ExecX ¶
func (aac *APIAuditCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*APIAuditCreate) Mutation ¶
func (aac *APIAuditCreate) Mutation() *APIAuditMutation
Mutation returns the APIAuditMutation object of the builder.
func (*APIAuditCreate) Save ¶
func (aac *APIAuditCreate) Save(ctx context.Context) (*APIAudit, error)
Save creates the APIAudit in the database.
func (*APIAuditCreate) SaveX ¶
func (aac *APIAuditCreate) SaveX(ctx context.Context) *APIAudit
SaveX calls Save and panics if Save returns an error.
func (*APIAuditCreate) SetCreatedAt ¶
func (aac *APIAuditCreate) SetCreatedAt(t time.Time) *APIAuditCreate
SetCreatedAt sets the "created_at" field.
func (*APIAuditCreate) SetDeletedAt ¶
func (aac *APIAuditCreate) SetDeletedAt(t time.Time) *APIAuditCreate
SetDeletedAt sets the "deleted_at" field.
func (*APIAuditCreate) SetDomain ¶
func (aac *APIAuditCreate) SetDomain(s string) *APIAuditCreate
SetDomain sets the "domain" field.
func (*APIAuditCreate) SetHTTPMethod ¶
func (aac *APIAuditCreate) SetHTTPMethod(s string) *APIAuditCreate
SetHTTPMethod sets the "http_method" field.
func (*APIAuditCreate) SetHTTPPath ¶
func (aac *APIAuditCreate) SetHTTPPath(s string) *APIAuditCreate
SetHTTPPath sets the "http_path" field.
func (*APIAuditCreate) SetHashedGrantToken ¶
func (aac *APIAuditCreate) SetHashedGrantToken(s string) *APIAuditCreate
SetHashedGrantToken sets the "hashed_grant_token" field.
func (*APIAuditCreate) SetID ¶
func (aac *APIAuditCreate) SetID(s string) *APIAuditCreate
SetID sets the "id" field.
func (*APIAuditCreate) SetNillableCreatedAt ¶
func (aac *APIAuditCreate) SetNillableCreatedAt(t *time.Time) *APIAuditCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*APIAuditCreate) SetNillableDeletedAt ¶
func (aac *APIAuditCreate) SetNillableDeletedAt(t *time.Time) *APIAuditCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*APIAuditCreate) SetNillableDomain ¶
func (aac *APIAuditCreate) SetNillableDomain(s *string) *APIAuditCreate
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*APIAuditCreate) SetNillableHTTPMethod ¶
func (aac *APIAuditCreate) SetNillableHTTPMethod(s *string) *APIAuditCreate
SetNillableHTTPMethod sets the "http_method" field if the given value is not nil.
func (*APIAuditCreate) SetNillableHTTPPath ¶
func (aac *APIAuditCreate) SetNillableHTTPPath(s *string) *APIAuditCreate
SetNillableHTTPPath sets the "http_path" field if the given value is not nil.
func (*APIAuditCreate) SetNillableHashedGrantToken ¶
func (aac *APIAuditCreate) SetNillableHashedGrantToken(s *string) *APIAuditCreate
SetNillableHashedGrantToken sets the "hashed_grant_token" field if the given value is not nil.
func (*APIAuditCreate) SetNillableID ¶
func (aac *APIAuditCreate) SetNillableID(s *string) *APIAuditCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*APIAuditCreate) SetNillableSentHTTPStatus ¶
func (aac *APIAuditCreate) SetNillableSentHTTPStatus(i *int) *APIAuditCreate
SetNillableSentHTTPStatus sets the "sent_http_status" field if the given value is not nil.
func (*APIAuditCreate) SetNillableUpdatedAt ¶
func (aac *APIAuditCreate) SetNillableUpdatedAt(t *time.Time) *APIAuditCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*APIAuditCreate) SetPlane ¶
func (aac *APIAuditCreate) SetPlane(s string) *APIAuditCreate
SetPlane sets the "plane" field.
func (*APIAuditCreate) SetSentHTTPStatus ¶
func (aac *APIAuditCreate) SetSentHTTPStatus(i int) *APIAuditCreate
SetSentHTTPStatus sets the "sent_http_status" field.
func (*APIAuditCreate) SetUpdatedAt ¶
func (aac *APIAuditCreate) SetUpdatedAt(t time.Time) *APIAuditCreate
SetUpdatedAt sets the "updated_at" field.
type APIAuditCreateBulk ¶
type APIAuditCreateBulk struct {
// contains filtered or unexported fields
}
APIAuditCreateBulk is the builder for creating many APIAudit entities in bulk.
func (*APIAuditCreateBulk) Exec ¶
func (aacb *APIAuditCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*APIAuditCreateBulk) ExecX ¶
func (aacb *APIAuditCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type APIAuditDelete ¶
type APIAuditDelete struct {
// contains filtered or unexported fields
}
APIAuditDelete is the builder for deleting a APIAudit entity.
func (*APIAuditDelete) Exec ¶
func (aad *APIAuditDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*APIAuditDelete) ExecX ¶
func (aad *APIAuditDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*APIAuditDelete) Where ¶
func (aad *APIAuditDelete) Where(ps ...predicate.APIAudit) *APIAuditDelete
Where appends a list predicates to the APIAuditDelete builder.
type APIAuditDeleteOne ¶
type APIAuditDeleteOne struct {
// contains filtered or unexported fields
}
APIAuditDeleteOne is the builder for deleting a single APIAudit entity.
func (*APIAuditDeleteOne) Exec ¶
func (aado *APIAuditDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*APIAuditDeleteOne) ExecX ¶
func (aado *APIAuditDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*APIAuditDeleteOne) Where ¶
func (aado *APIAuditDeleteOne) Where(ps ...predicate.APIAudit) *APIAuditDeleteOne
Where appends a list predicates to the APIAuditDelete builder.
type APIAuditFilter ¶
type APIAuditFilter struct {
// contains filtered or unexported fields
}
APIAuditFilter provides a generic filtering capability at runtime for APIAuditQuery.
func (*APIAuditFilter) Where ¶
func (f *APIAuditFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*APIAuditFilter) WhereCreatedAt ¶
func (f *APIAuditFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*APIAuditFilter) WhereDeletedAt ¶
func (f *APIAuditFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*APIAuditFilter) WhereDomain ¶
func (f *APIAuditFilter) WhereDomain(p entql.StringP)
WhereDomain applies the entql string predicate on the domain field.
func (*APIAuditFilter) WhereHTTPMethod ¶
func (f *APIAuditFilter) WhereHTTPMethod(p entql.StringP)
WhereHTTPMethod applies the entql string predicate on the http_method field.
func (*APIAuditFilter) WhereHTTPPath ¶
func (f *APIAuditFilter) WhereHTTPPath(p entql.StringP)
WhereHTTPPath applies the entql string predicate on the http_path field.
func (*APIAuditFilter) WhereHashedGrantToken ¶
func (f *APIAuditFilter) WhereHashedGrantToken(p entql.StringP)
WhereHashedGrantToken applies the entql string predicate on the hashed_grant_token field.
func (*APIAuditFilter) WhereID ¶
func (f *APIAuditFilter) WhereID(p entql.StringP)
WhereID applies the entql string predicate on the id field.
func (*APIAuditFilter) WherePlane ¶
func (f *APIAuditFilter) WherePlane(p entql.StringP)
WherePlane applies the entql string predicate on the plane field.
func (*APIAuditFilter) WhereSentHTTPStatus ¶
func (f *APIAuditFilter) WhereSentHTTPStatus(p entql.IntP)
WhereSentHTTPStatus applies the entql int predicate on the sent_http_status field.
func (*APIAuditFilter) WhereUpdatedAt ¶
func (f *APIAuditFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type APIAuditGroupBy ¶
type APIAuditGroupBy struct {
// contains filtered or unexported fields
}
APIAuditGroupBy is the group-by builder for APIAudit entities.
func (*APIAuditGroupBy) Aggregate ¶
func (aagb *APIAuditGroupBy) Aggregate(fns ...AggregateFunc) *APIAuditGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*APIAuditGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*APIAuditGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*APIAuditGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*APIAuditGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*APIAuditGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*APIAuditGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*APIAuditGroupBy) Scan ¶
func (aagb *APIAuditGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*APIAuditGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type APIAuditMutation ¶
type APIAuditMutation struct {
// contains filtered or unexported fields
}
APIAuditMutation represents an operation that mutates the APIAudit nodes in the graph.
func (*APIAuditMutation) AddField ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) AddSentHTTPStatus ¶
func (m *APIAuditMutation) AddSentHTTPStatus(i int)
AddSentHTTPStatus adds i to the "sent_http_status" field.
func (*APIAuditMutation) AddedEdges ¶
func (m *APIAuditMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*APIAuditMutation) AddedField ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) AddedFields ¶
func (m *APIAuditMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*APIAuditMutation) AddedIDs ¶
func (m *APIAuditMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*APIAuditMutation) AddedSentHTTPStatus ¶
func (m *APIAuditMutation) AddedSentHTTPStatus() (r int, exists bool)
AddedSentHTTPStatus returns the value that was added to the "sent_http_status" field in this mutation.
func (*APIAuditMutation) ClearDeletedAt ¶
func (m *APIAuditMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*APIAuditMutation) ClearDomain ¶
func (m *APIAuditMutation) ClearDomain()
ClearDomain clears the value of the "domain" field.
func (*APIAuditMutation) ClearEdge ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) ClearField ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) ClearHTTPMethod ¶
func (m *APIAuditMutation) ClearHTTPMethod()
ClearHTTPMethod clears the value of the "http_method" field.
func (*APIAuditMutation) ClearHTTPPath ¶
func (m *APIAuditMutation) ClearHTTPPath()
ClearHTTPPath clears the value of the "http_path" field.
func (*APIAuditMutation) ClearHashedGrantToken ¶
func (m *APIAuditMutation) ClearHashedGrantToken()
ClearHashedGrantToken clears the value of the "hashed_grant_token" field.
func (*APIAuditMutation) ClearSentHTTPStatus ¶
func (m *APIAuditMutation) ClearSentHTTPStatus()
ClearSentHTTPStatus clears the value of the "sent_http_status" field.
func (*APIAuditMutation) ClearedEdges ¶
func (m *APIAuditMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*APIAuditMutation) ClearedFields ¶
func (m *APIAuditMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (APIAuditMutation) Client ¶
func (m APIAuditMutation) 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 (*APIAuditMutation) CreatedAt ¶
func (m *APIAuditMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*APIAuditMutation) DeletedAt ¶
func (m *APIAuditMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*APIAuditMutation) DeletedAtCleared ¶
func (m *APIAuditMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*APIAuditMutation) Domain ¶
func (m *APIAuditMutation) Domain() (r string, exists bool)
Domain returns the value of the "domain" field in the mutation.
func (*APIAuditMutation) DomainCleared ¶
func (m *APIAuditMutation) DomainCleared() bool
DomainCleared returns if the "domain" field was cleared in this mutation.
func (*APIAuditMutation) EdgeCleared ¶
func (m *APIAuditMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*APIAuditMutation) Field ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) FieldCleared ¶
func (m *APIAuditMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*APIAuditMutation) Fields ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) Filter ¶
func (m *APIAuditMutation) Filter() *APIAuditFilter
Filter returns an entql.Where implementation to apply filters on the APIAuditMutation builder.
func (*APIAuditMutation) HTTPMethod ¶
func (m *APIAuditMutation) HTTPMethod() (r string, exists bool)
HTTPMethod returns the value of the "http_method" field in the mutation.
func (*APIAuditMutation) HTTPMethodCleared ¶
func (m *APIAuditMutation) HTTPMethodCleared() bool
HTTPMethodCleared returns if the "http_method" field was cleared in this mutation.
func (*APIAuditMutation) HTTPPath ¶
func (m *APIAuditMutation) HTTPPath() (r string, exists bool)
HTTPPath returns the value of the "http_path" field in the mutation.
func (*APIAuditMutation) HTTPPathCleared ¶
func (m *APIAuditMutation) HTTPPathCleared() bool
HTTPPathCleared returns if the "http_path" field was cleared in this mutation.
func (*APIAuditMutation) HashedGrantToken ¶
func (m *APIAuditMutation) HashedGrantToken() (r string, exists bool)
HashedGrantToken returns the value of the "hashed_grant_token" field in the mutation.
func (*APIAuditMutation) HashedGrantTokenCleared ¶
func (m *APIAuditMutation) HashedGrantTokenCleared() bool
HashedGrantTokenCleared returns if the "hashed_grant_token" field was cleared in this mutation.
func (*APIAuditMutation) ID ¶
func (m *APIAuditMutation) ID() (id string, 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 (*APIAuditMutation) IDs ¶
func (m *APIAuditMutation) IDs(ctx context.Context) ([]string, 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 (*APIAuditMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the APIAudit entity. If the APIAudit 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 (*APIAuditMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the APIAudit entity. If the APIAudit 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 (*APIAuditMutation) OldDomain ¶
func (m *APIAuditMutation) OldDomain(ctx context.Context) (v string, err error)
OldDomain returns the old "domain" field's value of the APIAudit entity. If the APIAudit 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 (*APIAuditMutation) 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 (*APIAuditMutation) OldHTTPMethod ¶
func (m *APIAuditMutation) OldHTTPMethod(ctx context.Context) (v string, err error)
OldHTTPMethod returns the old "http_method" field's value of the APIAudit entity. If the APIAudit 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 (*APIAuditMutation) OldHTTPPath ¶
func (m *APIAuditMutation) OldHTTPPath(ctx context.Context) (v string, err error)
OldHTTPPath returns the old "http_path" field's value of the APIAudit entity. If the APIAudit 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 (*APIAuditMutation) OldHashedGrantToken ¶
func (m *APIAuditMutation) OldHashedGrantToken(ctx context.Context) (v string, err error)
OldHashedGrantToken returns the old "hashed_grant_token" field's value of the APIAudit entity. If the APIAudit 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 (*APIAuditMutation) OldPlane ¶
func (m *APIAuditMutation) OldPlane(ctx context.Context) (v string, err error)
OldPlane returns the old "plane" field's value of the APIAudit entity. If the APIAudit 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 (*APIAuditMutation) OldSentHTTPStatus ¶
func (m *APIAuditMutation) OldSentHTTPStatus(ctx context.Context) (v int, err error)
OldSentHTTPStatus returns the old "sent_http_status" field's value of the APIAudit entity. If the APIAudit 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 (*APIAuditMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the APIAudit entity. If the APIAudit 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 (*APIAuditMutation) Plane ¶
func (m *APIAuditMutation) Plane() (r string, exists bool)
Plane returns the value of the "plane" field in the mutation.
func (*APIAuditMutation) RemovedEdges ¶
func (m *APIAuditMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*APIAuditMutation) RemovedIDs ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) ResetCreatedAt ¶
func (m *APIAuditMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*APIAuditMutation) ResetDeletedAt ¶
func (m *APIAuditMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*APIAuditMutation) ResetDomain ¶
func (m *APIAuditMutation) ResetDomain()
ResetDomain resets all changes to the "domain" field.
func (*APIAuditMutation) ResetEdge ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) ResetField ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) ResetHTTPMethod ¶
func (m *APIAuditMutation) ResetHTTPMethod()
ResetHTTPMethod resets all changes to the "http_method" field.
func (*APIAuditMutation) ResetHTTPPath ¶
func (m *APIAuditMutation) ResetHTTPPath()
ResetHTTPPath resets all changes to the "http_path" field.
func (*APIAuditMutation) ResetHashedGrantToken ¶
func (m *APIAuditMutation) ResetHashedGrantToken()
ResetHashedGrantToken resets all changes to the "hashed_grant_token" field.
func (*APIAuditMutation) ResetPlane ¶
func (m *APIAuditMutation) ResetPlane()
ResetPlane resets all changes to the "plane" field.
func (*APIAuditMutation) ResetSentHTTPStatus ¶
func (m *APIAuditMutation) ResetSentHTTPStatus()
ResetSentHTTPStatus resets all changes to the "sent_http_status" field.
func (*APIAuditMutation) ResetUpdatedAt ¶
func (m *APIAuditMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*APIAuditMutation) SentHTTPStatus ¶
func (m *APIAuditMutation) SentHTTPStatus() (r int, exists bool)
SentHTTPStatus returns the value of the "sent_http_status" field in the mutation.
func (*APIAuditMutation) SentHTTPStatusCleared ¶
func (m *APIAuditMutation) SentHTTPStatusCleared() bool
SentHTTPStatusCleared returns if the "sent_http_status" field was cleared in this mutation.
func (*APIAuditMutation) SetCreatedAt ¶
func (m *APIAuditMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*APIAuditMutation) SetDeletedAt ¶
func (m *APIAuditMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*APIAuditMutation) SetDomain ¶
func (m *APIAuditMutation) SetDomain(s string)
SetDomain sets the "domain" field.
func (*APIAuditMutation) SetField ¶
func (m *APIAuditMutation) 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 (*APIAuditMutation) SetHTTPMethod ¶
func (m *APIAuditMutation) SetHTTPMethod(s string)
SetHTTPMethod sets the "http_method" field.
func (*APIAuditMutation) SetHTTPPath ¶
func (m *APIAuditMutation) SetHTTPPath(s string)
SetHTTPPath sets the "http_path" field.
func (*APIAuditMutation) SetHashedGrantToken ¶
func (m *APIAuditMutation) SetHashedGrantToken(s string)
SetHashedGrantToken sets the "hashed_grant_token" field.
func (*APIAuditMutation) SetID ¶
func (m *APIAuditMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of APIAudit entities.
func (*APIAuditMutation) SetOp ¶
func (m *APIAuditMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*APIAuditMutation) SetPlane ¶
func (m *APIAuditMutation) SetPlane(s string)
SetPlane sets the "plane" field.
func (*APIAuditMutation) SetSentHTTPStatus ¶
func (m *APIAuditMutation) SetSentHTTPStatus(i int)
SetSentHTTPStatus sets the "sent_http_status" field.
func (*APIAuditMutation) SetUpdatedAt ¶
func (m *APIAuditMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (APIAuditMutation) Tx ¶
func (m APIAuditMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*APIAuditMutation) Type ¶
func (m *APIAuditMutation) Type() string
Type returns the node type of this mutation (APIAudit).
func (*APIAuditMutation) UpdatedAt ¶
func (m *APIAuditMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*APIAuditMutation) Where ¶
func (m *APIAuditMutation) Where(ps ...predicate.APIAudit)
Where appends a list predicates to the APIAuditMutation builder.
func (*APIAuditMutation) WhereP ¶
func (m *APIAuditMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the APIAuditMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type APIAuditQuery ¶
type APIAuditQuery struct {
// contains filtered or unexported fields
}
APIAuditQuery is the builder for querying APIAudit entities.
func (*APIAuditQuery) Aggregate ¶
func (aaq *APIAuditQuery) Aggregate(fns ...AggregateFunc) *APIAuditSelect
Aggregate returns a APIAuditSelect configured with the given aggregations.
func (*APIAuditQuery) All ¶
func (aaq *APIAuditQuery) All(ctx context.Context) ([]*APIAudit, error)
All executes the query and returns a list of APIAudits.
func (*APIAuditQuery) AllX ¶
func (aaq *APIAuditQuery) AllX(ctx context.Context) []*APIAudit
AllX is like All, but panics if an error occurs.
func (*APIAuditQuery) Clone ¶
func (aaq *APIAuditQuery) Clone() *APIAuditQuery
Clone returns a duplicate of the APIAuditQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*APIAuditQuery) Count ¶
func (aaq *APIAuditQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*APIAuditQuery) CountX ¶
func (aaq *APIAuditQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*APIAuditQuery) Exist ¶
func (aaq *APIAuditQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*APIAuditQuery) ExistX ¶
func (aaq *APIAuditQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*APIAuditQuery) Filter ¶
func (aaq *APIAuditQuery) Filter() *APIAuditFilter
Filter returns a Filter implementation to apply filters on the APIAuditQuery builder.
func (*APIAuditQuery) First ¶
func (aaq *APIAuditQuery) First(ctx context.Context) (*APIAudit, error)
First returns the first APIAudit entity from the query. Returns a *NotFoundError when no APIAudit was found.
func (*APIAuditQuery) FirstID ¶
func (aaq *APIAuditQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first APIAudit ID from the query. Returns a *NotFoundError when no APIAudit ID was found.
func (*APIAuditQuery) FirstIDX ¶
func (aaq *APIAuditQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*APIAuditQuery) FirstX ¶
func (aaq *APIAuditQuery) FirstX(ctx context.Context) *APIAudit
FirstX is like First, but panics if an error occurs.
func (*APIAuditQuery) GroupBy ¶
func (aaq *APIAuditQuery) GroupBy(field string, fields ...string) *APIAuditGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.APIAudit.Query(). GroupBy(apiaudit.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*APIAuditQuery) IDs ¶
func (aaq *APIAuditQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of APIAudit IDs.
func (*APIAuditQuery) IDsX ¶
func (aaq *APIAuditQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*APIAuditQuery) Limit ¶
func (aaq *APIAuditQuery) Limit(limit int) *APIAuditQuery
Limit the number of records to be returned by this query.
func (*APIAuditQuery) Offset ¶
func (aaq *APIAuditQuery) Offset(offset int) *APIAuditQuery
Offset to start from.
func (*APIAuditQuery) Only ¶
func (aaq *APIAuditQuery) Only(ctx context.Context) (*APIAudit, error)
Only returns a single APIAudit entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one APIAudit entity is found. Returns a *NotFoundError when no APIAudit entities are found.
func (*APIAuditQuery) OnlyID ¶
func (aaq *APIAuditQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only APIAudit ID in the query. Returns a *NotSingularError when more than one APIAudit ID is found. Returns a *NotFoundError when no entities are found.
func (*APIAuditQuery) OnlyIDX ¶
func (aaq *APIAuditQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*APIAuditQuery) OnlyX ¶
func (aaq *APIAuditQuery) OnlyX(ctx context.Context) *APIAudit
OnlyX is like Only, but panics if an error occurs.
func (*APIAuditQuery) Order ¶
func (aaq *APIAuditQuery) Order(o ...apiaudit.OrderOption) *APIAuditQuery
Order specifies how the records should be ordered.
func (*APIAuditQuery) Select ¶
func (aaq *APIAuditQuery) Select(fields ...string) *APIAuditSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.APIAudit.Query(). Select(apiaudit.FieldCreatedAt). Scan(ctx, &v)
func (*APIAuditQuery) Unique ¶
func (aaq *APIAuditQuery) Unique(unique bool) *APIAuditQuery
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 (*APIAuditQuery) Where ¶
func (aaq *APIAuditQuery) Where(ps ...predicate.APIAudit) *APIAuditQuery
Where adds a new predicate for the APIAuditQuery builder.
type APIAuditSelect ¶
type APIAuditSelect struct { *APIAuditQuery // contains filtered or unexported fields }
APIAuditSelect is the builder for selecting fields of APIAudit entities.
func (*APIAuditSelect) Aggregate ¶
func (aas *APIAuditSelect) Aggregate(fns ...AggregateFunc) *APIAuditSelect
Aggregate adds the given aggregation functions to the selector query.
func (*APIAuditSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*APIAuditSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*APIAuditSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*APIAuditSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*APIAuditSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*APIAuditSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*APIAuditSelect) Scan ¶
func (aas *APIAuditSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*APIAuditSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type APIAuditUpdate ¶
type APIAuditUpdate struct {
// contains filtered or unexported fields
}
APIAuditUpdate is the builder for updating APIAudit entities.
func (*APIAuditUpdate) AddSentHTTPStatus ¶
func (aau *APIAuditUpdate) AddSentHTTPStatus(i int) *APIAuditUpdate
AddSentHTTPStatus adds i to the "sent_http_status" field.
func (*APIAuditUpdate) ClearDeletedAt ¶
func (aau *APIAuditUpdate) ClearDeletedAt() *APIAuditUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*APIAuditUpdate) ClearDomain ¶
func (aau *APIAuditUpdate) ClearDomain() *APIAuditUpdate
ClearDomain clears the value of the "domain" field.
func (*APIAuditUpdate) ClearHTTPMethod ¶
func (aau *APIAuditUpdate) ClearHTTPMethod() *APIAuditUpdate
ClearHTTPMethod clears the value of the "http_method" field.
func (*APIAuditUpdate) ClearHTTPPath ¶
func (aau *APIAuditUpdate) ClearHTTPPath() *APIAuditUpdate
ClearHTTPPath clears the value of the "http_path" field.
func (*APIAuditUpdate) ClearHashedGrantToken ¶
func (aau *APIAuditUpdate) ClearHashedGrantToken() *APIAuditUpdate
ClearHashedGrantToken clears the value of the "hashed_grant_token" field.
func (*APIAuditUpdate) ClearSentHTTPStatus ¶
func (aau *APIAuditUpdate) ClearSentHTTPStatus() *APIAuditUpdate
ClearSentHTTPStatus clears the value of the "sent_http_status" field.
func (*APIAuditUpdate) Exec ¶
func (aau *APIAuditUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*APIAuditUpdate) ExecX ¶
func (aau *APIAuditUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*APIAuditUpdate) Mutation ¶
func (aau *APIAuditUpdate) Mutation() *APIAuditMutation
Mutation returns the APIAuditMutation object of the builder.
func (*APIAuditUpdate) Save ¶
func (aau *APIAuditUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*APIAuditUpdate) SaveX ¶
func (aau *APIAuditUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*APIAuditUpdate) SetDeletedAt ¶
func (aau *APIAuditUpdate) SetDeletedAt(t time.Time) *APIAuditUpdate
SetDeletedAt sets the "deleted_at" field.
func (*APIAuditUpdate) SetDomain ¶
func (aau *APIAuditUpdate) SetDomain(s string) *APIAuditUpdate
SetDomain sets the "domain" field.
func (*APIAuditUpdate) SetHTTPMethod ¶
func (aau *APIAuditUpdate) SetHTTPMethod(s string) *APIAuditUpdate
SetHTTPMethod sets the "http_method" field.
func (*APIAuditUpdate) SetHTTPPath ¶
func (aau *APIAuditUpdate) SetHTTPPath(s string) *APIAuditUpdate
SetHTTPPath sets the "http_path" field.
func (*APIAuditUpdate) SetHashedGrantToken ¶
func (aau *APIAuditUpdate) SetHashedGrantToken(s string) *APIAuditUpdate
SetHashedGrantToken sets the "hashed_grant_token" field.
func (*APIAuditUpdate) SetNillableDeletedAt ¶
func (aau *APIAuditUpdate) SetNillableDeletedAt(t *time.Time) *APIAuditUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*APIAuditUpdate) SetNillableDomain ¶
func (aau *APIAuditUpdate) SetNillableDomain(s *string) *APIAuditUpdate
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*APIAuditUpdate) SetNillableHTTPMethod ¶
func (aau *APIAuditUpdate) SetNillableHTTPMethod(s *string) *APIAuditUpdate
SetNillableHTTPMethod sets the "http_method" field if the given value is not nil.
func (*APIAuditUpdate) SetNillableHTTPPath ¶
func (aau *APIAuditUpdate) SetNillableHTTPPath(s *string) *APIAuditUpdate
SetNillableHTTPPath sets the "http_path" field if the given value is not nil.
func (*APIAuditUpdate) SetNillableHashedGrantToken ¶
func (aau *APIAuditUpdate) SetNillableHashedGrantToken(s *string) *APIAuditUpdate
SetNillableHashedGrantToken sets the "hashed_grant_token" field if the given value is not nil.
func (*APIAuditUpdate) SetNillablePlane ¶
func (aau *APIAuditUpdate) SetNillablePlane(s *string) *APIAuditUpdate
SetNillablePlane sets the "plane" field if the given value is not nil.
func (*APIAuditUpdate) SetNillableSentHTTPStatus ¶
func (aau *APIAuditUpdate) SetNillableSentHTTPStatus(i *int) *APIAuditUpdate
SetNillableSentHTTPStatus sets the "sent_http_status" field if the given value is not nil.
func (*APIAuditUpdate) SetPlane ¶
func (aau *APIAuditUpdate) SetPlane(s string) *APIAuditUpdate
SetPlane sets the "plane" field.
func (*APIAuditUpdate) SetSentHTTPStatus ¶
func (aau *APIAuditUpdate) SetSentHTTPStatus(i int) *APIAuditUpdate
SetSentHTTPStatus sets the "sent_http_status" field.
func (*APIAuditUpdate) Where ¶
func (aau *APIAuditUpdate) Where(ps ...predicate.APIAudit) *APIAuditUpdate
Where appends a list predicates to the APIAuditUpdate builder.
type APIAuditUpdateOne ¶
type APIAuditUpdateOne struct {
// contains filtered or unexported fields
}
APIAuditUpdateOne is the builder for updating a single APIAudit entity.
func (*APIAuditUpdateOne) AddSentHTTPStatus ¶
func (aauo *APIAuditUpdateOne) AddSentHTTPStatus(i int) *APIAuditUpdateOne
AddSentHTTPStatus adds i to the "sent_http_status" field.
func (*APIAuditUpdateOne) ClearDeletedAt ¶
func (aauo *APIAuditUpdateOne) ClearDeletedAt() *APIAuditUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*APIAuditUpdateOne) ClearDomain ¶
func (aauo *APIAuditUpdateOne) ClearDomain() *APIAuditUpdateOne
ClearDomain clears the value of the "domain" field.
func (*APIAuditUpdateOne) ClearHTTPMethod ¶
func (aauo *APIAuditUpdateOne) ClearHTTPMethod() *APIAuditUpdateOne
ClearHTTPMethod clears the value of the "http_method" field.
func (*APIAuditUpdateOne) ClearHTTPPath ¶
func (aauo *APIAuditUpdateOne) ClearHTTPPath() *APIAuditUpdateOne
ClearHTTPPath clears the value of the "http_path" field.
func (*APIAuditUpdateOne) ClearHashedGrantToken ¶
func (aauo *APIAuditUpdateOne) ClearHashedGrantToken() *APIAuditUpdateOne
ClearHashedGrantToken clears the value of the "hashed_grant_token" field.
func (*APIAuditUpdateOne) ClearSentHTTPStatus ¶
func (aauo *APIAuditUpdateOne) ClearSentHTTPStatus() *APIAuditUpdateOne
ClearSentHTTPStatus clears the value of the "sent_http_status" field.
func (*APIAuditUpdateOne) Exec ¶
func (aauo *APIAuditUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*APIAuditUpdateOne) ExecX ¶
func (aauo *APIAuditUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*APIAuditUpdateOne) Mutation ¶
func (aauo *APIAuditUpdateOne) Mutation() *APIAuditMutation
Mutation returns the APIAuditMutation object of the builder.
func (*APIAuditUpdateOne) Save ¶
func (aauo *APIAuditUpdateOne) Save(ctx context.Context) (*APIAudit, error)
Save executes the query and returns the updated APIAudit entity.
func (*APIAuditUpdateOne) SaveX ¶
func (aauo *APIAuditUpdateOne) SaveX(ctx context.Context) *APIAudit
SaveX is like Save, but panics if an error occurs.
func (*APIAuditUpdateOne) Select ¶
func (aauo *APIAuditUpdateOne) Select(field string, fields ...string) *APIAuditUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*APIAuditUpdateOne) SetDeletedAt ¶
func (aauo *APIAuditUpdateOne) SetDeletedAt(t time.Time) *APIAuditUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*APIAuditUpdateOne) SetDomain ¶
func (aauo *APIAuditUpdateOne) SetDomain(s string) *APIAuditUpdateOne
SetDomain sets the "domain" field.
func (*APIAuditUpdateOne) SetHTTPMethod ¶
func (aauo *APIAuditUpdateOne) SetHTTPMethod(s string) *APIAuditUpdateOne
SetHTTPMethod sets the "http_method" field.
func (*APIAuditUpdateOne) SetHTTPPath ¶
func (aauo *APIAuditUpdateOne) SetHTTPPath(s string) *APIAuditUpdateOne
SetHTTPPath sets the "http_path" field.
func (*APIAuditUpdateOne) SetHashedGrantToken ¶
func (aauo *APIAuditUpdateOne) SetHashedGrantToken(s string) *APIAuditUpdateOne
SetHashedGrantToken sets the "hashed_grant_token" field.
func (*APIAuditUpdateOne) SetNillableDeletedAt ¶
func (aauo *APIAuditUpdateOne) SetNillableDeletedAt(t *time.Time) *APIAuditUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*APIAuditUpdateOne) SetNillableDomain ¶
func (aauo *APIAuditUpdateOne) SetNillableDomain(s *string) *APIAuditUpdateOne
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*APIAuditUpdateOne) SetNillableHTTPMethod ¶
func (aauo *APIAuditUpdateOne) SetNillableHTTPMethod(s *string) *APIAuditUpdateOne
SetNillableHTTPMethod sets the "http_method" field if the given value is not nil.
func (*APIAuditUpdateOne) SetNillableHTTPPath ¶
func (aauo *APIAuditUpdateOne) SetNillableHTTPPath(s *string) *APIAuditUpdateOne
SetNillableHTTPPath sets the "http_path" field if the given value is not nil.
func (*APIAuditUpdateOne) SetNillableHashedGrantToken ¶
func (aauo *APIAuditUpdateOne) SetNillableHashedGrantToken(s *string) *APIAuditUpdateOne
SetNillableHashedGrantToken sets the "hashed_grant_token" field if the given value is not nil.
func (*APIAuditUpdateOne) SetNillablePlane ¶
func (aauo *APIAuditUpdateOne) SetNillablePlane(s *string) *APIAuditUpdateOne
SetNillablePlane sets the "plane" field if the given value is not nil.
func (*APIAuditUpdateOne) SetNillableSentHTTPStatus ¶
func (aauo *APIAuditUpdateOne) SetNillableSentHTTPStatus(i *int) *APIAuditUpdateOne
SetNillableSentHTTPStatus sets the "sent_http_status" field if the given value is not nil.
func (*APIAuditUpdateOne) SetPlane ¶
func (aauo *APIAuditUpdateOne) SetPlane(s string) *APIAuditUpdateOne
SetPlane sets the "plane" field.
func (*APIAuditUpdateOne) SetSentHTTPStatus ¶
func (aauo *APIAuditUpdateOne) SetSentHTTPStatus(i int) *APIAuditUpdateOne
SetSentHTTPStatus sets the "sent_http_status" field.
func (*APIAuditUpdateOne) Where ¶
func (aauo *APIAuditUpdateOne) Where(ps ...predicate.APIAudit) *APIAuditUpdateOne
Where appends a list predicates to the APIAuditUpdate builder.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // APIAudit is the client for interacting with the APIAudit builders. APIAudit *APIAuditClient // Fact is the client for interacting with the Fact builders. Fact *FactClient // Grant is the client for interacting with the Grant builders. Grant *GrantClient // Scope is the client for interacting with the Scope builders. Scope *ScopeClient // 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(). APIAudit. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Fact ¶
type Fact struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt *time.Time `json:"deleted_at,omitempty"` // HashedValue holds the value of the "hashed_value" field. HashedValue string `json:"-"` // EncryptedValue holds the value of the "encrypted_value" field. EncryptedValue string `json:"-"` // Domain holds the value of the "domain" field. Domain string `json:"domain,omitempty"` // Collection holds the value of the "collection" field. Collection *string `json:"collection,omitempty"` // Key holds the value of the "key" field. Key *string `json:"key,omitempty"` // BlindIndexes holds the value of the "blind_indexes" field. BlindIndexes []string `json:"blind_indexes,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FactQuery when eager-loading is set. Edges FactEdges `json:"edges"` // contains filtered or unexported fields }
Fact is the model entity for the Fact schema.
func (*Fact) QueryScope ¶
func (f *Fact) QueryScope() *ScopeQuery
QueryScope queries the "scope" edge of the Fact entity.
func (*Fact) Unwrap ¶
Unwrap unwraps the Fact 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 (*Fact) Update ¶
func (f *Fact) Update() *FactUpdateOne
Update returns a builder for updating this Fact. Note that you need to call Fact.Unwrap() before calling this method if this Fact was returned from a transaction, and the transaction was committed or rolled back.
type FactClient ¶
type FactClient struct {
// contains filtered or unexported fields
}
FactClient is a client for the Fact schema.
func NewFactClient ¶
func NewFactClient(c config) *FactClient
NewFactClient returns a client for the Fact from the given config.
func (*FactClient) Create ¶
func (c *FactClient) Create() *FactCreate
Create returns a builder for creating a Fact entity.
func (*FactClient) CreateBulk ¶
func (c *FactClient) CreateBulk(builders ...*FactCreate) *FactCreateBulk
CreateBulk returns a builder for creating a bulk of Fact entities.
func (*FactClient) Delete ¶
func (c *FactClient) Delete() *FactDelete
Delete returns a delete builder for Fact.
func (*FactClient) DeleteOne ¶
func (c *FactClient) DeleteOne(f *Fact) *FactDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FactClient) DeleteOneID ¶
func (c *FactClient) DeleteOneID(id string) *FactDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FactClient) GetX ¶
func (c *FactClient) GetX(ctx context.Context, id string) *Fact
GetX is like Get, but panics if an error occurs.
func (*FactClient) Intercept ¶
func (c *FactClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `fact.Intercept(f(g(h())))`.
func (*FactClient) Interceptors ¶
func (c *FactClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FactClient) MapCreateBulk ¶
func (c *FactClient) MapCreateBulk(slice any, setFunc func(*FactCreate, int)) *FactCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FactClient) Query ¶
func (c *FactClient) Query() *FactQuery
Query returns a query builder for Fact.
func (*FactClient) QueryScope ¶
func (c *FactClient) QueryScope(f *Fact) *ScopeQuery
QueryScope queries the scope edge of a Fact.
func (*FactClient) Update ¶
func (c *FactClient) Update() *FactUpdate
Update returns an update builder for Fact.
func (*FactClient) UpdateOne ¶
func (c *FactClient) UpdateOne(f *Fact) *FactUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FactClient) UpdateOneID ¶
func (c *FactClient) UpdateOneID(id string) *FactUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FactClient) Use ¶
func (c *FactClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `fact.Hooks(f(g(h())))`.
type FactCreate ¶
type FactCreate struct {
// contains filtered or unexported fields
}
FactCreate is the builder for creating a Fact entity.
func (*FactCreate) Exec ¶
func (fc *FactCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FactCreate) ExecX ¶
func (fc *FactCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FactCreate) Mutation ¶
func (fc *FactCreate) Mutation() *FactMutation
Mutation returns the FactMutation object of the builder.
func (*FactCreate) Save ¶
func (fc *FactCreate) Save(ctx context.Context) (*Fact, error)
Save creates the Fact in the database.
func (*FactCreate) SaveX ¶
func (fc *FactCreate) SaveX(ctx context.Context) *Fact
SaveX calls Save and panics if Save returns an error.
func (*FactCreate) SetBlindIndexes ¶
func (fc *FactCreate) SetBlindIndexes(s []string) *FactCreate
SetBlindIndexes sets the "blind_indexes" field.
func (*FactCreate) SetCollection ¶
func (fc *FactCreate) SetCollection(s string) *FactCreate
SetCollection sets the "collection" field.
func (*FactCreate) SetCreatedAt ¶
func (fc *FactCreate) SetCreatedAt(t time.Time) *FactCreate
SetCreatedAt sets the "created_at" field.
func (*FactCreate) SetDeletedAt ¶
func (fc *FactCreate) SetDeletedAt(t time.Time) *FactCreate
SetDeletedAt sets the "deleted_at" field.
func (*FactCreate) SetDomain ¶
func (fc *FactCreate) SetDomain(s string) *FactCreate
SetDomain sets the "domain" field.
func (*FactCreate) SetEncryptedValue ¶
func (fc *FactCreate) SetEncryptedValue(s string) *FactCreate
SetEncryptedValue sets the "encrypted_value" field.
func (*FactCreate) SetHashedValue ¶
func (fc *FactCreate) SetHashedValue(s string) *FactCreate
SetHashedValue sets the "hashed_value" field.
func (*FactCreate) SetID ¶
func (fc *FactCreate) SetID(s string) *FactCreate
SetID sets the "id" field.
func (*FactCreate) SetKey ¶
func (fc *FactCreate) SetKey(s string) *FactCreate
SetKey sets the "key" field.
func (*FactCreate) SetNillableCreatedAt ¶
func (fc *FactCreate) SetNillableCreatedAt(t *time.Time) *FactCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FactCreate) SetNillableDeletedAt ¶
func (fc *FactCreate) SetNillableDeletedAt(t *time.Time) *FactCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*FactCreate) SetNillableID ¶
func (fc *FactCreate) SetNillableID(s *string) *FactCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*FactCreate) SetNillableScopeID ¶
func (fc *FactCreate) SetNillableScopeID(id *string) *FactCreate
SetNillableScopeID sets the "scope" edge to the Scope entity by ID if the given value is not nil.
func (*FactCreate) SetNillableUpdatedAt ¶
func (fc *FactCreate) SetNillableUpdatedAt(t *time.Time) *FactCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FactCreate) SetScope ¶
func (fc *FactCreate) SetScope(s *Scope) *FactCreate
SetScope sets the "scope" edge to the Scope entity.
func (*FactCreate) SetScopeID ¶
func (fc *FactCreate) SetScopeID(id string) *FactCreate
SetScopeID sets the "scope" edge to the Scope entity by ID.
func (*FactCreate) SetUpdatedAt ¶
func (fc *FactCreate) SetUpdatedAt(t time.Time) *FactCreate
SetUpdatedAt sets the "updated_at" field.
type FactCreateBulk ¶
type FactCreateBulk struct {
// contains filtered or unexported fields
}
FactCreateBulk is the builder for creating many Fact entities in bulk.
func (*FactCreateBulk) Exec ¶
func (fcb *FactCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FactCreateBulk) ExecX ¶
func (fcb *FactCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FactDelete ¶
type FactDelete struct {
// contains filtered or unexported fields
}
FactDelete is the builder for deleting a Fact entity.
func (*FactDelete) Exec ¶
func (fd *FactDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FactDelete) ExecX ¶
func (fd *FactDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FactDelete) Where ¶
func (fd *FactDelete) Where(ps ...predicate.Fact) *FactDelete
Where appends a list predicates to the FactDelete builder.
type FactDeleteOne ¶
type FactDeleteOne struct {
// contains filtered or unexported fields
}
FactDeleteOne is the builder for deleting a single Fact entity.
func (*FactDeleteOne) Exec ¶
func (fdo *FactDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FactDeleteOne) ExecX ¶
func (fdo *FactDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FactDeleteOne) Where ¶
func (fdo *FactDeleteOne) Where(ps ...predicate.Fact) *FactDeleteOne
Where appends a list predicates to the FactDelete builder.
type FactEdges ¶
type FactEdges struct { // Scope holds the value of the scope edge. Scope *Scope `json:"scope,omitempty"` // contains filtered or unexported fields }
FactEdges holds the relations/edges for other nodes in the graph.
func (FactEdges) ScopeOrErr ¶
ScopeOrErr returns the Scope value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FactFilter ¶
type FactFilter struct {
// contains filtered or unexported fields
}
FactFilter provides a generic filtering capability at runtime for FactQuery.
func (*FactFilter) Where ¶
func (f *FactFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*FactFilter) WhereBlindIndexes ¶
func (f *FactFilter) WhereBlindIndexes(p entql.BytesP)
WhereBlindIndexes applies the entql json.RawMessage predicate on the blind_indexes field.
func (*FactFilter) WhereCollection ¶
func (f *FactFilter) WhereCollection(p entql.StringP)
WhereCollection applies the entql string predicate on the collection field.
func (*FactFilter) WhereCreatedAt ¶
func (f *FactFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*FactFilter) WhereDeletedAt ¶
func (f *FactFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*FactFilter) WhereDomain ¶
func (f *FactFilter) WhereDomain(p entql.StringP)
WhereDomain applies the entql string predicate on the domain field.
func (*FactFilter) WhereEncryptedValue ¶
func (f *FactFilter) WhereEncryptedValue(p entql.StringP)
WhereEncryptedValue applies the entql string predicate on the encrypted_value field.
func (*FactFilter) WhereHasScope ¶
func (f *FactFilter) WhereHasScope()
WhereHasScope applies a predicate to check if query has an edge scope.
func (*FactFilter) WhereHasScopeWith ¶
func (f *FactFilter) WhereHasScopeWith(preds ...predicate.Scope)
WhereHasScopeWith applies a predicate to check if query has an edge scope with a given conditions (other predicates).
func (*FactFilter) WhereHashedValue ¶
func (f *FactFilter) WhereHashedValue(p entql.StringP)
WhereHashedValue applies the entql string predicate on the hashed_value field.
func (*FactFilter) WhereID ¶
func (f *FactFilter) WhereID(p entql.StringP)
WhereID applies the entql string predicate on the id field.
func (*FactFilter) WhereKey ¶
func (f *FactFilter) WhereKey(p entql.StringP)
WhereKey applies the entql string predicate on the key field.
func (*FactFilter) WhereUpdatedAt ¶
func (f *FactFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type FactGroupBy ¶
type FactGroupBy struct {
// contains filtered or unexported fields
}
FactGroupBy is the group-by builder for Fact entities.
func (*FactGroupBy) Aggregate ¶
func (fgb *FactGroupBy) Aggregate(fns ...AggregateFunc) *FactGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FactGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FactGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FactGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FactGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FactGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FactGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FactGroupBy) Scan ¶
func (fgb *FactGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FactGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FactMutation ¶
type FactMutation struct {
// contains filtered or unexported fields
}
FactMutation represents an operation that mutates the Fact nodes in the graph.
func (*FactMutation) AddField ¶
func (m *FactMutation) 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 (*FactMutation) AddedEdges ¶
func (m *FactMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FactMutation) AddedField ¶
func (m *FactMutation) 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 (*FactMutation) AddedFields ¶
func (m *FactMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FactMutation) AddedIDs ¶
func (m *FactMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FactMutation) AppendBlindIndexes ¶
func (m *FactMutation) AppendBlindIndexes(s []string)
AppendBlindIndexes adds s to the "blind_indexes" field.
func (*FactMutation) AppendedBlindIndexes ¶
func (m *FactMutation) AppendedBlindIndexes() ([]string, bool)
AppendedBlindIndexes returns the list of values that were appended to the "blind_indexes" field in this mutation.
func (*FactMutation) BlindIndexes ¶
func (m *FactMutation) BlindIndexes() (r []string, exists bool)
BlindIndexes returns the value of the "blind_indexes" field in the mutation.
func (*FactMutation) ClearDeletedAt ¶
func (m *FactMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FactMutation) ClearEdge ¶
func (m *FactMutation) 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 (*FactMutation) ClearField ¶
func (m *FactMutation) 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 (*FactMutation) ClearScope ¶
func (m *FactMutation) ClearScope()
ClearScope clears the "scope" edge to the Scope entity.
func (*FactMutation) ClearedEdges ¶
func (m *FactMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FactMutation) ClearedFields ¶
func (m *FactMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FactMutation) Client ¶
func (m FactMutation) 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 (*FactMutation) Collection ¶
func (m *FactMutation) Collection() (r string, exists bool)
Collection returns the value of the "collection" field in the mutation.
func (*FactMutation) CreatedAt ¶
func (m *FactMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FactMutation) DeletedAt ¶
func (m *FactMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*FactMutation) DeletedAtCleared ¶
func (m *FactMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*FactMutation) Domain ¶
func (m *FactMutation) Domain() (r string, exists bool)
Domain returns the value of the "domain" field in the mutation.
func (*FactMutation) EdgeCleared ¶
func (m *FactMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FactMutation) EncryptedValue ¶
func (m *FactMutation) EncryptedValue() (r string, exists bool)
EncryptedValue returns the value of the "encrypted_value" field in the mutation.
func (*FactMutation) Field ¶
func (m *FactMutation) 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 (*FactMutation) FieldCleared ¶
func (m *FactMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FactMutation) Fields ¶
func (m *FactMutation) 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 (*FactMutation) Filter ¶
func (m *FactMutation) Filter() *FactFilter
Filter returns an entql.Where implementation to apply filters on the FactMutation builder.
func (*FactMutation) HashedValue ¶
func (m *FactMutation) HashedValue() (r string, exists bool)
HashedValue returns the value of the "hashed_value" field in the mutation.
func (*FactMutation) ID ¶
func (m *FactMutation) ID() (id string, 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 (*FactMutation) IDs ¶
func (m *FactMutation) IDs(ctx context.Context) ([]string, 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 (*FactMutation) Key ¶
func (m *FactMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*FactMutation) OldBlindIndexes ¶
func (m *FactMutation) OldBlindIndexes(ctx context.Context) (v []string, err error)
OldBlindIndexes returns the old "blind_indexes" field's value of the Fact entity. If the Fact 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 (*FactMutation) OldCollection ¶
func (m *FactMutation) OldCollection(ctx context.Context) (v *string, err error)
OldCollection returns the old "collection" field's value of the Fact entity. If the Fact 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 (*FactMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Fact entity. If the Fact 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 (*FactMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Fact entity. If the Fact 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 (*FactMutation) OldDomain ¶
func (m *FactMutation) OldDomain(ctx context.Context) (v string, err error)
OldDomain returns the old "domain" field's value of the Fact entity. If the Fact 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 (*FactMutation) OldEncryptedValue ¶
func (m *FactMutation) OldEncryptedValue(ctx context.Context) (v string, err error)
OldEncryptedValue returns the old "encrypted_value" field's value of the Fact entity. If the Fact 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 (*FactMutation) 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 (*FactMutation) OldHashedValue ¶
func (m *FactMutation) OldHashedValue(ctx context.Context) (v string, err error)
OldHashedValue returns the old "hashed_value" field's value of the Fact entity. If the Fact 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 (*FactMutation) OldKey ¶
func (m *FactMutation) OldKey(ctx context.Context) (v *string, err error)
OldKey returns the old "key" field's value of the Fact entity. If the Fact 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 (*FactMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Fact entity. If the Fact 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 (*FactMutation) RemovedEdges ¶
func (m *FactMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FactMutation) RemovedIDs ¶
func (m *FactMutation) 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 (*FactMutation) ResetBlindIndexes ¶
func (m *FactMutation) ResetBlindIndexes()
ResetBlindIndexes resets all changes to the "blind_indexes" field.
func (*FactMutation) ResetCollection ¶
func (m *FactMutation) ResetCollection()
ResetCollection resets all changes to the "collection" field.
func (*FactMutation) ResetCreatedAt ¶
func (m *FactMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FactMutation) ResetDeletedAt ¶
func (m *FactMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*FactMutation) ResetDomain ¶
func (m *FactMutation) ResetDomain()
ResetDomain resets all changes to the "domain" field.
func (*FactMutation) ResetEdge ¶
func (m *FactMutation) 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 (*FactMutation) ResetEncryptedValue ¶
func (m *FactMutation) ResetEncryptedValue()
ResetEncryptedValue resets all changes to the "encrypted_value" field.
func (*FactMutation) ResetField ¶
func (m *FactMutation) 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 (*FactMutation) ResetHashedValue ¶
func (m *FactMutation) ResetHashedValue()
ResetHashedValue resets all changes to the "hashed_value" field.
func (*FactMutation) ResetKey ¶
func (m *FactMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*FactMutation) ResetScope ¶
func (m *FactMutation) ResetScope()
ResetScope resets all changes to the "scope" edge.
func (*FactMutation) ResetUpdatedAt ¶
func (m *FactMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FactMutation) ScopeCleared ¶
func (m *FactMutation) ScopeCleared() bool
ScopeCleared reports if the "scope" edge to the Scope entity was cleared.
func (*FactMutation) ScopeID ¶
func (m *FactMutation) ScopeID() (id string, exists bool)
ScopeID returns the "scope" edge ID in the mutation.
func (*FactMutation) ScopeIDs ¶
func (m *FactMutation) ScopeIDs() (ids []string)
ScopeIDs returns the "scope" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScopeID instead. It exists only for internal usage by the builders.
func (*FactMutation) SetBlindIndexes ¶
func (m *FactMutation) SetBlindIndexes(s []string)
SetBlindIndexes sets the "blind_indexes" field.
func (*FactMutation) SetCollection ¶
func (m *FactMutation) SetCollection(s string)
SetCollection sets the "collection" field.
func (*FactMutation) SetCreatedAt ¶
func (m *FactMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FactMutation) SetDeletedAt ¶
func (m *FactMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*FactMutation) SetDomain ¶
func (m *FactMutation) SetDomain(s string)
SetDomain sets the "domain" field.
func (*FactMutation) SetEncryptedValue ¶
func (m *FactMutation) SetEncryptedValue(s string)
SetEncryptedValue sets the "encrypted_value" field.
func (*FactMutation) SetField ¶
func (m *FactMutation) 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 (*FactMutation) SetHashedValue ¶
func (m *FactMutation) SetHashedValue(s string)
SetHashedValue sets the "hashed_value" field.
func (*FactMutation) SetID ¶
func (m *FactMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Fact entities.
func (*FactMutation) SetOp ¶
func (m *FactMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FactMutation) SetScopeID ¶
func (m *FactMutation) SetScopeID(id string)
SetScopeID sets the "scope" edge to the Scope entity by id.
func (*FactMutation) SetUpdatedAt ¶
func (m *FactMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (FactMutation) Tx ¶
func (m FactMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FactMutation) Type ¶
func (m *FactMutation) Type() string
Type returns the node type of this mutation (Fact).
func (*FactMutation) UpdatedAt ¶
func (m *FactMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FactMutation) Where ¶
func (m *FactMutation) Where(ps ...predicate.Fact)
Where appends a list predicates to the FactMutation builder.
func (*FactMutation) WhereP ¶
func (m *FactMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FactMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FactQuery ¶
type FactQuery struct {
// contains filtered or unexported fields
}
FactQuery is the builder for querying Fact entities.
func (*FactQuery) Aggregate ¶
func (fq *FactQuery) Aggregate(fns ...AggregateFunc) *FactSelect
Aggregate returns a FactSelect configured with the given aggregations.
func (*FactQuery) Clone ¶
Clone returns a duplicate of the FactQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FactQuery) Filter ¶
func (fq *FactQuery) Filter() *FactFilter
Filter returns a Filter implementation to apply filters on the FactQuery builder.
func (*FactQuery) First ¶
First returns the first Fact entity from the query. Returns a *NotFoundError when no Fact was found.
func (*FactQuery) FirstID ¶
FirstID returns the first Fact ID from the query. Returns a *NotFoundError when no Fact ID was found.
func (*FactQuery) GroupBy ¶
func (fq *FactQuery) GroupBy(field string, fields ...string) *FactGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Fact.Query(). GroupBy(fact.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FactQuery) Only ¶
Only returns a single Fact entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Fact entity is found. Returns a *NotFoundError when no Fact entities are found.
func (*FactQuery) OnlyID ¶
OnlyID is like Only, but returns the only Fact ID in the query. Returns a *NotSingularError when more than one Fact ID is found. Returns a *NotFoundError when no entities are found.
func (*FactQuery) Order ¶
func (fq *FactQuery) Order(o ...fact.OrderOption) *FactQuery
Order specifies how the records should be ordered.
func (*FactQuery) QueryScope ¶
func (fq *FactQuery) QueryScope() *ScopeQuery
QueryScope chains the current query on the "scope" edge.
func (*FactQuery) Select ¶
func (fq *FactQuery) Select(fields ...string) *FactSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Fact.Query(). Select(fact.FieldCreatedAt). Scan(ctx, &v)
func (*FactQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*FactQuery) WithScope ¶
func (fq *FactQuery) WithScope(opts ...func(*ScopeQuery)) *FactQuery
WithScope tells the query-builder to eager-load the nodes that are connected to the "scope" edge. The optional arguments are used to configure the query builder of the edge.
type FactSelect ¶
type FactSelect struct { *FactQuery // contains filtered or unexported fields }
FactSelect is the builder for selecting fields of Fact entities.
func (*FactSelect) Aggregate ¶
func (fs *FactSelect) Aggregate(fns ...AggregateFunc) *FactSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FactSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FactSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FactSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FactSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FactSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FactSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FactSelect) Scan ¶
func (fs *FactSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FactSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FactUpdate ¶
type FactUpdate struct {
// contains filtered or unexported fields
}
FactUpdate is the builder for updating Fact entities.
func (*FactUpdate) AppendBlindIndexes ¶
func (fu *FactUpdate) AppendBlindIndexes(s []string) *FactUpdate
AppendBlindIndexes appends s to the "blind_indexes" field.
func (*FactUpdate) ClearDeletedAt ¶
func (fu *FactUpdate) ClearDeletedAt() *FactUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FactUpdate) ClearScope ¶
func (fu *FactUpdate) ClearScope() *FactUpdate
ClearScope clears the "scope" edge to the Scope entity.
func (*FactUpdate) Exec ¶
func (fu *FactUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FactUpdate) ExecX ¶
func (fu *FactUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FactUpdate) Mutation ¶
func (fu *FactUpdate) Mutation() *FactMutation
Mutation returns the FactMutation object of the builder.
func (*FactUpdate) Save ¶
func (fu *FactUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FactUpdate) SaveX ¶
func (fu *FactUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FactUpdate) SetBlindIndexes ¶
func (fu *FactUpdate) SetBlindIndexes(s []string) *FactUpdate
SetBlindIndexes sets the "blind_indexes" field.
func (*FactUpdate) SetCollection ¶
func (fu *FactUpdate) SetCollection(s string) *FactUpdate
SetCollection sets the "collection" field.
func (*FactUpdate) SetDeletedAt ¶
func (fu *FactUpdate) SetDeletedAt(t time.Time) *FactUpdate
SetDeletedAt sets the "deleted_at" field.
func (*FactUpdate) SetDomain ¶
func (fu *FactUpdate) SetDomain(s string) *FactUpdate
SetDomain sets the "domain" field.
func (*FactUpdate) SetEncryptedValue ¶
func (fu *FactUpdate) SetEncryptedValue(s string) *FactUpdate
SetEncryptedValue sets the "encrypted_value" field.
func (*FactUpdate) SetHashedValue ¶
func (fu *FactUpdate) SetHashedValue(s string) *FactUpdate
SetHashedValue sets the "hashed_value" field.
func (*FactUpdate) SetKey ¶
func (fu *FactUpdate) SetKey(s string) *FactUpdate
SetKey sets the "key" field.
func (*FactUpdate) SetNillableCollection ¶
func (fu *FactUpdate) SetNillableCollection(s *string) *FactUpdate
SetNillableCollection sets the "collection" field if the given value is not nil.
func (*FactUpdate) SetNillableDeletedAt ¶
func (fu *FactUpdate) SetNillableDeletedAt(t *time.Time) *FactUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*FactUpdate) SetNillableDomain ¶
func (fu *FactUpdate) SetNillableDomain(s *string) *FactUpdate
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*FactUpdate) SetNillableEncryptedValue ¶
func (fu *FactUpdate) SetNillableEncryptedValue(s *string) *FactUpdate
SetNillableEncryptedValue sets the "encrypted_value" field if the given value is not nil.
func (*FactUpdate) SetNillableHashedValue ¶
func (fu *FactUpdate) SetNillableHashedValue(s *string) *FactUpdate
SetNillableHashedValue sets the "hashed_value" field if the given value is not nil.
func (*FactUpdate) SetNillableKey ¶
func (fu *FactUpdate) SetNillableKey(s *string) *FactUpdate
SetNillableKey sets the "key" field if the given value is not nil.
func (*FactUpdate) SetNillableScopeID ¶
func (fu *FactUpdate) SetNillableScopeID(id *string) *FactUpdate
SetNillableScopeID sets the "scope" edge to the Scope entity by ID if the given value is not nil.
func (*FactUpdate) SetScope ¶
func (fu *FactUpdate) SetScope(s *Scope) *FactUpdate
SetScope sets the "scope" edge to the Scope entity.
func (*FactUpdate) SetScopeID ¶
func (fu *FactUpdate) SetScopeID(id string) *FactUpdate
SetScopeID sets the "scope" edge to the Scope entity by ID.
func (*FactUpdate) Where ¶
func (fu *FactUpdate) Where(ps ...predicate.Fact) *FactUpdate
Where appends a list predicates to the FactUpdate builder.
type FactUpdateOne ¶
type FactUpdateOne struct {
// contains filtered or unexported fields
}
FactUpdateOne is the builder for updating a single Fact entity.
func (*FactUpdateOne) AppendBlindIndexes ¶
func (fuo *FactUpdateOne) AppendBlindIndexes(s []string) *FactUpdateOne
AppendBlindIndexes appends s to the "blind_indexes" field.
func (*FactUpdateOne) ClearDeletedAt ¶
func (fuo *FactUpdateOne) ClearDeletedAt() *FactUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FactUpdateOne) ClearScope ¶
func (fuo *FactUpdateOne) ClearScope() *FactUpdateOne
ClearScope clears the "scope" edge to the Scope entity.
func (*FactUpdateOne) Exec ¶
func (fuo *FactUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FactUpdateOne) ExecX ¶
func (fuo *FactUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FactUpdateOne) Mutation ¶
func (fuo *FactUpdateOne) Mutation() *FactMutation
Mutation returns the FactMutation object of the builder.
func (*FactUpdateOne) Save ¶
func (fuo *FactUpdateOne) Save(ctx context.Context) (*Fact, error)
Save executes the query and returns the updated Fact entity.
func (*FactUpdateOne) SaveX ¶
func (fuo *FactUpdateOne) SaveX(ctx context.Context) *Fact
SaveX is like Save, but panics if an error occurs.
func (*FactUpdateOne) Select ¶
func (fuo *FactUpdateOne) Select(field string, fields ...string) *FactUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FactUpdateOne) SetBlindIndexes ¶
func (fuo *FactUpdateOne) SetBlindIndexes(s []string) *FactUpdateOne
SetBlindIndexes sets the "blind_indexes" field.
func (*FactUpdateOne) SetCollection ¶
func (fuo *FactUpdateOne) SetCollection(s string) *FactUpdateOne
SetCollection sets the "collection" field.
func (*FactUpdateOne) SetDeletedAt ¶
func (fuo *FactUpdateOne) SetDeletedAt(t time.Time) *FactUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*FactUpdateOne) SetDomain ¶
func (fuo *FactUpdateOne) SetDomain(s string) *FactUpdateOne
SetDomain sets the "domain" field.
func (*FactUpdateOne) SetEncryptedValue ¶
func (fuo *FactUpdateOne) SetEncryptedValue(s string) *FactUpdateOne
SetEncryptedValue sets the "encrypted_value" field.
func (*FactUpdateOne) SetHashedValue ¶
func (fuo *FactUpdateOne) SetHashedValue(s string) *FactUpdateOne
SetHashedValue sets the "hashed_value" field.
func (*FactUpdateOne) SetKey ¶
func (fuo *FactUpdateOne) SetKey(s string) *FactUpdateOne
SetKey sets the "key" field.
func (*FactUpdateOne) SetNillableCollection ¶
func (fuo *FactUpdateOne) SetNillableCollection(s *string) *FactUpdateOne
SetNillableCollection sets the "collection" field if the given value is not nil.
func (*FactUpdateOne) SetNillableDeletedAt ¶
func (fuo *FactUpdateOne) SetNillableDeletedAt(t *time.Time) *FactUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*FactUpdateOne) SetNillableDomain ¶
func (fuo *FactUpdateOne) SetNillableDomain(s *string) *FactUpdateOne
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*FactUpdateOne) SetNillableEncryptedValue ¶
func (fuo *FactUpdateOne) SetNillableEncryptedValue(s *string) *FactUpdateOne
SetNillableEncryptedValue sets the "encrypted_value" field if the given value is not nil.
func (*FactUpdateOne) SetNillableHashedValue ¶
func (fuo *FactUpdateOne) SetNillableHashedValue(s *string) *FactUpdateOne
SetNillableHashedValue sets the "hashed_value" field if the given value is not nil.
func (*FactUpdateOne) SetNillableKey ¶
func (fuo *FactUpdateOne) SetNillableKey(s *string) *FactUpdateOne
SetNillableKey sets the "key" field if the given value is not nil.
func (*FactUpdateOne) SetNillableScopeID ¶
func (fuo *FactUpdateOne) SetNillableScopeID(id *string) *FactUpdateOne
SetNillableScopeID sets the "scope" edge to the Scope entity by ID if the given value is not nil.
func (*FactUpdateOne) SetScope ¶
func (fuo *FactUpdateOne) SetScope(s *Scope) *FactUpdateOne
SetScope sets the "scope" edge to the Scope entity.
func (*FactUpdateOne) SetScopeID ¶
func (fuo *FactUpdateOne) SetScopeID(id string) *FactUpdateOne
SetScopeID sets the "scope" edge to the Scope entity by ID.
func (*FactUpdateOne) Where ¶
func (fuo *FactUpdateOne) Where(ps ...predicate.Fact) *FactUpdateOne
Where appends a list predicates to the FactUpdate builder.
type Grant ¶
type Grant struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt *time.Time `json:"deleted_at,omitempty"` // HashedGrantToken holds the value of the "hashed_grant_token" field. HashedGrantToken string `json:"-"` // Domain holds the value of the "domain" field. Domain string `json:"domain,omitempty"` // Version holds the value of the "version" field. Version string `json:"version,omitempty"` // AllowedHTTPMethods holds the value of the "allowed_http_methods" field. AllowedHTTPMethods string `json:"allowed_http_methods,omitempty"` // Paths holds the value of the "paths" field. Paths []string `json:"paths,omitempty"` // contains filtered or unexported fields }
Grant is the model entity for the Grant schema.
func (*Grant) Unwrap ¶
Unwrap unwraps the Grant 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 (*Grant) Update ¶
func (gr *Grant) Update() *GrantUpdateOne
Update returns a builder for updating this Grant. Note that you need to call Grant.Unwrap() before calling this method if this Grant was returned from a transaction, and the transaction was committed or rolled back.
type GrantClient ¶
type GrantClient struct {
// contains filtered or unexported fields
}
GrantClient is a client for the Grant schema.
func NewGrantClient ¶
func NewGrantClient(c config) *GrantClient
NewGrantClient returns a client for the Grant from the given config.
func (*GrantClient) Create ¶
func (c *GrantClient) Create() *GrantCreate
Create returns a builder for creating a Grant entity.
func (*GrantClient) CreateBulk ¶
func (c *GrantClient) CreateBulk(builders ...*GrantCreate) *GrantCreateBulk
CreateBulk returns a builder for creating a bulk of Grant entities.
func (*GrantClient) Delete ¶
func (c *GrantClient) Delete() *GrantDelete
Delete returns a delete builder for Grant.
func (*GrantClient) DeleteOne ¶
func (c *GrantClient) DeleteOne(gr *Grant) *GrantDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GrantClient) DeleteOneID ¶
func (c *GrantClient) DeleteOneID(id string) *GrantDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GrantClient) GetX ¶
func (c *GrantClient) GetX(ctx context.Context, id string) *Grant
GetX is like Get, but panics if an error occurs.
func (*GrantClient) Intercept ¶
func (c *GrantClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `grant.Intercept(f(g(h())))`.
func (*GrantClient) Interceptors ¶
func (c *GrantClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GrantClient) MapCreateBulk ¶
func (c *GrantClient) MapCreateBulk(slice any, setFunc func(*GrantCreate, int)) *GrantCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*GrantClient) Query ¶
func (c *GrantClient) Query() *GrantQuery
Query returns a query builder for Grant.
func (*GrantClient) Update ¶
func (c *GrantClient) Update() *GrantUpdate
Update returns an update builder for Grant.
func (*GrantClient) UpdateOne ¶
func (c *GrantClient) UpdateOne(gr *Grant) *GrantUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GrantClient) UpdateOneID ¶
func (c *GrantClient) UpdateOneID(id string) *GrantUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GrantClient) Use ¶
func (c *GrantClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `grant.Hooks(f(g(h())))`.
type GrantCreate ¶
type GrantCreate struct {
// contains filtered or unexported fields
}
GrantCreate is the builder for creating a Grant entity.
func (*GrantCreate) Exec ¶
func (gc *GrantCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GrantCreate) ExecX ¶
func (gc *GrantCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GrantCreate) Mutation ¶
func (gc *GrantCreate) Mutation() *GrantMutation
Mutation returns the GrantMutation object of the builder.
func (*GrantCreate) Save ¶
func (gc *GrantCreate) Save(ctx context.Context) (*Grant, error)
Save creates the Grant in the database.
func (*GrantCreate) SaveX ¶
func (gc *GrantCreate) SaveX(ctx context.Context) *Grant
SaveX calls Save and panics if Save returns an error.
func (*GrantCreate) SetAllowedHTTPMethods ¶
func (gc *GrantCreate) SetAllowedHTTPMethods(s string) *GrantCreate
SetAllowedHTTPMethods sets the "allowed_http_methods" field.
func (*GrantCreate) SetCreatedAt ¶
func (gc *GrantCreate) SetCreatedAt(t time.Time) *GrantCreate
SetCreatedAt sets the "created_at" field.
func (*GrantCreate) SetDeletedAt ¶
func (gc *GrantCreate) SetDeletedAt(t time.Time) *GrantCreate
SetDeletedAt sets the "deleted_at" field.
func (*GrantCreate) SetDomain ¶
func (gc *GrantCreate) SetDomain(s string) *GrantCreate
SetDomain sets the "domain" field.
func (*GrantCreate) SetHashedGrantToken ¶
func (gc *GrantCreate) SetHashedGrantToken(s string) *GrantCreate
SetHashedGrantToken sets the "hashed_grant_token" field.
func (*GrantCreate) SetID ¶
func (gc *GrantCreate) SetID(s string) *GrantCreate
SetID sets the "id" field.
func (*GrantCreate) SetNillableCreatedAt ¶
func (gc *GrantCreate) SetNillableCreatedAt(t *time.Time) *GrantCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GrantCreate) SetNillableDeletedAt ¶
func (gc *GrantCreate) SetNillableDeletedAt(t *time.Time) *GrantCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GrantCreate) SetNillableID ¶
func (gc *GrantCreate) SetNillableID(s *string) *GrantCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*GrantCreate) SetNillableUpdatedAt ¶
func (gc *GrantCreate) SetNillableUpdatedAt(t *time.Time) *GrantCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GrantCreate) SetPaths ¶
func (gc *GrantCreate) SetPaths(s []string) *GrantCreate
SetPaths sets the "paths" field.
func (*GrantCreate) SetUpdatedAt ¶
func (gc *GrantCreate) SetUpdatedAt(t time.Time) *GrantCreate
SetUpdatedAt sets the "updated_at" field.
func (*GrantCreate) SetVersion ¶
func (gc *GrantCreate) SetVersion(s string) *GrantCreate
SetVersion sets the "version" field.
type GrantCreateBulk ¶
type GrantCreateBulk struct {
// contains filtered or unexported fields
}
GrantCreateBulk is the builder for creating many Grant entities in bulk.
func (*GrantCreateBulk) Exec ¶
func (gcb *GrantCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GrantCreateBulk) ExecX ¶
func (gcb *GrantCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GrantDelete ¶
type GrantDelete struct {
// contains filtered or unexported fields
}
GrantDelete is the builder for deleting a Grant entity.
func (*GrantDelete) Exec ¶
func (gd *GrantDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GrantDelete) ExecX ¶
func (gd *GrantDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GrantDelete) Where ¶
func (gd *GrantDelete) Where(ps ...predicate.Grant) *GrantDelete
Where appends a list predicates to the GrantDelete builder.
type GrantDeleteOne ¶
type GrantDeleteOne struct {
// contains filtered or unexported fields
}
GrantDeleteOne is the builder for deleting a single Grant entity.
func (*GrantDeleteOne) Exec ¶
func (gdo *GrantDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GrantDeleteOne) ExecX ¶
func (gdo *GrantDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GrantDeleteOne) Where ¶
func (gdo *GrantDeleteOne) Where(ps ...predicate.Grant) *GrantDeleteOne
Where appends a list predicates to the GrantDelete builder.
type GrantFilter ¶
type GrantFilter struct {
// contains filtered or unexported fields
}
GrantFilter provides a generic filtering capability at runtime for GrantQuery.
func (*GrantFilter) Where ¶
func (f *GrantFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*GrantFilter) WhereAllowedHTTPMethods ¶
func (f *GrantFilter) WhereAllowedHTTPMethods(p entql.StringP)
WhereAllowedHTTPMethods applies the entql string predicate on the allowed_http_methods field.
func (*GrantFilter) WhereCreatedAt ¶
func (f *GrantFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*GrantFilter) WhereDeletedAt ¶
func (f *GrantFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*GrantFilter) WhereDomain ¶
func (f *GrantFilter) WhereDomain(p entql.StringP)
WhereDomain applies the entql string predicate on the domain field.
func (*GrantFilter) WhereHashedGrantToken ¶
func (f *GrantFilter) WhereHashedGrantToken(p entql.StringP)
WhereHashedGrantToken applies the entql string predicate on the hashed_grant_token field.
func (*GrantFilter) WhereID ¶
func (f *GrantFilter) WhereID(p entql.StringP)
WhereID applies the entql string predicate on the id field.
func (*GrantFilter) WherePaths ¶
func (f *GrantFilter) WherePaths(p entql.BytesP)
WherePaths applies the entql json.RawMessage predicate on the paths field.
func (*GrantFilter) WhereUpdatedAt ¶
func (f *GrantFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
func (*GrantFilter) WhereVersion ¶
func (f *GrantFilter) WhereVersion(p entql.StringP)
WhereVersion applies the entql string predicate on the version field.
type GrantGroupBy ¶
type GrantGroupBy struct {
// contains filtered or unexported fields
}
GrantGroupBy is the group-by builder for Grant entities.
func (*GrantGroupBy) Aggregate ¶
func (ggb *GrantGroupBy) Aggregate(fns ...AggregateFunc) *GrantGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GrantGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GrantGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GrantGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GrantGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GrantGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GrantGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GrantGroupBy) Scan ¶
func (ggb *GrantGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GrantGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GrantMutation ¶
type GrantMutation struct {
// contains filtered or unexported fields
}
GrantMutation represents an operation that mutates the Grant nodes in the graph.
func (*GrantMutation) AddField ¶
func (m *GrantMutation) 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 (*GrantMutation) AddedEdges ¶
func (m *GrantMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GrantMutation) AddedField ¶
func (m *GrantMutation) 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 (*GrantMutation) AddedFields ¶
func (m *GrantMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GrantMutation) AddedIDs ¶
func (m *GrantMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GrantMutation) AllowedHTTPMethods ¶
func (m *GrantMutation) AllowedHTTPMethods() (r string, exists bool)
AllowedHTTPMethods returns the value of the "allowed_http_methods" field in the mutation.
func (*GrantMutation) AppendPaths ¶
func (m *GrantMutation) AppendPaths(s []string)
AppendPaths adds s to the "paths" field.
func (*GrantMutation) AppendedPaths ¶
func (m *GrantMutation) AppendedPaths() ([]string, bool)
AppendedPaths returns the list of values that were appended to the "paths" field in this mutation.
func (*GrantMutation) ClearDeletedAt ¶
func (m *GrantMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*GrantMutation) ClearEdge ¶
func (m *GrantMutation) 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 (*GrantMutation) ClearField ¶
func (m *GrantMutation) 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 (*GrantMutation) ClearedEdges ¶
func (m *GrantMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GrantMutation) ClearedFields ¶
func (m *GrantMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GrantMutation) Client ¶
func (m GrantMutation) 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 (*GrantMutation) CreatedAt ¶
func (m *GrantMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GrantMutation) DeletedAt ¶
func (m *GrantMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*GrantMutation) DeletedAtCleared ¶
func (m *GrantMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*GrantMutation) Domain ¶
func (m *GrantMutation) Domain() (r string, exists bool)
Domain returns the value of the "domain" field in the mutation.
func (*GrantMutation) EdgeCleared ¶
func (m *GrantMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GrantMutation) Field ¶
func (m *GrantMutation) 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 (*GrantMutation) FieldCleared ¶
func (m *GrantMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GrantMutation) Fields ¶
func (m *GrantMutation) 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 (*GrantMutation) Filter ¶
func (m *GrantMutation) Filter() *GrantFilter
Filter returns an entql.Where implementation to apply filters on the GrantMutation builder.
func (*GrantMutation) HashedGrantToken ¶
func (m *GrantMutation) HashedGrantToken() (r string, exists bool)
HashedGrantToken returns the value of the "hashed_grant_token" field in the mutation.
func (*GrantMutation) ID ¶
func (m *GrantMutation) ID() (id string, 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 (*GrantMutation) IDs ¶
func (m *GrantMutation) IDs(ctx context.Context) ([]string, 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 (*GrantMutation) OldAllowedHTTPMethods ¶
func (m *GrantMutation) OldAllowedHTTPMethods(ctx context.Context) (v string, err error)
OldAllowedHTTPMethods returns the old "allowed_http_methods" field's value of the Grant entity. If the Grant 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 (*GrantMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Grant entity. If the Grant 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 (*GrantMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Grant entity. If the Grant 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 (*GrantMutation) OldDomain ¶
func (m *GrantMutation) OldDomain(ctx context.Context) (v string, err error)
OldDomain returns the old "domain" field's value of the Grant entity. If the Grant 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 (*GrantMutation) 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 (*GrantMutation) OldHashedGrantToken ¶
func (m *GrantMutation) OldHashedGrantToken(ctx context.Context) (v string, err error)
OldHashedGrantToken returns the old "hashed_grant_token" field's value of the Grant entity. If the Grant 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 (*GrantMutation) OldPaths ¶
func (m *GrantMutation) OldPaths(ctx context.Context) (v []string, err error)
OldPaths returns the old "paths" field's value of the Grant entity. If the Grant 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 (*GrantMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Grant entity. If the Grant 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 (*GrantMutation) OldVersion ¶
func (m *GrantMutation) OldVersion(ctx context.Context) (v string, err error)
OldVersion returns the old "version" field's value of the Grant entity. If the Grant 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 (*GrantMutation) Paths ¶
func (m *GrantMutation) Paths() (r []string, exists bool)
Paths returns the value of the "paths" field in the mutation.
func (*GrantMutation) RemovedEdges ¶
func (m *GrantMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GrantMutation) RemovedIDs ¶
func (m *GrantMutation) 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 (*GrantMutation) ResetAllowedHTTPMethods ¶
func (m *GrantMutation) ResetAllowedHTTPMethods()
ResetAllowedHTTPMethods resets all changes to the "allowed_http_methods" field.
func (*GrantMutation) ResetCreatedAt ¶
func (m *GrantMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GrantMutation) ResetDeletedAt ¶
func (m *GrantMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*GrantMutation) ResetDomain ¶
func (m *GrantMutation) ResetDomain()
ResetDomain resets all changes to the "domain" field.
func (*GrantMutation) ResetEdge ¶
func (m *GrantMutation) 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 (*GrantMutation) ResetField ¶
func (m *GrantMutation) 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 (*GrantMutation) ResetHashedGrantToken ¶
func (m *GrantMutation) ResetHashedGrantToken()
ResetHashedGrantToken resets all changes to the "hashed_grant_token" field.
func (*GrantMutation) ResetPaths ¶
func (m *GrantMutation) ResetPaths()
ResetPaths resets all changes to the "paths" field.
func (*GrantMutation) ResetUpdatedAt ¶
func (m *GrantMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*GrantMutation) ResetVersion ¶
func (m *GrantMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*GrantMutation) SetAllowedHTTPMethods ¶
func (m *GrantMutation) SetAllowedHTTPMethods(s string)
SetAllowedHTTPMethods sets the "allowed_http_methods" field.
func (*GrantMutation) SetCreatedAt ¶
func (m *GrantMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GrantMutation) SetDeletedAt ¶
func (m *GrantMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*GrantMutation) SetDomain ¶
func (m *GrantMutation) SetDomain(s string)
SetDomain sets the "domain" field.
func (*GrantMutation) SetField ¶
func (m *GrantMutation) 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 (*GrantMutation) SetHashedGrantToken ¶
func (m *GrantMutation) SetHashedGrantToken(s string)
SetHashedGrantToken sets the "hashed_grant_token" field.
func (*GrantMutation) SetID ¶
func (m *GrantMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Grant entities.
func (*GrantMutation) SetOp ¶
func (m *GrantMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GrantMutation) SetPaths ¶
func (m *GrantMutation) SetPaths(s []string)
SetPaths sets the "paths" field.
func (*GrantMutation) SetUpdatedAt ¶
func (m *GrantMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*GrantMutation) SetVersion ¶
func (m *GrantMutation) SetVersion(s string)
SetVersion sets the "version" field.
func (GrantMutation) Tx ¶
func (m GrantMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GrantMutation) Type ¶
func (m *GrantMutation) Type() string
Type returns the node type of this mutation (Grant).
func (*GrantMutation) UpdatedAt ¶
func (m *GrantMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*GrantMutation) Version ¶
func (m *GrantMutation) Version() (r string, exists bool)
Version returns the value of the "version" field in the mutation.
func (*GrantMutation) Where ¶
func (m *GrantMutation) Where(ps ...predicate.Grant)
Where appends a list predicates to the GrantMutation builder.
func (*GrantMutation) WhereP ¶
func (m *GrantMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GrantMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GrantQuery ¶
type GrantQuery struct {
// contains filtered or unexported fields
}
GrantQuery is the builder for querying Grant entities.
func (*GrantQuery) Aggregate ¶
func (gq *GrantQuery) Aggregate(fns ...AggregateFunc) *GrantSelect
Aggregate returns a GrantSelect configured with the given aggregations.
func (*GrantQuery) All ¶
func (gq *GrantQuery) All(ctx context.Context) ([]*Grant, error)
All executes the query and returns a list of Grants.
func (*GrantQuery) AllX ¶
func (gq *GrantQuery) AllX(ctx context.Context) []*Grant
AllX is like All, but panics if an error occurs.
func (*GrantQuery) Clone ¶
func (gq *GrantQuery) Clone() *GrantQuery
Clone returns a duplicate of the GrantQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GrantQuery) Count ¶
func (gq *GrantQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GrantQuery) CountX ¶
func (gq *GrantQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GrantQuery) Exist ¶
func (gq *GrantQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GrantQuery) ExistX ¶
func (gq *GrantQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GrantQuery) Filter ¶
func (gq *GrantQuery) Filter() *GrantFilter
Filter returns a Filter implementation to apply filters on the GrantQuery builder.
func (*GrantQuery) First ¶
func (gq *GrantQuery) First(ctx context.Context) (*Grant, error)
First returns the first Grant entity from the query. Returns a *NotFoundError when no Grant was found.
func (*GrantQuery) FirstID ¶
func (gq *GrantQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Grant ID from the query. Returns a *NotFoundError when no Grant ID was found.
func (*GrantQuery) FirstIDX ¶
func (gq *GrantQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*GrantQuery) FirstX ¶
func (gq *GrantQuery) FirstX(ctx context.Context) *Grant
FirstX is like First, but panics if an error occurs.
func (*GrantQuery) GroupBy ¶
func (gq *GrantQuery) GroupBy(field string, fields ...string) *GrantGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Grant.Query(). GroupBy(grant.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GrantQuery) IDs ¶
func (gq *GrantQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Grant IDs.
func (*GrantQuery) IDsX ¶
func (gq *GrantQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*GrantQuery) Limit ¶
func (gq *GrantQuery) Limit(limit int) *GrantQuery
Limit the number of records to be returned by this query.
func (*GrantQuery) Offset ¶
func (gq *GrantQuery) Offset(offset int) *GrantQuery
Offset to start from.
func (*GrantQuery) Only ¶
func (gq *GrantQuery) Only(ctx context.Context) (*Grant, error)
Only returns a single Grant entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Grant entity is found. Returns a *NotFoundError when no Grant entities are found.
func (*GrantQuery) OnlyID ¶
func (gq *GrantQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Grant ID in the query. Returns a *NotSingularError when more than one Grant ID is found. Returns a *NotFoundError when no entities are found.
func (*GrantQuery) OnlyIDX ¶
func (gq *GrantQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GrantQuery) OnlyX ¶
func (gq *GrantQuery) OnlyX(ctx context.Context) *Grant
OnlyX is like Only, but panics if an error occurs.
func (*GrantQuery) Order ¶
func (gq *GrantQuery) Order(o ...grant.OrderOption) *GrantQuery
Order specifies how the records should be ordered.
func (*GrantQuery) Select ¶
func (gq *GrantQuery) Select(fields ...string) *GrantSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Grant.Query(). Select(grant.FieldCreatedAt). Scan(ctx, &v)
func (*GrantQuery) Unique ¶
func (gq *GrantQuery) Unique(unique bool) *GrantQuery
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 (*GrantQuery) Where ¶
func (gq *GrantQuery) Where(ps ...predicate.Grant) *GrantQuery
Where adds a new predicate for the GrantQuery builder.
type GrantSelect ¶
type GrantSelect struct { *GrantQuery // contains filtered or unexported fields }
GrantSelect is the builder for selecting fields of Grant entities.
func (*GrantSelect) Aggregate ¶
func (gs *GrantSelect) Aggregate(fns ...AggregateFunc) *GrantSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GrantSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GrantSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GrantSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GrantSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GrantSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GrantSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GrantSelect) Scan ¶
func (gs *GrantSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GrantSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GrantUpdate ¶
type GrantUpdate struct {
// contains filtered or unexported fields
}
GrantUpdate is the builder for updating Grant entities.
func (*GrantUpdate) AppendPaths ¶
func (gu *GrantUpdate) AppendPaths(s []string) *GrantUpdate
AppendPaths appends s to the "paths" field.
func (*GrantUpdate) ClearDeletedAt ¶
func (gu *GrantUpdate) ClearDeletedAt() *GrantUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*GrantUpdate) Exec ¶
func (gu *GrantUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GrantUpdate) ExecX ¶
func (gu *GrantUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GrantUpdate) Mutation ¶
func (gu *GrantUpdate) Mutation() *GrantMutation
Mutation returns the GrantMutation object of the builder.
func (*GrantUpdate) Save ¶
func (gu *GrantUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GrantUpdate) SaveX ¶
func (gu *GrantUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GrantUpdate) SetAllowedHTTPMethods ¶
func (gu *GrantUpdate) SetAllowedHTTPMethods(s string) *GrantUpdate
SetAllowedHTTPMethods sets the "allowed_http_methods" field.
func (*GrantUpdate) SetDeletedAt ¶
func (gu *GrantUpdate) SetDeletedAt(t time.Time) *GrantUpdate
SetDeletedAt sets the "deleted_at" field.
func (*GrantUpdate) SetDomain ¶
func (gu *GrantUpdate) SetDomain(s string) *GrantUpdate
SetDomain sets the "domain" field.
func (*GrantUpdate) SetHashedGrantToken ¶
func (gu *GrantUpdate) SetHashedGrantToken(s string) *GrantUpdate
SetHashedGrantToken sets the "hashed_grant_token" field.
func (*GrantUpdate) SetNillableAllowedHTTPMethods ¶
func (gu *GrantUpdate) SetNillableAllowedHTTPMethods(s *string) *GrantUpdate
SetNillableAllowedHTTPMethods sets the "allowed_http_methods" field if the given value is not nil.
func (*GrantUpdate) SetNillableDeletedAt ¶
func (gu *GrantUpdate) SetNillableDeletedAt(t *time.Time) *GrantUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GrantUpdate) SetNillableDomain ¶
func (gu *GrantUpdate) SetNillableDomain(s *string) *GrantUpdate
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*GrantUpdate) SetNillableHashedGrantToken ¶
func (gu *GrantUpdate) SetNillableHashedGrantToken(s *string) *GrantUpdate
SetNillableHashedGrantToken sets the "hashed_grant_token" field if the given value is not nil.
func (*GrantUpdate) SetNillableVersion ¶
func (gu *GrantUpdate) SetNillableVersion(s *string) *GrantUpdate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*GrantUpdate) SetPaths ¶
func (gu *GrantUpdate) SetPaths(s []string) *GrantUpdate
SetPaths sets the "paths" field.
func (*GrantUpdate) SetVersion ¶
func (gu *GrantUpdate) SetVersion(s string) *GrantUpdate
SetVersion sets the "version" field.
func (*GrantUpdate) Where ¶
func (gu *GrantUpdate) Where(ps ...predicate.Grant) *GrantUpdate
Where appends a list predicates to the GrantUpdate builder.
type GrantUpdateOne ¶
type GrantUpdateOne struct {
// contains filtered or unexported fields
}
GrantUpdateOne is the builder for updating a single Grant entity.
func (*GrantUpdateOne) AppendPaths ¶
func (guo *GrantUpdateOne) AppendPaths(s []string) *GrantUpdateOne
AppendPaths appends s to the "paths" field.
func (*GrantUpdateOne) ClearDeletedAt ¶
func (guo *GrantUpdateOne) ClearDeletedAt() *GrantUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*GrantUpdateOne) Exec ¶
func (guo *GrantUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GrantUpdateOne) ExecX ¶
func (guo *GrantUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GrantUpdateOne) Mutation ¶
func (guo *GrantUpdateOne) Mutation() *GrantMutation
Mutation returns the GrantMutation object of the builder.
func (*GrantUpdateOne) Save ¶
func (guo *GrantUpdateOne) Save(ctx context.Context) (*Grant, error)
Save executes the query and returns the updated Grant entity.
func (*GrantUpdateOne) SaveX ¶
func (guo *GrantUpdateOne) SaveX(ctx context.Context) *Grant
SaveX is like Save, but panics if an error occurs.
func (*GrantUpdateOne) Select ¶
func (guo *GrantUpdateOne) Select(field string, fields ...string) *GrantUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GrantUpdateOne) SetAllowedHTTPMethods ¶
func (guo *GrantUpdateOne) SetAllowedHTTPMethods(s string) *GrantUpdateOne
SetAllowedHTTPMethods sets the "allowed_http_methods" field.
func (*GrantUpdateOne) SetDeletedAt ¶
func (guo *GrantUpdateOne) SetDeletedAt(t time.Time) *GrantUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*GrantUpdateOne) SetDomain ¶
func (guo *GrantUpdateOne) SetDomain(s string) *GrantUpdateOne
SetDomain sets the "domain" field.
func (*GrantUpdateOne) SetHashedGrantToken ¶
func (guo *GrantUpdateOne) SetHashedGrantToken(s string) *GrantUpdateOne
SetHashedGrantToken sets the "hashed_grant_token" field.
func (*GrantUpdateOne) SetNillableAllowedHTTPMethods ¶
func (guo *GrantUpdateOne) SetNillableAllowedHTTPMethods(s *string) *GrantUpdateOne
SetNillableAllowedHTTPMethods sets the "allowed_http_methods" field if the given value is not nil.
func (*GrantUpdateOne) SetNillableDeletedAt ¶
func (guo *GrantUpdateOne) SetNillableDeletedAt(t *time.Time) *GrantUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GrantUpdateOne) SetNillableDomain ¶
func (guo *GrantUpdateOne) SetNillableDomain(s *string) *GrantUpdateOne
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*GrantUpdateOne) SetNillableHashedGrantToken ¶
func (guo *GrantUpdateOne) SetNillableHashedGrantToken(s *string) *GrantUpdateOne
SetNillableHashedGrantToken sets the "hashed_grant_token" field if the given value is not nil.
func (*GrantUpdateOne) SetNillableVersion ¶
func (guo *GrantUpdateOne) SetNillableVersion(s *string) *GrantUpdateOne
SetNillableVersion sets the "version" field if the given value is not nil.
func (*GrantUpdateOne) SetPaths ¶
func (guo *GrantUpdateOne) SetPaths(s []string) *GrantUpdateOne
SetPaths sets the "paths" field.
func (*GrantUpdateOne) SetVersion ¶
func (guo *GrantUpdateOne) SetVersion(s string) *GrantUpdateOne
SetVersion sets the "version" field.
func (*GrantUpdateOne) Where ¶
func (guo *GrantUpdateOne) Where(ps ...predicate.Grant) *GrantUpdateOne
Where appends a list predicates to the GrantUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Scope ¶
type Scope struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt *time.Time `json:"deleted_at,omitempty"` // CustomID holds the value of the "custom_id" field. CustomID string `json:"custom_id,omitempty"` // Nonce holds the value of the "nonce" field. Nonce string `json:"-"` // Domain holds the value of the "domain" field. Domain string `json:"domain,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ScopeQuery when eager-loading is set. Edges ScopeEdges `json:"edges"` // contains filtered or unexported fields }
Scope is the model entity for the Scope schema.
func (*Scope) QueryFacts ¶
QueryFacts queries the "facts" edge of the Scope entity.
func (*Scope) Unwrap ¶
Unwrap unwraps the Scope 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 (*Scope) Update ¶
func (s *Scope) Update() *ScopeUpdateOne
Update returns a builder for updating this Scope. Note that you need to call Scope.Unwrap() before calling this method if this Scope was returned from a transaction, and the transaction was committed or rolled back.
type ScopeClient ¶
type ScopeClient struct {
// contains filtered or unexported fields
}
ScopeClient is a client for the Scope schema.
func NewScopeClient ¶
func NewScopeClient(c config) *ScopeClient
NewScopeClient returns a client for the Scope from the given config.
func (*ScopeClient) Create ¶
func (c *ScopeClient) Create() *ScopeCreate
Create returns a builder for creating a Scope entity.
func (*ScopeClient) CreateBulk ¶
func (c *ScopeClient) CreateBulk(builders ...*ScopeCreate) *ScopeCreateBulk
CreateBulk returns a builder for creating a bulk of Scope entities.
func (*ScopeClient) Delete ¶
func (c *ScopeClient) Delete() *ScopeDelete
Delete returns a delete builder for Scope.
func (*ScopeClient) DeleteOne ¶
func (c *ScopeClient) DeleteOne(s *Scope) *ScopeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ScopeClient) DeleteOneID ¶
func (c *ScopeClient) DeleteOneID(id string) *ScopeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ScopeClient) GetX ¶
func (c *ScopeClient) GetX(ctx context.Context, id string) *Scope
GetX is like Get, but panics if an error occurs.
func (*ScopeClient) Intercept ¶
func (c *ScopeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `scope.Intercept(f(g(h())))`.
func (*ScopeClient) Interceptors ¶
func (c *ScopeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ScopeClient) MapCreateBulk ¶
func (c *ScopeClient) MapCreateBulk(slice any, setFunc func(*ScopeCreate, int)) *ScopeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ScopeClient) Query ¶
func (c *ScopeClient) Query() *ScopeQuery
Query returns a query builder for Scope.
func (*ScopeClient) QueryFacts ¶
func (c *ScopeClient) QueryFacts(s *Scope) *FactQuery
QueryFacts queries the facts edge of a Scope.
func (*ScopeClient) Update ¶
func (c *ScopeClient) Update() *ScopeUpdate
Update returns an update builder for Scope.
func (*ScopeClient) UpdateOne ¶
func (c *ScopeClient) UpdateOne(s *Scope) *ScopeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScopeClient) UpdateOneID ¶
func (c *ScopeClient) UpdateOneID(id string) *ScopeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScopeClient) Use ¶
func (c *ScopeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scope.Hooks(f(g(h())))`.
type ScopeCreate ¶
type ScopeCreate struct {
// contains filtered or unexported fields
}
ScopeCreate is the builder for creating a Scope entity.
func (*ScopeCreate) AddFactIDs ¶
func (sc *ScopeCreate) AddFactIDs(ids ...string) *ScopeCreate
AddFactIDs adds the "facts" edge to the Fact entity by IDs.
func (*ScopeCreate) AddFacts ¶
func (sc *ScopeCreate) AddFacts(f ...*Fact) *ScopeCreate
AddFacts adds the "facts" edges to the Fact entity.
func (*ScopeCreate) Exec ¶
func (sc *ScopeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScopeCreate) ExecX ¶
func (sc *ScopeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScopeCreate) Mutation ¶
func (sc *ScopeCreate) Mutation() *ScopeMutation
Mutation returns the ScopeMutation object of the builder.
func (*ScopeCreate) Save ¶
func (sc *ScopeCreate) Save(ctx context.Context) (*Scope, error)
Save creates the Scope in the database.
func (*ScopeCreate) SaveX ¶
func (sc *ScopeCreate) SaveX(ctx context.Context) *Scope
SaveX calls Save and panics if Save returns an error.
func (*ScopeCreate) SetCreatedAt ¶
func (sc *ScopeCreate) SetCreatedAt(t time.Time) *ScopeCreate
SetCreatedAt sets the "created_at" field.
func (*ScopeCreate) SetCustomID ¶
func (sc *ScopeCreate) SetCustomID(s string) *ScopeCreate
SetCustomID sets the "custom_id" field.
func (*ScopeCreate) SetDeletedAt ¶
func (sc *ScopeCreate) SetDeletedAt(t time.Time) *ScopeCreate
SetDeletedAt sets the "deleted_at" field.
func (*ScopeCreate) SetDomain ¶
func (sc *ScopeCreate) SetDomain(s string) *ScopeCreate
SetDomain sets the "domain" field.
func (*ScopeCreate) SetID ¶
func (sc *ScopeCreate) SetID(s string) *ScopeCreate
SetID sets the "id" field.
func (*ScopeCreate) SetNillableCreatedAt ¶
func (sc *ScopeCreate) SetNillableCreatedAt(t *time.Time) *ScopeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ScopeCreate) SetNillableDeletedAt ¶
func (sc *ScopeCreate) SetNillableDeletedAt(t *time.Time) *ScopeCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ScopeCreate) SetNillableID ¶
func (sc *ScopeCreate) SetNillableID(s *string) *ScopeCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ScopeCreate) SetNillableNonce ¶
func (sc *ScopeCreate) SetNillableNonce(s *string) *ScopeCreate
SetNillableNonce sets the "nonce" field if the given value is not nil.
func (*ScopeCreate) SetNillableUpdatedAt ¶
func (sc *ScopeCreate) SetNillableUpdatedAt(t *time.Time) *ScopeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ScopeCreate) SetNonce ¶
func (sc *ScopeCreate) SetNonce(s string) *ScopeCreate
SetNonce sets the "nonce" field.
func (*ScopeCreate) SetUpdatedAt ¶
func (sc *ScopeCreate) SetUpdatedAt(t time.Time) *ScopeCreate
SetUpdatedAt sets the "updated_at" field.
type ScopeCreateBulk ¶
type ScopeCreateBulk struct {
// contains filtered or unexported fields
}
ScopeCreateBulk is the builder for creating many Scope entities in bulk.
func (*ScopeCreateBulk) Exec ¶
func (scb *ScopeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScopeCreateBulk) ExecX ¶
func (scb *ScopeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScopeDelete ¶
type ScopeDelete struct {
// contains filtered or unexported fields
}
ScopeDelete is the builder for deleting a Scope entity.
func (*ScopeDelete) Exec ¶
func (sd *ScopeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScopeDelete) ExecX ¶
func (sd *ScopeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScopeDelete) Where ¶
func (sd *ScopeDelete) Where(ps ...predicate.Scope) *ScopeDelete
Where appends a list predicates to the ScopeDelete builder.
type ScopeDeleteOne ¶
type ScopeDeleteOne struct {
// contains filtered or unexported fields
}
ScopeDeleteOne is the builder for deleting a single Scope entity.
func (*ScopeDeleteOne) Exec ¶
func (sdo *ScopeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScopeDeleteOne) ExecX ¶
func (sdo *ScopeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScopeDeleteOne) Where ¶
func (sdo *ScopeDeleteOne) Where(ps ...predicate.Scope) *ScopeDeleteOne
Where appends a list predicates to the ScopeDelete builder.
type ScopeEdges ¶
type ScopeEdges struct { // Facts holds the value of the facts edge. Facts []*Fact `json:"facts,omitempty"` // contains filtered or unexported fields }
ScopeEdges holds the relations/edges for other nodes in the graph.
func (ScopeEdges) FactsOrErr ¶
func (e ScopeEdges) FactsOrErr() ([]*Fact, error)
FactsOrErr returns the Facts value or an error if the edge was not loaded in eager-loading.
type ScopeFilter ¶
type ScopeFilter struct {
// contains filtered or unexported fields
}
ScopeFilter provides a generic filtering capability at runtime for ScopeQuery.
func (*ScopeFilter) Where ¶
func (f *ScopeFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*ScopeFilter) WhereCreatedAt ¶
func (f *ScopeFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*ScopeFilter) WhereCustomID ¶
func (f *ScopeFilter) WhereCustomID(p entql.StringP)
WhereCustomID applies the entql string predicate on the custom_id field.
func (*ScopeFilter) WhereDeletedAt ¶
func (f *ScopeFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*ScopeFilter) WhereDomain ¶
func (f *ScopeFilter) WhereDomain(p entql.StringP)
WhereDomain applies the entql string predicate on the domain field.
func (*ScopeFilter) WhereHasFacts ¶
func (f *ScopeFilter) WhereHasFacts()
WhereHasFacts applies a predicate to check if query has an edge facts.
func (*ScopeFilter) WhereHasFactsWith ¶
func (f *ScopeFilter) WhereHasFactsWith(preds ...predicate.Fact)
WhereHasFactsWith applies a predicate to check if query has an edge facts with a given conditions (other predicates).
func (*ScopeFilter) WhereID ¶
func (f *ScopeFilter) WhereID(p entql.StringP)
WhereID applies the entql string predicate on the id field.
func (*ScopeFilter) WhereNonce ¶
func (f *ScopeFilter) WhereNonce(p entql.StringP)
WhereNonce applies the entql string predicate on the nonce field.
func (*ScopeFilter) WhereUpdatedAt ¶
func (f *ScopeFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type ScopeGroupBy ¶
type ScopeGroupBy struct {
// contains filtered or unexported fields
}
ScopeGroupBy is the group-by builder for Scope entities.
func (*ScopeGroupBy) Aggregate ¶
func (sgb *ScopeGroupBy) Aggregate(fns ...AggregateFunc) *ScopeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScopeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScopeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScopeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScopeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScopeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScopeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScopeGroupBy) Scan ¶
func (sgb *ScopeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScopeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScopeMutation ¶
type ScopeMutation struct {
// contains filtered or unexported fields
}
ScopeMutation represents an operation that mutates the Scope nodes in the graph.
func (*ScopeMutation) AddFactIDs ¶
func (m *ScopeMutation) AddFactIDs(ids ...string)
AddFactIDs adds the "facts" edge to the Fact entity by ids.
func (*ScopeMutation) AddField ¶
func (m *ScopeMutation) 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 (*ScopeMutation) AddedEdges ¶
func (m *ScopeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScopeMutation) AddedField ¶
func (m *ScopeMutation) 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 (*ScopeMutation) AddedFields ¶
func (m *ScopeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScopeMutation) AddedIDs ¶
func (m *ScopeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScopeMutation) ClearDeletedAt ¶
func (m *ScopeMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ScopeMutation) ClearEdge ¶
func (m *ScopeMutation) 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 (*ScopeMutation) ClearFacts ¶
func (m *ScopeMutation) ClearFacts()
ClearFacts clears the "facts" edge to the Fact entity.
func (*ScopeMutation) ClearField ¶
func (m *ScopeMutation) 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 (*ScopeMutation) ClearedEdges ¶
func (m *ScopeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScopeMutation) ClearedFields ¶
func (m *ScopeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScopeMutation) Client ¶
func (m ScopeMutation) 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 (*ScopeMutation) CreatedAt ¶
func (m *ScopeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ScopeMutation) CustomID ¶
func (m *ScopeMutation) CustomID() (r string, exists bool)
CustomID returns the value of the "custom_id" field in the mutation.
func (*ScopeMutation) DeletedAt ¶
func (m *ScopeMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*ScopeMutation) DeletedAtCleared ¶
func (m *ScopeMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*ScopeMutation) Domain ¶
func (m *ScopeMutation) Domain() (r string, exists bool)
Domain returns the value of the "domain" field in the mutation.
func (*ScopeMutation) EdgeCleared ¶
func (m *ScopeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScopeMutation) FactsCleared ¶
func (m *ScopeMutation) FactsCleared() bool
FactsCleared reports if the "facts" edge to the Fact entity was cleared.
func (*ScopeMutation) FactsIDs ¶
func (m *ScopeMutation) FactsIDs() (ids []string)
FactsIDs returns the "facts" edge IDs in the mutation.
func (*ScopeMutation) Field ¶
func (m *ScopeMutation) 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 (*ScopeMutation) FieldCleared ¶
func (m *ScopeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScopeMutation) Fields ¶
func (m *ScopeMutation) 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 (*ScopeMutation) Filter ¶
func (m *ScopeMutation) Filter() *ScopeFilter
Filter returns an entql.Where implementation to apply filters on the ScopeMutation builder.
func (*ScopeMutation) ID ¶
func (m *ScopeMutation) ID() (id string, 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 (*ScopeMutation) IDs ¶
func (m *ScopeMutation) IDs(ctx context.Context) ([]string, 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 (*ScopeMutation) Nonce ¶
func (m *ScopeMutation) Nonce() (r string, exists bool)
Nonce returns the value of the "nonce" field in the mutation.
func (*ScopeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Scope entity. If the Scope 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 (*ScopeMutation) OldCustomID ¶
func (m *ScopeMutation) OldCustomID(ctx context.Context) (v string, err error)
OldCustomID returns the old "custom_id" field's value of the Scope entity. If the Scope 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 (*ScopeMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Scope entity. If the Scope 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 (*ScopeMutation) OldDomain ¶
func (m *ScopeMutation) OldDomain(ctx context.Context) (v string, err error)
OldDomain returns the old "domain" field's value of the Scope entity. If the Scope 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 (*ScopeMutation) 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 (*ScopeMutation) OldNonce ¶
func (m *ScopeMutation) OldNonce(ctx context.Context) (v string, err error)
OldNonce returns the old "nonce" field's value of the Scope entity. If the Scope 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 (*ScopeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Scope entity. If the Scope 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 (*ScopeMutation) RemoveFactIDs ¶
func (m *ScopeMutation) RemoveFactIDs(ids ...string)
RemoveFactIDs removes the "facts" edge to the Fact entity by IDs.
func (*ScopeMutation) RemovedEdges ¶
func (m *ScopeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScopeMutation) RemovedFactsIDs ¶
func (m *ScopeMutation) RemovedFactsIDs() (ids []string)
RemovedFacts returns the removed IDs of the "facts" edge to the Fact entity.
func (*ScopeMutation) RemovedIDs ¶
func (m *ScopeMutation) 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 (*ScopeMutation) ResetCreatedAt ¶
func (m *ScopeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ScopeMutation) ResetCustomID ¶
func (m *ScopeMutation) ResetCustomID()
ResetCustomID resets all changes to the "custom_id" field.
func (*ScopeMutation) ResetDeletedAt ¶
func (m *ScopeMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*ScopeMutation) ResetDomain ¶
func (m *ScopeMutation) ResetDomain()
ResetDomain resets all changes to the "domain" field.
func (*ScopeMutation) ResetEdge ¶
func (m *ScopeMutation) 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 (*ScopeMutation) ResetFacts ¶
func (m *ScopeMutation) ResetFacts()
ResetFacts resets all changes to the "facts" edge.
func (*ScopeMutation) ResetField ¶
func (m *ScopeMutation) 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 (*ScopeMutation) ResetNonce ¶
func (m *ScopeMutation) ResetNonce()
ResetNonce resets all changes to the "nonce" field.
func (*ScopeMutation) ResetUpdatedAt ¶
func (m *ScopeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ScopeMutation) SetCreatedAt ¶
func (m *ScopeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ScopeMutation) SetCustomID ¶
func (m *ScopeMutation) SetCustomID(s string)
SetCustomID sets the "custom_id" field.
func (*ScopeMutation) SetDeletedAt ¶
func (m *ScopeMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*ScopeMutation) SetDomain ¶
func (m *ScopeMutation) SetDomain(s string)
SetDomain sets the "domain" field.
func (*ScopeMutation) SetField ¶
func (m *ScopeMutation) 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 (*ScopeMutation) SetID ¶
func (m *ScopeMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Scope entities.
func (*ScopeMutation) SetNonce ¶
func (m *ScopeMutation) SetNonce(s string)
SetNonce sets the "nonce" field.
func (*ScopeMutation) SetOp ¶
func (m *ScopeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ScopeMutation) SetUpdatedAt ¶
func (m *ScopeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ScopeMutation) Tx ¶
func (m ScopeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScopeMutation) Type ¶
func (m *ScopeMutation) Type() string
Type returns the node type of this mutation (Scope).
func (*ScopeMutation) UpdatedAt ¶
func (m *ScopeMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ScopeMutation) Where ¶
func (m *ScopeMutation) Where(ps ...predicate.Scope)
Where appends a list predicates to the ScopeMutation builder.
func (*ScopeMutation) WhereP ¶
func (m *ScopeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ScopeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ScopeQuery ¶
type ScopeQuery struct {
// contains filtered or unexported fields
}
ScopeQuery is the builder for querying Scope entities.
func (*ScopeQuery) Aggregate ¶
func (sq *ScopeQuery) Aggregate(fns ...AggregateFunc) *ScopeSelect
Aggregate returns a ScopeSelect configured with the given aggregations.
func (*ScopeQuery) All ¶
func (sq *ScopeQuery) All(ctx context.Context) ([]*Scope, error)
All executes the query and returns a list of Scopes.
func (*ScopeQuery) AllX ¶
func (sq *ScopeQuery) AllX(ctx context.Context) []*Scope
AllX is like All, but panics if an error occurs.
func (*ScopeQuery) Clone ¶
func (sq *ScopeQuery) Clone() *ScopeQuery
Clone returns a duplicate of the ScopeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScopeQuery) Count ¶
func (sq *ScopeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScopeQuery) CountX ¶
func (sq *ScopeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScopeQuery) Exist ¶
func (sq *ScopeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScopeQuery) ExistX ¶
func (sq *ScopeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScopeQuery) Filter ¶
func (sq *ScopeQuery) Filter() *ScopeFilter
Filter returns a Filter implementation to apply filters on the ScopeQuery builder.
func (*ScopeQuery) First ¶
func (sq *ScopeQuery) First(ctx context.Context) (*Scope, error)
First returns the first Scope entity from the query. Returns a *NotFoundError when no Scope was found.
func (*ScopeQuery) FirstID ¶
func (sq *ScopeQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Scope ID from the query. Returns a *NotFoundError when no Scope ID was found.
func (*ScopeQuery) FirstIDX ¶
func (sq *ScopeQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScopeQuery) FirstX ¶
func (sq *ScopeQuery) FirstX(ctx context.Context) *Scope
FirstX is like First, but panics if an error occurs.
func (*ScopeQuery) GroupBy ¶
func (sq *ScopeQuery) GroupBy(field string, fields ...string) *ScopeGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Scope.Query(). GroupBy(scope.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ScopeQuery) IDs ¶
func (sq *ScopeQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Scope IDs.
func (*ScopeQuery) IDsX ¶
func (sq *ScopeQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*ScopeQuery) Limit ¶
func (sq *ScopeQuery) Limit(limit int) *ScopeQuery
Limit the number of records to be returned by this query.
func (*ScopeQuery) Offset ¶
func (sq *ScopeQuery) Offset(offset int) *ScopeQuery
Offset to start from.
func (*ScopeQuery) Only ¶
func (sq *ScopeQuery) Only(ctx context.Context) (*Scope, error)
Only returns a single Scope entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Scope entity is found. Returns a *NotFoundError when no Scope entities are found.
func (*ScopeQuery) OnlyID ¶
func (sq *ScopeQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Scope ID in the query. Returns a *NotSingularError when more than one Scope ID is found. Returns a *NotFoundError when no entities are found.
func (*ScopeQuery) OnlyIDX ¶
func (sq *ScopeQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScopeQuery) OnlyX ¶
func (sq *ScopeQuery) OnlyX(ctx context.Context) *Scope
OnlyX is like Only, but panics if an error occurs.
func (*ScopeQuery) Order ¶
func (sq *ScopeQuery) Order(o ...scope.OrderOption) *ScopeQuery
Order specifies how the records should be ordered.
func (*ScopeQuery) QueryFacts ¶
func (sq *ScopeQuery) QueryFacts() *FactQuery
QueryFacts chains the current query on the "facts" edge.
func (*ScopeQuery) Select ¶
func (sq *ScopeQuery) Select(fields ...string) *ScopeSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Scope.Query(). Select(scope.FieldCreatedAt). Scan(ctx, &v)
func (*ScopeQuery) Unique ¶
func (sq *ScopeQuery) Unique(unique bool) *ScopeQuery
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 (*ScopeQuery) Where ¶
func (sq *ScopeQuery) Where(ps ...predicate.Scope) *ScopeQuery
Where adds a new predicate for the ScopeQuery builder.
func (*ScopeQuery) WithFacts ¶
func (sq *ScopeQuery) WithFacts(opts ...func(*FactQuery)) *ScopeQuery
WithFacts tells the query-builder to eager-load the nodes that are connected to the "facts" edge. The optional arguments are used to configure the query builder of the edge.
type ScopeSelect ¶
type ScopeSelect struct { *ScopeQuery // contains filtered or unexported fields }
ScopeSelect is the builder for selecting fields of Scope entities.
func (*ScopeSelect) Aggregate ¶
func (ss *ScopeSelect) Aggregate(fns ...AggregateFunc) *ScopeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ScopeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScopeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScopeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScopeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScopeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScopeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScopeSelect) Scan ¶
func (ss *ScopeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScopeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScopeUpdate ¶
type ScopeUpdate struct {
// contains filtered or unexported fields
}
ScopeUpdate is the builder for updating Scope entities.
func (*ScopeUpdate) AddFactIDs ¶
func (su *ScopeUpdate) AddFactIDs(ids ...string) *ScopeUpdate
AddFactIDs adds the "facts" edge to the Fact entity by IDs.
func (*ScopeUpdate) AddFacts ¶
func (su *ScopeUpdate) AddFacts(f ...*Fact) *ScopeUpdate
AddFacts adds the "facts" edges to the Fact entity.
func (*ScopeUpdate) ClearDeletedAt ¶
func (su *ScopeUpdate) ClearDeletedAt() *ScopeUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ScopeUpdate) ClearFacts ¶
func (su *ScopeUpdate) ClearFacts() *ScopeUpdate
ClearFacts clears all "facts" edges to the Fact entity.
func (*ScopeUpdate) Exec ¶
func (su *ScopeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScopeUpdate) ExecX ¶
func (su *ScopeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScopeUpdate) Mutation ¶
func (su *ScopeUpdate) Mutation() *ScopeMutation
Mutation returns the ScopeMutation object of the builder.
func (*ScopeUpdate) RemoveFactIDs ¶
func (su *ScopeUpdate) RemoveFactIDs(ids ...string) *ScopeUpdate
RemoveFactIDs removes the "facts" edge to Fact entities by IDs.
func (*ScopeUpdate) RemoveFacts ¶
func (su *ScopeUpdate) RemoveFacts(f ...*Fact) *ScopeUpdate
RemoveFacts removes "facts" edges to Fact entities.
func (*ScopeUpdate) Save ¶
func (su *ScopeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScopeUpdate) SaveX ¶
func (su *ScopeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScopeUpdate) SetCustomID ¶
func (su *ScopeUpdate) SetCustomID(s string) *ScopeUpdate
SetCustomID sets the "custom_id" field.
func (*ScopeUpdate) SetDeletedAt ¶
func (su *ScopeUpdate) SetDeletedAt(t time.Time) *ScopeUpdate
SetDeletedAt sets the "deleted_at" field.
func (*ScopeUpdate) SetDomain ¶
func (su *ScopeUpdate) SetDomain(s string) *ScopeUpdate
SetDomain sets the "domain" field.
func (*ScopeUpdate) SetNillableCustomID ¶
func (su *ScopeUpdate) SetNillableCustomID(s *string) *ScopeUpdate
SetNillableCustomID sets the "custom_id" field if the given value is not nil.
func (*ScopeUpdate) SetNillableDeletedAt ¶
func (su *ScopeUpdate) SetNillableDeletedAt(t *time.Time) *ScopeUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ScopeUpdate) SetNillableDomain ¶
func (su *ScopeUpdate) SetNillableDomain(s *string) *ScopeUpdate
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*ScopeUpdate) SetNillableNonce ¶
func (su *ScopeUpdate) SetNillableNonce(s *string) *ScopeUpdate
SetNillableNonce sets the "nonce" field if the given value is not nil.
func (*ScopeUpdate) SetNonce ¶
func (su *ScopeUpdate) SetNonce(s string) *ScopeUpdate
SetNonce sets the "nonce" field.
func (*ScopeUpdate) Where ¶
func (su *ScopeUpdate) Where(ps ...predicate.Scope) *ScopeUpdate
Where appends a list predicates to the ScopeUpdate builder.
type ScopeUpdateOne ¶
type ScopeUpdateOne struct {
// contains filtered or unexported fields
}
ScopeUpdateOne is the builder for updating a single Scope entity.
func (*ScopeUpdateOne) AddFactIDs ¶
func (suo *ScopeUpdateOne) AddFactIDs(ids ...string) *ScopeUpdateOne
AddFactIDs adds the "facts" edge to the Fact entity by IDs.
func (*ScopeUpdateOne) AddFacts ¶
func (suo *ScopeUpdateOne) AddFacts(f ...*Fact) *ScopeUpdateOne
AddFacts adds the "facts" edges to the Fact entity.
func (*ScopeUpdateOne) ClearDeletedAt ¶
func (suo *ScopeUpdateOne) ClearDeletedAt() *ScopeUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ScopeUpdateOne) ClearFacts ¶
func (suo *ScopeUpdateOne) ClearFacts() *ScopeUpdateOne
ClearFacts clears all "facts" edges to the Fact entity.
func (*ScopeUpdateOne) Exec ¶
func (suo *ScopeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScopeUpdateOne) ExecX ¶
func (suo *ScopeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScopeUpdateOne) Mutation ¶
func (suo *ScopeUpdateOne) Mutation() *ScopeMutation
Mutation returns the ScopeMutation object of the builder.
func (*ScopeUpdateOne) RemoveFactIDs ¶
func (suo *ScopeUpdateOne) RemoveFactIDs(ids ...string) *ScopeUpdateOne
RemoveFactIDs removes the "facts" edge to Fact entities by IDs.
func (*ScopeUpdateOne) RemoveFacts ¶
func (suo *ScopeUpdateOne) RemoveFacts(f ...*Fact) *ScopeUpdateOne
RemoveFacts removes "facts" edges to Fact entities.
func (*ScopeUpdateOne) Save ¶
func (suo *ScopeUpdateOne) Save(ctx context.Context) (*Scope, error)
Save executes the query and returns the updated Scope entity.
func (*ScopeUpdateOne) SaveX ¶
func (suo *ScopeUpdateOne) SaveX(ctx context.Context) *Scope
SaveX is like Save, but panics if an error occurs.
func (*ScopeUpdateOne) Select ¶
func (suo *ScopeUpdateOne) Select(field string, fields ...string) *ScopeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScopeUpdateOne) SetCustomID ¶
func (suo *ScopeUpdateOne) SetCustomID(s string) *ScopeUpdateOne
SetCustomID sets the "custom_id" field.
func (*ScopeUpdateOne) SetDeletedAt ¶
func (suo *ScopeUpdateOne) SetDeletedAt(t time.Time) *ScopeUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*ScopeUpdateOne) SetDomain ¶
func (suo *ScopeUpdateOne) SetDomain(s string) *ScopeUpdateOne
SetDomain sets the "domain" field.
func (*ScopeUpdateOne) SetNillableCustomID ¶
func (suo *ScopeUpdateOne) SetNillableCustomID(s *string) *ScopeUpdateOne
SetNillableCustomID sets the "custom_id" field if the given value is not nil.
func (*ScopeUpdateOne) SetNillableDeletedAt ¶
func (suo *ScopeUpdateOne) SetNillableDeletedAt(t *time.Time) *ScopeUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ScopeUpdateOne) SetNillableDomain ¶
func (suo *ScopeUpdateOne) SetNillableDomain(s *string) *ScopeUpdateOne
SetNillableDomain sets the "domain" field if the given value is not nil.
func (*ScopeUpdateOne) SetNillableNonce ¶
func (suo *ScopeUpdateOne) SetNillableNonce(s *string) *ScopeUpdateOne
SetNillableNonce sets the "nonce" field if the given value is not nil.
func (*ScopeUpdateOne) SetNonce ¶
func (suo *ScopeUpdateOne) SetNonce(s string) *ScopeUpdateOne
SetNonce sets the "nonce" field.
func (*ScopeUpdateOne) Where ¶
func (suo *ScopeUpdateOne) Where(ps ...predicate.Scope) *ScopeUpdateOne
Where appends a list predicates to the ScopeUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // APIAudit is the client for interacting with the APIAudit builders. APIAudit *APIAuditClient // Fact is the client for interacting with the Fact builders. Fact *FactClient // Grant is the client for interacting with the Grant builders. Grant *GrantClient // Scope is the client for interacting with the Scope builders. Scope *ScopeClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field 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 ¶
- apiaudit.go
- apiaudit_create.go
- apiaudit_delete.go
- apiaudit_query.go
- apiaudit_update.go
- client.go
- ent.go
- entql.go
- fact.go
- fact_create.go
- fact_delete.go
- fact_query.go
- fact_update.go
- generate.go
- grant.go
- grant_create.go
- grant_delete.go
- grant_query.go
- grant_update.go
- mutation.go
- runtime.go
- scope.go
- scope_create.go
- scope_delete.go
- scope_query.go
- scope_update.go
- tx.go