Documentation
¶
Index ¶
- Constants
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Agent
- type AgentClient
- func (c *AgentClient) Create() *AgentCreate
- func (c *AgentClient) CreateBulk(builders ...*AgentCreate) *AgentCreateBulk
- func (c *AgentClient) Delete() *AgentDelete
- func (c *AgentClient) DeleteOne(a *Agent) *AgentDeleteOne
- func (c *AgentClient) DeleteOneID(id int) *AgentDeleteOne
- func (c *AgentClient) Get(ctx context.Context, id int) (*Agent, error)
- func (c *AgentClient) GetX(ctx context.Context, id int) *Agent
- func (c *AgentClient) Hooks() []Hook
- func (c *AgentClient) Intercept(interceptors ...Interceptor)
- func (c *AgentClient) Interceptors() []Interceptor
- func (c *AgentClient) Query() *AgentQuery
- func (c *AgentClient) QueryTags(a *Agent) *TagQuery
- func (c *AgentClient) Update() *AgentUpdate
- func (c *AgentClient) UpdateOne(a *Agent) *AgentUpdateOne
- func (c *AgentClient) UpdateOneID(id int) *AgentUpdateOne
- func (c *AgentClient) Use(hooks ...Hook)
- type AgentCreate
- func (ac *AgentCreate) AddTagIDs(ids ...int) *AgentCreate
- func (ac *AgentCreate) AddTags(t ...*Tag) *AgentCreate
- func (ac *AgentCreate) Exec(ctx context.Context) error
- func (ac *AgentCreate) ExecX(ctx context.Context)
- func (ac *AgentCreate) Mutation() *AgentMutation
- func (ac *AgentCreate) Save(ctx context.Context) (*Agent, error)
- func (ac *AgentCreate) SaveX(ctx context.Context) *Agent
- func (ac *AgentCreate) SetCreatedAt(t time.Time) *AgentCreate
- func (ac *AgentCreate) SetHostname(s string) *AgentCreate
- func (ac *AgentCreate) SetNillableCreatedAt(t *time.Time) *AgentCreate
- type AgentCreateBulk
- type AgentDelete
- type AgentDeleteOne
- type AgentEdges
- type AgentGroupBy
- func (agb *AgentGroupBy) Aggregate(fns ...AggregateFunc) *AgentGroupBy
- func (s *AgentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AgentGroupBy) BoolX(ctx context.Context) bool
- func (s *AgentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AgentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AgentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AgentGroupBy) Float64X(ctx context.Context) float64
- func (s *AgentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AgentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AgentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AgentGroupBy) IntX(ctx context.Context) int
- func (s *AgentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AgentGroupBy) IntsX(ctx context.Context) []int
- func (agb *AgentGroupBy) Scan(ctx context.Context, v any) error
- func (s *AgentGroupBy) ScanX(ctx context.Context, v any)
- func (s *AgentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AgentGroupBy) StringX(ctx context.Context) string
- func (s *AgentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AgentGroupBy) StringsX(ctx context.Context) []string
- type AgentMutation
- func (m *AgentMutation) AddField(name string, value ent.Value) error
- func (m *AgentMutation) AddTagIDs(ids ...int)
- func (m *AgentMutation) AddedEdges() []string
- func (m *AgentMutation) AddedField(name string) (ent.Value, bool)
- func (m *AgentMutation) AddedFields() []string
- func (m *AgentMutation) AddedIDs(name string) []ent.Value
- func (m *AgentMutation) ClearEdge(name string) error
- func (m *AgentMutation) ClearField(name string) error
- func (m *AgentMutation) ClearTags()
- func (m *AgentMutation) ClearedEdges() []string
- func (m *AgentMutation) ClearedFields() []string
- func (m AgentMutation) Client() *Client
- func (m *AgentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AgentMutation) EdgeCleared(name string) bool
- func (m *AgentMutation) Field(name string) (ent.Value, bool)
- func (m *AgentMutation) FieldCleared(name string) bool
- func (m *AgentMutation) Fields() []string
- func (m *AgentMutation) Hostname() (r string, exists bool)
- func (m *AgentMutation) ID() (id int, exists bool)
- func (m *AgentMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AgentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AgentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AgentMutation) OldHostname(ctx context.Context) (v string, err error)
- func (m *AgentMutation) Op() Op
- func (m *AgentMutation) RemoveTagIDs(ids ...int)
- func (m *AgentMutation) RemovedEdges() []string
- func (m *AgentMutation) RemovedIDs(name string) []ent.Value
- func (m *AgentMutation) RemovedTagsIDs() (ids []int)
- func (m *AgentMutation) ResetCreatedAt()
- func (m *AgentMutation) ResetEdge(name string) error
- func (m *AgentMutation) ResetField(name string) error
- func (m *AgentMutation) ResetHostname()
- func (m *AgentMutation) ResetTags()
- func (m *AgentMutation) SetCreatedAt(t time.Time)
- func (m *AgentMutation) SetField(name string, value ent.Value) error
- func (m *AgentMutation) SetHostname(s string)
- func (m *AgentMutation) SetOp(op Op)
- func (m *AgentMutation) TagsCleared() bool
- func (m *AgentMutation) TagsIDs() (ids []int)
- func (m AgentMutation) Tx() (*Tx, error)
- func (m *AgentMutation) Type() string
- func (m *AgentMutation) Where(ps ...predicate.Agent)
- func (m *AgentMutation) WhereP(ps ...func(*sql.Selector))
- type AgentQuery
- func (aq *AgentQuery) Aggregate(fns ...AggregateFunc) *AgentSelect
- func (aq *AgentQuery) All(ctx context.Context) ([]*Agent, error)
- func (aq *AgentQuery) AllX(ctx context.Context) []*Agent
- func (aq *AgentQuery) Clone() *AgentQuery
- func (aq *AgentQuery) Count(ctx context.Context) (int, error)
- func (aq *AgentQuery) CountX(ctx context.Context) int
- func (aq *AgentQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AgentQuery) ExistX(ctx context.Context) bool
- func (aq *AgentQuery) First(ctx context.Context) (*Agent, error)
- func (aq *AgentQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AgentQuery) FirstIDX(ctx context.Context) int
- func (aq *AgentQuery) FirstX(ctx context.Context) *Agent
- func (aq *AgentQuery) GroupBy(field string, fields ...string) *AgentGroupBy
- func (aq *AgentQuery) IDs(ctx context.Context) (ids []int, err error)
- func (aq *AgentQuery) IDsX(ctx context.Context) []int
- func (aq *AgentQuery) Limit(limit int) *AgentQuery
- func (aq *AgentQuery) Offset(offset int) *AgentQuery
- func (aq *AgentQuery) Only(ctx context.Context) (*Agent, error)
- func (aq *AgentQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AgentQuery) OnlyIDX(ctx context.Context) int
- func (aq *AgentQuery) OnlyX(ctx context.Context) *Agent
- func (aq *AgentQuery) Order(o ...agent.OrderOption) *AgentQuery
- func (aq *AgentQuery) QueryTags() *TagQuery
- func (aq *AgentQuery) Select(fields ...string) *AgentSelect
- func (aq *AgentQuery) Unique(unique bool) *AgentQuery
- func (aq *AgentQuery) Where(ps ...predicate.Agent) *AgentQuery
- func (aq *AgentQuery) WithTags(opts ...func(*TagQuery)) *AgentQuery
- type AgentSelect
- func (as *AgentSelect) Aggregate(fns ...AggregateFunc) *AgentSelect
- func (s *AgentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AgentSelect) BoolX(ctx context.Context) bool
- func (s *AgentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AgentSelect) BoolsX(ctx context.Context) []bool
- func (s *AgentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AgentSelect) Float64X(ctx context.Context) float64
- func (s *AgentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AgentSelect) Float64sX(ctx context.Context) []float64
- func (s *AgentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AgentSelect) IntX(ctx context.Context) int
- func (s *AgentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AgentSelect) IntsX(ctx context.Context) []int
- func (as *AgentSelect) Scan(ctx context.Context, v any) error
- func (s *AgentSelect) ScanX(ctx context.Context, v any)
- func (s *AgentSelect) String(ctx context.Context) (_ string, err error)
- func (s *AgentSelect) StringX(ctx context.Context) string
- func (s *AgentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AgentSelect) StringsX(ctx context.Context) []string
- type AgentUpdate
- func (au *AgentUpdate) AddTagIDs(ids ...int) *AgentUpdate
- func (au *AgentUpdate) AddTags(t ...*Tag) *AgentUpdate
- func (au *AgentUpdate) ClearTags() *AgentUpdate
- func (au *AgentUpdate) Exec(ctx context.Context) error
- func (au *AgentUpdate) ExecX(ctx context.Context)
- func (au *AgentUpdate) Mutation() *AgentMutation
- func (au *AgentUpdate) RemoveTagIDs(ids ...int) *AgentUpdate
- func (au *AgentUpdate) RemoveTags(t ...*Tag) *AgentUpdate
- func (au *AgentUpdate) Save(ctx context.Context) (int, error)
- func (au *AgentUpdate) SaveX(ctx context.Context) int
- func (au *AgentUpdate) SetCreatedAt(t time.Time) *AgentUpdate
- func (au *AgentUpdate) SetHostname(s string) *AgentUpdate
- func (au *AgentUpdate) SetNillableCreatedAt(t *time.Time) *AgentUpdate
- func (au *AgentUpdate) Where(ps ...predicate.Agent) *AgentUpdate
- type AgentUpdateOne
- func (auo *AgentUpdateOne) AddTagIDs(ids ...int) *AgentUpdateOne
- func (auo *AgentUpdateOne) AddTags(t ...*Tag) *AgentUpdateOne
- func (auo *AgentUpdateOne) ClearTags() *AgentUpdateOne
- func (auo *AgentUpdateOne) Exec(ctx context.Context) error
- func (auo *AgentUpdateOne) ExecX(ctx context.Context)
- func (auo *AgentUpdateOne) Mutation() *AgentMutation
- func (auo *AgentUpdateOne) RemoveTagIDs(ids ...int) *AgentUpdateOne
- func (auo *AgentUpdateOne) RemoveTags(t ...*Tag) *AgentUpdateOne
- func (auo *AgentUpdateOne) Save(ctx context.Context) (*Agent, error)
- func (auo *AgentUpdateOne) SaveX(ctx context.Context) *Agent
- func (auo *AgentUpdateOne) Select(field string, fields ...string) *AgentUpdateOne
- func (auo *AgentUpdateOne) SetCreatedAt(t time.Time) *AgentUpdateOne
- func (auo *AgentUpdateOne) SetHostname(s string) *AgentUpdateOne
- func (auo *AgentUpdateOne) SetNillableCreatedAt(t *time.Time) *AgentUpdateOne
- func (auo *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne
- type Agents
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type OIDCConfig
- type OIDCConfigClient
- func (c *OIDCConfigClient) Create() *OIDCConfigCreate
- func (c *OIDCConfigClient) CreateBulk(builders ...*OIDCConfigCreate) *OIDCConfigCreateBulk
- func (c *OIDCConfigClient) Delete() *OIDCConfigDelete
- func (c *OIDCConfigClient) DeleteOne(oc *OIDCConfig) *OIDCConfigDeleteOne
- func (c *OIDCConfigClient) DeleteOneID(id int) *OIDCConfigDeleteOne
- func (c *OIDCConfigClient) Get(ctx context.Context, id int) (*OIDCConfig, error)
- func (c *OIDCConfigClient) GetX(ctx context.Context, id int) *OIDCConfig
- func (c *OIDCConfigClient) Hooks() []Hook
- func (c *OIDCConfigClient) Intercept(interceptors ...Interceptor)
- func (c *OIDCConfigClient) Interceptors() []Interceptor
- func (c *OIDCConfigClient) Query() *OIDCConfigQuery
- func (c *OIDCConfigClient) Update() *OIDCConfigUpdate
- func (c *OIDCConfigClient) UpdateOne(oc *OIDCConfig) *OIDCConfigUpdateOne
- func (c *OIDCConfigClient) UpdateOneID(id int) *OIDCConfigUpdateOne
- func (c *OIDCConfigClient) Use(hooks ...Hook)
- type OIDCConfigCreate
- func (occ *OIDCConfigCreate) Exec(ctx context.Context) error
- func (occ *OIDCConfigCreate) ExecX(ctx context.Context)
- func (occ *OIDCConfigCreate) Mutation() *OIDCConfigMutation
- func (occ *OIDCConfigCreate) Save(ctx context.Context) (*OIDCConfig, error)
- func (occ *OIDCConfigCreate) SaveX(ctx context.Context) *OIDCConfig
- func (occ *OIDCConfigCreate) SetClientID(s string) *OIDCConfigCreate
- func (occ *OIDCConfigCreate) SetClientSecret(s string) *OIDCConfigCreate
- func (occ *OIDCConfigCreate) SetDiscoveryURI(s string) *OIDCConfigCreate
- func (occ *OIDCConfigCreate) SetProviderKey(s string) *OIDCConfigCreate
- func (occ *OIDCConfigCreate) SetProviderName(s string) *OIDCConfigCreate
- func (occ *OIDCConfigCreate) SetRedirectURI(s string) *OIDCConfigCreate
- type OIDCConfigCreateBulk
- type OIDCConfigDelete
- type OIDCConfigDeleteOne
- type OIDCConfigGroupBy
- func (ocgb *OIDCConfigGroupBy) Aggregate(fns ...AggregateFunc) *OIDCConfigGroupBy
- func (s *OIDCConfigGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OIDCConfigGroupBy) BoolX(ctx context.Context) bool
- func (s *OIDCConfigGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OIDCConfigGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OIDCConfigGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OIDCConfigGroupBy) Float64X(ctx context.Context) float64
- func (s *OIDCConfigGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OIDCConfigGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OIDCConfigGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OIDCConfigGroupBy) IntX(ctx context.Context) int
- func (s *OIDCConfigGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OIDCConfigGroupBy) IntsX(ctx context.Context) []int
- func (ocgb *OIDCConfigGroupBy) Scan(ctx context.Context, v any) error
- func (s *OIDCConfigGroupBy) ScanX(ctx context.Context, v any)
- func (s *OIDCConfigGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OIDCConfigGroupBy) StringX(ctx context.Context) string
- func (s *OIDCConfigGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OIDCConfigGroupBy) StringsX(ctx context.Context) []string
- type OIDCConfigMutation
- func (m *OIDCConfigMutation) AddField(name string, value ent.Value) error
- func (m *OIDCConfigMutation) AddedEdges() []string
- func (m *OIDCConfigMutation) AddedField(name string) (ent.Value, bool)
- func (m *OIDCConfigMutation) AddedFields() []string
- func (m *OIDCConfigMutation) AddedIDs(name string) []ent.Value
- func (m *OIDCConfigMutation) ClearEdge(name string) error
- func (m *OIDCConfigMutation) ClearField(name string) error
- func (m *OIDCConfigMutation) ClearedEdges() []string
- func (m *OIDCConfigMutation) ClearedFields() []string
- func (m OIDCConfigMutation) Client() *Client
- func (m *OIDCConfigMutation) ClientID() (r string, exists bool)
- func (m *OIDCConfigMutation) ClientSecret() (r string, exists bool)
- func (m *OIDCConfigMutation) DiscoveryURI() (r string, exists bool)
- func (m *OIDCConfigMutation) EdgeCleared(name string) bool
- func (m *OIDCConfigMutation) Field(name string) (ent.Value, bool)
- func (m *OIDCConfigMutation) FieldCleared(name string) bool
- func (m *OIDCConfigMutation) Fields() []string
- func (m *OIDCConfigMutation) ID() (id int, exists bool)
- func (m *OIDCConfigMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OIDCConfigMutation) OldClientID(ctx context.Context) (v string, err error)
- func (m *OIDCConfigMutation) OldClientSecret(ctx context.Context) (v string, err error)
- func (m *OIDCConfigMutation) OldDiscoveryURI(ctx context.Context) (v string, err error)
- func (m *OIDCConfigMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OIDCConfigMutation) OldProviderKey(ctx context.Context) (v string, err error)
- func (m *OIDCConfigMutation) OldProviderName(ctx context.Context) (v string, err error)
- func (m *OIDCConfigMutation) OldRedirectURI(ctx context.Context) (v string, err error)
- func (m *OIDCConfigMutation) Op() Op
- func (m *OIDCConfigMutation) ProviderKey() (r string, exists bool)
- func (m *OIDCConfigMutation) ProviderName() (r string, exists bool)
- func (m *OIDCConfigMutation) RedirectURI() (r string, exists bool)
- func (m *OIDCConfigMutation) RemovedEdges() []string
- func (m *OIDCConfigMutation) RemovedIDs(name string) []ent.Value
- func (m *OIDCConfigMutation) ResetClientID()
- func (m *OIDCConfigMutation) ResetClientSecret()
- func (m *OIDCConfigMutation) ResetDiscoveryURI()
- func (m *OIDCConfigMutation) ResetEdge(name string) error
- func (m *OIDCConfigMutation) ResetField(name string) error
- func (m *OIDCConfigMutation) ResetProviderKey()
- func (m *OIDCConfigMutation) ResetProviderName()
- func (m *OIDCConfigMutation) ResetRedirectURI()
- func (m *OIDCConfigMutation) SetClientID(s string)
- func (m *OIDCConfigMutation) SetClientSecret(s string)
- func (m *OIDCConfigMutation) SetDiscoveryURI(s string)
- func (m *OIDCConfigMutation) SetField(name string, value ent.Value) error
- func (m *OIDCConfigMutation) SetOp(op Op)
- func (m *OIDCConfigMutation) SetProviderKey(s string)
- func (m *OIDCConfigMutation) SetProviderName(s string)
- func (m *OIDCConfigMutation) SetRedirectURI(s string)
- func (m OIDCConfigMutation) Tx() (*Tx, error)
- func (m *OIDCConfigMutation) Type() string
- func (m *OIDCConfigMutation) Where(ps ...predicate.OIDCConfig)
- func (m *OIDCConfigMutation) WhereP(ps ...func(*sql.Selector))
- type OIDCConfigQuery
- func (ocq *OIDCConfigQuery) Aggregate(fns ...AggregateFunc) *OIDCConfigSelect
- func (ocq *OIDCConfigQuery) All(ctx context.Context) ([]*OIDCConfig, error)
- func (ocq *OIDCConfigQuery) AllX(ctx context.Context) []*OIDCConfig
- func (ocq *OIDCConfigQuery) Clone() *OIDCConfigQuery
- func (ocq *OIDCConfigQuery) Count(ctx context.Context) (int, error)
- func (ocq *OIDCConfigQuery) CountX(ctx context.Context) int
- func (ocq *OIDCConfigQuery) Exist(ctx context.Context) (bool, error)
- func (ocq *OIDCConfigQuery) ExistX(ctx context.Context) bool
- func (ocq *OIDCConfigQuery) First(ctx context.Context) (*OIDCConfig, error)
- func (ocq *OIDCConfigQuery) FirstID(ctx context.Context) (id int, err error)
- func (ocq *OIDCConfigQuery) FirstIDX(ctx context.Context) int
- func (ocq *OIDCConfigQuery) FirstX(ctx context.Context) *OIDCConfig
- func (ocq *OIDCConfigQuery) GroupBy(field string, fields ...string) *OIDCConfigGroupBy
- func (ocq *OIDCConfigQuery) IDs(ctx context.Context) (ids []int, err error)
- func (ocq *OIDCConfigQuery) IDsX(ctx context.Context) []int
- func (ocq *OIDCConfigQuery) Limit(limit int) *OIDCConfigQuery
- func (ocq *OIDCConfigQuery) Offset(offset int) *OIDCConfigQuery
- func (ocq *OIDCConfigQuery) Only(ctx context.Context) (*OIDCConfig, error)
- func (ocq *OIDCConfigQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ocq *OIDCConfigQuery) OnlyIDX(ctx context.Context) int
- func (ocq *OIDCConfigQuery) OnlyX(ctx context.Context) *OIDCConfig
- func (ocq *OIDCConfigQuery) Order(o ...oidcconfig.OrderOption) *OIDCConfigQuery
- func (ocq *OIDCConfigQuery) Select(fields ...string) *OIDCConfigSelect
- func (ocq *OIDCConfigQuery) Unique(unique bool) *OIDCConfigQuery
- func (ocq *OIDCConfigQuery) Where(ps ...predicate.OIDCConfig) *OIDCConfigQuery
- type OIDCConfigSelect
- func (ocs *OIDCConfigSelect) Aggregate(fns ...AggregateFunc) *OIDCConfigSelect
- func (s *OIDCConfigSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OIDCConfigSelect) BoolX(ctx context.Context) bool
- func (s *OIDCConfigSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OIDCConfigSelect) BoolsX(ctx context.Context) []bool
- func (s *OIDCConfigSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OIDCConfigSelect) Float64X(ctx context.Context) float64
- func (s *OIDCConfigSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OIDCConfigSelect) Float64sX(ctx context.Context) []float64
- func (s *OIDCConfigSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OIDCConfigSelect) IntX(ctx context.Context) int
- func (s *OIDCConfigSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OIDCConfigSelect) IntsX(ctx context.Context) []int
- func (ocs *OIDCConfigSelect) Scan(ctx context.Context, v any) error
- func (s *OIDCConfigSelect) ScanX(ctx context.Context, v any)
- func (s *OIDCConfigSelect) String(ctx context.Context) (_ string, err error)
- func (s *OIDCConfigSelect) StringX(ctx context.Context) string
- func (s *OIDCConfigSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OIDCConfigSelect) StringsX(ctx context.Context) []string
- type OIDCConfigUpdate
- func (ocu *OIDCConfigUpdate) Exec(ctx context.Context) error
- func (ocu *OIDCConfigUpdate) ExecX(ctx context.Context)
- func (ocu *OIDCConfigUpdate) Mutation() *OIDCConfigMutation
- func (ocu *OIDCConfigUpdate) Save(ctx context.Context) (int, error)
- func (ocu *OIDCConfigUpdate) SaveX(ctx context.Context) int
- func (ocu *OIDCConfigUpdate) SetClientID(s string) *OIDCConfigUpdate
- func (ocu *OIDCConfigUpdate) SetClientSecret(s string) *OIDCConfigUpdate
- func (ocu *OIDCConfigUpdate) SetDiscoveryURI(s string) *OIDCConfigUpdate
- func (ocu *OIDCConfigUpdate) SetProviderKey(s string) *OIDCConfigUpdate
- func (ocu *OIDCConfigUpdate) SetProviderName(s string) *OIDCConfigUpdate
- func (ocu *OIDCConfigUpdate) SetRedirectURI(s string) *OIDCConfigUpdate
- func (ocu *OIDCConfigUpdate) Where(ps ...predicate.OIDCConfig) *OIDCConfigUpdate
- type OIDCConfigUpdateOne
- func (ocuo *OIDCConfigUpdateOne) Exec(ctx context.Context) error
- func (ocuo *OIDCConfigUpdateOne) ExecX(ctx context.Context)
- func (ocuo *OIDCConfigUpdateOne) Mutation() *OIDCConfigMutation
- func (ocuo *OIDCConfigUpdateOne) Save(ctx context.Context) (*OIDCConfig, error)
- func (ocuo *OIDCConfigUpdateOne) SaveX(ctx context.Context) *OIDCConfig
- func (ocuo *OIDCConfigUpdateOne) Select(field string, fields ...string) *OIDCConfigUpdateOne
- func (ocuo *OIDCConfigUpdateOne) SetClientID(s string) *OIDCConfigUpdateOne
- func (ocuo *OIDCConfigUpdateOne) SetClientSecret(s string) *OIDCConfigUpdateOne
- func (ocuo *OIDCConfigUpdateOne) SetDiscoveryURI(s string) *OIDCConfigUpdateOne
- func (ocuo *OIDCConfigUpdateOne) SetProviderKey(s string) *OIDCConfigUpdateOne
- func (ocuo *OIDCConfigUpdateOne) SetProviderName(s string) *OIDCConfigUpdateOne
- func (ocuo *OIDCConfigUpdateOne) SetRedirectURI(s string) *OIDCConfigUpdateOne
- func (ocuo *OIDCConfigUpdateOne) Where(ps ...predicate.OIDCConfig) *OIDCConfigUpdateOne
- type OIDCConfigs
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tag
- type TagClient
- func (c *TagClient) Create() *TagCreate
- func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
- func (c *TagClient) Delete() *TagDelete
- func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
- func (c *TagClient) DeleteOneID(id int) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id int) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id int) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryAgents(t *Tag) *AgentQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id int) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddAgentIDs(ids ...int) *TagCreate
- func (tc *TagCreate) AddAgents(a ...*Agent) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetName(s string) *TagCreate
- func (tc *TagCreate) SetValue(s string) *TagCreate
- type TagCreateBulk
- type TagDelete
- type TagDeleteOne
- type TagEdges
- type TagGroupBy
- func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
- func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagGroupBy) BoolX(ctx context.Context) bool
- func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagGroupBy) Float64X(ctx context.Context) float64
- func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagGroupBy) IntX(ctx context.Context) int
- func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v any)
- func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagGroupBy) StringX(ctx context.Context) string
- func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagGroupBy) StringsX(ctx context.Context) []string
- type TagMutation
- func (m *TagMutation) AddAgentIDs(ids ...int)
- func (m *TagMutation) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddedEdges() []string
- func (m *TagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagMutation) AddedFields() []string
- func (m *TagMutation) AddedIDs(name string) []ent.Value
- func (m *TagMutation) AgentsCleared() bool
- func (m *TagMutation) AgentsIDs() (ids []int)
- func (m *TagMutation) ClearAgents()
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) EdgeCleared(name string) bool
- func (m *TagMutation) Field(name string) (ent.Value, bool)
- func (m *TagMutation) FieldCleared(name string) bool
- func (m *TagMutation) Fields() []string
- func (m *TagMutation) ID() (id int, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TagMutation) Name() (r string, exists bool)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TagMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) RemoveAgentIDs(ids ...int)
- func (m *TagMutation) RemovedAgentsIDs() (ids []int)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) ResetAgents()
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetName()
- func (m *TagMutation) ResetValue()
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetName(s string)
- func (m *TagMutation) SetOp(op Op)
- func (m *TagMutation) SetValue(s string)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) Value() (r string, exists bool)
- func (m *TagMutation) Where(ps ...predicate.Tag)
- func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
- type TagQuery
- func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
- func (tq *TagQuery) All(ctx context.Context) ([]*Tag, error)
- func (tq *TagQuery) AllX(ctx context.Context) []*Tag
- func (tq *TagQuery) Clone() *TagQuery
- func (tq *TagQuery) Count(ctx context.Context) (int, error)
- func (tq *TagQuery) CountX(ctx context.Context) int
- func (tq *TagQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TagQuery) ExistX(ctx context.Context) bool
- func (tq *TagQuery) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) int
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []int
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) int
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
- func (tq *TagQuery) QueryAgents() *AgentQuery
- func (tq *TagQuery) Select(fields ...string) *TagSelect
- func (tq *TagQuery) Unique(unique bool) *TagQuery
- func (tq *TagQuery) Where(ps ...predicate.Tag) *TagQuery
- func (tq *TagQuery) WithAgents(opts ...func(*AgentQuery)) *TagQuery
- type TagSelect
- func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
- func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagSelect) BoolX(ctx context.Context) bool
- func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagSelect) BoolsX(ctx context.Context) []bool
- func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagSelect) Float64X(ctx context.Context) float64
- func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagSelect) Float64sX(ctx context.Context) []float64
- func (s *TagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagSelect) IntX(ctx context.Context) int
- func (s *TagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagSelect) IntsX(ctx context.Context) []int
- func (ts *TagSelect) Scan(ctx context.Context, v any) error
- func (s *TagSelect) ScanX(ctx context.Context, v any)
- func (s *TagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagSelect) StringX(ctx context.Context) string
- func (s *TagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagSelect) StringsX(ctx context.Context) []string
- type TagUpdate
- func (tu *TagUpdate) AddAgentIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) AddAgents(a ...*Agent) *TagUpdate
- func (tu *TagUpdate) ClearAgents() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveAgentIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) RemoveAgents(a ...*Agent) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetName(s string) *TagUpdate
- func (tu *TagUpdate) SetValue(s string) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddAgentIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) AddAgents(a ...*Agent) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearAgents() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveAgentIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveAgents(a ...*Agent) *TagUpdateOne
- func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
- func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
- func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetValue(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
- type Tags
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAgent = "Agent" TypeOIDCConfig = "OIDCConfig" TypeTag = "Tag" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Agent ¶
type Agent struct { // ID of the ent. ID int `json:"id,omitempty"` // Hostname holds the value of the "hostname" field. Hostname string `json:"hostname,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AgentQuery when eager-loading is set. Edges AgentEdges `json:"edges"` // contains filtered or unexported fields }
Agent is the model entity for the Agent schema.
func (*Agent) Unwrap ¶
Unwrap unwraps the Agent 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 (*Agent) Update ¶
func (a *Agent) Update() *AgentUpdateOne
Update returns a builder for updating this Agent. Note that you need to call Agent.Unwrap() before calling this method if this Agent was returned from a transaction, and the transaction was committed or rolled back.
type AgentClient ¶
type AgentClient struct {
// contains filtered or unexported fields
}
AgentClient is a client for the Agent schema.
func NewAgentClient ¶
func NewAgentClient(c config) *AgentClient
NewAgentClient returns a client for the Agent from the given config.
func (*AgentClient) Create ¶
func (c *AgentClient) Create() *AgentCreate
Create returns a builder for creating a Agent entity.
func (*AgentClient) CreateBulk ¶
func (c *AgentClient) CreateBulk(builders ...*AgentCreate) *AgentCreateBulk
CreateBulk returns a builder for creating a bulk of Agent entities.
func (*AgentClient) Delete ¶
func (c *AgentClient) Delete() *AgentDelete
Delete returns a delete builder for Agent.
func (*AgentClient) DeleteOne ¶
func (c *AgentClient) DeleteOne(a *Agent) *AgentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AgentClient) DeleteOneID ¶
func (c *AgentClient) DeleteOneID(id int) *AgentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AgentClient) GetX ¶
func (c *AgentClient) GetX(ctx context.Context, id int) *Agent
GetX is like Get, but panics if an error occurs.
func (*AgentClient) Intercept ¶
func (c *AgentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `agent.Intercept(f(g(h())))`.
func (*AgentClient) Interceptors ¶
func (c *AgentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AgentClient) Query ¶
func (c *AgentClient) Query() *AgentQuery
Query returns a query builder for Agent.
func (*AgentClient) QueryTags ¶
func (c *AgentClient) QueryTags(a *Agent) *TagQuery
QueryTags queries the tags edge of a Agent.
func (*AgentClient) Update ¶
func (c *AgentClient) Update() *AgentUpdate
Update returns an update builder for Agent.
func (*AgentClient) UpdateOne ¶
func (c *AgentClient) UpdateOne(a *Agent) *AgentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AgentClient) UpdateOneID ¶
func (c *AgentClient) UpdateOneID(id int) *AgentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AgentClient) Use ¶
func (c *AgentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `agent.Hooks(f(g(h())))`.
type AgentCreate ¶
type AgentCreate struct {
// contains filtered or unexported fields
}
AgentCreate is the builder for creating a Agent entity.
func (*AgentCreate) AddTagIDs ¶
func (ac *AgentCreate) AddTagIDs(ids ...int) *AgentCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*AgentCreate) AddTags ¶
func (ac *AgentCreate) AddTags(t ...*Tag) *AgentCreate
AddTags adds the "tags" edges to the Tag entity.
func (*AgentCreate) Exec ¶
func (ac *AgentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentCreate) ExecX ¶
func (ac *AgentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentCreate) Mutation ¶
func (ac *AgentCreate) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentCreate) Save ¶
func (ac *AgentCreate) Save(ctx context.Context) (*Agent, error)
Save creates the Agent in the database.
func (*AgentCreate) SaveX ¶
func (ac *AgentCreate) SaveX(ctx context.Context) *Agent
SaveX calls Save and panics if Save returns an error.
func (*AgentCreate) SetCreatedAt ¶
func (ac *AgentCreate) SetCreatedAt(t time.Time) *AgentCreate
SetCreatedAt sets the "created_at" field.
func (*AgentCreate) SetHostname ¶
func (ac *AgentCreate) SetHostname(s string) *AgentCreate
SetHostname sets the "hostname" field.
func (*AgentCreate) SetNillableCreatedAt ¶
func (ac *AgentCreate) SetNillableCreatedAt(t *time.Time) *AgentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
type AgentCreateBulk ¶
type AgentCreateBulk struct {
// contains filtered or unexported fields
}
AgentCreateBulk is the builder for creating many Agent entities in bulk.
func (*AgentCreateBulk) Exec ¶
func (acb *AgentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentCreateBulk) ExecX ¶
func (acb *AgentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AgentDelete ¶
type AgentDelete struct {
// contains filtered or unexported fields
}
AgentDelete is the builder for deleting a Agent entity.
func (*AgentDelete) Exec ¶
func (ad *AgentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AgentDelete) ExecX ¶
func (ad *AgentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AgentDelete) Where ¶
func (ad *AgentDelete) Where(ps ...predicate.Agent) *AgentDelete
Where appends a list predicates to the AgentDelete builder.
type AgentDeleteOne ¶
type AgentDeleteOne struct {
// contains filtered or unexported fields
}
AgentDeleteOne is the builder for deleting a single Agent entity.
func (*AgentDeleteOne) Exec ¶
func (ado *AgentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AgentDeleteOne) ExecX ¶
func (ado *AgentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentDeleteOne) Where ¶
func (ado *AgentDeleteOne) Where(ps ...predicate.Agent) *AgentDeleteOne
Where appends a list predicates to the AgentDelete builder.
type AgentEdges ¶
type AgentEdges struct { // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // contains filtered or unexported fields }
AgentEdges holds the relations/edges for other nodes in the graph.
func (AgentEdges) TagsOrErr ¶
func (e AgentEdges) TagsOrErr() ([]*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
type AgentGroupBy ¶
type AgentGroupBy struct {
// contains filtered or unexported fields
}
AgentGroupBy is the group-by builder for Agent entities.
func (*AgentGroupBy) Aggregate ¶
func (agb *AgentGroupBy) Aggregate(fns ...AggregateFunc) *AgentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AgentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Scan ¶
func (agb *AgentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AgentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AgentMutation ¶
type AgentMutation struct {
// contains filtered or unexported fields
}
AgentMutation represents an operation that mutates the Agent nodes in the graph.
func (*AgentMutation) AddField ¶
func (m *AgentMutation) 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 (*AgentMutation) AddTagIDs ¶
func (m *AgentMutation) AddTagIDs(ids ...int)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*AgentMutation) AddedEdges ¶
func (m *AgentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AgentMutation) AddedField ¶
func (m *AgentMutation) 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 (*AgentMutation) AddedFields ¶
func (m *AgentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AgentMutation) AddedIDs ¶
func (m *AgentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AgentMutation) ClearEdge ¶
func (m *AgentMutation) 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 (*AgentMutation) ClearField ¶
func (m *AgentMutation) 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 (*AgentMutation) ClearTags ¶
func (m *AgentMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*AgentMutation) ClearedEdges ¶
func (m *AgentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AgentMutation) ClearedFields ¶
func (m *AgentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AgentMutation) Client ¶
func (m AgentMutation) 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 (*AgentMutation) CreatedAt ¶
func (m *AgentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AgentMutation) EdgeCleared ¶
func (m *AgentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AgentMutation) Field ¶
func (m *AgentMutation) 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 (*AgentMutation) FieldCleared ¶
func (m *AgentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AgentMutation) Fields ¶
func (m *AgentMutation) 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 (*AgentMutation) Hostname ¶
func (m *AgentMutation) Hostname() (r string, exists bool)
Hostname returns the value of the "hostname" field in the mutation.
func (*AgentMutation) ID ¶
func (m *AgentMutation) 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 (*AgentMutation) IDs ¶
func (m *AgentMutation) 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 (*AgentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Agent entity. If the Agent 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 (*AgentMutation) 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 (*AgentMutation) OldHostname ¶
func (m *AgentMutation) OldHostname(ctx context.Context) (v string, err error)
OldHostname returns the old "hostname" field's value of the Agent entity. If the Agent 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 (*AgentMutation) RemoveTagIDs ¶
func (m *AgentMutation) RemoveTagIDs(ids ...int)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*AgentMutation) RemovedEdges ¶
func (m *AgentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AgentMutation) RemovedIDs ¶
func (m *AgentMutation) 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 (*AgentMutation) RemovedTagsIDs ¶
func (m *AgentMutation) RemovedTagsIDs() (ids []int)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*AgentMutation) ResetCreatedAt ¶
func (m *AgentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AgentMutation) ResetEdge ¶
func (m *AgentMutation) 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 (*AgentMutation) ResetField ¶
func (m *AgentMutation) 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 (*AgentMutation) ResetHostname ¶
func (m *AgentMutation) ResetHostname()
ResetHostname resets all changes to the "hostname" field.
func (*AgentMutation) ResetTags ¶
func (m *AgentMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*AgentMutation) SetCreatedAt ¶
func (m *AgentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AgentMutation) SetField ¶
func (m *AgentMutation) 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 (*AgentMutation) SetHostname ¶
func (m *AgentMutation) SetHostname(s string)
SetHostname sets the "hostname" field.
func (*AgentMutation) SetOp ¶
func (m *AgentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AgentMutation) TagsCleared ¶
func (m *AgentMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*AgentMutation) TagsIDs ¶
func (m *AgentMutation) TagsIDs() (ids []int)
TagsIDs returns the "tags" edge IDs in the mutation.
func (AgentMutation) Tx ¶
func (m AgentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AgentMutation) Type ¶
func (m *AgentMutation) Type() string
Type returns the node type of this mutation (Agent).
func (*AgentMutation) Where ¶
func (m *AgentMutation) Where(ps ...predicate.Agent)
Where appends a list predicates to the AgentMutation builder.
func (*AgentMutation) WhereP ¶
func (m *AgentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AgentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AgentQuery ¶
type AgentQuery struct {
// contains filtered or unexported fields
}
AgentQuery is the builder for querying Agent entities.
func (*AgentQuery) Aggregate ¶
func (aq *AgentQuery) Aggregate(fns ...AggregateFunc) *AgentSelect
Aggregate returns a AgentSelect configured with the given aggregations.
func (*AgentQuery) All ¶
func (aq *AgentQuery) All(ctx context.Context) ([]*Agent, error)
All executes the query and returns a list of Agents.
func (*AgentQuery) AllX ¶
func (aq *AgentQuery) AllX(ctx context.Context) []*Agent
AllX is like All, but panics if an error occurs.
func (*AgentQuery) Clone ¶
func (aq *AgentQuery) Clone() *AgentQuery
Clone returns a duplicate of the AgentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AgentQuery) Count ¶
func (aq *AgentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AgentQuery) CountX ¶
func (aq *AgentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AgentQuery) Exist ¶
func (aq *AgentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AgentQuery) ExistX ¶
func (aq *AgentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AgentQuery) First ¶
func (aq *AgentQuery) First(ctx context.Context) (*Agent, error)
First returns the first Agent entity from the query. Returns a *NotFoundError when no Agent was found.
func (*AgentQuery) FirstID ¶
func (aq *AgentQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Agent ID from the query. Returns a *NotFoundError when no Agent ID was found.
func (*AgentQuery) FirstIDX ¶
func (aq *AgentQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AgentQuery) FirstX ¶
func (aq *AgentQuery) FirstX(ctx context.Context) *Agent
FirstX is like First, but panics if an error occurs.
func (*AgentQuery) GroupBy ¶
func (aq *AgentQuery) GroupBy(field string, fields ...string) *AgentGroupBy
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 { Hostname string `json:"hostname,omitempty"` Count int `json:"count,omitempty"` } client.Agent.Query(). GroupBy(agent.FieldHostname). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AgentQuery) IDs ¶
func (aq *AgentQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Agent IDs.
func (*AgentQuery) IDsX ¶
func (aq *AgentQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AgentQuery) Limit ¶
func (aq *AgentQuery) Limit(limit int) *AgentQuery
Limit the number of records to be returned by this query.
func (*AgentQuery) Offset ¶
func (aq *AgentQuery) Offset(offset int) *AgentQuery
Offset to start from.
func (*AgentQuery) Only ¶
func (aq *AgentQuery) Only(ctx context.Context) (*Agent, error)
Only returns a single Agent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Agent entity is found. Returns a *NotFoundError when no Agent entities are found.
func (*AgentQuery) OnlyID ¶
func (aq *AgentQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Agent ID in the query. Returns a *NotSingularError when more than one Agent ID is found. Returns a *NotFoundError when no entities are found.
func (*AgentQuery) OnlyIDX ¶
func (aq *AgentQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AgentQuery) OnlyX ¶
func (aq *AgentQuery) OnlyX(ctx context.Context) *Agent
OnlyX is like Only, but panics if an error occurs.
func (*AgentQuery) Order ¶
func (aq *AgentQuery) Order(o ...agent.OrderOption) *AgentQuery
Order specifies how the records should be ordered.
func (*AgentQuery) QueryTags ¶
func (aq *AgentQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*AgentQuery) Select ¶
func (aq *AgentQuery) Select(fields ...string) *AgentSelect
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 { Hostname string `json:"hostname,omitempty"` } client.Agent.Query(). Select(agent.FieldHostname). Scan(ctx, &v)
func (*AgentQuery) Unique ¶
func (aq *AgentQuery) Unique(unique bool) *AgentQuery
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 (*AgentQuery) Where ¶
func (aq *AgentQuery) Where(ps ...predicate.Agent) *AgentQuery
Where adds a new predicate for the AgentQuery builder.
func (*AgentQuery) WithTags ¶
func (aq *AgentQuery) WithTags(opts ...func(*TagQuery)) *AgentQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
type AgentSelect ¶
type AgentSelect struct { *AgentQuery // contains filtered or unexported fields }
AgentSelect is the builder for selecting fields of Agent entities.
func (*AgentSelect) Aggregate ¶
func (as *AgentSelect) Aggregate(fns ...AggregateFunc) *AgentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AgentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Scan ¶
func (as *AgentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AgentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AgentUpdate ¶
type AgentUpdate struct {
// contains filtered or unexported fields
}
AgentUpdate is the builder for updating Agent entities.
func (*AgentUpdate) AddTagIDs ¶
func (au *AgentUpdate) AddTagIDs(ids ...int) *AgentUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*AgentUpdate) AddTags ¶
func (au *AgentUpdate) AddTags(t ...*Tag) *AgentUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*AgentUpdate) ClearTags ¶
func (au *AgentUpdate) ClearTags() *AgentUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*AgentUpdate) Exec ¶
func (au *AgentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentUpdate) ExecX ¶
func (au *AgentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentUpdate) Mutation ¶
func (au *AgentUpdate) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentUpdate) RemoveTagIDs ¶
func (au *AgentUpdate) RemoveTagIDs(ids ...int) *AgentUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*AgentUpdate) RemoveTags ¶
func (au *AgentUpdate) RemoveTags(t ...*Tag) *AgentUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*AgentUpdate) Save ¶
func (au *AgentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AgentUpdate) SaveX ¶
func (au *AgentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AgentUpdate) SetCreatedAt ¶
func (au *AgentUpdate) SetCreatedAt(t time.Time) *AgentUpdate
SetCreatedAt sets the "created_at" field.
func (*AgentUpdate) SetHostname ¶
func (au *AgentUpdate) SetHostname(s string) *AgentUpdate
SetHostname sets the "hostname" field.
func (*AgentUpdate) SetNillableCreatedAt ¶
func (au *AgentUpdate) SetNillableCreatedAt(t *time.Time) *AgentUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AgentUpdate) Where ¶
func (au *AgentUpdate) Where(ps ...predicate.Agent) *AgentUpdate
Where appends a list predicates to the AgentUpdate builder.
type AgentUpdateOne ¶
type AgentUpdateOne struct {
// contains filtered or unexported fields
}
AgentUpdateOne is the builder for updating a single Agent entity.
func (*AgentUpdateOne) AddTagIDs ¶
func (auo *AgentUpdateOne) AddTagIDs(ids ...int) *AgentUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*AgentUpdateOne) AddTags ¶
func (auo *AgentUpdateOne) AddTags(t ...*Tag) *AgentUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*AgentUpdateOne) ClearTags ¶
func (auo *AgentUpdateOne) ClearTags() *AgentUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*AgentUpdateOne) Exec ¶
func (auo *AgentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AgentUpdateOne) ExecX ¶
func (auo *AgentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentUpdateOne) Mutation ¶
func (auo *AgentUpdateOne) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentUpdateOne) RemoveTagIDs ¶
func (auo *AgentUpdateOne) RemoveTagIDs(ids ...int) *AgentUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*AgentUpdateOne) RemoveTags ¶
func (auo *AgentUpdateOne) RemoveTags(t ...*Tag) *AgentUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*AgentUpdateOne) Save ¶
func (auo *AgentUpdateOne) Save(ctx context.Context) (*Agent, error)
Save executes the query and returns the updated Agent entity.
func (*AgentUpdateOne) SaveX ¶
func (auo *AgentUpdateOne) SaveX(ctx context.Context) *Agent
SaveX is like Save, but panics if an error occurs.
func (*AgentUpdateOne) Select ¶
func (auo *AgentUpdateOne) Select(field string, fields ...string) *AgentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AgentUpdateOne) SetCreatedAt ¶
func (auo *AgentUpdateOne) SetCreatedAt(t time.Time) *AgentUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AgentUpdateOne) SetHostname ¶
func (auo *AgentUpdateOne) SetHostname(s string) *AgentUpdateOne
SetHostname sets the "hostname" field.
func (*AgentUpdateOne) SetNillableCreatedAt ¶
func (auo *AgentUpdateOne) SetNillableCreatedAt(t *time.Time) *AgentUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AgentUpdateOne) Where ¶
func (auo *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne
Where appends a list predicates to the AgentUpdate builder.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Agent is the client for interacting with the Agent builders. Agent *AgentClient // OIDCConfig is the client for interacting with the OIDCConfig builders. OIDCConfig *OIDCConfigClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // 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(). Agent. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OIDCConfig ¶
type OIDCConfig struct { // ID of the ent. ID int `json:"id,omitempty"` // ProviderKey holds the value of the "provider_key" field. ProviderKey string `json:"provider_key,omitempty"` // ProviderName holds the value of the "provider_name" field. ProviderName string `json:"provider_name,omitempty"` // DiscoveryURI holds the value of the "discovery_uri" field. DiscoveryURI string `json:"discovery_uri,omitempty"` // ClientID holds the value of the "client_id" field. ClientID string `json:"client_id,omitempty"` // ClientSecret holds the value of the "client_secret" field. ClientSecret string `json:"client_secret,omitempty"` // RedirectURI holds the value of the "redirect_uri" field. RedirectURI string `json:"redirect_uri,omitempty"` // contains filtered or unexported fields }
OIDCConfig is the model entity for the OIDCConfig schema.
func (*OIDCConfig) String ¶
func (oc *OIDCConfig) String() string
String implements the fmt.Stringer.
func (*OIDCConfig) Unwrap ¶
func (oc *OIDCConfig) Unwrap() *OIDCConfig
Unwrap unwraps the OIDCConfig 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 (*OIDCConfig) Update ¶
func (oc *OIDCConfig) Update() *OIDCConfigUpdateOne
Update returns a builder for updating this OIDCConfig. Note that you need to call OIDCConfig.Unwrap() before calling this method if this OIDCConfig was returned from a transaction, and the transaction was committed or rolled back.
type OIDCConfigClient ¶
type OIDCConfigClient struct {
// contains filtered or unexported fields
}
OIDCConfigClient is a client for the OIDCConfig schema.
func NewOIDCConfigClient ¶
func NewOIDCConfigClient(c config) *OIDCConfigClient
NewOIDCConfigClient returns a client for the OIDCConfig from the given config.
func (*OIDCConfigClient) Create ¶
func (c *OIDCConfigClient) Create() *OIDCConfigCreate
Create returns a builder for creating a OIDCConfig entity.
func (*OIDCConfigClient) CreateBulk ¶
func (c *OIDCConfigClient) CreateBulk(builders ...*OIDCConfigCreate) *OIDCConfigCreateBulk
CreateBulk returns a builder for creating a bulk of OIDCConfig entities.
func (*OIDCConfigClient) Delete ¶
func (c *OIDCConfigClient) Delete() *OIDCConfigDelete
Delete returns a delete builder for OIDCConfig.
func (*OIDCConfigClient) DeleteOne ¶
func (c *OIDCConfigClient) DeleteOne(oc *OIDCConfig) *OIDCConfigDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OIDCConfigClient) DeleteOneID ¶
func (c *OIDCConfigClient) DeleteOneID(id int) *OIDCConfigDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OIDCConfigClient) Get ¶
func (c *OIDCConfigClient) Get(ctx context.Context, id int) (*OIDCConfig, error)
Get returns a OIDCConfig entity by its id.
func (*OIDCConfigClient) GetX ¶
func (c *OIDCConfigClient) GetX(ctx context.Context, id int) *OIDCConfig
GetX is like Get, but panics if an error occurs.
func (*OIDCConfigClient) Hooks ¶
func (c *OIDCConfigClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OIDCConfigClient) Intercept ¶
func (c *OIDCConfigClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oidcconfig.Intercept(f(g(h())))`.
func (*OIDCConfigClient) Interceptors ¶
func (c *OIDCConfigClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OIDCConfigClient) Query ¶
func (c *OIDCConfigClient) Query() *OIDCConfigQuery
Query returns a query builder for OIDCConfig.
func (*OIDCConfigClient) Update ¶
func (c *OIDCConfigClient) Update() *OIDCConfigUpdate
Update returns an update builder for OIDCConfig.
func (*OIDCConfigClient) UpdateOne ¶
func (c *OIDCConfigClient) UpdateOne(oc *OIDCConfig) *OIDCConfigUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OIDCConfigClient) UpdateOneID ¶
func (c *OIDCConfigClient) UpdateOneID(id int) *OIDCConfigUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OIDCConfigClient) Use ¶
func (c *OIDCConfigClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oidcconfig.Hooks(f(g(h())))`.
type OIDCConfigCreate ¶
type OIDCConfigCreate struct {
// contains filtered or unexported fields
}
OIDCConfigCreate is the builder for creating a OIDCConfig entity.
func (*OIDCConfigCreate) Exec ¶
func (occ *OIDCConfigCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OIDCConfigCreate) ExecX ¶
func (occ *OIDCConfigCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OIDCConfigCreate) Mutation ¶
func (occ *OIDCConfigCreate) Mutation() *OIDCConfigMutation
Mutation returns the OIDCConfigMutation object of the builder.
func (*OIDCConfigCreate) Save ¶
func (occ *OIDCConfigCreate) Save(ctx context.Context) (*OIDCConfig, error)
Save creates the OIDCConfig in the database.
func (*OIDCConfigCreate) SaveX ¶
func (occ *OIDCConfigCreate) SaveX(ctx context.Context) *OIDCConfig
SaveX calls Save and panics if Save returns an error.
func (*OIDCConfigCreate) SetClientID ¶
func (occ *OIDCConfigCreate) SetClientID(s string) *OIDCConfigCreate
SetClientID sets the "client_id" field.
func (*OIDCConfigCreate) SetClientSecret ¶
func (occ *OIDCConfigCreate) SetClientSecret(s string) *OIDCConfigCreate
SetClientSecret sets the "client_secret" field.
func (*OIDCConfigCreate) SetDiscoveryURI ¶
func (occ *OIDCConfigCreate) SetDiscoveryURI(s string) *OIDCConfigCreate
SetDiscoveryURI sets the "discovery_uri" field.
func (*OIDCConfigCreate) SetProviderKey ¶
func (occ *OIDCConfigCreate) SetProviderKey(s string) *OIDCConfigCreate
SetProviderKey sets the "provider_key" field.
func (*OIDCConfigCreate) SetProviderName ¶
func (occ *OIDCConfigCreate) SetProviderName(s string) *OIDCConfigCreate
SetProviderName sets the "provider_name" field.
func (*OIDCConfigCreate) SetRedirectURI ¶
func (occ *OIDCConfigCreate) SetRedirectURI(s string) *OIDCConfigCreate
SetRedirectURI sets the "redirect_uri" field.
type OIDCConfigCreateBulk ¶
type OIDCConfigCreateBulk struct {
// contains filtered or unexported fields
}
OIDCConfigCreateBulk is the builder for creating many OIDCConfig entities in bulk.
func (*OIDCConfigCreateBulk) Exec ¶
func (occb *OIDCConfigCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OIDCConfigCreateBulk) ExecX ¶
func (occb *OIDCConfigCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OIDCConfigCreateBulk) Save ¶
func (occb *OIDCConfigCreateBulk) Save(ctx context.Context) ([]*OIDCConfig, error)
Save creates the OIDCConfig entities in the database.
func (*OIDCConfigCreateBulk) SaveX ¶
func (occb *OIDCConfigCreateBulk) SaveX(ctx context.Context) []*OIDCConfig
SaveX is like Save, but panics if an error occurs.
type OIDCConfigDelete ¶
type OIDCConfigDelete struct {
// contains filtered or unexported fields
}
OIDCConfigDelete is the builder for deleting a OIDCConfig entity.
func (*OIDCConfigDelete) Exec ¶
func (ocd *OIDCConfigDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OIDCConfigDelete) ExecX ¶
func (ocd *OIDCConfigDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OIDCConfigDelete) Where ¶
func (ocd *OIDCConfigDelete) Where(ps ...predicate.OIDCConfig) *OIDCConfigDelete
Where appends a list predicates to the OIDCConfigDelete builder.
type OIDCConfigDeleteOne ¶
type OIDCConfigDeleteOne struct {
// contains filtered or unexported fields
}
OIDCConfigDeleteOne is the builder for deleting a single OIDCConfig entity.
func (*OIDCConfigDeleteOne) Exec ¶
func (ocdo *OIDCConfigDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OIDCConfigDeleteOne) ExecX ¶
func (ocdo *OIDCConfigDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OIDCConfigDeleteOne) Where ¶
func (ocdo *OIDCConfigDeleteOne) Where(ps ...predicate.OIDCConfig) *OIDCConfigDeleteOne
Where appends a list predicates to the OIDCConfigDelete builder.
type OIDCConfigGroupBy ¶
type OIDCConfigGroupBy struct {
// contains filtered or unexported fields
}
OIDCConfigGroupBy is the group-by builder for OIDCConfig entities.
func (*OIDCConfigGroupBy) Aggregate ¶
func (ocgb *OIDCConfigGroupBy) Aggregate(fns ...AggregateFunc) *OIDCConfigGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OIDCConfigGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OIDCConfigGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OIDCConfigGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OIDCConfigGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OIDCConfigGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OIDCConfigGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OIDCConfigGroupBy) Scan ¶
func (ocgb *OIDCConfigGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OIDCConfigGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OIDCConfigMutation ¶
type OIDCConfigMutation struct {
// contains filtered or unexported fields
}
OIDCConfigMutation represents an operation that mutates the OIDCConfig nodes in the graph.
func (*OIDCConfigMutation) AddField ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) AddedEdges ¶
func (m *OIDCConfigMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OIDCConfigMutation) AddedField ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) AddedFields ¶
func (m *OIDCConfigMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OIDCConfigMutation) AddedIDs ¶
func (m *OIDCConfigMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OIDCConfigMutation) ClearEdge ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) ClearField ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) ClearedEdges ¶
func (m *OIDCConfigMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OIDCConfigMutation) ClearedFields ¶
func (m *OIDCConfigMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OIDCConfigMutation) Client ¶
func (m OIDCConfigMutation) 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 (*OIDCConfigMutation) ClientID ¶
func (m *OIDCConfigMutation) ClientID() (r string, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*OIDCConfigMutation) ClientSecret ¶
func (m *OIDCConfigMutation) ClientSecret() (r string, exists bool)
ClientSecret returns the value of the "client_secret" field in the mutation.
func (*OIDCConfigMutation) DiscoveryURI ¶
func (m *OIDCConfigMutation) DiscoveryURI() (r string, exists bool)
DiscoveryURI returns the value of the "discovery_uri" field in the mutation.
func (*OIDCConfigMutation) EdgeCleared ¶
func (m *OIDCConfigMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OIDCConfigMutation) Field ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) FieldCleared ¶
func (m *OIDCConfigMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OIDCConfigMutation) Fields ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) ID ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) IDs ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) OldClientID ¶
func (m *OIDCConfigMutation) OldClientID(ctx context.Context) (v string, err error)
OldClientID returns the old "client_id" field's value of the OIDCConfig entity. If the OIDCConfig 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 (*OIDCConfigMutation) OldClientSecret ¶
func (m *OIDCConfigMutation) OldClientSecret(ctx context.Context) (v string, err error)
OldClientSecret returns the old "client_secret" field's value of the OIDCConfig entity. If the OIDCConfig 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 (*OIDCConfigMutation) OldDiscoveryURI ¶
func (m *OIDCConfigMutation) OldDiscoveryURI(ctx context.Context) (v string, err error)
OldDiscoveryURI returns the old "discovery_uri" field's value of the OIDCConfig entity. If the OIDCConfig 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 (*OIDCConfigMutation) 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 (*OIDCConfigMutation) OldProviderKey ¶
func (m *OIDCConfigMutation) OldProviderKey(ctx context.Context) (v string, err error)
OldProviderKey returns the old "provider_key" field's value of the OIDCConfig entity. If the OIDCConfig 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 (*OIDCConfigMutation) OldProviderName ¶
func (m *OIDCConfigMutation) OldProviderName(ctx context.Context) (v string, err error)
OldProviderName returns the old "provider_name" field's value of the OIDCConfig entity. If the OIDCConfig 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 (*OIDCConfigMutation) OldRedirectURI ¶
func (m *OIDCConfigMutation) OldRedirectURI(ctx context.Context) (v string, err error)
OldRedirectURI returns the old "redirect_uri" field's value of the OIDCConfig entity. If the OIDCConfig 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 (*OIDCConfigMutation) ProviderKey ¶
func (m *OIDCConfigMutation) ProviderKey() (r string, exists bool)
ProviderKey returns the value of the "provider_key" field in the mutation.
func (*OIDCConfigMutation) ProviderName ¶
func (m *OIDCConfigMutation) ProviderName() (r string, exists bool)
ProviderName returns the value of the "provider_name" field in the mutation.
func (*OIDCConfigMutation) RedirectURI ¶
func (m *OIDCConfigMutation) RedirectURI() (r string, exists bool)
RedirectURI returns the value of the "redirect_uri" field in the mutation.
func (*OIDCConfigMutation) RemovedEdges ¶
func (m *OIDCConfigMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OIDCConfigMutation) RemovedIDs ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) ResetClientID ¶
func (m *OIDCConfigMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*OIDCConfigMutation) ResetClientSecret ¶
func (m *OIDCConfigMutation) ResetClientSecret()
ResetClientSecret resets all changes to the "client_secret" field.
func (*OIDCConfigMutation) ResetDiscoveryURI ¶
func (m *OIDCConfigMutation) ResetDiscoveryURI()
ResetDiscoveryURI resets all changes to the "discovery_uri" field.
func (*OIDCConfigMutation) ResetEdge ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) ResetField ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) ResetProviderKey ¶
func (m *OIDCConfigMutation) ResetProviderKey()
ResetProviderKey resets all changes to the "provider_key" field.
func (*OIDCConfigMutation) ResetProviderName ¶
func (m *OIDCConfigMutation) ResetProviderName()
ResetProviderName resets all changes to the "provider_name" field.
func (*OIDCConfigMutation) ResetRedirectURI ¶
func (m *OIDCConfigMutation) ResetRedirectURI()
ResetRedirectURI resets all changes to the "redirect_uri" field.
func (*OIDCConfigMutation) SetClientID ¶
func (m *OIDCConfigMutation) SetClientID(s string)
SetClientID sets the "client_id" field.
func (*OIDCConfigMutation) SetClientSecret ¶
func (m *OIDCConfigMutation) SetClientSecret(s string)
SetClientSecret sets the "client_secret" field.
func (*OIDCConfigMutation) SetDiscoveryURI ¶
func (m *OIDCConfigMutation) SetDiscoveryURI(s string)
SetDiscoveryURI sets the "discovery_uri" field.
func (*OIDCConfigMutation) SetField ¶
func (m *OIDCConfigMutation) 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 (*OIDCConfigMutation) SetOp ¶
func (m *OIDCConfigMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OIDCConfigMutation) SetProviderKey ¶
func (m *OIDCConfigMutation) SetProviderKey(s string)
SetProviderKey sets the "provider_key" field.
func (*OIDCConfigMutation) SetProviderName ¶
func (m *OIDCConfigMutation) SetProviderName(s string)
SetProviderName sets the "provider_name" field.
func (*OIDCConfigMutation) SetRedirectURI ¶
func (m *OIDCConfigMutation) SetRedirectURI(s string)
SetRedirectURI sets the "redirect_uri" field.
func (OIDCConfigMutation) Tx ¶
func (m OIDCConfigMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OIDCConfigMutation) Type ¶
func (m *OIDCConfigMutation) Type() string
Type returns the node type of this mutation (OIDCConfig).
func (*OIDCConfigMutation) Where ¶
func (m *OIDCConfigMutation) Where(ps ...predicate.OIDCConfig)
Where appends a list predicates to the OIDCConfigMutation builder.
func (*OIDCConfigMutation) WhereP ¶
func (m *OIDCConfigMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OIDCConfigMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OIDCConfigQuery ¶
type OIDCConfigQuery struct {
// contains filtered or unexported fields
}
OIDCConfigQuery is the builder for querying OIDCConfig entities.
func (*OIDCConfigQuery) Aggregate ¶
func (ocq *OIDCConfigQuery) Aggregate(fns ...AggregateFunc) *OIDCConfigSelect
Aggregate returns a OIDCConfigSelect configured with the given aggregations.
func (*OIDCConfigQuery) All ¶
func (ocq *OIDCConfigQuery) All(ctx context.Context) ([]*OIDCConfig, error)
All executes the query and returns a list of OIDCConfigs.
func (*OIDCConfigQuery) AllX ¶
func (ocq *OIDCConfigQuery) AllX(ctx context.Context) []*OIDCConfig
AllX is like All, but panics if an error occurs.
func (*OIDCConfigQuery) Clone ¶
func (ocq *OIDCConfigQuery) Clone() *OIDCConfigQuery
Clone returns a duplicate of the OIDCConfigQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OIDCConfigQuery) Count ¶
func (ocq *OIDCConfigQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OIDCConfigQuery) CountX ¶
func (ocq *OIDCConfigQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OIDCConfigQuery) Exist ¶
func (ocq *OIDCConfigQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OIDCConfigQuery) ExistX ¶
func (ocq *OIDCConfigQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OIDCConfigQuery) First ¶
func (ocq *OIDCConfigQuery) First(ctx context.Context) (*OIDCConfig, error)
First returns the first OIDCConfig entity from the query. Returns a *NotFoundError when no OIDCConfig was found.
func (*OIDCConfigQuery) FirstID ¶
func (ocq *OIDCConfigQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OIDCConfig ID from the query. Returns a *NotFoundError when no OIDCConfig ID was found.
func (*OIDCConfigQuery) FirstIDX ¶
func (ocq *OIDCConfigQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OIDCConfigQuery) FirstX ¶
func (ocq *OIDCConfigQuery) FirstX(ctx context.Context) *OIDCConfig
FirstX is like First, but panics if an error occurs.
func (*OIDCConfigQuery) GroupBy ¶
func (ocq *OIDCConfigQuery) GroupBy(field string, fields ...string) *OIDCConfigGroupBy
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 { ProviderKey string `json:"provider_key,omitempty"` Count int `json:"count,omitempty"` } client.OIDCConfig.Query(). GroupBy(oidcconfig.FieldProviderKey). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OIDCConfigQuery) IDs ¶
func (ocq *OIDCConfigQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OIDCConfig IDs.
func (*OIDCConfigQuery) IDsX ¶
func (ocq *OIDCConfigQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OIDCConfigQuery) Limit ¶
func (ocq *OIDCConfigQuery) Limit(limit int) *OIDCConfigQuery
Limit the number of records to be returned by this query.
func (*OIDCConfigQuery) Offset ¶
func (ocq *OIDCConfigQuery) Offset(offset int) *OIDCConfigQuery
Offset to start from.
func (*OIDCConfigQuery) Only ¶
func (ocq *OIDCConfigQuery) Only(ctx context.Context) (*OIDCConfig, error)
Only returns a single OIDCConfig entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OIDCConfig entity is found. Returns a *NotFoundError when no OIDCConfig entities are found.
func (*OIDCConfigQuery) OnlyID ¶
func (ocq *OIDCConfigQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OIDCConfig ID in the query. Returns a *NotSingularError when more than one OIDCConfig ID is found. Returns a *NotFoundError when no entities are found.
func (*OIDCConfigQuery) OnlyIDX ¶
func (ocq *OIDCConfigQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OIDCConfigQuery) OnlyX ¶
func (ocq *OIDCConfigQuery) OnlyX(ctx context.Context) *OIDCConfig
OnlyX is like Only, but panics if an error occurs.
func (*OIDCConfigQuery) Order ¶
func (ocq *OIDCConfigQuery) Order(o ...oidcconfig.OrderOption) *OIDCConfigQuery
Order specifies how the records should be ordered.
func (*OIDCConfigQuery) Select ¶
func (ocq *OIDCConfigQuery) Select(fields ...string) *OIDCConfigSelect
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 { ProviderKey string `json:"provider_key,omitempty"` } client.OIDCConfig.Query(). Select(oidcconfig.FieldProviderKey). Scan(ctx, &v)
func (*OIDCConfigQuery) Unique ¶
func (ocq *OIDCConfigQuery) Unique(unique bool) *OIDCConfigQuery
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 (*OIDCConfigQuery) Where ¶
func (ocq *OIDCConfigQuery) Where(ps ...predicate.OIDCConfig) *OIDCConfigQuery
Where adds a new predicate for the OIDCConfigQuery builder.
type OIDCConfigSelect ¶
type OIDCConfigSelect struct { *OIDCConfigQuery // contains filtered or unexported fields }
OIDCConfigSelect is the builder for selecting fields of OIDCConfig entities.
func (*OIDCConfigSelect) Aggregate ¶
func (ocs *OIDCConfigSelect) Aggregate(fns ...AggregateFunc) *OIDCConfigSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OIDCConfigSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OIDCConfigSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OIDCConfigSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OIDCConfigSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OIDCConfigSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OIDCConfigSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OIDCConfigSelect) Scan ¶
func (ocs *OIDCConfigSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OIDCConfigSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OIDCConfigUpdate ¶
type OIDCConfigUpdate struct {
// contains filtered or unexported fields
}
OIDCConfigUpdate is the builder for updating OIDCConfig entities.
func (*OIDCConfigUpdate) Exec ¶
func (ocu *OIDCConfigUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OIDCConfigUpdate) ExecX ¶
func (ocu *OIDCConfigUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OIDCConfigUpdate) Mutation ¶
func (ocu *OIDCConfigUpdate) Mutation() *OIDCConfigMutation
Mutation returns the OIDCConfigMutation object of the builder.
func (*OIDCConfigUpdate) Save ¶
func (ocu *OIDCConfigUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OIDCConfigUpdate) SaveX ¶
func (ocu *OIDCConfigUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OIDCConfigUpdate) SetClientID ¶
func (ocu *OIDCConfigUpdate) SetClientID(s string) *OIDCConfigUpdate
SetClientID sets the "client_id" field.
func (*OIDCConfigUpdate) SetClientSecret ¶
func (ocu *OIDCConfigUpdate) SetClientSecret(s string) *OIDCConfigUpdate
SetClientSecret sets the "client_secret" field.
func (*OIDCConfigUpdate) SetDiscoveryURI ¶
func (ocu *OIDCConfigUpdate) SetDiscoveryURI(s string) *OIDCConfigUpdate
SetDiscoveryURI sets the "discovery_uri" field.
func (*OIDCConfigUpdate) SetProviderKey ¶
func (ocu *OIDCConfigUpdate) SetProviderKey(s string) *OIDCConfigUpdate
SetProviderKey sets the "provider_key" field.
func (*OIDCConfigUpdate) SetProviderName ¶
func (ocu *OIDCConfigUpdate) SetProviderName(s string) *OIDCConfigUpdate
SetProviderName sets the "provider_name" field.
func (*OIDCConfigUpdate) SetRedirectURI ¶
func (ocu *OIDCConfigUpdate) SetRedirectURI(s string) *OIDCConfigUpdate
SetRedirectURI sets the "redirect_uri" field.
func (*OIDCConfigUpdate) Where ¶
func (ocu *OIDCConfigUpdate) Where(ps ...predicate.OIDCConfig) *OIDCConfigUpdate
Where appends a list predicates to the OIDCConfigUpdate builder.
type OIDCConfigUpdateOne ¶
type OIDCConfigUpdateOne struct {
// contains filtered or unexported fields
}
OIDCConfigUpdateOne is the builder for updating a single OIDCConfig entity.
func (*OIDCConfigUpdateOne) Exec ¶
func (ocuo *OIDCConfigUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OIDCConfigUpdateOne) ExecX ¶
func (ocuo *OIDCConfigUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OIDCConfigUpdateOne) Mutation ¶
func (ocuo *OIDCConfigUpdateOne) Mutation() *OIDCConfigMutation
Mutation returns the OIDCConfigMutation object of the builder.
func (*OIDCConfigUpdateOne) Save ¶
func (ocuo *OIDCConfigUpdateOne) Save(ctx context.Context) (*OIDCConfig, error)
Save executes the query and returns the updated OIDCConfig entity.
func (*OIDCConfigUpdateOne) SaveX ¶
func (ocuo *OIDCConfigUpdateOne) SaveX(ctx context.Context) *OIDCConfig
SaveX is like Save, but panics if an error occurs.
func (*OIDCConfigUpdateOne) Select ¶
func (ocuo *OIDCConfigUpdateOne) Select(field string, fields ...string) *OIDCConfigUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OIDCConfigUpdateOne) SetClientID ¶
func (ocuo *OIDCConfigUpdateOne) SetClientID(s string) *OIDCConfigUpdateOne
SetClientID sets the "client_id" field.
func (*OIDCConfigUpdateOne) SetClientSecret ¶
func (ocuo *OIDCConfigUpdateOne) SetClientSecret(s string) *OIDCConfigUpdateOne
SetClientSecret sets the "client_secret" field.
func (*OIDCConfigUpdateOne) SetDiscoveryURI ¶
func (ocuo *OIDCConfigUpdateOne) SetDiscoveryURI(s string) *OIDCConfigUpdateOne
SetDiscoveryURI sets the "discovery_uri" field.
func (*OIDCConfigUpdateOne) SetProviderKey ¶
func (ocuo *OIDCConfigUpdateOne) SetProviderKey(s string) *OIDCConfigUpdateOne
SetProviderKey sets the "provider_key" field.
func (*OIDCConfigUpdateOne) SetProviderName ¶
func (ocuo *OIDCConfigUpdateOne) SetProviderName(s string) *OIDCConfigUpdateOne
SetProviderName sets the "provider_name" field.
func (*OIDCConfigUpdateOne) SetRedirectURI ¶
func (ocuo *OIDCConfigUpdateOne) SetRedirectURI(s string) *OIDCConfigUpdateOne
SetRedirectURI sets the "redirect_uri" field.
func (*OIDCConfigUpdateOne) Where ¶
func (ocuo *OIDCConfigUpdateOne) Where(ps ...predicate.OIDCConfig) *OIDCConfigUpdateOne
Where appends a list predicates to the OIDCConfigUpdate builder.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Tag ¶
type Tag struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagQuery when eager-loading is set. Edges TagEdges `json:"edges"` // contains filtered or unexported fields }
Tag is the model entity for the Tag schema.
func (*Tag) GetValue ¶
GetValue returns the ent.Value that was dynamically selected and assigned to the Tag. This includes values selected through modifiers, order, etc.
func (*Tag) QueryAgents ¶
func (t *Tag) QueryAgents() *AgentQuery
QueryAgents queries the "agents" edge of the Tag entity.
func (*Tag) Unwrap ¶
Unwrap unwraps the Tag 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 (*Tag) Update ¶
func (t *Tag) Update() *TagUpdateOne
Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.
type TagClient ¶
type TagClient struct {
// contains filtered or unexported fields
}
TagClient is a client for the Tag schema.
func NewTagClient ¶
func NewTagClient(c config) *TagClient
NewTagClient returns a client for the Tag from the given config.
func (*TagClient) CreateBulk ¶
func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
CreateBulk returns a builder for creating a bulk of Tag entities.
func (*TagClient) DeleteOne ¶
func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagClient) DeleteOneID ¶
func (c *TagClient) DeleteOneID(id int) *TagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TagClient) Intercept ¶
func (c *TagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tag.Intercept(f(g(h())))`.
func (*TagClient) Interceptors ¶
func (c *TagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TagClient) QueryAgents ¶
func (c *TagClient) QueryAgents(t *Tag) *AgentQuery
QueryAgents queries the agents edge of a Tag.
func (*TagClient) UpdateOne ¶
func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagClient) UpdateOneID ¶
func (c *TagClient) UpdateOneID(id int) *TagUpdateOne
UpdateOneID returns an update builder for the given id.
type TagCreate ¶
type TagCreate struct {
// contains filtered or unexported fields
}
TagCreate is the builder for creating a Tag entity.
func (*TagCreate) AddAgentIDs ¶
AddAgentIDs adds the "agents" edge to the Agent entity by IDs.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
type TagCreateBulk ¶
type TagCreateBulk struct {
// contains filtered or unexported fields
}
TagCreateBulk is the builder for creating many Tag entities in bulk.
func (*TagCreateBulk) Exec ¶
func (tcb *TagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagCreateBulk) ExecX ¶
func (tcb *TagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TagDelete ¶
type TagDelete struct {
// contains filtered or unexported fields
}
TagDelete is the builder for deleting a Tag entity.
func (*TagDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type TagDeleteOne ¶
type TagDeleteOne struct {
// contains filtered or unexported fields
}
TagDeleteOne is the builder for deleting a single Tag entity.
func (*TagDeleteOne) Exec ¶
func (tdo *TagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagDeleteOne) ExecX ¶
func (tdo *TagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagDeleteOne) Where ¶
func (tdo *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne
Where appends a list predicates to the TagDelete builder.
type TagEdges ¶
type TagEdges struct { // Agents holds the value of the agents edge. Agents []*Agent `json:"agents,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) AgentsOrErr ¶
AgentsOrErr returns the Agents value or an error if the edge was not loaded in eager-loading.
type TagGroupBy ¶
type TagGroupBy struct {
// contains filtered or unexported fields
}
TagGroupBy is the group-by builder for Tag entities.
func (*TagGroupBy) Aggregate ¶
func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Scan ¶
func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagMutation ¶
type TagMutation struct {
// contains filtered or unexported fields
}
TagMutation represents an operation that mutates the Tag nodes in the graph.
func (*TagMutation) AddAgentIDs ¶
func (m *TagMutation) AddAgentIDs(ids ...int)
AddAgentIDs adds the "agents" edge to the Agent entity by ids.
func (*TagMutation) AddField ¶
func (m *TagMutation) 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 (*TagMutation) AddedEdges ¶
func (m *TagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagMutation) AddedField ¶
func (m *TagMutation) 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 (*TagMutation) AddedFields ¶
func (m *TagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagMutation) AddedIDs ¶
func (m *TagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagMutation) AgentsCleared ¶
func (m *TagMutation) AgentsCleared() bool
AgentsCleared reports if the "agents" edge to the Agent entity was cleared.
func (*TagMutation) AgentsIDs ¶
func (m *TagMutation) AgentsIDs() (ids []int)
AgentsIDs returns the "agents" edge IDs in the mutation.
func (*TagMutation) ClearAgents ¶
func (m *TagMutation) ClearAgents()
ClearAgents clears the "agents" edge to the Agent entity.
func (*TagMutation) ClearEdge ¶
func (m *TagMutation) 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 (*TagMutation) ClearField ¶
func (m *TagMutation) 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 (*TagMutation) ClearedEdges ¶
func (m *TagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagMutation) ClearedFields ¶
func (m *TagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagMutation) Client ¶
func (m TagMutation) 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 (*TagMutation) EdgeCleared ¶
func (m *TagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagMutation) Field ¶
func (m *TagMutation) 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 (*TagMutation) FieldCleared ¶
func (m *TagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagMutation) Fields ¶
func (m *TagMutation) 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 (*TagMutation) ID ¶
func (m *TagMutation) 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 (*TagMutation) IDs ¶
func (m *TagMutation) 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 (*TagMutation) Name ¶
func (m *TagMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TagMutation) 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 (*TagMutation) OldName ¶
func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Tag entity. If the Tag 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 (*TagMutation) OldValue ¶
func (m *TagMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the Tag entity. If the Tag 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 (*TagMutation) RemoveAgentIDs ¶
func (m *TagMutation) RemoveAgentIDs(ids ...int)
RemoveAgentIDs removes the "agents" edge to the Agent entity by IDs.
func (*TagMutation) RemovedAgentsIDs ¶
func (m *TagMutation) RemovedAgentsIDs() (ids []int)
RemovedAgents returns the removed IDs of the "agents" edge to the Agent entity.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedIDs ¶
func (m *TagMutation) 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 (*TagMutation) ResetAgents ¶
func (m *TagMutation) ResetAgents()
ResetAgents resets all changes to the "agents" edge.
func (*TagMutation) ResetEdge ¶
func (m *TagMutation) 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 (*TagMutation) ResetField ¶
func (m *TagMutation) 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 (*TagMutation) ResetName ¶
func (m *TagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TagMutation) ResetValue ¶
func (m *TagMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*TagMutation) SetField ¶
func (m *TagMutation) 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 (*TagMutation) SetName ¶
func (m *TagMutation) SetName(s string)
SetName sets the "name" field.
func (*TagMutation) SetOp ¶
func (m *TagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TagMutation) SetValue ¶
func (m *TagMutation) SetValue(s string)
SetValue sets the "value" field.
func (TagMutation) Tx ¶
func (m TagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagMutation) Type ¶
func (m *TagMutation) Type() string
Type returns the node type of this mutation (Tag).
func (*TagMutation) Value ¶
func (m *TagMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
func (*TagMutation) WhereP ¶
func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Aggregate ¶
func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate returns a TagSelect configured with the given aggregations.
func (*TagQuery) Clone ¶
Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagQuery) First ¶
First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.
func (*TagQuery) FirstID ¶
FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.
func (*TagQuery) GroupBy ¶
func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
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.Tag.Query(). GroupBy(tag.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TagQuery) Only ¶
Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.
func (*TagQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.
func (*TagQuery) Order ¶
func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
Order specifies how the records should be ordered.
func (*TagQuery) QueryAgents ¶
func (tq *TagQuery) QueryAgents() *AgentQuery
QueryAgents chains the current query on the "agents" edge.
func (*TagQuery) Select ¶
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.Tag.Query(). Select(tag.FieldName). Scan(ctx, &v)
func (*TagQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*TagQuery) WithAgents ¶
func (tq *TagQuery) WithAgents(opts ...func(*AgentQuery)) *TagQuery
WithAgents tells the query-builder to eager-load the nodes that are connected to the "agents" edge. The optional arguments are used to configure the query builder of the edge.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Aggregate ¶
func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagUpdate ¶
type TagUpdate struct {
// contains filtered or unexported fields
}
TagUpdate is the builder for updating Tag entities.
func (*TagUpdate) AddAgentIDs ¶
AddAgentIDs adds the "agents" edge to the Agent entity by IDs.
func (*TagUpdate) ClearAgents ¶
ClearAgents clears all "agents" edges to the Agent entity.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveAgentIDs ¶
RemoveAgentIDs removes the "agents" edge to Agent entities by IDs.
func (*TagUpdate) RemoveAgents ¶
RemoveAgents removes "agents" edges to Agent entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddAgentIDs ¶
func (tuo *TagUpdateOne) AddAgentIDs(ids ...int) *TagUpdateOne
AddAgentIDs adds the "agents" edge to the Agent entity by IDs.
func (*TagUpdateOne) AddAgents ¶
func (tuo *TagUpdateOne) AddAgents(a ...*Agent) *TagUpdateOne
AddAgents adds the "agents" edges to the Agent entity.
func (*TagUpdateOne) ClearAgents ¶
func (tuo *TagUpdateOne) ClearAgents() *TagUpdateOne
ClearAgents clears all "agents" edges to the Agent entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) RemoveAgentIDs ¶
func (tuo *TagUpdateOne) RemoveAgentIDs(ids ...int) *TagUpdateOne
RemoveAgentIDs removes the "agents" edge to Agent entities by IDs.
func (*TagUpdateOne) RemoveAgents ¶
func (tuo *TagUpdateOne) RemoveAgents(a ...*Agent) *TagUpdateOne
RemoveAgents removes "agents" edges to Agent entities.
func (*TagUpdateOne) Save ¶
func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
Save executes the query and returns the updated Tag entity.
func (*TagUpdateOne) SaveX ¶
func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
SaveX is like Save, but panics if an error occurs.
func (*TagUpdateOne) Select ¶
func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TagUpdateOne) SetName ¶
func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
SetName sets the "name" field.
func (*TagUpdateOne) SetValue ¶
func (tuo *TagUpdateOne) SetValue(s string) *TagUpdateOne
SetValue sets the "value" field.
func (*TagUpdateOne) Where ¶
func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
Where appends a list predicates to the TagUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Agent is the client for interacting with the Agent builders. Agent *AgentClient // OIDCConfig is the client for interacting with the OIDCConfig builders. OIDCConfig *OIDCConfigClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // 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.