ent

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeRootCause           = "RootCause"
	TypeSignal              = "Signal"
	TypeSignalRootCauseLink = "SignalRootCauseLink"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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
	// RootCause is the client for interacting with the RootCause builders.
	RootCause *RootCauseClient
	// Signal is the client for interacting with the Signal builders.
	Signal *SignalClient
	// SignalRootCauseLink is the client for interacting with the SignalRootCauseLink builders.
	SignalRootCauseLink *SignalRootCauseLinkClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	RootCause.
	Query().
	Count(ctx)

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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 Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

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 Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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 Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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 Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

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

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

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

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type RootCause

type RootCause struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// DomainName holds the value of the "domain_name" field.
	DomainName string `json:"domain_name,omitempty"`
	// DomainSubdomain holds the value of the "domain_subdomain" field.
	DomainSubdomain string `json:"domain_subdomain,omitempty"`
	// DomainTeam holds the value of the "domain_team" field.
	DomainTeam string `json:"domain_team,omitempty"`
	// Severity holds the value of the "severity" field.
	Severity string `json:"severity,omitempty"`
	// SymptomPatterns holds the value of the "symptom_patterns" field.
	SymptomPatterns []string `json:"symptom_patterns,omitempty"`
	// ImpactSignalCount holds the value of the "impact_signal_count" field.
	ImpactSignalCount int `json:"impact_signal_count,omitempty"`
	// ImpactAffectedCustomers holds the value of the "impact_affected_customers" field.
	ImpactAffectedCustomers int `json:"impact_affected_customers,omitempty"`
	// ImpactAffectedEntities holds the value of the "impact_affected_entities" field.
	ImpactAffectedEntities []common.Entity `json:"impact_affected_entities,omitempty"`
	// ImpactEscalationRate holds the value of the "impact_escalation_rate" field.
	ImpactEscalationRate float64 `json:"impact_escalation_rate,omitempty"`
	// ImpactEstimatedRevenueLoss holds the value of the "impact_estimated_revenue_loss" field.
	ImpactEstimatedRevenueLoss float64 `json:"impact_estimated_revenue_loss,omitempty"`
	// TrendDirection holds the value of the "trend_direction" field.
	TrendDirection string `json:"trend_direction,omitempty"`
	// TrendVelocity holds the value of the "trend_velocity" field.
	TrendVelocity float64 `json:"trend_velocity,omitempty"`
	// TrendPeriodStart holds the value of the "trend_period_start" field.
	TrendPeriodStart *time.Time `json:"trend_period_start,omitempty"`
	// TrendPeriodEnd holds the value of the "trend_period_end" field.
	TrendPeriodEnd *time.Time `json:"trend_period_end,omitempty"`
	// PriorityScore holds the value of the "priority_score" field.
	PriorityScore int `json:"priority_score,omitempty"`
	// FirstSeen holds the value of the "first_seen" field.
	FirstSeen time.Time `json:"first_seen,omitempty"`
	// LastSeen holds the value of the "last_seen" field.
	LastSeen time.Time `json:"last_seen,omitempty"`
	// OwnerTeam holds the value of the "owner_team" field.
	OwnerTeam string `json:"owner_team,omitempty"`
	// RemediationID holds the value of the "remediation_id" field.
	RemediationID string `json:"remediation_id,omitempty"`
	// RecurrenceCount holds the value of the "recurrence_count" field.
	RecurrenceCount int `json:"recurrence_count,omitempty"`
	// Metadata holds the value of the "metadata" field.
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// Tags holds the value of the "tags" field.
	Tags []common.Tag `json:"tags,omitempty"`
	// contains filtered or unexported fields
}

RootCause is the model entity for the RootCause schema.

func (*RootCause) String

func (_m *RootCause) String() string

String implements the fmt.Stringer.

func (*RootCause) Unwrap

func (_m *RootCause) Unwrap() *RootCause

Unwrap unwraps the RootCause 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 (*RootCause) Update

func (_m *RootCause) Update() *RootCauseUpdateOne

Update returns a builder for updating this RootCause. Note that you need to call RootCause.Unwrap() before calling this method if this RootCause was returned from a transaction, and the transaction was committed or rolled back.

func (*RootCause) Value

func (_m *RootCause) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the RootCause. This includes values selected through modifiers, order, etc.

type RootCauseClient

type RootCauseClient struct {
	// contains filtered or unexported fields
}

RootCauseClient is a client for the RootCause schema.

func NewRootCauseClient

func NewRootCauseClient(c config) *RootCauseClient

NewRootCauseClient returns a client for the RootCause from the given config.

func (*RootCauseClient) Create

func (c *RootCauseClient) Create() *RootCauseCreate

Create returns a builder for creating a RootCause entity.

func (*RootCauseClient) CreateBulk

func (c *RootCauseClient) CreateBulk(builders ...*RootCauseCreate) *RootCauseCreateBulk

CreateBulk returns a builder for creating a bulk of RootCause entities.

func (*RootCauseClient) Delete

func (c *RootCauseClient) Delete() *RootCauseDelete

Delete returns a delete builder for RootCause.

func (*RootCauseClient) DeleteOne

func (c *RootCauseClient) DeleteOne(_m *RootCause) *RootCauseDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RootCauseClient) DeleteOneID

func (c *RootCauseClient) DeleteOneID(id string) *RootCauseDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RootCauseClient) Get

func (c *RootCauseClient) Get(ctx context.Context, id string) (*RootCause, error)

Get returns a RootCause entity by its id.

func (*RootCauseClient) GetX

func (c *RootCauseClient) GetX(ctx context.Context, id string) *RootCause

GetX is like Get, but panics if an error occurs.

func (*RootCauseClient) Hooks

func (c *RootCauseClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RootCauseClient) Intercept

func (c *RootCauseClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rootcause.Intercept(f(g(h())))`.

func (*RootCauseClient) Interceptors

func (c *RootCauseClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RootCauseClient) MapCreateBulk

func (c *RootCauseClient) MapCreateBulk(slice any, setFunc func(*RootCauseCreate, int)) *RootCauseCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*RootCauseClient) Query

func (c *RootCauseClient) Query() *RootCauseQuery

Query returns a query builder for RootCause.

func (*RootCauseClient) Update

func (c *RootCauseClient) Update() *RootCauseUpdate

Update returns an update builder for RootCause.

func (*RootCauseClient) UpdateOne

func (c *RootCauseClient) UpdateOne(_m *RootCause) *RootCauseUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RootCauseClient) UpdateOneID

func (c *RootCauseClient) UpdateOneID(id string) *RootCauseUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RootCauseClient) Use

func (c *RootCauseClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rootcause.Hooks(f(g(h())))`.

type RootCauseCreate

type RootCauseCreate struct {
	// contains filtered or unexported fields
}

RootCauseCreate is the builder for creating a RootCause entity.

func (*RootCauseCreate) Exec

func (_c *RootCauseCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RootCauseCreate) ExecX

func (_c *RootCauseCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RootCauseCreate) Mutation

func (_c *RootCauseCreate) Mutation() *RootCauseMutation

Mutation returns the RootCauseMutation object of the builder.

func (*RootCauseCreate) OnConflict

func (_c *RootCauseCreate) OnConflict(opts ...sql.ConflictOption) *RootCauseUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.RootCause.Create().
	SetTitle(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RootCauseUpsert) {
		SetTitle(v+v).
	}).
	Exec(ctx)

func (*RootCauseCreate) OnConflictColumns

func (_c *RootCauseCreate) OnConflictColumns(columns ...string) *RootCauseUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.RootCause.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RootCauseCreate) Save

func (_c *RootCauseCreate) Save(ctx context.Context) (*RootCause, error)

Save creates the RootCause in the database.

func (*RootCauseCreate) SaveX

func (_c *RootCauseCreate) SaveX(ctx context.Context) *RootCause

SaveX calls Save and panics if Save returns an error.

func (*RootCauseCreate) SetDescription

func (_c *RootCauseCreate) SetDescription(v string) *RootCauseCreate

SetDescription sets the "description" field.

func (*RootCauseCreate) SetDomainName

func (_c *RootCauseCreate) SetDomainName(v string) *RootCauseCreate

SetDomainName sets the "domain_name" field.

func (*RootCauseCreate) SetDomainSubdomain

func (_c *RootCauseCreate) SetDomainSubdomain(v string) *RootCauseCreate

SetDomainSubdomain sets the "domain_subdomain" field.

func (*RootCauseCreate) SetDomainTeam

func (_c *RootCauseCreate) SetDomainTeam(v string) *RootCauseCreate

SetDomainTeam sets the "domain_team" field.

func (*RootCauseCreate) SetFirstSeen

func (_c *RootCauseCreate) SetFirstSeen(v time.Time) *RootCauseCreate

SetFirstSeen sets the "first_seen" field.

func (*RootCauseCreate) SetID

func (_c *RootCauseCreate) SetID(v string) *RootCauseCreate

SetID sets the "id" field.

func (*RootCauseCreate) SetImpactAffectedCustomers

func (_c *RootCauseCreate) SetImpactAffectedCustomers(v int) *RootCauseCreate

SetImpactAffectedCustomers sets the "impact_affected_customers" field.

func (*RootCauseCreate) SetImpactAffectedEntities

func (_c *RootCauseCreate) SetImpactAffectedEntities(v []common.Entity) *RootCauseCreate

SetImpactAffectedEntities sets the "impact_affected_entities" field.

func (*RootCauseCreate) SetImpactEscalationRate

func (_c *RootCauseCreate) SetImpactEscalationRate(v float64) *RootCauseCreate

SetImpactEscalationRate sets the "impact_escalation_rate" field.

func (*RootCauseCreate) SetImpactEstimatedRevenueLoss

func (_c *RootCauseCreate) SetImpactEstimatedRevenueLoss(v float64) *RootCauseCreate

SetImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field.

func (*RootCauseCreate) SetImpactSignalCount

func (_c *RootCauseCreate) SetImpactSignalCount(v int) *RootCauseCreate

SetImpactSignalCount sets the "impact_signal_count" field.

func (*RootCauseCreate) SetLastSeen

func (_c *RootCauseCreate) SetLastSeen(v time.Time) *RootCauseCreate

SetLastSeen sets the "last_seen" field.

func (*RootCauseCreate) SetMetadata

func (_c *RootCauseCreate) SetMetadata(v map[string]interface{}) *RootCauseCreate

SetMetadata sets the "metadata" field.

func (*RootCauseCreate) SetNillableDescription

func (_c *RootCauseCreate) SetNillableDescription(v *string) *RootCauseCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RootCauseCreate) SetNillableDomainSubdomain

func (_c *RootCauseCreate) SetNillableDomainSubdomain(v *string) *RootCauseCreate

SetNillableDomainSubdomain sets the "domain_subdomain" field if the given value is not nil.

func (*RootCauseCreate) SetNillableDomainTeam

func (_c *RootCauseCreate) SetNillableDomainTeam(v *string) *RootCauseCreate

SetNillableDomainTeam sets the "domain_team" field if the given value is not nil.

func (*RootCauseCreate) SetNillableImpactAffectedCustomers

func (_c *RootCauseCreate) SetNillableImpactAffectedCustomers(v *int) *RootCauseCreate

SetNillableImpactAffectedCustomers sets the "impact_affected_customers" field if the given value is not nil.

func (*RootCauseCreate) SetNillableImpactEscalationRate

func (_c *RootCauseCreate) SetNillableImpactEscalationRate(v *float64) *RootCauseCreate

SetNillableImpactEscalationRate sets the "impact_escalation_rate" field if the given value is not nil.

func (*RootCauseCreate) SetNillableImpactEstimatedRevenueLoss

func (_c *RootCauseCreate) SetNillableImpactEstimatedRevenueLoss(v *float64) *RootCauseCreate

SetNillableImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field if the given value is not nil.

func (*RootCauseCreate) SetNillableImpactSignalCount

func (_c *RootCauseCreate) SetNillableImpactSignalCount(v *int) *RootCauseCreate

SetNillableImpactSignalCount sets the "impact_signal_count" field if the given value is not nil.

func (*RootCauseCreate) SetNillableOwnerTeam

func (_c *RootCauseCreate) SetNillableOwnerTeam(v *string) *RootCauseCreate

SetNillableOwnerTeam sets the "owner_team" field if the given value is not nil.

func (*RootCauseCreate) SetNillablePriorityScore

func (_c *RootCauseCreate) SetNillablePriorityScore(v *int) *RootCauseCreate

SetNillablePriorityScore sets the "priority_score" field if the given value is not nil.

func (*RootCauseCreate) SetNillableRecurrenceCount

func (_c *RootCauseCreate) SetNillableRecurrenceCount(v *int) *RootCauseCreate

SetNillableRecurrenceCount sets the "recurrence_count" field if the given value is not nil.

func (*RootCauseCreate) SetNillableRemediationID

func (_c *RootCauseCreate) SetNillableRemediationID(v *string) *RootCauseCreate

SetNillableRemediationID sets the "remediation_id" field if the given value is not nil.

func (*RootCauseCreate) SetNillableTrendDirection

func (_c *RootCauseCreate) SetNillableTrendDirection(v *string) *RootCauseCreate

SetNillableTrendDirection sets the "trend_direction" field if the given value is not nil.

func (*RootCauseCreate) SetNillableTrendPeriodEnd

func (_c *RootCauseCreate) SetNillableTrendPeriodEnd(v *time.Time) *RootCauseCreate

SetNillableTrendPeriodEnd sets the "trend_period_end" field if the given value is not nil.

func (*RootCauseCreate) SetNillableTrendPeriodStart

func (_c *RootCauseCreate) SetNillableTrendPeriodStart(v *time.Time) *RootCauseCreate

SetNillableTrendPeriodStart sets the "trend_period_start" field if the given value is not nil.

func (*RootCauseCreate) SetNillableTrendVelocity

func (_c *RootCauseCreate) SetNillableTrendVelocity(v *float64) *RootCauseCreate

SetNillableTrendVelocity sets the "trend_velocity" field if the given value is not nil.

func (*RootCauseCreate) SetOwnerTeam

func (_c *RootCauseCreate) SetOwnerTeam(v string) *RootCauseCreate

SetOwnerTeam sets the "owner_team" field.

func (*RootCauseCreate) SetPriorityScore

func (_c *RootCauseCreate) SetPriorityScore(v int) *RootCauseCreate

SetPriorityScore sets the "priority_score" field.

func (*RootCauseCreate) SetRecurrenceCount

func (_c *RootCauseCreate) SetRecurrenceCount(v int) *RootCauseCreate

SetRecurrenceCount sets the "recurrence_count" field.

func (*RootCauseCreate) SetRemediationID

func (_c *RootCauseCreate) SetRemediationID(v string) *RootCauseCreate

SetRemediationID sets the "remediation_id" field.

func (*RootCauseCreate) SetSeverity

func (_c *RootCauseCreate) SetSeverity(v string) *RootCauseCreate

SetSeverity sets the "severity" field.

func (*RootCauseCreate) SetStatus

func (_c *RootCauseCreate) SetStatus(v string) *RootCauseCreate

SetStatus sets the "status" field.

func (*RootCauseCreate) SetSymptomPatterns

func (_c *RootCauseCreate) SetSymptomPatterns(v []string) *RootCauseCreate

SetSymptomPatterns sets the "symptom_patterns" field.

func (*RootCauseCreate) SetTags

func (_c *RootCauseCreate) SetTags(v []common.Tag) *RootCauseCreate

SetTags sets the "tags" field.

func (*RootCauseCreate) SetTitle

func (_c *RootCauseCreate) SetTitle(v string) *RootCauseCreate

SetTitle sets the "title" field.

func (*RootCauseCreate) SetTrendDirection

func (_c *RootCauseCreate) SetTrendDirection(v string) *RootCauseCreate

SetTrendDirection sets the "trend_direction" field.

func (*RootCauseCreate) SetTrendPeriodEnd

func (_c *RootCauseCreate) SetTrendPeriodEnd(v time.Time) *RootCauseCreate

SetTrendPeriodEnd sets the "trend_period_end" field.

func (*RootCauseCreate) SetTrendPeriodStart

func (_c *RootCauseCreate) SetTrendPeriodStart(v time.Time) *RootCauseCreate

SetTrendPeriodStart sets the "trend_period_start" field.

func (*RootCauseCreate) SetTrendVelocity

func (_c *RootCauseCreate) SetTrendVelocity(v float64) *RootCauseCreate

SetTrendVelocity sets the "trend_velocity" field.

type RootCauseCreateBulk

type RootCauseCreateBulk struct {
	// contains filtered or unexported fields
}

RootCauseCreateBulk is the builder for creating many RootCause entities in bulk.

func (*RootCauseCreateBulk) Exec

func (_c *RootCauseCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RootCauseCreateBulk) ExecX

func (_c *RootCauseCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RootCauseCreateBulk) OnConflict

func (_c *RootCauseCreateBulk) OnConflict(opts ...sql.ConflictOption) *RootCauseUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.RootCause.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RootCauseUpsert) {
		SetTitle(v+v).
	}).
	Exec(ctx)

func (*RootCauseCreateBulk) OnConflictColumns

func (_c *RootCauseCreateBulk) OnConflictColumns(columns ...string) *RootCauseUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.RootCause.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RootCauseCreateBulk) Save

func (_c *RootCauseCreateBulk) Save(ctx context.Context) ([]*RootCause, error)

Save creates the RootCause entities in the database.

func (*RootCauseCreateBulk) SaveX

func (_c *RootCauseCreateBulk) SaveX(ctx context.Context) []*RootCause

SaveX is like Save, but panics if an error occurs.

type RootCauseDelete

type RootCauseDelete struct {
	// contains filtered or unexported fields
}

RootCauseDelete is the builder for deleting a RootCause entity.

func (*RootCauseDelete) Exec

func (_d *RootCauseDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RootCauseDelete) ExecX

func (_d *RootCauseDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RootCauseDelete) Where

Where appends a list predicates to the RootCauseDelete builder.

type RootCauseDeleteOne

type RootCauseDeleteOne struct {
	// contains filtered or unexported fields
}

RootCauseDeleteOne is the builder for deleting a single RootCause entity.

func (*RootCauseDeleteOne) Exec

func (_d *RootCauseDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RootCauseDeleteOne) ExecX

func (_d *RootCauseDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RootCauseDeleteOne) Where

Where appends a list predicates to the RootCauseDelete builder.

type RootCauseGroupBy

type RootCauseGroupBy struct {
	// contains filtered or unexported fields
}

RootCauseGroupBy is the group-by builder for RootCause entities.

func (*RootCauseGroupBy) Aggregate

func (_g *RootCauseGroupBy) Aggregate(fns ...AggregateFunc) *RootCauseGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RootCauseGroupBy) Bool

func (s *RootCauseGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RootCauseGroupBy) BoolX

func (s *RootCauseGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RootCauseGroupBy) Bools

func (s *RootCauseGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RootCauseGroupBy) BoolsX

func (s *RootCauseGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RootCauseGroupBy) Float64

func (s *RootCauseGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RootCauseGroupBy) Float64X

func (s *RootCauseGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RootCauseGroupBy) Float64s

func (s *RootCauseGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RootCauseGroupBy) Float64sX

func (s *RootCauseGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RootCauseGroupBy) Int

func (s *RootCauseGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RootCauseGroupBy) IntX

func (s *RootCauseGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RootCauseGroupBy) Ints

func (s *RootCauseGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RootCauseGroupBy) IntsX

func (s *RootCauseGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RootCauseGroupBy) Scan

func (_g *RootCauseGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RootCauseGroupBy) ScanX

func (s *RootCauseGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RootCauseGroupBy) String

func (s *RootCauseGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RootCauseGroupBy) StringX

func (s *RootCauseGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RootCauseGroupBy) Strings

func (s *RootCauseGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RootCauseGroupBy) StringsX

func (s *RootCauseGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RootCauseMutation

type RootCauseMutation struct {
	// contains filtered or unexported fields
}

RootCauseMutation represents an operation that mutates the RootCause nodes in the graph.

func (*RootCauseMutation) AddField

func (m *RootCauseMutation) 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 (*RootCauseMutation) AddImpactAffectedCustomers

func (m *RootCauseMutation) AddImpactAffectedCustomers(i int)

AddImpactAffectedCustomers adds i to the "impact_affected_customers" field.

func (*RootCauseMutation) AddImpactEscalationRate

func (m *RootCauseMutation) AddImpactEscalationRate(f float64)

AddImpactEscalationRate adds f to the "impact_escalation_rate" field.

func (*RootCauseMutation) AddImpactEstimatedRevenueLoss

func (m *RootCauseMutation) AddImpactEstimatedRevenueLoss(f float64)

AddImpactEstimatedRevenueLoss adds f to the "impact_estimated_revenue_loss" field.

func (*RootCauseMutation) AddImpactSignalCount

func (m *RootCauseMutation) AddImpactSignalCount(i int)

AddImpactSignalCount adds i to the "impact_signal_count" field.

func (*RootCauseMutation) AddPriorityScore

func (m *RootCauseMutation) AddPriorityScore(i int)

AddPriorityScore adds i to the "priority_score" field.

func (*RootCauseMutation) AddRecurrenceCount

func (m *RootCauseMutation) AddRecurrenceCount(i int)

AddRecurrenceCount adds i to the "recurrence_count" field.

func (*RootCauseMutation) AddTrendVelocity

func (m *RootCauseMutation) AddTrendVelocity(f float64)

AddTrendVelocity adds f to the "trend_velocity" field.

func (*RootCauseMutation) AddedEdges

func (m *RootCauseMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RootCauseMutation) AddedField

func (m *RootCauseMutation) 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 (*RootCauseMutation) AddedFields

func (m *RootCauseMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RootCauseMutation) AddedIDs

func (m *RootCauseMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RootCauseMutation) AddedImpactAffectedCustomers

func (m *RootCauseMutation) AddedImpactAffectedCustomers() (r int, exists bool)

AddedImpactAffectedCustomers returns the value that was added to the "impact_affected_customers" field in this mutation.

func (*RootCauseMutation) AddedImpactEscalationRate

func (m *RootCauseMutation) AddedImpactEscalationRate() (r float64, exists bool)

AddedImpactEscalationRate returns the value that was added to the "impact_escalation_rate" field in this mutation.

func (*RootCauseMutation) AddedImpactEstimatedRevenueLoss

func (m *RootCauseMutation) AddedImpactEstimatedRevenueLoss() (r float64, exists bool)

AddedImpactEstimatedRevenueLoss returns the value that was added to the "impact_estimated_revenue_loss" field in this mutation.

func (*RootCauseMutation) AddedImpactSignalCount

func (m *RootCauseMutation) AddedImpactSignalCount() (r int, exists bool)

AddedImpactSignalCount returns the value that was added to the "impact_signal_count" field in this mutation.

func (*RootCauseMutation) AddedPriorityScore

func (m *RootCauseMutation) AddedPriorityScore() (r int, exists bool)

AddedPriorityScore returns the value that was added to the "priority_score" field in this mutation.

func (*RootCauseMutation) AddedRecurrenceCount

func (m *RootCauseMutation) AddedRecurrenceCount() (r int, exists bool)

AddedRecurrenceCount returns the value that was added to the "recurrence_count" field in this mutation.

func (*RootCauseMutation) AddedTrendVelocity

func (m *RootCauseMutation) AddedTrendVelocity() (r float64, exists bool)

AddedTrendVelocity returns the value that was added to the "trend_velocity" field in this mutation.

func (*RootCauseMutation) AppendImpactAffectedEntities

func (m *RootCauseMutation) AppendImpactAffectedEntities(c []common.Entity)

AppendImpactAffectedEntities adds c to the "impact_affected_entities" field.

func (*RootCauseMutation) AppendSymptomPatterns

func (m *RootCauseMutation) AppendSymptomPatterns(s []string)

AppendSymptomPatterns adds s to the "symptom_patterns" field.

func (*RootCauseMutation) AppendTags

func (m *RootCauseMutation) AppendTags(c []common.Tag)

AppendTags adds c to the "tags" field.

func (*RootCauseMutation) AppendedImpactAffectedEntities

func (m *RootCauseMutation) AppendedImpactAffectedEntities() ([]common.Entity, bool)

AppendedImpactAffectedEntities returns the list of values that were appended to the "impact_affected_entities" field in this mutation.

func (*RootCauseMutation) AppendedSymptomPatterns

func (m *RootCauseMutation) AppendedSymptomPatterns() ([]string, bool)

AppendedSymptomPatterns returns the list of values that were appended to the "symptom_patterns" field in this mutation.

func (*RootCauseMutation) AppendedTags

func (m *RootCauseMutation) AppendedTags() ([]common.Tag, bool)

AppendedTags returns the list of values that were appended to the "tags" field in this mutation.

func (*RootCauseMutation) ClearDescription

func (m *RootCauseMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*RootCauseMutation) ClearDomainSubdomain

func (m *RootCauseMutation) ClearDomainSubdomain()

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*RootCauseMutation) ClearDomainTeam

func (m *RootCauseMutation) ClearDomainTeam()

ClearDomainTeam clears the value of the "domain_team" field.

func (*RootCauseMutation) ClearEdge

func (m *RootCauseMutation) 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 (*RootCauseMutation) ClearField

func (m *RootCauseMutation) 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 (*RootCauseMutation) ClearImpactAffectedEntities

func (m *RootCauseMutation) ClearImpactAffectedEntities()

ClearImpactAffectedEntities clears the value of the "impact_affected_entities" field.

func (*RootCauseMutation) ClearMetadata

func (m *RootCauseMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*RootCauseMutation) ClearOwnerTeam

func (m *RootCauseMutation) ClearOwnerTeam()

ClearOwnerTeam clears the value of the "owner_team" field.

func (*RootCauseMutation) ClearRemediationID

func (m *RootCauseMutation) ClearRemediationID()

ClearRemediationID clears the value of the "remediation_id" field.

func (*RootCauseMutation) ClearSymptomPatterns

func (m *RootCauseMutation) ClearSymptomPatterns()

ClearSymptomPatterns clears the value of the "symptom_patterns" field.

func (*RootCauseMutation) ClearTags

func (m *RootCauseMutation) ClearTags()

ClearTags clears the value of the "tags" field.

func (*RootCauseMutation) ClearTrendDirection

func (m *RootCauseMutation) ClearTrendDirection()

ClearTrendDirection clears the value of the "trend_direction" field.

func (*RootCauseMutation) ClearTrendPeriodEnd

func (m *RootCauseMutation) ClearTrendPeriodEnd()

ClearTrendPeriodEnd clears the value of the "trend_period_end" field.

func (*RootCauseMutation) ClearTrendPeriodStart

func (m *RootCauseMutation) ClearTrendPeriodStart()

ClearTrendPeriodStart clears the value of the "trend_period_start" field.

func (*RootCauseMutation) ClearedEdges

func (m *RootCauseMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RootCauseMutation) ClearedFields

func (m *RootCauseMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RootCauseMutation) Client

func (m RootCauseMutation) 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 (*RootCauseMutation) Description

func (m *RootCauseMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*RootCauseMutation) DescriptionCleared

func (m *RootCauseMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*RootCauseMutation) DomainName

func (m *RootCauseMutation) DomainName() (r string, exists bool)

DomainName returns the value of the "domain_name" field in the mutation.

func (*RootCauseMutation) DomainSubdomain

func (m *RootCauseMutation) DomainSubdomain() (r string, exists bool)

DomainSubdomain returns the value of the "domain_subdomain" field in the mutation.

func (*RootCauseMutation) DomainSubdomainCleared

func (m *RootCauseMutation) DomainSubdomainCleared() bool

DomainSubdomainCleared returns if the "domain_subdomain" field was cleared in this mutation.

func (*RootCauseMutation) DomainTeam

func (m *RootCauseMutation) DomainTeam() (r string, exists bool)

DomainTeam returns the value of the "domain_team" field in the mutation.

func (*RootCauseMutation) DomainTeamCleared

func (m *RootCauseMutation) DomainTeamCleared() bool

DomainTeamCleared returns if the "domain_team" field was cleared in this mutation.

func (*RootCauseMutation) EdgeCleared

func (m *RootCauseMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RootCauseMutation) Field

func (m *RootCauseMutation) 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 (*RootCauseMutation) FieldCleared

func (m *RootCauseMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RootCauseMutation) Fields

func (m *RootCauseMutation) 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 (*RootCauseMutation) FirstSeen

func (m *RootCauseMutation) FirstSeen() (r time.Time, exists bool)

FirstSeen returns the value of the "first_seen" field in the mutation.

func (*RootCauseMutation) ID

func (m *RootCauseMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RootCauseMutation) IDs

func (m *RootCauseMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*RootCauseMutation) ImpactAffectedCustomers

func (m *RootCauseMutation) ImpactAffectedCustomers() (r int, exists bool)

ImpactAffectedCustomers returns the value of the "impact_affected_customers" field in the mutation.

func (*RootCauseMutation) ImpactAffectedEntities

func (m *RootCauseMutation) ImpactAffectedEntities() (r []common.Entity, exists bool)

ImpactAffectedEntities returns the value of the "impact_affected_entities" field in the mutation.

func (*RootCauseMutation) ImpactAffectedEntitiesCleared

func (m *RootCauseMutation) ImpactAffectedEntitiesCleared() bool

ImpactAffectedEntitiesCleared returns if the "impact_affected_entities" field was cleared in this mutation.

func (*RootCauseMutation) ImpactEscalationRate

func (m *RootCauseMutation) ImpactEscalationRate() (r float64, exists bool)

ImpactEscalationRate returns the value of the "impact_escalation_rate" field in the mutation.

func (*RootCauseMutation) ImpactEstimatedRevenueLoss

func (m *RootCauseMutation) ImpactEstimatedRevenueLoss() (r float64, exists bool)

ImpactEstimatedRevenueLoss returns the value of the "impact_estimated_revenue_loss" field in the mutation.

func (*RootCauseMutation) ImpactSignalCount

func (m *RootCauseMutation) ImpactSignalCount() (r int, exists bool)

ImpactSignalCount returns the value of the "impact_signal_count" field in the mutation.

func (*RootCauseMutation) LastSeen

func (m *RootCauseMutation) LastSeen() (r time.Time, exists bool)

LastSeen returns the value of the "last_seen" field in the mutation.

func (*RootCauseMutation) Metadata

func (m *RootCauseMutation) Metadata() (r map[string]interface{}, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*RootCauseMutation) MetadataCleared

func (m *RootCauseMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*RootCauseMutation) OldDescription

func (m *RootCauseMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldDomainName

func (m *RootCauseMutation) OldDomainName(ctx context.Context) (v string, err error)

OldDomainName returns the old "domain_name" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldDomainSubdomain

func (m *RootCauseMutation) OldDomainSubdomain(ctx context.Context) (v string, err error)

OldDomainSubdomain returns the old "domain_subdomain" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldDomainTeam

func (m *RootCauseMutation) OldDomainTeam(ctx context.Context) (v string, err error)

OldDomainTeam returns the old "domain_team" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldField

func (m *RootCauseMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*RootCauseMutation) OldFirstSeen

func (m *RootCauseMutation) OldFirstSeen(ctx context.Context) (v time.Time, err error)

OldFirstSeen returns the old "first_seen" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldImpactAffectedCustomers

func (m *RootCauseMutation) OldImpactAffectedCustomers(ctx context.Context) (v int, err error)

OldImpactAffectedCustomers returns the old "impact_affected_customers" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldImpactAffectedEntities

func (m *RootCauseMutation) OldImpactAffectedEntities(ctx context.Context) (v []common.Entity, err error)

OldImpactAffectedEntities returns the old "impact_affected_entities" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldImpactEscalationRate

func (m *RootCauseMutation) OldImpactEscalationRate(ctx context.Context) (v float64, err error)

OldImpactEscalationRate returns the old "impact_escalation_rate" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldImpactEstimatedRevenueLoss

func (m *RootCauseMutation) OldImpactEstimatedRevenueLoss(ctx context.Context) (v float64, err error)

OldImpactEstimatedRevenueLoss returns the old "impact_estimated_revenue_loss" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldImpactSignalCount

func (m *RootCauseMutation) OldImpactSignalCount(ctx context.Context) (v int, err error)

OldImpactSignalCount returns the old "impact_signal_count" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldLastSeen

func (m *RootCauseMutation) OldLastSeen(ctx context.Context) (v time.Time, err error)

OldLastSeen returns the old "last_seen" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldMetadata

func (m *RootCauseMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)

OldMetadata returns the old "metadata" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldOwnerTeam

func (m *RootCauseMutation) OldOwnerTeam(ctx context.Context) (v string, err error)

OldOwnerTeam returns the old "owner_team" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldPriorityScore

func (m *RootCauseMutation) OldPriorityScore(ctx context.Context) (v int, err error)

OldPriorityScore returns the old "priority_score" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldRecurrenceCount

func (m *RootCauseMutation) OldRecurrenceCount(ctx context.Context) (v int, err error)

OldRecurrenceCount returns the old "recurrence_count" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldRemediationID

func (m *RootCauseMutation) OldRemediationID(ctx context.Context) (v string, err error)

OldRemediationID returns the old "remediation_id" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldSeverity

func (m *RootCauseMutation) OldSeverity(ctx context.Context) (v string, err error)

OldSeverity returns the old "severity" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldStatus

func (m *RootCauseMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldSymptomPatterns

func (m *RootCauseMutation) OldSymptomPatterns(ctx context.Context) (v []string, err error)

OldSymptomPatterns returns the old "symptom_patterns" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldTags

func (m *RootCauseMutation) OldTags(ctx context.Context) (v []common.Tag, err error)

OldTags returns the old "tags" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldTitle

func (m *RootCauseMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldTrendDirection

func (m *RootCauseMutation) OldTrendDirection(ctx context.Context) (v string, err error)

OldTrendDirection returns the old "trend_direction" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldTrendPeriodEnd

func (m *RootCauseMutation) OldTrendPeriodEnd(ctx context.Context) (v *time.Time, err error)

OldTrendPeriodEnd returns the old "trend_period_end" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldTrendPeriodStart

func (m *RootCauseMutation) OldTrendPeriodStart(ctx context.Context) (v *time.Time, err error)

OldTrendPeriodStart returns the old "trend_period_start" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) OldTrendVelocity

func (m *RootCauseMutation) OldTrendVelocity(ctx context.Context) (v float64, err error)

OldTrendVelocity returns the old "trend_velocity" field's value of the RootCause entity. If the RootCause 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 (*RootCauseMutation) Op

func (m *RootCauseMutation) Op() Op

Op returns the operation name.

func (*RootCauseMutation) OwnerTeam

func (m *RootCauseMutation) OwnerTeam() (r string, exists bool)

OwnerTeam returns the value of the "owner_team" field in the mutation.

func (*RootCauseMutation) OwnerTeamCleared

func (m *RootCauseMutation) OwnerTeamCleared() bool

OwnerTeamCleared returns if the "owner_team" field was cleared in this mutation.

func (*RootCauseMutation) PriorityScore

func (m *RootCauseMutation) PriorityScore() (r int, exists bool)

PriorityScore returns the value of the "priority_score" field in the mutation.

func (*RootCauseMutation) RecurrenceCount

func (m *RootCauseMutation) RecurrenceCount() (r int, exists bool)

RecurrenceCount returns the value of the "recurrence_count" field in the mutation.

func (*RootCauseMutation) RemediationID

func (m *RootCauseMutation) RemediationID() (r string, exists bool)

RemediationID returns the value of the "remediation_id" field in the mutation.

func (*RootCauseMutation) RemediationIDCleared

func (m *RootCauseMutation) RemediationIDCleared() bool

RemediationIDCleared returns if the "remediation_id" field was cleared in this mutation.

func (*RootCauseMutation) RemovedEdges

func (m *RootCauseMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RootCauseMutation) RemovedIDs

func (m *RootCauseMutation) 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 (*RootCauseMutation) ResetDescription

func (m *RootCauseMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*RootCauseMutation) ResetDomainName

func (m *RootCauseMutation) ResetDomainName()

ResetDomainName resets all changes to the "domain_name" field.

func (*RootCauseMutation) ResetDomainSubdomain

func (m *RootCauseMutation) ResetDomainSubdomain()

ResetDomainSubdomain resets all changes to the "domain_subdomain" field.

func (*RootCauseMutation) ResetDomainTeam

func (m *RootCauseMutation) ResetDomainTeam()

ResetDomainTeam resets all changes to the "domain_team" field.

func (*RootCauseMutation) ResetEdge

func (m *RootCauseMutation) 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 (*RootCauseMutation) ResetField

func (m *RootCauseMutation) 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 (*RootCauseMutation) ResetFirstSeen

func (m *RootCauseMutation) ResetFirstSeen()

ResetFirstSeen resets all changes to the "first_seen" field.

func (*RootCauseMutation) ResetImpactAffectedCustomers

func (m *RootCauseMutation) ResetImpactAffectedCustomers()

ResetImpactAffectedCustomers resets all changes to the "impact_affected_customers" field.

func (*RootCauseMutation) ResetImpactAffectedEntities

func (m *RootCauseMutation) ResetImpactAffectedEntities()

ResetImpactAffectedEntities resets all changes to the "impact_affected_entities" field.

func (*RootCauseMutation) ResetImpactEscalationRate

func (m *RootCauseMutation) ResetImpactEscalationRate()

ResetImpactEscalationRate resets all changes to the "impact_escalation_rate" field.

func (*RootCauseMutation) ResetImpactEstimatedRevenueLoss

func (m *RootCauseMutation) ResetImpactEstimatedRevenueLoss()

ResetImpactEstimatedRevenueLoss resets all changes to the "impact_estimated_revenue_loss" field.

func (*RootCauseMutation) ResetImpactSignalCount

func (m *RootCauseMutation) ResetImpactSignalCount()

ResetImpactSignalCount resets all changes to the "impact_signal_count" field.

func (*RootCauseMutation) ResetLastSeen

func (m *RootCauseMutation) ResetLastSeen()

ResetLastSeen resets all changes to the "last_seen" field.

func (*RootCauseMutation) ResetMetadata

func (m *RootCauseMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*RootCauseMutation) ResetOwnerTeam

func (m *RootCauseMutation) ResetOwnerTeam()

ResetOwnerTeam resets all changes to the "owner_team" field.

func (*RootCauseMutation) ResetPriorityScore

func (m *RootCauseMutation) ResetPriorityScore()

ResetPriorityScore resets all changes to the "priority_score" field.

func (*RootCauseMutation) ResetRecurrenceCount

func (m *RootCauseMutation) ResetRecurrenceCount()

ResetRecurrenceCount resets all changes to the "recurrence_count" field.

func (*RootCauseMutation) ResetRemediationID

func (m *RootCauseMutation) ResetRemediationID()

ResetRemediationID resets all changes to the "remediation_id" field.

func (*RootCauseMutation) ResetSeverity

func (m *RootCauseMutation) ResetSeverity()

ResetSeverity resets all changes to the "severity" field.

func (*RootCauseMutation) ResetStatus

func (m *RootCauseMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*RootCauseMutation) ResetSymptomPatterns

func (m *RootCauseMutation) ResetSymptomPatterns()

ResetSymptomPatterns resets all changes to the "symptom_patterns" field.

func (*RootCauseMutation) ResetTags

func (m *RootCauseMutation) ResetTags()

ResetTags resets all changes to the "tags" field.

func (*RootCauseMutation) ResetTitle

func (m *RootCauseMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*RootCauseMutation) ResetTrendDirection

func (m *RootCauseMutation) ResetTrendDirection()

ResetTrendDirection resets all changes to the "trend_direction" field.

func (*RootCauseMutation) ResetTrendPeriodEnd

func (m *RootCauseMutation) ResetTrendPeriodEnd()

ResetTrendPeriodEnd resets all changes to the "trend_period_end" field.

func (*RootCauseMutation) ResetTrendPeriodStart

func (m *RootCauseMutation) ResetTrendPeriodStart()

ResetTrendPeriodStart resets all changes to the "trend_period_start" field.

func (*RootCauseMutation) ResetTrendVelocity

func (m *RootCauseMutation) ResetTrendVelocity()

ResetTrendVelocity resets all changes to the "trend_velocity" field.

func (*RootCauseMutation) SetDescription

func (m *RootCauseMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*RootCauseMutation) SetDomainName

func (m *RootCauseMutation) SetDomainName(s string)

SetDomainName sets the "domain_name" field.

func (*RootCauseMutation) SetDomainSubdomain

func (m *RootCauseMutation) SetDomainSubdomain(s string)

SetDomainSubdomain sets the "domain_subdomain" field.

func (*RootCauseMutation) SetDomainTeam

func (m *RootCauseMutation) SetDomainTeam(s string)

SetDomainTeam sets the "domain_team" field.

func (*RootCauseMutation) SetField

func (m *RootCauseMutation) 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 (*RootCauseMutation) SetFirstSeen

func (m *RootCauseMutation) SetFirstSeen(t time.Time)

SetFirstSeen sets the "first_seen" field.

func (*RootCauseMutation) SetID

func (m *RootCauseMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of RootCause entities.

func (*RootCauseMutation) SetImpactAffectedCustomers

func (m *RootCauseMutation) SetImpactAffectedCustomers(i int)

SetImpactAffectedCustomers sets the "impact_affected_customers" field.

func (*RootCauseMutation) SetImpactAffectedEntities

func (m *RootCauseMutation) SetImpactAffectedEntities(c []common.Entity)

SetImpactAffectedEntities sets the "impact_affected_entities" field.

func (*RootCauseMutation) SetImpactEscalationRate

func (m *RootCauseMutation) SetImpactEscalationRate(f float64)

SetImpactEscalationRate sets the "impact_escalation_rate" field.

func (*RootCauseMutation) SetImpactEstimatedRevenueLoss

func (m *RootCauseMutation) SetImpactEstimatedRevenueLoss(f float64)

SetImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field.

func (*RootCauseMutation) SetImpactSignalCount

func (m *RootCauseMutation) SetImpactSignalCount(i int)

SetImpactSignalCount sets the "impact_signal_count" field.

func (*RootCauseMutation) SetLastSeen

func (m *RootCauseMutation) SetLastSeen(t time.Time)

SetLastSeen sets the "last_seen" field.

func (*RootCauseMutation) SetMetadata

func (m *RootCauseMutation) SetMetadata(value map[string]interface{})

SetMetadata sets the "metadata" field.

func (*RootCauseMutation) SetOp

func (m *RootCauseMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RootCauseMutation) SetOwnerTeam

func (m *RootCauseMutation) SetOwnerTeam(s string)

SetOwnerTeam sets the "owner_team" field.

func (*RootCauseMutation) SetPriorityScore

func (m *RootCauseMutation) SetPriorityScore(i int)

SetPriorityScore sets the "priority_score" field.

func (*RootCauseMutation) SetRecurrenceCount

func (m *RootCauseMutation) SetRecurrenceCount(i int)

SetRecurrenceCount sets the "recurrence_count" field.

func (*RootCauseMutation) SetRemediationID

func (m *RootCauseMutation) SetRemediationID(s string)

SetRemediationID sets the "remediation_id" field.

func (*RootCauseMutation) SetSeverity

func (m *RootCauseMutation) SetSeverity(s string)

SetSeverity sets the "severity" field.

func (*RootCauseMutation) SetStatus

func (m *RootCauseMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*RootCauseMutation) SetSymptomPatterns

func (m *RootCauseMutation) SetSymptomPatterns(s []string)

SetSymptomPatterns sets the "symptom_patterns" field.

func (*RootCauseMutation) SetTags

func (m *RootCauseMutation) SetTags(c []common.Tag)

SetTags sets the "tags" field.

func (*RootCauseMutation) SetTitle

func (m *RootCauseMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*RootCauseMutation) SetTrendDirection

func (m *RootCauseMutation) SetTrendDirection(s string)

SetTrendDirection sets the "trend_direction" field.

func (*RootCauseMutation) SetTrendPeriodEnd

func (m *RootCauseMutation) SetTrendPeriodEnd(t time.Time)

SetTrendPeriodEnd sets the "trend_period_end" field.

func (*RootCauseMutation) SetTrendPeriodStart

func (m *RootCauseMutation) SetTrendPeriodStart(t time.Time)

SetTrendPeriodStart sets the "trend_period_start" field.

func (*RootCauseMutation) SetTrendVelocity

func (m *RootCauseMutation) SetTrendVelocity(f float64)

SetTrendVelocity sets the "trend_velocity" field.

func (*RootCauseMutation) Severity

func (m *RootCauseMutation) Severity() (r string, exists bool)

Severity returns the value of the "severity" field in the mutation.

func (*RootCauseMutation) Status

func (m *RootCauseMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*RootCauseMutation) SymptomPatterns

func (m *RootCauseMutation) SymptomPatterns() (r []string, exists bool)

SymptomPatterns returns the value of the "symptom_patterns" field in the mutation.

func (*RootCauseMutation) SymptomPatternsCleared

func (m *RootCauseMutation) SymptomPatternsCleared() bool

SymptomPatternsCleared returns if the "symptom_patterns" field was cleared in this mutation.

func (*RootCauseMutation) Tags

func (m *RootCauseMutation) Tags() (r []common.Tag, exists bool)

Tags returns the value of the "tags" field in the mutation.

func (*RootCauseMutation) TagsCleared

func (m *RootCauseMutation) TagsCleared() bool

TagsCleared returns if the "tags" field was cleared in this mutation.

func (*RootCauseMutation) Title

func (m *RootCauseMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (*RootCauseMutation) TrendDirection

func (m *RootCauseMutation) TrendDirection() (r string, exists bool)

TrendDirection returns the value of the "trend_direction" field in the mutation.

func (*RootCauseMutation) TrendDirectionCleared

func (m *RootCauseMutation) TrendDirectionCleared() bool

TrendDirectionCleared returns if the "trend_direction" field was cleared in this mutation.

func (*RootCauseMutation) TrendPeriodEnd

func (m *RootCauseMutation) TrendPeriodEnd() (r time.Time, exists bool)

TrendPeriodEnd returns the value of the "trend_period_end" field in the mutation.

func (*RootCauseMutation) TrendPeriodEndCleared

func (m *RootCauseMutation) TrendPeriodEndCleared() bool

TrendPeriodEndCleared returns if the "trend_period_end" field was cleared in this mutation.

func (*RootCauseMutation) TrendPeriodStart

func (m *RootCauseMutation) TrendPeriodStart() (r time.Time, exists bool)

TrendPeriodStart returns the value of the "trend_period_start" field in the mutation.

func (*RootCauseMutation) TrendPeriodStartCleared

func (m *RootCauseMutation) TrendPeriodStartCleared() bool

TrendPeriodStartCleared returns if the "trend_period_start" field was cleared in this mutation.

func (*RootCauseMutation) TrendVelocity

func (m *RootCauseMutation) TrendVelocity() (r float64, exists bool)

TrendVelocity returns the value of the "trend_velocity" field in the mutation.

func (RootCauseMutation) Tx

func (m RootCauseMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RootCauseMutation) Type

func (m *RootCauseMutation) Type() string

Type returns the node type of this mutation (RootCause).

func (*RootCauseMutation) Where

func (m *RootCauseMutation) Where(ps ...predicate.RootCause)

Where appends a list predicates to the RootCauseMutation builder.

func (*RootCauseMutation) WhereP

func (m *RootCauseMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RootCauseMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RootCauseQuery

type RootCauseQuery struct {
	// contains filtered or unexported fields
}

RootCauseQuery is the builder for querying RootCause entities.

func (*RootCauseQuery) Aggregate

func (_q *RootCauseQuery) Aggregate(fns ...AggregateFunc) *RootCauseSelect

Aggregate returns a RootCauseSelect configured with the given aggregations.

func (*RootCauseQuery) All

func (_q *RootCauseQuery) All(ctx context.Context) ([]*RootCause, error)

All executes the query and returns a list of RootCauses.

func (*RootCauseQuery) AllX

func (_q *RootCauseQuery) AllX(ctx context.Context) []*RootCause

AllX is like All, but panics if an error occurs.

func (*RootCauseQuery) Clone

func (_q *RootCauseQuery) Clone() *RootCauseQuery

Clone returns a duplicate of the RootCauseQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RootCauseQuery) Count

func (_q *RootCauseQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RootCauseQuery) CountX

func (_q *RootCauseQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RootCauseQuery) Exist

func (_q *RootCauseQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RootCauseQuery) ExistX

func (_q *RootCauseQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RootCauseQuery) First

func (_q *RootCauseQuery) First(ctx context.Context) (*RootCause, error)

First returns the first RootCause entity from the query. Returns a *NotFoundError when no RootCause was found.

func (*RootCauseQuery) FirstID

func (_q *RootCauseQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first RootCause ID from the query. Returns a *NotFoundError when no RootCause ID was found.

func (*RootCauseQuery) FirstIDX

func (_q *RootCauseQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*RootCauseQuery) FirstX

func (_q *RootCauseQuery) FirstX(ctx context.Context) *RootCause

FirstX is like First, but panics if an error occurs.

func (*RootCauseQuery) GroupBy

func (_q *RootCauseQuery) GroupBy(field string, fields ...string) *RootCauseGroupBy

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 {
	Title string `json:"title,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RootCause.Query().
	GroupBy(rootcause.FieldTitle).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RootCauseQuery) IDs

func (_q *RootCauseQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of RootCause IDs.

func (*RootCauseQuery) IDsX

func (_q *RootCauseQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*RootCauseQuery) Limit

func (_q *RootCauseQuery) Limit(limit int) *RootCauseQuery

Limit the number of records to be returned by this query.

func (*RootCauseQuery) Offset

func (_q *RootCauseQuery) Offset(offset int) *RootCauseQuery

Offset to start from.

func (*RootCauseQuery) Only

func (_q *RootCauseQuery) Only(ctx context.Context) (*RootCause, error)

Only returns a single RootCause entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RootCause entity is found. Returns a *NotFoundError when no RootCause entities are found.

func (*RootCauseQuery) OnlyID

func (_q *RootCauseQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only RootCause ID in the query. Returns a *NotSingularError when more than one RootCause ID is found. Returns a *NotFoundError when no entities are found.

func (*RootCauseQuery) OnlyIDX

func (_q *RootCauseQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RootCauseQuery) OnlyX

func (_q *RootCauseQuery) OnlyX(ctx context.Context) *RootCause

OnlyX is like Only, but panics if an error occurs.

func (*RootCauseQuery) Order

Order specifies how the records should be ordered.

func (*RootCauseQuery) Select

func (_q *RootCauseQuery) Select(fields ...string) *RootCauseSelect

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 {
	Title string `json:"title,omitempty"`
}

client.RootCause.Query().
	Select(rootcause.FieldTitle).
	Scan(ctx, &v)

func (*RootCauseQuery) Unique

func (_q *RootCauseQuery) Unique(unique bool) *RootCauseQuery

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 (*RootCauseQuery) Where

Where adds a new predicate for the RootCauseQuery builder.

type RootCauseSelect

type RootCauseSelect struct {
	*RootCauseQuery
	// contains filtered or unexported fields
}

RootCauseSelect is the builder for selecting fields of RootCause entities.

func (*RootCauseSelect) Aggregate

func (_s *RootCauseSelect) Aggregate(fns ...AggregateFunc) *RootCauseSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RootCauseSelect) Bool

func (s *RootCauseSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RootCauseSelect) BoolX

func (s *RootCauseSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RootCauseSelect) Bools

func (s *RootCauseSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RootCauseSelect) BoolsX

func (s *RootCauseSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RootCauseSelect) Float64

func (s *RootCauseSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RootCauseSelect) Float64X

func (s *RootCauseSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RootCauseSelect) Float64s

func (s *RootCauseSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RootCauseSelect) Float64sX

func (s *RootCauseSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RootCauseSelect) Int

func (s *RootCauseSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RootCauseSelect) IntX

func (s *RootCauseSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RootCauseSelect) Ints

func (s *RootCauseSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RootCauseSelect) IntsX

func (s *RootCauseSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RootCauseSelect) Scan

func (_s *RootCauseSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RootCauseSelect) ScanX

func (s *RootCauseSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RootCauseSelect) String

func (s *RootCauseSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RootCauseSelect) StringX

func (s *RootCauseSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RootCauseSelect) Strings

func (s *RootCauseSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RootCauseSelect) StringsX

func (s *RootCauseSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RootCauseUpdate

type RootCauseUpdate struct {
	// contains filtered or unexported fields
}

RootCauseUpdate is the builder for updating RootCause entities.

func (*RootCauseUpdate) AddImpactAffectedCustomers

func (_u *RootCauseUpdate) AddImpactAffectedCustomers(v int) *RootCauseUpdate

AddImpactAffectedCustomers adds value to the "impact_affected_customers" field.

func (*RootCauseUpdate) AddImpactEscalationRate

func (_u *RootCauseUpdate) AddImpactEscalationRate(v float64) *RootCauseUpdate

AddImpactEscalationRate adds value to the "impact_escalation_rate" field.

func (*RootCauseUpdate) AddImpactEstimatedRevenueLoss

func (_u *RootCauseUpdate) AddImpactEstimatedRevenueLoss(v float64) *RootCauseUpdate

AddImpactEstimatedRevenueLoss adds value to the "impact_estimated_revenue_loss" field.

func (*RootCauseUpdate) AddImpactSignalCount

func (_u *RootCauseUpdate) AddImpactSignalCount(v int) *RootCauseUpdate

AddImpactSignalCount adds value to the "impact_signal_count" field.

func (*RootCauseUpdate) AddPriorityScore

func (_u *RootCauseUpdate) AddPriorityScore(v int) *RootCauseUpdate

AddPriorityScore adds value to the "priority_score" field.

func (*RootCauseUpdate) AddRecurrenceCount

func (_u *RootCauseUpdate) AddRecurrenceCount(v int) *RootCauseUpdate

AddRecurrenceCount adds value to the "recurrence_count" field.

func (*RootCauseUpdate) AddTrendVelocity

func (_u *RootCauseUpdate) AddTrendVelocity(v float64) *RootCauseUpdate

AddTrendVelocity adds value to the "trend_velocity" field.

func (*RootCauseUpdate) AppendImpactAffectedEntities

func (_u *RootCauseUpdate) AppendImpactAffectedEntities(v []common.Entity) *RootCauseUpdate

AppendImpactAffectedEntities appends value to the "impact_affected_entities" field.

func (*RootCauseUpdate) AppendSymptomPatterns

func (_u *RootCauseUpdate) AppendSymptomPatterns(v []string) *RootCauseUpdate

AppendSymptomPatterns appends value to the "symptom_patterns" field.

func (*RootCauseUpdate) AppendTags

func (_u *RootCauseUpdate) AppendTags(v []common.Tag) *RootCauseUpdate

AppendTags appends value to the "tags" field.

func (*RootCauseUpdate) ClearDescription

func (_u *RootCauseUpdate) ClearDescription() *RootCauseUpdate

ClearDescription clears the value of the "description" field.

func (*RootCauseUpdate) ClearDomainSubdomain

func (_u *RootCauseUpdate) ClearDomainSubdomain() *RootCauseUpdate

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*RootCauseUpdate) ClearDomainTeam

func (_u *RootCauseUpdate) ClearDomainTeam() *RootCauseUpdate

ClearDomainTeam clears the value of the "domain_team" field.

func (*RootCauseUpdate) ClearImpactAffectedEntities

func (_u *RootCauseUpdate) ClearImpactAffectedEntities() *RootCauseUpdate

ClearImpactAffectedEntities clears the value of the "impact_affected_entities" field.

func (*RootCauseUpdate) ClearMetadata

func (_u *RootCauseUpdate) ClearMetadata() *RootCauseUpdate

ClearMetadata clears the value of the "metadata" field.

func (*RootCauseUpdate) ClearOwnerTeam

func (_u *RootCauseUpdate) ClearOwnerTeam() *RootCauseUpdate

ClearOwnerTeam clears the value of the "owner_team" field.

func (*RootCauseUpdate) ClearRemediationID

func (_u *RootCauseUpdate) ClearRemediationID() *RootCauseUpdate

ClearRemediationID clears the value of the "remediation_id" field.

func (*RootCauseUpdate) ClearSymptomPatterns

func (_u *RootCauseUpdate) ClearSymptomPatterns() *RootCauseUpdate

ClearSymptomPatterns clears the value of the "symptom_patterns" field.

func (*RootCauseUpdate) ClearTags

func (_u *RootCauseUpdate) ClearTags() *RootCauseUpdate

ClearTags clears the value of the "tags" field.

func (*RootCauseUpdate) ClearTrendDirection

func (_u *RootCauseUpdate) ClearTrendDirection() *RootCauseUpdate

ClearTrendDirection clears the value of the "trend_direction" field.

func (*RootCauseUpdate) ClearTrendPeriodEnd

func (_u *RootCauseUpdate) ClearTrendPeriodEnd() *RootCauseUpdate

ClearTrendPeriodEnd clears the value of the "trend_period_end" field.

func (*RootCauseUpdate) ClearTrendPeriodStart

func (_u *RootCauseUpdate) ClearTrendPeriodStart() *RootCauseUpdate

ClearTrendPeriodStart clears the value of the "trend_period_start" field.

func (*RootCauseUpdate) Exec

func (_u *RootCauseUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RootCauseUpdate) ExecX

func (_u *RootCauseUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RootCauseUpdate) Mutation

func (_u *RootCauseUpdate) Mutation() *RootCauseMutation

Mutation returns the RootCauseMutation object of the builder.

func (*RootCauseUpdate) Save

func (_u *RootCauseUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RootCauseUpdate) SaveX

func (_u *RootCauseUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RootCauseUpdate) SetDescription

func (_u *RootCauseUpdate) SetDescription(v string) *RootCauseUpdate

SetDescription sets the "description" field.

func (*RootCauseUpdate) SetDomainName

func (_u *RootCauseUpdate) SetDomainName(v string) *RootCauseUpdate

SetDomainName sets the "domain_name" field.

func (*RootCauseUpdate) SetDomainSubdomain

func (_u *RootCauseUpdate) SetDomainSubdomain(v string) *RootCauseUpdate

SetDomainSubdomain sets the "domain_subdomain" field.

func (*RootCauseUpdate) SetDomainTeam

func (_u *RootCauseUpdate) SetDomainTeam(v string) *RootCauseUpdate

SetDomainTeam sets the "domain_team" field.

func (*RootCauseUpdate) SetFirstSeen

func (_u *RootCauseUpdate) SetFirstSeen(v time.Time) *RootCauseUpdate

SetFirstSeen sets the "first_seen" field.

func (*RootCauseUpdate) SetImpactAffectedCustomers

func (_u *RootCauseUpdate) SetImpactAffectedCustomers(v int) *RootCauseUpdate

SetImpactAffectedCustomers sets the "impact_affected_customers" field.

func (*RootCauseUpdate) SetImpactAffectedEntities

func (_u *RootCauseUpdate) SetImpactAffectedEntities(v []common.Entity) *RootCauseUpdate

SetImpactAffectedEntities sets the "impact_affected_entities" field.

func (*RootCauseUpdate) SetImpactEscalationRate

func (_u *RootCauseUpdate) SetImpactEscalationRate(v float64) *RootCauseUpdate

SetImpactEscalationRate sets the "impact_escalation_rate" field.

func (*RootCauseUpdate) SetImpactEstimatedRevenueLoss

func (_u *RootCauseUpdate) SetImpactEstimatedRevenueLoss(v float64) *RootCauseUpdate

SetImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field.

func (*RootCauseUpdate) SetImpactSignalCount

func (_u *RootCauseUpdate) SetImpactSignalCount(v int) *RootCauseUpdate

SetImpactSignalCount sets the "impact_signal_count" field.

func (*RootCauseUpdate) SetLastSeen

func (_u *RootCauseUpdate) SetLastSeen(v time.Time) *RootCauseUpdate

SetLastSeen sets the "last_seen" field.

func (*RootCauseUpdate) SetMetadata

func (_u *RootCauseUpdate) SetMetadata(v map[string]interface{}) *RootCauseUpdate

SetMetadata sets the "metadata" field.

func (*RootCauseUpdate) SetNillableDescription

func (_u *RootCauseUpdate) SetNillableDescription(v *string) *RootCauseUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableDomainName

func (_u *RootCauseUpdate) SetNillableDomainName(v *string) *RootCauseUpdate

SetNillableDomainName sets the "domain_name" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableDomainSubdomain

func (_u *RootCauseUpdate) SetNillableDomainSubdomain(v *string) *RootCauseUpdate

SetNillableDomainSubdomain sets the "domain_subdomain" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableDomainTeam

func (_u *RootCauseUpdate) SetNillableDomainTeam(v *string) *RootCauseUpdate

SetNillableDomainTeam sets the "domain_team" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableFirstSeen

func (_u *RootCauseUpdate) SetNillableFirstSeen(v *time.Time) *RootCauseUpdate

SetNillableFirstSeen sets the "first_seen" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableImpactAffectedCustomers

func (_u *RootCauseUpdate) SetNillableImpactAffectedCustomers(v *int) *RootCauseUpdate

SetNillableImpactAffectedCustomers sets the "impact_affected_customers" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableImpactEscalationRate

func (_u *RootCauseUpdate) SetNillableImpactEscalationRate(v *float64) *RootCauseUpdate

SetNillableImpactEscalationRate sets the "impact_escalation_rate" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableImpactEstimatedRevenueLoss

func (_u *RootCauseUpdate) SetNillableImpactEstimatedRevenueLoss(v *float64) *RootCauseUpdate

SetNillableImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableImpactSignalCount

func (_u *RootCauseUpdate) SetNillableImpactSignalCount(v *int) *RootCauseUpdate

SetNillableImpactSignalCount sets the "impact_signal_count" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableLastSeen

func (_u *RootCauseUpdate) SetNillableLastSeen(v *time.Time) *RootCauseUpdate

SetNillableLastSeen sets the "last_seen" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableOwnerTeam

func (_u *RootCauseUpdate) SetNillableOwnerTeam(v *string) *RootCauseUpdate

SetNillableOwnerTeam sets the "owner_team" field if the given value is not nil.

func (*RootCauseUpdate) SetNillablePriorityScore

func (_u *RootCauseUpdate) SetNillablePriorityScore(v *int) *RootCauseUpdate

SetNillablePriorityScore sets the "priority_score" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableRecurrenceCount

func (_u *RootCauseUpdate) SetNillableRecurrenceCount(v *int) *RootCauseUpdate

SetNillableRecurrenceCount sets the "recurrence_count" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableRemediationID

func (_u *RootCauseUpdate) SetNillableRemediationID(v *string) *RootCauseUpdate

SetNillableRemediationID sets the "remediation_id" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableSeverity

func (_u *RootCauseUpdate) SetNillableSeverity(v *string) *RootCauseUpdate

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableStatus

func (_u *RootCauseUpdate) SetNillableStatus(v *string) *RootCauseUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableTitle

func (_u *RootCauseUpdate) SetNillableTitle(v *string) *RootCauseUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableTrendDirection

func (_u *RootCauseUpdate) SetNillableTrendDirection(v *string) *RootCauseUpdate

SetNillableTrendDirection sets the "trend_direction" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableTrendPeriodEnd

func (_u *RootCauseUpdate) SetNillableTrendPeriodEnd(v *time.Time) *RootCauseUpdate

SetNillableTrendPeriodEnd sets the "trend_period_end" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableTrendPeriodStart

func (_u *RootCauseUpdate) SetNillableTrendPeriodStart(v *time.Time) *RootCauseUpdate

SetNillableTrendPeriodStart sets the "trend_period_start" field if the given value is not nil.

func (*RootCauseUpdate) SetNillableTrendVelocity

func (_u *RootCauseUpdate) SetNillableTrendVelocity(v *float64) *RootCauseUpdate

SetNillableTrendVelocity sets the "trend_velocity" field if the given value is not nil.

func (*RootCauseUpdate) SetOwnerTeam

func (_u *RootCauseUpdate) SetOwnerTeam(v string) *RootCauseUpdate

SetOwnerTeam sets the "owner_team" field.

func (*RootCauseUpdate) SetPriorityScore

func (_u *RootCauseUpdate) SetPriorityScore(v int) *RootCauseUpdate

SetPriorityScore sets the "priority_score" field.

func (*RootCauseUpdate) SetRecurrenceCount

func (_u *RootCauseUpdate) SetRecurrenceCount(v int) *RootCauseUpdate

SetRecurrenceCount sets the "recurrence_count" field.

func (*RootCauseUpdate) SetRemediationID

func (_u *RootCauseUpdate) SetRemediationID(v string) *RootCauseUpdate

SetRemediationID sets the "remediation_id" field.

func (*RootCauseUpdate) SetSeverity

func (_u *RootCauseUpdate) SetSeverity(v string) *RootCauseUpdate

SetSeverity sets the "severity" field.

func (*RootCauseUpdate) SetStatus

func (_u *RootCauseUpdate) SetStatus(v string) *RootCauseUpdate

SetStatus sets the "status" field.

func (*RootCauseUpdate) SetSymptomPatterns

func (_u *RootCauseUpdate) SetSymptomPatterns(v []string) *RootCauseUpdate

SetSymptomPatterns sets the "symptom_patterns" field.

func (*RootCauseUpdate) SetTags

func (_u *RootCauseUpdate) SetTags(v []common.Tag) *RootCauseUpdate

SetTags sets the "tags" field.

func (*RootCauseUpdate) SetTitle

func (_u *RootCauseUpdate) SetTitle(v string) *RootCauseUpdate

SetTitle sets the "title" field.

func (*RootCauseUpdate) SetTrendDirection

func (_u *RootCauseUpdate) SetTrendDirection(v string) *RootCauseUpdate

SetTrendDirection sets the "trend_direction" field.

func (*RootCauseUpdate) SetTrendPeriodEnd

func (_u *RootCauseUpdate) SetTrendPeriodEnd(v time.Time) *RootCauseUpdate

SetTrendPeriodEnd sets the "trend_period_end" field.

func (*RootCauseUpdate) SetTrendPeriodStart

func (_u *RootCauseUpdate) SetTrendPeriodStart(v time.Time) *RootCauseUpdate

SetTrendPeriodStart sets the "trend_period_start" field.

func (*RootCauseUpdate) SetTrendVelocity

func (_u *RootCauseUpdate) SetTrendVelocity(v float64) *RootCauseUpdate

SetTrendVelocity sets the "trend_velocity" field.

func (*RootCauseUpdate) Where

Where appends a list predicates to the RootCauseUpdate builder.

type RootCauseUpdateOne

type RootCauseUpdateOne struct {
	// contains filtered or unexported fields
}

RootCauseUpdateOne is the builder for updating a single RootCause entity.

func (*RootCauseUpdateOne) AddImpactAffectedCustomers

func (_u *RootCauseUpdateOne) AddImpactAffectedCustomers(v int) *RootCauseUpdateOne

AddImpactAffectedCustomers adds value to the "impact_affected_customers" field.

func (*RootCauseUpdateOne) AddImpactEscalationRate

func (_u *RootCauseUpdateOne) AddImpactEscalationRate(v float64) *RootCauseUpdateOne

AddImpactEscalationRate adds value to the "impact_escalation_rate" field.

func (*RootCauseUpdateOne) AddImpactEstimatedRevenueLoss

func (_u *RootCauseUpdateOne) AddImpactEstimatedRevenueLoss(v float64) *RootCauseUpdateOne

AddImpactEstimatedRevenueLoss adds value to the "impact_estimated_revenue_loss" field.

func (*RootCauseUpdateOne) AddImpactSignalCount

func (_u *RootCauseUpdateOne) AddImpactSignalCount(v int) *RootCauseUpdateOne

AddImpactSignalCount adds value to the "impact_signal_count" field.

func (*RootCauseUpdateOne) AddPriorityScore

func (_u *RootCauseUpdateOne) AddPriorityScore(v int) *RootCauseUpdateOne

AddPriorityScore adds value to the "priority_score" field.

func (*RootCauseUpdateOne) AddRecurrenceCount

func (_u *RootCauseUpdateOne) AddRecurrenceCount(v int) *RootCauseUpdateOne

AddRecurrenceCount adds value to the "recurrence_count" field.

func (*RootCauseUpdateOne) AddTrendVelocity

func (_u *RootCauseUpdateOne) AddTrendVelocity(v float64) *RootCauseUpdateOne

AddTrendVelocity adds value to the "trend_velocity" field.

func (*RootCauseUpdateOne) AppendImpactAffectedEntities

func (_u *RootCauseUpdateOne) AppendImpactAffectedEntities(v []common.Entity) *RootCauseUpdateOne

AppendImpactAffectedEntities appends value to the "impact_affected_entities" field.

func (*RootCauseUpdateOne) AppendSymptomPatterns

func (_u *RootCauseUpdateOne) AppendSymptomPatterns(v []string) *RootCauseUpdateOne

AppendSymptomPatterns appends value to the "symptom_patterns" field.

func (*RootCauseUpdateOne) AppendTags

func (_u *RootCauseUpdateOne) AppendTags(v []common.Tag) *RootCauseUpdateOne

AppendTags appends value to the "tags" field.

func (*RootCauseUpdateOne) ClearDescription

func (_u *RootCauseUpdateOne) ClearDescription() *RootCauseUpdateOne

ClearDescription clears the value of the "description" field.

func (*RootCauseUpdateOne) ClearDomainSubdomain

func (_u *RootCauseUpdateOne) ClearDomainSubdomain() *RootCauseUpdateOne

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*RootCauseUpdateOne) ClearDomainTeam

func (_u *RootCauseUpdateOne) ClearDomainTeam() *RootCauseUpdateOne

ClearDomainTeam clears the value of the "domain_team" field.

func (*RootCauseUpdateOne) ClearImpactAffectedEntities

func (_u *RootCauseUpdateOne) ClearImpactAffectedEntities() *RootCauseUpdateOne

ClearImpactAffectedEntities clears the value of the "impact_affected_entities" field.

func (*RootCauseUpdateOne) ClearMetadata

func (_u *RootCauseUpdateOne) ClearMetadata() *RootCauseUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*RootCauseUpdateOne) ClearOwnerTeam

func (_u *RootCauseUpdateOne) ClearOwnerTeam() *RootCauseUpdateOne

ClearOwnerTeam clears the value of the "owner_team" field.

func (*RootCauseUpdateOne) ClearRemediationID

func (_u *RootCauseUpdateOne) ClearRemediationID() *RootCauseUpdateOne

ClearRemediationID clears the value of the "remediation_id" field.

func (*RootCauseUpdateOne) ClearSymptomPatterns

func (_u *RootCauseUpdateOne) ClearSymptomPatterns() *RootCauseUpdateOne

ClearSymptomPatterns clears the value of the "symptom_patterns" field.

func (*RootCauseUpdateOne) ClearTags

func (_u *RootCauseUpdateOne) ClearTags() *RootCauseUpdateOne

ClearTags clears the value of the "tags" field.

func (*RootCauseUpdateOne) ClearTrendDirection

func (_u *RootCauseUpdateOne) ClearTrendDirection() *RootCauseUpdateOne

ClearTrendDirection clears the value of the "trend_direction" field.

func (*RootCauseUpdateOne) ClearTrendPeriodEnd

func (_u *RootCauseUpdateOne) ClearTrendPeriodEnd() *RootCauseUpdateOne

ClearTrendPeriodEnd clears the value of the "trend_period_end" field.

func (*RootCauseUpdateOne) ClearTrendPeriodStart

func (_u *RootCauseUpdateOne) ClearTrendPeriodStart() *RootCauseUpdateOne

ClearTrendPeriodStart clears the value of the "trend_period_start" field.

func (*RootCauseUpdateOne) Exec

func (_u *RootCauseUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RootCauseUpdateOne) ExecX

func (_u *RootCauseUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RootCauseUpdateOne) Mutation

func (_u *RootCauseUpdateOne) Mutation() *RootCauseMutation

Mutation returns the RootCauseMutation object of the builder.

func (*RootCauseUpdateOne) Save

func (_u *RootCauseUpdateOne) Save(ctx context.Context) (*RootCause, error)

Save executes the query and returns the updated RootCause entity.

func (*RootCauseUpdateOne) SaveX

func (_u *RootCauseUpdateOne) SaveX(ctx context.Context) *RootCause

SaveX is like Save, but panics if an error occurs.

func (*RootCauseUpdateOne) Select

func (_u *RootCauseUpdateOne) Select(field string, fields ...string) *RootCauseUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RootCauseUpdateOne) SetDescription

func (_u *RootCauseUpdateOne) SetDescription(v string) *RootCauseUpdateOne

SetDescription sets the "description" field.

func (*RootCauseUpdateOne) SetDomainName

func (_u *RootCauseUpdateOne) SetDomainName(v string) *RootCauseUpdateOne

SetDomainName sets the "domain_name" field.

func (*RootCauseUpdateOne) SetDomainSubdomain

func (_u *RootCauseUpdateOne) SetDomainSubdomain(v string) *RootCauseUpdateOne

SetDomainSubdomain sets the "domain_subdomain" field.

func (*RootCauseUpdateOne) SetDomainTeam

func (_u *RootCauseUpdateOne) SetDomainTeam(v string) *RootCauseUpdateOne

SetDomainTeam sets the "domain_team" field.

func (*RootCauseUpdateOne) SetFirstSeen

func (_u *RootCauseUpdateOne) SetFirstSeen(v time.Time) *RootCauseUpdateOne

SetFirstSeen sets the "first_seen" field.

func (*RootCauseUpdateOne) SetImpactAffectedCustomers

func (_u *RootCauseUpdateOne) SetImpactAffectedCustomers(v int) *RootCauseUpdateOne

SetImpactAffectedCustomers sets the "impact_affected_customers" field.

func (*RootCauseUpdateOne) SetImpactAffectedEntities

func (_u *RootCauseUpdateOne) SetImpactAffectedEntities(v []common.Entity) *RootCauseUpdateOne

SetImpactAffectedEntities sets the "impact_affected_entities" field.

func (*RootCauseUpdateOne) SetImpactEscalationRate

func (_u *RootCauseUpdateOne) SetImpactEscalationRate(v float64) *RootCauseUpdateOne

SetImpactEscalationRate sets the "impact_escalation_rate" field.

func (*RootCauseUpdateOne) SetImpactEstimatedRevenueLoss

func (_u *RootCauseUpdateOne) SetImpactEstimatedRevenueLoss(v float64) *RootCauseUpdateOne

SetImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field.

func (*RootCauseUpdateOne) SetImpactSignalCount

func (_u *RootCauseUpdateOne) SetImpactSignalCount(v int) *RootCauseUpdateOne

SetImpactSignalCount sets the "impact_signal_count" field.

func (*RootCauseUpdateOne) SetLastSeen

func (_u *RootCauseUpdateOne) SetLastSeen(v time.Time) *RootCauseUpdateOne

SetLastSeen sets the "last_seen" field.

func (*RootCauseUpdateOne) SetMetadata

func (_u *RootCauseUpdateOne) SetMetadata(v map[string]interface{}) *RootCauseUpdateOne

SetMetadata sets the "metadata" field.

func (*RootCauseUpdateOne) SetNillableDescription

func (_u *RootCauseUpdateOne) SetNillableDescription(v *string) *RootCauseUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableDomainName

func (_u *RootCauseUpdateOne) SetNillableDomainName(v *string) *RootCauseUpdateOne

SetNillableDomainName sets the "domain_name" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableDomainSubdomain

func (_u *RootCauseUpdateOne) SetNillableDomainSubdomain(v *string) *RootCauseUpdateOne

SetNillableDomainSubdomain sets the "domain_subdomain" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableDomainTeam

func (_u *RootCauseUpdateOne) SetNillableDomainTeam(v *string) *RootCauseUpdateOne

SetNillableDomainTeam sets the "domain_team" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableFirstSeen

func (_u *RootCauseUpdateOne) SetNillableFirstSeen(v *time.Time) *RootCauseUpdateOne

SetNillableFirstSeen sets the "first_seen" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableImpactAffectedCustomers

func (_u *RootCauseUpdateOne) SetNillableImpactAffectedCustomers(v *int) *RootCauseUpdateOne

SetNillableImpactAffectedCustomers sets the "impact_affected_customers" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableImpactEscalationRate

func (_u *RootCauseUpdateOne) SetNillableImpactEscalationRate(v *float64) *RootCauseUpdateOne

SetNillableImpactEscalationRate sets the "impact_escalation_rate" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableImpactEstimatedRevenueLoss

func (_u *RootCauseUpdateOne) SetNillableImpactEstimatedRevenueLoss(v *float64) *RootCauseUpdateOne

SetNillableImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableImpactSignalCount

func (_u *RootCauseUpdateOne) SetNillableImpactSignalCount(v *int) *RootCauseUpdateOne

SetNillableImpactSignalCount sets the "impact_signal_count" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableLastSeen

func (_u *RootCauseUpdateOne) SetNillableLastSeen(v *time.Time) *RootCauseUpdateOne

SetNillableLastSeen sets the "last_seen" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableOwnerTeam

func (_u *RootCauseUpdateOne) SetNillableOwnerTeam(v *string) *RootCauseUpdateOne

SetNillableOwnerTeam sets the "owner_team" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillablePriorityScore

func (_u *RootCauseUpdateOne) SetNillablePriorityScore(v *int) *RootCauseUpdateOne

SetNillablePriorityScore sets the "priority_score" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableRecurrenceCount

func (_u *RootCauseUpdateOne) SetNillableRecurrenceCount(v *int) *RootCauseUpdateOne

SetNillableRecurrenceCount sets the "recurrence_count" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableRemediationID

func (_u *RootCauseUpdateOne) SetNillableRemediationID(v *string) *RootCauseUpdateOne

SetNillableRemediationID sets the "remediation_id" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableSeverity

func (_u *RootCauseUpdateOne) SetNillableSeverity(v *string) *RootCauseUpdateOne

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableStatus

func (_u *RootCauseUpdateOne) SetNillableStatus(v *string) *RootCauseUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableTitle

func (_u *RootCauseUpdateOne) SetNillableTitle(v *string) *RootCauseUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableTrendDirection

func (_u *RootCauseUpdateOne) SetNillableTrendDirection(v *string) *RootCauseUpdateOne

SetNillableTrendDirection sets the "trend_direction" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableTrendPeriodEnd

func (_u *RootCauseUpdateOne) SetNillableTrendPeriodEnd(v *time.Time) *RootCauseUpdateOne

SetNillableTrendPeriodEnd sets the "trend_period_end" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableTrendPeriodStart

func (_u *RootCauseUpdateOne) SetNillableTrendPeriodStart(v *time.Time) *RootCauseUpdateOne

SetNillableTrendPeriodStart sets the "trend_period_start" field if the given value is not nil.

func (*RootCauseUpdateOne) SetNillableTrendVelocity

func (_u *RootCauseUpdateOne) SetNillableTrendVelocity(v *float64) *RootCauseUpdateOne

SetNillableTrendVelocity sets the "trend_velocity" field if the given value is not nil.

func (*RootCauseUpdateOne) SetOwnerTeam

func (_u *RootCauseUpdateOne) SetOwnerTeam(v string) *RootCauseUpdateOne

SetOwnerTeam sets the "owner_team" field.

func (*RootCauseUpdateOne) SetPriorityScore

func (_u *RootCauseUpdateOne) SetPriorityScore(v int) *RootCauseUpdateOne

SetPriorityScore sets the "priority_score" field.

func (*RootCauseUpdateOne) SetRecurrenceCount

func (_u *RootCauseUpdateOne) SetRecurrenceCount(v int) *RootCauseUpdateOne

SetRecurrenceCount sets the "recurrence_count" field.

func (*RootCauseUpdateOne) SetRemediationID

func (_u *RootCauseUpdateOne) SetRemediationID(v string) *RootCauseUpdateOne

SetRemediationID sets the "remediation_id" field.

func (*RootCauseUpdateOne) SetSeverity

func (_u *RootCauseUpdateOne) SetSeverity(v string) *RootCauseUpdateOne

SetSeverity sets the "severity" field.

func (*RootCauseUpdateOne) SetStatus

func (_u *RootCauseUpdateOne) SetStatus(v string) *RootCauseUpdateOne

SetStatus sets the "status" field.

func (*RootCauseUpdateOne) SetSymptomPatterns

func (_u *RootCauseUpdateOne) SetSymptomPatterns(v []string) *RootCauseUpdateOne

SetSymptomPatterns sets the "symptom_patterns" field.

func (*RootCauseUpdateOne) SetTags

func (_u *RootCauseUpdateOne) SetTags(v []common.Tag) *RootCauseUpdateOne

SetTags sets the "tags" field.

func (*RootCauseUpdateOne) SetTitle

func (_u *RootCauseUpdateOne) SetTitle(v string) *RootCauseUpdateOne

SetTitle sets the "title" field.

func (*RootCauseUpdateOne) SetTrendDirection

func (_u *RootCauseUpdateOne) SetTrendDirection(v string) *RootCauseUpdateOne

SetTrendDirection sets the "trend_direction" field.

func (*RootCauseUpdateOne) SetTrendPeriodEnd

func (_u *RootCauseUpdateOne) SetTrendPeriodEnd(v time.Time) *RootCauseUpdateOne

SetTrendPeriodEnd sets the "trend_period_end" field.

func (*RootCauseUpdateOne) SetTrendPeriodStart

func (_u *RootCauseUpdateOne) SetTrendPeriodStart(v time.Time) *RootCauseUpdateOne

SetTrendPeriodStart sets the "trend_period_start" field.

func (*RootCauseUpdateOne) SetTrendVelocity

func (_u *RootCauseUpdateOne) SetTrendVelocity(v float64) *RootCauseUpdateOne

SetTrendVelocity sets the "trend_velocity" field.

func (*RootCauseUpdateOne) Where

Where appends a list predicates to the RootCauseUpdate builder.

type RootCauseUpsert

type RootCauseUpsert struct {
	*sql.UpdateSet
}

RootCauseUpsert is the "OnConflict" setter.

func (*RootCauseUpsert) AddImpactAffectedCustomers

func (u *RootCauseUpsert) AddImpactAffectedCustomers(v int) *RootCauseUpsert

AddImpactAffectedCustomers adds v to the "impact_affected_customers" field.

func (*RootCauseUpsert) AddImpactEscalationRate

func (u *RootCauseUpsert) AddImpactEscalationRate(v float64) *RootCauseUpsert

AddImpactEscalationRate adds v to the "impact_escalation_rate" field.

func (*RootCauseUpsert) AddImpactEstimatedRevenueLoss

func (u *RootCauseUpsert) AddImpactEstimatedRevenueLoss(v float64) *RootCauseUpsert

AddImpactEstimatedRevenueLoss adds v to the "impact_estimated_revenue_loss" field.

func (*RootCauseUpsert) AddImpactSignalCount

func (u *RootCauseUpsert) AddImpactSignalCount(v int) *RootCauseUpsert

AddImpactSignalCount adds v to the "impact_signal_count" field.

func (*RootCauseUpsert) AddPriorityScore

func (u *RootCauseUpsert) AddPriorityScore(v int) *RootCauseUpsert

AddPriorityScore adds v to the "priority_score" field.

func (*RootCauseUpsert) AddRecurrenceCount

func (u *RootCauseUpsert) AddRecurrenceCount(v int) *RootCauseUpsert

AddRecurrenceCount adds v to the "recurrence_count" field.

func (*RootCauseUpsert) AddTrendVelocity

func (u *RootCauseUpsert) AddTrendVelocity(v float64) *RootCauseUpsert

AddTrendVelocity adds v to the "trend_velocity" field.

func (*RootCauseUpsert) ClearDescription

func (u *RootCauseUpsert) ClearDescription() *RootCauseUpsert

ClearDescription clears the value of the "description" field.

func (*RootCauseUpsert) ClearDomainSubdomain

func (u *RootCauseUpsert) ClearDomainSubdomain() *RootCauseUpsert

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*RootCauseUpsert) ClearDomainTeam

func (u *RootCauseUpsert) ClearDomainTeam() *RootCauseUpsert

ClearDomainTeam clears the value of the "domain_team" field.

func (*RootCauseUpsert) ClearImpactAffectedEntities

func (u *RootCauseUpsert) ClearImpactAffectedEntities() *RootCauseUpsert

ClearImpactAffectedEntities clears the value of the "impact_affected_entities" field.

func (*RootCauseUpsert) ClearMetadata

func (u *RootCauseUpsert) ClearMetadata() *RootCauseUpsert

ClearMetadata clears the value of the "metadata" field.

func (*RootCauseUpsert) ClearOwnerTeam

func (u *RootCauseUpsert) ClearOwnerTeam() *RootCauseUpsert

ClearOwnerTeam clears the value of the "owner_team" field.

func (*RootCauseUpsert) ClearRemediationID

func (u *RootCauseUpsert) ClearRemediationID() *RootCauseUpsert

ClearRemediationID clears the value of the "remediation_id" field.

func (*RootCauseUpsert) ClearSymptomPatterns

func (u *RootCauseUpsert) ClearSymptomPatterns() *RootCauseUpsert

ClearSymptomPatterns clears the value of the "symptom_patterns" field.

func (*RootCauseUpsert) ClearTags

func (u *RootCauseUpsert) ClearTags() *RootCauseUpsert

ClearTags clears the value of the "tags" field.

func (*RootCauseUpsert) ClearTrendDirection

func (u *RootCauseUpsert) ClearTrendDirection() *RootCauseUpsert

ClearTrendDirection clears the value of the "trend_direction" field.

func (*RootCauseUpsert) ClearTrendPeriodEnd

func (u *RootCauseUpsert) ClearTrendPeriodEnd() *RootCauseUpsert

ClearTrendPeriodEnd clears the value of the "trend_period_end" field.

func (*RootCauseUpsert) ClearTrendPeriodStart

func (u *RootCauseUpsert) ClearTrendPeriodStart() *RootCauseUpsert

ClearTrendPeriodStart clears the value of the "trend_period_start" field.

func (*RootCauseUpsert) SetDescription

func (u *RootCauseUpsert) SetDescription(v string) *RootCauseUpsert

SetDescription sets the "description" field.

func (*RootCauseUpsert) SetDomainName

func (u *RootCauseUpsert) SetDomainName(v string) *RootCauseUpsert

SetDomainName sets the "domain_name" field.

func (*RootCauseUpsert) SetDomainSubdomain

func (u *RootCauseUpsert) SetDomainSubdomain(v string) *RootCauseUpsert

SetDomainSubdomain sets the "domain_subdomain" field.

func (*RootCauseUpsert) SetDomainTeam

func (u *RootCauseUpsert) SetDomainTeam(v string) *RootCauseUpsert

SetDomainTeam sets the "domain_team" field.

func (*RootCauseUpsert) SetFirstSeen

func (u *RootCauseUpsert) SetFirstSeen(v time.Time) *RootCauseUpsert

SetFirstSeen sets the "first_seen" field.

func (*RootCauseUpsert) SetImpactAffectedCustomers

func (u *RootCauseUpsert) SetImpactAffectedCustomers(v int) *RootCauseUpsert

SetImpactAffectedCustomers sets the "impact_affected_customers" field.

func (*RootCauseUpsert) SetImpactAffectedEntities

func (u *RootCauseUpsert) SetImpactAffectedEntities(v []common.Entity) *RootCauseUpsert

SetImpactAffectedEntities sets the "impact_affected_entities" field.

func (*RootCauseUpsert) SetImpactEscalationRate

func (u *RootCauseUpsert) SetImpactEscalationRate(v float64) *RootCauseUpsert

SetImpactEscalationRate sets the "impact_escalation_rate" field.

func (*RootCauseUpsert) SetImpactEstimatedRevenueLoss

func (u *RootCauseUpsert) SetImpactEstimatedRevenueLoss(v float64) *RootCauseUpsert

SetImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field.

func (*RootCauseUpsert) SetImpactSignalCount

func (u *RootCauseUpsert) SetImpactSignalCount(v int) *RootCauseUpsert

SetImpactSignalCount sets the "impact_signal_count" field.

func (*RootCauseUpsert) SetLastSeen

func (u *RootCauseUpsert) SetLastSeen(v time.Time) *RootCauseUpsert

SetLastSeen sets the "last_seen" field.

func (*RootCauseUpsert) SetMetadata

func (u *RootCauseUpsert) SetMetadata(v map[string]interface{}) *RootCauseUpsert

SetMetadata sets the "metadata" field.

func (*RootCauseUpsert) SetOwnerTeam

func (u *RootCauseUpsert) SetOwnerTeam(v string) *RootCauseUpsert

SetOwnerTeam sets the "owner_team" field.

func (*RootCauseUpsert) SetPriorityScore

func (u *RootCauseUpsert) SetPriorityScore(v int) *RootCauseUpsert

SetPriorityScore sets the "priority_score" field.

func (*RootCauseUpsert) SetRecurrenceCount

func (u *RootCauseUpsert) SetRecurrenceCount(v int) *RootCauseUpsert

SetRecurrenceCount sets the "recurrence_count" field.

func (*RootCauseUpsert) SetRemediationID

func (u *RootCauseUpsert) SetRemediationID(v string) *RootCauseUpsert

SetRemediationID sets the "remediation_id" field.

func (*RootCauseUpsert) SetSeverity

func (u *RootCauseUpsert) SetSeverity(v string) *RootCauseUpsert

SetSeverity sets the "severity" field.

func (*RootCauseUpsert) SetStatus

func (u *RootCauseUpsert) SetStatus(v string) *RootCauseUpsert

SetStatus sets the "status" field.

func (*RootCauseUpsert) SetSymptomPatterns

func (u *RootCauseUpsert) SetSymptomPatterns(v []string) *RootCauseUpsert

SetSymptomPatterns sets the "symptom_patterns" field.

func (*RootCauseUpsert) SetTags

func (u *RootCauseUpsert) SetTags(v []common.Tag) *RootCauseUpsert

SetTags sets the "tags" field.

func (*RootCauseUpsert) SetTitle

func (u *RootCauseUpsert) SetTitle(v string) *RootCauseUpsert

SetTitle sets the "title" field.

func (*RootCauseUpsert) SetTrendDirection

func (u *RootCauseUpsert) SetTrendDirection(v string) *RootCauseUpsert

SetTrendDirection sets the "trend_direction" field.

func (*RootCauseUpsert) SetTrendPeriodEnd

func (u *RootCauseUpsert) SetTrendPeriodEnd(v time.Time) *RootCauseUpsert

SetTrendPeriodEnd sets the "trend_period_end" field.

func (*RootCauseUpsert) SetTrendPeriodStart

func (u *RootCauseUpsert) SetTrendPeriodStart(v time.Time) *RootCauseUpsert

SetTrendPeriodStart sets the "trend_period_start" field.

func (*RootCauseUpsert) SetTrendVelocity

func (u *RootCauseUpsert) SetTrendVelocity(v float64) *RootCauseUpsert

SetTrendVelocity sets the "trend_velocity" field.

func (*RootCauseUpsert) UpdateDescription

func (u *RootCauseUpsert) UpdateDescription() *RootCauseUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateDomainName

func (u *RootCauseUpsert) UpdateDomainName() *RootCauseUpsert

UpdateDomainName sets the "domain_name" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateDomainSubdomain

func (u *RootCauseUpsert) UpdateDomainSubdomain() *RootCauseUpsert

UpdateDomainSubdomain sets the "domain_subdomain" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateDomainTeam

func (u *RootCauseUpsert) UpdateDomainTeam() *RootCauseUpsert

UpdateDomainTeam sets the "domain_team" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateFirstSeen

func (u *RootCauseUpsert) UpdateFirstSeen() *RootCauseUpsert

UpdateFirstSeen sets the "first_seen" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateImpactAffectedCustomers

func (u *RootCauseUpsert) UpdateImpactAffectedCustomers() *RootCauseUpsert

UpdateImpactAffectedCustomers sets the "impact_affected_customers" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateImpactAffectedEntities

func (u *RootCauseUpsert) UpdateImpactAffectedEntities() *RootCauseUpsert

UpdateImpactAffectedEntities sets the "impact_affected_entities" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateImpactEscalationRate

func (u *RootCauseUpsert) UpdateImpactEscalationRate() *RootCauseUpsert

UpdateImpactEscalationRate sets the "impact_escalation_rate" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateImpactEstimatedRevenueLoss

func (u *RootCauseUpsert) UpdateImpactEstimatedRevenueLoss() *RootCauseUpsert

UpdateImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateImpactSignalCount

func (u *RootCauseUpsert) UpdateImpactSignalCount() *RootCauseUpsert

UpdateImpactSignalCount sets the "impact_signal_count" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateLastSeen

func (u *RootCauseUpsert) UpdateLastSeen() *RootCauseUpsert

UpdateLastSeen sets the "last_seen" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateMetadata

func (u *RootCauseUpsert) UpdateMetadata() *RootCauseUpsert

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateOwnerTeam

func (u *RootCauseUpsert) UpdateOwnerTeam() *RootCauseUpsert

UpdateOwnerTeam sets the "owner_team" field to the value that was provided on create.

func (*RootCauseUpsert) UpdatePriorityScore

func (u *RootCauseUpsert) UpdatePriorityScore() *RootCauseUpsert

UpdatePriorityScore sets the "priority_score" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateRecurrenceCount

func (u *RootCauseUpsert) UpdateRecurrenceCount() *RootCauseUpsert

UpdateRecurrenceCount sets the "recurrence_count" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateRemediationID

func (u *RootCauseUpsert) UpdateRemediationID() *RootCauseUpsert

UpdateRemediationID sets the "remediation_id" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateSeverity

func (u *RootCauseUpsert) UpdateSeverity() *RootCauseUpsert

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateStatus

func (u *RootCauseUpsert) UpdateStatus() *RootCauseUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateSymptomPatterns

func (u *RootCauseUpsert) UpdateSymptomPatterns() *RootCauseUpsert

UpdateSymptomPatterns sets the "symptom_patterns" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateTags

func (u *RootCauseUpsert) UpdateTags() *RootCauseUpsert

UpdateTags sets the "tags" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateTitle

func (u *RootCauseUpsert) UpdateTitle() *RootCauseUpsert

UpdateTitle sets the "title" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateTrendDirection

func (u *RootCauseUpsert) UpdateTrendDirection() *RootCauseUpsert

UpdateTrendDirection sets the "trend_direction" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateTrendPeriodEnd

func (u *RootCauseUpsert) UpdateTrendPeriodEnd() *RootCauseUpsert

UpdateTrendPeriodEnd sets the "trend_period_end" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateTrendPeriodStart

func (u *RootCauseUpsert) UpdateTrendPeriodStart() *RootCauseUpsert

UpdateTrendPeriodStart sets the "trend_period_start" field to the value that was provided on create.

func (*RootCauseUpsert) UpdateTrendVelocity

func (u *RootCauseUpsert) UpdateTrendVelocity() *RootCauseUpsert

UpdateTrendVelocity sets the "trend_velocity" field to the value that was provided on create.

type RootCauseUpsertBulk

type RootCauseUpsertBulk struct {
	// contains filtered or unexported fields
}

RootCauseUpsertBulk is the builder for "upsert"-ing a bulk of RootCause nodes.

func (*RootCauseUpsertBulk) AddImpactAffectedCustomers

func (u *RootCauseUpsertBulk) AddImpactAffectedCustomers(v int) *RootCauseUpsertBulk

AddImpactAffectedCustomers adds v to the "impact_affected_customers" field.

func (*RootCauseUpsertBulk) AddImpactEscalationRate

func (u *RootCauseUpsertBulk) AddImpactEscalationRate(v float64) *RootCauseUpsertBulk

AddImpactEscalationRate adds v to the "impact_escalation_rate" field.

func (*RootCauseUpsertBulk) AddImpactEstimatedRevenueLoss

func (u *RootCauseUpsertBulk) AddImpactEstimatedRevenueLoss(v float64) *RootCauseUpsertBulk

AddImpactEstimatedRevenueLoss adds v to the "impact_estimated_revenue_loss" field.

func (*RootCauseUpsertBulk) AddImpactSignalCount

func (u *RootCauseUpsertBulk) AddImpactSignalCount(v int) *RootCauseUpsertBulk

AddImpactSignalCount adds v to the "impact_signal_count" field.

func (*RootCauseUpsertBulk) AddPriorityScore

func (u *RootCauseUpsertBulk) AddPriorityScore(v int) *RootCauseUpsertBulk

AddPriorityScore adds v to the "priority_score" field.

func (*RootCauseUpsertBulk) AddRecurrenceCount

func (u *RootCauseUpsertBulk) AddRecurrenceCount(v int) *RootCauseUpsertBulk

AddRecurrenceCount adds v to the "recurrence_count" field.

func (*RootCauseUpsertBulk) AddTrendVelocity

func (u *RootCauseUpsertBulk) AddTrendVelocity(v float64) *RootCauseUpsertBulk

AddTrendVelocity adds v to the "trend_velocity" field.

func (*RootCauseUpsertBulk) ClearDescription

func (u *RootCauseUpsertBulk) ClearDescription() *RootCauseUpsertBulk

ClearDescription clears the value of the "description" field.

func (*RootCauseUpsertBulk) ClearDomainSubdomain

func (u *RootCauseUpsertBulk) ClearDomainSubdomain() *RootCauseUpsertBulk

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*RootCauseUpsertBulk) ClearDomainTeam

func (u *RootCauseUpsertBulk) ClearDomainTeam() *RootCauseUpsertBulk

ClearDomainTeam clears the value of the "domain_team" field.

func (*RootCauseUpsertBulk) ClearImpactAffectedEntities

func (u *RootCauseUpsertBulk) ClearImpactAffectedEntities() *RootCauseUpsertBulk

ClearImpactAffectedEntities clears the value of the "impact_affected_entities" field.

func (*RootCauseUpsertBulk) ClearMetadata

func (u *RootCauseUpsertBulk) ClearMetadata() *RootCauseUpsertBulk

ClearMetadata clears the value of the "metadata" field.

func (*RootCauseUpsertBulk) ClearOwnerTeam

func (u *RootCauseUpsertBulk) ClearOwnerTeam() *RootCauseUpsertBulk

ClearOwnerTeam clears the value of the "owner_team" field.

func (*RootCauseUpsertBulk) ClearRemediationID

func (u *RootCauseUpsertBulk) ClearRemediationID() *RootCauseUpsertBulk

ClearRemediationID clears the value of the "remediation_id" field.

func (*RootCauseUpsertBulk) ClearSymptomPatterns

func (u *RootCauseUpsertBulk) ClearSymptomPatterns() *RootCauseUpsertBulk

ClearSymptomPatterns clears the value of the "symptom_patterns" field.

func (*RootCauseUpsertBulk) ClearTags

func (u *RootCauseUpsertBulk) ClearTags() *RootCauseUpsertBulk

ClearTags clears the value of the "tags" field.

func (*RootCauseUpsertBulk) ClearTrendDirection

func (u *RootCauseUpsertBulk) ClearTrendDirection() *RootCauseUpsertBulk

ClearTrendDirection clears the value of the "trend_direction" field.

func (*RootCauseUpsertBulk) ClearTrendPeriodEnd

func (u *RootCauseUpsertBulk) ClearTrendPeriodEnd() *RootCauseUpsertBulk

ClearTrendPeriodEnd clears the value of the "trend_period_end" field.

func (*RootCauseUpsertBulk) ClearTrendPeriodStart

func (u *RootCauseUpsertBulk) ClearTrendPeriodStart() *RootCauseUpsertBulk

ClearTrendPeriodStart clears the value of the "trend_period_start" field.

func (*RootCauseUpsertBulk) DoNothing

func (u *RootCauseUpsertBulk) DoNothing() *RootCauseUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RootCauseUpsertBulk) Exec

Exec executes the query.

func (*RootCauseUpsertBulk) ExecX

func (u *RootCauseUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RootCauseUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.RootCause.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*RootCauseUpsertBulk) SetDescription

func (u *RootCauseUpsertBulk) SetDescription(v string) *RootCauseUpsertBulk

SetDescription sets the "description" field.

func (*RootCauseUpsertBulk) SetDomainName

func (u *RootCauseUpsertBulk) SetDomainName(v string) *RootCauseUpsertBulk

SetDomainName sets the "domain_name" field.

func (*RootCauseUpsertBulk) SetDomainSubdomain

func (u *RootCauseUpsertBulk) SetDomainSubdomain(v string) *RootCauseUpsertBulk

SetDomainSubdomain sets the "domain_subdomain" field.

func (*RootCauseUpsertBulk) SetDomainTeam

func (u *RootCauseUpsertBulk) SetDomainTeam(v string) *RootCauseUpsertBulk

SetDomainTeam sets the "domain_team" field.

func (*RootCauseUpsertBulk) SetFirstSeen

func (u *RootCauseUpsertBulk) SetFirstSeen(v time.Time) *RootCauseUpsertBulk

SetFirstSeen sets the "first_seen" field.

func (*RootCauseUpsertBulk) SetImpactAffectedCustomers

func (u *RootCauseUpsertBulk) SetImpactAffectedCustomers(v int) *RootCauseUpsertBulk

SetImpactAffectedCustomers sets the "impact_affected_customers" field.

func (*RootCauseUpsertBulk) SetImpactAffectedEntities

func (u *RootCauseUpsertBulk) SetImpactAffectedEntities(v []common.Entity) *RootCauseUpsertBulk

SetImpactAffectedEntities sets the "impact_affected_entities" field.

func (*RootCauseUpsertBulk) SetImpactEscalationRate

func (u *RootCauseUpsertBulk) SetImpactEscalationRate(v float64) *RootCauseUpsertBulk

SetImpactEscalationRate sets the "impact_escalation_rate" field.

func (*RootCauseUpsertBulk) SetImpactEstimatedRevenueLoss

func (u *RootCauseUpsertBulk) SetImpactEstimatedRevenueLoss(v float64) *RootCauseUpsertBulk

SetImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field.

func (*RootCauseUpsertBulk) SetImpactSignalCount

func (u *RootCauseUpsertBulk) SetImpactSignalCount(v int) *RootCauseUpsertBulk

SetImpactSignalCount sets the "impact_signal_count" field.

func (*RootCauseUpsertBulk) SetLastSeen

func (u *RootCauseUpsertBulk) SetLastSeen(v time.Time) *RootCauseUpsertBulk

SetLastSeen sets the "last_seen" field.

func (*RootCauseUpsertBulk) SetMetadata

func (u *RootCauseUpsertBulk) SetMetadata(v map[string]interface{}) *RootCauseUpsertBulk

SetMetadata sets the "metadata" field.

func (*RootCauseUpsertBulk) SetOwnerTeam

func (u *RootCauseUpsertBulk) SetOwnerTeam(v string) *RootCauseUpsertBulk

SetOwnerTeam sets the "owner_team" field.

func (*RootCauseUpsertBulk) SetPriorityScore

func (u *RootCauseUpsertBulk) SetPriorityScore(v int) *RootCauseUpsertBulk

SetPriorityScore sets the "priority_score" field.

func (*RootCauseUpsertBulk) SetRecurrenceCount

func (u *RootCauseUpsertBulk) SetRecurrenceCount(v int) *RootCauseUpsertBulk

SetRecurrenceCount sets the "recurrence_count" field.

func (*RootCauseUpsertBulk) SetRemediationID

func (u *RootCauseUpsertBulk) SetRemediationID(v string) *RootCauseUpsertBulk

SetRemediationID sets the "remediation_id" field.

func (*RootCauseUpsertBulk) SetSeverity

func (u *RootCauseUpsertBulk) SetSeverity(v string) *RootCauseUpsertBulk

SetSeverity sets the "severity" field.

func (*RootCauseUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*RootCauseUpsertBulk) SetSymptomPatterns

func (u *RootCauseUpsertBulk) SetSymptomPatterns(v []string) *RootCauseUpsertBulk

SetSymptomPatterns sets the "symptom_patterns" field.

func (*RootCauseUpsertBulk) SetTags

SetTags sets the "tags" field.

func (*RootCauseUpsertBulk) SetTitle

SetTitle sets the "title" field.

func (*RootCauseUpsertBulk) SetTrendDirection

func (u *RootCauseUpsertBulk) SetTrendDirection(v string) *RootCauseUpsertBulk

SetTrendDirection sets the "trend_direction" field.

func (*RootCauseUpsertBulk) SetTrendPeriodEnd

func (u *RootCauseUpsertBulk) SetTrendPeriodEnd(v time.Time) *RootCauseUpsertBulk

SetTrendPeriodEnd sets the "trend_period_end" field.

func (*RootCauseUpsertBulk) SetTrendPeriodStart

func (u *RootCauseUpsertBulk) SetTrendPeriodStart(v time.Time) *RootCauseUpsertBulk

SetTrendPeriodStart sets the "trend_period_start" field.

func (*RootCauseUpsertBulk) SetTrendVelocity

func (u *RootCauseUpsertBulk) SetTrendVelocity(v float64) *RootCauseUpsertBulk

SetTrendVelocity sets the "trend_velocity" field.

func (*RootCauseUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the RootCauseCreateBulk.OnConflict documentation for more info.

func (*RootCauseUpsertBulk) UpdateDescription

func (u *RootCauseUpsertBulk) UpdateDescription() *RootCauseUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateDomainName

func (u *RootCauseUpsertBulk) UpdateDomainName() *RootCauseUpsertBulk

UpdateDomainName sets the "domain_name" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateDomainSubdomain

func (u *RootCauseUpsertBulk) UpdateDomainSubdomain() *RootCauseUpsertBulk

UpdateDomainSubdomain sets the "domain_subdomain" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateDomainTeam

func (u *RootCauseUpsertBulk) UpdateDomainTeam() *RootCauseUpsertBulk

UpdateDomainTeam sets the "domain_team" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateFirstSeen

func (u *RootCauseUpsertBulk) UpdateFirstSeen() *RootCauseUpsertBulk

UpdateFirstSeen sets the "first_seen" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateImpactAffectedCustomers

func (u *RootCauseUpsertBulk) UpdateImpactAffectedCustomers() *RootCauseUpsertBulk

UpdateImpactAffectedCustomers sets the "impact_affected_customers" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateImpactAffectedEntities

func (u *RootCauseUpsertBulk) UpdateImpactAffectedEntities() *RootCauseUpsertBulk

UpdateImpactAffectedEntities sets the "impact_affected_entities" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateImpactEscalationRate

func (u *RootCauseUpsertBulk) UpdateImpactEscalationRate() *RootCauseUpsertBulk

UpdateImpactEscalationRate sets the "impact_escalation_rate" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateImpactEstimatedRevenueLoss

func (u *RootCauseUpsertBulk) UpdateImpactEstimatedRevenueLoss() *RootCauseUpsertBulk

UpdateImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateImpactSignalCount

func (u *RootCauseUpsertBulk) UpdateImpactSignalCount() *RootCauseUpsertBulk

UpdateImpactSignalCount sets the "impact_signal_count" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateLastSeen

func (u *RootCauseUpsertBulk) UpdateLastSeen() *RootCauseUpsertBulk

UpdateLastSeen sets the "last_seen" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateMetadata

func (u *RootCauseUpsertBulk) UpdateMetadata() *RootCauseUpsertBulk

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateNewValues

func (u *RootCauseUpsertBulk) UpdateNewValues() *RootCauseUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.RootCause.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(rootcause.FieldID)
		}),
	).
	Exec(ctx)

func (*RootCauseUpsertBulk) UpdateOwnerTeam

func (u *RootCauseUpsertBulk) UpdateOwnerTeam() *RootCauseUpsertBulk

UpdateOwnerTeam sets the "owner_team" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdatePriorityScore

func (u *RootCauseUpsertBulk) UpdatePriorityScore() *RootCauseUpsertBulk

UpdatePriorityScore sets the "priority_score" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateRecurrenceCount

func (u *RootCauseUpsertBulk) UpdateRecurrenceCount() *RootCauseUpsertBulk

UpdateRecurrenceCount sets the "recurrence_count" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateRemediationID

func (u *RootCauseUpsertBulk) UpdateRemediationID() *RootCauseUpsertBulk

UpdateRemediationID sets the "remediation_id" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateSeverity

func (u *RootCauseUpsertBulk) UpdateSeverity() *RootCauseUpsertBulk

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateStatus

func (u *RootCauseUpsertBulk) UpdateStatus() *RootCauseUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateSymptomPatterns

func (u *RootCauseUpsertBulk) UpdateSymptomPatterns() *RootCauseUpsertBulk

UpdateSymptomPatterns sets the "symptom_patterns" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateTags

func (u *RootCauseUpsertBulk) UpdateTags() *RootCauseUpsertBulk

UpdateTags sets the "tags" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateTitle

func (u *RootCauseUpsertBulk) UpdateTitle() *RootCauseUpsertBulk

UpdateTitle sets the "title" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateTrendDirection

func (u *RootCauseUpsertBulk) UpdateTrendDirection() *RootCauseUpsertBulk

UpdateTrendDirection sets the "trend_direction" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateTrendPeriodEnd

func (u *RootCauseUpsertBulk) UpdateTrendPeriodEnd() *RootCauseUpsertBulk

UpdateTrendPeriodEnd sets the "trend_period_end" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateTrendPeriodStart

func (u *RootCauseUpsertBulk) UpdateTrendPeriodStart() *RootCauseUpsertBulk

UpdateTrendPeriodStart sets the "trend_period_start" field to the value that was provided on create.

func (*RootCauseUpsertBulk) UpdateTrendVelocity

func (u *RootCauseUpsertBulk) UpdateTrendVelocity() *RootCauseUpsertBulk

UpdateTrendVelocity sets the "trend_velocity" field to the value that was provided on create.

type RootCauseUpsertOne

type RootCauseUpsertOne struct {
	// contains filtered or unexported fields
}

RootCauseUpsertOne is the builder for "upsert"-ing

one RootCause node.

func (*RootCauseUpsertOne) AddImpactAffectedCustomers

func (u *RootCauseUpsertOne) AddImpactAffectedCustomers(v int) *RootCauseUpsertOne

AddImpactAffectedCustomers adds v to the "impact_affected_customers" field.

func (*RootCauseUpsertOne) AddImpactEscalationRate

func (u *RootCauseUpsertOne) AddImpactEscalationRate(v float64) *RootCauseUpsertOne

AddImpactEscalationRate adds v to the "impact_escalation_rate" field.

func (*RootCauseUpsertOne) AddImpactEstimatedRevenueLoss

func (u *RootCauseUpsertOne) AddImpactEstimatedRevenueLoss(v float64) *RootCauseUpsertOne

AddImpactEstimatedRevenueLoss adds v to the "impact_estimated_revenue_loss" field.

func (*RootCauseUpsertOne) AddImpactSignalCount

func (u *RootCauseUpsertOne) AddImpactSignalCount(v int) *RootCauseUpsertOne

AddImpactSignalCount adds v to the "impact_signal_count" field.

func (*RootCauseUpsertOne) AddPriorityScore

func (u *RootCauseUpsertOne) AddPriorityScore(v int) *RootCauseUpsertOne

AddPriorityScore adds v to the "priority_score" field.

func (*RootCauseUpsertOne) AddRecurrenceCount

func (u *RootCauseUpsertOne) AddRecurrenceCount(v int) *RootCauseUpsertOne

AddRecurrenceCount adds v to the "recurrence_count" field.

func (*RootCauseUpsertOne) AddTrendVelocity

func (u *RootCauseUpsertOne) AddTrendVelocity(v float64) *RootCauseUpsertOne

AddTrendVelocity adds v to the "trend_velocity" field.

func (*RootCauseUpsertOne) ClearDescription

func (u *RootCauseUpsertOne) ClearDescription() *RootCauseUpsertOne

ClearDescription clears the value of the "description" field.

func (*RootCauseUpsertOne) ClearDomainSubdomain

func (u *RootCauseUpsertOne) ClearDomainSubdomain() *RootCauseUpsertOne

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*RootCauseUpsertOne) ClearDomainTeam

func (u *RootCauseUpsertOne) ClearDomainTeam() *RootCauseUpsertOne

ClearDomainTeam clears the value of the "domain_team" field.

func (*RootCauseUpsertOne) ClearImpactAffectedEntities

func (u *RootCauseUpsertOne) ClearImpactAffectedEntities() *RootCauseUpsertOne

ClearImpactAffectedEntities clears the value of the "impact_affected_entities" field.

func (*RootCauseUpsertOne) ClearMetadata

func (u *RootCauseUpsertOne) ClearMetadata() *RootCauseUpsertOne

ClearMetadata clears the value of the "metadata" field.

func (*RootCauseUpsertOne) ClearOwnerTeam

func (u *RootCauseUpsertOne) ClearOwnerTeam() *RootCauseUpsertOne

ClearOwnerTeam clears the value of the "owner_team" field.

func (*RootCauseUpsertOne) ClearRemediationID

func (u *RootCauseUpsertOne) ClearRemediationID() *RootCauseUpsertOne

ClearRemediationID clears the value of the "remediation_id" field.

func (*RootCauseUpsertOne) ClearSymptomPatterns

func (u *RootCauseUpsertOne) ClearSymptomPatterns() *RootCauseUpsertOne

ClearSymptomPatterns clears the value of the "symptom_patterns" field.

func (*RootCauseUpsertOne) ClearTags

func (u *RootCauseUpsertOne) ClearTags() *RootCauseUpsertOne

ClearTags clears the value of the "tags" field.

func (*RootCauseUpsertOne) ClearTrendDirection

func (u *RootCauseUpsertOne) ClearTrendDirection() *RootCauseUpsertOne

ClearTrendDirection clears the value of the "trend_direction" field.

func (*RootCauseUpsertOne) ClearTrendPeriodEnd

func (u *RootCauseUpsertOne) ClearTrendPeriodEnd() *RootCauseUpsertOne

ClearTrendPeriodEnd clears the value of the "trend_period_end" field.

func (*RootCauseUpsertOne) ClearTrendPeriodStart

func (u *RootCauseUpsertOne) ClearTrendPeriodStart() *RootCauseUpsertOne

ClearTrendPeriodStart clears the value of the "trend_period_start" field.

func (*RootCauseUpsertOne) DoNothing

func (u *RootCauseUpsertOne) DoNothing() *RootCauseUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RootCauseUpsertOne) Exec

func (u *RootCauseUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*RootCauseUpsertOne) ExecX

func (u *RootCauseUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RootCauseUpsertOne) ID

func (u *RootCauseUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RootCauseUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*RootCauseUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.RootCause.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RootCauseUpsertOne) SetDescription

func (u *RootCauseUpsertOne) SetDescription(v string) *RootCauseUpsertOne

SetDescription sets the "description" field.

func (*RootCauseUpsertOne) SetDomainName

func (u *RootCauseUpsertOne) SetDomainName(v string) *RootCauseUpsertOne

SetDomainName sets the "domain_name" field.

func (*RootCauseUpsertOne) SetDomainSubdomain

func (u *RootCauseUpsertOne) SetDomainSubdomain(v string) *RootCauseUpsertOne

SetDomainSubdomain sets the "domain_subdomain" field.

func (*RootCauseUpsertOne) SetDomainTeam

func (u *RootCauseUpsertOne) SetDomainTeam(v string) *RootCauseUpsertOne

SetDomainTeam sets the "domain_team" field.

func (*RootCauseUpsertOne) SetFirstSeen

func (u *RootCauseUpsertOne) SetFirstSeen(v time.Time) *RootCauseUpsertOne

SetFirstSeen sets the "first_seen" field.

func (*RootCauseUpsertOne) SetImpactAffectedCustomers

func (u *RootCauseUpsertOne) SetImpactAffectedCustomers(v int) *RootCauseUpsertOne

SetImpactAffectedCustomers sets the "impact_affected_customers" field.

func (*RootCauseUpsertOne) SetImpactAffectedEntities

func (u *RootCauseUpsertOne) SetImpactAffectedEntities(v []common.Entity) *RootCauseUpsertOne

SetImpactAffectedEntities sets the "impact_affected_entities" field.

func (*RootCauseUpsertOne) SetImpactEscalationRate

func (u *RootCauseUpsertOne) SetImpactEscalationRate(v float64) *RootCauseUpsertOne

SetImpactEscalationRate sets the "impact_escalation_rate" field.

func (*RootCauseUpsertOne) SetImpactEstimatedRevenueLoss

func (u *RootCauseUpsertOne) SetImpactEstimatedRevenueLoss(v float64) *RootCauseUpsertOne

SetImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field.

func (*RootCauseUpsertOne) SetImpactSignalCount

func (u *RootCauseUpsertOne) SetImpactSignalCount(v int) *RootCauseUpsertOne

SetImpactSignalCount sets the "impact_signal_count" field.

func (*RootCauseUpsertOne) SetLastSeen

func (u *RootCauseUpsertOne) SetLastSeen(v time.Time) *RootCauseUpsertOne

SetLastSeen sets the "last_seen" field.

func (*RootCauseUpsertOne) SetMetadata

func (u *RootCauseUpsertOne) SetMetadata(v map[string]interface{}) *RootCauseUpsertOne

SetMetadata sets the "metadata" field.

func (*RootCauseUpsertOne) SetOwnerTeam

func (u *RootCauseUpsertOne) SetOwnerTeam(v string) *RootCauseUpsertOne

SetOwnerTeam sets the "owner_team" field.

func (*RootCauseUpsertOne) SetPriorityScore

func (u *RootCauseUpsertOne) SetPriorityScore(v int) *RootCauseUpsertOne

SetPriorityScore sets the "priority_score" field.

func (*RootCauseUpsertOne) SetRecurrenceCount

func (u *RootCauseUpsertOne) SetRecurrenceCount(v int) *RootCauseUpsertOne

SetRecurrenceCount sets the "recurrence_count" field.

func (*RootCauseUpsertOne) SetRemediationID

func (u *RootCauseUpsertOne) SetRemediationID(v string) *RootCauseUpsertOne

SetRemediationID sets the "remediation_id" field.

func (*RootCauseUpsertOne) SetSeverity

func (u *RootCauseUpsertOne) SetSeverity(v string) *RootCauseUpsertOne

SetSeverity sets the "severity" field.

func (*RootCauseUpsertOne) SetStatus

func (u *RootCauseUpsertOne) SetStatus(v string) *RootCauseUpsertOne

SetStatus sets the "status" field.

func (*RootCauseUpsertOne) SetSymptomPatterns

func (u *RootCauseUpsertOne) SetSymptomPatterns(v []string) *RootCauseUpsertOne

SetSymptomPatterns sets the "symptom_patterns" field.

func (*RootCauseUpsertOne) SetTags

SetTags sets the "tags" field.

func (*RootCauseUpsertOne) SetTitle

SetTitle sets the "title" field.

func (*RootCauseUpsertOne) SetTrendDirection

func (u *RootCauseUpsertOne) SetTrendDirection(v string) *RootCauseUpsertOne

SetTrendDirection sets the "trend_direction" field.

func (*RootCauseUpsertOne) SetTrendPeriodEnd

func (u *RootCauseUpsertOne) SetTrendPeriodEnd(v time.Time) *RootCauseUpsertOne

SetTrendPeriodEnd sets the "trend_period_end" field.

func (*RootCauseUpsertOne) SetTrendPeriodStart

func (u *RootCauseUpsertOne) SetTrendPeriodStart(v time.Time) *RootCauseUpsertOne

SetTrendPeriodStart sets the "trend_period_start" field.

func (*RootCauseUpsertOne) SetTrendVelocity

func (u *RootCauseUpsertOne) SetTrendVelocity(v float64) *RootCauseUpsertOne

SetTrendVelocity sets the "trend_velocity" field.

func (*RootCauseUpsertOne) Update

func (u *RootCauseUpsertOne) Update(set func(*RootCauseUpsert)) *RootCauseUpsertOne

Update allows overriding fields `UPDATE` values. See the RootCauseCreate.OnConflict documentation for more info.

func (*RootCauseUpsertOne) UpdateDescription

func (u *RootCauseUpsertOne) UpdateDescription() *RootCauseUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateDomainName

func (u *RootCauseUpsertOne) UpdateDomainName() *RootCauseUpsertOne

UpdateDomainName sets the "domain_name" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateDomainSubdomain

func (u *RootCauseUpsertOne) UpdateDomainSubdomain() *RootCauseUpsertOne

UpdateDomainSubdomain sets the "domain_subdomain" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateDomainTeam

func (u *RootCauseUpsertOne) UpdateDomainTeam() *RootCauseUpsertOne

UpdateDomainTeam sets the "domain_team" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateFirstSeen

func (u *RootCauseUpsertOne) UpdateFirstSeen() *RootCauseUpsertOne

UpdateFirstSeen sets the "first_seen" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateImpactAffectedCustomers

func (u *RootCauseUpsertOne) UpdateImpactAffectedCustomers() *RootCauseUpsertOne

UpdateImpactAffectedCustomers sets the "impact_affected_customers" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateImpactAffectedEntities

func (u *RootCauseUpsertOne) UpdateImpactAffectedEntities() *RootCauseUpsertOne

UpdateImpactAffectedEntities sets the "impact_affected_entities" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateImpactEscalationRate

func (u *RootCauseUpsertOne) UpdateImpactEscalationRate() *RootCauseUpsertOne

UpdateImpactEscalationRate sets the "impact_escalation_rate" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateImpactEstimatedRevenueLoss

func (u *RootCauseUpsertOne) UpdateImpactEstimatedRevenueLoss() *RootCauseUpsertOne

UpdateImpactEstimatedRevenueLoss sets the "impact_estimated_revenue_loss" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateImpactSignalCount

func (u *RootCauseUpsertOne) UpdateImpactSignalCount() *RootCauseUpsertOne

UpdateImpactSignalCount sets the "impact_signal_count" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateLastSeen

func (u *RootCauseUpsertOne) UpdateLastSeen() *RootCauseUpsertOne

UpdateLastSeen sets the "last_seen" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateMetadata

func (u *RootCauseUpsertOne) UpdateMetadata() *RootCauseUpsertOne

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateNewValues

func (u *RootCauseUpsertOne) UpdateNewValues() *RootCauseUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.RootCause.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(rootcause.FieldID)
		}),
	).
	Exec(ctx)

func (*RootCauseUpsertOne) UpdateOwnerTeam

func (u *RootCauseUpsertOne) UpdateOwnerTeam() *RootCauseUpsertOne

UpdateOwnerTeam sets the "owner_team" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdatePriorityScore

func (u *RootCauseUpsertOne) UpdatePriorityScore() *RootCauseUpsertOne

UpdatePriorityScore sets the "priority_score" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateRecurrenceCount

func (u *RootCauseUpsertOne) UpdateRecurrenceCount() *RootCauseUpsertOne

UpdateRecurrenceCount sets the "recurrence_count" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateRemediationID

func (u *RootCauseUpsertOne) UpdateRemediationID() *RootCauseUpsertOne

UpdateRemediationID sets the "remediation_id" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateSeverity

func (u *RootCauseUpsertOne) UpdateSeverity() *RootCauseUpsertOne

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateStatus

func (u *RootCauseUpsertOne) UpdateStatus() *RootCauseUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateSymptomPatterns

func (u *RootCauseUpsertOne) UpdateSymptomPatterns() *RootCauseUpsertOne

UpdateSymptomPatterns sets the "symptom_patterns" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateTags

func (u *RootCauseUpsertOne) UpdateTags() *RootCauseUpsertOne

UpdateTags sets the "tags" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateTitle

func (u *RootCauseUpsertOne) UpdateTitle() *RootCauseUpsertOne

UpdateTitle sets the "title" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateTrendDirection

func (u *RootCauseUpsertOne) UpdateTrendDirection() *RootCauseUpsertOne

UpdateTrendDirection sets the "trend_direction" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateTrendPeriodEnd

func (u *RootCauseUpsertOne) UpdateTrendPeriodEnd() *RootCauseUpsertOne

UpdateTrendPeriodEnd sets the "trend_period_end" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateTrendPeriodStart

func (u *RootCauseUpsertOne) UpdateTrendPeriodStart() *RootCauseUpsertOne

UpdateTrendPeriodStart sets the "trend_period_start" field to the value that was provided on create.

func (*RootCauseUpsertOne) UpdateTrendVelocity

func (u *RootCauseUpsertOne) UpdateTrendVelocity() *RootCauseUpsertOne

UpdateTrendVelocity sets the "trend_velocity" field to the value that was provided on create.

type RootCauses

type RootCauses []*RootCause

RootCauses is a parsable slice of RootCause.

type Signal

type Signal struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// SourceType holds the value of the "source_type" field.
	SourceType string `json:"source_type,omitempty"`
	// SourceName holds the value of the "source_name" field.
	SourceName string `json:"source_name,omitempty"`
	// SourceExternalID holds the value of the "source_external_id" field.
	SourceExternalID string `json:"source_external_id,omitempty"`
	// SourceURL holds the value of the "source_url" field.
	SourceURL string `json:"source_url,omitempty"`
	// DomainName holds the value of the "domain_name" field.
	DomainName string `json:"domain_name,omitempty"`
	// DomainSubdomain holds the value of the "domain_subdomain" field.
	DomainSubdomain string `json:"domain_subdomain,omitempty"`
	// DomainTeam holds the value of the "domain_team" field.
	DomainTeam string `json:"domain_team,omitempty"`
	// Severity holds the value of the "severity" field.
	Severity string `json:"severity,omitempty"`
	// Summary holds the value of the "summary" field.
	Summary string `json:"summary,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Entities holds the value of the "entities" field.
	Entities []common.Entity `json:"entities,omitempty"`
	// ObservedAt holds the value of the "observed_at" field.
	ObservedAt time.Time `json:"observed_at,omitempty"`
	// ReceivedAt holds the value of the "received_at" field.
	ReceivedAt time.Time `json:"received_at,omitempty"`
	// Fingerprint holds the value of the "fingerprint" field.
	Fingerprint *string `json:"fingerprint,omitempty"`
	// Metadata holds the value of the "metadata" field.
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// Derived holds the value of the "derived" field.
	Derived *signal.DerivedMetrics `json:"derived,omitempty"`
	// Tags holds the value of the "tags" field.
	Tags []common.Tag `json:"tags,omitempty"`
	// contains filtered or unexported fields
}

Signal is the model entity for the Signal schema.

func (*Signal) String

func (_m *Signal) String() string

String implements the fmt.Stringer.

func (*Signal) Unwrap

func (_m *Signal) Unwrap() *Signal

Unwrap unwraps the Signal 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 (*Signal) Update

func (_m *Signal) Update() *SignalUpdateOne

Update returns a builder for updating this Signal. Note that you need to call Signal.Unwrap() before calling this method if this Signal was returned from a transaction, and the transaction was committed or rolled back.

func (*Signal) Value

func (_m *Signal) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Signal. This includes values selected through modifiers, order, etc.

type SignalClient

type SignalClient struct {
	// contains filtered or unexported fields
}

SignalClient is a client for the Signal schema.

func NewSignalClient

func NewSignalClient(c config) *SignalClient

NewSignalClient returns a client for the Signal from the given config.

func (*SignalClient) Create

func (c *SignalClient) Create() *SignalCreate

Create returns a builder for creating a Signal entity.

func (*SignalClient) CreateBulk

func (c *SignalClient) CreateBulk(builders ...*SignalCreate) *SignalCreateBulk

CreateBulk returns a builder for creating a bulk of Signal entities.

func (*SignalClient) Delete

func (c *SignalClient) Delete() *SignalDelete

Delete returns a delete builder for Signal.

func (*SignalClient) DeleteOne

func (c *SignalClient) DeleteOne(_m *Signal) *SignalDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SignalClient) DeleteOneID

func (c *SignalClient) DeleteOneID(id string) *SignalDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SignalClient) Get

func (c *SignalClient) Get(ctx context.Context, id string) (*Signal, error)

Get returns a Signal entity by its id.

func (*SignalClient) GetX

func (c *SignalClient) GetX(ctx context.Context, id string) *Signal

GetX is like Get, but panics if an error occurs.

func (*SignalClient) Hooks

func (c *SignalClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SignalClient) Intercept

func (c *SignalClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `entsignal.Intercept(f(g(h())))`.

func (*SignalClient) Interceptors

func (c *SignalClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SignalClient) MapCreateBulk

func (c *SignalClient) MapCreateBulk(slice any, setFunc func(*SignalCreate, int)) *SignalCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SignalClient) Query

func (c *SignalClient) Query() *SignalQuery

Query returns a query builder for Signal.

func (*SignalClient) Update

func (c *SignalClient) Update() *SignalUpdate

Update returns an update builder for Signal.

func (*SignalClient) UpdateOne

func (c *SignalClient) UpdateOne(_m *Signal) *SignalUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SignalClient) UpdateOneID

func (c *SignalClient) UpdateOneID(id string) *SignalUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SignalClient) Use

func (c *SignalClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `entsignal.Hooks(f(g(h())))`.

type SignalCreate

type SignalCreate struct {
	// contains filtered or unexported fields
}

SignalCreate is the builder for creating a Signal entity.

func (*SignalCreate) Exec

func (_c *SignalCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SignalCreate) ExecX

func (_c *SignalCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignalCreate) Mutation

func (_c *SignalCreate) Mutation() *SignalMutation

Mutation returns the SignalMutation object of the builder.

func (*SignalCreate) OnConflict

func (_c *SignalCreate) OnConflict(opts ...sql.ConflictOption) *SignalUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Signal.Create().
	SetType(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SignalUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*SignalCreate) OnConflictColumns

func (_c *SignalCreate) OnConflictColumns(columns ...string) *SignalUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Signal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SignalCreate) Save

func (_c *SignalCreate) Save(ctx context.Context) (*Signal, error)

Save creates the Signal in the database.

func (*SignalCreate) SaveX

func (_c *SignalCreate) SaveX(ctx context.Context) *Signal

SaveX calls Save and panics if Save returns an error.

func (*SignalCreate) SetDerived

func (_c *SignalCreate) SetDerived(v *signal.DerivedMetrics) *SignalCreate

SetDerived sets the "derived" field.

func (*SignalCreate) SetDescription

func (_c *SignalCreate) SetDescription(v string) *SignalCreate

SetDescription sets the "description" field.

func (*SignalCreate) SetDomainName

func (_c *SignalCreate) SetDomainName(v string) *SignalCreate

SetDomainName sets the "domain_name" field.

func (*SignalCreate) SetDomainSubdomain

func (_c *SignalCreate) SetDomainSubdomain(v string) *SignalCreate

SetDomainSubdomain sets the "domain_subdomain" field.

func (*SignalCreate) SetDomainTeam

func (_c *SignalCreate) SetDomainTeam(v string) *SignalCreate

SetDomainTeam sets the "domain_team" field.

func (*SignalCreate) SetEntities

func (_c *SignalCreate) SetEntities(v []common.Entity) *SignalCreate

SetEntities sets the "entities" field.

func (*SignalCreate) SetFingerprint

func (_c *SignalCreate) SetFingerprint(v string) *SignalCreate

SetFingerprint sets the "fingerprint" field.

func (*SignalCreate) SetID

func (_c *SignalCreate) SetID(v string) *SignalCreate

SetID sets the "id" field.

func (*SignalCreate) SetMetadata

func (_c *SignalCreate) SetMetadata(v map[string]interface{}) *SignalCreate

SetMetadata sets the "metadata" field.

func (*SignalCreate) SetNillableDescription

func (_c *SignalCreate) SetNillableDescription(v *string) *SignalCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SignalCreate) SetNillableDomainSubdomain

func (_c *SignalCreate) SetNillableDomainSubdomain(v *string) *SignalCreate

SetNillableDomainSubdomain sets the "domain_subdomain" field if the given value is not nil.

func (*SignalCreate) SetNillableDomainTeam

func (_c *SignalCreate) SetNillableDomainTeam(v *string) *SignalCreate

SetNillableDomainTeam sets the "domain_team" field if the given value is not nil.

func (*SignalCreate) SetNillableFingerprint

func (_c *SignalCreate) SetNillableFingerprint(v *string) *SignalCreate

SetNillableFingerprint sets the "fingerprint" field if the given value is not nil.

func (*SignalCreate) SetNillableSourceExternalID

func (_c *SignalCreate) SetNillableSourceExternalID(v *string) *SignalCreate

SetNillableSourceExternalID sets the "source_external_id" field if the given value is not nil.

func (*SignalCreate) SetNillableSourceURL

func (_c *SignalCreate) SetNillableSourceURL(v *string) *SignalCreate

SetNillableSourceURL sets the "source_url" field if the given value is not nil.

func (*SignalCreate) SetObservedAt

func (_c *SignalCreate) SetObservedAt(v time.Time) *SignalCreate

SetObservedAt sets the "observed_at" field.

func (*SignalCreate) SetReceivedAt

func (_c *SignalCreate) SetReceivedAt(v time.Time) *SignalCreate

SetReceivedAt sets the "received_at" field.

func (*SignalCreate) SetSeverity

func (_c *SignalCreate) SetSeverity(v string) *SignalCreate

SetSeverity sets the "severity" field.

func (*SignalCreate) SetSourceExternalID

func (_c *SignalCreate) SetSourceExternalID(v string) *SignalCreate

SetSourceExternalID sets the "source_external_id" field.

func (*SignalCreate) SetSourceName

func (_c *SignalCreate) SetSourceName(v string) *SignalCreate

SetSourceName sets the "source_name" field.

func (*SignalCreate) SetSourceType

func (_c *SignalCreate) SetSourceType(v string) *SignalCreate

SetSourceType sets the "source_type" field.

func (*SignalCreate) SetSourceURL

func (_c *SignalCreate) SetSourceURL(v string) *SignalCreate

SetSourceURL sets the "source_url" field.

func (*SignalCreate) SetStatus

func (_c *SignalCreate) SetStatus(v string) *SignalCreate

SetStatus sets the "status" field.

func (*SignalCreate) SetSummary

func (_c *SignalCreate) SetSummary(v string) *SignalCreate

SetSummary sets the "summary" field.

func (*SignalCreate) SetTags

func (_c *SignalCreate) SetTags(v []common.Tag) *SignalCreate

SetTags sets the "tags" field.

func (*SignalCreate) SetType

func (_c *SignalCreate) SetType(v string) *SignalCreate

SetType sets the "type" field.

type SignalCreateBulk

type SignalCreateBulk struct {
	// contains filtered or unexported fields
}

SignalCreateBulk is the builder for creating many Signal entities in bulk.

func (*SignalCreateBulk) Exec

func (_c *SignalCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SignalCreateBulk) ExecX

func (_c *SignalCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignalCreateBulk) OnConflict

func (_c *SignalCreateBulk) OnConflict(opts ...sql.ConflictOption) *SignalUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Signal.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SignalUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*SignalCreateBulk) OnConflictColumns

func (_c *SignalCreateBulk) OnConflictColumns(columns ...string) *SignalUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Signal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SignalCreateBulk) Save

func (_c *SignalCreateBulk) Save(ctx context.Context) ([]*Signal, error)

Save creates the Signal entities in the database.

func (*SignalCreateBulk) SaveX

func (_c *SignalCreateBulk) SaveX(ctx context.Context) []*Signal

SaveX is like Save, but panics if an error occurs.

type SignalDelete

type SignalDelete struct {
	// contains filtered or unexported fields
}

SignalDelete is the builder for deleting a Signal entity.

func (*SignalDelete) Exec

func (_d *SignalDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SignalDelete) ExecX

func (_d *SignalDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SignalDelete) Where

func (_d *SignalDelete) Where(ps ...predicate.Signal) *SignalDelete

Where appends a list predicates to the SignalDelete builder.

type SignalDeleteOne

type SignalDeleteOne struct {
	// contains filtered or unexported fields
}

SignalDeleteOne is the builder for deleting a single Signal entity.

func (*SignalDeleteOne) Exec

func (_d *SignalDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SignalDeleteOne) ExecX

func (_d *SignalDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignalDeleteOne) Where

func (_d *SignalDeleteOne) Where(ps ...predicate.Signal) *SignalDeleteOne

Where appends a list predicates to the SignalDelete builder.

type SignalGroupBy

type SignalGroupBy struct {
	// contains filtered or unexported fields
}

SignalGroupBy is the group-by builder for Signal entities.

func (*SignalGroupBy) Aggregate

func (_g *SignalGroupBy) Aggregate(fns ...AggregateFunc) *SignalGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SignalGroupBy) Bool

func (s *SignalGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SignalGroupBy) BoolX

func (s *SignalGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SignalGroupBy) Bools

func (s *SignalGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SignalGroupBy) BoolsX

func (s *SignalGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SignalGroupBy) Float64

func (s *SignalGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SignalGroupBy) Float64X

func (s *SignalGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SignalGroupBy) Float64s

func (s *SignalGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SignalGroupBy) Float64sX

func (s *SignalGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SignalGroupBy) Int

func (s *SignalGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SignalGroupBy) IntX

func (s *SignalGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SignalGroupBy) Ints

func (s *SignalGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SignalGroupBy) IntsX

func (s *SignalGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SignalGroupBy) Scan

func (_g *SignalGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SignalGroupBy) ScanX

func (s *SignalGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SignalGroupBy) String

func (s *SignalGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SignalGroupBy) StringX

func (s *SignalGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SignalGroupBy) Strings

func (s *SignalGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SignalGroupBy) StringsX

func (s *SignalGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SignalMutation

type SignalMutation struct {
	// contains filtered or unexported fields
}

SignalMutation represents an operation that mutates the Signal nodes in the graph.

func (*SignalMutation) AddField

func (m *SignalMutation) 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 (*SignalMutation) AddedEdges

func (m *SignalMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SignalMutation) AddedField

func (m *SignalMutation) 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 (*SignalMutation) AddedFields

func (m *SignalMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SignalMutation) AddedIDs

func (m *SignalMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SignalMutation) AppendEntities

func (m *SignalMutation) AppendEntities(c []common.Entity)

AppendEntities adds c to the "entities" field.

func (*SignalMutation) AppendTags

func (m *SignalMutation) AppendTags(c []common.Tag)

AppendTags adds c to the "tags" field.

func (*SignalMutation) AppendedEntities

func (m *SignalMutation) AppendedEntities() ([]common.Entity, bool)

AppendedEntities returns the list of values that were appended to the "entities" field in this mutation.

func (*SignalMutation) AppendedTags

func (m *SignalMutation) AppendedTags() ([]common.Tag, bool)

AppendedTags returns the list of values that were appended to the "tags" field in this mutation.

func (*SignalMutation) ClearDerived

func (m *SignalMutation) ClearDerived()

ClearDerived clears the value of the "derived" field.

func (*SignalMutation) ClearDescription

func (m *SignalMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*SignalMutation) ClearDomainSubdomain

func (m *SignalMutation) ClearDomainSubdomain()

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*SignalMutation) ClearDomainTeam

func (m *SignalMutation) ClearDomainTeam()

ClearDomainTeam clears the value of the "domain_team" field.

func (*SignalMutation) ClearEdge

func (m *SignalMutation) 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 (*SignalMutation) ClearEntities

func (m *SignalMutation) ClearEntities()

ClearEntities clears the value of the "entities" field.

func (*SignalMutation) ClearField

func (m *SignalMutation) 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 (*SignalMutation) ClearFingerprint

func (m *SignalMutation) ClearFingerprint()

ClearFingerprint clears the value of the "fingerprint" field.

func (*SignalMutation) ClearMetadata

func (m *SignalMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*SignalMutation) ClearSourceExternalID

func (m *SignalMutation) ClearSourceExternalID()

ClearSourceExternalID clears the value of the "source_external_id" field.

func (*SignalMutation) ClearSourceURL

func (m *SignalMutation) ClearSourceURL()

ClearSourceURL clears the value of the "source_url" field.

func (*SignalMutation) ClearTags

func (m *SignalMutation) ClearTags()

ClearTags clears the value of the "tags" field.

func (*SignalMutation) ClearedEdges

func (m *SignalMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SignalMutation) ClearedFields

func (m *SignalMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SignalMutation) Client

func (m SignalMutation) 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 (*SignalMutation) Derived

func (m *SignalMutation) Derived() (r *signal.DerivedMetrics, exists bool)

Derived returns the value of the "derived" field in the mutation.

func (*SignalMutation) DerivedCleared

func (m *SignalMutation) DerivedCleared() bool

DerivedCleared returns if the "derived" field was cleared in this mutation.

func (*SignalMutation) Description

func (m *SignalMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*SignalMutation) DescriptionCleared

func (m *SignalMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*SignalMutation) DomainName

func (m *SignalMutation) DomainName() (r string, exists bool)

DomainName returns the value of the "domain_name" field in the mutation.

func (*SignalMutation) DomainSubdomain

func (m *SignalMutation) DomainSubdomain() (r string, exists bool)

DomainSubdomain returns the value of the "domain_subdomain" field in the mutation.

func (*SignalMutation) DomainSubdomainCleared

func (m *SignalMutation) DomainSubdomainCleared() bool

DomainSubdomainCleared returns if the "domain_subdomain" field was cleared in this mutation.

func (*SignalMutation) DomainTeam

func (m *SignalMutation) DomainTeam() (r string, exists bool)

DomainTeam returns the value of the "domain_team" field in the mutation.

func (*SignalMutation) DomainTeamCleared

func (m *SignalMutation) DomainTeamCleared() bool

DomainTeamCleared returns if the "domain_team" field was cleared in this mutation.

func (*SignalMutation) EdgeCleared

func (m *SignalMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SignalMutation) Entities

func (m *SignalMutation) Entities() (r []common.Entity, exists bool)

Entities returns the value of the "entities" field in the mutation.

func (*SignalMutation) EntitiesCleared

func (m *SignalMutation) EntitiesCleared() bool

EntitiesCleared returns if the "entities" field was cleared in this mutation.

func (*SignalMutation) Field

func (m *SignalMutation) 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 (*SignalMutation) FieldCleared

func (m *SignalMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SignalMutation) Fields

func (m *SignalMutation) 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 (*SignalMutation) Fingerprint

func (m *SignalMutation) Fingerprint() (r string, exists bool)

Fingerprint returns the value of the "fingerprint" field in the mutation.

func (*SignalMutation) FingerprintCleared

func (m *SignalMutation) FingerprintCleared() bool

FingerprintCleared returns if the "fingerprint" field was cleared in this mutation.

func (*SignalMutation) GetType

func (m *SignalMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*SignalMutation) ID

func (m *SignalMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SignalMutation) IDs

func (m *SignalMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SignalMutation) Metadata

func (m *SignalMutation) Metadata() (r map[string]interface{}, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*SignalMutation) MetadataCleared

func (m *SignalMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*SignalMutation) ObservedAt

func (m *SignalMutation) ObservedAt() (r time.Time, exists bool)

ObservedAt returns the value of the "observed_at" field in the mutation.

func (*SignalMutation) OldDerived

func (m *SignalMutation) OldDerived(ctx context.Context) (v *signal.DerivedMetrics, err error)

OldDerived returns the old "derived" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldDescription

func (m *SignalMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldDomainName

func (m *SignalMutation) OldDomainName(ctx context.Context) (v string, err error)

OldDomainName returns the old "domain_name" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldDomainSubdomain

func (m *SignalMutation) OldDomainSubdomain(ctx context.Context) (v string, err error)

OldDomainSubdomain returns the old "domain_subdomain" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldDomainTeam

func (m *SignalMutation) OldDomainTeam(ctx context.Context) (v string, err error)

OldDomainTeam returns the old "domain_team" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldEntities

func (m *SignalMutation) OldEntities(ctx context.Context) (v []common.Entity, err error)

OldEntities returns the old "entities" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldField

func (m *SignalMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*SignalMutation) OldFingerprint

func (m *SignalMutation) OldFingerprint(ctx context.Context) (v *string, err error)

OldFingerprint returns the old "fingerprint" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldMetadata

func (m *SignalMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)

OldMetadata returns the old "metadata" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldObservedAt

func (m *SignalMutation) OldObservedAt(ctx context.Context) (v time.Time, err error)

OldObservedAt returns the old "observed_at" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldReceivedAt

func (m *SignalMutation) OldReceivedAt(ctx context.Context) (v time.Time, err error)

OldReceivedAt returns the old "received_at" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldSeverity

func (m *SignalMutation) OldSeverity(ctx context.Context) (v string, err error)

OldSeverity returns the old "severity" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldSourceExternalID

func (m *SignalMutation) OldSourceExternalID(ctx context.Context) (v string, err error)

OldSourceExternalID returns the old "source_external_id" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldSourceName

func (m *SignalMutation) OldSourceName(ctx context.Context) (v string, err error)

OldSourceName returns the old "source_name" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldSourceType

func (m *SignalMutation) OldSourceType(ctx context.Context) (v string, err error)

OldSourceType returns the old "source_type" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldSourceURL

func (m *SignalMutation) OldSourceURL(ctx context.Context) (v string, err error)

OldSourceURL returns the old "source_url" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldStatus

func (m *SignalMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldSummary

func (m *SignalMutation) OldSummary(ctx context.Context) (v string, err error)

OldSummary returns the old "summary" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldTags

func (m *SignalMutation) OldTags(ctx context.Context) (v []common.Tag, err error)

OldTags returns the old "tags" field's value of the Signal entity. If the Signal 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 (*SignalMutation) OldType

func (m *SignalMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the Signal entity. If the Signal 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 (*SignalMutation) Op

func (m *SignalMutation) Op() Op

Op returns the operation name.

func (*SignalMutation) ReceivedAt

func (m *SignalMutation) ReceivedAt() (r time.Time, exists bool)

ReceivedAt returns the value of the "received_at" field in the mutation.

func (*SignalMutation) RemovedEdges

func (m *SignalMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SignalMutation) RemovedIDs

func (m *SignalMutation) 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 (*SignalMutation) ResetDerived

func (m *SignalMutation) ResetDerived()

ResetDerived resets all changes to the "derived" field.

func (*SignalMutation) ResetDescription

func (m *SignalMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*SignalMutation) ResetDomainName

func (m *SignalMutation) ResetDomainName()

ResetDomainName resets all changes to the "domain_name" field.

func (*SignalMutation) ResetDomainSubdomain

func (m *SignalMutation) ResetDomainSubdomain()

ResetDomainSubdomain resets all changes to the "domain_subdomain" field.

func (*SignalMutation) ResetDomainTeam

func (m *SignalMutation) ResetDomainTeam()

ResetDomainTeam resets all changes to the "domain_team" field.

func (*SignalMutation) ResetEdge

func (m *SignalMutation) 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 (*SignalMutation) ResetEntities

func (m *SignalMutation) ResetEntities()

ResetEntities resets all changes to the "entities" field.

func (*SignalMutation) ResetField

func (m *SignalMutation) 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 (*SignalMutation) ResetFingerprint

func (m *SignalMutation) ResetFingerprint()

ResetFingerprint resets all changes to the "fingerprint" field.

func (*SignalMutation) ResetMetadata

func (m *SignalMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*SignalMutation) ResetObservedAt

func (m *SignalMutation) ResetObservedAt()

ResetObservedAt resets all changes to the "observed_at" field.

func (*SignalMutation) ResetReceivedAt

func (m *SignalMutation) ResetReceivedAt()

ResetReceivedAt resets all changes to the "received_at" field.

func (*SignalMutation) ResetSeverity

func (m *SignalMutation) ResetSeverity()

ResetSeverity resets all changes to the "severity" field.

func (*SignalMutation) ResetSourceExternalID

func (m *SignalMutation) ResetSourceExternalID()

ResetSourceExternalID resets all changes to the "source_external_id" field.

func (*SignalMutation) ResetSourceName

func (m *SignalMutation) ResetSourceName()

ResetSourceName resets all changes to the "source_name" field.

func (*SignalMutation) ResetSourceType

func (m *SignalMutation) ResetSourceType()

ResetSourceType resets all changes to the "source_type" field.

func (*SignalMutation) ResetSourceURL

func (m *SignalMutation) ResetSourceURL()

ResetSourceURL resets all changes to the "source_url" field.

func (*SignalMutation) ResetStatus

func (m *SignalMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SignalMutation) ResetSummary

func (m *SignalMutation) ResetSummary()

ResetSummary resets all changes to the "summary" field.

func (*SignalMutation) ResetTags

func (m *SignalMutation) ResetTags()

ResetTags resets all changes to the "tags" field.

func (*SignalMutation) ResetType

func (m *SignalMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*SignalMutation) SetDerived

func (m *SignalMutation) SetDerived(sm *signal.DerivedMetrics)

SetDerived sets the "derived" field.

func (*SignalMutation) SetDescription

func (m *SignalMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*SignalMutation) SetDomainName

func (m *SignalMutation) SetDomainName(s string)

SetDomainName sets the "domain_name" field.

func (*SignalMutation) SetDomainSubdomain

func (m *SignalMutation) SetDomainSubdomain(s string)

SetDomainSubdomain sets the "domain_subdomain" field.

func (*SignalMutation) SetDomainTeam

func (m *SignalMutation) SetDomainTeam(s string)

SetDomainTeam sets the "domain_team" field.

func (*SignalMutation) SetEntities

func (m *SignalMutation) SetEntities(c []common.Entity)

SetEntities sets the "entities" field.

func (*SignalMutation) SetField

func (m *SignalMutation) 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 (*SignalMutation) SetFingerprint

func (m *SignalMutation) SetFingerprint(s string)

SetFingerprint sets the "fingerprint" field.

func (*SignalMutation) SetID

func (m *SignalMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Signal entities.

func (*SignalMutation) SetMetadata

func (m *SignalMutation) SetMetadata(value map[string]interface{})

SetMetadata sets the "metadata" field.

func (*SignalMutation) SetObservedAt

func (m *SignalMutation) SetObservedAt(t time.Time)

SetObservedAt sets the "observed_at" field.

func (*SignalMutation) SetOp

func (m *SignalMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SignalMutation) SetReceivedAt

func (m *SignalMutation) SetReceivedAt(t time.Time)

SetReceivedAt sets the "received_at" field.

func (*SignalMutation) SetSeverity

func (m *SignalMutation) SetSeverity(s string)

SetSeverity sets the "severity" field.

func (*SignalMutation) SetSourceExternalID

func (m *SignalMutation) SetSourceExternalID(s string)

SetSourceExternalID sets the "source_external_id" field.

func (*SignalMutation) SetSourceName

func (m *SignalMutation) SetSourceName(s string)

SetSourceName sets the "source_name" field.

func (*SignalMutation) SetSourceType

func (m *SignalMutation) SetSourceType(s string)

SetSourceType sets the "source_type" field.

func (*SignalMutation) SetSourceURL

func (m *SignalMutation) SetSourceURL(s string)

SetSourceURL sets the "source_url" field.

func (*SignalMutation) SetStatus

func (m *SignalMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*SignalMutation) SetSummary

func (m *SignalMutation) SetSummary(s string)

SetSummary sets the "summary" field.

func (*SignalMutation) SetTags

func (m *SignalMutation) SetTags(c []common.Tag)

SetTags sets the "tags" field.

func (*SignalMutation) SetType

func (m *SignalMutation) SetType(s string)

SetType sets the "type" field.

func (*SignalMutation) Severity

func (m *SignalMutation) Severity() (r string, exists bool)

Severity returns the value of the "severity" field in the mutation.

func (*SignalMutation) SourceExternalID

func (m *SignalMutation) SourceExternalID() (r string, exists bool)

SourceExternalID returns the value of the "source_external_id" field in the mutation.

func (*SignalMutation) SourceExternalIDCleared

func (m *SignalMutation) SourceExternalIDCleared() bool

SourceExternalIDCleared returns if the "source_external_id" field was cleared in this mutation.

func (*SignalMutation) SourceName

func (m *SignalMutation) SourceName() (r string, exists bool)

SourceName returns the value of the "source_name" field in the mutation.

func (*SignalMutation) SourceType

func (m *SignalMutation) SourceType() (r string, exists bool)

SourceType returns the value of the "source_type" field in the mutation.

func (*SignalMutation) SourceURL

func (m *SignalMutation) SourceURL() (r string, exists bool)

SourceURL returns the value of the "source_url" field in the mutation.

func (*SignalMutation) SourceURLCleared

func (m *SignalMutation) SourceURLCleared() bool

SourceURLCleared returns if the "source_url" field was cleared in this mutation.

func (*SignalMutation) Status

func (m *SignalMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*SignalMutation) Summary

func (m *SignalMutation) Summary() (r string, exists bool)

Summary returns the value of the "summary" field in the mutation.

func (*SignalMutation) Tags

func (m *SignalMutation) Tags() (r []common.Tag, exists bool)

Tags returns the value of the "tags" field in the mutation.

func (*SignalMutation) TagsCleared

func (m *SignalMutation) TagsCleared() bool

TagsCleared returns if the "tags" field was cleared in this mutation.

func (SignalMutation) Tx

func (m SignalMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SignalMutation) Type

func (m *SignalMutation) Type() string

Type returns the node type of this mutation (Signal).

func (*SignalMutation) Where

func (m *SignalMutation) Where(ps ...predicate.Signal)

Where appends a list predicates to the SignalMutation builder.

func (*SignalMutation) WhereP

func (m *SignalMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SignalMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SignalQuery

type SignalQuery struct {
	// contains filtered or unexported fields
}

SignalQuery is the builder for querying Signal entities.

func (*SignalQuery) Aggregate

func (_q *SignalQuery) Aggregate(fns ...AggregateFunc) *SignalSelect

Aggregate returns a SignalSelect configured with the given aggregations.

func (*SignalQuery) All

func (_q *SignalQuery) All(ctx context.Context) ([]*Signal, error)

All executes the query and returns a list of Signals.

func (*SignalQuery) AllX

func (_q *SignalQuery) AllX(ctx context.Context) []*Signal

AllX is like All, but panics if an error occurs.

func (*SignalQuery) Clone

func (_q *SignalQuery) Clone() *SignalQuery

Clone returns a duplicate of the SignalQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SignalQuery) Count

func (_q *SignalQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SignalQuery) CountX

func (_q *SignalQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SignalQuery) Exist

func (_q *SignalQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SignalQuery) ExistX

func (_q *SignalQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SignalQuery) First

func (_q *SignalQuery) First(ctx context.Context) (*Signal, error)

First returns the first Signal entity from the query. Returns a *NotFoundError when no Signal was found.

func (*SignalQuery) FirstID

func (_q *SignalQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Signal ID from the query. Returns a *NotFoundError when no Signal ID was found.

func (*SignalQuery) FirstIDX

func (_q *SignalQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*SignalQuery) FirstX

func (_q *SignalQuery) FirstX(ctx context.Context) *Signal

FirstX is like First, but panics if an error occurs.

func (*SignalQuery) GroupBy

func (_q *SignalQuery) GroupBy(field string, fields ...string) *SignalGroupBy

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 {
	Type string `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Signal.Query().
	GroupBy(entsignal.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SignalQuery) IDs

func (_q *SignalQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Signal IDs.

func (*SignalQuery) IDsX

func (_q *SignalQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*SignalQuery) Limit

func (_q *SignalQuery) Limit(limit int) *SignalQuery

Limit the number of records to be returned by this query.

func (*SignalQuery) Offset

func (_q *SignalQuery) Offset(offset int) *SignalQuery

Offset to start from.

func (*SignalQuery) Only

func (_q *SignalQuery) Only(ctx context.Context) (*Signal, error)

Only returns a single Signal entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Signal entity is found. Returns a *NotFoundError when no Signal entities are found.

func (*SignalQuery) OnlyID

func (_q *SignalQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Signal ID in the query. Returns a *NotSingularError when more than one Signal ID is found. Returns a *NotFoundError when no entities are found.

func (*SignalQuery) OnlyIDX

func (_q *SignalQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SignalQuery) OnlyX

func (_q *SignalQuery) OnlyX(ctx context.Context) *Signal

OnlyX is like Only, but panics if an error occurs.

func (*SignalQuery) Order

func (_q *SignalQuery) Order(o ...entsignal.OrderOption) *SignalQuery

Order specifies how the records should be ordered.

func (*SignalQuery) Select

func (_q *SignalQuery) Select(fields ...string) *SignalSelect

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 {
	Type string `json:"type,omitempty"`
}

client.Signal.Query().
	Select(entsignal.FieldType).
	Scan(ctx, &v)

func (*SignalQuery) Unique

func (_q *SignalQuery) Unique(unique bool) *SignalQuery

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 (*SignalQuery) Where

func (_q *SignalQuery) Where(ps ...predicate.Signal) *SignalQuery

Where adds a new predicate for the SignalQuery builder.

type SignalRootCauseLink struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// SignalID holds the value of the "signal_id" field.
	SignalID string `json:"signal_id,omitempty"`
	// RootCauseID holds the value of the "root_cause_id" field.
	RootCauseID string `json:"root_cause_id,omitempty"`
	// LinkedAt holds the value of the "linked_at" field.
	LinkedAt time.Time `json:"linked_at,omitempty"`
	// contains filtered or unexported fields
}

SignalRootCauseLink is the model entity for the SignalRootCauseLink schema.

func (*SignalRootCauseLink) String

func (_m *SignalRootCauseLink) String() string

String implements the fmt.Stringer.

func (*SignalRootCauseLink) Unwrap

Unwrap unwraps the SignalRootCauseLink 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 (*SignalRootCauseLink) Update

Update returns a builder for updating this SignalRootCauseLink. Note that you need to call SignalRootCauseLink.Unwrap() before calling this method if this SignalRootCauseLink was returned from a transaction, and the transaction was committed or rolled back.

func (*SignalRootCauseLink) Value

func (_m *SignalRootCauseLink) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the SignalRootCauseLink. This includes values selected through modifiers, order, etc.

type SignalRootCauseLinkClient

type SignalRootCauseLinkClient struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkClient is a client for the SignalRootCauseLink schema.

func NewSignalRootCauseLinkClient

func NewSignalRootCauseLinkClient(c config) *SignalRootCauseLinkClient

NewSignalRootCauseLinkClient returns a client for the SignalRootCauseLink from the given config.

func (*SignalRootCauseLinkClient) Create

Create returns a builder for creating a SignalRootCauseLink entity.

func (*SignalRootCauseLinkClient) CreateBulk

CreateBulk returns a builder for creating a bulk of SignalRootCauseLink entities.

func (*SignalRootCauseLinkClient) Delete

Delete returns a delete builder for SignalRootCauseLink.

func (*SignalRootCauseLinkClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SignalRootCauseLinkClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SignalRootCauseLinkClient) Get

Get returns a SignalRootCauseLink entity by its id.

func (*SignalRootCauseLinkClient) GetX

GetX is like Get, but panics if an error occurs.

func (*SignalRootCauseLinkClient) Hooks

func (c *SignalRootCauseLinkClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SignalRootCauseLinkClient) Intercept

func (c *SignalRootCauseLinkClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `signalrootcauselink.Intercept(f(g(h())))`.

func (*SignalRootCauseLinkClient) Interceptors

func (c *SignalRootCauseLinkClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SignalRootCauseLinkClient) MapCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SignalRootCauseLinkClient) Query

Query returns a query builder for SignalRootCauseLink.

func (*SignalRootCauseLinkClient) Update

Update returns an update builder for SignalRootCauseLink.

func (*SignalRootCauseLinkClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SignalRootCauseLinkClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*SignalRootCauseLinkClient) Use

func (c *SignalRootCauseLinkClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `signalrootcauselink.Hooks(f(g(h())))`.

type SignalRootCauseLinkCreate

type SignalRootCauseLinkCreate struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkCreate is the builder for creating a SignalRootCauseLink entity.

func (*SignalRootCauseLinkCreate) Exec

Exec executes the query.

func (*SignalRootCauseLinkCreate) ExecX

func (_c *SignalRootCauseLinkCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignalRootCauseLinkCreate) Mutation

Mutation returns the SignalRootCauseLinkMutation object of the builder.

func (*SignalRootCauseLinkCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SignalRootCauseLink.Create().
	SetSignalID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SignalRootCauseLinkUpsert) {
		SetSignalID(v+v).
	}).
	Exec(ctx)

func (*SignalRootCauseLinkCreate) OnConflictColumns

func (_c *SignalRootCauseLinkCreate) OnConflictColumns(columns ...string) *SignalRootCauseLinkUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SignalRootCauseLink.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SignalRootCauseLinkCreate) Save

Save creates the SignalRootCauseLink in the database.

func (*SignalRootCauseLinkCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*SignalRootCauseLinkCreate) SetLinkedAt

SetLinkedAt sets the "linked_at" field.

func (*SignalRootCauseLinkCreate) SetNillableLinkedAt

func (_c *SignalRootCauseLinkCreate) SetNillableLinkedAt(v *time.Time) *SignalRootCauseLinkCreate

SetNillableLinkedAt sets the "linked_at" field if the given value is not nil.

func (*SignalRootCauseLinkCreate) SetRootCauseID

SetRootCauseID sets the "root_cause_id" field.

func (*SignalRootCauseLinkCreate) SetSignalID

SetSignalID sets the "signal_id" field.

type SignalRootCauseLinkCreateBulk

type SignalRootCauseLinkCreateBulk struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkCreateBulk is the builder for creating many SignalRootCauseLink entities in bulk.

func (*SignalRootCauseLinkCreateBulk) Exec

Exec executes the query.

func (*SignalRootCauseLinkCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SignalRootCauseLinkCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SignalRootCauseLink.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SignalRootCauseLinkUpsert) {
		SetSignalID(v+v).
	}).
	Exec(ctx)

func (*SignalRootCauseLinkCreateBulk) OnConflictColumns

func (_c *SignalRootCauseLinkCreateBulk) OnConflictColumns(columns ...string) *SignalRootCauseLinkUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SignalRootCauseLink.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SignalRootCauseLinkCreateBulk) Save

Save creates the SignalRootCauseLink entities in the database.

func (*SignalRootCauseLinkCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type SignalRootCauseLinkDelete

type SignalRootCauseLinkDelete struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkDelete is the builder for deleting a SignalRootCauseLink entity.

func (*SignalRootCauseLinkDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*SignalRootCauseLinkDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SignalRootCauseLinkDelete) Where

Where appends a list predicates to the SignalRootCauseLinkDelete builder.

type SignalRootCauseLinkDeleteOne

type SignalRootCauseLinkDeleteOne struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkDeleteOne is the builder for deleting a single SignalRootCauseLink entity.

func (*SignalRootCauseLinkDeleteOne) Exec

Exec executes the deletion query.

func (*SignalRootCauseLinkDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SignalRootCauseLinkDeleteOne) Where

Where appends a list predicates to the SignalRootCauseLinkDelete builder.

type SignalRootCauseLinkGroupBy

type SignalRootCauseLinkGroupBy struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkGroupBy is the group-by builder for SignalRootCauseLink entities.

func (*SignalRootCauseLinkGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*SignalRootCauseLinkGroupBy) Bool

func (s *SignalRootCauseLinkGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkGroupBy) BoolX

func (s *SignalRootCauseLinkGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SignalRootCauseLinkGroupBy) Bools

func (s *SignalRootCauseLinkGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkGroupBy) BoolsX

func (s *SignalRootCauseLinkGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SignalRootCauseLinkGroupBy) Float64

func (s *SignalRootCauseLinkGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkGroupBy) Float64X

func (s *SignalRootCauseLinkGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SignalRootCauseLinkGroupBy) Float64s

func (s *SignalRootCauseLinkGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkGroupBy) Float64sX

func (s *SignalRootCauseLinkGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SignalRootCauseLinkGroupBy) Int

func (s *SignalRootCauseLinkGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkGroupBy) IntX

func (s *SignalRootCauseLinkGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SignalRootCauseLinkGroupBy) Ints

func (s *SignalRootCauseLinkGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkGroupBy) IntsX

func (s *SignalRootCauseLinkGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SignalRootCauseLinkGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*SignalRootCauseLinkGroupBy) ScanX

func (s *SignalRootCauseLinkGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SignalRootCauseLinkGroupBy) String

func (s *SignalRootCauseLinkGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkGroupBy) StringX

func (s *SignalRootCauseLinkGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SignalRootCauseLinkGroupBy) Strings

func (s *SignalRootCauseLinkGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkGroupBy) StringsX

func (s *SignalRootCauseLinkGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SignalRootCauseLinkMutation

type SignalRootCauseLinkMutation struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkMutation represents an operation that mutates the SignalRootCauseLink nodes in the graph.

func (*SignalRootCauseLinkMutation) AddField

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) AddedEdges

func (m *SignalRootCauseLinkMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SignalRootCauseLinkMutation) AddedField

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) AddedFields

func (m *SignalRootCauseLinkMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SignalRootCauseLinkMutation) AddedIDs

func (m *SignalRootCauseLinkMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SignalRootCauseLinkMutation) ClearEdge

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) ClearField

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) ClearedEdges

func (m *SignalRootCauseLinkMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SignalRootCauseLinkMutation) ClearedFields

func (m *SignalRootCauseLinkMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SignalRootCauseLinkMutation) Client

func (m SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) EdgeCleared

func (m *SignalRootCauseLinkMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SignalRootCauseLinkMutation) Field

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) FieldCleared

func (m *SignalRootCauseLinkMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SignalRootCauseLinkMutation) Fields

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) ID

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SignalRootCauseLinkMutation) LinkedAt

func (m *SignalRootCauseLinkMutation) LinkedAt() (r time.Time, exists bool)

LinkedAt returns the value of the "linked_at" field in the mutation.

func (*SignalRootCauseLinkMutation) OldField

func (m *SignalRootCauseLinkMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*SignalRootCauseLinkMutation) OldLinkedAt

func (m *SignalRootCauseLinkMutation) OldLinkedAt(ctx context.Context) (v time.Time, err error)

OldLinkedAt returns the old "linked_at" field's value of the SignalRootCauseLink entity. If the SignalRootCauseLink 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 (*SignalRootCauseLinkMutation) OldRootCauseID

func (m *SignalRootCauseLinkMutation) OldRootCauseID(ctx context.Context) (v string, err error)

OldRootCauseID returns the old "root_cause_id" field's value of the SignalRootCauseLink entity. If the SignalRootCauseLink 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 (*SignalRootCauseLinkMutation) OldSignalID

func (m *SignalRootCauseLinkMutation) OldSignalID(ctx context.Context) (v string, err error)

OldSignalID returns the old "signal_id" field's value of the SignalRootCauseLink entity. If the SignalRootCauseLink 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 (*SignalRootCauseLinkMutation) Op

Op returns the operation name.

func (*SignalRootCauseLinkMutation) RemovedEdges

func (m *SignalRootCauseLinkMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SignalRootCauseLinkMutation) RemovedIDs

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) ResetEdge

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) ResetField

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) ResetLinkedAt

func (m *SignalRootCauseLinkMutation) ResetLinkedAt()

ResetLinkedAt resets all changes to the "linked_at" field.

func (*SignalRootCauseLinkMutation) ResetRootCauseID

func (m *SignalRootCauseLinkMutation) ResetRootCauseID()

ResetRootCauseID resets all changes to the "root_cause_id" field.

func (*SignalRootCauseLinkMutation) ResetSignalID

func (m *SignalRootCauseLinkMutation) ResetSignalID()

ResetSignalID resets all changes to the "signal_id" field.

func (*SignalRootCauseLinkMutation) RootCauseID

func (m *SignalRootCauseLinkMutation) RootCauseID() (r string, exists bool)

RootCauseID returns the value of the "root_cause_id" field in the mutation.

func (*SignalRootCauseLinkMutation) SetField

func (m *SignalRootCauseLinkMutation) 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 (*SignalRootCauseLinkMutation) SetLinkedAt

func (m *SignalRootCauseLinkMutation) SetLinkedAt(t time.Time)

SetLinkedAt sets the "linked_at" field.

func (*SignalRootCauseLinkMutation) SetOp

func (m *SignalRootCauseLinkMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SignalRootCauseLinkMutation) SetRootCauseID

func (m *SignalRootCauseLinkMutation) SetRootCauseID(s string)

SetRootCauseID sets the "root_cause_id" field.

func (*SignalRootCauseLinkMutation) SetSignalID

func (m *SignalRootCauseLinkMutation) SetSignalID(s string)

SetSignalID sets the "signal_id" field.

func (*SignalRootCauseLinkMutation) SignalID

func (m *SignalRootCauseLinkMutation) SignalID() (r string, exists bool)

SignalID returns the value of the "signal_id" field in the mutation.

func (SignalRootCauseLinkMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SignalRootCauseLinkMutation) Type

Type returns the node type of this mutation (SignalRootCauseLink).

func (*SignalRootCauseLinkMutation) Where

Where appends a list predicates to the SignalRootCauseLinkMutation builder.

func (*SignalRootCauseLinkMutation) WhereP

func (m *SignalRootCauseLinkMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SignalRootCauseLinkMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SignalRootCauseLinkQuery

type SignalRootCauseLinkQuery struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkQuery is the builder for querying SignalRootCauseLink entities.

func (*SignalRootCauseLinkQuery) Aggregate

Aggregate returns a SignalRootCauseLinkSelect configured with the given aggregations.

func (*SignalRootCauseLinkQuery) All

All executes the query and returns a list of SignalRootCauseLinks.

func (*SignalRootCauseLinkQuery) AllX

AllX is like All, but panics if an error occurs.

func (*SignalRootCauseLinkQuery) Clone

Clone returns a duplicate of the SignalRootCauseLinkQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SignalRootCauseLinkQuery) Count

func (_q *SignalRootCauseLinkQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SignalRootCauseLinkQuery) CountX

func (_q *SignalRootCauseLinkQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SignalRootCauseLinkQuery) Exist

Exist returns true if the query has elements in the graph.

func (*SignalRootCauseLinkQuery) ExistX

func (_q *SignalRootCauseLinkQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SignalRootCauseLinkQuery) First

First returns the first SignalRootCauseLink entity from the query. Returns a *NotFoundError when no SignalRootCauseLink was found.

func (*SignalRootCauseLinkQuery) FirstID

func (_q *SignalRootCauseLinkQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first SignalRootCauseLink ID from the query. Returns a *NotFoundError when no SignalRootCauseLink ID was found.

func (*SignalRootCauseLinkQuery) FirstIDX

func (_q *SignalRootCauseLinkQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SignalRootCauseLinkQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*SignalRootCauseLinkQuery) GroupBy

func (_q *SignalRootCauseLinkQuery) GroupBy(field string, fields ...string) *SignalRootCauseLinkGroupBy

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 {
	SignalID string `json:"signal_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SignalRootCauseLink.Query().
	GroupBy(signalrootcauselink.FieldSignalID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SignalRootCauseLinkQuery) IDs

func (_q *SignalRootCauseLinkQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of SignalRootCauseLink IDs.

func (*SignalRootCauseLinkQuery) IDsX

func (_q *SignalRootCauseLinkQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SignalRootCauseLinkQuery) Limit

Limit the number of records to be returned by this query.

func (*SignalRootCauseLinkQuery) Offset

Offset to start from.

func (*SignalRootCauseLinkQuery) Only

Only returns a single SignalRootCauseLink entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SignalRootCauseLink entity is found. Returns a *NotFoundError when no SignalRootCauseLink entities are found.

func (*SignalRootCauseLinkQuery) OnlyID

func (_q *SignalRootCauseLinkQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only SignalRootCauseLink ID in the query. Returns a *NotSingularError when more than one SignalRootCauseLink ID is found. Returns a *NotFoundError when no entities are found.

func (*SignalRootCauseLinkQuery) OnlyIDX

func (_q *SignalRootCauseLinkQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SignalRootCauseLinkQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*SignalRootCauseLinkQuery) Order

Order specifies how the records should be ordered.

func (*SignalRootCauseLinkQuery) 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 {
	SignalID string `json:"signal_id,omitempty"`
}

client.SignalRootCauseLink.Query().
	Select(signalrootcauselink.FieldSignalID).
	Scan(ctx, &v)

func (*SignalRootCauseLinkQuery) 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 (*SignalRootCauseLinkQuery) Where

Where adds a new predicate for the SignalRootCauseLinkQuery builder.

type SignalRootCauseLinkSelect

type SignalRootCauseLinkSelect struct {
	*SignalRootCauseLinkQuery
	// contains filtered or unexported fields
}

SignalRootCauseLinkSelect is the builder for selecting fields of SignalRootCauseLink entities.

func (*SignalRootCauseLinkSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*SignalRootCauseLinkSelect) Bool

func (s *SignalRootCauseLinkSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkSelect) BoolX

func (s *SignalRootCauseLinkSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SignalRootCauseLinkSelect) Bools

func (s *SignalRootCauseLinkSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkSelect) BoolsX

func (s *SignalRootCauseLinkSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SignalRootCauseLinkSelect) Float64

func (s *SignalRootCauseLinkSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkSelect) Float64X

func (s *SignalRootCauseLinkSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SignalRootCauseLinkSelect) Float64s

func (s *SignalRootCauseLinkSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkSelect) Float64sX

func (s *SignalRootCauseLinkSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SignalRootCauseLinkSelect) Int

func (s *SignalRootCauseLinkSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkSelect) IntX

func (s *SignalRootCauseLinkSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SignalRootCauseLinkSelect) Ints

func (s *SignalRootCauseLinkSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkSelect) IntsX

func (s *SignalRootCauseLinkSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SignalRootCauseLinkSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*SignalRootCauseLinkSelect) ScanX

func (s *SignalRootCauseLinkSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SignalRootCauseLinkSelect) String

func (s *SignalRootCauseLinkSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkSelect) StringX

func (s *SignalRootCauseLinkSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SignalRootCauseLinkSelect) Strings

func (s *SignalRootCauseLinkSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SignalRootCauseLinkSelect) StringsX

func (s *SignalRootCauseLinkSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SignalRootCauseLinkUpdate

type SignalRootCauseLinkUpdate struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkUpdate is the builder for updating SignalRootCauseLink entities.

func (*SignalRootCauseLinkUpdate) Exec

Exec executes the query.

func (*SignalRootCauseLinkUpdate) ExecX

func (_u *SignalRootCauseLinkUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignalRootCauseLinkUpdate) Mutation

Mutation returns the SignalRootCauseLinkMutation object of the builder.

func (*SignalRootCauseLinkUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*SignalRootCauseLinkUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*SignalRootCauseLinkUpdate) SetLinkedAt

SetLinkedAt sets the "linked_at" field.

func (*SignalRootCauseLinkUpdate) SetNillableLinkedAt

func (_u *SignalRootCauseLinkUpdate) SetNillableLinkedAt(v *time.Time) *SignalRootCauseLinkUpdate

SetNillableLinkedAt sets the "linked_at" field if the given value is not nil.

func (*SignalRootCauseLinkUpdate) SetNillableRootCauseID

func (_u *SignalRootCauseLinkUpdate) SetNillableRootCauseID(v *string) *SignalRootCauseLinkUpdate

SetNillableRootCauseID sets the "root_cause_id" field if the given value is not nil.

func (*SignalRootCauseLinkUpdate) SetNillableSignalID

func (_u *SignalRootCauseLinkUpdate) SetNillableSignalID(v *string) *SignalRootCauseLinkUpdate

SetNillableSignalID sets the "signal_id" field if the given value is not nil.

func (*SignalRootCauseLinkUpdate) SetRootCauseID

SetRootCauseID sets the "root_cause_id" field.

func (*SignalRootCauseLinkUpdate) SetSignalID

SetSignalID sets the "signal_id" field.

func (*SignalRootCauseLinkUpdate) Where

Where appends a list predicates to the SignalRootCauseLinkUpdate builder.

type SignalRootCauseLinkUpdateOne

type SignalRootCauseLinkUpdateOne struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkUpdateOne is the builder for updating a single SignalRootCauseLink entity.

func (*SignalRootCauseLinkUpdateOne) Exec

Exec executes the query on the entity.

func (*SignalRootCauseLinkUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SignalRootCauseLinkUpdateOne) Mutation

Mutation returns the SignalRootCauseLinkMutation object of the builder.

func (*SignalRootCauseLinkUpdateOne) Save

Save executes the query and returns the updated SignalRootCauseLink entity.

func (*SignalRootCauseLinkUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*SignalRootCauseLinkUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SignalRootCauseLinkUpdateOne) SetLinkedAt

SetLinkedAt sets the "linked_at" field.

func (*SignalRootCauseLinkUpdateOne) SetNillableLinkedAt

SetNillableLinkedAt sets the "linked_at" field if the given value is not nil.

func (*SignalRootCauseLinkUpdateOne) SetNillableRootCauseID

func (_u *SignalRootCauseLinkUpdateOne) SetNillableRootCauseID(v *string) *SignalRootCauseLinkUpdateOne

SetNillableRootCauseID sets the "root_cause_id" field if the given value is not nil.

func (*SignalRootCauseLinkUpdateOne) SetNillableSignalID

SetNillableSignalID sets the "signal_id" field if the given value is not nil.

func (*SignalRootCauseLinkUpdateOne) SetRootCauseID

SetRootCauseID sets the "root_cause_id" field.

func (*SignalRootCauseLinkUpdateOne) SetSignalID

SetSignalID sets the "signal_id" field.

func (*SignalRootCauseLinkUpdateOne) Where

Where appends a list predicates to the SignalRootCauseLinkUpdate builder.

type SignalRootCauseLinkUpsert

type SignalRootCauseLinkUpsert struct {
	*sql.UpdateSet
}

SignalRootCauseLinkUpsert is the "OnConflict" setter.

func (*SignalRootCauseLinkUpsert) SetLinkedAt

SetLinkedAt sets the "linked_at" field.

func (*SignalRootCauseLinkUpsert) SetRootCauseID

SetRootCauseID sets the "root_cause_id" field.

func (*SignalRootCauseLinkUpsert) SetSignalID

SetSignalID sets the "signal_id" field.

func (*SignalRootCauseLinkUpsert) UpdateLinkedAt

UpdateLinkedAt sets the "linked_at" field to the value that was provided on create.

func (*SignalRootCauseLinkUpsert) UpdateRootCauseID

func (u *SignalRootCauseLinkUpsert) UpdateRootCauseID() *SignalRootCauseLinkUpsert

UpdateRootCauseID sets the "root_cause_id" field to the value that was provided on create.

func (*SignalRootCauseLinkUpsert) UpdateSignalID

UpdateSignalID sets the "signal_id" field to the value that was provided on create.

type SignalRootCauseLinkUpsertBulk

type SignalRootCauseLinkUpsertBulk struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkUpsertBulk is the builder for "upsert"-ing a bulk of SignalRootCauseLink nodes.

func (*SignalRootCauseLinkUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SignalRootCauseLinkUpsertBulk) Exec

Exec executes the query.

func (*SignalRootCauseLinkUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SignalRootCauseLinkUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SignalRootCauseLink.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SignalRootCauseLinkUpsertBulk) SetLinkedAt

SetLinkedAt sets the "linked_at" field.

func (*SignalRootCauseLinkUpsertBulk) SetRootCauseID

SetRootCauseID sets the "root_cause_id" field.

func (*SignalRootCauseLinkUpsertBulk) SetSignalID

SetSignalID sets the "signal_id" field.

func (*SignalRootCauseLinkUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the SignalRootCauseLinkCreateBulk.OnConflict documentation for more info.

func (*SignalRootCauseLinkUpsertBulk) UpdateLinkedAt

UpdateLinkedAt sets the "linked_at" field to the value that was provided on create.

func (*SignalRootCauseLinkUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SignalRootCauseLink.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SignalRootCauseLinkUpsertBulk) UpdateRootCauseID

UpdateRootCauseID sets the "root_cause_id" field to the value that was provided on create.

func (*SignalRootCauseLinkUpsertBulk) UpdateSignalID

UpdateSignalID sets the "signal_id" field to the value that was provided on create.

type SignalRootCauseLinkUpsertOne

type SignalRootCauseLinkUpsertOne struct {
	// contains filtered or unexported fields
}

SignalRootCauseLinkUpsertOne is the builder for "upsert"-ing

one SignalRootCauseLink node.

func (*SignalRootCauseLinkUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SignalRootCauseLinkUpsertOne) Exec

Exec executes the query.

func (*SignalRootCauseLinkUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SignalRootCauseLinkUpsertOne) ID

func (u *SignalRootCauseLinkUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SignalRootCauseLinkUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SignalRootCauseLinkUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SignalRootCauseLink.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SignalRootCauseLinkUpsertOne) SetLinkedAt

SetLinkedAt sets the "linked_at" field.

func (*SignalRootCauseLinkUpsertOne) SetRootCauseID

SetRootCauseID sets the "root_cause_id" field.

func (*SignalRootCauseLinkUpsertOne) SetSignalID

SetSignalID sets the "signal_id" field.

func (*SignalRootCauseLinkUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the SignalRootCauseLinkCreate.OnConflict documentation for more info.

func (*SignalRootCauseLinkUpsertOne) UpdateLinkedAt

UpdateLinkedAt sets the "linked_at" field to the value that was provided on create.

func (*SignalRootCauseLinkUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SignalRootCauseLink.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SignalRootCauseLinkUpsertOne) UpdateRootCauseID

UpdateRootCauseID sets the "root_cause_id" field to the value that was provided on create.

func (*SignalRootCauseLinkUpsertOne) UpdateSignalID

UpdateSignalID sets the "signal_id" field to the value that was provided on create.

type SignalRootCauseLinks []*SignalRootCauseLink

SignalRootCauseLinks is a parsable slice of SignalRootCauseLink.

type SignalSelect

type SignalSelect struct {
	*SignalQuery
	// contains filtered or unexported fields
}

SignalSelect is the builder for selecting fields of Signal entities.

func (*SignalSelect) Aggregate

func (_s *SignalSelect) Aggregate(fns ...AggregateFunc) *SignalSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SignalSelect) Bool

func (s *SignalSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SignalSelect) BoolX

func (s *SignalSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SignalSelect) Bools

func (s *SignalSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SignalSelect) BoolsX

func (s *SignalSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SignalSelect) Float64

func (s *SignalSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SignalSelect) Float64X

func (s *SignalSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SignalSelect) Float64s

func (s *SignalSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SignalSelect) Float64sX

func (s *SignalSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SignalSelect) Int

func (s *SignalSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SignalSelect) IntX

func (s *SignalSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SignalSelect) Ints

func (s *SignalSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SignalSelect) IntsX

func (s *SignalSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SignalSelect) Scan

func (_s *SignalSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SignalSelect) ScanX

func (s *SignalSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SignalSelect) String

func (s *SignalSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SignalSelect) StringX

func (s *SignalSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SignalSelect) Strings

func (s *SignalSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SignalSelect) StringsX

func (s *SignalSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SignalUpdate

type SignalUpdate struct {
	// contains filtered or unexported fields
}

SignalUpdate is the builder for updating Signal entities.

func (*SignalUpdate) AppendEntities

func (_u *SignalUpdate) AppendEntities(v []common.Entity) *SignalUpdate

AppendEntities appends value to the "entities" field.

func (*SignalUpdate) AppendTags

func (_u *SignalUpdate) AppendTags(v []common.Tag) *SignalUpdate

AppendTags appends value to the "tags" field.

func (*SignalUpdate) ClearDerived

func (_u *SignalUpdate) ClearDerived() *SignalUpdate

ClearDerived clears the value of the "derived" field.

func (*SignalUpdate) ClearDescription

func (_u *SignalUpdate) ClearDescription() *SignalUpdate

ClearDescription clears the value of the "description" field.

func (*SignalUpdate) ClearDomainSubdomain

func (_u *SignalUpdate) ClearDomainSubdomain() *SignalUpdate

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*SignalUpdate) ClearDomainTeam

func (_u *SignalUpdate) ClearDomainTeam() *SignalUpdate

ClearDomainTeam clears the value of the "domain_team" field.

func (*SignalUpdate) ClearEntities

func (_u *SignalUpdate) ClearEntities() *SignalUpdate

ClearEntities clears the value of the "entities" field.

func (*SignalUpdate) ClearFingerprint

func (_u *SignalUpdate) ClearFingerprint() *SignalUpdate

ClearFingerprint clears the value of the "fingerprint" field.

func (*SignalUpdate) ClearMetadata

func (_u *SignalUpdate) ClearMetadata() *SignalUpdate

ClearMetadata clears the value of the "metadata" field.

func (*SignalUpdate) ClearSourceExternalID

func (_u *SignalUpdate) ClearSourceExternalID() *SignalUpdate

ClearSourceExternalID clears the value of the "source_external_id" field.

func (*SignalUpdate) ClearSourceURL

func (_u *SignalUpdate) ClearSourceURL() *SignalUpdate

ClearSourceURL clears the value of the "source_url" field.

func (*SignalUpdate) ClearTags

func (_u *SignalUpdate) ClearTags() *SignalUpdate

ClearTags clears the value of the "tags" field.

func (*SignalUpdate) Exec

func (_u *SignalUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SignalUpdate) ExecX

func (_u *SignalUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignalUpdate) Mutation

func (_u *SignalUpdate) Mutation() *SignalMutation

Mutation returns the SignalMutation object of the builder.

func (*SignalUpdate) Save

func (_u *SignalUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SignalUpdate) SaveX

func (_u *SignalUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SignalUpdate) SetDerived

func (_u *SignalUpdate) SetDerived(v *signal.DerivedMetrics) *SignalUpdate

SetDerived sets the "derived" field.

func (*SignalUpdate) SetDescription

func (_u *SignalUpdate) SetDescription(v string) *SignalUpdate

SetDescription sets the "description" field.

func (*SignalUpdate) SetDomainName

func (_u *SignalUpdate) SetDomainName(v string) *SignalUpdate

SetDomainName sets the "domain_name" field.

func (*SignalUpdate) SetDomainSubdomain

func (_u *SignalUpdate) SetDomainSubdomain(v string) *SignalUpdate

SetDomainSubdomain sets the "domain_subdomain" field.

func (*SignalUpdate) SetDomainTeam

func (_u *SignalUpdate) SetDomainTeam(v string) *SignalUpdate

SetDomainTeam sets the "domain_team" field.

func (*SignalUpdate) SetEntities

func (_u *SignalUpdate) SetEntities(v []common.Entity) *SignalUpdate

SetEntities sets the "entities" field.

func (*SignalUpdate) SetFingerprint

func (_u *SignalUpdate) SetFingerprint(v string) *SignalUpdate

SetFingerprint sets the "fingerprint" field.

func (*SignalUpdate) SetMetadata

func (_u *SignalUpdate) SetMetadata(v map[string]interface{}) *SignalUpdate

SetMetadata sets the "metadata" field.

func (*SignalUpdate) SetNillableDescription

func (_u *SignalUpdate) SetNillableDescription(v *string) *SignalUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SignalUpdate) SetNillableDomainName

func (_u *SignalUpdate) SetNillableDomainName(v *string) *SignalUpdate

SetNillableDomainName sets the "domain_name" field if the given value is not nil.

func (*SignalUpdate) SetNillableDomainSubdomain

func (_u *SignalUpdate) SetNillableDomainSubdomain(v *string) *SignalUpdate

SetNillableDomainSubdomain sets the "domain_subdomain" field if the given value is not nil.

func (*SignalUpdate) SetNillableDomainTeam

func (_u *SignalUpdate) SetNillableDomainTeam(v *string) *SignalUpdate

SetNillableDomainTeam sets the "domain_team" field if the given value is not nil.

func (*SignalUpdate) SetNillableFingerprint

func (_u *SignalUpdate) SetNillableFingerprint(v *string) *SignalUpdate

SetNillableFingerprint sets the "fingerprint" field if the given value is not nil.

func (*SignalUpdate) SetNillableObservedAt

func (_u *SignalUpdate) SetNillableObservedAt(v *time.Time) *SignalUpdate

SetNillableObservedAt sets the "observed_at" field if the given value is not nil.

func (*SignalUpdate) SetNillableReceivedAt

func (_u *SignalUpdate) SetNillableReceivedAt(v *time.Time) *SignalUpdate

SetNillableReceivedAt sets the "received_at" field if the given value is not nil.

func (*SignalUpdate) SetNillableSeverity

func (_u *SignalUpdate) SetNillableSeverity(v *string) *SignalUpdate

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*SignalUpdate) SetNillableSourceExternalID

func (_u *SignalUpdate) SetNillableSourceExternalID(v *string) *SignalUpdate

SetNillableSourceExternalID sets the "source_external_id" field if the given value is not nil.

func (*SignalUpdate) SetNillableSourceName

func (_u *SignalUpdate) SetNillableSourceName(v *string) *SignalUpdate

SetNillableSourceName sets the "source_name" field if the given value is not nil.

func (*SignalUpdate) SetNillableSourceType

func (_u *SignalUpdate) SetNillableSourceType(v *string) *SignalUpdate

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*SignalUpdate) SetNillableSourceURL

func (_u *SignalUpdate) SetNillableSourceURL(v *string) *SignalUpdate

SetNillableSourceURL sets the "source_url" field if the given value is not nil.

func (*SignalUpdate) SetNillableStatus

func (_u *SignalUpdate) SetNillableStatus(v *string) *SignalUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SignalUpdate) SetNillableSummary

func (_u *SignalUpdate) SetNillableSummary(v *string) *SignalUpdate

SetNillableSummary sets the "summary" field if the given value is not nil.

func (*SignalUpdate) SetNillableType

func (_u *SignalUpdate) SetNillableType(v *string) *SignalUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*SignalUpdate) SetObservedAt

func (_u *SignalUpdate) SetObservedAt(v time.Time) *SignalUpdate

SetObservedAt sets the "observed_at" field.

func (*SignalUpdate) SetReceivedAt

func (_u *SignalUpdate) SetReceivedAt(v time.Time) *SignalUpdate

SetReceivedAt sets the "received_at" field.

func (*SignalUpdate) SetSeverity

func (_u *SignalUpdate) SetSeverity(v string) *SignalUpdate

SetSeverity sets the "severity" field.

func (*SignalUpdate) SetSourceExternalID

func (_u *SignalUpdate) SetSourceExternalID(v string) *SignalUpdate

SetSourceExternalID sets the "source_external_id" field.

func (*SignalUpdate) SetSourceName

func (_u *SignalUpdate) SetSourceName(v string) *SignalUpdate

SetSourceName sets the "source_name" field.

func (*SignalUpdate) SetSourceType

func (_u *SignalUpdate) SetSourceType(v string) *SignalUpdate

SetSourceType sets the "source_type" field.

func (*SignalUpdate) SetSourceURL

func (_u *SignalUpdate) SetSourceURL(v string) *SignalUpdate

SetSourceURL sets the "source_url" field.

func (*SignalUpdate) SetStatus

func (_u *SignalUpdate) SetStatus(v string) *SignalUpdate

SetStatus sets the "status" field.

func (*SignalUpdate) SetSummary

func (_u *SignalUpdate) SetSummary(v string) *SignalUpdate

SetSummary sets the "summary" field.

func (*SignalUpdate) SetTags

func (_u *SignalUpdate) SetTags(v []common.Tag) *SignalUpdate

SetTags sets the "tags" field.

func (*SignalUpdate) SetType

func (_u *SignalUpdate) SetType(v string) *SignalUpdate

SetType sets the "type" field.

func (*SignalUpdate) Where

func (_u *SignalUpdate) Where(ps ...predicate.Signal) *SignalUpdate

Where appends a list predicates to the SignalUpdate builder.

type SignalUpdateOne

type SignalUpdateOne struct {
	// contains filtered or unexported fields
}

SignalUpdateOne is the builder for updating a single Signal entity.

func (*SignalUpdateOne) AppendEntities

func (_u *SignalUpdateOne) AppendEntities(v []common.Entity) *SignalUpdateOne

AppendEntities appends value to the "entities" field.

func (*SignalUpdateOne) AppendTags

func (_u *SignalUpdateOne) AppendTags(v []common.Tag) *SignalUpdateOne

AppendTags appends value to the "tags" field.

func (*SignalUpdateOne) ClearDerived

func (_u *SignalUpdateOne) ClearDerived() *SignalUpdateOne

ClearDerived clears the value of the "derived" field.

func (*SignalUpdateOne) ClearDescription

func (_u *SignalUpdateOne) ClearDescription() *SignalUpdateOne

ClearDescription clears the value of the "description" field.

func (*SignalUpdateOne) ClearDomainSubdomain

func (_u *SignalUpdateOne) ClearDomainSubdomain() *SignalUpdateOne

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*SignalUpdateOne) ClearDomainTeam

func (_u *SignalUpdateOne) ClearDomainTeam() *SignalUpdateOne

ClearDomainTeam clears the value of the "domain_team" field.

func (*SignalUpdateOne) ClearEntities

func (_u *SignalUpdateOne) ClearEntities() *SignalUpdateOne

ClearEntities clears the value of the "entities" field.

func (*SignalUpdateOne) ClearFingerprint

func (_u *SignalUpdateOne) ClearFingerprint() *SignalUpdateOne

ClearFingerprint clears the value of the "fingerprint" field.

func (*SignalUpdateOne) ClearMetadata

func (_u *SignalUpdateOne) ClearMetadata() *SignalUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*SignalUpdateOne) ClearSourceExternalID

func (_u *SignalUpdateOne) ClearSourceExternalID() *SignalUpdateOne

ClearSourceExternalID clears the value of the "source_external_id" field.

func (*SignalUpdateOne) ClearSourceURL

func (_u *SignalUpdateOne) ClearSourceURL() *SignalUpdateOne

ClearSourceURL clears the value of the "source_url" field.

func (*SignalUpdateOne) ClearTags

func (_u *SignalUpdateOne) ClearTags() *SignalUpdateOne

ClearTags clears the value of the "tags" field.

func (*SignalUpdateOne) Exec

func (_u *SignalUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SignalUpdateOne) ExecX

func (_u *SignalUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignalUpdateOne) Mutation

func (_u *SignalUpdateOne) Mutation() *SignalMutation

Mutation returns the SignalMutation object of the builder.

func (*SignalUpdateOne) Save

func (_u *SignalUpdateOne) Save(ctx context.Context) (*Signal, error)

Save executes the query and returns the updated Signal entity.

func (*SignalUpdateOne) SaveX

func (_u *SignalUpdateOne) SaveX(ctx context.Context) *Signal

SaveX is like Save, but panics if an error occurs.

func (*SignalUpdateOne) Select

func (_u *SignalUpdateOne) Select(field string, fields ...string) *SignalUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SignalUpdateOne) SetDerived

SetDerived sets the "derived" field.

func (*SignalUpdateOne) SetDescription

func (_u *SignalUpdateOne) SetDescription(v string) *SignalUpdateOne

SetDescription sets the "description" field.

func (*SignalUpdateOne) SetDomainName

func (_u *SignalUpdateOne) SetDomainName(v string) *SignalUpdateOne

SetDomainName sets the "domain_name" field.

func (*SignalUpdateOne) SetDomainSubdomain

func (_u *SignalUpdateOne) SetDomainSubdomain(v string) *SignalUpdateOne

SetDomainSubdomain sets the "domain_subdomain" field.

func (*SignalUpdateOne) SetDomainTeam

func (_u *SignalUpdateOne) SetDomainTeam(v string) *SignalUpdateOne

SetDomainTeam sets the "domain_team" field.

func (*SignalUpdateOne) SetEntities

func (_u *SignalUpdateOne) SetEntities(v []common.Entity) *SignalUpdateOne

SetEntities sets the "entities" field.

func (*SignalUpdateOne) SetFingerprint

func (_u *SignalUpdateOne) SetFingerprint(v string) *SignalUpdateOne

SetFingerprint sets the "fingerprint" field.

func (*SignalUpdateOne) SetMetadata

func (_u *SignalUpdateOne) SetMetadata(v map[string]interface{}) *SignalUpdateOne

SetMetadata sets the "metadata" field.

func (*SignalUpdateOne) SetNillableDescription

func (_u *SignalUpdateOne) SetNillableDescription(v *string) *SignalUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableDomainName

func (_u *SignalUpdateOne) SetNillableDomainName(v *string) *SignalUpdateOne

SetNillableDomainName sets the "domain_name" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableDomainSubdomain

func (_u *SignalUpdateOne) SetNillableDomainSubdomain(v *string) *SignalUpdateOne

SetNillableDomainSubdomain sets the "domain_subdomain" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableDomainTeam

func (_u *SignalUpdateOne) SetNillableDomainTeam(v *string) *SignalUpdateOne

SetNillableDomainTeam sets the "domain_team" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableFingerprint

func (_u *SignalUpdateOne) SetNillableFingerprint(v *string) *SignalUpdateOne

SetNillableFingerprint sets the "fingerprint" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableObservedAt

func (_u *SignalUpdateOne) SetNillableObservedAt(v *time.Time) *SignalUpdateOne

SetNillableObservedAt sets the "observed_at" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableReceivedAt

func (_u *SignalUpdateOne) SetNillableReceivedAt(v *time.Time) *SignalUpdateOne

SetNillableReceivedAt sets the "received_at" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableSeverity

func (_u *SignalUpdateOne) SetNillableSeverity(v *string) *SignalUpdateOne

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableSourceExternalID

func (_u *SignalUpdateOne) SetNillableSourceExternalID(v *string) *SignalUpdateOne

SetNillableSourceExternalID sets the "source_external_id" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableSourceName

func (_u *SignalUpdateOne) SetNillableSourceName(v *string) *SignalUpdateOne

SetNillableSourceName sets the "source_name" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableSourceType

func (_u *SignalUpdateOne) SetNillableSourceType(v *string) *SignalUpdateOne

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableSourceURL

func (_u *SignalUpdateOne) SetNillableSourceURL(v *string) *SignalUpdateOne

SetNillableSourceURL sets the "source_url" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableStatus

func (_u *SignalUpdateOne) SetNillableStatus(v *string) *SignalUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableSummary

func (_u *SignalUpdateOne) SetNillableSummary(v *string) *SignalUpdateOne

SetNillableSummary sets the "summary" field if the given value is not nil.

func (*SignalUpdateOne) SetNillableType

func (_u *SignalUpdateOne) SetNillableType(v *string) *SignalUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*SignalUpdateOne) SetObservedAt

func (_u *SignalUpdateOne) SetObservedAt(v time.Time) *SignalUpdateOne

SetObservedAt sets the "observed_at" field.

func (*SignalUpdateOne) SetReceivedAt

func (_u *SignalUpdateOne) SetReceivedAt(v time.Time) *SignalUpdateOne

SetReceivedAt sets the "received_at" field.

func (*SignalUpdateOne) SetSeverity

func (_u *SignalUpdateOne) SetSeverity(v string) *SignalUpdateOne

SetSeverity sets the "severity" field.

func (*SignalUpdateOne) SetSourceExternalID

func (_u *SignalUpdateOne) SetSourceExternalID(v string) *SignalUpdateOne

SetSourceExternalID sets the "source_external_id" field.

func (*SignalUpdateOne) SetSourceName

func (_u *SignalUpdateOne) SetSourceName(v string) *SignalUpdateOne

SetSourceName sets the "source_name" field.

func (*SignalUpdateOne) SetSourceType

func (_u *SignalUpdateOne) SetSourceType(v string) *SignalUpdateOne

SetSourceType sets the "source_type" field.

func (*SignalUpdateOne) SetSourceURL

func (_u *SignalUpdateOne) SetSourceURL(v string) *SignalUpdateOne

SetSourceURL sets the "source_url" field.

func (*SignalUpdateOne) SetStatus

func (_u *SignalUpdateOne) SetStatus(v string) *SignalUpdateOne

SetStatus sets the "status" field.

func (*SignalUpdateOne) SetSummary

func (_u *SignalUpdateOne) SetSummary(v string) *SignalUpdateOne

SetSummary sets the "summary" field.

func (*SignalUpdateOne) SetTags

func (_u *SignalUpdateOne) SetTags(v []common.Tag) *SignalUpdateOne

SetTags sets the "tags" field.

func (*SignalUpdateOne) SetType

func (_u *SignalUpdateOne) SetType(v string) *SignalUpdateOne

SetType sets the "type" field.

func (*SignalUpdateOne) Where

func (_u *SignalUpdateOne) Where(ps ...predicate.Signal) *SignalUpdateOne

Where appends a list predicates to the SignalUpdate builder.

type SignalUpsert

type SignalUpsert struct {
	*sql.UpdateSet
}

SignalUpsert is the "OnConflict" setter.

func (*SignalUpsert) ClearDerived

func (u *SignalUpsert) ClearDerived() *SignalUpsert

ClearDerived clears the value of the "derived" field.

func (*SignalUpsert) ClearDescription

func (u *SignalUpsert) ClearDescription() *SignalUpsert

ClearDescription clears the value of the "description" field.

func (*SignalUpsert) ClearDomainSubdomain

func (u *SignalUpsert) ClearDomainSubdomain() *SignalUpsert

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*SignalUpsert) ClearDomainTeam

func (u *SignalUpsert) ClearDomainTeam() *SignalUpsert

ClearDomainTeam clears the value of the "domain_team" field.

func (*SignalUpsert) ClearEntities

func (u *SignalUpsert) ClearEntities() *SignalUpsert

ClearEntities clears the value of the "entities" field.

func (*SignalUpsert) ClearFingerprint

func (u *SignalUpsert) ClearFingerprint() *SignalUpsert

ClearFingerprint clears the value of the "fingerprint" field.

func (*SignalUpsert) ClearMetadata

func (u *SignalUpsert) ClearMetadata() *SignalUpsert

ClearMetadata clears the value of the "metadata" field.

func (*SignalUpsert) ClearSourceExternalID

func (u *SignalUpsert) ClearSourceExternalID() *SignalUpsert

ClearSourceExternalID clears the value of the "source_external_id" field.

func (*SignalUpsert) ClearSourceURL

func (u *SignalUpsert) ClearSourceURL() *SignalUpsert

ClearSourceURL clears the value of the "source_url" field.

func (*SignalUpsert) ClearTags

func (u *SignalUpsert) ClearTags() *SignalUpsert

ClearTags clears the value of the "tags" field.

func (*SignalUpsert) SetDerived

func (u *SignalUpsert) SetDerived(v *signal.DerivedMetrics) *SignalUpsert

SetDerived sets the "derived" field.

func (*SignalUpsert) SetDescription

func (u *SignalUpsert) SetDescription(v string) *SignalUpsert

SetDescription sets the "description" field.

func (*SignalUpsert) SetDomainName

func (u *SignalUpsert) SetDomainName(v string) *SignalUpsert

SetDomainName sets the "domain_name" field.

func (*SignalUpsert) SetDomainSubdomain

func (u *SignalUpsert) SetDomainSubdomain(v string) *SignalUpsert

SetDomainSubdomain sets the "domain_subdomain" field.

func (*SignalUpsert) SetDomainTeam

func (u *SignalUpsert) SetDomainTeam(v string) *SignalUpsert

SetDomainTeam sets the "domain_team" field.

func (*SignalUpsert) SetEntities

func (u *SignalUpsert) SetEntities(v []common.Entity) *SignalUpsert

SetEntities sets the "entities" field.

func (*SignalUpsert) SetFingerprint

func (u *SignalUpsert) SetFingerprint(v string) *SignalUpsert

SetFingerprint sets the "fingerprint" field.

func (*SignalUpsert) SetMetadata

func (u *SignalUpsert) SetMetadata(v map[string]interface{}) *SignalUpsert

SetMetadata sets the "metadata" field.

func (*SignalUpsert) SetObservedAt

func (u *SignalUpsert) SetObservedAt(v time.Time) *SignalUpsert

SetObservedAt sets the "observed_at" field.

func (*SignalUpsert) SetReceivedAt

func (u *SignalUpsert) SetReceivedAt(v time.Time) *SignalUpsert

SetReceivedAt sets the "received_at" field.

func (*SignalUpsert) SetSeverity

func (u *SignalUpsert) SetSeverity(v string) *SignalUpsert

SetSeverity sets the "severity" field.

func (*SignalUpsert) SetSourceExternalID

func (u *SignalUpsert) SetSourceExternalID(v string) *SignalUpsert

SetSourceExternalID sets the "source_external_id" field.

func (*SignalUpsert) SetSourceName

func (u *SignalUpsert) SetSourceName(v string) *SignalUpsert

SetSourceName sets the "source_name" field.

func (*SignalUpsert) SetSourceType

func (u *SignalUpsert) SetSourceType(v string) *SignalUpsert

SetSourceType sets the "source_type" field.

func (*SignalUpsert) SetSourceURL

func (u *SignalUpsert) SetSourceURL(v string) *SignalUpsert

SetSourceURL sets the "source_url" field.

func (*SignalUpsert) SetStatus

func (u *SignalUpsert) SetStatus(v string) *SignalUpsert

SetStatus sets the "status" field.

func (*SignalUpsert) SetSummary

func (u *SignalUpsert) SetSummary(v string) *SignalUpsert

SetSummary sets the "summary" field.

func (*SignalUpsert) SetTags

func (u *SignalUpsert) SetTags(v []common.Tag) *SignalUpsert

SetTags sets the "tags" field.

func (*SignalUpsert) SetType

func (u *SignalUpsert) SetType(v string) *SignalUpsert

SetType sets the "type" field.

func (*SignalUpsert) UpdateDerived

func (u *SignalUpsert) UpdateDerived() *SignalUpsert

UpdateDerived sets the "derived" field to the value that was provided on create.

func (*SignalUpsert) UpdateDescription

func (u *SignalUpsert) UpdateDescription() *SignalUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*SignalUpsert) UpdateDomainName

func (u *SignalUpsert) UpdateDomainName() *SignalUpsert

UpdateDomainName sets the "domain_name" field to the value that was provided on create.

func (*SignalUpsert) UpdateDomainSubdomain

func (u *SignalUpsert) UpdateDomainSubdomain() *SignalUpsert

UpdateDomainSubdomain sets the "domain_subdomain" field to the value that was provided on create.

func (*SignalUpsert) UpdateDomainTeam

func (u *SignalUpsert) UpdateDomainTeam() *SignalUpsert

UpdateDomainTeam sets the "domain_team" field to the value that was provided on create.

func (*SignalUpsert) UpdateEntities

func (u *SignalUpsert) UpdateEntities() *SignalUpsert

UpdateEntities sets the "entities" field to the value that was provided on create.

func (*SignalUpsert) UpdateFingerprint

func (u *SignalUpsert) UpdateFingerprint() *SignalUpsert

UpdateFingerprint sets the "fingerprint" field to the value that was provided on create.

func (*SignalUpsert) UpdateMetadata

func (u *SignalUpsert) UpdateMetadata() *SignalUpsert

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*SignalUpsert) UpdateObservedAt

func (u *SignalUpsert) UpdateObservedAt() *SignalUpsert

UpdateObservedAt sets the "observed_at" field to the value that was provided on create.

func (*SignalUpsert) UpdateReceivedAt

func (u *SignalUpsert) UpdateReceivedAt() *SignalUpsert

UpdateReceivedAt sets the "received_at" field to the value that was provided on create.

func (*SignalUpsert) UpdateSeverity

func (u *SignalUpsert) UpdateSeverity() *SignalUpsert

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*SignalUpsert) UpdateSourceExternalID

func (u *SignalUpsert) UpdateSourceExternalID() *SignalUpsert

UpdateSourceExternalID sets the "source_external_id" field to the value that was provided on create.

func (*SignalUpsert) UpdateSourceName

func (u *SignalUpsert) UpdateSourceName() *SignalUpsert

UpdateSourceName sets the "source_name" field to the value that was provided on create.

func (*SignalUpsert) UpdateSourceType

func (u *SignalUpsert) UpdateSourceType() *SignalUpsert

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*SignalUpsert) UpdateSourceURL

func (u *SignalUpsert) UpdateSourceURL() *SignalUpsert

UpdateSourceURL sets the "source_url" field to the value that was provided on create.

func (*SignalUpsert) UpdateStatus

func (u *SignalUpsert) UpdateStatus() *SignalUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*SignalUpsert) UpdateSummary

func (u *SignalUpsert) UpdateSummary() *SignalUpsert

UpdateSummary sets the "summary" field to the value that was provided on create.

func (*SignalUpsert) UpdateTags

func (u *SignalUpsert) UpdateTags() *SignalUpsert

UpdateTags sets the "tags" field to the value that was provided on create.

func (*SignalUpsert) UpdateType

func (u *SignalUpsert) UpdateType() *SignalUpsert

UpdateType sets the "type" field to the value that was provided on create.

type SignalUpsertBulk

type SignalUpsertBulk struct {
	// contains filtered or unexported fields
}

SignalUpsertBulk is the builder for "upsert"-ing a bulk of Signal nodes.

func (*SignalUpsertBulk) ClearDerived

func (u *SignalUpsertBulk) ClearDerived() *SignalUpsertBulk

ClearDerived clears the value of the "derived" field.

func (*SignalUpsertBulk) ClearDescription

func (u *SignalUpsertBulk) ClearDescription() *SignalUpsertBulk

ClearDescription clears the value of the "description" field.

func (*SignalUpsertBulk) ClearDomainSubdomain

func (u *SignalUpsertBulk) ClearDomainSubdomain() *SignalUpsertBulk

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*SignalUpsertBulk) ClearDomainTeam

func (u *SignalUpsertBulk) ClearDomainTeam() *SignalUpsertBulk

ClearDomainTeam clears the value of the "domain_team" field.

func (*SignalUpsertBulk) ClearEntities

func (u *SignalUpsertBulk) ClearEntities() *SignalUpsertBulk

ClearEntities clears the value of the "entities" field.

func (*SignalUpsertBulk) ClearFingerprint

func (u *SignalUpsertBulk) ClearFingerprint() *SignalUpsertBulk

ClearFingerprint clears the value of the "fingerprint" field.

func (*SignalUpsertBulk) ClearMetadata

func (u *SignalUpsertBulk) ClearMetadata() *SignalUpsertBulk

ClearMetadata clears the value of the "metadata" field.

func (*SignalUpsertBulk) ClearSourceExternalID

func (u *SignalUpsertBulk) ClearSourceExternalID() *SignalUpsertBulk

ClearSourceExternalID clears the value of the "source_external_id" field.

func (*SignalUpsertBulk) ClearSourceURL

func (u *SignalUpsertBulk) ClearSourceURL() *SignalUpsertBulk

ClearSourceURL clears the value of the "source_url" field.

func (*SignalUpsertBulk) ClearTags

func (u *SignalUpsertBulk) ClearTags() *SignalUpsertBulk

ClearTags clears the value of the "tags" field.

func (*SignalUpsertBulk) DoNothing

func (u *SignalUpsertBulk) DoNothing() *SignalUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SignalUpsertBulk) Exec

func (u *SignalUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SignalUpsertBulk) ExecX

func (u *SignalUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignalUpsertBulk) Ignore

func (u *SignalUpsertBulk) Ignore() *SignalUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Signal.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SignalUpsertBulk) SetDerived

SetDerived sets the "derived" field.

func (*SignalUpsertBulk) SetDescription

func (u *SignalUpsertBulk) SetDescription(v string) *SignalUpsertBulk

SetDescription sets the "description" field.

func (*SignalUpsertBulk) SetDomainName

func (u *SignalUpsertBulk) SetDomainName(v string) *SignalUpsertBulk

SetDomainName sets the "domain_name" field.

func (*SignalUpsertBulk) SetDomainSubdomain

func (u *SignalUpsertBulk) SetDomainSubdomain(v string) *SignalUpsertBulk

SetDomainSubdomain sets the "domain_subdomain" field.

func (*SignalUpsertBulk) SetDomainTeam

func (u *SignalUpsertBulk) SetDomainTeam(v string) *SignalUpsertBulk

SetDomainTeam sets the "domain_team" field.

func (*SignalUpsertBulk) SetEntities

func (u *SignalUpsertBulk) SetEntities(v []common.Entity) *SignalUpsertBulk

SetEntities sets the "entities" field.

func (*SignalUpsertBulk) SetFingerprint

func (u *SignalUpsertBulk) SetFingerprint(v string) *SignalUpsertBulk

SetFingerprint sets the "fingerprint" field.

func (*SignalUpsertBulk) SetMetadata

func (u *SignalUpsertBulk) SetMetadata(v map[string]interface{}) *SignalUpsertBulk

SetMetadata sets the "metadata" field.

func (*SignalUpsertBulk) SetObservedAt

func (u *SignalUpsertBulk) SetObservedAt(v time.Time) *SignalUpsertBulk

SetObservedAt sets the "observed_at" field.

func (*SignalUpsertBulk) SetReceivedAt

func (u *SignalUpsertBulk) SetReceivedAt(v time.Time) *SignalUpsertBulk

SetReceivedAt sets the "received_at" field.

func (*SignalUpsertBulk) SetSeverity

func (u *SignalUpsertBulk) SetSeverity(v string) *SignalUpsertBulk

SetSeverity sets the "severity" field.

func (*SignalUpsertBulk) SetSourceExternalID

func (u *SignalUpsertBulk) SetSourceExternalID(v string) *SignalUpsertBulk

SetSourceExternalID sets the "source_external_id" field.

func (*SignalUpsertBulk) SetSourceName

func (u *SignalUpsertBulk) SetSourceName(v string) *SignalUpsertBulk

SetSourceName sets the "source_name" field.

func (*SignalUpsertBulk) SetSourceType

func (u *SignalUpsertBulk) SetSourceType(v string) *SignalUpsertBulk

SetSourceType sets the "source_type" field.

func (*SignalUpsertBulk) SetSourceURL

func (u *SignalUpsertBulk) SetSourceURL(v string) *SignalUpsertBulk

SetSourceURL sets the "source_url" field.

func (*SignalUpsertBulk) SetStatus

func (u *SignalUpsertBulk) SetStatus(v string) *SignalUpsertBulk

SetStatus sets the "status" field.

func (*SignalUpsertBulk) SetSummary

func (u *SignalUpsertBulk) SetSummary(v string) *SignalUpsertBulk

SetSummary sets the "summary" field.

func (*SignalUpsertBulk) SetTags

func (u *SignalUpsertBulk) SetTags(v []common.Tag) *SignalUpsertBulk

SetTags sets the "tags" field.

func (*SignalUpsertBulk) SetType

func (u *SignalUpsertBulk) SetType(v string) *SignalUpsertBulk

SetType sets the "type" field.

func (*SignalUpsertBulk) Update

func (u *SignalUpsertBulk) Update(set func(*SignalUpsert)) *SignalUpsertBulk

Update allows overriding fields `UPDATE` values. See the SignalCreateBulk.OnConflict documentation for more info.

func (*SignalUpsertBulk) UpdateDerived

func (u *SignalUpsertBulk) UpdateDerived() *SignalUpsertBulk

UpdateDerived sets the "derived" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateDescription

func (u *SignalUpsertBulk) UpdateDescription() *SignalUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateDomainName

func (u *SignalUpsertBulk) UpdateDomainName() *SignalUpsertBulk

UpdateDomainName sets the "domain_name" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateDomainSubdomain

func (u *SignalUpsertBulk) UpdateDomainSubdomain() *SignalUpsertBulk

UpdateDomainSubdomain sets the "domain_subdomain" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateDomainTeam

func (u *SignalUpsertBulk) UpdateDomainTeam() *SignalUpsertBulk

UpdateDomainTeam sets the "domain_team" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateEntities

func (u *SignalUpsertBulk) UpdateEntities() *SignalUpsertBulk

UpdateEntities sets the "entities" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateFingerprint

func (u *SignalUpsertBulk) UpdateFingerprint() *SignalUpsertBulk

UpdateFingerprint sets the "fingerprint" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateMetadata

func (u *SignalUpsertBulk) UpdateMetadata() *SignalUpsertBulk

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateNewValues

func (u *SignalUpsertBulk) UpdateNewValues() *SignalUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Signal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(entsignal.FieldID)
		}),
	).
	Exec(ctx)

func (*SignalUpsertBulk) UpdateObservedAt

func (u *SignalUpsertBulk) UpdateObservedAt() *SignalUpsertBulk

UpdateObservedAt sets the "observed_at" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateReceivedAt

func (u *SignalUpsertBulk) UpdateReceivedAt() *SignalUpsertBulk

UpdateReceivedAt sets the "received_at" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateSeverity

func (u *SignalUpsertBulk) UpdateSeverity() *SignalUpsertBulk

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateSourceExternalID

func (u *SignalUpsertBulk) UpdateSourceExternalID() *SignalUpsertBulk

UpdateSourceExternalID sets the "source_external_id" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateSourceName

func (u *SignalUpsertBulk) UpdateSourceName() *SignalUpsertBulk

UpdateSourceName sets the "source_name" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateSourceType

func (u *SignalUpsertBulk) UpdateSourceType() *SignalUpsertBulk

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateSourceURL

func (u *SignalUpsertBulk) UpdateSourceURL() *SignalUpsertBulk

UpdateSourceURL sets the "source_url" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateStatus

func (u *SignalUpsertBulk) UpdateStatus() *SignalUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateSummary

func (u *SignalUpsertBulk) UpdateSummary() *SignalUpsertBulk

UpdateSummary sets the "summary" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateTags

func (u *SignalUpsertBulk) UpdateTags() *SignalUpsertBulk

UpdateTags sets the "tags" field to the value that was provided on create.

func (*SignalUpsertBulk) UpdateType

func (u *SignalUpsertBulk) UpdateType() *SignalUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

type SignalUpsertOne

type SignalUpsertOne struct {
	// contains filtered or unexported fields
}

SignalUpsertOne is the builder for "upsert"-ing

one Signal node.

func (*SignalUpsertOne) ClearDerived

func (u *SignalUpsertOne) ClearDerived() *SignalUpsertOne

ClearDerived clears the value of the "derived" field.

func (*SignalUpsertOne) ClearDescription

func (u *SignalUpsertOne) ClearDescription() *SignalUpsertOne

ClearDescription clears the value of the "description" field.

func (*SignalUpsertOne) ClearDomainSubdomain

func (u *SignalUpsertOne) ClearDomainSubdomain() *SignalUpsertOne

ClearDomainSubdomain clears the value of the "domain_subdomain" field.

func (*SignalUpsertOne) ClearDomainTeam

func (u *SignalUpsertOne) ClearDomainTeam() *SignalUpsertOne

ClearDomainTeam clears the value of the "domain_team" field.

func (*SignalUpsertOne) ClearEntities

func (u *SignalUpsertOne) ClearEntities() *SignalUpsertOne

ClearEntities clears the value of the "entities" field.

func (*SignalUpsertOne) ClearFingerprint

func (u *SignalUpsertOne) ClearFingerprint() *SignalUpsertOne

ClearFingerprint clears the value of the "fingerprint" field.

func (*SignalUpsertOne) ClearMetadata

func (u *SignalUpsertOne) ClearMetadata() *SignalUpsertOne

ClearMetadata clears the value of the "metadata" field.

func (*SignalUpsertOne) ClearSourceExternalID

func (u *SignalUpsertOne) ClearSourceExternalID() *SignalUpsertOne

ClearSourceExternalID clears the value of the "source_external_id" field.

func (*SignalUpsertOne) ClearSourceURL

func (u *SignalUpsertOne) ClearSourceURL() *SignalUpsertOne

ClearSourceURL clears the value of the "source_url" field.

func (*SignalUpsertOne) ClearTags

func (u *SignalUpsertOne) ClearTags() *SignalUpsertOne

ClearTags clears the value of the "tags" field.

func (*SignalUpsertOne) DoNothing

func (u *SignalUpsertOne) DoNothing() *SignalUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SignalUpsertOne) Exec

func (u *SignalUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SignalUpsertOne) ExecX

func (u *SignalUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignalUpsertOne) ID

func (u *SignalUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SignalUpsertOne) IDX

func (u *SignalUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*SignalUpsertOne) Ignore

func (u *SignalUpsertOne) Ignore() *SignalUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Signal.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SignalUpsertOne) SetDerived

SetDerived sets the "derived" field.

func (*SignalUpsertOne) SetDescription

func (u *SignalUpsertOne) SetDescription(v string) *SignalUpsertOne

SetDescription sets the "description" field.

func (*SignalUpsertOne) SetDomainName

func (u *SignalUpsertOne) SetDomainName(v string) *SignalUpsertOne

SetDomainName sets the "domain_name" field.

func (*SignalUpsertOne) SetDomainSubdomain

func (u *SignalUpsertOne) SetDomainSubdomain(v string) *SignalUpsertOne

SetDomainSubdomain sets the "domain_subdomain" field.

func (*SignalUpsertOne) SetDomainTeam

func (u *SignalUpsertOne) SetDomainTeam(v string) *SignalUpsertOne

SetDomainTeam sets the "domain_team" field.

func (*SignalUpsertOne) SetEntities

func (u *SignalUpsertOne) SetEntities(v []common.Entity) *SignalUpsertOne

SetEntities sets the "entities" field.

func (*SignalUpsertOne) SetFingerprint

func (u *SignalUpsertOne) SetFingerprint(v string) *SignalUpsertOne

SetFingerprint sets the "fingerprint" field.

func (*SignalUpsertOne) SetMetadata

func (u *SignalUpsertOne) SetMetadata(v map[string]interface{}) *SignalUpsertOne

SetMetadata sets the "metadata" field.

func (*SignalUpsertOne) SetObservedAt

func (u *SignalUpsertOne) SetObservedAt(v time.Time) *SignalUpsertOne

SetObservedAt sets the "observed_at" field.

func (*SignalUpsertOne) SetReceivedAt

func (u *SignalUpsertOne) SetReceivedAt(v time.Time) *SignalUpsertOne

SetReceivedAt sets the "received_at" field.

func (*SignalUpsertOne) SetSeverity

func (u *SignalUpsertOne) SetSeverity(v string) *SignalUpsertOne

SetSeverity sets the "severity" field.

func (*SignalUpsertOne) SetSourceExternalID

func (u *SignalUpsertOne) SetSourceExternalID(v string) *SignalUpsertOne

SetSourceExternalID sets the "source_external_id" field.

func (*SignalUpsertOne) SetSourceName

func (u *SignalUpsertOne) SetSourceName(v string) *SignalUpsertOne

SetSourceName sets the "source_name" field.

func (*SignalUpsertOne) SetSourceType

func (u *SignalUpsertOne) SetSourceType(v string) *SignalUpsertOne

SetSourceType sets the "source_type" field.

func (*SignalUpsertOne) SetSourceURL

func (u *SignalUpsertOne) SetSourceURL(v string) *SignalUpsertOne

SetSourceURL sets the "source_url" field.

func (*SignalUpsertOne) SetStatus

func (u *SignalUpsertOne) SetStatus(v string) *SignalUpsertOne

SetStatus sets the "status" field.

func (*SignalUpsertOne) SetSummary

func (u *SignalUpsertOne) SetSummary(v string) *SignalUpsertOne

SetSummary sets the "summary" field.

func (*SignalUpsertOne) SetTags

func (u *SignalUpsertOne) SetTags(v []common.Tag) *SignalUpsertOne

SetTags sets the "tags" field.

func (*SignalUpsertOne) SetType

func (u *SignalUpsertOne) SetType(v string) *SignalUpsertOne

SetType sets the "type" field.

func (*SignalUpsertOne) Update

func (u *SignalUpsertOne) Update(set func(*SignalUpsert)) *SignalUpsertOne

Update allows overriding fields `UPDATE` values. See the SignalCreate.OnConflict documentation for more info.

func (*SignalUpsertOne) UpdateDerived

func (u *SignalUpsertOne) UpdateDerived() *SignalUpsertOne

UpdateDerived sets the "derived" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateDescription

func (u *SignalUpsertOne) UpdateDescription() *SignalUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateDomainName

func (u *SignalUpsertOne) UpdateDomainName() *SignalUpsertOne

UpdateDomainName sets the "domain_name" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateDomainSubdomain

func (u *SignalUpsertOne) UpdateDomainSubdomain() *SignalUpsertOne

UpdateDomainSubdomain sets the "domain_subdomain" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateDomainTeam

func (u *SignalUpsertOne) UpdateDomainTeam() *SignalUpsertOne

UpdateDomainTeam sets the "domain_team" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateEntities

func (u *SignalUpsertOne) UpdateEntities() *SignalUpsertOne

UpdateEntities sets the "entities" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateFingerprint

func (u *SignalUpsertOne) UpdateFingerprint() *SignalUpsertOne

UpdateFingerprint sets the "fingerprint" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateMetadata

func (u *SignalUpsertOne) UpdateMetadata() *SignalUpsertOne

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateNewValues

func (u *SignalUpsertOne) UpdateNewValues() *SignalUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Signal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(entsignal.FieldID)
		}),
	).
	Exec(ctx)

func (*SignalUpsertOne) UpdateObservedAt

func (u *SignalUpsertOne) UpdateObservedAt() *SignalUpsertOne

UpdateObservedAt sets the "observed_at" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateReceivedAt

func (u *SignalUpsertOne) UpdateReceivedAt() *SignalUpsertOne

UpdateReceivedAt sets the "received_at" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateSeverity

func (u *SignalUpsertOne) UpdateSeverity() *SignalUpsertOne

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateSourceExternalID

func (u *SignalUpsertOne) UpdateSourceExternalID() *SignalUpsertOne

UpdateSourceExternalID sets the "source_external_id" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateSourceName

func (u *SignalUpsertOne) UpdateSourceName() *SignalUpsertOne

UpdateSourceName sets the "source_name" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateSourceType

func (u *SignalUpsertOne) UpdateSourceType() *SignalUpsertOne

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateSourceURL

func (u *SignalUpsertOne) UpdateSourceURL() *SignalUpsertOne

UpdateSourceURL sets the "source_url" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateStatus

func (u *SignalUpsertOne) UpdateStatus() *SignalUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateSummary

func (u *SignalUpsertOne) UpdateSummary() *SignalUpsertOne

UpdateSummary sets the "summary" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateTags

func (u *SignalUpsertOne) UpdateTags() *SignalUpsertOne

UpdateTags sets the "tags" field to the value that was provided on create.

func (*SignalUpsertOne) UpdateType

func (u *SignalUpsertOne) UpdateType() *SignalUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type Signals

type Signals []*Signal

Signals is a parsable slice of Signal.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// RootCause is the client for interacting with the RootCause builders.
	RootCause *RootCauseClient
	// Signal is the client for interacting with the Signal builders.
	Signal *SignalClient
	// SignalRootCauseLink is the client for interacting with the SignalRootCauseLink builders.
	SignalRootCauseLink *SignalRootCauseLinkClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL