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
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type AuditEvent
- type AuditEventClient
- func (c *AuditEventClient) Create() *AuditEventCreate
- func (c *AuditEventClient) CreateBulk(builders ...*AuditEventCreate) *AuditEventCreateBulk
- func (c *AuditEventClient) Delete() *AuditEventDelete
- func (c *AuditEventClient) DeleteOne(ae *AuditEvent) *AuditEventDeleteOne
- func (c *AuditEventClient) DeleteOneID(id int) *AuditEventDeleteOne
- func (c *AuditEventClient) Get(ctx context.Context, id int) (*AuditEvent, error)
- func (c *AuditEventClient) GetX(ctx context.Context, id int) *AuditEvent
- func (c *AuditEventClient) Hooks() []Hook
- func (c *AuditEventClient) Intercept(interceptors ...Interceptor)
- func (c *AuditEventClient) Interceptors() []Interceptor
- func (c *AuditEventClient) MapCreateBulk(slice any, setFunc func(*AuditEventCreate, int)) *AuditEventCreateBulk
- func (c *AuditEventClient) Query() *AuditEventQuery
- func (c *AuditEventClient) Update() *AuditEventUpdate
- func (c *AuditEventClient) UpdateOne(ae *AuditEvent) *AuditEventUpdateOne
- func (c *AuditEventClient) UpdateOneID(id int) *AuditEventUpdateOne
- func (c *AuditEventClient) Use(hooks ...Hook)
- type AuditEventConnection
- type AuditEventCreate
- func (aec *AuditEventCreate) Exec(ctx context.Context) error
- func (aec *AuditEventCreate) ExecX(ctx context.Context)
- func (aec *AuditEventCreate) Mutation() *AuditEventMutation
- func (aec *AuditEventCreate) Save(ctx context.Context) (*AuditEvent, error)
- func (aec *AuditEventCreate) SaveX(ctx context.Context) *AuditEvent
- func (aec *AuditEventCreate) SetApiGroup(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetApiVersion(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetAuditID(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetLevel(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetName(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetNamespace(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetNillableApiGroup(s *string) *AuditEventCreate
- func (aec *AuditEventCreate) SetNillableApiVersion(s *string) *AuditEventCreate
- func (aec *AuditEventCreate) SetNillableName(s *string) *AuditEventCreate
- func (aec *AuditEventCreate) SetNillableNamespace(s *string) *AuditEventCreate
- func (aec *AuditEventCreate) SetNillableResource(s *string) *AuditEventCreate
- func (aec *AuditEventCreate) SetNillableSubResource(s *string) *AuditEventCreate
- func (aec *AuditEventCreate) SetRaw(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetRequestTimestamp(t time.Time) *AuditEventCreate
- func (aec *AuditEventCreate) SetResource(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetStage(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetStageTimestamp(t time.Time) *AuditEventCreate
- func (aec *AuditEventCreate) SetSubResource(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetUserAgent(s string) *AuditEventCreate
- func (aec *AuditEventCreate) SetVerb(s string) *AuditEventCreate
- type AuditEventCreateBulk
- type AuditEventDelete
- type AuditEventDeleteOne
- type AuditEventEdge
- type AuditEventGroupBy
- func (aegb *AuditEventGroupBy) Aggregate(fns ...AggregateFunc) *AuditEventGroupBy
- func (s *AuditEventGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuditEventGroupBy) BoolX(ctx context.Context) bool
- func (s *AuditEventGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AuditEventGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AuditEventGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuditEventGroupBy) Float64X(ctx context.Context) float64
- func (s *AuditEventGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuditEventGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AuditEventGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AuditEventGroupBy) IntX(ctx context.Context) int
- func (s *AuditEventGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AuditEventGroupBy) IntsX(ctx context.Context) []int
- func (aegb *AuditEventGroupBy) Scan(ctx context.Context, v any) error
- func (s *AuditEventGroupBy) ScanX(ctx context.Context, v any)
- func (s *AuditEventGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AuditEventGroupBy) StringX(ctx context.Context) string
- func (s *AuditEventGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AuditEventGroupBy) StringsX(ctx context.Context) []string
- type AuditEventMutation
- func (m *AuditEventMutation) AddField(name string, value ent.Value) error
- func (m *AuditEventMutation) AddedEdges() []string
- func (m *AuditEventMutation) AddedField(name string) (ent.Value, bool)
- func (m *AuditEventMutation) AddedFields() []string
- func (m *AuditEventMutation) AddedIDs(name string) []ent.Value
- func (m *AuditEventMutation) ApiGroup() (r string, exists bool)
- func (m *AuditEventMutation) ApiVersion() (r string, exists bool)
- func (m *AuditEventMutation) AuditID() (r string, exists bool)
- func (m *AuditEventMutation) ClearEdge(name string) error
- func (m *AuditEventMutation) ClearField(name string) error
- func (m *AuditEventMutation) ClearedEdges() []string
- func (m *AuditEventMutation) ClearedFields() []string
- func (m AuditEventMutation) Client() *Client
- func (m *AuditEventMutation) EdgeCleared(name string) bool
- func (m *AuditEventMutation) Field(name string) (ent.Value, bool)
- func (m *AuditEventMutation) FieldCleared(name string) bool
- func (m *AuditEventMutation) Fields() []string
- func (m *AuditEventMutation) ID() (id int, exists bool)
- func (m *AuditEventMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AuditEventMutation) Level() (r string, exists bool)
- func (m *AuditEventMutation) Name() (r string, exists bool)
- func (m *AuditEventMutation) Namespace() (r string, exists bool)
- func (m *AuditEventMutation) OldApiGroup(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldApiVersion(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldAuditID(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AuditEventMutation) OldLevel(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldNamespace(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldRaw(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldRequestTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *AuditEventMutation) OldResource(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldStage(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldStageTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *AuditEventMutation) OldSubResource(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldUserAgent(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) OldVerb(ctx context.Context) (v string, err error)
- func (m *AuditEventMutation) Op() Op
- func (m *AuditEventMutation) Raw() (r string, exists bool)
- func (m *AuditEventMutation) RemovedEdges() []string
- func (m *AuditEventMutation) RemovedIDs(name string) []ent.Value
- func (m *AuditEventMutation) RequestTimestamp() (r time.Time, exists bool)
- func (m *AuditEventMutation) ResetApiGroup()
- func (m *AuditEventMutation) ResetApiVersion()
- func (m *AuditEventMutation) ResetAuditID()
- func (m *AuditEventMutation) ResetEdge(name string) error
- func (m *AuditEventMutation) ResetField(name string) error
- func (m *AuditEventMutation) ResetLevel()
- func (m *AuditEventMutation) ResetName()
- func (m *AuditEventMutation) ResetNamespace()
- func (m *AuditEventMutation) ResetRaw()
- func (m *AuditEventMutation) ResetRequestTimestamp()
- func (m *AuditEventMutation) ResetResource()
- func (m *AuditEventMutation) ResetStage()
- func (m *AuditEventMutation) ResetStageTimestamp()
- func (m *AuditEventMutation) ResetSubResource()
- func (m *AuditEventMutation) ResetUserAgent()
- func (m *AuditEventMutation) ResetVerb()
- func (m *AuditEventMutation) Resource() (r string, exists bool)
- func (m *AuditEventMutation) SetApiGroup(s string)
- func (m *AuditEventMutation) SetApiVersion(s string)
- func (m *AuditEventMutation) SetAuditID(s string)
- func (m *AuditEventMutation) SetField(name string, value ent.Value) error
- func (m *AuditEventMutation) SetLevel(s string)
- func (m *AuditEventMutation) SetName(s string)
- func (m *AuditEventMutation) SetNamespace(s string)
- func (m *AuditEventMutation) SetOp(op Op)
- func (m *AuditEventMutation) SetRaw(s string)
- func (m *AuditEventMutation) SetRequestTimestamp(t time.Time)
- func (m *AuditEventMutation) SetResource(s string)
- func (m *AuditEventMutation) SetStage(s string)
- func (m *AuditEventMutation) SetStageTimestamp(t time.Time)
- func (m *AuditEventMutation) SetSubResource(s string)
- func (m *AuditEventMutation) SetUserAgent(s string)
- func (m *AuditEventMutation) SetVerb(s string)
- func (m *AuditEventMutation) Stage() (r string, exists bool)
- func (m *AuditEventMutation) StageTimestamp() (r time.Time, exists bool)
- func (m *AuditEventMutation) SubResource() (r string, exists bool)
- func (m AuditEventMutation) Tx() (*Tx, error)
- func (m *AuditEventMutation) Type() string
- func (m *AuditEventMutation) UserAgent() (r string, exists bool)
- func (m *AuditEventMutation) Verb() (r string, exists bool)
- func (m *AuditEventMutation) Where(ps ...predicate.AuditEvent)
- func (m *AuditEventMutation) WhereP(ps ...func(*sql.Selector))
- type AuditEventOrder
- type AuditEventOrderField
- type AuditEventPaginateOption
- type AuditEventQuery
- func (aeq *AuditEventQuery) Aggregate(fns ...AggregateFunc) *AuditEventSelect
- func (aeq *AuditEventQuery) All(ctx context.Context) ([]*AuditEvent, error)
- func (aeq *AuditEventQuery) AllX(ctx context.Context) []*AuditEvent
- func (aeq *AuditEventQuery) Clone() *AuditEventQuery
- func (ae *AuditEventQuery) CollectFields(ctx context.Context, satisfies ...string) (*AuditEventQuery, error)
- func (aeq *AuditEventQuery) Count(ctx context.Context) (int, error)
- func (aeq *AuditEventQuery) CountX(ctx context.Context) int
- func (aeq *AuditEventQuery) Exist(ctx context.Context) (bool, error)
- func (aeq *AuditEventQuery) ExistX(ctx context.Context) bool
- func (aeq *AuditEventQuery) First(ctx context.Context) (*AuditEvent, error)
- func (aeq *AuditEventQuery) FirstID(ctx context.Context) (id int, err error)
- func (aeq *AuditEventQuery) FirstIDX(ctx context.Context) int
- func (aeq *AuditEventQuery) FirstX(ctx context.Context) *AuditEvent
- func (aeq *AuditEventQuery) GroupBy(field string, fields ...string) *AuditEventGroupBy
- func (aeq *AuditEventQuery) IDs(ctx context.Context) (ids []int, err error)
- func (aeq *AuditEventQuery) IDsX(ctx context.Context) []int
- func (aeq *AuditEventQuery) Limit(limit int) *AuditEventQuery
- func (aeq *AuditEventQuery) Offset(offset int) *AuditEventQuery
- func (aeq *AuditEventQuery) Only(ctx context.Context) (*AuditEvent, error)
- func (aeq *AuditEventQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aeq *AuditEventQuery) OnlyIDX(ctx context.Context) int
- func (aeq *AuditEventQuery) OnlyX(ctx context.Context) *AuditEvent
- func (aeq *AuditEventQuery) Order(o ...auditevent.OrderOption) *AuditEventQuery
- func (ae *AuditEventQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*AuditEventConnection, error)
- func (aeq *AuditEventQuery) Select(fields ...string) *AuditEventSelect
- func (aeq *AuditEventQuery) Unique(unique bool) *AuditEventQuery
- func (aeq *AuditEventQuery) Where(ps ...predicate.AuditEvent) *AuditEventQuery
- type AuditEventSelect
- func (aes *AuditEventSelect) Aggregate(fns ...AggregateFunc) *AuditEventSelect
- func (s *AuditEventSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuditEventSelect) BoolX(ctx context.Context) bool
- func (s *AuditEventSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AuditEventSelect) BoolsX(ctx context.Context) []bool
- func (s *AuditEventSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuditEventSelect) Float64X(ctx context.Context) float64
- func (s *AuditEventSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuditEventSelect) Float64sX(ctx context.Context) []float64
- func (s *AuditEventSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AuditEventSelect) IntX(ctx context.Context) int
- func (s *AuditEventSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AuditEventSelect) IntsX(ctx context.Context) []int
- func (aes *AuditEventSelect) Scan(ctx context.Context, v any) error
- func (s *AuditEventSelect) ScanX(ctx context.Context, v any)
- func (s *AuditEventSelect) String(ctx context.Context) (_ string, err error)
- func (s *AuditEventSelect) StringX(ctx context.Context) string
- func (s *AuditEventSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AuditEventSelect) StringsX(ctx context.Context) []string
- type AuditEventUpdate
- func (aeu *AuditEventUpdate) Exec(ctx context.Context) error
- func (aeu *AuditEventUpdate) ExecX(ctx context.Context)
- func (aeu *AuditEventUpdate) Mutation() *AuditEventMutation
- func (aeu *AuditEventUpdate) Save(ctx context.Context) (int, error)
- func (aeu *AuditEventUpdate) SaveX(ctx context.Context) int
- func (aeu *AuditEventUpdate) Where(ps ...predicate.AuditEvent) *AuditEventUpdate
- type AuditEventUpdateOne
- func (aeuo *AuditEventUpdateOne) Exec(ctx context.Context) error
- func (aeuo *AuditEventUpdateOne) ExecX(ctx context.Context)
- func (aeuo *AuditEventUpdateOne) Mutation() *AuditEventMutation
- func (aeuo *AuditEventUpdateOne) Save(ctx context.Context) (*AuditEvent, error)
- func (aeuo *AuditEventUpdateOne) SaveX(ctx context.Context) *AuditEvent
- func (aeuo *AuditEventUpdateOne) Select(field string, fields ...string) *AuditEventUpdateOne
- func (aeuo *AuditEventUpdateOne) Where(ps ...predicate.AuditEvent) *AuditEventUpdateOne
- type AuditEventWhereInput
- type AuditEvents
- 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) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, 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 Cursor
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type ResourceKind
- func (*ResourceKind) IsNode()
- func (rk *ResourceKind) String() string
- func (rk *ResourceKind) ToEdge(order *ResourceKindOrder) *ResourceKindEdge
- func (rk *ResourceKind) Unwrap() *ResourceKind
- func (rk *ResourceKind) Update() *ResourceKindUpdateOne
- func (rk *ResourceKind) Value(name string) (ent.Value, error)
- type ResourceKindClient
- func (c *ResourceKindClient) Create() *ResourceKindCreate
- func (c *ResourceKindClient) CreateBulk(builders ...*ResourceKindCreate) *ResourceKindCreateBulk
- func (c *ResourceKindClient) Delete() *ResourceKindDelete
- func (c *ResourceKindClient) DeleteOne(rk *ResourceKind) *ResourceKindDeleteOne
- func (c *ResourceKindClient) DeleteOneID(id int) *ResourceKindDeleteOne
- func (c *ResourceKindClient) Get(ctx context.Context, id int) (*ResourceKind, error)
- func (c *ResourceKindClient) GetX(ctx context.Context, id int) *ResourceKind
- func (c *ResourceKindClient) Hooks() []Hook
- func (c *ResourceKindClient) Intercept(interceptors ...Interceptor)
- func (c *ResourceKindClient) Interceptors() []Interceptor
- func (c *ResourceKindClient) MapCreateBulk(slice any, setFunc func(*ResourceKindCreate, int)) *ResourceKindCreateBulk
- func (c *ResourceKindClient) Query() *ResourceKindQuery
- func (c *ResourceKindClient) Update() *ResourceKindUpdate
- func (c *ResourceKindClient) UpdateOne(rk *ResourceKind) *ResourceKindUpdateOne
- func (c *ResourceKindClient) UpdateOneID(id int) *ResourceKindUpdateOne
- func (c *ResourceKindClient) Use(hooks ...Hook)
- type ResourceKindConnection
- type ResourceKindCreate
- func (rkc *ResourceKindCreate) Exec(ctx context.Context) error
- func (rkc *ResourceKindCreate) ExecX(ctx context.Context)
- func (rkc *ResourceKindCreate) Mutation() *ResourceKindMutation
- func (rkc *ResourceKindCreate) Save(ctx context.Context) (*ResourceKind, error)
- func (rkc *ResourceKindCreate) SaveX(ctx context.Context) *ResourceKind
- func (rkc *ResourceKindCreate) SetApiVersion(s string) *ResourceKindCreate
- func (rkc *ResourceKindCreate) SetKind(s string) *ResourceKindCreate
- func (rkc *ResourceKindCreate) SetName(s string) *ResourceKindCreate
- func (rkc *ResourceKindCreate) SetNamespaced(b bool) *ResourceKindCreate
- func (rkc *ResourceKindCreate) SetNillableNamespaced(b *bool) *ResourceKindCreate
- type ResourceKindCreateBulk
- type ResourceKindDelete
- type ResourceKindDeleteOne
- type ResourceKindEdge
- type ResourceKindGroupBy
- func (rkgb *ResourceKindGroupBy) Aggregate(fns ...AggregateFunc) *ResourceKindGroupBy
- func (s *ResourceKindGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ResourceKindGroupBy) BoolX(ctx context.Context) bool
- func (s *ResourceKindGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ResourceKindGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ResourceKindGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ResourceKindGroupBy) Float64X(ctx context.Context) float64
- func (s *ResourceKindGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ResourceKindGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ResourceKindGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ResourceKindGroupBy) IntX(ctx context.Context) int
- func (s *ResourceKindGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ResourceKindGroupBy) IntsX(ctx context.Context) []int
- func (rkgb *ResourceKindGroupBy) Scan(ctx context.Context, v any) error
- func (s *ResourceKindGroupBy) ScanX(ctx context.Context, v any)
- func (s *ResourceKindGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ResourceKindGroupBy) StringX(ctx context.Context) string
- func (s *ResourceKindGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ResourceKindGroupBy) StringsX(ctx context.Context) []string
- type ResourceKindMutation
- func (m *ResourceKindMutation) AddField(name string, value ent.Value) error
- func (m *ResourceKindMutation) AddedEdges() []string
- func (m *ResourceKindMutation) AddedField(name string) (ent.Value, bool)
- func (m *ResourceKindMutation) AddedFields() []string
- func (m *ResourceKindMutation) AddedIDs(name string) []ent.Value
- func (m *ResourceKindMutation) ApiVersion() (r string, exists bool)
- func (m *ResourceKindMutation) ClearEdge(name string) error
- func (m *ResourceKindMutation) ClearField(name string) error
- func (m *ResourceKindMutation) ClearedEdges() []string
- func (m *ResourceKindMutation) ClearedFields() []string
- func (m ResourceKindMutation) Client() *Client
- func (m *ResourceKindMutation) EdgeCleared(name string) bool
- func (m *ResourceKindMutation) Field(name string) (ent.Value, bool)
- func (m *ResourceKindMutation) FieldCleared(name string) bool
- func (m *ResourceKindMutation) Fields() []string
- func (m *ResourceKindMutation) ID() (id int, exists bool)
- func (m *ResourceKindMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ResourceKindMutation) Kind() (r string, exists bool)
- func (m *ResourceKindMutation) Name() (r string, exists bool)
- func (m *ResourceKindMutation) Namespaced() (r bool, exists bool)
- func (m *ResourceKindMutation) OldApiVersion(ctx context.Context) (v string, err error)
- func (m *ResourceKindMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ResourceKindMutation) OldKind(ctx context.Context) (v string, err error)
- func (m *ResourceKindMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ResourceKindMutation) OldNamespaced(ctx context.Context) (v bool, err error)
- func (m *ResourceKindMutation) Op() Op
- func (m *ResourceKindMutation) RemovedEdges() []string
- func (m *ResourceKindMutation) RemovedIDs(name string) []ent.Value
- func (m *ResourceKindMutation) ResetApiVersion()
- func (m *ResourceKindMutation) ResetEdge(name string) error
- func (m *ResourceKindMutation) ResetField(name string) error
- func (m *ResourceKindMutation) ResetKind()
- func (m *ResourceKindMutation) ResetName()
- func (m *ResourceKindMutation) ResetNamespaced()
- func (m *ResourceKindMutation) SetApiVersion(s string)
- func (m *ResourceKindMutation) SetField(name string, value ent.Value) error
- func (m *ResourceKindMutation) SetKind(s string)
- func (m *ResourceKindMutation) SetName(s string)
- func (m *ResourceKindMutation) SetNamespaced(b bool)
- func (m *ResourceKindMutation) SetOp(op Op)
- func (m ResourceKindMutation) Tx() (*Tx, error)
- func (m *ResourceKindMutation) Type() string
- func (m *ResourceKindMutation) Where(ps ...predicate.ResourceKind)
- func (m *ResourceKindMutation) WhereP(ps ...func(*sql.Selector))
- type ResourceKindOrder
- type ResourceKindOrderField
- type ResourceKindPaginateOption
- type ResourceKindQuery
- func (rkq *ResourceKindQuery) Aggregate(fns ...AggregateFunc) *ResourceKindSelect
- func (rkq *ResourceKindQuery) All(ctx context.Context) ([]*ResourceKind, error)
- func (rkq *ResourceKindQuery) AllX(ctx context.Context) []*ResourceKind
- func (rkq *ResourceKindQuery) Clone() *ResourceKindQuery
- func (rk *ResourceKindQuery) CollectFields(ctx context.Context, satisfies ...string) (*ResourceKindQuery, error)
- func (rkq *ResourceKindQuery) Count(ctx context.Context) (int, error)
- func (rkq *ResourceKindQuery) CountX(ctx context.Context) int
- func (rkq *ResourceKindQuery) Exist(ctx context.Context) (bool, error)
- func (rkq *ResourceKindQuery) ExistX(ctx context.Context) bool
- func (rkq *ResourceKindQuery) First(ctx context.Context) (*ResourceKind, error)
- func (rkq *ResourceKindQuery) FirstID(ctx context.Context) (id int, err error)
- func (rkq *ResourceKindQuery) FirstIDX(ctx context.Context) int
- func (rkq *ResourceKindQuery) FirstX(ctx context.Context) *ResourceKind
- func (rkq *ResourceKindQuery) GroupBy(field string, fields ...string) *ResourceKindGroupBy
- func (rkq *ResourceKindQuery) IDs(ctx context.Context) (ids []int, err error)
- func (rkq *ResourceKindQuery) IDsX(ctx context.Context) []int
- func (rkq *ResourceKindQuery) Limit(limit int) *ResourceKindQuery
- func (rkq *ResourceKindQuery) Offset(offset int) *ResourceKindQuery
- func (rkq *ResourceKindQuery) Only(ctx context.Context) (*ResourceKind, error)
- func (rkq *ResourceKindQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rkq *ResourceKindQuery) OnlyIDX(ctx context.Context) int
- func (rkq *ResourceKindQuery) OnlyX(ctx context.Context) *ResourceKind
- func (rkq *ResourceKindQuery) Order(o ...resourcekind.OrderOption) *ResourceKindQuery
- func (rk *ResourceKindQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*ResourceKindConnection, error)
- func (rkq *ResourceKindQuery) Select(fields ...string) *ResourceKindSelect
- func (rkq *ResourceKindQuery) Unique(unique bool) *ResourceKindQuery
- func (rkq *ResourceKindQuery) Where(ps ...predicate.ResourceKind) *ResourceKindQuery
- type ResourceKindSelect
- func (rks *ResourceKindSelect) Aggregate(fns ...AggregateFunc) *ResourceKindSelect
- func (s *ResourceKindSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ResourceKindSelect) BoolX(ctx context.Context) bool
- func (s *ResourceKindSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ResourceKindSelect) BoolsX(ctx context.Context) []bool
- func (s *ResourceKindSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ResourceKindSelect) Float64X(ctx context.Context) float64
- func (s *ResourceKindSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ResourceKindSelect) Float64sX(ctx context.Context) []float64
- func (s *ResourceKindSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ResourceKindSelect) IntX(ctx context.Context) int
- func (s *ResourceKindSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ResourceKindSelect) IntsX(ctx context.Context) []int
- func (rks *ResourceKindSelect) Scan(ctx context.Context, v any) error
- func (s *ResourceKindSelect) ScanX(ctx context.Context, v any)
- func (s *ResourceKindSelect) String(ctx context.Context) (_ string, err error)
- func (s *ResourceKindSelect) StringX(ctx context.Context) string
- func (s *ResourceKindSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ResourceKindSelect) StringsX(ctx context.Context) []string
- type ResourceKindUpdate
- func (rku *ResourceKindUpdate) Exec(ctx context.Context) error
- func (rku *ResourceKindUpdate) ExecX(ctx context.Context)
- func (rku *ResourceKindUpdate) Mutation() *ResourceKindMutation
- func (rku *ResourceKindUpdate) Save(ctx context.Context) (int, error)
- func (rku *ResourceKindUpdate) SaveX(ctx context.Context) int
- func (rku *ResourceKindUpdate) SetApiVersion(s string) *ResourceKindUpdate
- func (rku *ResourceKindUpdate) SetKind(s string) *ResourceKindUpdate
- func (rku *ResourceKindUpdate) SetName(s string) *ResourceKindUpdate
- func (rku *ResourceKindUpdate) SetNamespaced(b bool) *ResourceKindUpdate
- func (rku *ResourceKindUpdate) SetNillableApiVersion(s *string) *ResourceKindUpdate
- func (rku *ResourceKindUpdate) SetNillableKind(s *string) *ResourceKindUpdate
- func (rku *ResourceKindUpdate) SetNillableName(s *string) *ResourceKindUpdate
- func (rku *ResourceKindUpdate) SetNillableNamespaced(b *bool) *ResourceKindUpdate
- func (rku *ResourceKindUpdate) Where(ps ...predicate.ResourceKind) *ResourceKindUpdate
- type ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) Exec(ctx context.Context) error
- func (rkuo *ResourceKindUpdateOne) ExecX(ctx context.Context)
- func (rkuo *ResourceKindUpdateOne) Mutation() *ResourceKindMutation
- func (rkuo *ResourceKindUpdateOne) Save(ctx context.Context) (*ResourceKind, error)
- func (rkuo *ResourceKindUpdateOne) SaveX(ctx context.Context) *ResourceKind
- func (rkuo *ResourceKindUpdateOne) Select(field string, fields ...string) *ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) SetApiVersion(s string) *ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) SetKind(s string) *ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) SetName(s string) *ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) SetNamespaced(b bool) *ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) SetNillableApiVersion(s *string) *ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) SetNillableKind(s *string) *ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) SetNillableName(s *string) *ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) SetNillableNamespaced(b *bool) *ResourceKindUpdateOne
- func (rkuo *ResourceKindUpdateOne) Where(ps ...predicate.ResourceKind) *ResourceKindUpdateOne
- type ResourceKindWhereInput
- type ResourceKinds
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
- type View
- type ViewClient
- func (c *ViewClient) Create() *ViewCreate
- func (c *ViewClient) CreateBulk(builders ...*ViewCreate) *ViewCreateBulk
- func (c *ViewClient) Delete() *ViewDelete
- func (c *ViewClient) DeleteOne(v *View) *ViewDeleteOne
- func (c *ViewClient) DeleteOneID(id int) *ViewDeleteOne
- func (c *ViewClient) Get(ctx context.Context, id int) (*View, error)
- func (c *ViewClient) GetX(ctx context.Context, id int) *View
- func (c *ViewClient) Hooks() []Hook
- func (c *ViewClient) Intercept(interceptors ...Interceptor)
- func (c *ViewClient) Interceptors() []Interceptor
- func (c *ViewClient) MapCreateBulk(slice any, setFunc func(*ViewCreate, int)) *ViewCreateBulk
- func (c *ViewClient) Query() *ViewQuery
- func (c *ViewClient) Update() *ViewUpdate
- func (c *ViewClient) UpdateOne(v *View) *ViewUpdateOne
- func (c *ViewClient) UpdateOneID(id int) *ViewUpdateOne
- func (c *ViewClient) Use(hooks ...Hook)
- type ViewConnection
- type ViewCreate
- type ViewCreateBulk
- type ViewDelete
- type ViewDeleteOne
- type ViewEdge
- type ViewGroupBy
- func (vgb *ViewGroupBy) Aggregate(fns ...AggregateFunc) *ViewGroupBy
- func (s *ViewGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ViewGroupBy) BoolX(ctx context.Context) bool
- func (s *ViewGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ViewGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ViewGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ViewGroupBy) Float64X(ctx context.Context) float64
- func (s *ViewGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ViewGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ViewGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ViewGroupBy) IntX(ctx context.Context) int
- func (s *ViewGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ViewGroupBy) IntsX(ctx context.Context) []int
- func (vgb *ViewGroupBy) Scan(ctx context.Context, v any) error
- func (s *ViewGroupBy) ScanX(ctx context.Context, v any)
- func (s *ViewGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ViewGroupBy) StringX(ctx context.Context) string
- func (s *ViewGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ViewGroupBy) StringsX(ctx context.Context) []string
- type ViewMutation
- func (m *ViewMutation) AddField(name string, value ent.Value) error
- func (m *ViewMutation) AddedEdges() []string
- func (m *ViewMutation) AddedField(name string) (ent.Value, bool)
- func (m *ViewMutation) AddedFields() []string
- func (m *ViewMutation) AddedIDs(name string) []ent.Value
- func (m *ViewMutation) ClearEdge(name string) error
- func (m *ViewMutation) ClearField(name string) error
- func (m *ViewMutation) ClearedEdges() []string
- func (m *ViewMutation) ClearedFields() []string
- func (m ViewMutation) Client() *Client
- func (m *ViewMutation) EdgeCleared(name string) bool
- func (m *ViewMutation) Field(name string) (ent.Value, bool)
- func (m *ViewMutation) FieldCleared(name string) bool
- func (m *ViewMutation) Fields() []string
- func (m *ViewMutation) ID() (id int, exists bool)
- func (m *ViewMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ViewMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ViewMutation) Op() Op
- func (m *ViewMutation) RemovedEdges() []string
- func (m *ViewMutation) RemovedIDs(name string) []ent.Value
- func (m *ViewMutation) ResetEdge(name string) error
- func (m *ViewMutation) ResetField(name string) error
- func (m *ViewMutation) SetField(name string, value ent.Value) error
- func (m *ViewMutation) SetOp(op Op)
- func (m ViewMutation) Tx() (*Tx, error)
- func (m *ViewMutation) Type() string
- func (m *ViewMutation) Where(ps ...predicate.View)
- func (m *ViewMutation) WhereP(ps ...func(*sql.Selector))
- type ViewOrder
- type ViewOrderField
- type ViewPaginateOption
- type ViewQuery
- func (vq *ViewQuery) Aggregate(fns ...AggregateFunc) *ViewSelect
- func (vq *ViewQuery) All(ctx context.Context) ([]*View, error)
- func (vq *ViewQuery) AllX(ctx context.Context) []*View
- func (vq *ViewQuery) Clone() *ViewQuery
- func (v *ViewQuery) CollectFields(ctx context.Context, satisfies ...string) (*ViewQuery, error)
- func (vq *ViewQuery) Count(ctx context.Context) (int, error)
- func (vq *ViewQuery) CountX(ctx context.Context) int
- func (vq *ViewQuery) Exist(ctx context.Context) (bool, error)
- func (vq *ViewQuery) ExistX(ctx context.Context) bool
- func (vq *ViewQuery) First(ctx context.Context) (*View, error)
- func (vq *ViewQuery) FirstID(ctx context.Context) (id int, err error)
- func (vq *ViewQuery) FirstIDX(ctx context.Context) int
- func (vq *ViewQuery) FirstX(ctx context.Context) *View
- func (vq *ViewQuery) GroupBy(field string, fields ...string) *ViewGroupBy
- func (vq *ViewQuery) IDs(ctx context.Context) (ids []int, err error)
- func (vq *ViewQuery) IDsX(ctx context.Context) []int
- func (vq *ViewQuery) Limit(limit int) *ViewQuery
- func (vq *ViewQuery) Offset(offset int) *ViewQuery
- func (vq *ViewQuery) Only(ctx context.Context) (*View, error)
- func (vq *ViewQuery) OnlyID(ctx context.Context) (id int, err error)
- func (vq *ViewQuery) OnlyIDX(ctx context.Context) int
- func (vq *ViewQuery) OnlyX(ctx context.Context) *View
- func (vq *ViewQuery) Order(o ...view.OrderOption) *ViewQuery
- func (v *ViewQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*ViewConnection, error)
- func (vq *ViewQuery) Select(fields ...string) *ViewSelect
- func (vq *ViewQuery) Unique(unique bool) *ViewQuery
- func (vq *ViewQuery) Where(ps ...predicate.View) *ViewQuery
- type ViewSelect
- func (vs *ViewSelect) Aggregate(fns ...AggregateFunc) *ViewSelect
- func (s *ViewSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ViewSelect) BoolX(ctx context.Context) bool
- func (s *ViewSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ViewSelect) BoolsX(ctx context.Context) []bool
- func (s *ViewSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ViewSelect) Float64X(ctx context.Context) float64
- func (s *ViewSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ViewSelect) Float64sX(ctx context.Context) []float64
- func (s *ViewSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ViewSelect) IntX(ctx context.Context) int
- func (s *ViewSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ViewSelect) IntsX(ctx context.Context) []int
- func (vs *ViewSelect) Scan(ctx context.Context, v any) error
- func (s *ViewSelect) ScanX(ctx context.Context, v any)
- func (s *ViewSelect) String(ctx context.Context) (_ string, err error)
- func (s *ViewSelect) StringX(ctx context.Context) string
- func (s *ViewSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ViewSelect) StringsX(ctx context.Context) []string
- type ViewUpdate
- func (vu *ViewUpdate) Exec(ctx context.Context) error
- func (vu *ViewUpdate) ExecX(ctx context.Context)
- func (vu *ViewUpdate) Mutation() *ViewMutation
- func (vu *ViewUpdate) Save(ctx context.Context) (int, error)
- func (vu *ViewUpdate) SaveX(ctx context.Context) int
- func (vu *ViewUpdate) Where(ps ...predicate.View) *ViewUpdate
- type ViewUpdateOne
- func (vuo *ViewUpdateOne) Exec(ctx context.Context) error
- func (vuo *ViewUpdateOne) ExecX(ctx context.Context)
- func (vuo *ViewUpdateOne) Mutation() *ViewMutation
- func (vuo *ViewUpdateOne) Save(ctx context.Context) (*View, error)
- func (vuo *ViewUpdateOne) SaveX(ctx context.Context) *View
- func (vuo *ViewUpdateOne) Select(field string, fields ...string) *ViewUpdateOne
- func (vuo *ViewUpdateOne) Where(ps ...predicate.View) *ViewUpdateOne
- type ViewWhereInput
- type Views
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAuditEvent = "AuditEvent" TypeResourceKind = "ResourceKind" TypeView = "View" )
Variables ¶
var ( // AuditEventOrderFieldRequestTimestamp orders AuditEvent by requestTimestamp. AuditEventOrderFieldRequestTimestamp = &AuditEventOrderField{ Value: func(ae *AuditEvent) (ent.Value, error) { return ae.RequestTimestamp, nil }, column: auditevent.FieldRequestTimestamp, toTerm: auditevent.ByRequestTimestamp, toCursor: func(ae *AuditEvent) Cursor { return Cursor{ ID: ae.ID, Value: ae.RequestTimestamp, } }, } // AuditEventOrderFieldStageTimestamp orders AuditEvent by stageTimestamp. AuditEventOrderFieldStageTimestamp = &AuditEventOrderField{ Value: func(ae *AuditEvent) (ent.Value, error) { return ae.StageTimestamp, nil }, column: auditevent.FieldStageTimestamp, toTerm: auditevent.ByStageTimestamp, toCursor: func(ae *AuditEvent) Cursor { return Cursor{ ID: ae.ID, Value: ae.StageTimestamp, } }, } )
var DefaultAuditEventOrder = &AuditEventOrder{ Direction: entgql.OrderDirectionAsc, Field: &AuditEventOrderField{ Value: func(ae *AuditEvent) (ent.Value, error) { return ae.ID, nil }, column: auditevent.FieldID, toTerm: auditevent.ByID, toCursor: func(ae *AuditEvent) Cursor { return Cursor{ID: ae.ID} }, }, }
DefaultAuditEventOrder is the default ordering of AuditEvent.
var DefaultResourceKindOrder = &ResourceKindOrder{ Direction: entgql.OrderDirectionAsc, Field: &ResourceKindOrderField{ Value: func(rk *ResourceKind) (ent.Value, error) { return rk.ID, nil }, column: resourcekind.FieldID, toTerm: resourcekind.ByID, toCursor: func(rk *ResourceKind) Cursor { return Cursor{ID: rk.ID} }, }, }
DefaultResourceKindOrder is the default ordering of ResourceKind.
var DefaultViewOrder = &ViewOrder{ Direction: entgql.OrderDirectionAsc, Field: &ViewOrderField{ Value: func(v *View) (ent.Value, error) { return v.ID, nil }, column: view.FieldID, toTerm: view.ByID, toCursor: func(v *View) Cursor { return Cursor{ID: v.ID} }, }, }
DefaultViewOrder is the default ordering of View.
var ErrEmptyAuditEventWhereInput = errors.New("ent: empty predicate AuditEventWhereInput")
ErrEmptyAuditEventWhereInput is returned in case the AuditEventWhereInput is empty.
var ErrEmptyResourceKindWhereInput = errors.New("ent: empty predicate ResourceKindWhereInput")
ErrEmptyResourceKindWhereInput is returned in case the ResourceKindWhereInput is empty.
var ErrEmptyViewWhereInput = errors.New("ent: empty predicate ViewWhereInput")
ErrEmptyViewWhereInput is returned in case the ViewWhereInput is empty.
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.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type AuditEvent ¶
type AuditEvent struct { // ID of the ent. ID int `json:"id,omitempty"` // Raw holds the value of the "raw" field. Raw string `json:"raw,omitempty"` // Level holds the value of the "level" field. Level string `json:"level,omitempty"` // AuditID holds the value of the "auditID" field. AuditID string `json:"auditID,omitempty"` // Verb holds the value of the "verb" field. Verb string `json:"verb,omitempty"` // UserAgent holds the value of the "userAgent" field. UserAgent string `json:"userAgent,omitempty"` // RequestTimestamp holds the value of the "requestTimestamp" field. RequestTimestamp time.Time `json:"requestTimestamp,omitempty"` // StageTimestamp holds the value of the "stageTimestamp" field. StageTimestamp time.Time `json:"stageTimestamp,omitempty"` // Namespace holds the value of the "namespace" field. Namespace string `json:"namespace,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // ApiVersion holds the value of the "apiVersion" field. ApiVersion string `json:"apiVersion,omitempty"` // ApiGroup holds the value of the "apiGroup" field. ApiGroup string `json:"apiGroup,omitempty"` // Resource holds the value of the "resource" field. Resource string `json:"resource,omitempty"` // SubResource holds the value of the "subResource" field. SubResource string `json:"subResource,omitempty"` // Stage holds the value of the "stage" field. Stage string `json:"stage,omitempty"` // contains filtered or unexported fields }
AuditEvent is the model entity for the AuditEvent schema.
func (*AuditEvent) IsNode ¶
func (*AuditEvent) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*AuditEvent) String ¶
func (ae *AuditEvent) String() string
String implements the fmt.Stringer.
func (*AuditEvent) ToEdge ¶
func (ae *AuditEvent) ToEdge(order *AuditEventOrder) *AuditEventEdge
ToEdge converts AuditEvent into AuditEventEdge.
func (*AuditEvent) Unwrap ¶
func (ae *AuditEvent) Unwrap() *AuditEvent
Unwrap unwraps the AuditEvent 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 (*AuditEvent) Update ¶
func (ae *AuditEvent) Update() *AuditEventUpdateOne
Update returns a builder for updating this AuditEvent. Note that you need to call AuditEvent.Unwrap() before calling this method if this AuditEvent was returned from a transaction, and the transaction was committed or rolled back.
type AuditEventClient ¶
type AuditEventClient struct {
// contains filtered or unexported fields
}
AuditEventClient is a client for the AuditEvent schema.
func NewAuditEventClient ¶
func NewAuditEventClient(c config) *AuditEventClient
NewAuditEventClient returns a client for the AuditEvent from the given config.
func (*AuditEventClient) Create ¶
func (c *AuditEventClient) Create() *AuditEventCreate
Create returns a builder for creating a AuditEvent entity.
func (*AuditEventClient) CreateBulk ¶
func (c *AuditEventClient) CreateBulk(builders ...*AuditEventCreate) *AuditEventCreateBulk
CreateBulk returns a builder for creating a bulk of AuditEvent entities.
func (*AuditEventClient) Delete ¶
func (c *AuditEventClient) Delete() *AuditEventDelete
Delete returns a delete builder for AuditEvent.
func (*AuditEventClient) DeleteOne ¶
func (c *AuditEventClient) DeleteOne(ae *AuditEvent) *AuditEventDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AuditEventClient) DeleteOneID ¶
func (c *AuditEventClient) DeleteOneID(id int) *AuditEventDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AuditEventClient) Get ¶
func (c *AuditEventClient) Get(ctx context.Context, id int) (*AuditEvent, error)
Get returns a AuditEvent entity by its id.
func (*AuditEventClient) GetX ¶
func (c *AuditEventClient) GetX(ctx context.Context, id int) *AuditEvent
GetX is like Get, but panics if an error occurs.
func (*AuditEventClient) Hooks ¶
func (c *AuditEventClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AuditEventClient) Intercept ¶
func (c *AuditEventClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `auditevent.Intercept(f(g(h())))`.
func (*AuditEventClient) Interceptors ¶
func (c *AuditEventClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AuditEventClient) MapCreateBulk ¶
func (c *AuditEventClient) MapCreateBulk(slice any, setFunc func(*AuditEventCreate, int)) *AuditEventCreateBulk
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 (*AuditEventClient) Query ¶
func (c *AuditEventClient) Query() *AuditEventQuery
Query returns a query builder for AuditEvent.
func (*AuditEventClient) Update ¶
func (c *AuditEventClient) Update() *AuditEventUpdate
Update returns an update builder for AuditEvent.
func (*AuditEventClient) UpdateOne ¶
func (c *AuditEventClient) UpdateOne(ae *AuditEvent) *AuditEventUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AuditEventClient) UpdateOneID ¶
func (c *AuditEventClient) UpdateOneID(id int) *AuditEventUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AuditEventClient) Use ¶
func (c *AuditEventClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `auditevent.Hooks(f(g(h())))`.
type AuditEventConnection ¶
type AuditEventConnection struct { Edges []*AuditEventEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
AuditEventConnection is the connection containing edges to AuditEvent.
type AuditEventCreate ¶
type AuditEventCreate struct {
// contains filtered or unexported fields
}
AuditEventCreate is the builder for creating a AuditEvent entity.
func (*AuditEventCreate) Exec ¶
func (aec *AuditEventCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuditEventCreate) ExecX ¶
func (aec *AuditEventCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuditEventCreate) Mutation ¶
func (aec *AuditEventCreate) Mutation() *AuditEventMutation
Mutation returns the AuditEventMutation object of the builder.
func (*AuditEventCreate) Save ¶
func (aec *AuditEventCreate) Save(ctx context.Context) (*AuditEvent, error)
Save creates the AuditEvent in the database.
func (*AuditEventCreate) SaveX ¶
func (aec *AuditEventCreate) SaveX(ctx context.Context) *AuditEvent
SaveX calls Save and panics if Save returns an error.
func (*AuditEventCreate) SetApiGroup ¶
func (aec *AuditEventCreate) SetApiGroup(s string) *AuditEventCreate
SetApiGroup sets the "apiGroup" field.
func (*AuditEventCreate) SetApiVersion ¶
func (aec *AuditEventCreate) SetApiVersion(s string) *AuditEventCreate
SetApiVersion sets the "apiVersion" field.
func (*AuditEventCreate) SetAuditID ¶
func (aec *AuditEventCreate) SetAuditID(s string) *AuditEventCreate
SetAuditID sets the "auditID" field.
func (*AuditEventCreate) SetLevel ¶
func (aec *AuditEventCreate) SetLevel(s string) *AuditEventCreate
SetLevel sets the "level" field.
func (*AuditEventCreate) SetName ¶
func (aec *AuditEventCreate) SetName(s string) *AuditEventCreate
SetName sets the "name" field.
func (*AuditEventCreate) SetNamespace ¶
func (aec *AuditEventCreate) SetNamespace(s string) *AuditEventCreate
SetNamespace sets the "namespace" field.
func (*AuditEventCreate) SetNillableApiGroup ¶
func (aec *AuditEventCreate) SetNillableApiGroup(s *string) *AuditEventCreate
SetNillableApiGroup sets the "apiGroup" field if the given value is not nil.
func (*AuditEventCreate) SetNillableApiVersion ¶
func (aec *AuditEventCreate) SetNillableApiVersion(s *string) *AuditEventCreate
SetNillableApiVersion sets the "apiVersion" field if the given value is not nil.
func (*AuditEventCreate) SetNillableName ¶
func (aec *AuditEventCreate) SetNillableName(s *string) *AuditEventCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*AuditEventCreate) SetNillableNamespace ¶
func (aec *AuditEventCreate) SetNillableNamespace(s *string) *AuditEventCreate
SetNillableNamespace sets the "namespace" field if the given value is not nil.
func (*AuditEventCreate) SetNillableResource ¶
func (aec *AuditEventCreate) SetNillableResource(s *string) *AuditEventCreate
SetNillableResource sets the "resource" field if the given value is not nil.
func (*AuditEventCreate) SetNillableSubResource ¶
func (aec *AuditEventCreate) SetNillableSubResource(s *string) *AuditEventCreate
SetNillableSubResource sets the "subResource" field if the given value is not nil.
func (*AuditEventCreate) SetRaw ¶
func (aec *AuditEventCreate) SetRaw(s string) *AuditEventCreate
SetRaw sets the "raw" field.
func (*AuditEventCreate) SetRequestTimestamp ¶
func (aec *AuditEventCreate) SetRequestTimestamp(t time.Time) *AuditEventCreate
SetRequestTimestamp sets the "requestTimestamp" field.
func (*AuditEventCreate) SetResource ¶
func (aec *AuditEventCreate) SetResource(s string) *AuditEventCreate
SetResource sets the "resource" field.
func (*AuditEventCreate) SetStage ¶
func (aec *AuditEventCreate) SetStage(s string) *AuditEventCreate
SetStage sets the "stage" field.
func (*AuditEventCreate) SetStageTimestamp ¶
func (aec *AuditEventCreate) SetStageTimestamp(t time.Time) *AuditEventCreate
SetStageTimestamp sets the "stageTimestamp" field.
func (*AuditEventCreate) SetSubResource ¶
func (aec *AuditEventCreate) SetSubResource(s string) *AuditEventCreate
SetSubResource sets the "subResource" field.
func (*AuditEventCreate) SetUserAgent ¶
func (aec *AuditEventCreate) SetUserAgent(s string) *AuditEventCreate
SetUserAgent sets the "userAgent" field.
func (*AuditEventCreate) SetVerb ¶
func (aec *AuditEventCreate) SetVerb(s string) *AuditEventCreate
SetVerb sets the "verb" field.
type AuditEventCreateBulk ¶
type AuditEventCreateBulk struct {
// contains filtered or unexported fields
}
AuditEventCreateBulk is the builder for creating many AuditEvent entities in bulk.
func (*AuditEventCreateBulk) Exec ¶
func (aecb *AuditEventCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AuditEventCreateBulk) ExecX ¶
func (aecb *AuditEventCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuditEventCreateBulk) Save ¶
func (aecb *AuditEventCreateBulk) Save(ctx context.Context) ([]*AuditEvent, error)
Save creates the AuditEvent entities in the database.
func (*AuditEventCreateBulk) SaveX ¶
func (aecb *AuditEventCreateBulk) SaveX(ctx context.Context) []*AuditEvent
SaveX is like Save, but panics if an error occurs.
type AuditEventDelete ¶
type AuditEventDelete struct {
// contains filtered or unexported fields
}
AuditEventDelete is the builder for deleting a AuditEvent entity.
func (*AuditEventDelete) Exec ¶
func (aed *AuditEventDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AuditEventDelete) ExecX ¶
func (aed *AuditEventDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AuditEventDelete) Where ¶
func (aed *AuditEventDelete) Where(ps ...predicate.AuditEvent) *AuditEventDelete
Where appends a list predicates to the AuditEventDelete builder.
type AuditEventDeleteOne ¶
type AuditEventDeleteOne struct {
// contains filtered or unexported fields
}
AuditEventDeleteOne is the builder for deleting a single AuditEvent entity.
func (*AuditEventDeleteOne) Exec ¶
func (aedo *AuditEventDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AuditEventDeleteOne) ExecX ¶
func (aedo *AuditEventDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuditEventDeleteOne) Where ¶
func (aedo *AuditEventDeleteOne) Where(ps ...predicate.AuditEvent) *AuditEventDeleteOne
Where appends a list predicates to the AuditEventDelete builder.
type AuditEventEdge ¶
type AuditEventEdge struct { Node *AuditEvent `json:"node"` Cursor Cursor `json:"cursor"` }
AuditEventEdge is the edge representation of AuditEvent.
type AuditEventGroupBy ¶
type AuditEventGroupBy struct {
// contains filtered or unexported fields
}
AuditEventGroupBy is the group-by builder for AuditEvent entities.
func (*AuditEventGroupBy) Aggregate ¶
func (aegb *AuditEventGroupBy) Aggregate(fns ...AggregateFunc) *AuditEventGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AuditEventGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuditEventGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuditEventGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuditEventGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuditEventGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuditEventGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuditEventGroupBy) Scan ¶
func (aegb *AuditEventGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuditEventGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuditEventMutation ¶
type AuditEventMutation struct {
// contains filtered or unexported fields
}
AuditEventMutation represents an operation that mutates the AuditEvent nodes in the graph.
func (*AuditEventMutation) AddField ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) AddedEdges ¶
func (m *AuditEventMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AuditEventMutation) AddedField ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) AddedFields ¶
func (m *AuditEventMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AuditEventMutation) AddedIDs ¶
func (m *AuditEventMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AuditEventMutation) ApiGroup ¶
func (m *AuditEventMutation) ApiGroup() (r string, exists bool)
ApiGroup returns the value of the "apiGroup" field in the mutation.
func (*AuditEventMutation) ApiVersion ¶
func (m *AuditEventMutation) ApiVersion() (r string, exists bool)
ApiVersion returns the value of the "apiVersion" field in the mutation.
func (*AuditEventMutation) AuditID ¶
func (m *AuditEventMutation) AuditID() (r string, exists bool)
AuditID returns the value of the "auditID" field in the mutation.
func (*AuditEventMutation) ClearEdge ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) ClearField ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) ClearedEdges ¶
func (m *AuditEventMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AuditEventMutation) ClearedFields ¶
func (m *AuditEventMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AuditEventMutation) Client ¶
func (m AuditEventMutation) 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 (*AuditEventMutation) EdgeCleared ¶
func (m *AuditEventMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AuditEventMutation) Field ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) FieldCleared ¶
func (m *AuditEventMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AuditEventMutation) Fields ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) ID ¶
func (m *AuditEventMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AuditEventMutation) IDs ¶
func (m *AuditEventMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AuditEventMutation) Level ¶
func (m *AuditEventMutation) Level() (r string, exists bool)
Level returns the value of the "level" field in the mutation.
func (*AuditEventMutation) Name ¶
func (m *AuditEventMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AuditEventMutation) Namespace ¶
func (m *AuditEventMutation) Namespace() (r string, exists bool)
Namespace returns the value of the "namespace" field in the mutation.
func (*AuditEventMutation) OldApiGroup ¶
func (m *AuditEventMutation) OldApiGroup(ctx context.Context) (v string, err error)
OldApiGroup returns the old "apiGroup" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldApiVersion ¶
func (m *AuditEventMutation) OldApiVersion(ctx context.Context) (v string, err error)
OldApiVersion returns the old "apiVersion" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldAuditID ¶
func (m *AuditEventMutation) OldAuditID(ctx context.Context) (v string, err error)
OldAuditID returns the old "auditID" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) 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 (*AuditEventMutation) OldLevel ¶
func (m *AuditEventMutation) OldLevel(ctx context.Context) (v string, err error)
OldLevel returns the old "level" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldName ¶
func (m *AuditEventMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldNamespace ¶
func (m *AuditEventMutation) OldNamespace(ctx context.Context) (v string, err error)
OldNamespace returns the old "namespace" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldRaw ¶
func (m *AuditEventMutation) OldRaw(ctx context.Context) (v string, err error)
OldRaw returns the old "raw" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldRequestTimestamp ¶
OldRequestTimestamp returns the old "requestTimestamp" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldResource ¶
func (m *AuditEventMutation) OldResource(ctx context.Context) (v string, err error)
OldResource returns the old "resource" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldStage ¶
func (m *AuditEventMutation) OldStage(ctx context.Context) (v string, err error)
OldStage returns the old "stage" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldStageTimestamp ¶
OldStageTimestamp returns the old "stageTimestamp" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldSubResource ¶
func (m *AuditEventMutation) OldSubResource(ctx context.Context) (v string, err error)
OldSubResource returns the old "subResource" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldUserAgent ¶
func (m *AuditEventMutation) OldUserAgent(ctx context.Context) (v string, err error)
OldUserAgent returns the old "userAgent" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) OldVerb ¶
func (m *AuditEventMutation) OldVerb(ctx context.Context) (v string, err error)
OldVerb returns the old "verb" field's value of the AuditEvent entity. If the AuditEvent 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 (*AuditEventMutation) Raw ¶
func (m *AuditEventMutation) Raw() (r string, exists bool)
Raw returns the value of the "raw" field in the mutation.
func (*AuditEventMutation) RemovedEdges ¶
func (m *AuditEventMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AuditEventMutation) RemovedIDs ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) RequestTimestamp ¶
func (m *AuditEventMutation) RequestTimestamp() (r time.Time, exists bool)
RequestTimestamp returns the value of the "requestTimestamp" field in the mutation.
func (*AuditEventMutation) ResetApiGroup ¶
func (m *AuditEventMutation) ResetApiGroup()
ResetApiGroup resets all changes to the "apiGroup" field.
func (*AuditEventMutation) ResetApiVersion ¶
func (m *AuditEventMutation) ResetApiVersion()
ResetApiVersion resets all changes to the "apiVersion" field.
func (*AuditEventMutation) ResetAuditID ¶
func (m *AuditEventMutation) ResetAuditID()
ResetAuditID resets all changes to the "auditID" field.
func (*AuditEventMutation) ResetEdge ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) ResetField ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) ResetLevel ¶
func (m *AuditEventMutation) ResetLevel()
ResetLevel resets all changes to the "level" field.
func (*AuditEventMutation) ResetName ¶
func (m *AuditEventMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AuditEventMutation) ResetNamespace ¶
func (m *AuditEventMutation) ResetNamespace()
ResetNamespace resets all changes to the "namespace" field.
func (*AuditEventMutation) ResetRaw ¶
func (m *AuditEventMutation) ResetRaw()
ResetRaw resets all changes to the "raw" field.
func (*AuditEventMutation) ResetRequestTimestamp ¶
func (m *AuditEventMutation) ResetRequestTimestamp()
ResetRequestTimestamp resets all changes to the "requestTimestamp" field.
func (*AuditEventMutation) ResetResource ¶
func (m *AuditEventMutation) ResetResource()
ResetResource resets all changes to the "resource" field.
func (*AuditEventMutation) ResetStage ¶
func (m *AuditEventMutation) ResetStage()
ResetStage resets all changes to the "stage" field.
func (*AuditEventMutation) ResetStageTimestamp ¶
func (m *AuditEventMutation) ResetStageTimestamp()
ResetStageTimestamp resets all changes to the "stageTimestamp" field.
func (*AuditEventMutation) ResetSubResource ¶
func (m *AuditEventMutation) ResetSubResource()
ResetSubResource resets all changes to the "subResource" field.
func (*AuditEventMutation) ResetUserAgent ¶
func (m *AuditEventMutation) ResetUserAgent()
ResetUserAgent resets all changes to the "userAgent" field.
func (*AuditEventMutation) ResetVerb ¶
func (m *AuditEventMutation) ResetVerb()
ResetVerb resets all changes to the "verb" field.
func (*AuditEventMutation) Resource ¶
func (m *AuditEventMutation) Resource() (r string, exists bool)
Resource returns the value of the "resource" field in the mutation.
func (*AuditEventMutation) SetApiGroup ¶
func (m *AuditEventMutation) SetApiGroup(s string)
SetApiGroup sets the "apiGroup" field.
func (*AuditEventMutation) SetApiVersion ¶
func (m *AuditEventMutation) SetApiVersion(s string)
SetApiVersion sets the "apiVersion" field.
func (*AuditEventMutation) SetAuditID ¶
func (m *AuditEventMutation) SetAuditID(s string)
SetAuditID sets the "auditID" field.
func (*AuditEventMutation) SetField ¶
func (m *AuditEventMutation) 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 (*AuditEventMutation) SetLevel ¶
func (m *AuditEventMutation) SetLevel(s string)
SetLevel sets the "level" field.
func (*AuditEventMutation) SetName ¶
func (m *AuditEventMutation) SetName(s string)
SetName sets the "name" field.
func (*AuditEventMutation) SetNamespace ¶
func (m *AuditEventMutation) SetNamespace(s string)
SetNamespace sets the "namespace" field.
func (*AuditEventMutation) SetOp ¶
func (m *AuditEventMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AuditEventMutation) SetRaw ¶
func (m *AuditEventMutation) SetRaw(s string)
SetRaw sets the "raw" field.
func (*AuditEventMutation) SetRequestTimestamp ¶
func (m *AuditEventMutation) SetRequestTimestamp(t time.Time)
SetRequestTimestamp sets the "requestTimestamp" field.
func (*AuditEventMutation) SetResource ¶
func (m *AuditEventMutation) SetResource(s string)
SetResource sets the "resource" field.
func (*AuditEventMutation) SetStage ¶
func (m *AuditEventMutation) SetStage(s string)
SetStage sets the "stage" field.
func (*AuditEventMutation) SetStageTimestamp ¶
func (m *AuditEventMutation) SetStageTimestamp(t time.Time)
SetStageTimestamp sets the "stageTimestamp" field.
func (*AuditEventMutation) SetSubResource ¶
func (m *AuditEventMutation) SetSubResource(s string)
SetSubResource sets the "subResource" field.
func (*AuditEventMutation) SetUserAgent ¶
func (m *AuditEventMutation) SetUserAgent(s string)
SetUserAgent sets the "userAgent" field.
func (*AuditEventMutation) SetVerb ¶
func (m *AuditEventMutation) SetVerb(s string)
SetVerb sets the "verb" field.
func (*AuditEventMutation) Stage ¶
func (m *AuditEventMutation) Stage() (r string, exists bool)
Stage returns the value of the "stage" field in the mutation.
func (*AuditEventMutation) StageTimestamp ¶
func (m *AuditEventMutation) StageTimestamp() (r time.Time, exists bool)
StageTimestamp returns the value of the "stageTimestamp" field in the mutation.
func (*AuditEventMutation) SubResource ¶
func (m *AuditEventMutation) SubResource() (r string, exists bool)
SubResource returns the value of the "subResource" field in the mutation.
func (AuditEventMutation) Tx ¶
func (m AuditEventMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AuditEventMutation) Type ¶
func (m *AuditEventMutation) Type() string
Type returns the node type of this mutation (AuditEvent).
func (*AuditEventMutation) UserAgent ¶
func (m *AuditEventMutation) UserAgent() (r string, exists bool)
UserAgent returns the value of the "userAgent" field in the mutation.
func (*AuditEventMutation) Verb ¶
func (m *AuditEventMutation) Verb() (r string, exists bool)
Verb returns the value of the "verb" field in the mutation.
func (*AuditEventMutation) Where ¶
func (m *AuditEventMutation) Where(ps ...predicate.AuditEvent)
Where appends a list predicates to the AuditEventMutation builder.
func (*AuditEventMutation) WhereP ¶
func (m *AuditEventMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AuditEventMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AuditEventOrder ¶
type AuditEventOrder struct { Direction OrderDirection `json:"direction"` Field *AuditEventOrderField `json:"field"` }
AuditEventOrder defines the ordering of AuditEvent.
type AuditEventOrderField ¶
type AuditEventOrderField struct { // Value extracts the ordering value from the given AuditEvent. Value func(*AuditEvent) (ent.Value, error) // contains filtered or unexported fields }
AuditEventOrderField defines the ordering field of AuditEvent.
func (AuditEventOrderField) MarshalGQL ¶
func (f AuditEventOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (AuditEventOrderField) String ¶
func (f AuditEventOrderField) String() string
String implement fmt.Stringer interface.
func (*AuditEventOrderField) UnmarshalGQL ¶
func (f *AuditEventOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type AuditEventPaginateOption ¶
type AuditEventPaginateOption func(*auditeventPager) error
AuditEventPaginateOption enables pagination customization.
func WithAuditEventFilter ¶
func WithAuditEventFilter(filter func(*AuditEventQuery) (*AuditEventQuery, error)) AuditEventPaginateOption
WithAuditEventFilter configures pagination filter.
func WithAuditEventOrder ¶
func WithAuditEventOrder(order *AuditEventOrder) AuditEventPaginateOption
WithAuditEventOrder configures pagination ordering.
type AuditEventQuery ¶
type AuditEventQuery struct {
// contains filtered or unexported fields
}
AuditEventQuery is the builder for querying AuditEvent entities.
func (*AuditEventQuery) Aggregate ¶
func (aeq *AuditEventQuery) Aggregate(fns ...AggregateFunc) *AuditEventSelect
Aggregate returns a AuditEventSelect configured with the given aggregations.
func (*AuditEventQuery) All ¶
func (aeq *AuditEventQuery) All(ctx context.Context) ([]*AuditEvent, error)
All executes the query and returns a list of AuditEvents.
func (*AuditEventQuery) AllX ¶
func (aeq *AuditEventQuery) AllX(ctx context.Context) []*AuditEvent
AllX is like All, but panics if an error occurs.
func (*AuditEventQuery) Clone ¶
func (aeq *AuditEventQuery) Clone() *AuditEventQuery
Clone returns a duplicate of the AuditEventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AuditEventQuery) CollectFields ¶
func (ae *AuditEventQuery) CollectFields(ctx context.Context, satisfies ...string) (*AuditEventQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*AuditEventQuery) Count ¶
func (aeq *AuditEventQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AuditEventQuery) CountX ¶
func (aeq *AuditEventQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AuditEventQuery) Exist ¶
func (aeq *AuditEventQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AuditEventQuery) ExistX ¶
func (aeq *AuditEventQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AuditEventQuery) First ¶
func (aeq *AuditEventQuery) First(ctx context.Context) (*AuditEvent, error)
First returns the first AuditEvent entity from the query. Returns a *NotFoundError when no AuditEvent was found.
func (*AuditEventQuery) FirstID ¶
func (aeq *AuditEventQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AuditEvent ID from the query. Returns a *NotFoundError when no AuditEvent ID was found.
func (*AuditEventQuery) FirstIDX ¶
func (aeq *AuditEventQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AuditEventQuery) FirstX ¶
func (aeq *AuditEventQuery) FirstX(ctx context.Context) *AuditEvent
FirstX is like First, but panics if an error occurs.
func (*AuditEventQuery) GroupBy ¶
func (aeq *AuditEventQuery) GroupBy(field string, fields ...string) *AuditEventGroupBy
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 { Raw string `json:"raw,omitempty"` Count int `json:"count,omitempty"` } client.AuditEvent.Query(). GroupBy(auditevent.FieldRaw). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AuditEventQuery) IDs ¶
func (aeq *AuditEventQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of AuditEvent IDs.
func (*AuditEventQuery) IDsX ¶
func (aeq *AuditEventQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AuditEventQuery) Limit ¶
func (aeq *AuditEventQuery) Limit(limit int) *AuditEventQuery
Limit the number of records to be returned by this query.
func (*AuditEventQuery) Offset ¶
func (aeq *AuditEventQuery) Offset(offset int) *AuditEventQuery
Offset to start from.
func (*AuditEventQuery) Only ¶
func (aeq *AuditEventQuery) Only(ctx context.Context) (*AuditEvent, error)
Only returns a single AuditEvent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuditEvent entity is found. Returns a *NotFoundError when no AuditEvent entities are found.
func (*AuditEventQuery) OnlyID ¶
func (aeq *AuditEventQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only AuditEvent ID in the query. Returns a *NotSingularError when more than one AuditEvent ID is found. Returns a *NotFoundError when no entities are found.
func (*AuditEventQuery) OnlyIDX ¶
func (aeq *AuditEventQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AuditEventQuery) OnlyX ¶
func (aeq *AuditEventQuery) OnlyX(ctx context.Context) *AuditEvent
OnlyX is like Only, but panics if an error occurs.
func (*AuditEventQuery) Order ¶
func (aeq *AuditEventQuery) Order(o ...auditevent.OrderOption) *AuditEventQuery
Order specifies how the records should be ordered.
func (*AuditEventQuery) Paginate ¶
func (ae *AuditEventQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...AuditEventPaginateOption, ) (*AuditEventConnection, error)
Paginate executes the query and returns a relay based cursor connection to AuditEvent.
func (*AuditEventQuery) Select ¶
func (aeq *AuditEventQuery) Select(fields ...string) *AuditEventSelect
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 { Raw string `json:"raw,omitempty"` } client.AuditEvent.Query(). Select(auditevent.FieldRaw). Scan(ctx, &v)
func (*AuditEventQuery) Unique ¶
func (aeq *AuditEventQuery) Unique(unique bool) *AuditEventQuery
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 (*AuditEventQuery) Where ¶
func (aeq *AuditEventQuery) Where(ps ...predicate.AuditEvent) *AuditEventQuery
Where adds a new predicate for the AuditEventQuery builder.
type AuditEventSelect ¶
type AuditEventSelect struct { *AuditEventQuery // contains filtered or unexported fields }
AuditEventSelect is the builder for selecting fields of AuditEvent entities.
func (*AuditEventSelect) Aggregate ¶
func (aes *AuditEventSelect) Aggregate(fns ...AggregateFunc) *AuditEventSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AuditEventSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuditEventSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuditEventSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuditEventSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuditEventSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuditEventSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuditEventSelect) Scan ¶
func (aes *AuditEventSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuditEventSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuditEventUpdate ¶
type AuditEventUpdate struct {
// contains filtered or unexported fields
}
AuditEventUpdate is the builder for updating AuditEvent entities.
func (*AuditEventUpdate) Exec ¶
func (aeu *AuditEventUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuditEventUpdate) ExecX ¶
func (aeu *AuditEventUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuditEventUpdate) Mutation ¶
func (aeu *AuditEventUpdate) Mutation() *AuditEventMutation
Mutation returns the AuditEventMutation object of the builder.
func (*AuditEventUpdate) Save ¶
func (aeu *AuditEventUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AuditEventUpdate) SaveX ¶
func (aeu *AuditEventUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AuditEventUpdate) Where ¶
func (aeu *AuditEventUpdate) Where(ps ...predicate.AuditEvent) *AuditEventUpdate
Where appends a list predicates to the AuditEventUpdate builder.
type AuditEventUpdateOne ¶
type AuditEventUpdateOne struct {
// contains filtered or unexported fields
}
AuditEventUpdateOne is the builder for updating a single AuditEvent entity.
func (*AuditEventUpdateOne) Exec ¶
func (aeuo *AuditEventUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AuditEventUpdateOne) ExecX ¶
func (aeuo *AuditEventUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuditEventUpdateOne) Mutation ¶
func (aeuo *AuditEventUpdateOne) Mutation() *AuditEventMutation
Mutation returns the AuditEventMutation object of the builder.
func (*AuditEventUpdateOne) Save ¶
func (aeuo *AuditEventUpdateOne) Save(ctx context.Context) (*AuditEvent, error)
Save executes the query and returns the updated AuditEvent entity.
func (*AuditEventUpdateOne) SaveX ¶
func (aeuo *AuditEventUpdateOne) SaveX(ctx context.Context) *AuditEvent
SaveX is like Save, but panics if an error occurs.
func (*AuditEventUpdateOne) Select ¶
func (aeuo *AuditEventUpdateOne) Select(field string, fields ...string) *AuditEventUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AuditEventUpdateOne) Where ¶
func (aeuo *AuditEventUpdateOne) Where(ps ...predicate.AuditEvent) *AuditEventUpdateOne
Where appends a list predicates to the AuditEventUpdate builder.
type AuditEventWhereInput ¶
type AuditEventWhereInput struct { Predicates []predicate.AuditEvent `json:"-"` Not *AuditEventWhereInput `json:"not,omitempty"` Or []*AuditEventWhereInput `json:"or,omitempty"` And []*AuditEventWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "raw" field predicates. Raw *string `json:"raw,omitempty"` RawNEQ *string `json:"rawNEQ,omitempty"` RawIn []string `json:"rawIn,omitempty"` RawNotIn []string `json:"rawNotIn,omitempty"` RawGT *string `json:"rawGT,omitempty"` RawGTE *string `json:"rawGTE,omitempty"` RawLT *string `json:"rawLT,omitempty"` RawLTE *string `json:"rawLTE,omitempty"` RawContains *string `json:"rawContains,omitempty"` RawHasPrefix *string `json:"rawHasPrefix,omitempty"` RawHasSuffix *string `json:"rawHasSuffix,omitempty"` RawEqualFold *string `json:"rawEqualFold,omitempty"` RawContainsFold *string `json:"rawContainsFold,omitempty"` // "level" field predicates. Level *string `json:"level,omitempty"` LevelNEQ *string `json:"levelNEQ,omitempty"` LevelIn []string `json:"levelIn,omitempty"` LevelNotIn []string `json:"levelNotIn,omitempty"` LevelGT *string `json:"levelGT,omitempty"` LevelGTE *string `json:"levelGTE,omitempty"` LevelLT *string `json:"levelLT,omitempty"` LevelLTE *string `json:"levelLTE,omitempty"` LevelContains *string `json:"levelContains,omitempty"` LevelHasPrefix *string `json:"levelHasPrefix,omitempty"` LevelHasSuffix *string `json:"levelHasSuffix,omitempty"` LevelEqualFold *string `json:"levelEqualFold,omitempty"` LevelContainsFold *string `json:"levelContainsFold,omitempty"` // "auditID" field predicates. AuditID *string `json:"auditid,omitempty"` AuditIDNEQ *string `json:"auditidNEQ,omitempty"` AuditIDIn []string `json:"auditidIn,omitempty"` AuditIDNotIn []string `json:"auditidNotIn,omitempty"` AuditIDGT *string `json:"auditidGT,omitempty"` AuditIDGTE *string `json:"auditidGTE,omitempty"` AuditIDLT *string `json:"auditidLT,omitempty"` AuditIDLTE *string `json:"auditidLTE,omitempty"` AuditIDContains *string `json:"auditidContains,omitempty"` AuditIDHasPrefix *string `json:"auditidHasPrefix,omitempty"` AuditIDHasSuffix *string `json:"auditidHasSuffix,omitempty"` AuditIDEqualFold *string `json:"auditidEqualFold,omitempty"` AuditIDContainsFold *string `json:"auditidContainsFold,omitempty"` // "verb" field predicates. Verb *string `json:"verb,omitempty"` VerbNEQ *string `json:"verbNEQ,omitempty"` VerbIn []string `json:"verbIn,omitempty"` VerbNotIn []string `json:"verbNotIn,omitempty"` VerbGT *string `json:"verbGT,omitempty"` VerbGTE *string `json:"verbGTE,omitempty"` VerbLT *string `json:"verbLT,omitempty"` VerbLTE *string `json:"verbLTE,omitempty"` VerbContains *string `json:"verbContains,omitempty"` VerbHasPrefix *string `json:"verbHasPrefix,omitempty"` VerbHasSuffix *string `json:"verbHasSuffix,omitempty"` VerbEqualFold *string `json:"verbEqualFold,omitempty"` VerbContainsFold *string `json:"verbContainsFold,omitempty"` // "userAgent" field predicates. UserAgent *string `json:"useragent,omitempty"` UserAgentNEQ *string `json:"useragentNEQ,omitempty"` UserAgentIn []string `json:"useragentIn,omitempty"` UserAgentNotIn []string `json:"useragentNotIn,omitempty"` UserAgentGT *string `json:"useragentGT,omitempty"` UserAgentGTE *string `json:"useragentGTE,omitempty"` UserAgentLT *string `json:"useragentLT,omitempty"` UserAgentLTE *string `json:"useragentLTE,omitempty"` UserAgentContains *string `json:"useragentContains,omitempty"` UserAgentHasPrefix *string `json:"useragentHasPrefix,omitempty"` UserAgentHasSuffix *string `json:"useragentHasSuffix,omitempty"` UserAgentEqualFold *string `json:"useragentEqualFold,omitempty"` UserAgentContainsFold *string `json:"useragentContainsFold,omitempty"` // "requestTimestamp" field predicates. RequestTimestamp *time.Time `json:"requesttimestamp,omitempty"` RequestTimestampNEQ *time.Time `json:"requesttimestampNEQ,omitempty"` RequestTimestampIn []time.Time `json:"requesttimestampIn,omitempty"` RequestTimestampNotIn []time.Time `json:"requesttimestampNotIn,omitempty"` RequestTimestampGT *time.Time `json:"requesttimestampGT,omitempty"` RequestTimestampGTE *time.Time `json:"requesttimestampGTE,omitempty"` RequestTimestampLT *time.Time `json:"requesttimestampLT,omitempty"` RequestTimestampLTE *time.Time `json:"requesttimestampLTE,omitempty"` // "stageTimestamp" field predicates. StageTimestamp *time.Time `json:"stagetimestamp,omitempty"` StageTimestampNEQ *time.Time `json:"stagetimestampNEQ,omitempty"` StageTimestampIn []time.Time `json:"stagetimestampIn,omitempty"` StageTimestampNotIn []time.Time `json:"stagetimestampNotIn,omitempty"` StageTimestampGT *time.Time `json:"stagetimestampGT,omitempty"` StageTimestampGTE *time.Time `json:"stagetimestampGTE,omitempty"` StageTimestampLT *time.Time `json:"stagetimestampLT,omitempty"` StageTimestampLTE *time.Time `json:"stagetimestampLTE,omitempty"` // "namespace" field predicates. Namespace *string `json:"namespace,omitempty"` NamespaceNEQ *string `json:"namespaceNEQ,omitempty"` NamespaceIn []string `json:"namespaceIn,omitempty"` NamespaceNotIn []string `json:"namespaceNotIn,omitempty"` NamespaceGT *string `json:"namespaceGT,omitempty"` NamespaceGTE *string `json:"namespaceGTE,omitempty"` NamespaceLT *string `json:"namespaceLT,omitempty"` NamespaceLTE *string `json:"namespaceLTE,omitempty"` NamespaceContains *string `json:"namespaceContains,omitempty"` NamespaceHasPrefix *string `json:"namespaceHasPrefix,omitempty"` NamespaceHasSuffix *string `json:"namespaceHasSuffix,omitempty"` NamespaceEqualFold *string `json:"namespaceEqualFold,omitempty"` NamespaceContainsFold *string `json:"namespaceContainsFold,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "apiVersion" field predicates. ApiVersion *string `json:"apiversion,omitempty"` ApiVersionNEQ *string `json:"apiversionNEQ,omitempty"` ApiVersionIn []string `json:"apiversionIn,omitempty"` ApiVersionNotIn []string `json:"apiversionNotIn,omitempty"` ApiVersionGT *string `json:"apiversionGT,omitempty"` ApiVersionGTE *string `json:"apiversionGTE,omitempty"` ApiVersionLT *string `json:"apiversionLT,omitempty"` ApiVersionLTE *string `json:"apiversionLTE,omitempty"` ApiVersionContains *string `json:"apiversionContains,omitempty"` ApiVersionHasPrefix *string `json:"apiversionHasPrefix,omitempty"` ApiVersionHasSuffix *string `json:"apiversionHasSuffix,omitempty"` ApiVersionEqualFold *string `json:"apiversionEqualFold,omitempty"` ApiVersionContainsFold *string `json:"apiversionContainsFold,omitempty"` // "apiGroup" field predicates. ApiGroup *string `json:"apigroup,omitempty"` ApiGroupNEQ *string `json:"apigroupNEQ,omitempty"` ApiGroupIn []string `json:"apigroupIn,omitempty"` ApiGroupNotIn []string `json:"apigroupNotIn,omitempty"` ApiGroupGT *string `json:"apigroupGT,omitempty"` ApiGroupGTE *string `json:"apigroupGTE,omitempty"` ApiGroupLT *string `json:"apigroupLT,omitempty"` ApiGroupLTE *string `json:"apigroupLTE,omitempty"` ApiGroupContains *string `json:"apigroupContains,omitempty"` ApiGroupHasPrefix *string `json:"apigroupHasPrefix,omitempty"` ApiGroupHasSuffix *string `json:"apigroupHasSuffix,omitempty"` ApiGroupEqualFold *string `json:"apigroupEqualFold,omitempty"` ApiGroupContainsFold *string `json:"apigroupContainsFold,omitempty"` // "resource" field predicates. Resource *string `json:"resource,omitempty"` ResourceNEQ *string `json:"resourceNEQ,omitempty"` ResourceIn []string `json:"resourceIn,omitempty"` ResourceNotIn []string `json:"resourceNotIn,omitempty"` ResourceGT *string `json:"resourceGT,omitempty"` ResourceGTE *string `json:"resourceGTE,omitempty"` ResourceLT *string `json:"resourceLT,omitempty"` ResourceLTE *string `json:"resourceLTE,omitempty"` ResourceContains *string `json:"resourceContains,omitempty"` ResourceHasPrefix *string `json:"resourceHasPrefix,omitempty"` ResourceHasSuffix *string `json:"resourceHasSuffix,omitempty"` ResourceEqualFold *string `json:"resourceEqualFold,omitempty"` ResourceContainsFold *string `json:"resourceContainsFold,omitempty"` // "subResource" field predicates. SubResource *string `json:"subresource,omitempty"` SubResourceNEQ *string `json:"subresourceNEQ,omitempty"` SubResourceIn []string `json:"subresourceIn,omitempty"` SubResourceNotIn []string `json:"subresourceNotIn,omitempty"` SubResourceGT *string `json:"subresourceGT,omitempty"` SubResourceGTE *string `json:"subresourceGTE,omitempty"` SubResourceLT *string `json:"subresourceLT,omitempty"` SubResourceLTE *string `json:"subresourceLTE,omitempty"` SubResourceContains *string `json:"subresourceContains,omitempty"` SubResourceHasPrefix *string `json:"subresourceHasPrefix,omitempty"` SubResourceHasSuffix *string `json:"subresourceHasSuffix,omitempty"` SubResourceEqualFold *string `json:"subresourceEqualFold,omitempty"` SubResourceContainsFold *string `json:"subresourceContainsFold,omitempty"` // "stage" field predicates. Stage *string `json:"stage,omitempty"` StageNEQ *string `json:"stageNEQ,omitempty"` StageIn []string `json:"stageIn,omitempty"` StageNotIn []string `json:"stageNotIn,omitempty"` StageGT *string `json:"stageGT,omitempty"` StageGTE *string `json:"stageGTE,omitempty"` StageLT *string `json:"stageLT,omitempty"` StageLTE *string `json:"stageLTE,omitempty"` StageContains *string `json:"stageContains,omitempty"` StageHasPrefix *string `json:"stageHasPrefix,omitempty"` StageHasSuffix *string `json:"stageHasSuffix,omitempty"` StageEqualFold *string `json:"stageEqualFold,omitempty"` StageContainsFold *string `json:"stageContainsFold,omitempty"` }
AuditEventWhereInput represents a where input for filtering AuditEvent queries.
func (*AuditEventWhereInput) AddPredicates ¶
func (i *AuditEventWhereInput) AddPredicates(predicates ...predicate.AuditEvent)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*AuditEventWhereInput) Filter ¶
func (i *AuditEventWhereInput) Filter(q *AuditEventQuery) (*AuditEventQuery, error)
Filter applies the AuditEventWhereInput filter on the AuditEventQuery builder.
func (*AuditEventWhereInput) P ¶
func (i *AuditEventWhereInput) P() (predicate.AuditEvent, error)
P returns a predicate for filtering auditevents. An error is returned if the input is empty or invalid.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // AuditEvent is the client for interacting with the AuditEvent builders. AuditEvent *AuditEventClient // ResourceKind is the client for interacting with the ResourceKind builders. ResourceKind *ResourceKindClient // View is the client for interacting with the View builders. View *ViewClient // 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(). AuditEvent. 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(...)`.
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
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 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 NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
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 ResourceKind ¶
type ResourceKind struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // ApiVersion holds the value of the "apiVersion" field. ApiVersion string `json:"apiVersion,omitempty"` // Namespaced holds the value of the "namespaced" field. Namespaced bool `json:"namespaced,omitempty"` // Kind holds the value of the "kind" field. Kind string `json:"kind,omitempty"` // contains filtered or unexported fields }
ResourceKind is the model entity for the ResourceKind schema.
func (*ResourceKind) IsNode ¶
func (*ResourceKind) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*ResourceKind) String ¶
func (rk *ResourceKind) String() string
String implements the fmt.Stringer.
func (*ResourceKind) ToEdge ¶
func (rk *ResourceKind) ToEdge(order *ResourceKindOrder) *ResourceKindEdge
ToEdge converts ResourceKind into ResourceKindEdge.
func (*ResourceKind) Unwrap ¶
func (rk *ResourceKind) Unwrap() *ResourceKind
Unwrap unwraps the ResourceKind 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 (*ResourceKind) Update ¶
func (rk *ResourceKind) Update() *ResourceKindUpdateOne
Update returns a builder for updating this ResourceKind. Note that you need to call ResourceKind.Unwrap() before calling this method if this ResourceKind was returned from a transaction, and the transaction was committed or rolled back.
type ResourceKindClient ¶
type ResourceKindClient struct {
// contains filtered or unexported fields
}
ResourceKindClient is a client for the ResourceKind schema.
func NewResourceKindClient ¶
func NewResourceKindClient(c config) *ResourceKindClient
NewResourceKindClient returns a client for the ResourceKind from the given config.
func (*ResourceKindClient) Create ¶
func (c *ResourceKindClient) Create() *ResourceKindCreate
Create returns a builder for creating a ResourceKind entity.
func (*ResourceKindClient) CreateBulk ¶
func (c *ResourceKindClient) CreateBulk(builders ...*ResourceKindCreate) *ResourceKindCreateBulk
CreateBulk returns a builder for creating a bulk of ResourceKind entities.
func (*ResourceKindClient) Delete ¶
func (c *ResourceKindClient) Delete() *ResourceKindDelete
Delete returns a delete builder for ResourceKind.
func (*ResourceKindClient) DeleteOne ¶
func (c *ResourceKindClient) DeleteOne(rk *ResourceKind) *ResourceKindDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ResourceKindClient) DeleteOneID ¶
func (c *ResourceKindClient) DeleteOneID(id int) *ResourceKindDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ResourceKindClient) Get ¶
func (c *ResourceKindClient) Get(ctx context.Context, id int) (*ResourceKind, error)
Get returns a ResourceKind entity by its id.
func (*ResourceKindClient) GetX ¶
func (c *ResourceKindClient) GetX(ctx context.Context, id int) *ResourceKind
GetX is like Get, but panics if an error occurs.
func (*ResourceKindClient) Hooks ¶
func (c *ResourceKindClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ResourceKindClient) Intercept ¶
func (c *ResourceKindClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `resourcekind.Intercept(f(g(h())))`.
func (*ResourceKindClient) Interceptors ¶
func (c *ResourceKindClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ResourceKindClient) MapCreateBulk ¶
func (c *ResourceKindClient) MapCreateBulk(slice any, setFunc func(*ResourceKindCreate, int)) *ResourceKindCreateBulk
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 (*ResourceKindClient) Query ¶
func (c *ResourceKindClient) Query() *ResourceKindQuery
Query returns a query builder for ResourceKind.
func (*ResourceKindClient) Update ¶
func (c *ResourceKindClient) Update() *ResourceKindUpdate
Update returns an update builder for ResourceKind.
func (*ResourceKindClient) UpdateOne ¶
func (c *ResourceKindClient) UpdateOne(rk *ResourceKind) *ResourceKindUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ResourceKindClient) UpdateOneID ¶
func (c *ResourceKindClient) UpdateOneID(id int) *ResourceKindUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ResourceKindClient) Use ¶
func (c *ResourceKindClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resourcekind.Hooks(f(g(h())))`.
type ResourceKindConnection ¶
type ResourceKindConnection struct { Edges []*ResourceKindEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
ResourceKindConnection is the connection containing edges to ResourceKind.
type ResourceKindCreate ¶
type ResourceKindCreate struct {
// contains filtered or unexported fields
}
ResourceKindCreate is the builder for creating a ResourceKind entity.
func (*ResourceKindCreate) Exec ¶
func (rkc *ResourceKindCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ResourceKindCreate) ExecX ¶
func (rkc *ResourceKindCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResourceKindCreate) Mutation ¶
func (rkc *ResourceKindCreate) Mutation() *ResourceKindMutation
Mutation returns the ResourceKindMutation object of the builder.
func (*ResourceKindCreate) Save ¶
func (rkc *ResourceKindCreate) Save(ctx context.Context) (*ResourceKind, error)
Save creates the ResourceKind in the database.
func (*ResourceKindCreate) SaveX ¶
func (rkc *ResourceKindCreate) SaveX(ctx context.Context) *ResourceKind
SaveX calls Save and panics if Save returns an error.
func (*ResourceKindCreate) SetApiVersion ¶
func (rkc *ResourceKindCreate) SetApiVersion(s string) *ResourceKindCreate
SetApiVersion sets the "apiVersion" field.
func (*ResourceKindCreate) SetKind ¶
func (rkc *ResourceKindCreate) SetKind(s string) *ResourceKindCreate
SetKind sets the "kind" field.
func (*ResourceKindCreate) SetName ¶
func (rkc *ResourceKindCreate) SetName(s string) *ResourceKindCreate
SetName sets the "name" field.
func (*ResourceKindCreate) SetNamespaced ¶
func (rkc *ResourceKindCreate) SetNamespaced(b bool) *ResourceKindCreate
SetNamespaced sets the "namespaced" field.
func (*ResourceKindCreate) SetNillableNamespaced ¶
func (rkc *ResourceKindCreate) SetNillableNamespaced(b *bool) *ResourceKindCreate
SetNillableNamespaced sets the "namespaced" field if the given value is not nil.
type ResourceKindCreateBulk ¶
type ResourceKindCreateBulk struct {
// contains filtered or unexported fields
}
ResourceKindCreateBulk is the builder for creating many ResourceKind entities in bulk.
func (*ResourceKindCreateBulk) Exec ¶
func (rkcb *ResourceKindCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ResourceKindCreateBulk) ExecX ¶
func (rkcb *ResourceKindCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResourceKindCreateBulk) Save ¶
func (rkcb *ResourceKindCreateBulk) Save(ctx context.Context) ([]*ResourceKind, error)
Save creates the ResourceKind entities in the database.
func (*ResourceKindCreateBulk) SaveX ¶
func (rkcb *ResourceKindCreateBulk) SaveX(ctx context.Context) []*ResourceKind
SaveX is like Save, but panics if an error occurs.
type ResourceKindDelete ¶
type ResourceKindDelete struct {
// contains filtered or unexported fields
}
ResourceKindDelete is the builder for deleting a ResourceKind entity.
func (*ResourceKindDelete) Exec ¶
func (rkd *ResourceKindDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ResourceKindDelete) ExecX ¶
func (rkd *ResourceKindDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ResourceKindDelete) Where ¶
func (rkd *ResourceKindDelete) Where(ps ...predicate.ResourceKind) *ResourceKindDelete
Where appends a list predicates to the ResourceKindDelete builder.
type ResourceKindDeleteOne ¶
type ResourceKindDeleteOne struct {
// contains filtered or unexported fields
}
ResourceKindDeleteOne is the builder for deleting a single ResourceKind entity.
func (*ResourceKindDeleteOne) Exec ¶
func (rkdo *ResourceKindDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ResourceKindDeleteOne) ExecX ¶
func (rkdo *ResourceKindDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResourceKindDeleteOne) Where ¶
func (rkdo *ResourceKindDeleteOne) Where(ps ...predicate.ResourceKind) *ResourceKindDeleteOne
Where appends a list predicates to the ResourceKindDelete builder.
type ResourceKindEdge ¶
type ResourceKindEdge struct { Node *ResourceKind `json:"node"` Cursor Cursor `json:"cursor"` }
ResourceKindEdge is the edge representation of ResourceKind.
type ResourceKindGroupBy ¶
type ResourceKindGroupBy struct {
// contains filtered or unexported fields
}
ResourceKindGroupBy is the group-by builder for ResourceKind entities.
func (*ResourceKindGroupBy) Aggregate ¶
func (rkgb *ResourceKindGroupBy) Aggregate(fns ...AggregateFunc) *ResourceKindGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ResourceKindGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ResourceKindGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ResourceKindGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ResourceKindGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ResourceKindGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ResourceKindGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ResourceKindGroupBy) Scan ¶
func (rkgb *ResourceKindGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ResourceKindGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ResourceKindMutation ¶
type ResourceKindMutation struct {
// contains filtered or unexported fields
}
ResourceKindMutation represents an operation that mutates the ResourceKind nodes in the graph.
func (*ResourceKindMutation) AddField ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) AddedEdges ¶
func (m *ResourceKindMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ResourceKindMutation) AddedField ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) AddedFields ¶
func (m *ResourceKindMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ResourceKindMutation) AddedIDs ¶
func (m *ResourceKindMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ResourceKindMutation) ApiVersion ¶
func (m *ResourceKindMutation) ApiVersion() (r string, exists bool)
ApiVersion returns the value of the "apiVersion" field in the mutation.
func (*ResourceKindMutation) ClearEdge ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) ClearField ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) ClearedEdges ¶
func (m *ResourceKindMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ResourceKindMutation) ClearedFields ¶
func (m *ResourceKindMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ResourceKindMutation) Client ¶
func (m ResourceKindMutation) 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 (*ResourceKindMutation) EdgeCleared ¶
func (m *ResourceKindMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ResourceKindMutation) Field ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) FieldCleared ¶
func (m *ResourceKindMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ResourceKindMutation) Fields ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) ID ¶
func (m *ResourceKindMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ResourceKindMutation) IDs ¶
func (m *ResourceKindMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ResourceKindMutation) Kind ¶
func (m *ResourceKindMutation) Kind() (r string, exists bool)
Kind returns the value of the "kind" field in the mutation.
func (*ResourceKindMutation) Name ¶
func (m *ResourceKindMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ResourceKindMutation) Namespaced ¶
func (m *ResourceKindMutation) Namespaced() (r bool, exists bool)
Namespaced returns the value of the "namespaced" field in the mutation.
func (*ResourceKindMutation) OldApiVersion ¶
func (m *ResourceKindMutation) OldApiVersion(ctx context.Context) (v string, err error)
OldApiVersion returns the old "apiVersion" field's value of the ResourceKind entity. If the ResourceKind 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 (*ResourceKindMutation) 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 (*ResourceKindMutation) OldKind ¶
func (m *ResourceKindMutation) OldKind(ctx context.Context) (v string, err error)
OldKind returns the old "kind" field's value of the ResourceKind entity. If the ResourceKind 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 (*ResourceKindMutation) OldName ¶
func (m *ResourceKindMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ResourceKind entity. If the ResourceKind 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 (*ResourceKindMutation) OldNamespaced ¶
func (m *ResourceKindMutation) OldNamespaced(ctx context.Context) (v bool, err error)
OldNamespaced returns the old "namespaced" field's value of the ResourceKind entity. If the ResourceKind 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 (*ResourceKindMutation) Op ¶
func (m *ResourceKindMutation) Op() Op
Op returns the operation name.
func (*ResourceKindMutation) RemovedEdges ¶
func (m *ResourceKindMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ResourceKindMutation) RemovedIDs ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) ResetApiVersion ¶
func (m *ResourceKindMutation) ResetApiVersion()
ResetApiVersion resets all changes to the "apiVersion" field.
func (*ResourceKindMutation) ResetEdge ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) ResetField ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) ResetKind ¶
func (m *ResourceKindMutation) ResetKind()
ResetKind resets all changes to the "kind" field.
func (*ResourceKindMutation) ResetName ¶
func (m *ResourceKindMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ResourceKindMutation) ResetNamespaced ¶
func (m *ResourceKindMutation) ResetNamespaced()
ResetNamespaced resets all changes to the "namespaced" field.
func (*ResourceKindMutation) SetApiVersion ¶
func (m *ResourceKindMutation) SetApiVersion(s string)
SetApiVersion sets the "apiVersion" field.
func (*ResourceKindMutation) SetField ¶
func (m *ResourceKindMutation) 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 (*ResourceKindMutation) SetKind ¶
func (m *ResourceKindMutation) SetKind(s string)
SetKind sets the "kind" field.
func (*ResourceKindMutation) SetName ¶
func (m *ResourceKindMutation) SetName(s string)
SetName sets the "name" field.
func (*ResourceKindMutation) SetNamespaced ¶
func (m *ResourceKindMutation) SetNamespaced(b bool)
SetNamespaced sets the "namespaced" field.
func (*ResourceKindMutation) SetOp ¶
func (m *ResourceKindMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ResourceKindMutation) Tx ¶
func (m ResourceKindMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ResourceKindMutation) Type ¶
func (m *ResourceKindMutation) Type() string
Type returns the node type of this mutation (ResourceKind).
func (*ResourceKindMutation) Where ¶
func (m *ResourceKindMutation) Where(ps ...predicate.ResourceKind)
Where appends a list predicates to the ResourceKindMutation builder.
func (*ResourceKindMutation) WhereP ¶
func (m *ResourceKindMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ResourceKindMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ResourceKindOrder ¶
type ResourceKindOrder struct { Direction OrderDirection `json:"direction"` Field *ResourceKindOrderField `json:"field"` }
ResourceKindOrder defines the ordering of ResourceKind.
type ResourceKindOrderField ¶
type ResourceKindOrderField struct { // Value extracts the ordering value from the given ResourceKind. Value func(*ResourceKind) (ent.Value, error) // contains filtered or unexported fields }
ResourceKindOrderField defines the ordering field of ResourceKind.
type ResourceKindPaginateOption ¶
type ResourceKindPaginateOption func(*resourcekindPager) error
ResourceKindPaginateOption enables pagination customization.
func WithResourceKindFilter ¶
func WithResourceKindFilter(filter func(*ResourceKindQuery) (*ResourceKindQuery, error)) ResourceKindPaginateOption
WithResourceKindFilter configures pagination filter.
func WithResourceKindOrder ¶
func WithResourceKindOrder(order *ResourceKindOrder) ResourceKindPaginateOption
WithResourceKindOrder configures pagination ordering.
type ResourceKindQuery ¶
type ResourceKindQuery struct {
// contains filtered or unexported fields
}
ResourceKindQuery is the builder for querying ResourceKind entities.
func (*ResourceKindQuery) Aggregate ¶
func (rkq *ResourceKindQuery) Aggregate(fns ...AggregateFunc) *ResourceKindSelect
Aggregate returns a ResourceKindSelect configured with the given aggregations.
func (*ResourceKindQuery) All ¶
func (rkq *ResourceKindQuery) All(ctx context.Context) ([]*ResourceKind, error)
All executes the query and returns a list of ResourceKinds.
func (*ResourceKindQuery) AllX ¶
func (rkq *ResourceKindQuery) AllX(ctx context.Context) []*ResourceKind
AllX is like All, but panics if an error occurs.
func (*ResourceKindQuery) Clone ¶
func (rkq *ResourceKindQuery) Clone() *ResourceKindQuery
Clone returns a duplicate of the ResourceKindQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ResourceKindQuery) CollectFields ¶
func (rk *ResourceKindQuery) CollectFields(ctx context.Context, satisfies ...string) (*ResourceKindQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*ResourceKindQuery) Count ¶
func (rkq *ResourceKindQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ResourceKindQuery) CountX ¶
func (rkq *ResourceKindQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ResourceKindQuery) Exist ¶
func (rkq *ResourceKindQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ResourceKindQuery) ExistX ¶
func (rkq *ResourceKindQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ResourceKindQuery) First ¶
func (rkq *ResourceKindQuery) First(ctx context.Context) (*ResourceKind, error)
First returns the first ResourceKind entity from the query. Returns a *NotFoundError when no ResourceKind was found.
func (*ResourceKindQuery) FirstID ¶
func (rkq *ResourceKindQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ResourceKind ID from the query. Returns a *NotFoundError when no ResourceKind ID was found.
func (*ResourceKindQuery) FirstIDX ¶
func (rkq *ResourceKindQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ResourceKindQuery) FirstX ¶
func (rkq *ResourceKindQuery) FirstX(ctx context.Context) *ResourceKind
FirstX is like First, but panics if an error occurs.
func (*ResourceKindQuery) GroupBy ¶
func (rkq *ResourceKindQuery) GroupBy(field string, fields ...string) *ResourceKindGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.ResourceKind.Query(). GroupBy(resourcekind.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ResourceKindQuery) IDs ¶
func (rkq *ResourceKindQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ResourceKind IDs.
func (*ResourceKindQuery) IDsX ¶
func (rkq *ResourceKindQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ResourceKindQuery) Limit ¶
func (rkq *ResourceKindQuery) Limit(limit int) *ResourceKindQuery
Limit the number of records to be returned by this query.
func (*ResourceKindQuery) Offset ¶
func (rkq *ResourceKindQuery) Offset(offset int) *ResourceKindQuery
Offset to start from.
func (*ResourceKindQuery) Only ¶
func (rkq *ResourceKindQuery) Only(ctx context.Context) (*ResourceKind, error)
Only returns a single ResourceKind entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ResourceKind entity is found. Returns a *NotFoundError when no ResourceKind entities are found.
func (*ResourceKindQuery) OnlyID ¶
func (rkq *ResourceKindQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ResourceKind ID in the query. Returns a *NotSingularError when more than one ResourceKind ID is found. Returns a *NotFoundError when no entities are found.
func (*ResourceKindQuery) OnlyIDX ¶
func (rkq *ResourceKindQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ResourceKindQuery) OnlyX ¶
func (rkq *ResourceKindQuery) OnlyX(ctx context.Context) *ResourceKind
OnlyX is like Only, but panics if an error occurs.
func (*ResourceKindQuery) Order ¶
func (rkq *ResourceKindQuery) Order(o ...resourcekind.OrderOption) *ResourceKindQuery
Order specifies how the records should be ordered.
func (*ResourceKindQuery) Paginate ¶
func (rk *ResourceKindQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...ResourceKindPaginateOption, ) (*ResourceKindConnection, error)
Paginate executes the query and returns a relay based cursor connection to ResourceKind.
func (*ResourceKindQuery) Select ¶
func (rkq *ResourceKindQuery) Select(fields ...string) *ResourceKindSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.ResourceKind.Query(). Select(resourcekind.FieldName). Scan(ctx, &v)
func (*ResourceKindQuery) Unique ¶
func (rkq *ResourceKindQuery) Unique(unique bool) *ResourceKindQuery
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 (*ResourceKindQuery) Where ¶
func (rkq *ResourceKindQuery) Where(ps ...predicate.ResourceKind) *ResourceKindQuery
Where adds a new predicate for the ResourceKindQuery builder.
type ResourceKindSelect ¶
type ResourceKindSelect struct { *ResourceKindQuery // contains filtered or unexported fields }
ResourceKindSelect is the builder for selecting fields of ResourceKind entities.
func (*ResourceKindSelect) Aggregate ¶
func (rks *ResourceKindSelect) Aggregate(fns ...AggregateFunc) *ResourceKindSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ResourceKindSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ResourceKindSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ResourceKindSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ResourceKindSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ResourceKindSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ResourceKindSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ResourceKindSelect) Scan ¶
func (rks *ResourceKindSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ResourceKindSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ResourceKindUpdate ¶
type ResourceKindUpdate struct {
// contains filtered or unexported fields
}
ResourceKindUpdate is the builder for updating ResourceKind entities.
func (*ResourceKindUpdate) Exec ¶
func (rku *ResourceKindUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ResourceKindUpdate) ExecX ¶
func (rku *ResourceKindUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResourceKindUpdate) Mutation ¶
func (rku *ResourceKindUpdate) Mutation() *ResourceKindMutation
Mutation returns the ResourceKindMutation object of the builder.
func (*ResourceKindUpdate) Save ¶
func (rku *ResourceKindUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ResourceKindUpdate) SaveX ¶
func (rku *ResourceKindUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ResourceKindUpdate) SetApiVersion ¶
func (rku *ResourceKindUpdate) SetApiVersion(s string) *ResourceKindUpdate
SetApiVersion sets the "apiVersion" field.
func (*ResourceKindUpdate) SetKind ¶
func (rku *ResourceKindUpdate) SetKind(s string) *ResourceKindUpdate
SetKind sets the "kind" field.
func (*ResourceKindUpdate) SetName ¶
func (rku *ResourceKindUpdate) SetName(s string) *ResourceKindUpdate
SetName sets the "name" field.
func (*ResourceKindUpdate) SetNamespaced ¶
func (rku *ResourceKindUpdate) SetNamespaced(b bool) *ResourceKindUpdate
SetNamespaced sets the "namespaced" field.
func (*ResourceKindUpdate) SetNillableApiVersion ¶
func (rku *ResourceKindUpdate) SetNillableApiVersion(s *string) *ResourceKindUpdate
SetNillableApiVersion sets the "apiVersion" field if the given value is not nil.
func (*ResourceKindUpdate) SetNillableKind ¶
func (rku *ResourceKindUpdate) SetNillableKind(s *string) *ResourceKindUpdate
SetNillableKind sets the "kind" field if the given value is not nil.
func (*ResourceKindUpdate) SetNillableName ¶
func (rku *ResourceKindUpdate) SetNillableName(s *string) *ResourceKindUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ResourceKindUpdate) SetNillableNamespaced ¶
func (rku *ResourceKindUpdate) SetNillableNamespaced(b *bool) *ResourceKindUpdate
SetNillableNamespaced sets the "namespaced" field if the given value is not nil.
func (*ResourceKindUpdate) Where ¶
func (rku *ResourceKindUpdate) Where(ps ...predicate.ResourceKind) *ResourceKindUpdate
Where appends a list predicates to the ResourceKindUpdate builder.
type ResourceKindUpdateOne ¶
type ResourceKindUpdateOne struct {
// contains filtered or unexported fields
}
ResourceKindUpdateOne is the builder for updating a single ResourceKind entity.
func (*ResourceKindUpdateOne) Exec ¶
func (rkuo *ResourceKindUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ResourceKindUpdateOne) ExecX ¶
func (rkuo *ResourceKindUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResourceKindUpdateOne) Mutation ¶
func (rkuo *ResourceKindUpdateOne) Mutation() *ResourceKindMutation
Mutation returns the ResourceKindMutation object of the builder.
func (*ResourceKindUpdateOne) Save ¶
func (rkuo *ResourceKindUpdateOne) Save(ctx context.Context) (*ResourceKind, error)
Save executes the query and returns the updated ResourceKind entity.
func (*ResourceKindUpdateOne) SaveX ¶
func (rkuo *ResourceKindUpdateOne) SaveX(ctx context.Context) *ResourceKind
SaveX is like Save, but panics if an error occurs.
func (*ResourceKindUpdateOne) Select ¶
func (rkuo *ResourceKindUpdateOne) Select(field string, fields ...string) *ResourceKindUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ResourceKindUpdateOne) SetApiVersion ¶
func (rkuo *ResourceKindUpdateOne) SetApiVersion(s string) *ResourceKindUpdateOne
SetApiVersion sets the "apiVersion" field.
func (*ResourceKindUpdateOne) SetKind ¶
func (rkuo *ResourceKindUpdateOne) SetKind(s string) *ResourceKindUpdateOne
SetKind sets the "kind" field.
func (*ResourceKindUpdateOne) SetName ¶
func (rkuo *ResourceKindUpdateOne) SetName(s string) *ResourceKindUpdateOne
SetName sets the "name" field.
func (*ResourceKindUpdateOne) SetNamespaced ¶
func (rkuo *ResourceKindUpdateOne) SetNamespaced(b bool) *ResourceKindUpdateOne
SetNamespaced sets the "namespaced" field.
func (*ResourceKindUpdateOne) SetNillableApiVersion ¶
func (rkuo *ResourceKindUpdateOne) SetNillableApiVersion(s *string) *ResourceKindUpdateOne
SetNillableApiVersion sets the "apiVersion" field if the given value is not nil.
func (*ResourceKindUpdateOne) SetNillableKind ¶
func (rkuo *ResourceKindUpdateOne) SetNillableKind(s *string) *ResourceKindUpdateOne
SetNillableKind sets the "kind" field if the given value is not nil.
func (*ResourceKindUpdateOne) SetNillableName ¶
func (rkuo *ResourceKindUpdateOne) SetNillableName(s *string) *ResourceKindUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ResourceKindUpdateOne) SetNillableNamespaced ¶
func (rkuo *ResourceKindUpdateOne) SetNillableNamespaced(b *bool) *ResourceKindUpdateOne
SetNillableNamespaced sets the "namespaced" field if the given value is not nil.
func (*ResourceKindUpdateOne) Where ¶
func (rkuo *ResourceKindUpdateOne) Where(ps ...predicate.ResourceKind) *ResourceKindUpdateOne
Where appends a list predicates to the ResourceKindUpdate builder.
type ResourceKindWhereInput ¶
type ResourceKindWhereInput struct { Predicates []predicate.ResourceKind `json:"-"` Not *ResourceKindWhereInput `json:"not,omitempty"` Or []*ResourceKindWhereInput `json:"or,omitempty"` And []*ResourceKindWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "apiVersion" field predicates. ApiVersion *string `json:"apiversion,omitempty"` ApiVersionNEQ *string `json:"apiversionNEQ,omitempty"` ApiVersionIn []string `json:"apiversionIn,omitempty"` ApiVersionNotIn []string `json:"apiversionNotIn,omitempty"` ApiVersionGT *string `json:"apiversionGT,omitempty"` ApiVersionGTE *string `json:"apiversionGTE,omitempty"` ApiVersionLT *string `json:"apiversionLT,omitempty"` ApiVersionLTE *string `json:"apiversionLTE,omitempty"` ApiVersionContains *string `json:"apiversionContains,omitempty"` ApiVersionHasPrefix *string `json:"apiversionHasPrefix,omitempty"` ApiVersionHasSuffix *string `json:"apiversionHasSuffix,omitempty"` ApiVersionEqualFold *string `json:"apiversionEqualFold,omitempty"` ApiVersionContainsFold *string `json:"apiversionContainsFold,omitempty"` // "namespaced" field predicates. Namespaced *bool `json:"namespaced,omitempty"` NamespacedNEQ *bool `json:"namespacedNEQ,omitempty"` // "kind" field predicates. Kind *string `json:"kind,omitempty"` KindNEQ *string `json:"kindNEQ,omitempty"` KindIn []string `json:"kindIn,omitempty"` KindNotIn []string `json:"kindNotIn,omitempty"` KindGT *string `json:"kindGT,omitempty"` KindGTE *string `json:"kindGTE,omitempty"` KindLT *string `json:"kindLT,omitempty"` KindLTE *string `json:"kindLTE,omitempty"` KindContains *string `json:"kindContains,omitempty"` KindHasPrefix *string `json:"kindHasPrefix,omitempty"` KindHasSuffix *string `json:"kindHasSuffix,omitempty"` KindEqualFold *string `json:"kindEqualFold,omitempty"` KindContainsFold *string `json:"kindContainsFold,omitempty"` }
ResourceKindWhereInput represents a where input for filtering ResourceKind queries.
func (*ResourceKindWhereInput) AddPredicates ¶
func (i *ResourceKindWhereInput) AddPredicates(predicates ...predicate.ResourceKind)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*ResourceKindWhereInput) Filter ¶
func (i *ResourceKindWhereInput) Filter(q *ResourceKindQuery) (*ResourceKindQuery, error)
Filter applies the ResourceKindWhereInput filter on the ResourceKindQuery builder.
func (*ResourceKindWhereInput) P ¶
func (i *ResourceKindWhereInput) P() (predicate.ResourceKind, error)
P returns a predicate for filtering resourcekinds. An error is returned if the input is empty or invalid.
type ResourceKinds ¶
type ResourceKinds []*ResourceKind
ResourceKinds is a parsable slice of ResourceKind.
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 TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // AuditEvent is the client for interacting with the AuditEvent builders. AuditEvent *AuditEventClient // ResourceKind is the client for interacting with the ResourceKind builders. ResourceKind *ResourceKindClient // View is the client for interacting with the View builders. View *ViewClient // 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.
type View ¶
type View struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
View is the model entity for the View schema.
func (*View) Unwrap ¶
Unwrap unwraps the View 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 (*View) Update ¶
func (v *View) Update() *ViewUpdateOne
Update returns a builder for updating this View. Note that you need to call View.Unwrap() before calling this method if this View was returned from a transaction, and the transaction was committed or rolled back.
type ViewClient ¶
type ViewClient struct {
// contains filtered or unexported fields
}
ViewClient is a client for the View schema.
func NewViewClient ¶
func NewViewClient(c config) *ViewClient
NewViewClient returns a client for the View from the given config.
func (*ViewClient) Create ¶
func (c *ViewClient) Create() *ViewCreate
Create returns a builder for creating a View entity.
func (*ViewClient) CreateBulk ¶
func (c *ViewClient) CreateBulk(builders ...*ViewCreate) *ViewCreateBulk
CreateBulk returns a builder for creating a bulk of View entities.
func (*ViewClient) Delete ¶
func (c *ViewClient) Delete() *ViewDelete
Delete returns a delete builder for View.
func (*ViewClient) DeleteOne ¶
func (c *ViewClient) DeleteOne(v *View) *ViewDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ViewClient) DeleteOneID ¶
func (c *ViewClient) DeleteOneID(id int) *ViewDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ViewClient) GetX ¶
func (c *ViewClient) GetX(ctx context.Context, id int) *View
GetX is like Get, but panics if an error occurs.
func (*ViewClient) Intercept ¶
func (c *ViewClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `view.Intercept(f(g(h())))`.
func (*ViewClient) Interceptors ¶
func (c *ViewClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ViewClient) MapCreateBulk ¶
func (c *ViewClient) MapCreateBulk(slice any, setFunc func(*ViewCreate, int)) *ViewCreateBulk
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 (*ViewClient) Query ¶
func (c *ViewClient) Query() *ViewQuery
Query returns a query builder for View.
func (*ViewClient) Update ¶
func (c *ViewClient) Update() *ViewUpdate
Update returns an update builder for View.
func (*ViewClient) UpdateOne ¶
func (c *ViewClient) UpdateOne(v *View) *ViewUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ViewClient) UpdateOneID ¶
func (c *ViewClient) UpdateOneID(id int) *ViewUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ViewClient) Use ¶
func (c *ViewClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `view.Hooks(f(g(h())))`.
type ViewConnection ¶
type ViewConnection struct { Edges []*ViewEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
ViewConnection is the connection containing edges to View.
type ViewCreate ¶
type ViewCreate struct {
// contains filtered or unexported fields
}
ViewCreate is the builder for creating a View entity.
func (*ViewCreate) Exec ¶
func (vc *ViewCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ViewCreate) ExecX ¶
func (vc *ViewCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ViewCreate) Mutation ¶
func (vc *ViewCreate) Mutation() *ViewMutation
Mutation returns the ViewMutation object of the builder.
type ViewCreateBulk ¶
type ViewCreateBulk struct {
// contains filtered or unexported fields
}
ViewCreateBulk is the builder for creating many View entities in bulk.
func (*ViewCreateBulk) Exec ¶
func (vcb *ViewCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ViewCreateBulk) ExecX ¶
func (vcb *ViewCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ViewDelete ¶
type ViewDelete struct {
// contains filtered or unexported fields
}
ViewDelete is the builder for deleting a View entity.
func (*ViewDelete) Exec ¶
func (vd *ViewDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ViewDelete) ExecX ¶
func (vd *ViewDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ViewDelete) Where ¶
func (vd *ViewDelete) Where(ps ...predicate.View) *ViewDelete
Where appends a list predicates to the ViewDelete builder.
type ViewDeleteOne ¶
type ViewDeleteOne struct {
// contains filtered or unexported fields
}
ViewDeleteOne is the builder for deleting a single View entity.
func (*ViewDeleteOne) Exec ¶
func (vdo *ViewDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ViewDeleteOne) ExecX ¶
func (vdo *ViewDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ViewDeleteOne) Where ¶
func (vdo *ViewDeleteOne) Where(ps ...predicate.View) *ViewDeleteOne
Where appends a list predicates to the ViewDelete builder.
type ViewGroupBy ¶
type ViewGroupBy struct {
// contains filtered or unexported fields
}
ViewGroupBy is the group-by builder for View entities.
func (*ViewGroupBy) Aggregate ¶
func (vgb *ViewGroupBy) Aggregate(fns ...AggregateFunc) *ViewGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ViewGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ViewGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ViewGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ViewGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ViewGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ViewGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ViewGroupBy) Scan ¶
func (vgb *ViewGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ViewGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ViewMutation ¶
type ViewMutation struct {
// contains filtered or unexported fields
}
ViewMutation represents an operation that mutates the View nodes in the graph.
func (*ViewMutation) AddField ¶
func (m *ViewMutation) 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 (*ViewMutation) AddedEdges ¶
func (m *ViewMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ViewMutation) AddedField ¶
func (m *ViewMutation) 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 (*ViewMutation) AddedFields ¶
func (m *ViewMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ViewMutation) AddedIDs ¶
func (m *ViewMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ViewMutation) ClearEdge ¶
func (m *ViewMutation) 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 (*ViewMutation) ClearField ¶
func (m *ViewMutation) 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 (*ViewMutation) ClearedEdges ¶
func (m *ViewMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ViewMutation) ClearedFields ¶
func (m *ViewMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ViewMutation) Client ¶
func (m ViewMutation) 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 (*ViewMutation) EdgeCleared ¶
func (m *ViewMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ViewMutation) Field ¶
func (m *ViewMutation) 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 (*ViewMutation) FieldCleared ¶
func (m *ViewMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ViewMutation) Fields ¶
func (m *ViewMutation) 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 (*ViewMutation) ID ¶
func (m *ViewMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ViewMutation) IDs ¶
func (m *ViewMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ViewMutation) 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 (*ViewMutation) RemovedEdges ¶
func (m *ViewMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ViewMutation) RemovedIDs ¶
func (m *ViewMutation) 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 (*ViewMutation) ResetEdge ¶
func (m *ViewMutation) 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 (*ViewMutation) ResetField ¶
func (m *ViewMutation) 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 (*ViewMutation) SetField ¶
func (m *ViewMutation) 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 (*ViewMutation) SetOp ¶
func (m *ViewMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ViewMutation) Tx ¶
func (m ViewMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ViewMutation) Type ¶
func (m *ViewMutation) Type() string
Type returns the node type of this mutation (View).
func (*ViewMutation) Where ¶
func (m *ViewMutation) Where(ps ...predicate.View)
Where appends a list predicates to the ViewMutation builder.
func (*ViewMutation) WhereP ¶
func (m *ViewMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ViewMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ViewOrder ¶
type ViewOrder struct { Direction OrderDirection `json:"direction"` Field *ViewOrderField `json:"field"` }
ViewOrder defines the ordering of View.
type ViewOrderField ¶
type ViewOrderField struct { // Value extracts the ordering value from the given View. Value func(*View) (ent.Value, error) // contains filtered or unexported fields }
ViewOrderField defines the ordering field of View.
type ViewPaginateOption ¶
type ViewPaginateOption func(*viewPager) error
ViewPaginateOption enables pagination customization.
func WithViewFilter ¶
func WithViewFilter(filter func(*ViewQuery) (*ViewQuery, error)) ViewPaginateOption
WithViewFilter configures pagination filter.
func WithViewOrder ¶
func WithViewOrder(order *ViewOrder) ViewPaginateOption
WithViewOrder configures pagination ordering.
type ViewQuery ¶
type ViewQuery struct {
// contains filtered or unexported fields
}
ViewQuery is the builder for querying View entities.
func (*ViewQuery) Aggregate ¶
func (vq *ViewQuery) Aggregate(fns ...AggregateFunc) *ViewSelect
Aggregate returns a ViewSelect configured with the given aggregations.
func (*ViewQuery) Clone ¶
Clone returns a duplicate of the ViewQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ViewQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*ViewQuery) First ¶
First returns the first View entity from the query. Returns a *NotFoundError when no View was found.
func (*ViewQuery) FirstID ¶
FirstID returns the first View ID from the query. Returns a *NotFoundError when no View ID was found.
func (*ViewQuery) GroupBy ¶
func (vq *ViewQuery) GroupBy(field string, fields ...string) *ViewGroupBy
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.
func (*ViewQuery) Only ¶
Only returns a single View entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one View entity is found. Returns a *NotFoundError when no View entities are found.
func (*ViewQuery) OnlyID ¶
OnlyID is like Only, but returns the only View ID in the query. Returns a *NotSingularError when more than one View ID is found. Returns a *NotFoundError when no entities are found.
func (*ViewQuery) Order ¶
func (vq *ViewQuery) Order(o ...view.OrderOption) *ViewQuery
Order specifies how the records should be ordered.
func (*ViewQuery) Paginate ¶
func (v *ViewQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...ViewPaginateOption, ) (*ViewConnection, error)
Paginate executes the query and returns a relay based cursor connection to View.
func (*ViewQuery) Select ¶
func (vq *ViewQuery) Select(fields ...string) *ViewSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
type ViewSelect ¶
type ViewSelect struct { *ViewQuery // contains filtered or unexported fields }
ViewSelect is the builder for selecting fields of View entities.
func (*ViewSelect) Aggregate ¶
func (vs *ViewSelect) Aggregate(fns ...AggregateFunc) *ViewSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ViewSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ViewSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ViewSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ViewSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ViewSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ViewSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ViewSelect) Scan ¶
func (vs *ViewSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ViewSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ViewUpdate ¶
type ViewUpdate struct {
// contains filtered or unexported fields
}
ViewUpdate is the builder for updating View entities.
func (*ViewUpdate) Exec ¶
func (vu *ViewUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ViewUpdate) ExecX ¶
func (vu *ViewUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ViewUpdate) Mutation ¶
func (vu *ViewUpdate) Mutation() *ViewMutation
Mutation returns the ViewMutation object of the builder.
func (*ViewUpdate) Save ¶
func (vu *ViewUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ViewUpdate) SaveX ¶
func (vu *ViewUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ViewUpdate) Where ¶
func (vu *ViewUpdate) Where(ps ...predicate.View) *ViewUpdate
Where appends a list predicates to the ViewUpdate builder.
type ViewUpdateOne ¶
type ViewUpdateOne struct {
// contains filtered or unexported fields
}
ViewUpdateOne is the builder for updating a single View entity.
func (*ViewUpdateOne) Exec ¶
func (vuo *ViewUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ViewUpdateOne) ExecX ¶
func (vuo *ViewUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ViewUpdateOne) Mutation ¶
func (vuo *ViewUpdateOne) Mutation() *ViewMutation
Mutation returns the ViewMutation object of the builder.
func (*ViewUpdateOne) Save ¶
func (vuo *ViewUpdateOne) Save(ctx context.Context) (*View, error)
Save executes the query and returns the updated View entity.
func (*ViewUpdateOne) SaveX ¶
func (vuo *ViewUpdateOne) SaveX(ctx context.Context) *View
SaveX is like Save, but panics if an error occurs.
func (*ViewUpdateOne) Select ¶
func (vuo *ViewUpdateOne) Select(field string, fields ...string) *ViewUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ViewUpdateOne) Where ¶
func (vuo *ViewUpdateOne) Where(ps ...predicate.View) *ViewUpdateOne
Where appends a list predicates to the ViewUpdate builder.
type ViewWhereInput ¶
type ViewWhereInput struct { Predicates []predicate.View `json:"-"` Not *ViewWhereInput `json:"not,omitempty"` Or []*ViewWhereInput `json:"or,omitempty"` And []*ViewWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` }
ViewWhereInput represents a where input for filtering View queries.
func (*ViewWhereInput) AddPredicates ¶
func (i *ViewWhereInput) AddPredicates(predicates ...predicate.View)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
Source Files ¶
- auditevent.go
- auditevent_create.go
- auditevent_delete.go
- auditevent_query.go
- auditevent_update.go
- client.go
- ent.go
- gql_collection.go
- gql_edge.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- mutation.go
- resourcekind.go
- resourcekind_create.go
- resourcekind_delete.go
- resourcekind_query.go
- resourcekind_update.go
- runtime.go
- tx.go
- view.go
- view_create.go
- view_delete.go
- view_query.go
- view_update.go