ent

package
v0.95.5 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 41 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.
	TypeAPIToken                = "APIToken"
	TypeCASBackend              = "CASBackend"
	TypeCASMapping              = "CASMapping"
	TypeIntegration             = "Integration"
	TypeIntegrationAttachment   = "IntegrationAttachment"
	TypeMembership              = "Membership"
	TypeOrgInvitation           = "OrgInvitation"
	TypeOrganization            = "Organization"
	TypeReferrer                = "Referrer"
	TypeRobotAccount            = "RobotAccount"
	TypeUser                    = "User"
	TypeWorkflow                = "Workflow"
	TypeWorkflowContract        = "WorkflowContract"
	TypeWorkflowContractVersion = "WorkflowContractVersion"
	TypeWorkflowRun             = "WorkflowRun"
)

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.

func ServeEntviz

func ServeEntviz() http.Handler

Types

type APIToken

type APIToken struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// ExpiresAt holds the value of the "expires_at" field.
	ExpiresAt time.Time `json:"expires_at,omitempty"`
	// RevokedAt holds the value of the "revoked_at" field.
	RevokedAt time.Time `json:"revoked_at,omitempty"`
	// OrganizationID holds the value of the "organization_id" field.
	OrganizationID uuid.UUID `json:"organization_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the APITokenQuery when eager-loading is set.
	Edges APITokenEdges `json:"edges"`
	// contains filtered or unexported fields
}

APIToken is the model entity for the APIToken schema.

func (*APIToken) QueryOrganization

func (at *APIToken) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the APIToken entity.

func (*APIToken) String

func (at *APIToken) String() string

String implements the fmt.Stringer.

func (*APIToken) Unwrap

func (at *APIToken) Unwrap() *APIToken

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

func (at *APIToken) Update() *APITokenUpdateOne

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

func (*APIToken) Value

func (at *APIToken) Value(name string) (ent.Value, error)

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

type APITokenClient

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

APITokenClient is a client for the APIToken schema.

func NewAPITokenClient

func NewAPITokenClient(c config) *APITokenClient

NewAPITokenClient returns a client for the APIToken from the given config.

func (*APITokenClient) Create

func (c *APITokenClient) Create() *APITokenCreate

Create returns a builder for creating a APIToken entity.

func (*APITokenClient) CreateBulk

func (c *APITokenClient) CreateBulk(builders ...*APITokenCreate) *APITokenCreateBulk

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

func (*APITokenClient) Delete

func (c *APITokenClient) Delete() *APITokenDelete

Delete returns a delete builder for APIToken.

func (*APITokenClient) DeleteOne

func (c *APITokenClient) DeleteOne(at *APIToken) *APITokenDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*APITokenClient) DeleteOneID

func (c *APITokenClient) DeleteOneID(id uuid.UUID) *APITokenDeleteOne

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

func (*APITokenClient) Get

func (c *APITokenClient) Get(ctx context.Context, id uuid.UUID) (*APIToken, error)

Get returns a APIToken entity by its id.

func (*APITokenClient) GetX

func (c *APITokenClient) GetX(ctx context.Context, id uuid.UUID) *APIToken

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

func (*APITokenClient) Hooks

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

Hooks returns the client hooks.

func (*APITokenClient) Intercept

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

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

func (*APITokenClient) Interceptors

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

Interceptors returns the client interceptors.

func (*APITokenClient) MapCreateBulk added in v0.91.6

func (c *APITokenClient) MapCreateBulk(slice any, setFunc func(*APITokenCreate, int)) *APITokenCreateBulk

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 (*APITokenClient) Query

func (c *APITokenClient) Query() *APITokenQuery

Query returns a query builder for APIToken.

func (*APITokenClient) QueryOrganization

func (c *APITokenClient) QueryOrganization(at *APIToken) *OrganizationQuery

QueryOrganization queries the organization edge of a APIToken.

func (*APITokenClient) Update

func (c *APITokenClient) Update() *APITokenUpdate

Update returns an update builder for APIToken.

func (*APITokenClient) UpdateOne

func (c *APITokenClient) UpdateOne(at *APIToken) *APITokenUpdateOne

UpdateOne returns an update builder for the given entity.

func (*APITokenClient) UpdateOneID

func (c *APITokenClient) UpdateOneID(id uuid.UUID) *APITokenUpdateOne

UpdateOneID returns an update builder for the given id.

func (*APITokenClient) Use

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

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

type APITokenCreate

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

APITokenCreate is the builder for creating a APIToken entity.

func (*APITokenCreate) Exec

func (atc *APITokenCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*APITokenCreate) ExecX

func (atc *APITokenCreate) ExecX(ctx context.Context)

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

func (*APITokenCreate) Mutation

func (atc *APITokenCreate) Mutation() *APITokenMutation

Mutation returns the APITokenMutation object of the builder.

func (*APITokenCreate) Save

func (atc *APITokenCreate) Save(ctx context.Context) (*APIToken, error)

Save creates the APIToken in the database.

func (*APITokenCreate) SaveX

func (atc *APITokenCreate) SaveX(ctx context.Context) *APIToken

SaveX calls Save and panics if Save returns an error.

func (*APITokenCreate) SetCreatedAt

func (atc *APITokenCreate) SetCreatedAt(t time.Time) *APITokenCreate

SetCreatedAt sets the "created_at" field.

func (*APITokenCreate) SetDescription

func (atc *APITokenCreate) SetDescription(s string) *APITokenCreate

SetDescription sets the "description" field.

func (*APITokenCreate) SetExpiresAt

func (atc *APITokenCreate) SetExpiresAt(t time.Time) *APITokenCreate

SetExpiresAt sets the "expires_at" field.

func (*APITokenCreate) SetID

func (atc *APITokenCreate) SetID(u uuid.UUID) *APITokenCreate

SetID sets the "id" field.

func (*APITokenCreate) SetName

func (atc *APITokenCreate) SetName(s string) *APITokenCreate

SetName sets the "name" field.

func (*APITokenCreate) SetNillableCreatedAt

func (atc *APITokenCreate) SetNillableCreatedAt(t *time.Time) *APITokenCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*APITokenCreate) SetNillableDescription

func (atc *APITokenCreate) SetNillableDescription(s *string) *APITokenCreate

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

func (*APITokenCreate) SetNillableExpiresAt

func (atc *APITokenCreate) SetNillableExpiresAt(t *time.Time) *APITokenCreate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*APITokenCreate) SetNillableID

func (atc *APITokenCreate) SetNillableID(u *uuid.UUID) *APITokenCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*APITokenCreate) SetNillableRevokedAt

func (atc *APITokenCreate) SetNillableRevokedAt(t *time.Time) *APITokenCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*APITokenCreate) SetOrganization

func (atc *APITokenCreate) SetOrganization(o *Organization) *APITokenCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*APITokenCreate) SetOrganizationID

func (atc *APITokenCreate) SetOrganizationID(u uuid.UUID) *APITokenCreate

SetOrganizationID sets the "organization_id" field.

func (*APITokenCreate) SetRevokedAt

func (atc *APITokenCreate) SetRevokedAt(t time.Time) *APITokenCreate

SetRevokedAt sets the "revoked_at" field.

type APITokenCreateBulk

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

APITokenCreateBulk is the builder for creating many APIToken entities in bulk.

func (*APITokenCreateBulk) Exec

func (atcb *APITokenCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*APITokenCreateBulk) ExecX

func (atcb *APITokenCreateBulk) ExecX(ctx context.Context)

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

func (*APITokenCreateBulk) Save

func (atcb *APITokenCreateBulk) Save(ctx context.Context) ([]*APIToken, error)

Save creates the APIToken entities in the database.

func (*APITokenCreateBulk) SaveX

func (atcb *APITokenCreateBulk) SaveX(ctx context.Context) []*APIToken

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

type APITokenDelete

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

APITokenDelete is the builder for deleting a APIToken entity.

func (*APITokenDelete) Exec

func (atd *APITokenDelete) Exec(ctx context.Context) (int, error)

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

func (*APITokenDelete) ExecX

func (atd *APITokenDelete) ExecX(ctx context.Context) int

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

func (*APITokenDelete) Where

func (atd *APITokenDelete) Where(ps ...predicate.APIToken) *APITokenDelete

Where appends a list predicates to the APITokenDelete builder.

type APITokenDeleteOne

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

APITokenDeleteOne is the builder for deleting a single APIToken entity.

func (*APITokenDeleteOne) Exec

func (atdo *APITokenDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*APITokenDeleteOne) ExecX

func (atdo *APITokenDeleteOne) ExecX(ctx context.Context)

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

func (*APITokenDeleteOne) Where

Where appends a list predicates to the APITokenDelete builder.

type APITokenEdges

type APITokenEdges struct {
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// contains filtered or unexported fields
}

APITokenEdges holds the relations/edges for other nodes in the graph.

func (APITokenEdges) OrganizationOrErr

func (e APITokenEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type APITokenGroupBy

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

APITokenGroupBy is the group-by builder for APIToken entities.

func (*APITokenGroupBy) Aggregate

func (atgb *APITokenGroupBy) Aggregate(fns ...AggregateFunc) *APITokenGroupBy

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

func (*APITokenGroupBy) Bool

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

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

func (*APITokenGroupBy) BoolX

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

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

func (*APITokenGroupBy) Bools

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

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

func (*APITokenGroupBy) BoolsX

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

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

func (*APITokenGroupBy) Float64

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

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

func (*APITokenGroupBy) Float64X

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

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

func (*APITokenGroupBy) Float64s

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

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

func (*APITokenGroupBy) Float64sX

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

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

func (*APITokenGroupBy) Int

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

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

func (*APITokenGroupBy) IntX

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

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

func (*APITokenGroupBy) Ints

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

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

func (*APITokenGroupBy) IntsX

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

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

func (*APITokenGroupBy) Scan

func (atgb *APITokenGroupBy) Scan(ctx context.Context, v any) error

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

func (*APITokenGroupBy) ScanX

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

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

func (*APITokenGroupBy) String

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

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

func (*APITokenGroupBy) StringX

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

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

func (*APITokenGroupBy) Strings

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

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

func (*APITokenGroupBy) StringsX

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

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

type APITokenMutation

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

APITokenMutation represents an operation that mutates the APIToken nodes in the graph.

func (*APITokenMutation) AddField

func (m *APITokenMutation) 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 (*APITokenMutation) AddedEdges

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

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

func (*APITokenMutation) AddedField

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

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

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

func (*APITokenMutation) AddedIDs

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

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

func (*APITokenMutation) ClearDescription

func (m *APITokenMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*APITokenMutation) ClearEdge

func (m *APITokenMutation) 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 (*APITokenMutation) ClearExpiresAt

func (m *APITokenMutation) ClearExpiresAt()

ClearExpiresAt clears the value of the "expires_at" field.

func (*APITokenMutation) ClearField

func (m *APITokenMutation) 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 (*APITokenMutation) ClearOrganization

func (m *APITokenMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*APITokenMutation) ClearRevokedAt

func (m *APITokenMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*APITokenMutation) ClearedEdges

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

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

func (*APITokenMutation) ClearedFields

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

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

func (APITokenMutation) Client

func (m APITokenMutation) 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 (*APITokenMutation) CreatedAt

func (m *APITokenMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*APITokenMutation) Description

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

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

func (*APITokenMutation) DescriptionCleared

func (m *APITokenMutation) DescriptionCleared() bool

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

func (*APITokenMutation) EdgeCleared

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

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

func (*APITokenMutation) ExpiresAt

func (m *APITokenMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*APITokenMutation) ExpiresAtCleared

func (m *APITokenMutation) ExpiresAtCleared() bool

ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.

func (*APITokenMutation) Field

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

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

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

func (*APITokenMutation) Fields

func (m *APITokenMutation) 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 (*APITokenMutation) ID

func (m *APITokenMutation) ID() (id uuid.UUID, exists bool)

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

func (*APITokenMutation) IDs

func (m *APITokenMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*APITokenMutation) Name

func (m *APITokenMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*APITokenMutation) OldCreatedAt

func (m *APITokenMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the APIToken entity. If the APIToken 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 (*APITokenMutation) OldDescription

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

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

func (m *APITokenMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the APIToken entity. If the APIToken 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 (*APITokenMutation) OldField

func (m *APITokenMutation) 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 (*APITokenMutation) OldName

func (m *APITokenMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the APIToken entity. If the APIToken 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 (*APITokenMutation) OldOrganizationID

func (m *APITokenMutation) OldOrganizationID(ctx context.Context) (v uuid.UUID, err error)

OldOrganizationID returns the old "organization_id" field's value of the APIToken entity. If the APIToken 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 (*APITokenMutation) OldRevokedAt

func (m *APITokenMutation) OldRevokedAt(ctx context.Context) (v time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the APIToken entity. If the APIToken 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 (*APITokenMutation) Op

func (m *APITokenMutation) Op() Op

Op returns the operation name.

func (*APITokenMutation) OrganizationCleared

func (m *APITokenMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*APITokenMutation) OrganizationID

func (m *APITokenMutation) OrganizationID() (r uuid.UUID, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*APITokenMutation) OrganizationIDs

func (m *APITokenMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*APITokenMutation) RemovedEdges

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

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

func (*APITokenMutation) RemovedIDs

func (m *APITokenMutation) 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 (*APITokenMutation) ResetCreatedAt

func (m *APITokenMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*APITokenMutation) ResetDescription

func (m *APITokenMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*APITokenMutation) ResetEdge

func (m *APITokenMutation) 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 (*APITokenMutation) ResetExpiresAt

func (m *APITokenMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*APITokenMutation) ResetField

func (m *APITokenMutation) 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 (*APITokenMutation) ResetName

func (m *APITokenMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*APITokenMutation) ResetOrganization

func (m *APITokenMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*APITokenMutation) ResetOrganizationID

func (m *APITokenMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*APITokenMutation) ResetRevokedAt

func (m *APITokenMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*APITokenMutation) RevokedAt

func (m *APITokenMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*APITokenMutation) RevokedAtCleared

func (m *APITokenMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*APITokenMutation) SetCreatedAt

func (m *APITokenMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*APITokenMutation) SetDescription

func (m *APITokenMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*APITokenMutation) SetExpiresAt

func (m *APITokenMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*APITokenMutation) SetField

func (m *APITokenMutation) 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 (*APITokenMutation) SetID

func (m *APITokenMutation) SetID(id uuid.UUID)

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

func (*APITokenMutation) SetName

func (m *APITokenMutation) SetName(s string)

SetName sets the "name" field.

func (*APITokenMutation) SetOp

func (m *APITokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*APITokenMutation) SetOrganizationID

func (m *APITokenMutation) SetOrganizationID(u uuid.UUID)

SetOrganizationID sets the "organization_id" field.

func (*APITokenMutation) SetRevokedAt

func (m *APITokenMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (APITokenMutation) Tx

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

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

func (*APITokenMutation) Type

func (m *APITokenMutation) Type() string

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

func (*APITokenMutation) Where

func (m *APITokenMutation) Where(ps ...predicate.APIToken)

Where appends a list predicates to the APITokenMutation builder.

func (*APITokenMutation) WhereP

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

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

type APITokenQuery

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

APITokenQuery is the builder for querying APIToken entities.

func (*APITokenQuery) Aggregate

func (atq *APITokenQuery) Aggregate(fns ...AggregateFunc) *APITokenSelect

Aggregate returns a APITokenSelect configured with the given aggregations.

func (*APITokenQuery) All

func (atq *APITokenQuery) All(ctx context.Context) ([]*APIToken, error)

All executes the query and returns a list of APITokens.

func (*APITokenQuery) AllX

func (atq *APITokenQuery) AllX(ctx context.Context) []*APIToken

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

func (*APITokenQuery) Clone

func (atq *APITokenQuery) Clone() *APITokenQuery

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

func (*APITokenQuery) Count

func (atq *APITokenQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*APITokenQuery) CountX

func (atq *APITokenQuery) CountX(ctx context.Context) int

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

func (*APITokenQuery) Exist

func (atq *APITokenQuery) Exist(ctx context.Context) (bool, error)

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

func (*APITokenQuery) ExistX

func (atq *APITokenQuery) ExistX(ctx context.Context) bool

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

func (*APITokenQuery) First

func (atq *APITokenQuery) First(ctx context.Context) (*APIToken, error)

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

func (*APITokenQuery) FirstID

func (atq *APITokenQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*APITokenQuery) FirstIDX

func (atq *APITokenQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*APITokenQuery) FirstX

func (atq *APITokenQuery) FirstX(ctx context.Context) *APIToken

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

func (*APITokenQuery) ForShare added in v0.94.3

func (atq *APITokenQuery) ForShare(opts ...sql.LockOption) *APITokenQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*APITokenQuery) ForUpdate added in v0.94.3

func (atq *APITokenQuery) ForUpdate(opts ...sql.LockOption) *APITokenQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*APITokenQuery) GroupBy

func (atq *APITokenQuery) GroupBy(field string, fields ...string) *APITokenGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.APIToken.Query().
	GroupBy(apitoken.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*APITokenQuery) IDs

func (atq *APITokenQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*APITokenQuery) IDsX

func (atq *APITokenQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*APITokenQuery) Limit

func (atq *APITokenQuery) Limit(limit int) *APITokenQuery

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

func (*APITokenQuery) Modify

func (atq *APITokenQuery) Modify(modifiers ...func(s *sql.Selector)) *APITokenSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*APITokenQuery) Offset

func (atq *APITokenQuery) Offset(offset int) *APITokenQuery

Offset to start from.

func (*APITokenQuery) Only

func (atq *APITokenQuery) Only(ctx context.Context) (*APIToken, error)

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

func (*APITokenQuery) OnlyID

func (atq *APITokenQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*APITokenQuery) OnlyIDX

func (atq *APITokenQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*APITokenQuery) OnlyX

func (atq *APITokenQuery) OnlyX(ctx context.Context) *APIToken

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

func (*APITokenQuery) Order

func (atq *APITokenQuery) Order(o ...apitoken.OrderOption) *APITokenQuery

Order specifies how the records should be ordered.

func (*APITokenQuery) QueryOrganization

func (atq *APITokenQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*APITokenQuery) Select

func (atq *APITokenQuery) Select(fields ...string) *APITokenSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.APIToken.Query().
	Select(apitoken.FieldName).
	Scan(ctx, &v)

func (*APITokenQuery) Unique

func (atq *APITokenQuery) Unique(unique bool) *APITokenQuery

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

func (atq *APITokenQuery) Where(ps ...predicate.APIToken) *APITokenQuery

Where adds a new predicate for the APITokenQuery builder.

func (*APITokenQuery) WithOrganization

func (atq *APITokenQuery) WithOrganization(opts ...func(*OrganizationQuery)) *APITokenQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

type APITokenSelect

type APITokenSelect struct {
	*APITokenQuery
	// contains filtered or unexported fields
}

APITokenSelect is the builder for selecting fields of APIToken entities.

func (*APITokenSelect) Aggregate

func (ats *APITokenSelect) Aggregate(fns ...AggregateFunc) *APITokenSelect

Aggregate adds the given aggregation functions to the selector query.

func (*APITokenSelect) Bool

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

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

func (*APITokenSelect) BoolX

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

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

func (*APITokenSelect) Bools

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

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

func (*APITokenSelect) BoolsX

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

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

func (*APITokenSelect) Float64

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

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

func (*APITokenSelect) Float64X

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

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

func (*APITokenSelect) Float64s

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

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

func (*APITokenSelect) Float64sX

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

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

func (*APITokenSelect) Int

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

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

func (*APITokenSelect) IntX

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

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

func (*APITokenSelect) Ints

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

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

func (*APITokenSelect) IntsX

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

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

func (*APITokenSelect) Modify

func (ats *APITokenSelect) Modify(modifiers ...func(s *sql.Selector)) *APITokenSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*APITokenSelect) Scan

func (ats *APITokenSelect) Scan(ctx context.Context, v any) error

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

func (*APITokenSelect) ScanX

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

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

func (*APITokenSelect) String

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

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

func (*APITokenSelect) StringX

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

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

func (*APITokenSelect) Strings

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

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

func (*APITokenSelect) StringsX

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

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

type APITokenUpdate

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

APITokenUpdate is the builder for updating APIToken entities.

func (*APITokenUpdate) ClearDescription

func (atu *APITokenUpdate) ClearDescription() *APITokenUpdate

ClearDescription clears the value of the "description" field.

func (*APITokenUpdate) ClearOrganization

func (atu *APITokenUpdate) ClearOrganization() *APITokenUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*APITokenUpdate) ClearRevokedAt

func (atu *APITokenUpdate) ClearRevokedAt() *APITokenUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*APITokenUpdate) Exec

func (atu *APITokenUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*APITokenUpdate) ExecX

func (atu *APITokenUpdate) ExecX(ctx context.Context)

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

func (*APITokenUpdate) Modify

func (atu *APITokenUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *APITokenUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*APITokenUpdate) Mutation

func (atu *APITokenUpdate) Mutation() *APITokenMutation

Mutation returns the APITokenMutation object of the builder.

func (*APITokenUpdate) Save

func (atu *APITokenUpdate) Save(ctx context.Context) (int, error)

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

func (*APITokenUpdate) SaveX

func (atu *APITokenUpdate) SaveX(ctx context.Context) int

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

func (*APITokenUpdate) SetDescription

func (atu *APITokenUpdate) SetDescription(s string) *APITokenUpdate

SetDescription sets the "description" field.

func (*APITokenUpdate) SetNillableDescription

func (atu *APITokenUpdate) SetNillableDescription(s *string) *APITokenUpdate

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

func (*APITokenUpdate) SetNillableOrganizationID added in v0.91.6

func (atu *APITokenUpdate) SetNillableOrganizationID(u *uuid.UUID) *APITokenUpdate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*APITokenUpdate) SetNillableRevokedAt

func (atu *APITokenUpdate) SetNillableRevokedAt(t *time.Time) *APITokenUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*APITokenUpdate) SetOrganization

func (atu *APITokenUpdate) SetOrganization(o *Organization) *APITokenUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*APITokenUpdate) SetOrganizationID

func (atu *APITokenUpdate) SetOrganizationID(u uuid.UUID) *APITokenUpdate

SetOrganizationID sets the "organization_id" field.

func (*APITokenUpdate) SetRevokedAt

func (atu *APITokenUpdate) SetRevokedAt(t time.Time) *APITokenUpdate

SetRevokedAt sets the "revoked_at" field.

func (*APITokenUpdate) Where

func (atu *APITokenUpdate) Where(ps ...predicate.APIToken) *APITokenUpdate

Where appends a list predicates to the APITokenUpdate builder.

type APITokenUpdateOne

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

APITokenUpdateOne is the builder for updating a single APIToken entity.

func (*APITokenUpdateOne) ClearDescription

func (atuo *APITokenUpdateOne) ClearDescription() *APITokenUpdateOne

ClearDescription clears the value of the "description" field.

func (*APITokenUpdateOne) ClearOrganization

func (atuo *APITokenUpdateOne) ClearOrganization() *APITokenUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*APITokenUpdateOne) ClearRevokedAt

func (atuo *APITokenUpdateOne) ClearRevokedAt() *APITokenUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*APITokenUpdateOne) Exec

func (atuo *APITokenUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*APITokenUpdateOne) ExecX

func (atuo *APITokenUpdateOne) ExecX(ctx context.Context)

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

func (*APITokenUpdateOne) Modify

func (atuo *APITokenUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *APITokenUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*APITokenUpdateOne) Mutation

func (atuo *APITokenUpdateOne) Mutation() *APITokenMutation

Mutation returns the APITokenMutation object of the builder.

func (*APITokenUpdateOne) Save

func (atuo *APITokenUpdateOne) Save(ctx context.Context) (*APIToken, error)

Save executes the query and returns the updated APIToken entity.

func (*APITokenUpdateOne) SaveX

func (atuo *APITokenUpdateOne) SaveX(ctx context.Context) *APIToken

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

func (*APITokenUpdateOne) Select

func (atuo *APITokenUpdateOne) Select(field string, fields ...string) *APITokenUpdateOne

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

func (*APITokenUpdateOne) SetDescription

func (atuo *APITokenUpdateOne) SetDescription(s string) *APITokenUpdateOne

SetDescription sets the "description" field.

func (*APITokenUpdateOne) SetNillableDescription

func (atuo *APITokenUpdateOne) SetNillableDescription(s *string) *APITokenUpdateOne

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

func (*APITokenUpdateOne) SetNillableOrganizationID added in v0.91.6

func (atuo *APITokenUpdateOne) SetNillableOrganizationID(u *uuid.UUID) *APITokenUpdateOne

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*APITokenUpdateOne) SetNillableRevokedAt

func (atuo *APITokenUpdateOne) SetNillableRevokedAt(t *time.Time) *APITokenUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*APITokenUpdateOne) SetOrganization

func (atuo *APITokenUpdateOne) SetOrganization(o *Organization) *APITokenUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*APITokenUpdateOne) SetOrganizationID

func (atuo *APITokenUpdateOne) SetOrganizationID(u uuid.UUID) *APITokenUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*APITokenUpdateOne) SetRevokedAt

func (atuo *APITokenUpdateOne) SetRevokedAt(t time.Time) *APITokenUpdateOne

SetRevokedAt sets the "revoked_at" field.

func (*APITokenUpdateOne) Where

Where appends a list predicates to the APITokenUpdate builder.

type APITokens

type APITokens []*APIToken

APITokens is a parsable slice of APIToken.

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 CASBackend

type CASBackend struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Location holds the value of the "location" field.
	Location string `json:"location,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Provider holds the value of the "provider" field.
	Provider biz.CASBackendProvider `json:"provider,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// SecretName holds the value of the "secret_name" field.
	SecretName string `json:"secret_name,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// ValidationStatus holds the value of the "validation_status" field.
	ValidationStatus biz.CASBackendValidationStatus `json:"validation_status,omitempty"`
	// ValidatedAt holds the value of the "validated_at" field.
	ValidatedAt time.Time `json:"validated_at,omitempty"`
	// Default holds the value of the "default" field.
	Default bool `json:"default,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// Fallback holds the value of the "fallback" field.
	Fallback bool `json:"fallback,omitempty"`
	// MaxBlobSizeBytes holds the value of the "max_blob_size_bytes" field.
	MaxBlobSizeBytes int64 `json:"max_blob_size_bytes,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CASBackendQuery when eager-loading is set.
	Edges CASBackendEdges `json:"edges"`
	// contains filtered or unexported fields
}

CASBackend is the model entity for the CASBackend schema.

func (*CASBackend) QueryOrganization

func (cb *CASBackend) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the CASBackend entity.

func (*CASBackend) QueryWorkflowRun

func (cb *CASBackend) QueryWorkflowRun() *WorkflowRunQuery

QueryWorkflowRun queries the "workflow_run" edge of the CASBackend entity.

func (*CASBackend) String

func (cb *CASBackend) String() string

String implements the fmt.Stringer.

func (*CASBackend) Unwrap

func (cb *CASBackend) Unwrap() *CASBackend

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

func (cb *CASBackend) Update() *CASBackendUpdateOne

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

func (*CASBackend) Value

func (cb *CASBackend) Value(name string) (ent.Value, error)

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

type CASBackendClient

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

CASBackendClient is a client for the CASBackend schema.

func NewCASBackendClient

func NewCASBackendClient(c config) *CASBackendClient

NewCASBackendClient returns a client for the CASBackend from the given config.

func (*CASBackendClient) Create

func (c *CASBackendClient) Create() *CASBackendCreate

Create returns a builder for creating a CASBackend entity.

func (*CASBackendClient) CreateBulk

func (c *CASBackendClient) CreateBulk(builders ...*CASBackendCreate) *CASBackendCreateBulk

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

func (*CASBackendClient) Delete

func (c *CASBackendClient) Delete() *CASBackendDelete

Delete returns a delete builder for CASBackend.

func (*CASBackendClient) DeleteOne

func (c *CASBackendClient) DeleteOne(cb *CASBackend) *CASBackendDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CASBackendClient) DeleteOneID

func (c *CASBackendClient) DeleteOneID(id uuid.UUID) *CASBackendDeleteOne

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

func (*CASBackendClient) Get

Get returns a CASBackend entity by its id.

func (*CASBackendClient) GetX

func (c *CASBackendClient) GetX(ctx context.Context, id uuid.UUID) *CASBackend

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

func (*CASBackendClient) Hooks

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

Hooks returns the client hooks.

func (*CASBackendClient) Intercept

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

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

func (*CASBackendClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CASBackendClient) MapCreateBulk added in v0.91.6

func (c *CASBackendClient) MapCreateBulk(slice any, setFunc func(*CASBackendCreate, int)) *CASBackendCreateBulk

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 (*CASBackendClient) Query

func (c *CASBackendClient) Query() *CASBackendQuery

Query returns a query builder for CASBackend.

func (*CASBackendClient) QueryOrganization

func (c *CASBackendClient) QueryOrganization(cb *CASBackend) *OrganizationQuery

QueryOrganization queries the organization edge of a CASBackend.

func (*CASBackendClient) QueryWorkflowRun

func (c *CASBackendClient) QueryWorkflowRun(cb *CASBackend) *WorkflowRunQuery

QueryWorkflowRun queries the workflow_run edge of a CASBackend.

func (*CASBackendClient) Update

func (c *CASBackendClient) Update() *CASBackendUpdate

Update returns an update builder for CASBackend.

func (*CASBackendClient) UpdateOne

func (c *CASBackendClient) UpdateOne(cb *CASBackend) *CASBackendUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CASBackendClient) UpdateOneID

func (c *CASBackendClient) UpdateOneID(id uuid.UUID) *CASBackendUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CASBackendClient) Use

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

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

type CASBackendCreate

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

CASBackendCreate is the builder for creating a CASBackend entity.

func (*CASBackendCreate) AddWorkflowRun

func (cbc *CASBackendCreate) AddWorkflowRun(w ...*WorkflowRun) *CASBackendCreate

AddWorkflowRun adds the "workflow_run" edges to the WorkflowRun entity.

func (*CASBackendCreate) AddWorkflowRunIDs

func (cbc *CASBackendCreate) AddWorkflowRunIDs(ids ...uuid.UUID) *CASBackendCreate

AddWorkflowRunIDs adds the "workflow_run" edge to the WorkflowRun entity by IDs.

func (*CASBackendCreate) Exec

func (cbc *CASBackendCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CASBackendCreate) ExecX

func (cbc *CASBackendCreate) ExecX(ctx context.Context)

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

func (*CASBackendCreate) Mutation

func (cbc *CASBackendCreate) Mutation() *CASBackendMutation

Mutation returns the CASBackendMutation object of the builder.

func (*CASBackendCreate) Save

func (cbc *CASBackendCreate) Save(ctx context.Context) (*CASBackend, error)

Save creates the CASBackend in the database.

func (*CASBackendCreate) SaveX

func (cbc *CASBackendCreate) SaveX(ctx context.Context) *CASBackend

SaveX calls Save and panics if Save returns an error.

func (*CASBackendCreate) SetCreatedAt

func (cbc *CASBackendCreate) SetCreatedAt(t time.Time) *CASBackendCreate

SetCreatedAt sets the "created_at" field.

func (*CASBackendCreate) SetDefault

func (cbc *CASBackendCreate) SetDefault(b bool) *CASBackendCreate

SetDefault sets the "default" field.

func (*CASBackendCreate) SetDeletedAt

func (cbc *CASBackendCreate) SetDeletedAt(t time.Time) *CASBackendCreate

SetDeletedAt sets the "deleted_at" field.

func (*CASBackendCreate) SetDescription

func (cbc *CASBackendCreate) SetDescription(s string) *CASBackendCreate

SetDescription sets the "description" field.

func (*CASBackendCreate) SetFallback

func (cbc *CASBackendCreate) SetFallback(b bool) *CASBackendCreate

SetFallback sets the "fallback" field.

func (*CASBackendCreate) SetID

func (cbc *CASBackendCreate) SetID(u uuid.UUID) *CASBackendCreate

SetID sets the "id" field.

func (*CASBackendCreate) SetLocation

func (cbc *CASBackendCreate) SetLocation(s string) *CASBackendCreate

SetLocation sets the "location" field.

func (*CASBackendCreate) SetMaxBlobSizeBytes added in v0.92.3

func (cbc *CASBackendCreate) SetMaxBlobSizeBytes(i int64) *CASBackendCreate

SetMaxBlobSizeBytes sets the "max_blob_size_bytes" field.

func (*CASBackendCreate) SetName

func (cbc *CASBackendCreate) SetName(s string) *CASBackendCreate

SetName sets the "name" field.

func (*CASBackendCreate) SetNillableCreatedAt

func (cbc *CASBackendCreate) SetNillableCreatedAt(t *time.Time) *CASBackendCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*CASBackendCreate) SetNillableDefault

func (cbc *CASBackendCreate) SetNillableDefault(b *bool) *CASBackendCreate

SetNillableDefault sets the "default" field if the given value is not nil.

func (*CASBackendCreate) SetNillableDeletedAt

func (cbc *CASBackendCreate) SetNillableDeletedAt(t *time.Time) *CASBackendCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*CASBackendCreate) SetNillableDescription

func (cbc *CASBackendCreate) SetNillableDescription(s *string) *CASBackendCreate

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

func (*CASBackendCreate) SetNillableFallback

func (cbc *CASBackendCreate) SetNillableFallback(b *bool) *CASBackendCreate

SetNillableFallback sets the "fallback" field if the given value is not nil.

func (*CASBackendCreate) SetNillableID

func (cbc *CASBackendCreate) SetNillableID(u *uuid.UUID) *CASBackendCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CASBackendCreate) SetNillableValidatedAt

func (cbc *CASBackendCreate) SetNillableValidatedAt(t *time.Time) *CASBackendCreate

SetNillableValidatedAt sets the "validated_at" field if the given value is not nil.

func (*CASBackendCreate) SetNillableValidationStatus

func (cbc *CASBackendCreate) SetNillableValidationStatus(bbvs *biz.CASBackendValidationStatus) *CASBackendCreate

SetNillableValidationStatus sets the "validation_status" field if the given value is not nil.

func (*CASBackendCreate) SetOrganization

func (cbc *CASBackendCreate) SetOrganization(o *Organization) *CASBackendCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*CASBackendCreate) SetOrganizationID

func (cbc *CASBackendCreate) SetOrganizationID(id uuid.UUID) *CASBackendCreate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*CASBackendCreate) SetProvider

SetProvider sets the "provider" field.

func (*CASBackendCreate) SetSecretName

func (cbc *CASBackendCreate) SetSecretName(s string) *CASBackendCreate

SetSecretName sets the "secret_name" field.

func (*CASBackendCreate) SetValidatedAt

func (cbc *CASBackendCreate) SetValidatedAt(t time.Time) *CASBackendCreate

SetValidatedAt sets the "validated_at" field.

func (*CASBackendCreate) SetValidationStatus

func (cbc *CASBackendCreate) SetValidationStatus(bbvs biz.CASBackendValidationStatus) *CASBackendCreate

SetValidationStatus sets the "validation_status" field.

type CASBackendCreateBulk

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

CASBackendCreateBulk is the builder for creating many CASBackend entities in bulk.

func (*CASBackendCreateBulk) Exec

func (cbcb *CASBackendCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CASBackendCreateBulk) ExecX

func (cbcb *CASBackendCreateBulk) ExecX(ctx context.Context)

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

func (*CASBackendCreateBulk) Save

func (cbcb *CASBackendCreateBulk) Save(ctx context.Context) ([]*CASBackend, error)

Save creates the CASBackend entities in the database.

func (*CASBackendCreateBulk) SaveX

func (cbcb *CASBackendCreateBulk) SaveX(ctx context.Context) []*CASBackend

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

type CASBackendDelete

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

CASBackendDelete is the builder for deleting a CASBackend entity.

func (*CASBackendDelete) Exec

func (cbd *CASBackendDelete) Exec(ctx context.Context) (int, error)

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

func (*CASBackendDelete) ExecX

func (cbd *CASBackendDelete) ExecX(ctx context.Context) int

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

func (*CASBackendDelete) Where

Where appends a list predicates to the CASBackendDelete builder.

type CASBackendDeleteOne

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

CASBackendDeleteOne is the builder for deleting a single CASBackend entity.

func (*CASBackendDeleteOne) Exec

func (cbdo *CASBackendDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CASBackendDeleteOne) ExecX

func (cbdo *CASBackendDeleteOne) ExecX(ctx context.Context)

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

func (*CASBackendDeleteOne) Where

Where appends a list predicates to the CASBackendDelete builder.

type CASBackendEdges

type CASBackendEdges struct {
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// WorkflowRun holds the value of the workflow_run edge.
	WorkflowRun []*WorkflowRun `json:"workflow_run,omitempty"`
	// contains filtered or unexported fields
}

CASBackendEdges holds the relations/edges for other nodes in the graph.

func (CASBackendEdges) OrganizationOrErr

func (e CASBackendEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CASBackendEdges) WorkflowRunOrErr

func (e CASBackendEdges) WorkflowRunOrErr() ([]*WorkflowRun, error)

WorkflowRunOrErr returns the WorkflowRun value or an error if the edge was not loaded in eager-loading.

type CASBackendGroupBy

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

CASBackendGroupBy is the group-by builder for CASBackend entities.

func (*CASBackendGroupBy) Aggregate

func (cbgb *CASBackendGroupBy) Aggregate(fns ...AggregateFunc) *CASBackendGroupBy

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

func (*CASBackendGroupBy) Bool

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

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

func (*CASBackendGroupBy) BoolX

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

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

func (*CASBackendGroupBy) Bools

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

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

func (*CASBackendGroupBy) BoolsX

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

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

func (*CASBackendGroupBy) Float64

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

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

func (*CASBackendGroupBy) Float64X

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

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

func (*CASBackendGroupBy) Float64s

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

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

func (*CASBackendGroupBy) Float64sX

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

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

func (*CASBackendGroupBy) Int

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

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

func (*CASBackendGroupBy) IntX

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

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

func (*CASBackendGroupBy) Ints

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

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

func (*CASBackendGroupBy) IntsX

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

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

func (*CASBackendGroupBy) Scan

func (cbgb *CASBackendGroupBy) Scan(ctx context.Context, v any) error

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

func (*CASBackendGroupBy) ScanX

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

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

func (*CASBackendGroupBy) String

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

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

func (*CASBackendGroupBy) StringX

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

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

func (*CASBackendGroupBy) Strings

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

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

func (*CASBackendGroupBy) StringsX

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

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

type CASBackendMutation

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

CASBackendMutation represents an operation that mutates the CASBackend nodes in the graph.

func (*CASBackendMutation) AddField

func (m *CASBackendMutation) 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 (*CASBackendMutation) AddMaxBlobSizeBytes added in v0.92.3

func (m *CASBackendMutation) AddMaxBlobSizeBytes(i int64)

AddMaxBlobSizeBytes adds i to the "max_blob_size_bytes" field.

func (*CASBackendMutation) AddWorkflowRunIDs

func (m *CASBackendMutation) AddWorkflowRunIDs(ids ...uuid.UUID)

AddWorkflowRunIDs adds the "workflow_run" edge to the WorkflowRun entity by ids.

func (*CASBackendMutation) AddedEdges

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

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

func (*CASBackendMutation) AddedField

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

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

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

func (*CASBackendMutation) AddedIDs

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

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

func (*CASBackendMutation) AddedMaxBlobSizeBytes added in v0.92.3

func (m *CASBackendMutation) AddedMaxBlobSizeBytes() (r int64, exists bool)

AddedMaxBlobSizeBytes returns the value that was added to the "max_blob_size_bytes" field in this mutation.

func (*CASBackendMutation) ClearDeletedAt

func (m *CASBackendMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*CASBackendMutation) ClearDescription

func (m *CASBackendMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*CASBackendMutation) ClearEdge

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

func (m *CASBackendMutation) 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 (*CASBackendMutation) ClearOrganization

func (m *CASBackendMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*CASBackendMutation) ClearWorkflowRun

func (m *CASBackendMutation) ClearWorkflowRun()

ClearWorkflowRun clears the "workflow_run" edge to the WorkflowRun entity.

func (*CASBackendMutation) ClearedEdges

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

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

func (*CASBackendMutation) ClearedFields

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

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

func (CASBackendMutation) Client

func (m CASBackendMutation) 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 (*CASBackendMutation) CreatedAt

func (m *CASBackendMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*CASBackendMutation) Default

func (m *CASBackendMutation) Default() (r bool, exists bool)

Default returns the value of the "default" field in the mutation.

func (*CASBackendMutation) DeletedAt

func (m *CASBackendMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*CASBackendMutation) DeletedAtCleared

func (m *CASBackendMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*CASBackendMutation) Description

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

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

func (*CASBackendMutation) DescriptionCleared

func (m *CASBackendMutation) DescriptionCleared() bool

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

func (*CASBackendMutation) EdgeCleared

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

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

func (*CASBackendMutation) Fallback

func (m *CASBackendMutation) Fallback() (r bool, exists bool)

Fallback returns the value of the "fallback" field in the mutation.

func (*CASBackendMutation) Field

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

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

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

func (*CASBackendMutation) Fields

func (m *CASBackendMutation) 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 (*CASBackendMutation) ID

func (m *CASBackendMutation) ID() (id uuid.UUID, exists bool)

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

func (*CASBackendMutation) IDs

func (m *CASBackendMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*CASBackendMutation) Location

func (m *CASBackendMutation) Location() (r string, exists bool)

Location returns the value of the "location" field in the mutation.

func (*CASBackendMutation) MaxBlobSizeBytes added in v0.92.3

func (m *CASBackendMutation) MaxBlobSizeBytes() (r int64, exists bool)

MaxBlobSizeBytes returns the value of the "max_blob_size_bytes" field in the mutation.

func (*CASBackendMutation) Name

func (m *CASBackendMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*CASBackendMutation) OldCreatedAt

func (m *CASBackendMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldDefault

func (m *CASBackendMutation) OldDefault(ctx context.Context) (v bool, err error)

OldDefault returns the old "default" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldDeletedAt

func (m *CASBackendMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldDescription

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

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

func (m *CASBackendMutation) OldFallback(ctx context.Context) (v bool, err error)

OldFallback returns the old "fallback" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldField

func (m *CASBackendMutation) 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 (*CASBackendMutation) OldLocation

func (m *CASBackendMutation) OldLocation(ctx context.Context) (v string, err error)

OldLocation returns the old "location" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldMaxBlobSizeBytes added in v0.92.3

func (m *CASBackendMutation) OldMaxBlobSizeBytes(ctx context.Context) (v int64, err error)

OldMaxBlobSizeBytes returns the old "max_blob_size_bytes" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldName

func (m *CASBackendMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldProvider

func (m *CASBackendMutation) OldProvider(ctx context.Context) (v biz.CASBackendProvider, err error)

OldProvider returns the old "provider" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldSecretName

func (m *CASBackendMutation) OldSecretName(ctx context.Context) (v string, err error)

OldSecretName returns the old "secret_name" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldValidatedAt

func (m *CASBackendMutation) OldValidatedAt(ctx context.Context) (v time.Time, err error)

OldValidatedAt returns the old "validated_at" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) OldValidationStatus

func (m *CASBackendMutation) OldValidationStatus(ctx context.Context) (v biz.CASBackendValidationStatus, err error)

OldValidationStatus returns the old "validation_status" field's value of the CASBackend entity. If the CASBackend 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 (*CASBackendMutation) Op

func (m *CASBackendMutation) Op() Op

Op returns the operation name.

func (*CASBackendMutation) OrganizationCleared

func (m *CASBackendMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*CASBackendMutation) OrganizationID

func (m *CASBackendMutation) OrganizationID() (id uuid.UUID, exists bool)

OrganizationID returns the "organization" edge ID in the mutation.

func (*CASBackendMutation) OrganizationIDs

func (m *CASBackendMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*CASBackendMutation) Provider

func (m *CASBackendMutation) Provider() (r biz.CASBackendProvider, exists bool)

Provider returns the value of the "provider" field in the mutation.

func (*CASBackendMutation) RemoveWorkflowRunIDs

func (m *CASBackendMutation) RemoveWorkflowRunIDs(ids ...uuid.UUID)

RemoveWorkflowRunIDs removes the "workflow_run" edge to the WorkflowRun entity by IDs.

func (*CASBackendMutation) RemovedEdges

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

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

func (*CASBackendMutation) RemovedIDs

func (m *CASBackendMutation) 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 (*CASBackendMutation) RemovedWorkflowRunIDs

func (m *CASBackendMutation) RemovedWorkflowRunIDs() (ids []uuid.UUID)

RemovedWorkflowRun returns the removed IDs of the "workflow_run" edge to the WorkflowRun entity.

func (*CASBackendMutation) ResetCreatedAt

func (m *CASBackendMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CASBackendMutation) ResetDefault

func (m *CASBackendMutation) ResetDefault()

ResetDefault resets all changes to the "default" field.

func (*CASBackendMutation) ResetDeletedAt

func (m *CASBackendMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*CASBackendMutation) ResetDescription

func (m *CASBackendMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*CASBackendMutation) ResetEdge

func (m *CASBackendMutation) 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 (*CASBackendMutation) ResetFallback

func (m *CASBackendMutation) ResetFallback()

ResetFallback resets all changes to the "fallback" field.

func (*CASBackendMutation) ResetField

func (m *CASBackendMutation) 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 (*CASBackendMutation) ResetLocation

func (m *CASBackendMutation) ResetLocation()

ResetLocation resets all changes to the "location" field.

func (*CASBackendMutation) ResetMaxBlobSizeBytes added in v0.92.3

func (m *CASBackendMutation) ResetMaxBlobSizeBytes()

ResetMaxBlobSizeBytes resets all changes to the "max_blob_size_bytes" field.

func (*CASBackendMutation) ResetName

func (m *CASBackendMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CASBackendMutation) ResetOrganization

func (m *CASBackendMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*CASBackendMutation) ResetProvider

func (m *CASBackendMutation) ResetProvider()

ResetProvider resets all changes to the "provider" field.

func (*CASBackendMutation) ResetSecretName

func (m *CASBackendMutation) ResetSecretName()

ResetSecretName resets all changes to the "secret_name" field.

func (*CASBackendMutation) ResetValidatedAt

func (m *CASBackendMutation) ResetValidatedAt()

ResetValidatedAt resets all changes to the "validated_at" field.

func (*CASBackendMutation) ResetValidationStatus

func (m *CASBackendMutation) ResetValidationStatus()

ResetValidationStatus resets all changes to the "validation_status" field.

func (*CASBackendMutation) ResetWorkflowRun

func (m *CASBackendMutation) ResetWorkflowRun()

ResetWorkflowRun resets all changes to the "workflow_run" edge.

func (*CASBackendMutation) SecretName

func (m *CASBackendMutation) SecretName() (r string, exists bool)

SecretName returns the value of the "secret_name" field in the mutation.

func (*CASBackendMutation) SetCreatedAt

func (m *CASBackendMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*CASBackendMutation) SetDefault

func (m *CASBackendMutation) SetDefault(b bool)

SetDefault sets the "default" field.

func (*CASBackendMutation) SetDeletedAt

func (m *CASBackendMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*CASBackendMutation) SetDescription

func (m *CASBackendMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*CASBackendMutation) SetFallback

func (m *CASBackendMutation) SetFallback(b bool)

SetFallback sets the "fallback" field.

func (*CASBackendMutation) SetField

func (m *CASBackendMutation) 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 (*CASBackendMutation) SetID

func (m *CASBackendMutation) SetID(id uuid.UUID)

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

func (*CASBackendMutation) SetLocation

func (m *CASBackendMutation) SetLocation(s string)

SetLocation sets the "location" field.

func (*CASBackendMutation) SetMaxBlobSizeBytes added in v0.92.3

func (m *CASBackendMutation) SetMaxBlobSizeBytes(i int64)

SetMaxBlobSizeBytes sets the "max_blob_size_bytes" field.

func (*CASBackendMutation) SetName

func (m *CASBackendMutation) SetName(s string)

SetName sets the "name" field.

func (*CASBackendMutation) SetOp

func (m *CASBackendMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CASBackendMutation) SetOrganizationID

func (m *CASBackendMutation) SetOrganizationID(id uuid.UUID)

SetOrganizationID sets the "organization" edge to the Organization entity by id.

func (*CASBackendMutation) SetProvider

func (m *CASBackendMutation) SetProvider(bbp biz.CASBackendProvider)

SetProvider sets the "provider" field.

func (*CASBackendMutation) SetSecretName

func (m *CASBackendMutation) SetSecretName(s string)

SetSecretName sets the "secret_name" field.

func (*CASBackendMutation) SetValidatedAt

func (m *CASBackendMutation) SetValidatedAt(t time.Time)

SetValidatedAt sets the "validated_at" field.

func (*CASBackendMutation) SetValidationStatus

func (m *CASBackendMutation) SetValidationStatus(bbvs biz.CASBackendValidationStatus)

SetValidationStatus sets the "validation_status" field.

func (CASBackendMutation) Tx

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

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

func (*CASBackendMutation) Type

func (m *CASBackendMutation) Type() string

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

func (*CASBackendMutation) ValidatedAt

func (m *CASBackendMutation) ValidatedAt() (r time.Time, exists bool)

ValidatedAt returns the value of the "validated_at" field in the mutation.

func (*CASBackendMutation) ValidationStatus

func (m *CASBackendMutation) ValidationStatus() (r biz.CASBackendValidationStatus, exists bool)

ValidationStatus returns the value of the "validation_status" field in the mutation.

func (*CASBackendMutation) Where

func (m *CASBackendMutation) Where(ps ...predicate.CASBackend)

Where appends a list predicates to the CASBackendMutation builder.

func (*CASBackendMutation) WhereP

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

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

func (*CASBackendMutation) WorkflowRunCleared

func (m *CASBackendMutation) WorkflowRunCleared() bool

WorkflowRunCleared reports if the "workflow_run" edge to the WorkflowRun entity was cleared.

func (*CASBackendMutation) WorkflowRunIDs

func (m *CASBackendMutation) WorkflowRunIDs() (ids []uuid.UUID)

WorkflowRunIDs returns the "workflow_run" edge IDs in the mutation.

type CASBackendQuery

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

CASBackendQuery is the builder for querying CASBackend entities.

func (*CASBackendQuery) Aggregate

func (cbq *CASBackendQuery) Aggregate(fns ...AggregateFunc) *CASBackendSelect

Aggregate returns a CASBackendSelect configured with the given aggregations.

func (*CASBackendQuery) All

func (cbq *CASBackendQuery) All(ctx context.Context) ([]*CASBackend, error)

All executes the query and returns a list of CASBackends.

func (*CASBackendQuery) AllX

func (cbq *CASBackendQuery) AllX(ctx context.Context) []*CASBackend

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

func (*CASBackendQuery) Clone

func (cbq *CASBackendQuery) Clone() *CASBackendQuery

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

func (*CASBackendQuery) Count

func (cbq *CASBackendQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CASBackendQuery) CountX

func (cbq *CASBackendQuery) CountX(ctx context.Context) int

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

func (*CASBackendQuery) Exist

func (cbq *CASBackendQuery) Exist(ctx context.Context) (bool, error)

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

func (*CASBackendQuery) ExistX

func (cbq *CASBackendQuery) ExistX(ctx context.Context) bool

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

func (*CASBackendQuery) First

func (cbq *CASBackendQuery) First(ctx context.Context) (*CASBackend, error)

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

func (*CASBackendQuery) FirstID

func (cbq *CASBackendQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*CASBackendQuery) FirstIDX

func (cbq *CASBackendQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*CASBackendQuery) FirstX

func (cbq *CASBackendQuery) FirstX(ctx context.Context) *CASBackend

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

func (*CASBackendQuery) ForShare added in v0.94.3

func (cbq *CASBackendQuery) ForShare(opts ...sql.LockOption) *CASBackendQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*CASBackendQuery) ForUpdate added in v0.94.3

func (cbq *CASBackendQuery) ForUpdate(opts ...sql.LockOption) *CASBackendQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*CASBackendQuery) GroupBy

func (cbq *CASBackendQuery) GroupBy(field string, fields ...string) *CASBackendGroupBy

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

client.CASBackend.Query().
	GroupBy(casbackend.FieldLocation).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CASBackendQuery) IDs

func (cbq *CASBackendQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*CASBackendQuery) IDsX

func (cbq *CASBackendQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*CASBackendQuery) Limit

func (cbq *CASBackendQuery) Limit(limit int) *CASBackendQuery

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

func (*CASBackendQuery) Modify

func (cbq *CASBackendQuery) Modify(modifiers ...func(s *sql.Selector)) *CASBackendSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CASBackendQuery) Offset

func (cbq *CASBackendQuery) Offset(offset int) *CASBackendQuery

Offset to start from.

func (*CASBackendQuery) Only

func (cbq *CASBackendQuery) Only(ctx context.Context) (*CASBackend, error)

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

func (*CASBackendQuery) OnlyID

func (cbq *CASBackendQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*CASBackendQuery) OnlyIDX

func (cbq *CASBackendQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*CASBackendQuery) OnlyX

func (cbq *CASBackendQuery) OnlyX(ctx context.Context) *CASBackend

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

func (*CASBackendQuery) Order

Order specifies how the records should be ordered.

func (*CASBackendQuery) QueryOrganization

func (cbq *CASBackendQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*CASBackendQuery) QueryWorkflowRun

func (cbq *CASBackendQuery) QueryWorkflowRun() *WorkflowRunQuery

QueryWorkflowRun chains the current query on the "workflow_run" edge.

func (*CASBackendQuery) Select

func (cbq *CASBackendQuery) Select(fields ...string) *CASBackendSelect

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

client.CASBackend.Query().
	Select(casbackend.FieldLocation).
	Scan(ctx, &v)

func (*CASBackendQuery) Unique

func (cbq *CASBackendQuery) Unique(unique bool) *CASBackendQuery

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

Where adds a new predicate for the CASBackendQuery builder.

func (*CASBackendQuery) WithOrganization

func (cbq *CASBackendQuery) WithOrganization(opts ...func(*OrganizationQuery)) *CASBackendQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

func (*CASBackendQuery) WithWorkflowRun

func (cbq *CASBackendQuery) WithWorkflowRun(opts ...func(*WorkflowRunQuery)) *CASBackendQuery

WithWorkflowRun tells the query-builder to eager-load the nodes that are connected to the "workflow_run" edge. The optional arguments are used to configure the query builder of the edge.

type CASBackendSelect

type CASBackendSelect struct {
	*CASBackendQuery
	// contains filtered or unexported fields
}

CASBackendSelect is the builder for selecting fields of CASBackend entities.

func (*CASBackendSelect) Aggregate

func (cbs *CASBackendSelect) Aggregate(fns ...AggregateFunc) *CASBackendSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CASBackendSelect) Bool

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

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

func (*CASBackendSelect) BoolX

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

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

func (*CASBackendSelect) Bools

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

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

func (*CASBackendSelect) BoolsX

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

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

func (*CASBackendSelect) Float64

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

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

func (*CASBackendSelect) Float64X

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

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

func (*CASBackendSelect) Float64s

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

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

func (*CASBackendSelect) Float64sX

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

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

func (*CASBackendSelect) Int

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

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

func (*CASBackendSelect) IntX

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

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

func (*CASBackendSelect) Ints

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

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

func (*CASBackendSelect) IntsX

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

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

func (*CASBackendSelect) Modify

func (cbs *CASBackendSelect) Modify(modifiers ...func(s *sql.Selector)) *CASBackendSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CASBackendSelect) Scan

func (cbs *CASBackendSelect) Scan(ctx context.Context, v any) error

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

func (*CASBackendSelect) ScanX

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

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

func (*CASBackendSelect) String

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

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

func (*CASBackendSelect) StringX

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

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

func (*CASBackendSelect) Strings

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

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

func (*CASBackendSelect) StringsX

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

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

type CASBackendUpdate

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

CASBackendUpdate is the builder for updating CASBackend entities.

func (*CASBackendUpdate) AddMaxBlobSizeBytes added in v0.92.3

func (cbu *CASBackendUpdate) AddMaxBlobSizeBytes(i int64) *CASBackendUpdate

AddMaxBlobSizeBytes adds i to the "max_blob_size_bytes" field.

func (*CASBackendUpdate) AddWorkflowRun

func (cbu *CASBackendUpdate) AddWorkflowRun(w ...*WorkflowRun) *CASBackendUpdate

AddWorkflowRun adds the "workflow_run" edges to the WorkflowRun entity.

func (*CASBackendUpdate) AddWorkflowRunIDs

func (cbu *CASBackendUpdate) AddWorkflowRunIDs(ids ...uuid.UUID) *CASBackendUpdate

AddWorkflowRunIDs adds the "workflow_run" edge to the WorkflowRun entity by IDs.

func (*CASBackendUpdate) ClearDeletedAt

func (cbu *CASBackendUpdate) ClearDeletedAt() *CASBackendUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*CASBackendUpdate) ClearDescription

func (cbu *CASBackendUpdate) ClearDescription() *CASBackendUpdate

ClearDescription clears the value of the "description" field.

func (*CASBackendUpdate) ClearOrganization

func (cbu *CASBackendUpdate) ClearOrganization() *CASBackendUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*CASBackendUpdate) ClearWorkflowRun

func (cbu *CASBackendUpdate) ClearWorkflowRun() *CASBackendUpdate

ClearWorkflowRun clears all "workflow_run" edges to the WorkflowRun entity.

func (*CASBackendUpdate) Exec

func (cbu *CASBackendUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CASBackendUpdate) ExecX

func (cbu *CASBackendUpdate) ExecX(ctx context.Context)

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

func (*CASBackendUpdate) Modify

func (cbu *CASBackendUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CASBackendUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CASBackendUpdate) Mutation

func (cbu *CASBackendUpdate) Mutation() *CASBackendMutation

Mutation returns the CASBackendMutation object of the builder.

func (*CASBackendUpdate) RemoveWorkflowRun

func (cbu *CASBackendUpdate) RemoveWorkflowRun(w ...*WorkflowRun) *CASBackendUpdate

RemoveWorkflowRun removes "workflow_run" edges to WorkflowRun entities.

func (*CASBackendUpdate) RemoveWorkflowRunIDs

func (cbu *CASBackendUpdate) RemoveWorkflowRunIDs(ids ...uuid.UUID) *CASBackendUpdate

RemoveWorkflowRunIDs removes the "workflow_run" edge to WorkflowRun entities by IDs.

func (*CASBackendUpdate) Save

func (cbu *CASBackendUpdate) Save(ctx context.Context) (int, error)

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

func (*CASBackendUpdate) SaveX

func (cbu *CASBackendUpdate) SaveX(ctx context.Context) int

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

func (*CASBackendUpdate) SetDefault

func (cbu *CASBackendUpdate) SetDefault(b bool) *CASBackendUpdate

SetDefault sets the "default" field.

func (*CASBackendUpdate) SetDeletedAt

func (cbu *CASBackendUpdate) SetDeletedAt(t time.Time) *CASBackendUpdate

SetDeletedAt sets the "deleted_at" field.

func (*CASBackendUpdate) SetDescription

func (cbu *CASBackendUpdate) SetDescription(s string) *CASBackendUpdate

SetDescription sets the "description" field.

func (*CASBackendUpdate) SetMaxBlobSizeBytes added in v0.92.3

func (cbu *CASBackendUpdate) SetMaxBlobSizeBytes(i int64) *CASBackendUpdate

SetMaxBlobSizeBytes sets the "max_blob_size_bytes" field.

func (*CASBackendUpdate) SetNillableDefault

func (cbu *CASBackendUpdate) SetNillableDefault(b *bool) *CASBackendUpdate

SetNillableDefault sets the "default" field if the given value is not nil.

func (*CASBackendUpdate) SetNillableDeletedAt

func (cbu *CASBackendUpdate) SetNillableDeletedAt(t *time.Time) *CASBackendUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*CASBackendUpdate) SetNillableDescription

func (cbu *CASBackendUpdate) SetNillableDescription(s *string) *CASBackendUpdate

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

func (*CASBackendUpdate) SetNillableMaxBlobSizeBytes added in v0.92.3

func (cbu *CASBackendUpdate) SetNillableMaxBlobSizeBytes(i *int64) *CASBackendUpdate

SetNillableMaxBlobSizeBytes sets the "max_blob_size_bytes" field if the given value is not nil.

func (*CASBackendUpdate) SetNillableSecretName added in v0.91.6

func (cbu *CASBackendUpdate) SetNillableSecretName(s *string) *CASBackendUpdate

SetNillableSecretName sets the "secret_name" field if the given value is not nil.

func (*CASBackendUpdate) SetNillableValidatedAt

func (cbu *CASBackendUpdate) SetNillableValidatedAt(t *time.Time) *CASBackendUpdate

SetNillableValidatedAt sets the "validated_at" field if the given value is not nil.

func (*CASBackendUpdate) SetNillableValidationStatus

func (cbu *CASBackendUpdate) SetNillableValidationStatus(bbvs *biz.CASBackendValidationStatus) *CASBackendUpdate

SetNillableValidationStatus sets the "validation_status" field if the given value is not nil.

func (*CASBackendUpdate) SetOrganization

func (cbu *CASBackendUpdate) SetOrganization(o *Organization) *CASBackendUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*CASBackendUpdate) SetOrganizationID

func (cbu *CASBackendUpdate) SetOrganizationID(id uuid.UUID) *CASBackendUpdate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*CASBackendUpdate) SetSecretName

func (cbu *CASBackendUpdate) SetSecretName(s string) *CASBackendUpdate

SetSecretName sets the "secret_name" field.

func (*CASBackendUpdate) SetValidatedAt

func (cbu *CASBackendUpdate) SetValidatedAt(t time.Time) *CASBackendUpdate

SetValidatedAt sets the "validated_at" field.

func (*CASBackendUpdate) SetValidationStatus

func (cbu *CASBackendUpdate) SetValidationStatus(bbvs biz.CASBackendValidationStatus) *CASBackendUpdate

SetValidationStatus sets the "validation_status" field.

func (*CASBackendUpdate) Where

Where appends a list predicates to the CASBackendUpdate builder.

type CASBackendUpdateOne

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

CASBackendUpdateOne is the builder for updating a single CASBackend entity.

func (*CASBackendUpdateOne) AddMaxBlobSizeBytes added in v0.92.3

func (cbuo *CASBackendUpdateOne) AddMaxBlobSizeBytes(i int64) *CASBackendUpdateOne

AddMaxBlobSizeBytes adds i to the "max_blob_size_bytes" field.

func (*CASBackendUpdateOne) AddWorkflowRun

func (cbuo *CASBackendUpdateOne) AddWorkflowRun(w ...*WorkflowRun) *CASBackendUpdateOne

AddWorkflowRun adds the "workflow_run" edges to the WorkflowRun entity.

func (*CASBackendUpdateOne) AddWorkflowRunIDs

func (cbuo *CASBackendUpdateOne) AddWorkflowRunIDs(ids ...uuid.UUID) *CASBackendUpdateOne

AddWorkflowRunIDs adds the "workflow_run" edge to the WorkflowRun entity by IDs.

func (*CASBackendUpdateOne) ClearDeletedAt

func (cbuo *CASBackendUpdateOne) ClearDeletedAt() *CASBackendUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*CASBackendUpdateOne) ClearDescription

func (cbuo *CASBackendUpdateOne) ClearDescription() *CASBackendUpdateOne

ClearDescription clears the value of the "description" field.

func (*CASBackendUpdateOne) ClearOrganization

func (cbuo *CASBackendUpdateOne) ClearOrganization() *CASBackendUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*CASBackendUpdateOne) ClearWorkflowRun

func (cbuo *CASBackendUpdateOne) ClearWorkflowRun() *CASBackendUpdateOne

ClearWorkflowRun clears all "workflow_run" edges to the WorkflowRun entity.

func (*CASBackendUpdateOne) Exec

func (cbuo *CASBackendUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CASBackendUpdateOne) ExecX

func (cbuo *CASBackendUpdateOne) ExecX(ctx context.Context)

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

func (*CASBackendUpdateOne) Modify

func (cbuo *CASBackendUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CASBackendUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CASBackendUpdateOne) Mutation

func (cbuo *CASBackendUpdateOne) Mutation() *CASBackendMutation

Mutation returns the CASBackendMutation object of the builder.

func (*CASBackendUpdateOne) RemoveWorkflowRun

func (cbuo *CASBackendUpdateOne) RemoveWorkflowRun(w ...*WorkflowRun) *CASBackendUpdateOne

RemoveWorkflowRun removes "workflow_run" edges to WorkflowRun entities.

func (*CASBackendUpdateOne) RemoveWorkflowRunIDs

func (cbuo *CASBackendUpdateOne) RemoveWorkflowRunIDs(ids ...uuid.UUID) *CASBackendUpdateOne

RemoveWorkflowRunIDs removes the "workflow_run" edge to WorkflowRun entities by IDs.

func (*CASBackendUpdateOne) Save

func (cbuo *CASBackendUpdateOne) Save(ctx context.Context) (*CASBackend, error)

Save executes the query and returns the updated CASBackend entity.

func (*CASBackendUpdateOne) SaveX

func (cbuo *CASBackendUpdateOne) SaveX(ctx context.Context) *CASBackend

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

func (*CASBackendUpdateOne) Select

func (cbuo *CASBackendUpdateOne) Select(field string, fields ...string) *CASBackendUpdateOne

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

func (*CASBackendUpdateOne) SetDefault

func (cbuo *CASBackendUpdateOne) SetDefault(b bool) *CASBackendUpdateOne

SetDefault sets the "default" field.

func (*CASBackendUpdateOne) SetDeletedAt

func (cbuo *CASBackendUpdateOne) SetDeletedAt(t time.Time) *CASBackendUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*CASBackendUpdateOne) SetDescription

func (cbuo *CASBackendUpdateOne) SetDescription(s string) *CASBackendUpdateOne

SetDescription sets the "description" field.

func (*CASBackendUpdateOne) SetMaxBlobSizeBytes added in v0.92.3

func (cbuo *CASBackendUpdateOne) SetMaxBlobSizeBytes(i int64) *CASBackendUpdateOne

SetMaxBlobSizeBytes sets the "max_blob_size_bytes" field.

func (*CASBackendUpdateOne) SetNillableDefault

func (cbuo *CASBackendUpdateOne) SetNillableDefault(b *bool) *CASBackendUpdateOne

SetNillableDefault sets the "default" field if the given value is not nil.

func (*CASBackendUpdateOne) SetNillableDeletedAt

func (cbuo *CASBackendUpdateOne) SetNillableDeletedAt(t *time.Time) *CASBackendUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*CASBackendUpdateOne) SetNillableDescription

func (cbuo *CASBackendUpdateOne) SetNillableDescription(s *string) *CASBackendUpdateOne

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

func (*CASBackendUpdateOne) SetNillableMaxBlobSizeBytes added in v0.92.3

func (cbuo *CASBackendUpdateOne) SetNillableMaxBlobSizeBytes(i *int64) *CASBackendUpdateOne

SetNillableMaxBlobSizeBytes sets the "max_blob_size_bytes" field if the given value is not nil.

func (*CASBackendUpdateOne) SetNillableSecretName added in v0.91.6

func (cbuo *CASBackendUpdateOne) SetNillableSecretName(s *string) *CASBackendUpdateOne

SetNillableSecretName sets the "secret_name" field if the given value is not nil.

func (*CASBackendUpdateOne) SetNillableValidatedAt

func (cbuo *CASBackendUpdateOne) SetNillableValidatedAt(t *time.Time) *CASBackendUpdateOne

SetNillableValidatedAt sets the "validated_at" field if the given value is not nil.

func (*CASBackendUpdateOne) SetNillableValidationStatus

func (cbuo *CASBackendUpdateOne) SetNillableValidationStatus(bbvs *biz.CASBackendValidationStatus) *CASBackendUpdateOne

SetNillableValidationStatus sets the "validation_status" field if the given value is not nil.

func (*CASBackendUpdateOne) SetOrganization

func (cbuo *CASBackendUpdateOne) SetOrganization(o *Organization) *CASBackendUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*CASBackendUpdateOne) SetOrganizationID

func (cbuo *CASBackendUpdateOne) SetOrganizationID(id uuid.UUID) *CASBackendUpdateOne

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*CASBackendUpdateOne) SetSecretName

func (cbuo *CASBackendUpdateOne) SetSecretName(s string) *CASBackendUpdateOne

SetSecretName sets the "secret_name" field.

func (*CASBackendUpdateOne) SetValidatedAt

func (cbuo *CASBackendUpdateOne) SetValidatedAt(t time.Time) *CASBackendUpdateOne

SetValidatedAt sets the "validated_at" field.

func (*CASBackendUpdateOne) SetValidationStatus

func (cbuo *CASBackendUpdateOne) SetValidationStatus(bbvs biz.CASBackendValidationStatus) *CASBackendUpdateOne

SetValidationStatus sets the "validation_status" field.

func (*CASBackendUpdateOne) Where

Where appends a list predicates to the CASBackendUpdate builder.

type CASBackends

type CASBackends []*CASBackend

CASBackends is a parsable slice of CASBackend.

type CASMapping

type CASMapping struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Digest holds the value of the "digest" field.
	Digest string `json:"digest,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CASMappingQuery when eager-loading is set.
	Edges CASMappingEdges `json:"edges"`
	// contains filtered or unexported fields
}

CASMapping is the model entity for the CASMapping schema.

func (*CASMapping) QueryCasBackend

func (cm *CASMapping) QueryCasBackend() *CASBackendQuery

QueryCasBackend queries the "cas_backend" edge of the CASMapping entity.

func (*CASMapping) QueryOrganization

func (cm *CASMapping) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the CASMapping entity.

func (*CASMapping) QueryWorkflowRun

func (cm *CASMapping) QueryWorkflowRun() *WorkflowRunQuery

QueryWorkflowRun queries the "workflow_run" edge of the CASMapping entity.

func (*CASMapping) String

func (cm *CASMapping) String() string

String implements the fmt.Stringer.

func (*CASMapping) Unwrap

func (cm *CASMapping) Unwrap() *CASMapping

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

func (cm *CASMapping) Update() *CASMappingUpdateOne

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

func (*CASMapping) Value

func (cm *CASMapping) Value(name string) (ent.Value, error)

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

type CASMappingClient

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

CASMappingClient is a client for the CASMapping schema.

func NewCASMappingClient

func NewCASMappingClient(c config) *CASMappingClient

NewCASMappingClient returns a client for the CASMapping from the given config.

func (*CASMappingClient) Create

func (c *CASMappingClient) Create() *CASMappingCreate

Create returns a builder for creating a CASMapping entity.

func (*CASMappingClient) CreateBulk

func (c *CASMappingClient) CreateBulk(builders ...*CASMappingCreate) *CASMappingCreateBulk

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

func (*CASMappingClient) Delete

func (c *CASMappingClient) Delete() *CASMappingDelete

Delete returns a delete builder for CASMapping.

func (*CASMappingClient) DeleteOne

func (c *CASMappingClient) DeleteOne(cm *CASMapping) *CASMappingDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CASMappingClient) DeleteOneID

func (c *CASMappingClient) DeleteOneID(id uuid.UUID) *CASMappingDeleteOne

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

func (*CASMappingClient) Get

Get returns a CASMapping entity by its id.

func (*CASMappingClient) GetX

func (c *CASMappingClient) GetX(ctx context.Context, id uuid.UUID) *CASMapping

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

func (*CASMappingClient) Hooks

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

Hooks returns the client hooks.

func (*CASMappingClient) Intercept

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

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

func (*CASMappingClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CASMappingClient) MapCreateBulk added in v0.91.6

func (c *CASMappingClient) MapCreateBulk(slice any, setFunc func(*CASMappingCreate, int)) *CASMappingCreateBulk

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 (*CASMappingClient) Query

func (c *CASMappingClient) Query() *CASMappingQuery

Query returns a query builder for CASMapping.

func (*CASMappingClient) QueryCasBackend

func (c *CASMappingClient) QueryCasBackend(cm *CASMapping) *CASBackendQuery

QueryCasBackend queries the cas_backend edge of a CASMapping.

func (*CASMappingClient) QueryOrganization

func (c *CASMappingClient) QueryOrganization(cm *CASMapping) *OrganizationQuery

QueryOrganization queries the organization edge of a CASMapping.

func (*CASMappingClient) QueryWorkflowRun

func (c *CASMappingClient) QueryWorkflowRun(cm *CASMapping) *WorkflowRunQuery

QueryWorkflowRun queries the workflow_run edge of a CASMapping.

func (*CASMappingClient) Update

func (c *CASMappingClient) Update() *CASMappingUpdate

Update returns an update builder for CASMapping.

func (*CASMappingClient) UpdateOne

func (c *CASMappingClient) UpdateOne(cm *CASMapping) *CASMappingUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CASMappingClient) UpdateOneID

func (c *CASMappingClient) UpdateOneID(id uuid.UUID) *CASMappingUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CASMappingClient) Use

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

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

type CASMappingCreate

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

CASMappingCreate is the builder for creating a CASMapping entity.

func (*CASMappingCreate) Exec

func (cmc *CASMappingCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CASMappingCreate) ExecX

func (cmc *CASMappingCreate) ExecX(ctx context.Context)

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

func (*CASMappingCreate) Mutation

func (cmc *CASMappingCreate) Mutation() *CASMappingMutation

Mutation returns the CASMappingMutation object of the builder.

func (*CASMappingCreate) Save

func (cmc *CASMappingCreate) Save(ctx context.Context) (*CASMapping, error)

Save creates the CASMapping in the database.

func (*CASMappingCreate) SaveX

func (cmc *CASMappingCreate) SaveX(ctx context.Context) *CASMapping

SaveX calls Save and panics if Save returns an error.

func (*CASMappingCreate) SetCasBackend

func (cmc *CASMappingCreate) SetCasBackend(c *CASBackend) *CASMappingCreate

SetCasBackend sets the "cas_backend" edge to the CASBackend entity.

func (*CASMappingCreate) SetCasBackendID

func (cmc *CASMappingCreate) SetCasBackendID(id uuid.UUID) *CASMappingCreate

SetCasBackendID sets the "cas_backend" edge to the CASBackend entity by ID.

func (*CASMappingCreate) SetCreatedAt

func (cmc *CASMappingCreate) SetCreatedAt(t time.Time) *CASMappingCreate

SetCreatedAt sets the "created_at" field.

func (*CASMappingCreate) SetDigest

func (cmc *CASMappingCreate) SetDigest(s string) *CASMappingCreate

SetDigest sets the "digest" field.

func (*CASMappingCreate) SetID

func (cmc *CASMappingCreate) SetID(u uuid.UUID) *CASMappingCreate

SetID sets the "id" field.

func (*CASMappingCreate) SetNillableCreatedAt

func (cmc *CASMappingCreate) SetNillableCreatedAt(t *time.Time) *CASMappingCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*CASMappingCreate) SetNillableID

func (cmc *CASMappingCreate) SetNillableID(u *uuid.UUID) *CASMappingCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CASMappingCreate) SetNillableWorkflowRunID

func (cmc *CASMappingCreate) SetNillableWorkflowRunID(id *uuid.UUID) *CASMappingCreate

SetNillableWorkflowRunID sets the "workflow_run" edge to the WorkflowRun entity by ID if the given value is not nil.

func (*CASMappingCreate) SetOrganization

func (cmc *CASMappingCreate) SetOrganization(o *Organization) *CASMappingCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*CASMappingCreate) SetOrganizationID

func (cmc *CASMappingCreate) SetOrganizationID(id uuid.UUID) *CASMappingCreate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*CASMappingCreate) SetWorkflowRun

func (cmc *CASMappingCreate) SetWorkflowRun(w *WorkflowRun) *CASMappingCreate

SetWorkflowRun sets the "workflow_run" edge to the WorkflowRun entity.

func (*CASMappingCreate) SetWorkflowRunID

func (cmc *CASMappingCreate) SetWorkflowRunID(id uuid.UUID) *CASMappingCreate

SetWorkflowRunID sets the "workflow_run" edge to the WorkflowRun entity by ID.

type CASMappingCreateBulk

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

CASMappingCreateBulk is the builder for creating many CASMapping entities in bulk.

func (*CASMappingCreateBulk) Exec

func (cmcb *CASMappingCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CASMappingCreateBulk) ExecX

func (cmcb *CASMappingCreateBulk) ExecX(ctx context.Context)

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

func (*CASMappingCreateBulk) Save

func (cmcb *CASMappingCreateBulk) Save(ctx context.Context) ([]*CASMapping, error)

Save creates the CASMapping entities in the database.

func (*CASMappingCreateBulk) SaveX

func (cmcb *CASMappingCreateBulk) SaveX(ctx context.Context) []*CASMapping

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

type CASMappingDelete

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

CASMappingDelete is the builder for deleting a CASMapping entity.

func (*CASMappingDelete) Exec

func (cmd *CASMappingDelete) Exec(ctx context.Context) (int, error)

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

func (*CASMappingDelete) ExecX

func (cmd *CASMappingDelete) ExecX(ctx context.Context) int

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

func (*CASMappingDelete) Where

Where appends a list predicates to the CASMappingDelete builder.

type CASMappingDeleteOne

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

CASMappingDeleteOne is the builder for deleting a single CASMapping entity.

func (*CASMappingDeleteOne) Exec

func (cmdo *CASMappingDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CASMappingDeleteOne) ExecX

func (cmdo *CASMappingDeleteOne) ExecX(ctx context.Context)

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

func (*CASMappingDeleteOne) Where

Where appends a list predicates to the CASMappingDelete builder.

type CASMappingEdges

type CASMappingEdges struct {
	// CasBackend holds the value of the cas_backend edge.
	CasBackend *CASBackend `json:"cas_backend,omitempty"`
	// WorkflowRun holds the value of the workflow_run edge.
	WorkflowRun *WorkflowRun `json:"workflow_run,omitempty"`
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// contains filtered or unexported fields
}

CASMappingEdges holds the relations/edges for other nodes in the graph.

func (CASMappingEdges) CasBackendOrErr

func (e CASMappingEdges) CasBackendOrErr() (*CASBackend, error)

CasBackendOrErr returns the CasBackend value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CASMappingEdges) OrganizationOrErr

func (e CASMappingEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CASMappingEdges) WorkflowRunOrErr

func (e CASMappingEdges) WorkflowRunOrErr() (*WorkflowRun, error)

WorkflowRunOrErr returns the WorkflowRun value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type CASMappingGroupBy

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

CASMappingGroupBy is the group-by builder for CASMapping entities.

func (*CASMappingGroupBy) Aggregate

func (cmgb *CASMappingGroupBy) Aggregate(fns ...AggregateFunc) *CASMappingGroupBy

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

func (*CASMappingGroupBy) Bool

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

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

func (*CASMappingGroupBy) BoolX

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

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

func (*CASMappingGroupBy) Bools

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

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

func (*CASMappingGroupBy) BoolsX

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

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

func (*CASMappingGroupBy) Float64

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

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

func (*CASMappingGroupBy) Float64X

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

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

func (*CASMappingGroupBy) Float64s

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

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

func (*CASMappingGroupBy) Float64sX

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

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

func (*CASMappingGroupBy) Int

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

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

func (*CASMappingGroupBy) IntX

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

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

func (*CASMappingGroupBy) Ints

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

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

func (*CASMappingGroupBy) IntsX

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

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

func (*CASMappingGroupBy) Scan

func (cmgb *CASMappingGroupBy) Scan(ctx context.Context, v any) error

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

func (*CASMappingGroupBy) ScanX

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

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

func (*CASMappingGroupBy) String

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

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

func (*CASMappingGroupBy) StringX

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

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

func (*CASMappingGroupBy) Strings

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

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

func (*CASMappingGroupBy) StringsX

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

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

type CASMappingMutation

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

CASMappingMutation represents an operation that mutates the CASMapping nodes in the graph.

func (*CASMappingMutation) AddField

func (m *CASMappingMutation) 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 (*CASMappingMutation) AddedEdges

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

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

func (*CASMappingMutation) AddedField

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

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

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

func (*CASMappingMutation) AddedIDs

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

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

func (*CASMappingMutation) CasBackendCleared

func (m *CASMappingMutation) CasBackendCleared() bool

CasBackendCleared reports if the "cas_backend" edge to the CASBackend entity was cleared.

func (*CASMappingMutation) CasBackendID

func (m *CASMappingMutation) CasBackendID() (id uuid.UUID, exists bool)

CasBackendID returns the "cas_backend" edge ID in the mutation.

func (*CASMappingMutation) CasBackendIDs

func (m *CASMappingMutation) CasBackendIDs() (ids []uuid.UUID)

CasBackendIDs returns the "cas_backend" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CasBackendID instead. It exists only for internal usage by the builders.

func (*CASMappingMutation) ClearCasBackend

func (m *CASMappingMutation) ClearCasBackend()

ClearCasBackend clears the "cas_backend" edge to the CASBackend entity.

func (*CASMappingMutation) ClearEdge

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

func (m *CASMappingMutation) 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 (*CASMappingMutation) ClearOrganization

func (m *CASMappingMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*CASMappingMutation) ClearWorkflowRun

func (m *CASMappingMutation) ClearWorkflowRun()

ClearWorkflowRun clears the "workflow_run" edge to the WorkflowRun entity.

func (*CASMappingMutation) ClearedEdges

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

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

func (*CASMappingMutation) ClearedFields

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

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

func (CASMappingMutation) Client

func (m CASMappingMutation) 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 (*CASMappingMutation) CreatedAt

func (m *CASMappingMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*CASMappingMutation) Digest

func (m *CASMappingMutation) Digest() (r string, exists bool)

Digest returns the value of the "digest" field in the mutation.

func (*CASMappingMutation) EdgeCleared

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

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

func (*CASMappingMutation) Field

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

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

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

func (*CASMappingMutation) Fields

func (m *CASMappingMutation) 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 (*CASMappingMutation) ID

func (m *CASMappingMutation) ID() (id uuid.UUID, exists bool)

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

func (*CASMappingMutation) IDs

func (m *CASMappingMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*CASMappingMutation) OldCreatedAt

func (m *CASMappingMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the CASMapping entity. If the CASMapping 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 (*CASMappingMutation) OldDigest

func (m *CASMappingMutation) OldDigest(ctx context.Context) (v string, err error)

OldDigest returns the old "digest" field's value of the CASMapping entity. If the CASMapping 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 (*CASMappingMutation) OldField

func (m *CASMappingMutation) 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 (*CASMappingMutation) Op

func (m *CASMappingMutation) Op() Op

Op returns the operation name.

func (*CASMappingMutation) OrganizationCleared

func (m *CASMappingMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*CASMappingMutation) OrganizationID

func (m *CASMappingMutation) OrganizationID() (id uuid.UUID, exists bool)

OrganizationID returns the "organization" edge ID in the mutation.

func (*CASMappingMutation) OrganizationIDs

func (m *CASMappingMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*CASMappingMutation) RemovedEdges

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

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

func (*CASMappingMutation) RemovedIDs

func (m *CASMappingMutation) 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 (*CASMappingMutation) ResetCasBackend

func (m *CASMappingMutation) ResetCasBackend()

ResetCasBackend resets all changes to the "cas_backend" edge.

func (*CASMappingMutation) ResetCreatedAt

func (m *CASMappingMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CASMappingMutation) ResetDigest

func (m *CASMappingMutation) ResetDigest()

ResetDigest resets all changes to the "digest" field.

func (*CASMappingMutation) ResetEdge

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

func (m *CASMappingMutation) 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 (*CASMappingMutation) ResetOrganization

func (m *CASMappingMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*CASMappingMutation) ResetWorkflowRun

func (m *CASMappingMutation) ResetWorkflowRun()

ResetWorkflowRun resets all changes to the "workflow_run" edge.

func (*CASMappingMutation) SetCasBackendID

func (m *CASMappingMutation) SetCasBackendID(id uuid.UUID)

SetCasBackendID sets the "cas_backend" edge to the CASBackend entity by id.

func (*CASMappingMutation) SetCreatedAt

func (m *CASMappingMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*CASMappingMutation) SetDigest

func (m *CASMappingMutation) SetDigest(s string)

SetDigest sets the "digest" field.

func (*CASMappingMutation) SetField

func (m *CASMappingMutation) 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 (*CASMappingMutation) SetID

func (m *CASMappingMutation) SetID(id uuid.UUID)

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

func (*CASMappingMutation) SetOp

func (m *CASMappingMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CASMappingMutation) SetOrganizationID

func (m *CASMappingMutation) SetOrganizationID(id uuid.UUID)

SetOrganizationID sets the "organization" edge to the Organization entity by id.

func (*CASMappingMutation) SetWorkflowRunID

func (m *CASMappingMutation) SetWorkflowRunID(id uuid.UUID)

SetWorkflowRunID sets the "workflow_run" edge to the WorkflowRun entity by id.

func (CASMappingMutation) Tx

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

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

func (*CASMappingMutation) Type

func (m *CASMappingMutation) Type() string

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

func (*CASMappingMutation) Where

func (m *CASMappingMutation) Where(ps ...predicate.CASMapping)

Where appends a list predicates to the CASMappingMutation builder.

func (*CASMappingMutation) WhereP

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

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

func (*CASMappingMutation) WorkflowRunCleared

func (m *CASMappingMutation) WorkflowRunCleared() bool

WorkflowRunCleared reports if the "workflow_run" edge to the WorkflowRun entity was cleared.

func (*CASMappingMutation) WorkflowRunID

func (m *CASMappingMutation) WorkflowRunID() (id uuid.UUID, exists bool)

WorkflowRunID returns the "workflow_run" edge ID in the mutation.

func (*CASMappingMutation) WorkflowRunIDs

func (m *CASMappingMutation) WorkflowRunIDs() (ids []uuid.UUID)

WorkflowRunIDs returns the "workflow_run" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorkflowRunID instead. It exists only for internal usage by the builders.

type CASMappingQuery

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

CASMappingQuery is the builder for querying CASMapping entities.

func (*CASMappingQuery) Aggregate

func (cmq *CASMappingQuery) Aggregate(fns ...AggregateFunc) *CASMappingSelect

Aggregate returns a CASMappingSelect configured with the given aggregations.

func (*CASMappingQuery) All

func (cmq *CASMappingQuery) All(ctx context.Context) ([]*CASMapping, error)

All executes the query and returns a list of CASMappings.

func (*CASMappingQuery) AllX

func (cmq *CASMappingQuery) AllX(ctx context.Context) []*CASMapping

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

func (*CASMappingQuery) Clone

func (cmq *CASMappingQuery) Clone() *CASMappingQuery

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

func (*CASMappingQuery) Count

func (cmq *CASMappingQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CASMappingQuery) CountX

func (cmq *CASMappingQuery) CountX(ctx context.Context) int

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

func (*CASMappingQuery) Exist

func (cmq *CASMappingQuery) Exist(ctx context.Context) (bool, error)

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

func (*CASMappingQuery) ExistX

func (cmq *CASMappingQuery) ExistX(ctx context.Context) bool

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

func (*CASMappingQuery) First

func (cmq *CASMappingQuery) First(ctx context.Context) (*CASMapping, error)

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

func (*CASMappingQuery) FirstID

func (cmq *CASMappingQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*CASMappingQuery) FirstIDX

func (cmq *CASMappingQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*CASMappingQuery) FirstX

func (cmq *CASMappingQuery) FirstX(ctx context.Context) *CASMapping

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

func (*CASMappingQuery) ForShare added in v0.94.3

func (cmq *CASMappingQuery) ForShare(opts ...sql.LockOption) *CASMappingQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*CASMappingQuery) ForUpdate added in v0.94.3

func (cmq *CASMappingQuery) ForUpdate(opts ...sql.LockOption) *CASMappingQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*CASMappingQuery) GroupBy

func (cmq *CASMappingQuery) GroupBy(field string, fields ...string) *CASMappingGroupBy

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

client.CASMapping.Query().
	GroupBy(casmapping.FieldDigest).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CASMappingQuery) IDs

func (cmq *CASMappingQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*CASMappingQuery) IDsX

func (cmq *CASMappingQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*CASMappingQuery) Limit

func (cmq *CASMappingQuery) Limit(limit int) *CASMappingQuery

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

func (*CASMappingQuery) Modify

func (cmq *CASMappingQuery) Modify(modifiers ...func(s *sql.Selector)) *CASMappingSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CASMappingQuery) Offset

func (cmq *CASMappingQuery) Offset(offset int) *CASMappingQuery

Offset to start from.

func (*CASMappingQuery) Only

func (cmq *CASMappingQuery) Only(ctx context.Context) (*CASMapping, error)

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

func (*CASMappingQuery) OnlyID

func (cmq *CASMappingQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*CASMappingQuery) OnlyIDX

func (cmq *CASMappingQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*CASMappingQuery) OnlyX

func (cmq *CASMappingQuery) OnlyX(ctx context.Context) *CASMapping

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

func (*CASMappingQuery) Order

Order specifies how the records should be ordered.

func (*CASMappingQuery) QueryCasBackend

func (cmq *CASMappingQuery) QueryCasBackend() *CASBackendQuery

QueryCasBackend chains the current query on the "cas_backend" edge.

func (*CASMappingQuery) QueryOrganization

func (cmq *CASMappingQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*CASMappingQuery) QueryWorkflowRun

func (cmq *CASMappingQuery) QueryWorkflowRun() *WorkflowRunQuery

QueryWorkflowRun chains the current query on the "workflow_run" edge.

func (*CASMappingQuery) Select

func (cmq *CASMappingQuery) Select(fields ...string) *CASMappingSelect

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

client.CASMapping.Query().
	Select(casmapping.FieldDigest).
	Scan(ctx, &v)

func (*CASMappingQuery) Unique

func (cmq *CASMappingQuery) Unique(unique bool) *CASMappingQuery

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

Where adds a new predicate for the CASMappingQuery builder.

func (*CASMappingQuery) WithCasBackend

func (cmq *CASMappingQuery) WithCasBackend(opts ...func(*CASBackendQuery)) *CASMappingQuery

WithCasBackend tells the query-builder to eager-load the nodes that are connected to the "cas_backend" edge. The optional arguments are used to configure the query builder of the edge.

func (*CASMappingQuery) WithOrganization

func (cmq *CASMappingQuery) WithOrganization(opts ...func(*OrganizationQuery)) *CASMappingQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

func (*CASMappingQuery) WithWorkflowRun

func (cmq *CASMappingQuery) WithWorkflowRun(opts ...func(*WorkflowRunQuery)) *CASMappingQuery

WithWorkflowRun tells the query-builder to eager-load the nodes that are connected to the "workflow_run" edge. The optional arguments are used to configure the query builder of the edge.

type CASMappingSelect

type CASMappingSelect struct {
	*CASMappingQuery
	// contains filtered or unexported fields
}

CASMappingSelect is the builder for selecting fields of CASMapping entities.

func (*CASMappingSelect) Aggregate

func (cms *CASMappingSelect) Aggregate(fns ...AggregateFunc) *CASMappingSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CASMappingSelect) Bool

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

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

func (*CASMappingSelect) BoolX

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

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

func (*CASMappingSelect) Bools

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

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

func (*CASMappingSelect) BoolsX

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

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

func (*CASMappingSelect) Float64

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

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

func (*CASMappingSelect) Float64X

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

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

func (*CASMappingSelect) Float64s

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

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

func (*CASMappingSelect) Float64sX

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

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

func (*CASMappingSelect) Int

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

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

func (*CASMappingSelect) IntX

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

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

func (*CASMappingSelect) Ints

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

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

func (*CASMappingSelect) IntsX

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

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

func (*CASMappingSelect) Modify

func (cms *CASMappingSelect) Modify(modifiers ...func(s *sql.Selector)) *CASMappingSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CASMappingSelect) Scan

func (cms *CASMappingSelect) Scan(ctx context.Context, v any) error

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

func (*CASMappingSelect) ScanX

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

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

func (*CASMappingSelect) String

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

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

func (*CASMappingSelect) StringX

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

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

func (*CASMappingSelect) Strings

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

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

func (*CASMappingSelect) StringsX

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

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

type CASMappingUpdate

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

CASMappingUpdate is the builder for updating CASMapping entities.

func (*CASMappingUpdate) Exec

func (cmu *CASMappingUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CASMappingUpdate) ExecX

func (cmu *CASMappingUpdate) ExecX(ctx context.Context)

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

func (*CASMappingUpdate) Modify

func (cmu *CASMappingUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CASMappingUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CASMappingUpdate) Mutation

func (cmu *CASMappingUpdate) Mutation() *CASMappingMutation

Mutation returns the CASMappingMutation object of the builder.

func (*CASMappingUpdate) Save

func (cmu *CASMappingUpdate) Save(ctx context.Context) (int, error)

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

func (*CASMappingUpdate) SaveX

func (cmu *CASMappingUpdate) SaveX(ctx context.Context) int

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

func (*CASMappingUpdate) Where

Where appends a list predicates to the CASMappingUpdate builder.

type CASMappingUpdateOne

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

CASMappingUpdateOne is the builder for updating a single CASMapping entity.

func (*CASMappingUpdateOne) Exec

func (cmuo *CASMappingUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CASMappingUpdateOne) ExecX

func (cmuo *CASMappingUpdateOne) ExecX(ctx context.Context)

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

func (*CASMappingUpdateOne) Modify

func (cmuo *CASMappingUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CASMappingUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CASMappingUpdateOne) Mutation

func (cmuo *CASMappingUpdateOne) Mutation() *CASMappingMutation

Mutation returns the CASMappingMutation object of the builder.

func (*CASMappingUpdateOne) Save

func (cmuo *CASMappingUpdateOne) Save(ctx context.Context) (*CASMapping, error)

Save executes the query and returns the updated CASMapping entity.

func (*CASMappingUpdateOne) SaveX

func (cmuo *CASMappingUpdateOne) SaveX(ctx context.Context) *CASMapping

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

func (*CASMappingUpdateOne) Select

func (cmuo *CASMappingUpdateOne) Select(field string, fields ...string) *CASMappingUpdateOne

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

func (*CASMappingUpdateOne) Where

Where appends a list predicates to the CASMappingUpdate builder.

type CASMappings

type CASMappings []*CASMapping

CASMappings is a parsable slice of CASMapping.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// APIToken is the client for interacting with the APIToken builders.
	APIToken *APITokenClient
	// CASBackend is the client for interacting with the CASBackend builders.
	CASBackend *CASBackendClient
	// CASMapping is the client for interacting with the CASMapping builders.
	CASMapping *CASMappingClient
	// Integration is the client for interacting with the Integration builders.
	Integration *IntegrationClient
	// IntegrationAttachment is the client for interacting with the IntegrationAttachment builders.
	IntegrationAttachment *IntegrationAttachmentClient
	// Membership is the client for interacting with the Membership builders.
	Membership *MembershipClient
	// OrgInvitation is the client for interacting with the OrgInvitation builders.
	OrgInvitation *OrgInvitationClient
	// Organization is the client for interacting with the Organization builders.
	Organization *OrganizationClient
	// Referrer is the client for interacting with the Referrer builders.
	Referrer *ReferrerClient
	// RobotAccount is the client for interacting with the RobotAccount builders.
	RobotAccount *RobotAccountClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// Workflow is the client for interacting with the Workflow builders.
	Workflow *WorkflowClient
	// WorkflowContract is the client for interacting with the WorkflowContract builders.
	WorkflowContract *WorkflowContractClient
	// WorkflowContractVersion is the client for interacting with the WorkflowContractVersion builders.
	WorkflowContractVersion *WorkflowContractVersionClient
	// WorkflowRun is the client for interacting with the WorkflowRun builders.
	WorkflowRun *WorkflowRunClient
	// 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().
	APIToken.
	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) Ping

func (c *Client) Ping() error

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 Integration

type Integration struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Kind holds the value of the "kind" field.
	Kind string `json:"kind,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// SecretName holds the value of the "secret_name" field.
	SecretName string `json:"secret_name,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Configuration holds the value of the "configuration" field.
	Configuration []byte `json:"configuration,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the IntegrationQuery when eager-loading is set.
	Edges IntegrationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Integration is the model entity for the Integration schema.

func (*Integration) QueryAttachments

func (i *Integration) QueryAttachments() *IntegrationAttachmentQuery

QueryAttachments queries the "attachments" edge of the Integration entity.

func (*Integration) QueryOrganization

func (i *Integration) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the Integration entity.

func (*Integration) String

func (i *Integration) String() string

String implements the fmt.Stringer.

func (*Integration) Unwrap

func (i *Integration) Unwrap() *Integration

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

func (i *Integration) Update() *IntegrationUpdateOne

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

func (*Integration) Value

func (i *Integration) Value(name string) (ent.Value, error)

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

type IntegrationAttachment

type IntegrationAttachment struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Configuration holds the value of the "configuration" field.
	Configuration []byte `json:"configuration,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the IntegrationAttachmentQuery when eager-loading is set.
	Edges IntegrationAttachmentEdges `json:"edges"`
	// contains filtered or unexported fields
}

IntegrationAttachment is the model entity for the IntegrationAttachment schema.

func (*IntegrationAttachment) QueryIntegration

func (ia *IntegrationAttachment) QueryIntegration() *IntegrationQuery

QueryIntegration queries the "integration" edge of the IntegrationAttachment entity.

func (*IntegrationAttachment) QueryWorkflow

func (ia *IntegrationAttachment) QueryWorkflow() *WorkflowQuery

QueryWorkflow queries the "workflow" edge of the IntegrationAttachment entity.

func (*IntegrationAttachment) String

func (ia *IntegrationAttachment) String() string

String implements the fmt.Stringer.

func (*IntegrationAttachment) Unwrap

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

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

func (*IntegrationAttachment) Value

func (ia *IntegrationAttachment) Value(name string) (ent.Value, error)

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

type IntegrationAttachmentClient

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

IntegrationAttachmentClient is a client for the IntegrationAttachment schema.

func NewIntegrationAttachmentClient

func NewIntegrationAttachmentClient(c config) *IntegrationAttachmentClient

NewIntegrationAttachmentClient returns a client for the IntegrationAttachment from the given config.

func (*IntegrationAttachmentClient) Create

Create returns a builder for creating a IntegrationAttachment entity.

func (*IntegrationAttachmentClient) CreateBulk

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

func (*IntegrationAttachmentClient) Delete

Delete returns a delete builder for IntegrationAttachment.

func (*IntegrationAttachmentClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IntegrationAttachmentClient) DeleteOneID

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

func (*IntegrationAttachmentClient) Get

Get returns a IntegrationAttachment entity by its id.

func (*IntegrationAttachmentClient) GetX

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

func (*IntegrationAttachmentClient) Hooks

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

Hooks returns the client hooks.

func (*IntegrationAttachmentClient) Intercept

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

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

func (*IntegrationAttachmentClient) Interceptors

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

Interceptors returns the client interceptors.

func (*IntegrationAttachmentClient) MapCreateBulk added in v0.91.6

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 (*IntegrationAttachmentClient) Query

Query returns a query builder for IntegrationAttachment.

func (*IntegrationAttachmentClient) QueryIntegration

QueryIntegration queries the integration edge of a IntegrationAttachment.

func (*IntegrationAttachmentClient) QueryWorkflow

QueryWorkflow queries the workflow edge of a IntegrationAttachment.

func (*IntegrationAttachmentClient) Update

Update returns an update builder for IntegrationAttachment.

func (*IntegrationAttachmentClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*IntegrationAttachmentClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*IntegrationAttachmentClient) Use

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

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

type IntegrationAttachmentCreate

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

IntegrationAttachmentCreate is the builder for creating a IntegrationAttachment entity.

func (*IntegrationAttachmentCreate) Exec

Exec executes the query.

func (*IntegrationAttachmentCreate) ExecX

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

func (*IntegrationAttachmentCreate) Mutation

Mutation returns the IntegrationAttachmentMutation object of the builder.

func (*IntegrationAttachmentCreate) Save

Save creates the IntegrationAttachment in the database.

func (*IntegrationAttachmentCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*IntegrationAttachmentCreate) SetConfiguration

func (iac *IntegrationAttachmentCreate) SetConfiguration(b []byte) *IntegrationAttachmentCreate

SetConfiguration sets the "configuration" field.

func (*IntegrationAttachmentCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*IntegrationAttachmentCreate) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*IntegrationAttachmentCreate) SetID

SetID sets the "id" field.

func (*IntegrationAttachmentCreate) SetIntegration

SetIntegration sets the "integration" edge to the Integration entity.

func (*IntegrationAttachmentCreate) SetIntegrationID

SetIntegrationID sets the "integration" edge to the Integration entity by ID.

func (*IntegrationAttachmentCreate) SetNillableCreatedAt

func (iac *IntegrationAttachmentCreate) SetNillableCreatedAt(t *time.Time) *IntegrationAttachmentCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IntegrationAttachmentCreate) SetNillableDeletedAt

func (iac *IntegrationAttachmentCreate) SetNillableDeletedAt(t *time.Time) *IntegrationAttachmentCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*IntegrationAttachmentCreate) SetNillableID

SetNillableID sets the "id" field if the given value is not nil.

func (*IntegrationAttachmentCreate) SetWorkflow

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*IntegrationAttachmentCreate) SetWorkflowID

SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.

type IntegrationAttachmentCreateBulk

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

IntegrationAttachmentCreateBulk is the builder for creating many IntegrationAttachment entities in bulk.

func (*IntegrationAttachmentCreateBulk) Exec

Exec executes the query.

func (*IntegrationAttachmentCreateBulk) ExecX

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

func (*IntegrationAttachmentCreateBulk) Save

Save creates the IntegrationAttachment entities in the database.

func (*IntegrationAttachmentCreateBulk) SaveX

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

type IntegrationAttachmentDelete

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

IntegrationAttachmentDelete is the builder for deleting a IntegrationAttachment entity.

func (*IntegrationAttachmentDelete) Exec

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

func (*IntegrationAttachmentDelete) ExecX

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

func (*IntegrationAttachmentDelete) Where

Where appends a list predicates to the IntegrationAttachmentDelete builder.

type IntegrationAttachmentDeleteOne

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

IntegrationAttachmentDeleteOne is the builder for deleting a single IntegrationAttachment entity.

func (*IntegrationAttachmentDeleteOne) Exec

Exec executes the deletion query.

func (*IntegrationAttachmentDeleteOne) ExecX

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

func (*IntegrationAttachmentDeleteOne) Where

Where appends a list predicates to the IntegrationAttachmentDelete builder.

type IntegrationAttachmentEdges

type IntegrationAttachmentEdges struct {
	// Integration holds the value of the integration edge.
	Integration *Integration `json:"integration,omitempty"`
	// Workflow holds the value of the workflow edge.
	Workflow *Workflow `json:"workflow,omitempty"`
	// contains filtered or unexported fields
}

IntegrationAttachmentEdges holds the relations/edges for other nodes in the graph.

func (IntegrationAttachmentEdges) IntegrationOrErr

func (e IntegrationAttachmentEdges) IntegrationOrErr() (*Integration, error)

IntegrationOrErr returns the Integration value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (IntegrationAttachmentEdges) WorkflowOrErr

func (e IntegrationAttachmentEdges) WorkflowOrErr() (*Workflow, error)

WorkflowOrErr returns the Workflow value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type IntegrationAttachmentGroupBy

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

IntegrationAttachmentGroupBy is the group-by builder for IntegrationAttachment entities.

func (*IntegrationAttachmentGroupBy) Aggregate

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

func (*IntegrationAttachmentGroupBy) Bool

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

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

func (*IntegrationAttachmentGroupBy) BoolX

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

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

func (*IntegrationAttachmentGroupBy) Bools

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

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

func (*IntegrationAttachmentGroupBy) BoolsX

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

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

func (*IntegrationAttachmentGroupBy) Float64

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

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

func (*IntegrationAttachmentGroupBy) Float64X

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

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

func (*IntegrationAttachmentGroupBy) Float64s

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

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

func (*IntegrationAttachmentGroupBy) Float64sX

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

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

func (*IntegrationAttachmentGroupBy) Int

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

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

func (*IntegrationAttachmentGroupBy) IntX

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

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

func (*IntegrationAttachmentGroupBy) Ints

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

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

func (*IntegrationAttachmentGroupBy) IntsX

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

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

func (*IntegrationAttachmentGroupBy) Scan

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

func (*IntegrationAttachmentGroupBy) ScanX

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

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

func (*IntegrationAttachmentGroupBy) String

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

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

func (*IntegrationAttachmentGroupBy) StringX

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

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

func (*IntegrationAttachmentGroupBy) Strings

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

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

func (*IntegrationAttachmentGroupBy) StringsX

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

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

type IntegrationAttachmentMutation

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

IntegrationAttachmentMutation represents an operation that mutates the IntegrationAttachment nodes in the graph.

func (*IntegrationAttachmentMutation) AddField

func (m *IntegrationAttachmentMutation) 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 (*IntegrationAttachmentMutation) AddedEdges

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

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

func (*IntegrationAttachmentMutation) AddedField

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

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

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

func (*IntegrationAttachmentMutation) AddedIDs

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

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

func (*IntegrationAttachmentMutation) ClearConfiguration

func (m *IntegrationAttachmentMutation) ClearConfiguration()

ClearConfiguration clears the value of the "configuration" field.

func (*IntegrationAttachmentMutation) ClearDeletedAt

func (m *IntegrationAttachmentMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*IntegrationAttachmentMutation) ClearEdge

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

func (m *IntegrationAttachmentMutation) 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 (*IntegrationAttachmentMutation) ClearIntegration

func (m *IntegrationAttachmentMutation) ClearIntegration()

ClearIntegration clears the "integration" edge to the Integration entity.

func (*IntegrationAttachmentMutation) ClearWorkflow

func (m *IntegrationAttachmentMutation) ClearWorkflow()

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*IntegrationAttachmentMutation) ClearedEdges

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

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

func (*IntegrationAttachmentMutation) ClearedFields

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

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

func (IntegrationAttachmentMutation) 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 (*IntegrationAttachmentMutation) Configuration

func (m *IntegrationAttachmentMutation) Configuration() (r []byte, exists bool)

Configuration returns the value of the "configuration" field in the mutation.

func (*IntegrationAttachmentMutation) ConfigurationCleared

func (m *IntegrationAttachmentMutation) ConfigurationCleared() bool

ConfigurationCleared returns if the "configuration" field was cleared in this mutation.

func (*IntegrationAttachmentMutation) CreatedAt

func (m *IntegrationAttachmentMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*IntegrationAttachmentMutation) DeletedAt

func (m *IntegrationAttachmentMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*IntegrationAttachmentMutation) DeletedAtCleared

func (m *IntegrationAttachmentMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*IntegrationAttachmentMutation) EdgeCleared

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

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

func (*IntegrationAttachmentMutation) Field

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 (*IntegrationAttachmentMutation) FieldCleared

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

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

func (*IntegrationAttachmentMutation) Fields

func (m *IntegrationAttachmentMutation) 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 (*IntegrationAttachmentMutation) ID

func (m *IntegrationAttachmentMutation) ID() (id uuid.UUID, exists bool)

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

func (*IntegrationAttachmentMutation) 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 (*IntegrationAttachmentMutation) IntegrationCleared

func (m *IntegrationAttachmentMutation) IntegrationCleared() bool

IntegrationCleared reports if the "integration" edge to the Integration entity was cleared.

func (*IntegrationAttachmentMutation) IntegrationID

func (m *IntegrationAttachmentMutation) IntegrationID() (id uuid.UUID, exists bool)

IntegrationID returns the "integration" edge ID in the mutation.

func (*IntegrationAttachmentMutation) IntegrationIDs

func (m *IntegrationAttachmentMutation) IntegrationIDs() (ids []uuid.UUID)

IntegrationIDs returns the "integration" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IntegrationID instead. It exists only for internal usage by the builders.

func (*IntegrationAttachmentMutation) OldConfiguration

func (m *IntegrationAttachmentMutation) OldConfiguration(ctx context.Context) (v []byte, err error)

OldConfiguration returns the old "configuration" field's value of the IntegrationAttachment entity. If the IntegrationAttachment 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 (*IntegrationAttachmentMutation) OldCreatedAt

func (m *IntegrationAttachmentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the IntegrationAttachment entity. If the IntegrationAttachment 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 (*IntegrationAttachmentMutation) OldDeletedAt

func (m *IntegrationAttachmentMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the IntegrationAttachment entity. If the IntegrationAttachment 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 (*IntegrationAttachmentMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*IntegrationAttachmentMutation) Op

Op returns the operation name.

func (*IntegrationAttachmentMutation) RemovedEdges

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

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

func (*IntegrationAttachmentMutation) RemovedIDs

func (m *IntegrationAttachmentMutation) 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 (*IntegrationAttachmentMutation) ResetConfiguration

func (m *IntegrationAttachmentMutation) ResetConfiguration()

ResetConfiguration resets all changes to the "configuration" field.

func (*IntegrationAttachmentMutation) ResetCreatedAt

func (m *IntegrationAttachmentMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*IntegrationAttachmentMutation) ResetDeletedAt

func (m *IntegrationAttachmentMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*IntegrationAttachmentMutation) ResetEdge

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

func (m *IntegrationAttachmentMutation) 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 (*IntegrationAttachmentMutation) ResetIntegration

func (m *IntegrationAttachmentMutation) ResetIntegration()

ResetIntegration resets all changes to the "integration" edge.

func (*IntegrationAttachmentMutation) ResetWorkflow

func (m *IntegrationAttachmentMutation) ResetWorkflow()

ResetWorkflow resets all changes to the "workflow" edge.

func (*IntegrationAttachmentMutation) SetConfiguration

func (m *IntegrationAttachmentMutation) SetConfiguration(b []byte)

SetConfiguration sets the "configuration" field.

func (*IntegrationAttachmentMutation) SetCreatedAt

func (m *IntegrationAttachmentMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*IntegrationAttachmentMutation) SetDeletedAt

func (m *IntegrationAttachmentMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*IntegrationAttachmentMutation) SetField

func (m *IntegrationAttachmentMutation) 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 (*IntegrationAttachmentMutation) SetID

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

func (*IntegrationAttachmentMutation) SetIntegrationID

func (m *IntegrationAttachmentMutation) SetIntegrationID(id uuid.UUID)

SetIntegrationID sets the "integration" edge to the Integration entity by id.

func (*IntegrationAttachmentMutation) SetOp

func (m *IntegrationAttachmentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IntegrationAttachmentMutation) SetWorkflowID

func (m *IntegrationAttachmentMutation) SetWorkflowID(id uuid.UUID)

SetWorkflowID sets the "workflow" edge to the Workflow entity by id.

func (IntegrationAttachmentMutation) Tx

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

func (*IntegrationAttachmentMutation) Type

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

func (*IntegrationAttachmentMutation) Where

Where appends a list predicates to the IntegrationAttachmentMutation builder.

func (*IntegrationAttachmentMutation) WhereP

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

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

func (*IntegrationAttachmentMutation) WorkflowCleared

func (m *IntegrationAttachmentMutation) WorkflowCleared() bool

WorkflowCleared reports if the "workflow" edge to the Workflow entity was cleared.

func (*IntegrationAttachmentMutation) WorkflowID

func (m *IntegrationAttachmentMutation) WorkflowID() (id uuid.UUID, exists bool)

WorkflowID returns the "workflow" edge ID in the mutation.

func (*IntegrationAttachmentMutation) WorkflowIDs

func (m *IntegrationAttachmentMutation) WorkflowIDs() (ids []uuid.UUID)

WorkflowIDs returns the "workflow" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorkflowID instead. It exists only for internal usage by the builders.

type IntegrationAttachmentQuery

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

IntegrationAttachmentQuery is the builder for querying IntegrationAttachment entities.

func (*IntegrationAttachmentQuery) Aggregate

Aggregate returns a IntegrationAttachmentSelect configured with the given aggregations.

func (*IntegrationAttachmentQuery) All

All executes the query and returns a list of IntegrationAttachments.

func (*IntegrationAttachmentQuery) AllX

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

func (*IntegrationAttachmentQuery) Clone

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

func (*IntegrationAttachmentQuery) Count

func (iaq *IntegrationAttachmentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IntegrationAttachmentQuery) CountX

func (iaq *IntegrationAttachmentQuery) CountX(ctx context.Context) int

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

func (*IntegrationAttachmentQuery) Exist

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

func (*IntegrationAttachmentQuery) ExistX

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

func (*IntegrationAttachmentQuery) First

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

func (*IntegrationAttachmentQuery) FirstID

func (iaq *IntegrationAttachmentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*IntegrationAttachmentQuery) FirstIDX

func (iaq *IntegrationAttachmentQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*IntegrationAttachmentQuery) FirstX

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

func (*IntegrationAttachmentQuery) ForShare added in v0.94.3

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*IntegrationAttachmentQuery) ForUpdate added in v0.94.3

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*IntegrationAttachmentQuery) GroupBy

func (iaq *IntegrationAttachmentQuery) GroupBy(field string, fields ...string) *IntegrationAttachmentGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.IntegrationAttachment.Query().
	GroupBy(integrationattachment.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IntegrationAttachmentQuery) IDs

func (iaq *IntegrationAttachmentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*IntegrationAttachmentQuery) IDsX

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

func (*IntegrationAttachmentQuery) Limit

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

func (*IntegrationAttachmentQuery) Modify

func (iaq *IntegrationAttachmentQuery) Modify(modifiers ...func(s *sql.Selector)) *IntegrationAttachmentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*IntegrationAttachmentQuery) Offset

Offset to start from.

func (*IntegrationAttachmentQuery) Only

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

func (*IntegrationAttachmentQuery) OnlyID

func (iaq *IntegrationAttachmentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*IntegrationAttachmentQuery) OnlyIDX

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

func (*IntegrationAttachmentQuery) OnlyX

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

func (*IntegrationAttachmentQuery) Order

Order specifies how the records should be ordered.

func (*IntegrationAttachmentQuery) QueryIntegration

func (iaq *IntegrationAttachmentQuery) QueryIntegration() *IntegrationQuery

QueryIntegration chains the current query on the "integration" edge.

func (*IntegrationAttachmentQuery) QueryWorkflow

func (iaq *IntegrationAttachmentQuery) QueryWorkflow() *WorkflowQuery

QueryWorkflow chains the current query on the "workflow" edge.

func (*IntegrationAttachmentQuery) 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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.IntegrationAttachment.Query().
	Select(integrationattachment.FieldCreatedAt).
	Scan(ctx, &v)

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

Where adds a new predicate for the IntegrationAttachmentQuery builder.

func (*IntegrationAttachmentQuery) WithIntegration

func (iaq *IntegrationAttachmentQuery) WithIntegration(opts ...func(*IntegrationQuery)) *IntegrationAttachmentQuery

WithIntegration tells the query-builder to eager-load the nodes that are connected to the "integration" edge. The optional arguments are used to configure the query builder of the edge.

func (*IntegrationAttachmentQuery) WithWorkflow

func (iaq *IntegrationAttachmentQuery) WithWorkflow(opts ...func(*WorkflowQuery)) *IntegrationAttachmentQuery

WithWorkflow tells the query-builder to eager-load the nodes that are connected to the "workflow" edge. The optional arguments are used to configure the query builder of the edge.

type IntegrationAttachmentSelect

type IntegrationAttachmentSelect struct {
	*IntegrationAttachmentQuery
	// contains filtered or unexported fields
}

IntegrationAttachmentSelect is the builder for selecting fields of IntegrationAttachment entities.

func (*IntegrationAttachmentSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*IntegrationAttachmentSelect) Bool

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

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

func (*IntegrationAttachmentSelect) BoolX

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

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

func (*IntegrationAttachmentSelect) Bools

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

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

func (*IntegrationAttachmentSelect) BoolsX

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

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

func (*IntegrationAttachmentSelect) Float64

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

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

func (*IntegrationAttachmentSelect) Float64X

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

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

func (*IntegrationAttachmentSelect) Float64s

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

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

func (*IntegrationAttachmentSelect) Float64sX

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

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

func (*IntegrationAttachmentSelect) Int

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

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

func (*IntegrationAttachmentSelect) IntX

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

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

func (*IntegrationAttachmentSelect) Ints

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

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

func (*IntegrationAttachmentSelect) IntsX

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

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

func (*IntegrationAttachmentSelect) Modify

func (ias *IntegrationAttachmentSelect) Modify(modifiers ...func(s *sql.Selector)) *IntegrationAttachmentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*IntegrationAttachmentSelect) Scan

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

func (*IntegrationAttachmentSelect) ScanX

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

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

func (*IntegrationAttachmentSelect) String

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

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

func (*IntegrationAttachmentSelect) StringX

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

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

func (*IntegrationAttachmentSelect) Strings

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

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

func (*IntegrationAttachmentSelect) StringsX

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

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

type IntegrationAttachmentUpdate

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

IntegrationAttachmentUpdate is the builder for updating IntegrationAttachment entities.

func (*IntegrationAttachmentUpdate) ClearConfiguration

func (iau *IntegrationAttachmentUpdate) ClearConfiguration() *IntegrationAttachmentUpdate

ClearConfiguration clears the value of the "configuration" field.

func (*IntegrationAttachmentUpdate) ClearDeletedAt

ClearDeletedAt clears the value of the "deleted_at" field.

func (*IntegrationAttachmentUpdate) ClearIntegration

ClearIntegration clears the "integration" edge to the Integration entity.

func (*IntegrationAttachmentUpdate) ClearWorkflow

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*IntegrationAttachmentUpdate) Exec

Exec executes the query.

func (*IntegrationAttachmentUpdate) ExecX

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

func (*IntegrationAttachmentUpdate) Modify

func (iau *IntegrationAttachmentUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *IntegrationAttachmentUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*IntegrationAttachmentUpdate) Mutation

Mutation returns the IntegrationAttachmentMutation object of the builder.

func (*IntegrationAttachmentUpdate) Save

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

func (*IntegrationAttachmentUpdate) SaveX

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

func (*IntegrationAttachmentUpdate) SetConfiguration

func (iau *IntegrationAttachmentUpdate) SetConfiguration(b []byte) *IntegrationAttachmentUpdate

SetConfiguration sets the "configuration" field.

func (*IntegrationAttachmentUpdate) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*IntegrationAttachmentUpdate) SetIntegration

SetIntegration sets the "integration" edge to the Integration entity.

func (*IntegrationAttachmentUpdate) SetIntegrationID

SetIntegrationID sets the "integration" edge to the Integration entity by ID.

func (*IntegrationAttachmentUpdate) SetNillableDeletedAt

func (iau *IntegrationAttachmentUpdate) SetNillableDeletedAt(t *time.Time) *IntegrationAttachmentUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*IntegrationAttachmentUpdate) SetWorkflow

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*IntegrationAttachmentUpdate) SetWorkflowID

SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.

func (*IntegrationAttachmentUpdate) Where

Where appends a list predicates to the IntegrationAttachmentUpdate builder.

type IntegrationAttachmentUpdateOne

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

IntegrationAttachmentUpdateOne is the builder for updating a single IntegrationAttachment entity.

func (*IntegrationAttachmentUpdateOne) ClearConfiguration

ClearConfiguration clears the value of the "configuration" field.

func (*IntegrationAttachmentUpdateOne) ClearDeletedAt

ClearDeletedAt clears the value of the "deleted_at" field.

func (*IntegrationAttachmentUpdateOne) ClearIntegration

ClearIntegration clears the "integration" edge to the Integration entity.

func (*IntegrationAttachmentUpdateOne) ClearWorkflow

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*IntegrationAttachmentUpdateOne) Exec

Exec executes the query on the entity.

func (*IntegrationAttachmentUpdateOne) ExecX

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

func (*IntegrationAttachmentUpdateOne) Modify

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*IntegrationAttachmentUpdateOne) Mutation

Mutation returns the IntegrationAttachmentMutation object of the builder.

func (*IntegrationAttachmentUpdateOne) Save

Save executes the query and returns the updated IntegrationAttachment entity.

func (*IntegrationAttachmentUpdateOne) SaveX

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

func (*IntegrationAttachmentUpdateOne) 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 (*IntegrationAttachmentUpdateOne) SetConfiguration

SetConfiguration sets the "configuration" field.

func (*IntegrationAttachmentUpdateOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*IntegrationAttachmentUpdateOne) SetIntegration

SetIntegration sets the "integration" edge to the Integration entity.

func (*IntegrationAttachmentUpdateOne) SetIntegrationID

SetIntegrationID sets the "integration" edge to the Integration entity by ID.

func (*IntegrationAttachmentUpdateOne) SetNillableDeletedAt

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*IntegrationAttachmentUpdateOne) SetWorkflow

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*IntegrationAttachmentUpdateOne) SetWorkflowID

SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.

func (*IntegrationAttachmentUpdateOne) Where

Where appends a list predicates to the IntegrationAttachmentUpdate builder.

type IntegrationAttachments

type IntegrationAttachments []*IntegrationAttachment

IntegrationAttachments is a parsable slice of IntegrationAttachment.

type IntegrationClient

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

IntegrationClient is a client for the Integration schema.

func NewIntegrationClient

func NewIntegrationClient(c config) *IntegrationClient

NewIntegrationClient returns a client for the Integration from the given config.

func (*IntegrationClient) Create

func (c *IntegrationClient) Create() *IntegrationCreate

Create returns a builder for creating a Integration entity.

func (*IntegrationClient) CreateBulk

func (c *IntegrationClient) CreateBulk(builders ...*IntegrationCreate) *IntegrationCreateBulk

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

func (*IntegrationClient) Delete

func (c *IntegrationClient) Delete() *IntegrationDelete

Delete returns a delete builder for Integration.

func (*IntegrationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IntegrationClient) DeleteOneID

func (c *IntegrationClient) DeleteOneID(id uuid.UUID) *IntegrationDeleteOne

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

func (*IntegrationClient) Get

Get returns a Integration entity by its id.

func (*IntegrationClient) GetX

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

func (*IntegrationClient) Hooks

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

Hooks returns the client hooks.

func (*IntegrationClient) Intercept

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

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

func (*IntegrationClient) Interceptors

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

Interceptors returns the client interceptors.

func (*IntegrationClient) MapCreateBulk added in v0.91.6

func (c *IntegrationClient) MapCreateBulk(slice any, setFunc func(*IntegrationCreate, int)) *IntegrationCreateBulk

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 (*IntegrationClient) Query

func (c *IntegrationClient) Query() *IntegrationQuery

Query returns a query builder for Integration.

func (*IntegrationClient) QueryAttachments

func (c *IntegrationClient) QueryAttachments(i *Integration) *IntegrationAttachmentQuery

QueryAttachments queries the attachments edge of a Integration.

func (*IntegrationClient) QueryOrganization

func (c *IntegrationClient) QueryOrganization(i *Integration) *OrganizationQuery

QueryOrganization queries the organization edge of a Integration.

func (*IntegrationClient) Update

func (c *IntegrationClient) Update() *IntegrationUpdate

Update returns an update builder for Integration.

func (*IntegrationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*IntegrationClient) UpdateOneID

func (c *IntegrationClient) UpdateOneID(id uuid.UUID) *IntegrationUpdateOne

UpdateOneID returns an update builder for the given id.

func (*IntegrationClient) Use

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

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

type IntegrationCreate

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

IntegrationCreate is the builder for creating a Integration entity.

func (*IntegrationCreate) AddAttachmentIDs

func (ic *IntegrationCreate) AddAttachmentIDs(ids ...uuid.UUID) *IntegrationCreate

AddAttachmentIDs adds the "attachments" edge to the IntegrationAttachment entity by IDs.

func (*IntegrationCreate) AddAttachments

func (ic *IntegrationCreate) AddAttachments(i ...*IntegrationAttachment) *IntegrationCreate

AddAttachments adds the "attachments" edges to the IntegrationAttachment entity.

func (*IntegrationCreate) Exec

func (ic *IntegrationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*IntegrationCreate) ExecX

func (ic *IntegrationCreate) ExecX(ctx context.Context)

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

func (*IntegrationCreate) Mutation

func (ic *IntegrationCreate) Mutation() *IntegrationMutation

Mutation returns the IntegrationMutation object of the builder.

func (*IntegrationCreate) Save

Save creates the Integration in the database.

func (*IntegrationCreate) SaveX

func (ic *IntegrationCreate) SaveX(ctx context.Context) *Integration

SaveX calls Save and panics if Save returns an error.

func (*IntegrationCreate) SetConfiguration

func (ic *IntegrationCreate) SetConfiguration(b []byte) *IntegrationCreate

SetConfiguration sets the "configuration" field.

func (*IntegrationCreate) SetCreatedAt

func (ic *IntegrationCreate) SetCreatedAt(t time.Time) *IntegrationCreate

SetCreatedAt sets the "created_at" field.

func (*IntegrationCreate) SetDeletedAt

func (ic *IntegrationCreate) SetDeletedAt(t time.Time) *IntegrationCreate

SetDeletedAt sets the "deleted_at" field.

func (*IntegrationCreate) SetDescription

func (ic *IntegrationCreate) SetDescription(s string) *IntegrationCreate

SetDescription sets the "description" field.

func (*IntegrationCreate) SetID

SetID sets the "id" field.

func (*IntegrationCreate) SetKind

func (ic *IntegrationCreate) SetKind(s string) *IntegrationCreate

SetKind sets the "kind" field.

func (*IntegrationCreate) SetName

func (ic *IntegrationCreate) SetName(s string) *IntegrationCreate

SetName sets the "name" field.

func (*IntegrationCreate) SetNillableCreatedAt

func (ic *IntegrationCreate) SetNillableCreatedAt(t *time.Time) *IntegrationCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IntegrationCreate) SetNillableDeletedAt

func (ic *IntegrationCreate) SetNillableDeletedAt(t *time.Time) *IntegrationCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*IntegrationCreate) SetNillableDescription

func (ic *IntegrationCreate) SetNillableDescription(s *string) *IntegrationCreate

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

func (*IntegrationCreate) SetNillableID

func (ic *IntegrationCreate) SetNillableID(u *uuid.UUID) *IntegrationCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*IntegrationCreate) SetOrganization

func (ic *IntegrationCreate) SetOrganization(o *Organization) *IntegrationCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*IntegrationCreate) SetOrganizationID

func (ic *IntegrationCreate) SetOrganizationID(id uuid.UUID) *IntegrationCreate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*IntegrationCreate) SetSecretName

func (ic *IntegrationCreate) SetSecretName(s string) *IntegrationCreate

SetSecretName sets the "secret_name" field.

type IntegrationCreateBulk

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

IntegrationCreateBulk is the builder for creating many Integration entities in bulk.

func (*IntegrationCreateBulk) Exec

func (icb *IntegrationCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IntegrationCreateBulk) ExecX

func (icb *IntegrationCreateBulk) ExecX(ctx context.Context)

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

func (*IntegrationCreateBulk) Save

func (icb *IntegrationCreateBulk) Save(ctx context.Context) ([]*Integration, error)

Save creates the Integration entities in the database.

func (*IntegrationCreateBulk) SaveX

func (icb *IntegrationCreateBulk) SaveX(ctx context.Context) []*Integration

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

type IntegrationDelete

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

IntegrationDelete is the builder for deleting a Integration entity.

func (*IntegrationDelete) Exec

func (id *IntegrationDelete) Exec(ctx context.Context) (int, error)

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

func (*IntegrationDelete) ExecX

func (id *IntegrationDelete) ExecX(ctx context.Context) int

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

func (*IntegrationDelete) Where

Where appends a list predicates to the IntegrationDelete builder.

type IntegrationDeleteOne

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

IntegrationDeleteOne is the builder for deleting a single Integration entity.

func (*IntegrationDeleteOne) Exec

func (ido *IntegrationDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*IntegrationDeleteOne) ExecX

func (ido *IntegrationDeleteOne) ExecX(ctx context.Context)

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

func (*IntegrationDeleteOne) Where

Where appends a list predicates to the IntegrationDelete builder.

type IntegrationEdges

type IntegrationEdges struct {
	// Attachments holds the value of the attachments edge.
	Attachments []*IntegrationAttachment `json:"attachments,omitempty"`
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// contains filtered or unexported fields
}

IntegrationEdges holds the relations/edges for other nodes in the graph.

func (IntegrationEdges) AttachmentsOrErr

func (e IntegrationEdges) AttachmentsOrErr() ([]*IntegrationAttachment, error)

AttachmentsOrErr returns the Attachments value or an error if the edge was not loaded in eager-loading.

func (IntegrationEdges) OrganizationOrErr

func (e IntegrationEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type IntegrationGroupBy

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

IntegrationGroupBy is the group-by builder for Integration entities.

func (*IntegrationGroupBy) Aggregate

func (igb *IntegrationGroupBy) Aggregate(fns ...AggregateFunc) *IntegrationGroupBy

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

func (*IntegrationGroupBy) Bool

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

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

func (*IntegrationGroupBy) BoolX

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

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

func (*IntegrationGroupBy) Bools

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

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

func (*IntegrationGroupBy) BoolsX

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

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

func (*IntegrationGroupBy) Float64

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

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

func (*IntegrationGroupBy) Float64X

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

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

func (*IntegrationGroupBy) Float64s

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

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

func (*IntegrationGroupBy) Float64sX

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

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

func (*IntegrationGroupBy) Int

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

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

func (*IntegrationGroupBy) IntX

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

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

func (*IntegrationGroupBy) Ints

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

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

func (*IntegrationGroupBy) IntsX

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

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

func (*IntegrationGroupBy) Scan

func (igb *IntegrationGroupBy) Scan(ctx context.Context, v any) error

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

func (*IntegrationGroupBy) ScanX

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

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

func (*IntegrationGroupBy) String

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

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

func (*IntegrationGroupBy) StringX

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

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

func (*IntegrationGroupBy) Strings

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

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

func (*IntegrationGroupBy) StringsX

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

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

type IntegrationMutation

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

IntegrationMutation represents an operation that mutates the Integration nodes in the graph.

func (*IntegrationMutation) AddAttachmentIDs

func (m *IntegrationMutation) AddAttachmentIDs(ids ...uuid.UUID)

AddAttachmentIDs adds the "attachments" edge to the IntegrationAttachment entity by ids.

func (*IntegrationMutation) AddField

func (m *IntegrationMutation) 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 (*IntegrationMutation) AddedEdges

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

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

func (*IntegrationMutation) AddedField

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

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

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

func (*IntegrationMutation) AddedIDs

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

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

func (*IntegrationMutation) AttachmentsCleared

func (m *IntegrationMutation) AttachmentsCleared() bool

AttachmentsCleared reports if the "attachments" edge to the IntegrationAttachment entity was cleared.

func (*IntegrationMutation) AttachmentsIDs

func (m *IntegrationMutation) AttachmentsIDs() (ids []uuid.UUID)

AttachmentsIDs returns the "attachments" edge IDs in the mutation.

func (*IntegrationMutation) ClearAttachments

func (m *IntegrationMutation) ClearAttachments()

ClearAttachments clears the "attachments" edge to the IntegrationAttachment entity.

func (*IntegrationMutation) ClearConfiguration

func (m *IntegrationMutation) ClearConfiguration()

ClearConfiguration clears the value of the "configuration" field.

func (*IntegrationMutation) ClearDeletedAt

func (m *IntegrationMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*IntegrationMutation) ClearDescription

func (m *IntegrationMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*IntegrationMutation) ClearEdge

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

func (m *IntegrationMutation) 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 (*IntegrationMutation) ClearOrganization

func (m *IntegrationMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*IntegrationMutation) ClearedEdges

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

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

func (*IntegrationMutation) ClearedFields

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

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

func (IntegrationMutation) Client

func (m IntegrationMutation) 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 (*IntegrationMutation) Configuration

func (m *IntegrationMutation) Configuration() (r []byte, exists bool)

Configuration returns the value of the "configuration" field in the mutation.

func (*IntegrationMutation) ConfigurationCleared

func (m *IntegrationMutation) ConfigurationCleared() bool

ConfigurationCleared returns if the "configuration" field was cleared in this mutation.

func (*IntegrationMutation) CreatedAt

func (m *IntegrationMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*IntegrationMutation) DeletedAt

func (m *IntegrationMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*IntegrationMutation) DeletedAtCleared

func (m *IntegrationMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*IntegrationMutation) Description

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

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

func (*IntegrationMutation) DescriptionCleared

func (m *IntegrationMutation) DescriptionCleared() bool

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

func (*IntegrationMutation) EdgeCleared

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

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

func (*IntegrationMutation) Field

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

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

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

func (*IntegrationMutation) Fields

func (m *IntegrationMutation) 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 (*IntegrationMutation) ID

func (m *IntegrationMutation) ID() (id uuid.UUID, exists bool)

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

func (*IntegrationMutation) IDs

func (m *IntegrationMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*IntegrationMutation) Kind

func (m *IntegrationMutation) Kind() (r string, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*IntegrationMutation) Name

func (m *IntegrationMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*IntegrationMutation) OldConfiguration

func (m *IntegrationMutation) OldConfiguration(ctx context.Context) (v []byte, err error)

OldConfiguration returns the old "configuration" field's value of the Integration entity. If the Integration 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 (*IntegrationMutation) OldCreatedAt

func (m *IntegrationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Integration entity. If the Integration 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 (*IntegrationMutation) OldDeletedAt

func (m *IntegrationMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Integration entity. If the Integration 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 (*IntegrationMutation) OldDescription

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

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

func (m *IntegrationMutation) 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 (*IntegrationMutation) OldKind

func (m *IntegrationMutation) OldKind(ctx context.Context) (v string, err error)

OldKind returns the old "kind" field's value of the Integration entity. If the Integration 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 (*IntegrationMutation) OldName

func (m *IntegrationMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Integration entity. If the Integration 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 (*IntegrationMutation) OldSecretName

func (m *IntegrationMutation) OldSecretName(ctx context.Context) (v string, err error)

OldSecretName returns the old "secret_name" field's value of the Integration entity. If the Integration 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 (*IntegrationMutation) Op

func (m *IntegrationMutation) Op() Op

Op returns the operation name.

func (*IntegrationMutation) OrganizationCleared

func (m *IntegrationMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*IntegrationMutation) OrganizationID

func (m *IntegrationMutation) OrganizationID() (id uuid.UUID, exists bool)

OrganizationID returns the "organization" edge ID in the mutation.

func (*IntegrationMutation) OrganizationIDs

func (m *IntegrationMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*IntegrationMutation) RemoveAttachmentIDs

func (m *IntegrationMutation) RemoveAttachmentIDs(ids ...uuid.UUID)

RemoveAttachmentIDs removes the "attachments" edge to the IntegrationAttachment entity by IDs.

func (*IntegrationMutation) RemovedAttachmentsIDs

func (m *IntegrationMutation) RemovedAttachmentsIDs() (ids []uuid.UUID)

RemovedAttachments returns the removed IDs of the "attachments" edge to the IntegrationAttachment entity.

func (*IntegrationMutation) RemovedEdges

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

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

func (*IntegrationMutation) RemovedIDs

func (m *IntegrationMutation) 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 (*IntegrationMutation) ResetAttachments

func (m *IntegrationMutation) ResetAttachments()

ResetAttachments resets all changes to the "attachments" edge.

func (*IntegrationMutation) ResetConfiguration

func (m *IntegrationMutation) ResetConfiguration()

ResetConfiguration resets all changes to the "configuration" field.

func (*IntegrationMutation) ResetCreatedAt

func (m *IntegrationMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*IntegrationMutation) ResetDeletedAt

func (m *IntegrationMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*IntegrationMutation) ResetDescription

func (m *IntegrationMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*IntegrationMutation) ResetEdge

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

func (m *IntegrationMutation) 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 (*IntegrationMutation) ResetKind

func (m *IntegrationMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*IntegrationMutation) ResetName

func (m *IntegrationMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*IntegrationMutation) ResetOrganization

func (m *IntegrationMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*IntegrationMutation) ResetSecretName

func (m *IntegrationMutation) ResetSecretName()

ResetSecretName resets all changes to the "secret_name" field.

func (*IntegrationMutation) SecretName

func (m *IntegrationMutation) SecretName() (r string, exists bool)

SecretName returns the value of the "secret_name" field in the mutation.

func (*IntegrationMutation) SetConfiguration

func (m *IntegrationMutation) SetConfiguration(b []byte)

SetConfiguration sets the "configuration" field.

func (*IntegrationMutation) SetCreatedAt

func (m *IntegrationMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*IntegrationMutation) SetDeletedAt

func (m *IntegrationMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*IntegrationMutation) SetDescription

func (m *IntegrationMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*IntegrationMutation) SetField

func (m *IntegrationMutation) 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 (*IntegrationMutation) SetID

func (m *IntegrationMutation) SetID(id uuid.UUID)

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

func (*IntegrationMutation) SetKind

func (m *IntegrationMutation) SetKind(s string)

SetKind sets the "kind" field.

func (*IntegrationMutation) SetName

func (m *IntegrationMutation) SetName(s string)

SetName sets the "name" field.

func (*IntegrationMutation) SetOp

func (m *IntegrationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IntegrationMutation) SetOrganizationID

func (m *IntegrationMutation) SetOrganizationID(id uuid.UUID)

SetOrganizationID sets the "organization" edge to the Organization entity by id.

func (*IntegrationMutation) SetSecretName

func (m *IntegrationMutation) SetSecretName(s string)

SetSecretName sets the "secret_name" field.

func (IntegrationMutation) Tx

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

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

func (*IntegrationMutation) Type

func (m *IntegrationMutation) Type() string

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

func (*IntegrationMutation) Where

func (m *IntegrationMutation) Where(ps ...predicate.Integration)

Where appends a list predicates to the IntegrationMutation builder.

func (*IntegrationMutation) WhereP

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

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

type IntegrationQuery

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

IntegrationQuery is the builder for querying Integration entities.

func (*IntegrationQuery) Aggregate

func (iq *IntegrationQuery) Aggregate(fns ...AggregateFunc) *IntegrationSelect

Aggregate returns a IntegrationSelect configured with the given aggregations.

func (*IntegrationQuery) All

func (iq *IntegrationQuery) All(ctx context.Context) ([]*Integration, error)

All executes the query and returns a list of Integrations.

func (*IntegrationQuery) AllX

func (iq *IntegrationQuery) AllX(ctx context.Context) []*Integration

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

func (*IntegrationQuery) Clone

func (iq *IntegrationQuery) Clone() *IntegrationQuery

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

func (*IntegrationQuery) Count

func (iq *IntegrationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IntegrationQuery) CountX

func (iq *IntegrationQuery) CountX(ctx context.Context) int

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

func (*IntegrationQuery) Exist

func (iq *IntegrationQuery) Exist(ctx context.Context) (bool, error)

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

func (*IntegrationQuery) ExistX

func (iq *IntegrationQuery) ExistX(ctx context.Context) bool

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

func (*IntegrationQuery) First

func (iq *IntegrationQuery) First(ctx context.Context) (*Integration, error)

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

func (*IntegrationQuery) FirstID

func (iq *IntegrationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*IntegrationQuery) FirstIDX

func (iq *IntegrationQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*IntegrationQuery) FirstX

func (iq *IntegrationQuery) FirstX(ctx context.Context) *Integration

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

func (*IntegrationQuery) ForShare added in v0.94.3

func (iq *IntegrationQuery) ForShare(opts ...sql.LockOption) *IntegrationQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*IntegrationQuery) ForUpdate added in v0.94.3

func (iq *IntegrationQuery) ForUpdate(opts ...sql.LockOption) *IntegrationQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*IntegrationQuery) GroupBy

func (iq *IntegrationQuery) GroupBy(field string, fields ...string) *IntegrationGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Integration.Query().
	GroupBy(integration.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IntegrationQuery) IDs

func (iq *IntegrationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*IntegrationQuery) IDsX

func (iq *IntegrationQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*IntegrationQuery) Limit

func (iq *IntegrationQuery) Limit(limit int) *IntegrationQuery

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

func (*IntegrationQuery) Modify

func (iq *IntegrationQuery) Modify(modifiers ...func(s *sql.Selector)) *IntegrationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*IntegrationQuery) Offset

func (iq *IntegrationQuery) Offset(offset int) *IntegrationQuery

Offset to start from.

func (*IntegrationQuery) Only

func (iq *IntegrationQuery) Only(ctx context.Context) (*Integration, error)

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

func (*IntegrationQuery) OnlyID

func (iq *IntegrationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*IntegrationQuery) OnlyIDX

func (iq *IntegrationQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*IntegrationQuery) OnlyX

func (iq *IntegrationQuery) OnlyX(ctx context.Context) *Integration

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

func (*IntegrationQuery) Order

Order specifies how the records should be ordered.

func (*IntegrationQuery) QueryAttachments

func (iq *IntegrationQuery) QueryAttachments() *IntegrationAttachmentQuery

QueryAttachments chains the current query on the "attachments" edge.

func (*IntegrationQuery) QueryOrganization

func (iq *IntegrationQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*IntegrationQuery) Select

func (iq *IntegrationQuery) Select(fields ...string) *IntegrationSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.Integration.Query().
	Select(integration.FieldName).
	Scan(ctx, &v)

func (*IntegrationQuery) Unique

func (iq *IntegrationQuery) Unique(unique bool) *IntegrationQuery

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

Where adds a new predicate for the IntegrationQuery builder.

func (*IntegrationQuery) WithAttachments

func (iq *IntegrationQuery) WithAttachments(opts ...func(*IntegrationAttachmentQuery)) *IntegrationQuery

WithAttachments tells the query-builder to eager-load the nodes that are connected to the "attachments" edge. The optional arguments are used to configure the query builder of the edge.

func (*IntegrationQuery) WithOrganization

func (iq *IntegrationQuery) WithOrganization(opts ...func(*OrganizationQuery)) *IntegrationQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

type IntegrationSelect

type IntegrationSelect struct {
	*IntegrationQuery
	// contains filtered or unexported fields
}

IntegrationSelect is the builder for selecting fields of Integration entities.

func (*IntegrationSelect) Aggregate

func (is *IntegrationSelect) Aggregate(fns ...AggregateFunc) *IntegrationSelect

Aggregate adds the given aggregation functions to the selector query.

func (*IntegrationSelect) Bool

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

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

func (*IntegrationSelect) BoolX

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

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

func (*IntegrationSelect) Bools

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

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

func (*IntegrationSelect) BoolsX

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

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

func (*IntegrationSelect) Float64

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

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

func (*IntegrationSelect) Float64X

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

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

func (*IntegrationSelect) Float64s

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

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

func (*IntegrationSelect) Float64sX

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

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

func (*IntegrationSelect) Int

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

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

func (*IntegrationSelect) IntX

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

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

func (*IntegrationSelect) Ints

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

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

func (*IntegrationSelect) IntsX

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

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

func (*IntegrationSelect) Modify

func (is *IntegrationSelect) Modify(modifiers ...func(s *sql.Selector)) *IntegrationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*IntegrationSelect) Scan

func (is *IntegrationSelect) Scan(ctx context.Context, v any) error

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

func (*IntegrationSelect) ScanX

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

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

func (*IntegrationSelect) String

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

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

func (*IntegrationSelect) StringX

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

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

func (*IntegrationSelect) Strings

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

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

func (*IntegrationSelect) StringsX

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

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

type IntegrationUpdate

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

IntegrationUpdate is the builder for updating Integration entities.

func (*IntegrationUpdate) AddAttachmentIDs

func (iu *IntegrationUpdate) AddAttachmentIDs(ids ...uuid.UUID) *IntegrationUpdate

AddAttachmentIDs adds the "attachments" edge to the IntegrationAttachment entity by IDs.

func (*IntegrationUpdate) AddAttachments

func (iu *IntegrationUpdate) AddAttachments(i ...*IntegrationAttachment) *IntegrationUpdate

AddAttachments adds the "attachments" edges to the IntegrationAttachment entity.

func (*IntegrationUpdate) ClearAttachments

func (iu *IntegrationUpdate) ClearAttachments() *IntegrationUpdate

ClearAttachments clears all "attachments" edges to the IntegrationAttachment entity.

func (*IntegrationUpdate) ClearConfiguration

func (iu *IntegrationUpdate) ClearConfiguration() *IntegrationUpdate

ClearConfiguration clears the value of the "configuration" field.

func (*IntegrationUpdate) ClearDeletedAt

func (iu *IntegrationUpdate) ClearDeletedAt() *IntegrationUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*IntegrationUpdate) ClearDescription

func (iu *IntegrationUpdate) ClearDescription() *IntegrationUpdate

ClearDescription clears the value of the "description" field.

func (*IntegrationUpdate) ClearOrganization

func (iu *IntegrationUpdate) ClearOrganization() *IntegrationUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*IntegrationUpdate) Exec

func (iu *IntegrationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*IntegrationUpdate) ExecX

func (iu *IntegrationUpdate) ExecX(ctx context.Context)

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

func (*IntegrationUpdate) Modify

func (iu *IntegrationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *IntegrationUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*IntegrationUpdate) Mutation

func (iu *IntegrationUpdate) Mutation() *IntegrationMutation

Mutation returns the IntegrationMutation object of the builder.

func (*IntegrationUpdate) RemoveAttachmentIDs

func (iu *IntegrationUpdate) RemoveAttachmentIDs(ids ...uuid.UUID) *IntegrationUpdate

RemoveAttachmentIDs removes the "attachments" edge to IntegrationAttachment entities by IDs.

func (*IntegrationUpdate) RemoveAttachments

func (iu *IntegrationUpdate) RemoveAttachments(i ...*IntegrationAttachment) *IntegrationUpdate

RemoveAttachments removes "attachments" edges to IntegrationAttachment entities.

func (*IntegrationUpdate) Save

func (iu *IntegrationUpdate) Save(ctx context.Context) (int, error)

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

func (*IntegrationUpdate) SaveX

func (iu *IntegrationUpdate) SaveX(ctx context.Context) int

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

func (*IntegrationUpdate) SetConfiguration

func (iu *IntegrationUpdate) SetConfiguration(b []byte) *IntegrationUpdate

SetConfiguration sets the "configuration" field.

func (*IntegrationUpdate) SetDeletedAt

func (iu *IntegrationUpdate) SetDeletedAt(t time.Time) *IntegrationUpdate

SetDeletedAt sets the "deleted_at" field.

func (*IntegrationUpdate) SetDescription

func (iu *IntegrationUpdate) SetDescription(s string) *IntegrationUpdate

SetDescription sets the "description" field.

func (*IntegrationUpdate) SetNillableDeletedAt

func (iu *IntegrationUpdate) SetNillableDeletedAt(t *time.Time) *IntegrationUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*IntegrationUpdate) SetNillableDescription

func (iu *IntegrationUpdate) SetNillableDescription(s *string) *IntegrationUpdate

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

func (*IntegrationUpdate) SetOrganization

func (iu *IntegrationUpdate) SetOrganization(o *Organization) *IntegrationUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*IntegrationUpdate) SetOrganizationID

func (iu *IntegrationUpdate) SetOrganizationID(id uuid.UUID) *IntegrationUpdate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*IntegrationUpdate) Where

Where appends a list predicates to the IntegrationUpdate builder.

type IntegrationUpdateOne

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

IntegrationUpdateOne is the builder for updating a single Integration entity.

func (*IntegrationUpdateOne) AddAttachmentIDs

func (iuo *IntegrationUpdateOne) AddAttachmentIDs(ids ...uuid.UUID) *IntegrationUpdateOne

AddAttachmentIDs adds the "attachments" edge to the IntegrationAttachment entity by IDs.

func (*IntegrationUpdateOne) AddAttachments

AddAttachments adds the "attachments" edges to the IntegrationAttachment entity.

func (*IntegrationUpdateOne) ClearAttachments

func (iuo *IntegrationUpdateOne) ClearAttachments() *IntegrationUpdateOne

ClearAttachments clears all "attachments" edges to the IntegrationAttachment entity.

func (*IntegrationUpdateOne) ClearConfiguration

func (iuo *IntegrationUpdateOne) ClearConfiguration() *IntegrationUpdateOne

ClearConfiguration clears the value of the "configuration" field.

func (*IntegrationUpdateOne) ClearDeletedAt

func (iuo *IntegrationUpdateOne) ClearDeletedAt() *IntegrationUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*IntegrationUpdateOne) ClearDescription

func (iuo *IntegrationUpdateOne) ClearDescription() *IntegrationUpdateOne

ClearDescription clears the value of the "description" field.

func (*IntegrationUpdateOne) ClearOrganization

func (iuo *IntegrationUpdateOne) ClearOrganization() *IntegrationUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*IntegrationUpdateOne) Exec

func (iuo *IntegrationUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*IntegrationUpdateOne) ExecX

func (iuo *IntegrationUpdateOne) ExecX(ctx context.Context)

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

func (*IntegrationUpdateOne) Modify

func (iuo *IntegrationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *IntegrationUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*IntegrationUpdateOne) Mutation

func (iuo *IntegrationUpdateOne) Mutation() *IntegrationMutation

Mutation returns the IntegrationMutation object of the builder.

func (*IntegrationUpdateOne) RemoveAttachmentIDs

func (iuo *IntegrationUpdateOne) RemoveAttachmentIDs(ids ...uuid.UUID) *IntegrationUpdateOne

RemoveAttachmentIDs removes the "attachments" edge to IntegrationAttachment entities by IDs.

func (*IntegrationUpdateOne) RemoveAttachments

func (iuo *IntegrationUpdateOne) RemoveAttachments(i ...*IntegrationAttachment) *IntegrationUpdateOne

RemoveAttachments removes "attachments" edges to IntegrationAttachment entities.

func (*IntegrationUpdateOne) Save

Save executes the query and returns the updated Integration entity.

func (*IntegrationUpdateOne) SaveX

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

func (*IntegrationUpdateOne) Select

func (iuo *IntegrationUpdateOne) Select(field string, fields ...string) *IntegrationUpdateOne

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

func (*IntegrationUpdateOne) SetConfiguration

func (iuo *IntegrationUpdateOne) SetConfiguration(b []byte) *IntegrationUpdateOne

SetConfiguration sets the "configuration" field.

func (*IntegrationUpdateOne) SetDeletedAt

func (iuo *IntegrationUpdateOne) SetDeletedAt(t time.Time) *IntegrationUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*IntegrationUpdateOne) SetDescription

func (iuo *IntegrationUpdateOne) SetDescription(s string) *IntegrationUpdateOne

SetDescription sets the "description" field.

func (*IntegrationUpdateOne) SetNillableDeletedAt

func (iuo *IntegrationUpdateOne) SetNillableDeletedAt(t *time.Time) *IntegrationUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*IntegrationUpdateOne) SetNillableDescription

func (iuo *IntegrationUpdateOne) SetNillableDescription(s *string) *IntegrationUpdateOne

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

func (*IntegrationUpdateOne) SetOrganization

func (iuo *IntegrationUpdateOne) SetOrganization(o *Organization) *IntegrationUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*IntegrationUpdateOne) SetOrganizationID

func (iuo *IntegrationUpdateOne) SetOrganizationID(id uuid.UUID) *IntegrationUpdateOne

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*IntegrationUpdateOne) Where

Where appends a list predicates to the IntegrationUpdate builder.

type Integrations

type Integrations []*Integration

Integrations is a parsable slice of Integration.

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 Membership

type Membership struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Current holds the value of the "current" field.
	Current bool `json:"current,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Role holds the value of the "role" field.
	Role authz.Role `json:"role,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MembershipQuery when eager-loading is set.
	Edges MembershipEdges `json:"edges"`
	// contains filtered or unexported fields
}

Membership is the model entity for the Membership schema.

func (*Membership) QueryOrganization

func (m *Membership) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the Membership entity.

func (*Membership) QueryUser

func (m *Membership) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Membership entity.

func (*Membership) String

func (m *Membership) String() string

String implements the fmt.Stringer.

func (*Membership) Unwrap

func (m *Membership) Unwrap() *Membership

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

func (m *Membership) Update() *MembershipUpdateOne

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

func (*Membership) Value

func (m *Membership) Value(name string) (ent.Value, error)

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

type MembershipClient

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

MembershipClient is a client for the Membership schema.

func NewMembershipClient

func NewMembershipClient(c config) *MembershipClient

NewMembershipClient returns a client for the Membership from the given config.

func (*MembershipClient) Create

func (c *MembershipClient) Create() *MembershipCreate

Create returns a builder for creating a Membership entity.

func (*MembershipClient) CreateBulk

func (c *MembershipClient) CreateBulk(builders ...*MembershipCreate) *MembershipCreateBulk

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

func (*MembershipClient) Delete

func (c *MembershipClient) Delete() *MembershipDelete

Delete returns a delete builder for Membership.

func (*MembershipClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MembershipClient) DeleteOneID

func (c *MembershipClient) DeleteOneID(id uuid.UUID) *MembershipDeleteOne

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

func (*MembershipClient) Get

Get returns a Membership entity by its id.

func (*MembershipClient) GetX

func (c *MembershipClient) GetX(ctx context.Context, id uuid.UUID) *Membership

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

func (*MembershipClient) Hooks

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

Hooks returns the client hooks.

func (*MembershipClient) Intercept

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

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

func (*MembershipClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MembershipClient) MapCreateBulk added in v0.91.6

func (c *MembershipClient) MapCreateBulk(slice any, setFunc func(*MembershipCreate, int)) *MembershipCreateBulk

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 (*MembershipClient) Query

func (c *MembershipClient) Query() *MembershipQuery

Query returns a query builder for Membership.

func (*MembershipClient) QueryOrganization

func (c *MembershipClient) QueryOrganization(m *Membership) *OrganizationQuery

QueryOrganization queries the organization edge of a Membership.

func (*MembershipClient) QueryUser

func (c *MembershipClient) QueryUser(m *Membership) *UserQuery

QueryUser queries the user edge of a Membership.

func (*MembershipClient) Update

func (c *MembershipClient) Update() *MembershipUpdate

Update returns an update builder for Membership.

func (*MembershipClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MembershipClient) UpdateOneID

func (c *MembershipClient) UpdateOneID(id uuid.UUID) *MembershipUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MembershipClient) Use

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

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

type MembershipCreate

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

MembershipCreate is the builder for creating a Membership entity.

func (*MembershipCreate) Exec

func (mc *MembershipCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MembershipCreate) ExecX

func (mc *MembershipCreate) ExecX(ctx context.Context)

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

func (*MembershipCreate) Mutation

func (mc *MembershipCreate) Mutation() *MembershipMutation

Mutation returns the MembershipMutation object of the builder.

func (*MembershipCreate) Save

func (mc *MembershipCreate) Save(ctx context.Context) (*Membership, error)

Save creates the Membership in the database.

func (*MembershipCreate) SaveX

func (mc *MembershipCreate) SaveX(ctx context.Context) *Membership

SaveX calls Save and panics if Save returns an error.

func (*MembershipCreate) SetCreatedAt

func (mc *MembershipCreate) SetCreatedAt(t time.Time) *MembershipCreate

SetCreatedAt sets the "created_at" field.

func (*MembershipCreate) SetCurrent

func (mc *MembershipCreate) SetCurrent(b bool) *MembershipCreate

SetCurrent sets the "current" field.

func (*MembershipCreate) SetID

SetID sets the "id" field.

func (*MembershipCreate) SetNillableCreatedAt

func (mc *MembershipCreate) SetNillableCreatedAt(t *time.Time) *MembershipCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*MembershipCreate) SetNillableCurrent

func (mc *MembershipCreate) SetNillableCurrent(b *bool) *MembershipCreate

SetNillableCurrent sets the "current" field if the given value is not nil.

func (*MembershipCreate) SetNillableID

func (mc *MembershipCreate) SetNillableID(u *uuid.UUID) *MembershipCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*MembershipCreate) SetNillableUpdatedAt

func (mc *MembershipCreate) SetNillableUpdatedAt(t *time.Time) *MembershipCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MembershipCreate) SetOrganization

func (mc *MembershipCreate) SetOrganization(o *Organization) *MembershipCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*MembershipCreate) SetOrganizationID

func (mc *MembershipCreate) SetOrganizationID(id uuid.UUID) *MembershipCreate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*MembershipCreate) SetRole

func (mc *MembershipCreate) SetRole(a authz.Role) *MembershipCreate

SetRole sets the "role" field.

func (*MembershipCreate) SetUpdatedAt

func (mc *MembershipCreate) SetUpdatedAt(t time.Time) *MembershipCreate

SetUpdatedAt sets the "updated_at" field.

func (*MembershipCreate) SetUser

func (mc *MembershipCreate) SetUser(u *User) *MembershipCreate

SetUser sets the "user" edge to the User entity.

func (*MembershipCreate) SetUserID

func (mc *MembershipCreate) SetUserID(id uuid.UUID) *MembershipCreate

SetUserID sets the "user" edge to the User entity by ID.

type MembershipCreateBulk

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

MembershipCreateBulk is the builder for creating many Membership entities in bulk.

func (*MembershipCreateBulk) Exec

func (mcb *MembershipCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MembershipCreateBulk) ExecX

func (mcb *MembershipCreateBulk) ExecX(ctx context.Context)

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

func (*MembershipCreateBulk) Save

func (mcb *MembershipCreateBulk) Save(ctx context.Context) ([]*Membership, error)

Save creates the Membership entities in the database.

func (*MembershipCreateBulk) SaveX

func (mcb *MembershipCreateBulk) SaveX(ctx context.Context) []*Membership

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

type MembershipDelete

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

MembershipDelete is the builder for deleting a Membership entity.

func (*MembershipDelete) Exec

func (md *MembershipDelete) Exec(ctx context.Context) (int, error)

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

func (*MembershipDelete) ExecX

func (md *MembershipDelete) ExecX(ctx context.Context) int

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

func (*MembershipDelete) Where

Where appends a list predicates to the MembershipDelete builder.

type MembershipDeleteOne

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

MembershipDeleteOne is the builder for deleting a single Membership entity.

func (*MembershipDeleteOne) Exec

func (mdo *MembershipDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MembershipDeleteOne) ExecX

func (mdo *MembershipDeleteOne) ExecX(ctx context.Context)

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

func (*MembershipDeleteOne) Where

Where appends a list predicates to the MembershipDelete builder.

type MembershipEdges

type MembershipEdges struct {
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

MembershipEdges holds the relations/edges for other nodes in the graph.

func (MembershipEdges) OrganizationOrErr

func (e MembershipEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (MembershipEdges) UserOrErr

func (e MembershipEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MembershipGroupBy

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

MembershipGroupBy is the group-by builder for Membership entities.

func (*MembershipGroupBy) Aggregate

func (mgb *MembershipGroupBy) Aggregate(fns ...AggregateFunc) *MembershipGroupBy

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

func (*MembershipGroupBy) Bool

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

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

func (*MembershipGroupBy) BoolX

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

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

func (*MembershipGroupBy) Bools

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

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

func (*MembershipGroupBy) BoolsX

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

BoolsX is like Bools, but panics if an error occurs.

func (*MembershipGroupBy) Float64

func (s *MembershipGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MembershipGroupBy) Float64X

func (s *MembershipGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MembershipGroupBy) Float64s

func (s *MembershipGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MembershipGroupBy) Float64sX

func (s *MembershipGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MembershipGroupBy) Int

func (s *MembershipGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MembershipGroupBy) IntX

func (s *MembershipGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MembershipGroupBy) Ints

func (s *MembershipGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MembershipGroupBy) IntsX

func (s *MembershipGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MembershipGroupBy) Scan

func (mgb *MembershipGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MembershipGroupBy) ScanX

func (s *MembershipGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MembershipGroupBy) String

func (s *MembershipGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MembershipGroupBy) StringX

func (s *MembershipGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MembershipGroupBy) Strings

func (s *MembershipGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MembershipGroupBy) StringsX

func (s *MembershipGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MembershipMutation

type MembershipMutation struct {
	// contains filtered or unexported fields
}

MembershipMutation represents an operation that mutates the Membership nodes in the graph.

func (*MembershipMutation) AddField

func (m *MembershipMutation) 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 (*MembershipMutation) AddedEdges

func (m *MembershipMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MembershipMutation) AddedField

func (m *MembershipMutation) 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 (*MembershipMutation) AddedFields

func (m *MembershipMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MembershipMutation) AddedIDs

func (m *MembershipMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MembershipMutation) ClearEdge

func (m *MembershipMutation) 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 (*MembershipMutation) ClearField

func (m *MembershipMutation) 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 (*MembershipMutation) ClearOrganization

func (m *MembershipMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*MembershipMutation) ClearUser

func (m *MembershipMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*MembershipMutation) ClearedEdges

func (m *MembershipMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MembershipMutation) ClearedFields

func (m *MembershipMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MembershipMutation) Client

func (m MembershipMutation) 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 (*MembershipMutation) CreatedAt

func (m *MembershipMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*MembershipMutation) Current

func (m *MembershipMutation) Current() (r bool, exists bool)

Current returns the value of the "current" field in the mutation.

func (*MembershipMutation) EdgeCleared

func (m *MembershipMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MembershipMutation) Field

func (m *MembershipMutation) 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 (*MembershipMutation) FieldCleared

func (m *MembershipMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MembershipMutation) Fields

func (m *MembershipMutation) 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 (*MembershipMutation) ID

func (m *MembershipMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MembershipMutation) IDs

func (m *MembershipMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*MembershipMutation) OldCreatedAt

func (m *MembershipMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) OldCurrent

func (m *MembershipMutation) OldCurrent(ctx context.Context) (v bool, err error)

OldCurrent returns the old "current" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) OldField

func (m *MembershipMutation) 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 (*MembershipMutation) OldRole

func (m *MembershipMutation) OldRole(ctx context.Context) (v authz.Role, err error)

OldRole returns the old "role" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) OldUpdatedAt

func (m *MembershipMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) Op

func (m *MembershipMutation) Op() Op

Op returns the operation name.

func (*MembershipMutation) OrganizationCleared

func (m *MembershipMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*MembershipMutation) OrganizationID

func (m *MembershipMutation) OrganizationID() (id uuid.UUID, exists bool)

OrganizationID returns the "organization" edge ID in the mutation.

func (*MembershipMutation) OrganizationIDs

func (m *MembershipMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*MembershipMutation) RemovedEdges

func (m *MembershipMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MembershipMutation) RemovedIDs

func (m *MembershipMutation) 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 (*MembershipMutation) ResetCreatedAt

func (m *MembershipMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MembershipMutation) ResetCurrent

func (m *MembershipMutation) ResetCurrent()

ResetCurrent resets all changes to the "current" field.

func (*MembershipMutation) ResetEdge

func (m *MembershipMutation) 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 (*MembershipMutation) ResetField

func (m *MembershipMutation) 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 (*MembershipMutation) ResetOrganization

func (m *MembershipMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*MembershipMutation) ResetRole

func (m *MembershipMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*MembershipMutation) ResetUpdatedAt

func (m *MembershipMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MembershipMutation) ResetUser

func (m *MembershipMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*MembershipMutation) Role

func (m *MembershipMutation) Role() (r authz.Role, exists bool)

Role returns the value of the "role" field in the mutation.

func (*MembershipMutation) SetCreatedAt

func (m *MembershipMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*MembershipMutation) SetCurrent

func (m *MembershipMutation) SetCurrent(b bool)

SetCurrent sets the "current" field.

func (*MembershipMutation) SetField

func (m *MembershipMutation) 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 (*MembershipMutation) SetID

func (m *MembershipMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Membership entities.

func (*MembershipMutation) SetOp

func (m *MembershipMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MembershipMutation) SetOrganizationID

func (m *MembershipMutation) SetOrganizationID(id uuid.UUID)

SetOrganizationID sets the "organization" edge to the Organization entity by id.

func (*MembershipMutation) SetRole

func (m *MembershipMutation) SetRole(a authz.Role)

SetRole sets the "role" field.

func (*MembershipMutation) SetUpdatedAt

func (m *MembershipMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*MembershipMutation) SetUserID

func (m *MembershipMutation) SetUserID(id uuid.UUID)

SetUserID sets the "user" edge to the User entity by id.

func (MembershipMutation) Tx

func (m MembershipMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MembershipMutation) Type

func (m *MembershipMutation) Type() string

Type returns the node type of this mutation (Membership).

func (*MembershipMutation) UpdatedAt

func (m *MembershipMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*MembershipMutation) UserCleared

func (m *MembershipMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*MembershipMutation) UserID

func (m *MembershipMutation) UserID() (id uuid.UUID, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*MembershipMutation) UserIDs

func (m *MembershipMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*MembershipMutation) Where

func (m *MembershipMutation) Where(ps ...predicate.Membership)

Where appends a list predicates to the MembershipMutation builder.

func (*MembershipMutation) WhereP

func (m *MembershipMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MembershipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MembershipQuery

type MembershipQuery struct {
	// contains filtered or unexported fields
}

MembershipQuery is the builder for querying Membership entities.

func (*MembershipQuery) Aggregate

func (mq *MembershipQuery) Aggregate(fns ...AggregateFunc) *MembershipSelect

Aggregate returns a MembershipSelect configured with the given aggregations.

func (*MembershipQuery) All

func (mq *MembershipQuery) All(ctx context.Context) ([]*Membership, error)

All executes the query and returns a list of Memberships.

func (*MembershipQuery) AllX

func (mq *MembershipQuery) AllX(ctx context.Context) []*Membership

AllX is like All, but panics if an error occurs.

func (*MembershipQuery) Clone

func (mq *MembershipQuery) Clone() *MembershipQuery

Clone returns a duplicate of the MembershipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MembershipQuery) Count

func (mq *MembershipQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MembershipQuery) CountX

func (mq *MembershipQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MembershipQuery) Exist

func (mq *MembershipQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MembershipQuery) ExistX

func (mq *MembershipQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MembershipQuery) First

func (mq *MembershipQuery) First(ctx context.Context) (*Membership, error)

First returns the first Membership entity from the query. Returns a *NotFoundError when no Membership was found.

func (*MembershipQuery) FirstID

func (mq *MembershipQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Membership ID from the query. Returns a *NotFoundError when no Membership ID was found.

func (*MembershipQuery) FirstIDX

func (mq *MembershipQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*MembershipQuery) FirstX

func (mq *MembershipQuery) FirstX(ctx context.Context) *Membership

FirstX is like First, but panics if an error occurs.

func (*MembershipQuery) ForShare added in v0.94.3

func (mq *MembershipQuery) ForShare(opts ...sql.LockOption) *MembershipQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*MembershipQuery) ForUpdate added in v0.94.3

func (mq *MembershipQuery) ForUpdate(opts ...sql.LockOption) *MembershipQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*MembershipQuery) GroupBy

func (mq *MembershipQuery) GroupBy(field string, fields ...string) *MembershipGroupBy

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 {
	Current bool `json:"current,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Membership.Query().
	GroupBy(membership.FieldCurrent).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MembershipQuery) IDs

func (mq *MembershipQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Membership IDs.

func (*MembershipQuery) IDsX

func (mq *MembershipQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*MembershipQuery) Limit

func (mq *MembershipQuery) Limit(limit int) *MembershipQuery

Limit the number of records to be returned by this query.

func (*MembershipQuery) Modify

func (mq *MembershipQuery) Modify(modifiers ...func(s *sql.Selector)) *MembershipSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MembershipQuery) Offset

func (mq *MembershipQuery) Offset(offset int) *MembershipQuery

Offset to start from.

func (*MembershipQuery) Only

func (mq *MembershipQuery) Only(ctx context.Context) (*Membership, error)

Only returns a single Membership entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Membership entity is found. Returns a *NotFoundError when no Membership entities are found.

func (*MembershipQuery) OnlyID

func (mq *MembershipQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Membership ID in the query. Returns a *NotSingularError when more than one Membership ID is found. Returns a *NotFoundError when no entities are found.

func (*MembershipQuery) OnlyIDX

func (mq *MembershipQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MembershipQuery) OnlyX

func (mq *MembershipQuery) OnlyX(ctx context.Context) *Membership

OnlyX is like Only, but panics if an error occurs.

func (*MembershipQuery) Order

Order specifies how the records should be ordered.

func (*MembershipQuery) QueryOrganization

func (mq *MembershipQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*MembershipQuery) QueryUser

func (mq *MembershipQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*MembershipQuery) Select

func (mq *MembershipQuery) Select(fields ...string) *MembershipSelect

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 {
	Current bool `json:"current,omitempty"`
}

client.Membership.Query().
	Select(membership.FieldCurrent).
	Scan(ctx, &v)

func (*MembershipQuery) Unique

func (mq *MembershipQuery) Unique(unique bool) *MembershipQuery

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 (*MembershipQuery) Where

Where adds a new predicate for the MembershipQuery builder.

func (*MembershipQuery) WithOrganization

func (mq *MembershipQuery) WithOrganization(opts ...func(*OrganizationQuery)) *MembershipQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

func (*MembershipQuery) WithUser

func (mq *MembershipQuery) WithUser(opts ...func(*UserQuery)) *MembershipQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type MembershipSelect

type MembershipSelect struct {
	*MembershipQuery
	// contains filtered or unexported fields
}

MembershipSelect is the builder for selecting fields of Membership entities.

func (*MembershipSelect) Aggregate

func (ms *MembershipSelect) Aggregate(fns ...AggregateFunc) *MembershipSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MembershipSelect) Bool

func (s *MembershipSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MembershipSelect) BoolX

func (s *MembershipSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MembershipSelect) Bools

func (s *MembershipSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MembershipSelect) BoolsX

func (s *MembershipSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MembershipSelect) Float64

func (s *MembershipSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MembershipSelect) Float64X

func (s *MembershipSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MembershipSelect) Float64s

func (s *MembershipSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MembershipSelect) Float64sX

func (s *MembershipSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MembershipSelect) Int

func (s *MembershipSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MembershipSelect) IntX

func (s *MembershipSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MembershipSelect) Ints

func (s *MembershipSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MembershipSelect) IntsX

func (s *MembershipSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MembershipSelect) Modify

func (ms *MembershipSelect) Modify(modifiers ...func(s *sql.Selector)) *MembershipSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MembershipSelect) Scan

func (ms *MembershipSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MembershipSelect) ScanX

func (s *MembershipSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MembershipSelect) String

func (s *MembershipSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MembershipSelect) StringX

func (s *MembershipSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MembershipSelect) Strings

func (s *MembershipSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MembershipSelect) StringsX

func (s *MembershipSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MembershipUpdate

type MembershipUpdate struct {
	// contains filtered or unexported fields
}

MembershipUpdate is the builder for updating Membership entities.

func (*MembershipUpdate) ClearOrganization

func (mu *MembershipUpdate) ClearOrganization() *MembershipUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*MembershipUpdate) ClearUser

func (mu *MembershipUpdate) ClearUser() *MembershipUpdate

ClearUser clears the "user" edge to the User entity.

func (*MembershipUpdate) Exec

func (mu *MembershipUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MembershipUpdate) ExecX

func (mu *MembershipUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MembershipUpdate) Modify

func (mu *MembershipUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MembershipUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MembershipUpdate) Mutation

func (mu *MembershipUpdate) Mutation() *MembershipMutation

Mutation returns the MembershipMutation object of the builder.

func (*MembershipUpdate) Save

func (mu *MembershipUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MembershipUpdate) SaveX

func (mu *MembershipUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MembershipUpdate) SetCurrent

func (mu *MembershipUpdate) SetCurrent(b bool) *MembershipUpdate

SetCurrent sets the "current" field.

func (*MembershipUpdate) SetNillableCurrent

func (mu *MembershipUpdate) SetNillableCurrent(b *bool) *MembershipUpdate

SetNillableCurrent sets the "current" field if the given value is not nil.

func (*MembershipUpdate) SetNillableRole added in v0.91.6

func (mu *MembershipUpdate) SetNillableRole(a *authz.Role) *MembershipUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*MembershipUpdate) SetNillableUpdatedAt

func (mu *MembershipUpdate) SetNillableUpdatedAt(t *time.Time) *MembershipUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MembershipUpdate) SetOrganization

func (mu *MembershipUpdate) SetOrganization(o *Organization) *MembershipUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*MembershipUpdate) SetOrganizationID

func (mu *MembershipUpdate) SetOrganizationID(id uuid.UUID) *MembershipUpdate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*MembershipUpdate) SetRole

func (mu *MembershipUpdate) SetRole(a authz.Role) *MembershipUpdate

SetRole sets the "role" field.

func (*MembershipUpdate) SetUpdatedAt

func (mu *MembershipUpdate) SetUpdatedAt(t time.Time) *MembershipUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MembershipUpdate) SetUser

func (mu *MembershipUpdate) SetUser(u *User) *MembershipUpdate

SetUser sets the "user" edge to the User entity.

func (*MembershipUpdate) SetUserID

func (mu *MembershipUpdate) SetUserID(id uuid.UUID) *MembershipUpdate

SetUserID sets the "user" edge to the User entity by ID.

func (*MembershipUpdate) Where

Where appends a list predicates to the MembershipUpdate builder.

type MembershipUpdateOne

type MembershipUpdateOne struct {
	// contains filtered or unexported fields
}

MembershipUpdateOne is the builder for updating a single Membership entity.

func (*MembershipUpdateOne) ClearOrganization

func (muo *MembershipUpdateOne) ClearOrganization() *MembershipUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*MembershipUpdateOne) ClearUser

func (muo *MembershipUpdateOne) ClearUser() *MembershipUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*MembershipUpdateOne) Exec

func (muo *MembershipUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MembershipUpdateOne) ExecX

func (muo *MembershipUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MembershipUpdateOne) Modify

func (muo *MembershipUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MembershipUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MembershipUpdateOne) Mutation

func (muo *MembershipUpdateOne) Mutation() *MembershipMutation

Mutation returns the MembershipMutation object of the builder.

func (*MembershipUpdateOne) Save

func (muo *MembershipUpdateOne) Save(ctx context.Context) (*Membership, error)

Save executes the query and returns the updated Membership entity.

func (*MembershipUpdateOne) SaveX

func (muo *MembershipUpdateOne) SaveX(ctx context.Context) *Membership

SaveX is like Save, but panics if an error occurs.

func (*MembershipUpdateOne) Select

func (muo *MembershipUpdateOne) Select(field string, fields ...string) *MembershipUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MembershipUpdateOne) SetCurrent

func (muo *MembershipUpdateOne) SetCurrent(b bool) *MembershipUpdateOne

SetCurrent sets the "current" field.

func (*MembershipUpdateOne) SetNillableCurrent

func (muo *MembershipUpdateOne) SetNillableCurrent(b *bool) *MembershipUpdateOne

SetNillableCurrent sets the "current" field if the given value is not nil.

func (*MembershipUpdateOne) SetNillableRole added in v0.91.6

func (muo *MembershipUpdateOne) SetNillableRole(a *authz.Role) *MembershipUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*MembershipUpdateOne) SetNillableUpdatedAt

func (muo *MembershipUpdateOne) SetNillableUpdatedAt(t *time.Time) *MembershipUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MembershipUpdateOne) SetOrganization

func (muo *MembershipUpdateOne) SetOrganization(o *Organization) *MembershipUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*MembershipUpdateOne) SetOrganizationID

func (muo *MembershipUpdateOne) SetOrganizationID(id uuid.UUID) *MembershipUpdateOne

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*MembershipUpdateOne) SetRole

SetRole sets the "role" field.

func (*MembershipUpdateOne) SetUpdatedAt

func (muo *MembershipUpdateOne) SetUpdatedAt(t time.Time) *MembershipUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MembershipUpdateOne) SetUser

func (muo *MembershipUpdateOne) SetUser(u *User) *MembershipUpdateOne

SetUser sets the "user" edge to the User entity.

func (*MembershipUpdateOne) SetUserID

func (muo *MembershipUpdateOne) SetUserID(id uuid.UUID) *MembershipUpdateOne

SetUserID sets the "user" edge to the User entity by ID.

func (*MembershipUpdateOne) Where

Where appends a list predicates to the MembershipUpdate builder.

type Memberships

type Memberships []*Membership

Memberships is a parsable slice of Membership.

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 OrgInvitation

type OrgInvitation struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ReceiverEmail holds the value of the "receiver_email" field.
	ReceiverEmail string `json:"receiver_email,omitempty"`
	// Status holds the value of the "status" field.
	Status biz.OrgInvitationStatus `json:"status,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// OrganizationID holds the value of the "organization_id" field.
	OrganizationID uuid.UUID `json:"organization_id,omitempty"`
	// SenderID holds the value of the "sender_id" field.
	SenderID uuid.UUID `json:"sender_id,omitempty"`
	// Role holds the value of the "role" field.
	Role authz.Role `json:"role,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgInvitationQuery when eager-loading is set.
	Edges OrgInvitationEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgInvitation is the model entity for the OrgInvitation schema.

func (*OrgInvitation) QueryOrganization

func (oi *OrgInvitation) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the OrgInvitation entity.

func (*OrgInvitation) QuerySender

func (oi *OrgInvitation) QuerySender() *UserQuery

QuerySender queries the "sender" edge of the OrgInvitation entity.

func (*OrgInvitation) String

func (oi *OrgInvitation) String() string

String implements the fmt.Stringer.

func (*OrgInvitation) Unwrap

func (oi *OrgInvitation) Unwrap() *OrgInvitation

Unwrap unwraps the OrgInvitation 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 (*OrgInvitation) Update

func (oi *OrgInvitation) Update() *OrgInvitationUpdateOne

Update returns a builder for updating this OrgInvitation. Note that you need to call OrgInvitation.Unwrap() before calling this method if this OrgInvitation was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgInvitation) Value

func (oi *OrgInvitation) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgInvitation. This includes values selected through modifiers, order, etc.

type OrgInvitationClient

type OrgInvitationClient struct {
	// contains filtered or unexported fields
}

OrgInvitationClient is a client for the OrgInvitation schema.

func NewOrgInvitationClient

func NewOrgInvitationClient(c config) *OrgInvitationClient

NewOrgInvitationClient returns a client for the OrgInvitation from the given config.

func (*OrgInvitationClient) Create

Create returns a builder for creating a OrgInvitation entity.

func (*OrgInvitationClient) CreateBulk

CreateBulk returns a builder for creating a bulk of OrgInvitation entities.

func (*OrgInvitationClient) Delete

Delete returns a delete builder for OrgInvitation.

func (*OrgInvitationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgInvitationClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgInvitationClient) Get

Get returns a OrgInvitation entity by its id.

func (*OrgInvitationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*OrgInvitationClient) Hooks

func (c *OrgInvitationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgInvitationClient) Intercept

func (c *OrgInvitationClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orginvitation.Intercept(f(g(h())))`.

func (*OrgInvitationClient) Interceptors

func (c *OrgInvitationClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgInvitationClient) MapCreateBulk added in v0.91.6

func (c *OrgInvitationClient) MapCreateBulk(slice any, setFunc func(*OrgInvitationCreate, int)) *OrgInvitationCreateBulk

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 (*OrgInvitationClient) Query

Query returns a query builder for OrgInvitation.

func (*OrgInvitationClient) QueryOrganization

func (c *OrgInvitationClient) QueryOrganization(oi *OrgInvitation) *OrganizationQuery

QueryOrganization queries the organization edge of a OrgInvitation.

func (*OrgInvitationClient) QuerySender

func (c *OrgInvitationClient) QuerySender(oi *OrgInvitation) *UserQuery

QuerySender queries the sender edge of a OrgInvitation.

func (*OrgInvitationClient) Update

Update returns an update builder for OrgInvitation.

func (*OrgInvitationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgInvitationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*OrgInvitationClient) Use

func (c *OrgInvitationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orginvitation.Hooks(f(g(h())))`.

type OrgInvitationCreate

type OrgInvitationCreate struct {
	// contains filtered or unexported fields
}

OrgInvitationCreate is the builder for creating a OrgInvitation entity.

func (*OrgInvitationCreate) Exec

func (oic *OrgInvitationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgInvitationCreate) ExecX

func (oic *OrgInvitationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgInvitationCreate) Mutation

func (oic *OrgInvitationCreate) Mutation() *OrgInvitationMutation

Mutation returns the OrgInvitationMutation object of the builder.

func (*OrgInvitationCreate) Save

Save creates the OrgInvitation in the database.

func (*OrgInvitationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OrgInvitationCreate) SetCreatedAt

func (oic *OrgInvitationCreate) SetCreatedAt(t time.Time) *OrgInvitationCreate

SetCreatedAt sets the "created_at" field.

func (*OrgInvitationCreate) SetDeletedAt

func (oic *OrgInvitationCreate) SetDeletedAt(t time.Time) *OrgInvitationCreate

SetDeletedAt sets the "deleted_at" field.

func (*OrgInvitationCreate) SetID

SetID sets the "id" field.

func (*OrgInvitationCreate) SetNillableCreatedAt

func (oic *OrgInvitationCreate) SetNillableCreatedAt(t *time.Time) *OrgInvitationCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrgInvitationCreate) SetNillableDeletedAt

func (oic *OrgInvitationCreate) SetNillableDeletedAt(t *time.Time) *OrgInvitationCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*OrgInvitationCreate) SetNillableID

func (oic *OrgInvitationCreate) SetNillableID(u *uuid.UUID) *OrgInvitationCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OrgInvitationCreate) SetNillableRole

func (oic *OrgInvitationCreate) SetNillableRole(a *authz.Role) *OrgInvitationCreate

SetNillableRole sets the "role" field if the given value is not nil.

func (*OrgInvitationCreate) SetNillableStatus

func (oic *OrgInvitationCreate) SetNillableStatus(bis *biz.OrgInvitationStatus) *OrgInvitationCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OrgInvitationCreate) SetOrganization

func (oic *OrgInvitationCreate) SetOrganization(o *Organization) *OrgInvitationCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*OrgInvitationCreate) SetOrganizationID

func (oic *OrgInvitationCreate) SetOrganizationID(u uuid.UUID) *OrgInvitationCreate

SetOrganizationID sets the "organization_id" field.

func (*OrgInvitationCreate) SetReceiverEmail

func (oic *OrgInvitationCreate) SetReceiverEmail(s string) *OrgInvitationCreate

SetReceiverEmail sets the "receiver_email" field.

func (*OrgInvitationCreate) SetRole

SetRole sets the "role" field.

func (*OrgInvitationCreate) SetSender

func (oic *OrgInvitationCreate) SetSender(u *User) *OrgInvitationCreate

SetSender sets the "sender" edge to the User entity.

func (*OrgInvitationCreate) SetSenderID

func (oic *OrgInvitationCreate) SetSenderID(u uuid.UUID) *OrgInvitationCreate

SetSenderID sets the "sender_id" field.

func (*OrgInvitationCreate) SetStatus

SetStatus sets the "status" field.

type OrgInvitationCreateBulk

type OrgInvitationCreateBulk struct {
	// contains filtered or unexported fields
}

OrgInvitationCreateBulk is the builder for creating many OrgInvitation entities in bulk.

func (*OrgInvitationCreateBulk) Exec

func (oicb *OrgInvitationCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgInvitationCreateBulk) ExecX

func (oicb *OrgInvitationCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgInvitationCreateBulk) Save

Save creates the OrgInvitation entities in the database.

func (*OrgInvitationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type OrgInvitationDelete

type OrgInvitationDelete struct {
	// contains filtered or unexported fields
}

OrgInvitationDelete is the builder for deleting a OrgInvitation entity.

func (*OrgInvitationDelete) Exec

func (oid *OrgInvitationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgInvitationDelete) ExecX

func (oid *OrgInvitationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgInvitationDelete) Where

Where appends a list predicates to the OrgInvitationDelete builder.

type OrgInvitationDeleteOne

type OrgInvitationDeleteOne struct {
	// contains filtered or unexported fields
}

OrgInvitationDeleteOne is the builder for deleting a single OrgInvitation entity.

func (*OrgInvitationDeleteOne) Exec

func (oido *OrgInvitationDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgInvitationDeleteOne) ExecX

func (oido *OrgInvitationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgInvitationDeleteOne) Where

Where appends a list predicates to the OrgInvitationDelete builder.

type OrgInvitationEdges

type OrgInvitationEdges struct {
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// Sender holds the value of the sender edge.
	Sender *User `json:"sender,omitempty"`
	// contains filtered or unexported fields
}

OrgInvitationEdges holds the relations/edges for other nodes in the graph.

func (OrgInvitationEdges) OrganizationOrErr

func (e OrgInvitationEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgInvitationEdges) SenderOrErr

func (e OrgInvitationEdges) SenderOrErr() (*User, error)

SenderOrErr returns the Sender value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OrgInvitationGroupBy

type OrgInvitationGroupBy struct {
	// contains filtered or unexported fields
}

OrgInvitationGroupBy is the group-by builder for OrgInvitation entities.

func (*OrgInvitationGroupBy) Aggregate

func (oigb *OrgInvitationGroupBy) Aggregate(fns ...AggregateFunc) *OrgInvitationGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgInvitationGroupBy) Bool

func (s *OrgInvitationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgInvitationGroupBy) BoolX

func (s *OrgInvitationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgInvitationGroupBy) Bools

func (s *OrgInvitationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgInvitationGroupBy) BoolsX

func (s *OrgInvitationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgInvitationGroupBy) Float64

func (s *OrgInvitationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgInvitationGroupBy) Float64X

func (s *OrgInvitationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgInvitationGroupBy) Float64s

func (s *OrgInvitationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgInvitationGroupBy) Float64sX

func (s *OrgInvitationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgInvitationGroupBy) Int

func (s *OrgInvitationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgInvitationGroupBy) IntX

func (s *OrgInvitationGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgInvitationGroupBy) Ints

func (s *OrgInvitationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgInvitationGroupBy) IntsX

func (s *OrgInvitationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgInvitationGroupBy) Scan

func (oigb *OrgInvitationGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgInvitationGroupBy) ScanX

func (s *OrgInvitationGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgInvitationGroupBy) String

func (s *OrgInvitationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgInvitationGroupBy) StringX

func (s *OrgInvitationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgInvitationGroupBy) Strings

func (s *OrgInvitationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgInvitationGroupBy) StringsX

func (s *OrgInvitationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgInvitationMutation

type OrgInvitationMutation struct {
	// contains filtered or unexported fields
}

OrgInvitationMutation represents an operation that mutates the OrgInvitation nodes in the graph.

func (*OrgInvitationMutation) AddField

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) AddedEdges

func (m *OrgInvitationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgInvitationMutation) AddedField

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) AddedFields

func (m *OrgInvitationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgInvitationMutation) AddedIDs

func (m *OrgInvitationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgInvitationMutation) ClearDeletedAt

func (m *OrgInvitationMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*OrgInvitationMutation) ClearEdge

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) ClearField

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) ClearOrganization

func (m *OrgInvitationMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*OrgInvitationMutation) ClearRole

func (m *OrgInvitationMutation) ClearRole()

ClearRole clears the value of the "role" field.

func (*OrgInvitationMutation) ClearSender

func (m *OrgInvitationMutation) ClearSender()

ClearSender clears the "sender" edge to the User entity.

func (*OrgInvitationMutation) ClearedEdges

func (m *OrgInvitationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgInvitationMutation) ClearedFields

func (m *OrgInvitationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgInvitationMutation) Client

func (m OrgInvitationMutation) 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 (*OrgInvitationMutation) CreatedAt

func (m *OrgInvitationMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrgInvitationMutation) DeletedAt

func (m *OrgInvitationMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*OrgInvitationMutation) DeletedAtCleared

func (m *OrgInvitationMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*OrgInvitationMutation) EdgeCleared

func (m *OrgInvitationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgInvitationMutation) Field

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) FieldCleared

func (m *OrgInvitationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgInvitationMutation) Fields

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) ID

func (m *OrgInvitationMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgInvitationMutation) 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 (*OrgInvitationMutation) OldCreatedAt

func (m *OrgInvitationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OrgInvitation entity. If the OrgInvitation 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 (*OrgInvitationMutation) OldDeletedAt

func (m *OrgInvitationMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the OrgInvitation entity. If the OrgInvitation 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 (*OrgInvitationMutation) OldField

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) OldOrganizationID

func (m *OrgInvitationMutation) OldOrganizationID(ctx context.Context) (v uuid.UUID, err error)

OldOrganizationID returns the old "organization_id" field's value of the OrgInvitation entity. If the OrgInvitation 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 (*OrgInvitationMutation) OldReceiverEmail

func (m *OrgInvitationMutation) OldReceiverEmail(ctx context.Context) (v string, err error)

OldReceiverEmail returns the old "receiver_email" field's value of the OrgInvitation entity. If the OrgInvitation 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 (*OrgInvitationMutation) OldRole

func (m *OrgInvitationMutation) OldRole(ctx context.Context) (v authz.Role, err error)

OldRole returns the old "role" field's value of the OrgInvitation entity. If the OrgInvitation 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 (*OrgInvitationMutation) OldSenderID

func (m *OrgInvitationMutation) OldSenderID(ctx context.Context) (v uuid.UUID, err error)

OldSenderID returns the old "sender_id" field's value of the OrgInvitation entity. If the OrgInvitation 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 (*OrgInvitationMutation) OldStatus

OldStatus returns the old "status" field's value of the OrgInvitation entity. If the OrgInvitation 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 (*OrgInvitationMutation) Op

func (m *OrgInvitationMutation) Op() Op

Op returns the operation name.

func (*OrgInvitationMutation) OrganizationCleared

func (m *OrgInvitationMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*OrgInvitationMutation) OrganizationID

func (m *OrgInvitationMutation) OrganizationID() (r uuid.UUID, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*OrgInvitationMutation) OrganizationIDs

func (m *OrgInvitationMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*OrgInvitationMutation) ReceiverEmail

func (m *OrgInvitationMutation) ReceiverEmail() (r string, exists bool)

ReceiverEmail returns the value of the "receiver_email" field in the mutation.

func (*OrgInvitationMutation) RemovedEdges

func (m *OrgInvitationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgInvitationMutation) RemovedIDs

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) ResetCreatedAt

func (m *OrgInvitationMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrgInvitationMutation) ResetDeletedAt

func (m *OrgInvitationMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*OrgInvitationMutation) ResetEdge

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) ResetField

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) ResetOrganization

func (m *OrgInvitationMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*OrgInvitationMutation) ResetOrganizationID

func (m *OrgInvitationMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*OrgInvitationMutation) ResetReceiverEmail

func (m *OrgInvitationMutation) ResetReceiverEmail()

ResetReceiverEmail resets all changes to the "receiver_email" field.

func (*OrgInvitationMutation) ResetRole

func (m *OrgInvitationMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*OrgInvitationMutation) ResetSender

func (m *OrgInvitationMutation) ResetSender()

ResetSender resets all changes to the "sender" edge.

func (*OrgInvitationMutation) ResetSenderID

func (m *OrgInvitationMutation) ResetSenderID()

ResetSenderID resets all changes to the "sender_id" field.

func (*OrgInvitationMutation) ResetStatus

func (m *OrgInvitationMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*OrgInvitationMutation) Role

func (m *OrgInvitationMutation) Role() (r authz.Role, exists bool)

Role returns the value of the "role" field in the mutation.

func (*OrgInvitationMutation) RoleCleared

func (m *OrgInvitationMutation) RoleCleared() bool

RoleCleared returns if the "role" field was cleared in this mutation.

func (*OrgInvitationMutation) SenderCleared

func (m *OrgInvitationMutation) SenderCleared() bool

SenderCleared reports if the "sender" edge to the User entity was cleared.

func (*OrgInvitationMutation) SenderID

func (m *OrgInvitationMutation) SenderID() (r uuid.UUID, exists bool)

SenderID returns the value of the "sender_id" field in the mutation.

func (*OrgInvitationMutation) SenderIDs

func (m *OrgInvitationMutation) SenderIDs() (ids []uuid.UUID)

SenderIDs returns the "sender" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SenderID instead. It exists only for internal usage by the builders.

func (*OrgInvitationMutation) SetCreatedAt

func (m *OrgInvitationMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrgInvitationMutation) SetDeletedAt

func (m *OrgInvitationMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*OrgInvitationMutation) SetField

func (m *OrgInvitationMutation) 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 (*OrgInvitationMutation) SetID

func (m *OrgInvitationMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgInvitation entities.

func (*OrgInvitationMutation) SetOp

func (m *OrgInvitationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgInvitationMutation) SetOrganizationID

func (m *OrgInvitationMutation) SetOrganizationID(u uuid.UUID)

SetOrganizationID sets the "organization_id" field.

func (*OrgInvitationMutation) SetReceiverEmail

func (m *OrgInvitationMutation) SetReceiverEmail(s string)

SetReceiverEmail sets the "receiver_email" field.

func (*OrgInvitationMutation) SetRole

func (m *OrgInvitationMutation) SetRole(a authz.Role)

SetRole sets the "role" field.

func (*OrgInvitationMutation) SetSenderID

func (m *OrgInvitationMutation) SetSenderID(u uuid.UUID)

SetSenderID sets the "sender_id" field.

func (*OrgInvitationMutation) SetStatus

func (m *OrgInvitationMutation) SetStatus(bis biz.OrgInvitationStatus)

SetStatus sets the "status" field.

func (*OrgInvitationMutation) Status

func (m *OrgInvitationMutation) Status() (r biz.OrgInvitationStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (OrgInvitationMutation) Tx

func (m OrgInvitationMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgInvitationMutation) Type

func (m *OrgInvitationMutation) Type() string

Type returns the node type of this mutation (OrgInvitation).

func (*OrgInvitationMutation) Where

Where appends a list predicates to the OrgInvitationMutation builder.

func (*OrgInvitationMutation) WhereP

func (m *OrgInvitationMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgInvitationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgInvitationQuery

type OrgInvitationQuery struct {
	// contains filtered or unexported fields
}

OrgInvitationQuery is the builder for querying OrgInvitation entities.

func (*OrgInvitationQuery) Aggregate

func (oiq *OrgInvitationQuery) Aggregate(fns ...AggregateFunc) *OrgInvitationSelect

Aggregate returns a OrgInvitationSelect configured with the given aggregations.

func (*OrgInvitationQuery) All

All executes the query and returns a list of OrgInvitations.

func (*OrgInvitationQuery) AllX

func (oiq *OrgInvitationQuery) AllX(ctx context.Context) []*OrgInvitation

AllX is like All, but panics if an error occurs.

func (*OrgInvitationQuery) Clone

func (oiq *OrgInvitationQuery) Clone() *OrgInvitationQuery

Clone returns a duplicate of the OrgInvitationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgInvitationQuery) Count

func (oiq *OrgInvitationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgInvitationQuery) CountX

func (oiq *OrgInvitationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgInvitationQuery) Exist

func (oiq *OrgInvitationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgInvitationQuery) ExistX

func (oiq *OrgInvitationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgInvitationQuery) First

First returns the first OrgInvitation entity from the query. Returns a *NotFoundError when no OrgInvitation was found.

func (*OrgInvitationQuery) FirstID

func (oiq *OrgInvitationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first OrgInvitation ID from the query. Returns a *NotFoundError when no OrgInvitation ID was found.

func (*OrgInvitationQuery) FirstIDX

func (oiq *OrgInvitationQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgInvitationQuery) FirstX

func (oiq *OrgInvitationQuery) FirstX(ctx context.Context) *OrgInvitation

FirstX is like First, but panics if an error occurs.

func (*OrgInvitationQuery) ForShare added in v0.94.3

func (oiq *OrgInvitationQuery) ForShare(opts ...sql.LockOption) *OrgInvitationQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*OrgInvitationQuery) ForUpdate added in v0.94.3

func (oiq *OrgInvitationQuery) ForUpdate(opts ...sql.LockOption) *OrgInvitationQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*OrgInvitationQuery) GroupBy

func (oiq *OrgInvitationQuery) GroupBy(field string, fields ...string) *OrgInvitationGroupBy

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 {
	ReceiverEmail string `json:"receiver_email,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgInvitation.Query().
	GroupBy(orginvitation.FieldReceiverEmail).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgInvitationQuery) IDs

func (oiq *OrgInvitationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of OrgInvitation IDs.

func (*OrgInvitationQuery) IDsX

func (oiq *OrgInvitationQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*OrgInvitationQuery) Limit

func (oiq *OrgInvitationQuery) Limit(limit int) *OrgInvitationQuery

Limit the number of records to be returned by this query.

func (*OrgInvitationQuery) Modify

func (oiq *OrgInvitationQuery) Modify(modifiers ...func(s *sql.Selector)) *OrgInvitationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*OrgInvitationQuery) Offset

func (oiq *OrgInvitationQuery) Offset(offset int) *OrgInvitationQuery

Offset to start from.

func (*OrgInvitationQuery) Only

Only returns a single OrgInvitation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgInvitation entity is found. Returns a *NotFoundError when no OrgInvitation entities are found.

func (*OrgInvitationQuery) OnlyID

func (oiq *OrgInvitationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only OrgInvitation ID in the query. Returns a *NotSingularError when more than one OrgInvitation ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgInvitationQuery) OnlyIDX

func (oiq *OrgInvitationQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgInvitationQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*OrgInvitationQuery) Order

Order specifies how the records should be ordered.

func (*OrgInvitationQuery) QueryOrganization

func (oiq *OrgInvitationQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*OrgInvitationQuery) QuerySender

func (oiq *OrgInvitationQuery) QuerySender() *UserQuery

QuerySender chains the current query on the "sender" edge.

func (*OrgInvitationQuery) Select

func (oiq *OrgInvitationQuery) Select(fields ...string) *OrgInvitationSelect

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 {
	ReceiverEmail string `json:"receiver_email,omitempty"`
}

client.OrgInvitation.Query().
	Select(orginvitation.FieldReceiverEmail).
	Scan(ctx, &v)

func (*OrgInvitationQuery) Unique

func (oiq *OrgInvitationQuery) Unique(unique bool) *OrgInvitationQuery

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 (*OrgInvitationQuery) Where

Where adds a new predicate for the OrgInvitationQuery builder.

func (*OrgInvitationQuery) WithOrganization

func (oiq *OrgInvitationQuery) WithOrganization(opts ...func(*OrganizationQuery)) *OrgInvitationQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgInvitationQuery) WithSender

func (oiq *OrgInvitationQuery) WithSender(opts ...func(*UserQuery)) *OrgInvitationQuery

WithSender tells the query-builder to eager-load the nodes that are connected to the "sender" edge. The optional arguments are used to configure the query builder of the edge.

type OrgInvitationSelect

type OrgInvitationSelect struct {
	*OrgInvitationQuery
	// contains filtered or unexported fields
}

OrgInvitationSelect is the builder for selecting fields of OrgInvitation entities.

func (*OrgInvitationSelect) Aggregate

func (ois *OrgInvitationSelect) Aggregate(fns ...AggregateFunc) *OrgInvitationSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgInvitationSelect) Bool

func (s *OrgInvitationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgInvitationSelect) BoolX

func (s *OrgInvitationSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgInvitationSelect) Bools

func (s *OrgInvitationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgInvitationSelect) BoolsX

func (s *OrgInvitationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgInvitationSelect) Float64

func (s *OrgInvitationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgInvitationSelect) Float64X

func (s *OrgInvitationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgInvitationSelect) Float64s

func (s *OrgInvitationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgInvitationSelect) Float64sX

func (s *OrgInvitationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgInvitationSelect) Int

func (s *OrgInvitationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgInvitationSelect) IntX

func (s *OrgInvitationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgInvitationSelect) Ints

func (s *OrgInvitationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgInvitationSelect) IntsX

func (s *OrgInvitationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgInvitationSelect) Modify

func (ois *OrgInvitationSelect) Modify(modifiers ...func(s *sql.Selector)) *OrgInvitationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*OrgInvitationSelect) Scan

func (ois *OrgInvitationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgInvitationSelect) ScanX

func (s *OrgInvitationSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgInvitationSelect) String

func (s *OrgInvitationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgInvitationSelect) StringX

func (s *OrgInvitationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgInvitationSelect) Strings

func (s *OrgInvitationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgInvitationSelect) StringsX

func (s *OrgInvitationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgInvitationUpdate

type OrgInvitationUpdate struct {
	// contains filtered or unexported fields
}

OrgInvitationUpdate is the builder for updating OrgInvitation entities.

func (*OrgInvitationUpdate) ClearDeletedAt

func (oiu *OrgInvitationUpdate) ClearDeletedAt() *OrgInvitationUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*OrgInvitationUpdate) ClearOrganization

func (oiu *OrgInvitationUpdate) ClearOrganization() *OrgInvitationUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*OrgInvitationUpdate) ClearRole

func (oiu *OrgInvitationUpdate) ClearRole() *OrgInvitationUpdate

ClearRole clears the value of the "role" field.

func (*OrgInvitationUpdate) ClearSender

func (oiu *OrgInvitationUpdate) ClearSender() *OrgInvitationUpdate

ClearSender clears the "sender" edge to the User entity.

func (*OrgInvitationUpdate) Exec

func (oiu *OrgInvitationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgInvitationUpdate) ExecX

func (oiu *OrgInvitationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgInvitationUpdate) Modify

func (oiu *OrgInvitationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrgInvitationUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrgInvitationUpdate) Mutation

func (oiu *OrgInvitationUpdate) Mutation() *OrgInvitationMutation

Mutation returns the OrgInvitationMutation object of the builder.

func (*OrgInvitationUpdate) Save

func (oiu *OrgInvitationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgInvitationUpdate) SaveX

func (oiu *OrgInvitationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgInvitationUpdate) SetDeletedAt

func (oiu *OrgInvitationUpdate) SetDeletedAt(t time.Time) *OrgInvitationUpdate

SetDeletedAt sets the "deleted_at" field.

func (*OrgInvitationUpdate) SetNillableDeletedAt

func (oiu *OrgInvitationUpdate) SetNillableDeletedAt(t *time.Time) *OrgInvitationUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*OrgInvitationUpdate) SetNillableOrganizationID added in v0.91.6

func (oiu *OrgInvitationUpdate) SetNillableOrganizationID(u *uuid.UUID) *OrgInvitationUpdate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*OrgInvitationUpdate) SetNillableRole

func (oiu *OrgInvitationUpdate) SetNillableRole(a *authz.Role) *OrgInvitationUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*OrgInvitationUpdate) SetNillableSenderID added in v0.91.6

func (oiu *OrgInvitationUpdate) SetNillableSenderID(u *uuid.UUID) *OrgInvitationUpdate

SetNillableSenderID sets the "sender_id" field if the given value is not nil.

func (*OrgInvitationUpdate) SetNillableStatus

func (oiu *OrgInvitationUpdate) SetNillableStatus(bis *biz.OrgInvitationStatus) *OrgInvitationUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OrgInvitationUpdate) SetOrganization

func (oiu *OrgInvitationUpdate) SetOrganization(o *Organization) *OrgInvitationUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*OrgInvitationUpdate) SetOrganizationID

func (oiu *OrgInvitationUpdate) SetOrganizationID(u uuid.UUID) *OrgInvitationUpdate

SetOrganizationID sets the "organization_id" field.

func (*OrgInvitationUpdate) SetRole

SetRole sets the "role" field.

func (*OrgInvitationUpdate) SetSender

func (oiu *OrgInvitationUpdate) SetSender(u *User) *OrgInvitationUpdate

SetSender sets the "sender" edge to the User entity.

func (*OrgInvitationUpdate) SetSenderID

func (oiu *OrgInvitationUpdate) SetSenderID(u uuid.UUID) *OrgInvitationUpdate

SetSenderID sets the "sender_id" field.

func (*OrgInvitationUpdate) SetStatus

SetStatus sets the "status" field.

func (*OrgInvitationUpdate) Where

Where appends a list predicates to the OrgInvitationUpdate builder.

type OrgInvitationUpdateOne

type OrgInvitationUpdateOne struct {
	// contains filtered or unexported fields
}

OrgInvitationUpdateOne is the builder for updating a single OrgInvitation entity.

func (*OrgInvitationUpdateOne) ClearDeletedAt

func (oiuo *OrgInvitationUpdateOne) ClearDeletedAt() *OrgInvitationUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*OrgInvitationUpdateOne) ClearOrganization

func (oiuo *OrgInvitationUpdateOne) ClearOrganization() *OrgInvitationUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*OrgInvitationUpdateOne) ClearRole

ClearRole clears the value of the "role" field.

func (*OrgInvitationUpdateOne) ClearSender

func (oiuo *OrgInvitationUpdateOne) ClearSender() *OrgInvitationUpdateOne

ClearSender clears the "sender" edge to the User entity.

func (*OrgInvitationUpdateOne) Exec

func (oiuo *OrgInvitationUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgInvitationUpdateOne) ExecX

func (oiuo *OrgInvitationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgInvitationUpdateOne) Modify

func (oiuo *OrgInvitationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrgInvitationUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrgInvitationUpdateOne) Mutation

Mutation returns the OrgInvitationMutation object of the builder.

func (*OrgInvitationUpdateOne) Save

Save executes the query and returns the updated OrgInvitation entity.

func (*OrgInvitationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OrgInvitationUpdateOne) Select

func (oiuo *OrgInvitationUpdateOne) Select(field string, fields ...string) *OrgInvitationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgInvitationUpdateOne) SetDeletedAt

func (oiuo *OrgInvitationUpdateOne) SetDeletedAt(t time.Time) *OrgInvitationUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*OrgInvitationUpdateOne) SetNillableDeletedAt

func (oiuo *OrgInvitationUpdateOne) SetNillableDeletedAt(t *time.Time) *OrgInvitationUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*OrgInvitationUpdateOne) SetNillableOrganizationID added in v0.91.6

func (oiuo *OrgInvitationUpdateOne) SetNillableOrganizationID(u *uuid.UUID) *OrgInvitationUpdateOne

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*OrgInvitationUpdateOne) SetNillableRole

func (oiuo *OrgInvitationUpdateOne) SetNillableRole(a *authz.Role) *OrgInvitationUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*OrgInvitationUpdateOne) SetNillableSenderID added in v0.91.6

func (oiuo *OrgInvitationUpdateOne) SetNillableSenderID(u *uuid.UUID) *OrgInvitationUpdateOne

SetNillableSenderID sets the "sender_id" field if the given value is not nil.

func (*OrgInvitationUpdateOne) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OrgInvitationUpdateOne) SetOrganization

func (oiuo *OrgInvitationUpdateOne) SetOrganization(o *Organization) *OrgInvitationUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*OrgInvitationUpdateOne) SetOrganizationID

func (oiuo *OrgInvitationUpdateOne) SetOrganizationID(u uuid.UUID) *OrgInvitationUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*OrgInvitationUpdateOne) SetRole

SetRole sets the "role" field.

func (*OrgInvitationUpdateOne) SetSender

func (oiuo *OrgInvitationUpdateOne) SetSender(u *User) *OrgInvitationUpdateOne

SetSender sets the "sender" edge to the User entity.

func (*OrgInvitationUpdateOne) SetSenderID

SetSenderID sets the "sender_id" field.

func (*OrgInvitationUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*OrgInvitationUpdateOne) Where

Where appends a list predicates to the OrgInvitationUpdate builder.

type OrgInvitations

type OrgInvitations []*OrgInvitation

OrgInvitations is a parsable slice of OrgInvitation.

type Organization

type Organization struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrganizationQuery when eager-loading is set.
	Edges OrganizationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Organization is the model entity for the Organization schema.

func (*Organization) QueryAPITokens

func (o *Organization) QueryAPITokens() *APITokenQuery

QueryAPITokens queries the "api_tokens" edge of the Organization entity.

func (*Organization) QueryCasBackends

func (o *Organization) QueryCasBackends() *CASBackendQuery

QueryCasBackends queries the "cas_backends" edge of the Organization entity.

func (*Organization) QueryIntegrations

func (o *Organization) QueryIntegrations() *IntegrationQuery

QueryIntegrations queries the "integrations" edge of the Organization entity.

func (*Organization) QueryMemberships

func (o *Organization) QueryMemberships() *MembershipQuery

QueryMemberships queries the "memberships" edge of the Organization entity.

func (*Organization) QueryWorkflowContracts

func (o *Organization) QueryWorkflowContracts() *WorkflowContractQuery

QueryWorkflowContracts queries the "workflow_contracts" edge of the Organization entity.

func (*Organization) QueryWorkflows

func (o *Organization) QueryWorkflows() *WorkflowQuery

QueryWorkflows queries the "workflows" edge of the Organization entity.

func (*Organization) String

func (o *Organization) String() string

String implements the fmt.Stringer.

func (*Organization) Unwrap

func (o *Organization) Unwrap() *Organization

Unwrap unwraps the Organization 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 (*Organization) Update

func (o *Organization) Update() *OrganizationUpdateOne

Update returns a builder for updating this Organization. Note that you need to call Organization.Unwrap() before calling this method if this Organization was returned from a transaction, and the transaction was committed or rolled back.

func (*Organization) Value

func (o *Organization) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Organization. This includes values selected through modifiers, order, etc.

type OrganizationClient

type OrganizationClient struct {
	// contains filtered or unexported fields
}

OrganizationClient is a client for the Organization schema.

func NewOrganizationClient

func NewOrganizationClient(c config) *OrganizationClient

NewOrganizationClient returns a client for the Organization from the given config.

func (*OrganizationClient) Create

Create returns a builder for creating a Organization entity.

func (*OrganizationClient) CreateBulk

func (c *OrganizationClient) CreateBulk(builders ...*OrganizationCreate) *OrganizationCreateBulk

CreateBulk returns a builder for creating a bulk of Organization entities.

func (*OrganizationClient) Delete

Delete returns a delete builder for Organization.

func (*OrganizationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrganizationClient) DeleteOneID

func (c *OrganizationClient) DeleteOneID(id uuid.UUID) *OrganizationDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrganizationClient) Get

Get returns a Organization entity by its id.

func (*OrganizationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*OrganizationClient) Hooks

func (c *OrganizationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrganizationClient) Intercept

func (c *OrganizationClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `organization.Intercept(f(g(h())))`.

func (*OrganizationClient) Interceptors

func (c *OrganizationClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrganizationClient) MapCreateBulk added in v0.91.6

func (c *OrganizationClient) MapCreateBulk(slice any, setFunc func(*OrganizationCreate, int)) *OrganizationCreateBulk

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 (*OrganizationClient) Query

Query returns a query builder for Organization.

func (*OrganizationClient) QueryAPITokens

func (c *OrganizationClient) QueryAPITokens(o *Organization) *APITokenQuery

QueryAPITokens queries the api_tokens edge of a Organization.

func (*OrganizationClient) QueryCasBackends

func (c *OrganizationClient) QueryCasBackends(o *Organization) *CASBackendQuery

QueryCasBackends queries the cas_backends edge of a Organization.

func (*OrganizationClient) QueryIntegrations

func (c *OrganizationClient) QueryIntegrations(o *Organization) *IntegrationQuery

QueryIntegrations queries the integrations edge of a Organization.

func (*OrganizationClient) QueryMemberships

func (c *OrganizationClient) QueryMemberships(o *Organization) *MembershipQuery

QueryMemberships queries the memberships edge of a Organization.

func (*OrganizationClient) QueryWorkflowContracts

func (c *OrganizationClient) QueryWorkflowContracts(o *Organization) *WorkflowContractQuery

QueryWorkflowContracts queries the workflow_contracts edge of a Organization.

func (*OrganizationClient) QueryWorkflows

func (c *OrganizationClient) QueryWorkflows(o *Organization) *WorkflowQuery

QueryWorkflows queries the workflows edge of a Organization.

func (*OrganizationClient) Update

Update returns an update builder for Organization.

func (*OrganizationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrganizationClient) UpdateOneID

func (c *OrganizationClient) UpdateOneID(id uuid.UUID) *OrganizationUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrganizationClient) Use

func (c *OrganizationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `organization.Hooks(f(g(h())))`.

type OrganizationCreate

type OrganizationCreate struct {
	// contains filtered or unexported fields
}

OrganizationCreate is the builder for creating a Organization entity.

func (*OrganizationCreate) AddAPITokenIDs

func (oc *OrganizationCreate) AddAPITokenIDs(ids ...uuid.UUID) *OrganizationCreate

AddAPITokenIDs adds the "api_tokens" edge to the APIToken entity by IDs.

func (*OrganizationCreate) AddAPITokens

func (oc *OrganizationCreate) AddAPITokens(a ...*APIToken) *OrganizationCreate

AddAPITokens adds the "api_tokens" edges to the APIToken entity.

func (*OrganizationCreate) AddCasBackendIDs

func (oc *OrganizationCreate) AddCasBackendIDs(ids ...uuid.UUID) *OrganizationCreate

AddCasBackendIDs adds the "cas_backends" edge to the CASBackend entity by IDs.

func (*OrganizationCreate) AddCasBackends

func (oc *OrganizationCreate) AddCasBackends(c ...*CASBackend) *OrganizationCreate

AddCasBackends adds the "cas_backends" edges to the CASBackend entity.

func (*OrganizationCreate) AddIntegrationIDs

func (oc *OrganizationCreate) AddIntegrationIDs(ids ...uuid.UUID) *OrganizationCreate

AddIntegrationIDs adds the "integrations" edge to the Integration entity by IDs.

func (*OrganizationCreate) AddIntegrations

func (oc *OrganizationCreate) AddIntegrations(i ...*Integration) *OrganizationCreate

AddIntegrations adds the "integrations" edges to the Integration entity.

func (*OrganizationCreate) AddMembershipIDs

func (oc *OrganizationCreate) AddMembershipIDs(ids ...uuid.UUID) *OrganizationCreate

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*OrganizationCreate) AddMemberships

func (oc *OrganizationCreate) AddMemberships(m ...*Membership) *OrganizationCreate

AddMemberships adds the "memberships" edges to the Membership entity.

func (*OrganizationCreate) AddWorkflowContractIDs

func (oc *OrganizationCreate) AddWorkflowContractIDs(ids ...uuid.UUID) *OrganizationCreate

AddWorkflowContractIDs adds the "workflow_contracts" edge to the WorkflowContract entity by IDs.

func (*OrganizationCreate) AddWorkflowContracts

func (oc *OrganizationCreate) AddWorkflowContracts(w ...*WorkflowContract) *OrganizationCreate

AddWorkflowContracts adds the "workflow_contracts" edges to the WorkflowContract entity.

func (*OrganizationCreate) AddWorkflowIDs

func (oc *OrganizationCreate) AddWorkflowIDs(ids ...uuid.UUID) *OrganizationCreate

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*OrganizationCreate) AddWorkflows

func (oc *OrganizationCreate) AddWorkflows(w ...*Workflow) *OrganizationCreate

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*OrganizationCreate) Exec

func (oc *OrganizationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrganizationCreate) ExecX

func (oc *OrganizationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationCreate) Mutation

func (oc *OrganizationCreate) Mutation() *OrganizationMutation

Mutation returns the OrganizationMutation object of the builder.

func (*OrganizationCreate) Save

Save creates the Organization in the database.

func (*OrganizationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OrganizationCreate) SetCreatedAt

func (oc *OrganizationCreate) SetCreatedAt(t time.Time) *OrganizationCreate

SetCreatedAt sets the "created_at" field.

func (*OrganizationCreate) SetID

SetID sets the "id" field.

func (*OrganizationCreate) SetName

SetName sets the "name" field.

func (*OrganizationCreate) SetNillableCreatedAt

func (oc *OrganizationCreate) SetNillableCreatedAt(t *time.Time) *OrganizationCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrganizationCreate) SetNillableID

func (oc *OrganizationCreate) SetNillableID(u *uuid.UUID) *OrganizationCreate

SetNillableID sets the "id" field if the given value is not nil.

type OrganizationCreateBulk

type OrganizationCreateBulk struct {
	// contains filtered or unexported fields
}

OrganizationCreateBulk is the builder for creating many Organization entities in bulk.

func (*OrganizationCreateBulk) Exec

Exec executes the query.

func (*OrganizationCreateBulk) ExecX

func (ocb *OrganizationCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationCreateBulk) Save

Save creates the Organization entities in the database.

func (*OrganizationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type OrganizationDelete

type OrganizationDelete struct {
	// contains filtered or unexported fields
}

OrganizationDelete is the builder for deleting a Organization entity.

func (*OrganizationDelete) Exec

func (od *OrganizationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrganizationDelete) ExecX

func (od *OrganizationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationDelete) Where

Where appends a list predicates to the OrganizationDelete builder.

type OrganizationDeleteOne

type OrganizationDeleteOne struct {
	// contains filtered or unexported fields
}

OrganizationDeleteOne is the builder for deleting a single Organization entity.

func (*OrganizationDeleteOne) Exec

func (odo *OrganizationDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrganizationDeleteOne) ExecX

func (odo *OrganizationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationDeleteOne) Where

Where appends a list predicates to the OrganizationDelete builder.

type OrganizationEdges

type OrganizationEdges struct {
	// Memberships holds the value of the memberships edge.
	Memberships []*Membership `json:"memberships,omitempty"`
	// WorkflowContracts holds the value of the workflow_contracts edge.
	WorkflowContracts []*WorkflowContract `json:"workflow_contracts,omitempty"`
	// Workflows holds the value of the workflows edge.
	Workflows []*Workflow `json:"workflows,omitempty"`
	// CasBackends holds the value of the cas_backends edge.
	CasBackends []*CASBackend `json:"cas_backends,omitempty"`
	// Integrations holds the value of the integrations edge.
	Integrations []*Integration `json:"integrations,omitempty"`
	// APITokens holds the value of the api_tokens edge.
	APITokens []*APIToken `json:"api_tokens,omitempty"`
	// contains filtered or unexported fields
}

OrganizationEdges holds the relations/edges for other nodes in the graph.

func (OrganizationEdges) APITokensOrErr

func (e OrganizationEdges) APITokensOrErr() ([]*APIToken, error)

APITokensOrErr returns the APITokens value or an error if the edge was not loaded in eager-loading.

func (OrganizationEdges) CasBackendsOrErr

func (e OrganizationEdges) CasBackendsOrErr() ([]*CASBackend, error)

CasBackendsOrErr returns the CasBackends value or an error if the edge was not loaded in eager-loading.

func (OrganizationEdges) IntegrationsOrErr

func (e OrganizationEdges) IntegrationsOrErr() ([]*Integration, error)

IntegrationsOrErr returns the Integrations value or an error if the edge was not loaded in eager-loading.

func (OrganizationEdges) MembershipsOrErr

func (e OrganizationEdges) MembershipsOrErr() ([]*Membership, error)

MembershipsOrErr returns the Memberships value or an error if the edge was not loaded in eager-loading.

func (OrganizationEdges) WorkflowContractsOrErr

func (e OrganizationEdges) WorkflowContractsOrErr() ([]*WorkflowContract, error)

WorkflowContractsOrErr returns the WorkflowContracts value or an error if the edge was not loaded in eager-loading.

func (OrganizationEdges) WorkflowsOrErr

func (e OrganizationEdges) WorkflowsOrErr() ([]*Workflow, error)

WorkflowsOrErr returns the Workflows value or an error if the edge was not loaded in eager-loading.

type OrganizationGroupBy

type OrganizationGroupBy struct {
	// contains filtered or unexported fields
}

OrganizationGroupBy is the group-by builder for Organization entities.

func (*OrganizationGroupBy) Aggregate

func (ogb *OrganizationGroupBy) Aggregate(fns ...AggregateFunc) *OrganizationGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrganizationGroupBy) Bool

func (s *OrganizationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) BoolX

func (s *OrganizationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrganizationGroupBy) Bools

func (s *OrganizationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) BoolsX

func (s *OrganizationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrganizationGroupBy) Float64

func (s *OrganizationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) Float64X

func (s *OrganizationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrganizationGroupBy) Float64s

func (s *OrganizationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) Float64sX

func (s *OrganizationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrganizationGroupBy) Int

func (s *OrganizationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) IntX

func (s *OrganizationGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrganizationGroupBy) Ints

func (s *OrganizationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) IntsX

func (s *OrganizationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrganizationGroupBy) Scan

func (ogb *OrganizationGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrganizationGroupBy) ScanX

func (s *OrganizationGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrganizationGroupBy) String

func (s *OrganizationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) StringX

func (s *OrganizationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrganizationGroupBy) Strings

func (s *OrganizationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) StringsX

func (s *OrganizationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrganizationMutation

type OrganizationMutation struct {
	// contains filtered or unexported fields
}

OrganizationMutation represents an operation that mutates the Organization nodes in the graph.

func (*OrganizationMutation) APITokensCleared

func (m *OrganizationMutation) APITokensCleared() bool

APITokensCleared reports if the "api_tokens" edge to the APIToken entity was cleared.

func (*OrganizationMutation) APITokensIDs

func (m *OrganizationMutation) APITokensIDs() (ids []uuid.UUID)

APITokensIDs returns the "api_tokens" edge IDs in the mutation.

func (*OrganizationMutation) AddAPITokenIDs

func (m *OrganizationMutation) AddAPITokenIDs(ids ...uuid.UUID)

AddAPITokenIDs adds the "api_tokens" edge to the APIToken entity by ids.

func (*OrganizationMutation) AddCasBackendIDs

func (m *OrganizationMutation) AddCasBackendIDs(ids ...uuid.UUID)

AddCasBackendIDs adds the "cas_backends" edge to the CASBackend entity by ids.

func (*OrganizationMutation) AddField

func (m *OrganizationMutation) 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 (*OrganizationMutation) AddIntegrationIDs

func (m *OrganizationMutation) AddIntegrationIDs(ids ...uuid.UUID)

AddIntegrationIDs adds the "integrations" edge to the Integration entity by ids.

func (*OrganizationMutation) AddMembershipIDs

func (m *OrganizationMutation) AddMembershipIDs(ids ...uuid.UUID)

AddMembershipIDs adds the "memberships" edge to the Membership entity by ids.

func (*OrganizationMutation) AddWorkflowContractIDs

func (m *OrganizationMutation) AddWorkflowContractIDs(ids ...uuid.UUID)

AddWorkflowContractIDs adds the "workflow_contracts" edge to the WorkflowContract entity by ids.

func (*OrganizationMutation) AddWorkflowIDs

func (m *OrganizationMutation) AddWorkflowIDs(ids ...uuid.UUID)

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by ids.

func (*OrganizationMutation) AddedEdges

func (m *OrganizationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrganizationMutation) AddedField

func (m *OrganizationMutation) 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 (*OrganizationMutation) AddedFields

func (m *OrganizationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrganizationMutation) AddedIDs

func (m *OrganizationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrganizationMutation) CasBackendsCleared

func (m *OrganizationMutation) CasBackendsCleared() bool

CasBackendsCleared reports if the "cas_backends" edge to the CASBackend entity was cleared.

func (*OrganizationMutation) CasBackendsIDs

func (m *OrganizationMutation) CasBackendsIDs() (ids []uuid.UUID)

CasBackendsIDs returns the "cas_backends" edge IDs in the mutation.

func (*OrganizationMutation) ClearAPITokens

func (m *OrganizationMutation) ClearAPITokens()

ClearAPITokens clears the "api_tokens" edge to the APIToken entity.

func (*OrganizationMutation) ClearCasBackends

func (m *OrganizationMutation) ClearCasBackends()

ClearCasBackends clears the "cas_backends" edge to the CASBackend entity.

func (*OrganizationMutation) ClearEdge

func (m *OrganizationMutation) 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 (*OrganizationMutation) ClearField

func (m *OrganizationMutation) 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 (*OrganizationMutation) ClearIntegrations

func (m *OrganizationMutation) ClearIntegrations()

ClearIntegrations clears the "integrations" edge to the Integration entity.

func (*OrganizationMutation) ClearMemberships

func (m *OrganizationMutation) ClearMemberships()

ClearMemberships clears the "memberships" edge to the Membership entity.

func (*OrganizationMutation) ClearWorkflowContracts

func (m *OrganizationMutation) ClearWorkflowContracts()

ClearWorkflowContracts clears the "workflow_contracts" edge to the WorkflowContract entity.

func (*OrganizationMutation) ClearWorkflows

func (m *OrganizationMutation) ClearWorkflows()

ClearWorkflows clears the "workflows" edge to the Workflow entity.

func (*OrganizationMutation) ClearedEdges

func (m *OrganizationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrganizationMutation) ClearedFields

func (m *OrganizationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrganizationMutation) Client

func (m OrganizationMutation) 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 (*OrganizationMutation) CreatedAt

func (m *OrganizationMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrganizationMutation) EdgeCleared

func (m *OrganizationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrganizationMutation) Field

func (m *OrganizationMutation) 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 (*OrganizationMutation) FieldCleared

func (m *OrganizationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrganizationMutation) Fields

func (m *OrganizationMutation) 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 (*OrganizationMutation) ID

func (m *OrganizationMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrganizationMutation) 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 (*OrganizationMutation) IntegrationsCleared

func (m *OrganizationMutation) IntegrationsCleared() bool

IntegrationsCleared reports if the "integrations" edge to the Integration entity was cleared.

func (*OrganizationMutation) IntegrationsIDs

func (m *OrganizationMutation) IntegrationsIDs() (ids []uuid.UUID)

IntegrationsIDs returns the "integrations" edge IDs in the mutation.

func (*OrganizationMutation) MembershipsCleared

func (m *OrganizationMutation) MembershipsCleared() bool

MembershipsCleared reports if the "memberships" edge to the Membership entity was cleared.

func (*OrganizationMutation) MembershipsIDs

func (m *OrganizationMutation) MembershipsIDs() (ids []uuid.UUID)

MembershipsIDs returns the "memberships" edge IDs in the mutation.

func (*OrganizationMutation) Name

func (m *OrganizationMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*OrganizationMutation) OldCreatedAt

func (m *OrganizationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) OldField

func (m *OrganizationMutation) 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 (*OrganizationMutation) OldName

func (m *OrganizationMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) Op

func (m *OrganizationMutation) Op() Op

Op returns the operation name.

func (*OrganizationMutation) RemoveAPITokenIDs

func (m *OrganizationMutation) RemoveAPITokenIDs(ids ...uuid.UUID)

RemoveAPITokenIDs removes the "api_tokens" edge to the APIToken entity by IDs.

func (*OrganizationMutation) RemoveCasBackendIDs

func (m *OrganizationMutation) RemoveCasBackendIDs(ids ...uuid.UUID)

RemoveCasBackendIDs removes the "cas_backends" edge to the CASBackend entity by IDs.

func (*OrganizationMutation) RemoveIntegrationIDs

func (m *OrganizationMutation) RemoveIntegrationIDs(ids ...uuid.UUID)

RemoveIntegrationIDs removes the "integrations" edge to the Integration entity by IDs.

func (*OrganizationMutation) RemoveMembershipIDs

func (m *OrganizationMutation) RemoveMembershipIDs(ids ...uuid.UUID)

RemoveMembershipIDs removes the "memberships" edge to the Membership entity by IDs.

func (*OrganizationMutation) RemoveWorkflowContractIDs

func (m *OrganizationMutation) RemoveWorkflowContractIDs(ids ...uuid.UUID)

RemoveWorkflowContractIDs removes the "workflow_contracts" edge to the WorkflowContract entity by IDs.

func (*OrganizationMutation) RemoveWorkflowIDs

func (m *OrganizationMutation) RemoveWorkflowIDs(ids ...uuid.UUID)

RemoveWorkflowIDs removes the "workflows" edge to the Workflow entity by IDs.

func (*OrganizationMutation) RemovedAPITokensIDs

func (m *OrganizationMutation) RemovedAPITokensIDs() (ids []uuid.UUID)

RemovedAPITokens returns the removed IDs of the "api_tokens" edge to the APIToken entity.

func (*OrganizationMutation) RemovedCasBackendsIDs

func (m *OrganizationMutation) RemovedCasBackendsIDs() (ids []uuid.UUID)

RemovedCasBackends returns the removed IDs of the "cas_backends" edge to the CASBackend entity.

func (*OrganizationMutation) RemovedEdges

func (m *OrganizationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrganizationMutation) RemovedIDs

func (m *OrganizationMutation) 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 (*OrganizationMutation) RemovedIntegrationsIDs

func (m *OrganizationMutation) RemovedIntegrationsIDs() (ids []uuid.UUID)

RemovedIntegrations returns the removed IDs of the "integrations" edge to the Integration entity.

func (*OrganizationMutation) RemovedMembershipsIDs

func (m *OrganizationMutation) RemovedMembershipsIDs() (ids []uuid.UUID)

RemovedMemberships returns the removed IDs of the "memberships" edge to the Membership entity.

func (*OrganizationMutation) RemovedWorkflowContractsIDs

func (m *OrganizationMutation) RemovedWorkflowContractsIDs() (ids []uuid.UUID)

RemovedWorkflowContracts returns the removed IDs of the "workflow_contracts" edge to the WorkflowContract entity.

func (*OrganizationMutation) RemovedWorkflowsIDs

func (m *OrganizationMutation) RemovedWorkflowsIDs() (ids []uuid.UUID)

RemovedWorkflows returns the removed IDs of the "workflows" edge to the Workflow entity.

func (*OrganizationMutation) ResetAPITokens

func (m *OrganizationMutation) ResetAPITokens()

ResetAPITokens resets all changes to the "api_tokens" edge.

func (*OrganizationMutation) ResetCasBackends

func (m *OrganizationMutation) ResetCasBackends()

ResetCasBackends resets all changes to the "cas_backends" edge.

func (*OrganizationMutation) ResetCreatedAt

func (m *OrganizationMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrganizationMutation) ResetEdge

func (m *OrganizationMutation) 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 (*OrganizationMutation) ResetField

func (m *OrganizationMutation) 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 (*OrganizationMutation) ResetIntegrations

func (m *OrganizationMutation) ResetIntegrations()

ResetIntegrations resets all changes to the "integrations" edge.

func (*OrganizationMutation) ResetMemberships

func (m *OrganizationMutation) ResetMemberships()

ResetMemberships resets all changes to the "memberships" edge.

func (*OrganizationMutation) ResetName

func (m *OrganizationMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*OrganizationMutation) ResetWorkflowContracts

func (m *OrganizationMutation) ResetWorkflowContracts()

ResetWorkflowContracts resets all changes to the "workflow_contracts" edge.

func (*OrganizationMutation) ResetWorkflows

func (m *OrganizationMutation) ResetWorkflows()

ResetWorkflows resets all changes to the "workflows" edge.

func (*OrganizationMutation) SetCreatedAt

func (m *OrganizationMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrganizationMutation) SetField

func (m *OrganizationMutation) 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 (*OrganizationMutation) SetID

func (m *OrganizationMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Organization entities.

func (*OrganizationMutation) SetName

func (m *OrganizationMutation) SetName(s string)

SetName sets the "name" field.

func (*OrganizationMutation) SetOp

func (m *OrganizationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (OrganizationMutation) Tx

func (m OrganizationMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrganizationMutation) Type

func (m *OrganizationMutation) Type() string

Type returns the node type of this mutation (Organization).

func (*OrganizationMutation) Where

Where appends a list predicates to the OrganizationMutation builder.

func (*OrganizationMutation) WhereP

func (m *OrganizationMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrganizationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*OrganizationMutation) WorkflowContractsCleared

func (m *OrganizationMutation) WorkflowContractsCleared() bool

WorkflowContractsCleared reports if the "workflow_contracts" edge to the WorkflowContract entity was cleared.

func (*OrganizationMutation) WorkflowContractsIDs

func (m *OrganizationMutation) WorkflowContractsIDs() (ids []uuid.UUID)

WorkflowContractsIDs returns the "workflow_contracts" edge IDs in the mutation.

func (*OrganizationMutation) WorkflowsCleared

func (m *OrganizationMutation) WorkflowsCleared() bool

WorkflowsCleared reports if the "workflows" edge to the Workflow entity was cleared.

func (*OrganizationMutation) WorkflowsIDs

func (m *OrganizationMutation) WorkflowsIDs() (ids []uuid.UUID)

WorkflowsIDs returns the "workflows" edge IDs in the mutation.

type OrganizationQuery

type OrganizationQuery struct {
	// contains filtered or unexported fields
}

OrganizationQuery is the builder for querying Organization entities.

func (*OrganizationQuery) Aggregate

func (oq *OrganizationQuery) Aggregate(fns ...AggregateFunc) *OrganizationSelect

Aggregate returns a OrganizationSelect configured with the given aggregations.

func (*OrganizationQuery) All

func (oq *OrganizationQuery) All(ctx context.Context) ([]*Organization, error)

All executes the query and returns a list of Organizations.

func (*OrganizationQuery) AllX

func (oq *OrganizationQuery) AllX(ctx context.Context) []*Organization

AllX is like All, but panics if an error occurs.

func (*OrganizationQuery) Clone

func (oq *OrganizationQuery) Clone() *OrganizationQuery

Clone returns a duplicate of the OrganizationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrganizationQuery) Count

func (oq *OrganizationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrganizationQuery) CountX

func (oq *OrganizationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrganizationQuery) Exist

func (oq *OrganizationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrganizationQuery) ExistX

func (oq *OrganizationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrganizationQuery) First

func (oq *OrganizationQuery) First(ctx context.Context) (*Organization, error)

First returns the first Organization entity from the query. Returns a *NotFoundError when no Organization was found.

func (*OrganizationQuery) FirstID

func (oq *OrganizationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Organization ID from the query. Returns a *NotFoundError when no Organization ID was found.

func (*OrganizationQuery) FirstIDX

func (oq *OrganizationQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrganizationQuery) FirstX

func (oq *OrganizationQuery) FirstX(ctx context.Context) *Organization

FirstX is like First, but panics if an error occurs.

func (*OrganizationQuery) ForShare added in v0.94.3

func (oq *OrganizationQuery) ForShare(opts ...sql.LockOption) *OrganizationQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*OrganizationQuery) ForUpdate added in v0.94.3

func (oq *OrganizationQuery) ForUpdate(opts ...sql.LockOption) *OrganizationQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*OrganizationQuery) GroupBy

func (oq *OrganizationQuery) GroupBy(field string, fields ...string) *OrganizationGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Organization.Query().
	GroupBy(organization.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrganizationQuery) IDs

func (oq *OrganizationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Organization IDs.

func (*OrganizationQuery) IDsX

func (oq *OrganizationQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*OrganizationQuery) Limit

func (oq *OrganizationQuery) Limit(limit int) *OrganizationQuery

Limit the number of records to be returned by this query.

func (*OrganizationQuery) Modify

func (oq *OrganizationQuery) Modify(modifiers ...func(s *sql.Selector)) *OrganizationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*OrganizationQuery) Offset

func (oq *OrganizationQuery) Offset(offset int) *OrganizationQuery

Offset to start from.

func (*OrganizationQuery) Only

Only returns a single Organization entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Organization entity is found. Returns a *NotFoundError when no Organization entities are found.

func (*OrganizationQuery) OnlyID

func (oq *OrganizationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Organization ID in the query. Returns a *NotSingularError when more than one Organization ID is found. Returns a *NotFoundError when no entities are found.

func (*OrganizationQuery) OnlyIDX

func (oq *OrganizationQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrganizationQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*OrganizationQuery) Order

Order specifies how the records should be ordered.

func (*OrganizationQuery) QueryAPITokens

func (oq *OrganizationQuery) QueryAPITokens() *APITokenQuery

QueryAPITokens chains the current query on the "api_tokens" edge.

func (*OrganizationQuery) QueryCasBackends

func (oq *OrganizationQuery) QueryCasBackends() *CASBackendQuery

QueryCasBackends chains the current query on the "cas_backends" edge.

func (*OrganizationQuery) QueryIntegrations

func (oq *OrganizationQuery) QueryIntegrations() *IntegrationQuery

QueryIntegrations chains the current query on the "integrations" edge.

func (*OrganizationQuery) QueryMemberships

func (oq *OrganizationQuery) QueryMemberships() *MembershipQuery

QueryMemberships chains the current query on the "memberships" edge.

func (*OrganizationQuery) QueryWorkflowContracts

func (oq *OrganizationQuery) QueryWorkflowContracts() *WorkflowContractQuery

QueryWorkflowContracts chains the current query on the "workflow_contracts" edge.

func (*OrganizationQuery) QueryWorkflows

func (oq *OrganizationQuery) QueryWorkflows() *WorkflowQuery

QueryWorkflows chains the current query on the "workflows" edge.

func (*OrganizationQuery) Select

func (oq *OrganizationQuery) Select(fields ...string) *OrganizationSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.Organization.Query().
	Select(organization.FieldName).
	Scan(ctx, &v)

func (*OrganizationQuery) Unique

func (oq *OrganizationQuery) Unique(unique bool) *OrganizationQuery

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 (*OrganizationQuery) Where

Where adds a new predicate for the OrganizationQuery builder.

func (*OrganizationQuery) WithAPITokens

func (oq *OrganizationQuery) WithAPITokens(opts ...func(*APITokenQuery)) *OrganizationQuery

WithAPITokens tells the query-builder to eager-load the nodes that are connected to the "api_tokens" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrganizationQuery) WithCasBackends

func (oq *OrganizationQuery) WithCasBackends(opts ...func(*CASBackendQuery)) *OrganizationQuery

WithCasBackends tells the query-builder to eager-load the nodes that are connected to the "cas_backends" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrganizationQuery) WithIntegrations

func (oq *OrganizationQuery) WithIntegrations(opts ...func(*IntegrationQuery)) *OrganizationQuery

WithIntegrations tells the query-builder to eager-load the nodes that are connected to the "integrations" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrganizationQuery) WithMemberships

func (oq *OrganizationQuery) WithMemberships(opts ...func(*MembershipQuery)) *OrganizationQuery

WithMemberships tells the query-builder to eager-load the nodes that are connected to the "memberships" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrganizationQuery) WithWorkflowContracts

func (oq *OrganizationQuery) WithWorkflowContracts(opts ...func(*WorkflowContractQuery)) *OrganizationQuery

WithWorkflowContracts tells the query-builder to eager-load the nodes that are connected to the "workflow_contracts" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrganizationQuery) WithWorkflows

func (oq *OrganizationQuery) WithWorkflows(opts ...func(*WorkflowQuery)) *OrganizationQuery

WithWorkflows tells the query-builder to eager-load the nodes that are connected to the "workflows" edge. The optional arguments are used to configure the query builder of the edge.

type OrganizationSelect

type OrganizationSelect struct {
	*OrganizationQuery
	// contains filtered or unexported fields
}

OrganizationSelect is the builder for selecting fields of Organization entities.

func (*OrganizationSelect) Aggregate

func (os *OrganizationSelect) Aggregate(fns ...AggregateFunc) *OrganizationSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrganizationSelect) Bool

func (s *OrganizationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) BoolX

func (s *OrganizationSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrganizationSelect) Bools

func (s *OrganizationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) BoolsX

func (s *OrganizationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrganizationSelect) Float64

func (s *OrganizationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) Float64X

func (s *OrganizationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrganizationSelect) Float64s

func (s *OrganizationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) Float64sX

func (s *OrganizationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrganizationSelect) Int

func (s *OrganizationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) IntX

func (s *OrganizationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrganizationSelect) Ints

func (s *OrganizationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) IntsX

func (s *OrganizationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrganizationSelect) Modify

func (os *OrganizationSelect) Modify(modifiers ...func(s *sql.Selector)) *OrganizationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*OrganizationSelect) Scan

func (os *OrganizationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrganizationSelect) ScanX

func (s *OrganizationSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrganizationSelect) String

func (s *OrganizationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) StringX

func (s *OrganizationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrganizationSelect) Strings

func (s *OrganizationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) StringsX

func (s *OrganizationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrganizationUpdate

type OrganizationUpdate struct {
	// contains filtered or unexported fields
}

OrganizationUpdate is the builder for updating Organization entities.

func (*OrganizationUpdate) AddAPITokenIDs

func (ou *OrganizationUpdate) AddAPITokenIDs(ids ...uuid.UUID) *OrganizationUpdate

AddAPITokenIDs adds the "api_tokens" edge to the APIToken entity by IDs.

func (*OrganizationUpdate) AddAPITokens

func (ou *OrganizationUpdate) AddAPITokens(a ...*APIToken) *OrganizationUpdate

AddAPITokens adds the "api_tokens" edges to the APIToken entity.

func (*OrganizationUpdate) AddCasBackendIDs

func (ou *OrganizationUpdate) AddCasBackendIDs(ids ...uuid.UUID) *OrganizationUpdate

AddCasBackendIDs adds the "cas_backends" edge to the CASBackend entity by IDs.

func (*OrganizationUpdate) AddCasBackends

func (ou *OrganizationUpdate) AddCasBackends(c ...*CASBackend) *OrganizationUpdate

AddCasBackends adds the "cas_backends" edges to the CASBackend entity.

func (*OrganizationUpdate) AddIntegrationIDs

func (ou *OrganizationUpdate) AddIntegrationIDs(ids ...uuid.UUID) *OrganizationUpdate

AddIntegrationIDs adds the "integrations" edge to the Integration entity by IDs.

func (*OrganizationUpdate) AddIntegrations

func (ou *OrganizationUpdate) AddIntegrations(i ...*Integration) *OrganizationUpdate

AddIntegrations adds the "integrations" edges to the Integration entity.

func (*OrganizationUpdate) AddMembershipIDs

func (ou *OrganizationUpdate) AddMembershipIDs(ids ...uuid.UUID) *OrganizationUpdate

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*OrganizationUpdate) AddMemberships

func (ou *OrganizationUpdate) AddMemberships(m ...*Membership) *OrganizationUpdate

AddMemberships adds the "memberships" edges to the Membership entity.

func (*OrganizationUpdate) AddWorkflowContractIDs

func (ou *OrganizationUpdate) AddWorkflowContractIDs(ids ...uuid.UUID) *OrganizationUpdate

AddWorkflowContractIDs adds the "workflow_contracts" edge to the WorkflowContract entity by IDs.

func (*OrganizationUpdate) AddWorkflowContracts

func (ou *OrganizationUpdate) AddWorkflowContracts(w ...*WorkflowContract) *OrganizationUpdate

AddWorkflowContracts adds the "workflow_contracts" edges to the WorkflowContract entity.

func (*OrganizationUpdate) AddWorkflowIDs

func (ou *OrganizationUpdate) AddWorkflowIDs(ids ...uuid.UUID) *OrganizationUpdate

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*OrganizationUpdate) AddWorkflows

func (ou *OrganizationUpdate) AddWorkflows(w ...*Workflow) *OrganizationUpdate

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*OrganizationUpdate) ClearAPITokens

func (ou *OrganizationUpdate) ClearAPITokens() *OrganizationUpdate

ClearAPITokens clears all "api_tokens" edges to the APIToken entity.

func (*OrganizationUpdate) ClearCasBackends

func (ou *OrganizationUpdate) ClearCasBackends() *OrganizationUpdate

ClearCasBackends clears all "cas_backends" edges to the CASBackend entity.

func (*OrganizationUpdate) ClearIntegrations

func (ou *OrganizationUpdate) ClearIntegrations() *OrganizationUpdate

ClearIntegrations clears all "integrations" edges to the Integration entity.

func (*OrganizationUpdate) ClearMemberships

func (ou *OrganizationUpdate) ClearMemberships() *OrganizationUpdate

ClearMemberships clears all "memberships" edges to the Membership entity.

func (*OrganizationUpdate) ClearWorkflowContracts

func (ou *OrganizationUpdate) ClearWorkflowContracts() *OrganizationUpdate

ClearWorkflowContracts clears all "workflow_contracts" edges to the WorkflowContract entity.

func (*OrganizationUpdate) ClearWorkflows

func (ou *OrganizationUpdate) ClearWorkflows() *OrganizationUpdate

ClearWorkflows clears all "workflows" edges to the Workflow entity.

func (*OrganizationUpdate) Exec

func (ou *OrganizationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrganizationUpdate) ExecX

func (ou *OrganizationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationUpdate) Modify

func (ou *OrganizationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrganizationUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrganizationUpdate) Mutation

func (ou *OrganizationUpdate) Mutation() *OrganizationMutation

Mutation returns the OrganizationMutation object of the builder.

func (*OrganizationUpdate) RemoveAPITokenIDs

func (ou *OrganizationUpdate) RemoveAPITokenIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveAPITokenIDs removes the "api_tokens" edge to APIToken entities by IDs.

func (*OrganizationUpdate) RemoveAPITokens

func (ou *OrganizationUpdate) RemoveAPITokens(a ...*APIToken) *OrganizationUpdate

RemoveAPITokens removes "api_tokens" edges to APIToken entities.

func (*OrganizationUpdate) RemoveCasBackendIDs

func (ou *OrganizationUpdate) RemoveCasBackendIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveCasBackendIDs removes the "cas_backends" edge to CASBackend entities by IDs.

func (*OrganizationUpdate) RemoveCasBackends

func (ou *OrganizationUpdate) RemoveCasBackends(c ...*CASBackend) *OrganizationUpdate

RemoveCasBackends removes "cas_backends" edges to CASBackend entities.

func (*OrganizationUpdate) RemoveIntegrationIDs

func (ou *OrganizationUpdate) RemoveIntegrationIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveIntegrationIDs removes the "integrations" edge to Integration entities by IDs.

func (*OrganizationUpdate) RemoveIntegrations

func (ou *OrganizationUpdate) RemoveIntegrations(i ...*Integration) *OrganizationUpdate

RemoveIntegrations removes "integrations" edges to Integration entities.

func (*OrganizationUpdate) RemoveMembershipIDs

func (ou *OrganizationUpdate) RemoveMembershipIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveMembershipIDs removes the "memberships" edge to Membership entities by IDs.

func (*OrganizationUpdate) RemoveMemberships

func (ou *OrganizationUpdate) RemoveMemberships(m ...*Membership) *OrganizationUpdate

RemoveMemberships removes "memberships" edges to Membership entities.

func (*OrganizationUpdate) RemoveWorkflowContractIDs

func (ou *OrganizationUpdate) RemoveWorkflowContractIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveWorkflowContractIDs removes the "workflow_contracts" edge to WorkflowContract entities by IDs.

func (*OrganizationUpdate) RemoveWorkflowContracts

func (ou *OrganizationUpdate) RemoveWorkflowContracts(w ...*WorkflowContract) *OrganizationUpdate

RemoveWorkflowContracts removes "workflow_contracts" edges to WorkflowContract entities.

func (*OrganizationUpdate) RemoveWorkflowIDs

func (ou *OrganizationUpdate) RemoveWorkflowIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveWorkflowIDs removes the "workflows" edge to Workflow entities by IDs.

func (*OrganizationUpdate) RemoveWorkflows

func (ou *OrganizationUpdate) RemoveWorkflows(w ...*Workflow) *OrganizationUpdate

RemoveWorkflows removes "workflows" edges to Workflow entities.

func (*OrganizationUpdate) Save

func (ou *OrganizationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrganizationUpdate) SaveX

func (ou *OrganizationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrganizationUpdate) Where

Where appends a list predicates to the OrganizationUpdate builder.

type OrganizationUpdateOne

type OrganizationUpdateOne struct {
	// contains filtered or unexported fields
}

OrganizationUpdateOne is the builder for updating a single Organization entity.

func (*OrganizationUpdateOne) AddAPITokenIDs

func (ouo *OrganizationUpdateOne) AddAPITokenIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddAPITokenIDs adds the "api_tokens" edge to the APIToken entity by IDs.

func (*OrganizationUpdateOne) AddAPITokens

func (ouo *OrganizationUpdateOne) AddAPITokens(a ...*APIToken) *OrganizationUpdateOne

AddAPITokens adds the "api_tokens" edges to the APIToken entity.

func (*OrganizationUpdateOne) AddCasBackendIDs

func (ouo *OrganizationUpdateOne) AddCasBackendIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddCasBackendIDs adds the "cas_backends" edge to the CASBackend entity by IDs.

func (*OrganizationUpdateOne) AddCasBackends

func (ouo *OrganizationUpdateOne) AddCasBackends(c ...*CASBackend) *OrganizationUpdateOne

AddCasBackends adds the "cas_backends" edges to the CASBackend entity.

func (*OrganizationUpdateOne) AddIntegrationIDs

func (ouo *OrganizationUpdateOne) AddIntegrationIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddIntegrationIDs adds the "integrations" edge to the Integration entity by IDs.

func (*OrganizationUpdateOne) AddIntegrations

func (ouo *OrganizationUpdateOne) AddIntegrations(i ...*Integration) *OrganizationUpdateOne

AddIntegrations adds the "integrations" edges to the Integration entity.

func (*OrganizationUpdateOne) AddMembershipIDs

func (ouo *OrganizationUpdateOne) AddMembershipIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*OrganizationUpdateOne) AddMemberships

func (ouo *OrganizationUpdateOne) AddMemberships(m ...*Membership) *OrganizationUpdateOne

AddMemberships adds the "memberships" edges to the Membership entity.

func (*OrganizationUpdateOne) AddWorkflowContractIDs

func (ouo *OrganizationUpdateOne) AddWorkflowContractIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddWorkflowContractIDs adds the "workflow_contracts" edge to the WorkflowContract entity by IDs.

func (*OrganizationUpdateOne) AddWorkflowContracts

func (ouo *OrganizationUpdateOne) AddWorkflowContracts(w ...*WorkflowContract) *OrganizationUpdateOne

AddWorkflowContracts adds the "workflow_contracts" edges to the WorkflowContract entity.

func (*OrganizationUpdateOne) AddWorkflowIDs

func (ouo *OrganizationUpdateOne) AddWorkflowIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*OrganizationUpdateOne) AddWorkflows

func (ouo *OrganizationUpdateOne) AddWorkflows(w ...*Workflow) *OrganizationUpdateOne

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*OrganizationUpdateOne) ClearAPITokens

func (ouo *OrganizationUpdateOne) ClearAPITokens() *OrganizationUpdateOne

ClearAPITokens clears all "api_tokens" edges to the APIToken entity.

func (*OrganizationUpdateOne) ClearCasBackends

func (ouo *OrganizationUpdateOne) ClearCasBackends() *OrganizationUpdateOne

ClearCasBackends clears all "cas_backends" edges to the CASBackend entity.

func (*OrganizationUpdateOne) ClearIntegrations

func (ouo *OrganizationUpdateOne) ClearIntegrations() *OrganizationUpdateOne

ClearIntegrations clears all "integrations" edges to the Integration entity.

func (*OrganizationUpdateOne) ClearMemberships

func (ouo *OrganizationUpdateOne) ClearMemberships() *OrganizationUpdateOne

ClearMemberships clears all "memberships" edges to the Membership entity.

func (*OrganizationUpdateOne) ClearWorkflowContracts

func (ouo *OrganizationUpdateOne) ClearWorkflowContracts() *OrganizationUpdateOne

ClearWorkflowContracts clears all "workflow_contracts" edges to the WorkflowContract entity.

func (*OrganizationUpdateOne) ClearWorkflows

func (ouo *OrganizationUpdateOne) ClearWorkflows() *OrganizationUpdateOne

ClearWorkflows clears all "workflows" edges to the Workflow entity.

func (*OrganizationUpdateOne) Exec

func (ouo *OrganizationUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrganizationUpdateOne) ExecX

func (ouo *OrganizationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationUpdateOne) Modify

func (ouo *OrganizationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrganizationUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrganizationUpdateOne) Mutation

Mutation returns the OrganizationMutation object of the builder.

func (*OrganizationUpdateOne) RemoveAPITokenIDs

func (ouo *OrganizationUpdateOne) RemoveAPITokenIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveAPITokenIDs removes the "api_tokens" edge to APIToken entities by IDs.

func (*OrganizationUpdateOne) RemoveAPITokens

func (ouo *OrganizationUpdateOne) RemoveAPITokens(a ...*APIToken) *OrganizationUpdateOne

RemoveAPITokens removes "api_tokens" edges to APIToken entities.

func (*OrganizationUpdateOne) RemoveCasBackendIDs

func (ouo *OrganizationUpdateOne) RemoveCasBackendIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveCasBackendIDs removes the "cas_backends" edge to CASBackend entities by IDs.

func (*OrganizationUpdateOne) RemoveCasBackends

func (ouo *OrganizationUpdateOne) RemoveCasBackends(c ...*CASBackend) *OrganizationUpdateOne

RemoveCasBackends removes "cas_backends" edges to CASBackend entities.

func (*OrganizationUpdateOne) RemoveIntegrationIDs

func (ouo *OrganizationUpdateOne) RemoveIntegrationIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveIntegrationIDs removes the "integrations" edge to Integration entities by IDs.

func (*OrganizationUpdateOne) RemoveIntegrations

func (ouo *OrganizationUpdateOne) RemoveIntegrations(i ...*Integration) *OrganizationUpdateOne

RemoveIntegrations removes "integrations" edges to Integration entities.

func (*OrganizationUpdateOne) RemoveMembershipIDs

func (ouo *OrganizationUpdateOne) RemoveMembershipIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveMembershipIDs removes the "memberships" edge to Membership entities by IDs.

func (*OrganizationUpdateOne) RemoveMemberships

func (ouo *OrganizationUpdateOne) RemoveMemberships(m ...*Membership) *OrganizationUpdateOne

RemoveMemberships removes "memberships" edges to Membership entities.

func (*OrganizationUpdateOne) RemoveWorkflowContractIDs

func (ouo *OrganizationUpdateOne) RemoveWorkflowContractIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveWorkflowContractIDs removes the "workflow_contracts" edge to WorkflowContract entities by IDs.

func (*OrganizationUpdateOne) RemoveWorkflowContracts

func (ouo *OrganizationUpdateOne) RemoveWorkflowContracts(w ...*WorkflowContract) *OrganizationUpdateOne

RemoveWorkflowContracts removes "workflow_contracts" edges to WorkflowContract entities.

func (*OrganizationUpdateOne) RemoveWorkflowIDs

func (ouo *OrganizationUpdateOne) RemoveWorkflowIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveWorkflowIDs removes the "workflows" edge to Workflow entities by IDs.

func (*OrganizationUpdateOne) RemoveWorkflows

func (ouo *OrganizationUpdateOne) RemoveWorkflows(w ...*Workflow) *OrganizationUpdateOne

RemoveWorkflows removes "workflows" edges to Workflow entities.

func (*OrganizationUpdateOne) Save

Save executes the query and returns the updated Organization entity.

func (*OrganizationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OrganizationUpdateOne) Select

func (ouo *OrganizationUpdateOne) Select(field string, fields ...string) *OrganizationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrganizationUpdateOne) Where

Where appends a list predicates to the OrganizationUpdate builder.

type Organizations

type Organizations []*Organization

Organizations is a parsable slice of Organization.

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 Referrer

type Referrer struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Digest holds the value of the "digest" field.
	Digest string `json:"digest,omitempty"`
	// Kind holds the value of the "kind" field.
	Kind string `json:"kind,omitempty"`
	// Downloadable holds the value of the "downloadable" field.
	Downloadable bool `json:"downloadable,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Metadata holds the value of the "metadata" field.
	Metadata map[string]string `json:"metadata,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ReferrerQuery when eager-loading is set.
	Edges ReferrerEdges `json:"edges"`
	// contains filtered or unexported fields
}

Referrer is the model entity for the Referrer schema.

func (*Referrer) QueryReferences

func (r *Referrer) QueryReferences() *ReferrerQuery

QueryReferences queries the "references" edge of the Referrer entity.

func (*Referrer) QueryReferredBy

func (r *Referrer) QueryReferredBy() *ReferrerQuery

QueryReferredBy queries the "referred_by" edge of the Referrer entity.

func (*Referrer) QueryWorkflows

func (r *Referrer) QueryWorkflows() *WorkflowQuery

QueryWorkflows queries the "workflows" edge of the Referrer entity.

func (*Referrer) String

func (r *Referrer) String() string

String implements the fmt.Stringer.

func (*Referrer) Unwrap

func (r *Referrer) Unwrap() *Referrer

Unwrap unwraps the Referrer 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 (*Referrer) Update

func (r *Referrer) Update() *ReferrerUpdateOne

Update returns a builder for updating this Referrer. Note that you need to call Referrer.Unwrap() before calling this method if this Referrer was returned from a transaction, and the transaction was committed or rolled back.

func (*Referrer) Value

func (r *Referrer) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Referrer. This includes values selected through modifiers, order, etc.

type ReferrerClient

type ReferrerClient struct {
	// contains filtered or unexported fields
}

ReferrerClient is a client for the Referrer schema.

func NewReferrerClient

func NewReferrerClient(c config) *ReferrerClient

NewReferrerClient returns a client for the Referrer from the given config.

func (*ReferrerClient) Create

func (c *ReferrerClient) Create() *ReferrerCreate

Create returns a builder for creating a Referrer entity.

func (*ReferrerClient) CreateBulk

func (c *ReferrerClient) CreateBulk(builders ...*ReferrerCreate) *ReferrerCreateBulk

CreateBulk returns a builder for creating a bulk of Referrer entities.

func (*ReferrerClient) Delete

func (c *ReferrerClient) Delete() *ReferrerDelete

Delete returns a delete builder for Referrer.

func (*ReferrerClient) DeleteOne

func (c *ReferrerClient) DeleteOne(r *Referrer) *ReferrerDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ReferrerClient) DeleteOneID

func (c *ReferrerClient) DeleteOneID(id uuid.UUID) *ReferrerDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ReferrerClient) Get

func (c *ReferrerClient) Get(ctx context.Context, id uuid.UUID) (*Referrer, error)

Get returns a Referrer entity by its id.

func (*ReferrerClient) GetX

func (c *ReferrerClient) GetX(ctx context.Context, id uuid.UUID) *Referrer

GetX is like Get, but panics if an error occurs.

func (*ReferrerClient) Hooks

func (c *ReferrerClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ReferrerClient) Intercept

func (c *ReferrerClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `referrer.Intercept(f(g(h())))`.

func (*ReferrerClient) Interceptors

func (c *ReferrerClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ReferrerClient) MapCreateBulk added in v0.91.6

func (c *ReferrerClient) MapCreateBulk(slice any, setFunc func(*ReferrerCreate, int)) *ReferrerCreateBulk

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 (*ReferrerClient) Query

func (c *ReferrerClient) Query() *ReferrerQuery

Query returns a query builder for Referrer.

func (*ReferrerClient) QueryReferences

func (c *ReferrerClient) QueryReferences(r *Referrer) *ReferrerQuery

QueryReferences queries the references edge of a Referrer.

func (*ReferrerClient) QueryReferredBy

func (c *ReferrerClient) QueryReferredBy(r *Referrer) *ReferrerQuery

QueryReferredBy queries the referred_by edge of a Referrer.

func (*ReferrerClient) QueryWorkflows

func (c *ReferrerClient) QueryWorkflows(r *Referrer) *WorkflowQuery

QueryWorkflows queries the workflows edge of a Referrer.

func (*ReferrerClient) Update

func (c *ReferrerClient) Update() *ReferrerUpdate

Update returns an update builder for Referrer.

func (*ReferrerClient) UpdateOne

func (c *ReferrerClient) UpdateOne(r *Referrer) *ReferrerUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ReferrerClient) UpdateOneID

func (c *ReferrerClient) UpdateOneID(id uuid.UUID) *ReferrerUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ReferrerClient) Use

func (c *ReferrerClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `referrer.Hooks(f(g(h())))`.

type ReferrerCreate

type ReferrerCreate struct {
	// contains filtered or unexported fields
}

ReferrerCreate is the builder for creating a Referrer entity.

func (*ReferrerCreate) AddReferenceIDs

func (rc *ReferrerCreate) AddReferenceIDs(ids ...uuid.UUID) *ReferrerCreate

AddReferenceIDs adds the "references" edge to the Referrer entity by IDs.

func (*ReferrerCreate) AddReferences

func (rc *ReferrerCreate) AddReferences(r ...*Referrer) *ReferrerCreate

AddReferences adds the "references" edges to the Referrer entity.

func (*ReferrerCreate) AddReferredBy

func (rc *ReferrerCreate) AddReferredBy(r ...*Referrer) *ReferrerCreate

AddReferredBy adds the "referred_by" edges to the Referrer entity.

func (*ReferrerCreate) AddReferredByIDs

func (rc *ReferrerCreate) AddReferredByIDs(ids ...uuid.UUID) *ReferrerCreate

AddReferredByIDs adds the "referred_by" edge to the Referrer entity by IDs.

func (*ReferrerCreate) AddWorkflowIDs

func (rc *ReferrerCreate) AddWorkflowIDs(ids ...uuid.UUID) *ReferrerCreate

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*ReferrerCreate) AddWorkflows

func (rc *ReferrerCreate) AddWorkflows(w ...*Workflow) *ReferrerCreate

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*ReferrerCreate) Exec

func (rc *ReferrerCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ReferrerCreate) ExecX

func (rc *ReferrerCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReferrerCreate) Mutation

func (rc *ReferrerCreate) Mutation() *ReferrerMutation

Mutation returns the ReferrerMutation object of the builder.

func (*ReferrerCreate) Save

func (rc *ReferrerCreate) Save(ctx context.Context) (*Referrer, error)

Save creates the Referrer in the database.

func (*ReferrerCreate) SaveX

func (rc *ReferrerCreate) SaveX(ctx context.Context) *Referrer

SaveX calls Save and panics if Save returns an error.

func (*ReferrerCreate) SetAnnotations

func (rc *ReferrerCreate) SetAnnotations(m map[string]string) *ReferrerCreate

SetAnnotations sets the "annotations" field.

func (*ReferrerCreate) SetCreatedAt

func (rc *ReferrerCreate) SetCreatedAt(t time.Time) *ReferrerCreate

SetCreatedAt sets the "created_at" field.

func (*ReferrerCreate) SetDigest

func (rc *ReferrerCreate) SetDigest(s string) *ReferrerCreate

SetDigest sets the "digest" field.

func (*ReferrerCreate) SetDownloadable

func (rc *ReferrerCreate) SetDownloadable(b bool) *ReferrerCreate

SetDownloadable sets the "downloadable" field.

func (*ReferrerCreate) SetID

func (rc *ReferrerCreate) SetID(u uuid.UUID) *ReferrerCreate

SetID sets the "id" field.

func (*ReferrerCreate) SetKind

func (rc *ReferrerCreate) SetKind(s string) *ReferrerCreate

SetKind sets the "kind" field.

func (*ReferrerCreate) SetMetadata

func (rc *ReferrerCreate) SetMetadata(m map[string]string) *ReferrerCreate

SetMetadata sets the "metadata" field.

func (*ReferrerCreate) SetNillableCreatedAt

func (rc *ReferrerCreate) SetNillableCreatedAt(t *time.Time) *ReferrerCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ReferrerCreate) SetNillableID

func (rc *ReferrerCreate) SetNillableID(u *uuid.UUID) *ReferrerCreate

SetNillableID sets the "id" field if the given value is not nil.

type ReferrerCreateBulk

type ReferrerCreateBulk struct {
	// contains filtered or unexported fields
}

ReferrerCreateBulk is the builder for creating many Referrer entities in bulk.

func (*ReferrerCreateBulk) Exec

func (rcb *ReferrerCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ReferrerCreateBulk) ExecX

func (rcb *ReferrerCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReferrerCreateBulk) Save

func (rcb *ReferrerCreateBulk) Save(ctx context.Context) ([]*Referrer, error)

Save creates the Referrer entities in the database.

func (*ReferrerCreateBulk) SaveX

func (rcb *ReferrerCreateBulk) SaveX(ctx context.Context) []*Referrer

SaveX is like Save, but panics if an error occurs.

type ReferrerDelete

type ReferrerDelete struct {
	// contains filtered or unexported fields
}

ReferrerDelete is the builder for deleting a Referrer entity.

func (*ReferrerDelete) Exec

func (rd *ReferrerDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ReferrerDelete) ExecX

func (rd *ReferrerDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ReferrerDelete) Where

func (rd *ReferrerDelete) Where(ps ...predicate.Referrer) *ReferrerDelete

Where appends a list predicates to the ReferrerDelete builder.

type ReferrerDeleteOne

type ReferrerDeleteOne struct {
	// contains filtered or unexported fields
}

ReferrerDeleteOne is the builder for deleting a single Referrer entity.

func (*ReferrerDeleteOne) Exec

func (rdo *ReferrerDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ReferrerDeleteOne) ExecX

func (rdo *ReferrerDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReferrerDeleteOne) Where

Where appends a list predicates to the ReferrerDelete builder.

type ReferrerEdges

type ReferrerEdges struct {
	// ReferredBy holds the value of the referred_by edge.
	ReferredBy []*Referrer `json:"referred_by,omitempty"`
	// References holds the value of the references edge.
	References []*Referrer `json:"references,omitempty"`
	// Workflows holds the value of the workflows edge.
	Workflows []*Workflow `json:"workflows,omitempty"`
	// contains filtered or unexported fields
}

ReferrerEdges holds the relations/edges for other nodes in the graph.

func (ReferrerEdges) ReferencesOrErr

func (e ReferrerEdges) ReferencesOrErr() ([]*Referrer, error)

ReferencesOrErr returns the References value or an error if the edge was not loaded in eager-loading.

func (ReferrerEdges) ReferredByOrErr

func (e ReferrerEdges) ReferredByOrErr() ([]*Referrer, error)

ReferredByOrErr returns the ReferredBy value or an error if the edge was not loaded in eager-loading.

func (ReferrerEdges) WorkflowsOrErr

func (e ReferrerEdges) WorkflowsOrErr() ([]*Workflow, error)

WorkflowsOrErr returns the Workflows value or an error if the edge was not loaded in eager-loading.

type ReferrerGroupBy

type ReferrerGroupBy struct {
	// contains filtered or unexported fields
}

ReferrerGroupBy is the group-by builder for Referrer entities.

func (*ReferrerGroupBy) Aggregate

func (rgb *ReferrerGroupBy) Aggregate(fns ...AggregateFunc) *ReferrerGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ReferrerGroupBy) Bool

func (s *ReferrerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ReferrerGroupBy) BoolX

func (s *ReferrerGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ReferrerGroupBy) Bools

func (s *ReferrerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ReferrerGroupBy) BoolsX

func (s *ReferrerGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ReferrerGroupBy) Float64

func (s *ReferrerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ReferrerGroupBy) Float64X

func (s *ReferrerGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ReferrerGroupBy) Float64s

func (s *ReferrerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ReferrerGroupBy) Float64sX

func (s *ReferrerGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ReferrerGroupBy) Int

func (s *ReferrerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ReferrerGroupBy) IntX

func (s *ReferrerGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ReferrerGroupBy) Ints

func (s *ReferrerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ReferrerGroupBy) IntsX

func (s *ReferrerGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ReferrerGroupBy) Scan

func (rgb *ReferrerGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ReferrerGroupBy) ScanX

func (s *ReferrerGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ReferrerGroupBy) String

func (s *ReferrerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ReferrerGroupBy) StringX

func (s *ReferrerGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ReferrerGroupBy) Strings

func (s *ReferrerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ReferrerGroupBy) StringsX

func (s *ReferrerGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ReferrerMutation

type ReferrerMutation struct {
	// contains filtered or unexported fields
}

ReferrerMutation represents an operation that mutates the Referrer nodes in the graph.

func (*ReferrerMutation) AddField

func (m *ReferrerMutation) 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 (*ReferrerMutation) AddReferenceIDs

func (m *ReferrerMutation) AddReferenceIDs(ids ...uuid.UUID)

AddReferenceIDs adds the "references" edge to the Referrer entity by ids.

func (*ReferrerMutation) AddReferredByIDs

func (m *ReferrerMutation) AddReferredByIDs(ids ...uuid.UUID)

AddReferredByIDs adds the "referred_by" edge to the Referrer entity by ids.

func (*ReferrerMutation) AddWorkflowIDs

func (m *ReferrerMutation) AddWorkflowIDs(ids ...uuid.UUID)

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by ids.

func (*ReferrerMutation) AddedEdges

func (m *ReferrerMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ReferrerMutation) AddedField

func (m *ReferrerMutation) 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 (*ReferrerMutation) AddedFields

func (m *ReferrerMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ReferrerMutation) AddedIDs

func (m *ReferrerMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ReferrerMutation) Annotations

func (m *ReferrerMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*ReferrerMutation) AnnotationsCleared

func (m *ReferrerMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*ReferrerMutation) ClearAnnotations

func (m *ReferrerMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*ReferrerMutation) ClearEdge

func (m *ReferrerMutation) 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 (*ReferrerMutation) ClearField

func (m *ReferrerMutation) 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 (*ReferrerMutation) ClearMetadata

func (m *ReferrerMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*ReferrerMutation) ClearReferences

func (m *ReferrerMutation) ClearReferences()

ClearReferences clears the "references" edge to the Referrer entity.

func (*ReferrerMutation) ClearReferredBy

func (m *ReferrerMutation) ClearReferredBy()

ClearReferredBy clears the "referred_by" edge to the Referrer entity.

func (*ReferrerMutation) ClearWorkflows

func (m *ReferrerMutation) ClearWorkflows()

ClearWorkflows clears the "workflows" edge to the Workflow entity.

func (*ReferrerMutation) ClearedEdges

func (m *ReferrerMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ReferrerMutation) ClearedFields

func (m *ReferrerMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ReferrerMutation) Client

func (m ReferrerMutation) 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 (*ReferrerMutation) CreatedAt

func (m *ReferrerMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ReferrerMutation) Digest

func (m *ReferrerMutation) Digest() (r string, exists bool)

Digest returns the value of the "digest" field in the mutation.

func (*ReferrerMutation) Downloadable

func (m *ReferrerMutation) Downloadable() (r bool, exists bool)

Downloadable returns the value of the "downloadable" field in the mutation.

func (*ReferrerMutation) EdgeCleared

func (m *ReferrerMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ReferrerMutation) Field

func (m *ReferrerMutation) 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 (*ReferrerMutation) FieldCleared

func (m *ReferrerMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ReferrerMutation) Fields

func (m *ReferrerMutation) 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 (*ReferrerMutation) ID

func (m *ReferrerMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ReferrerMutation) IDs

func (m *ReferrerMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*ReferrerMutation) Kind

func (m *ReferrerMutation) Kind() (r string, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*ReferrerMutation) Metadata

func (m *ReferrerMutation) Metadata() (r map[string]string, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*ReferrerMutation) MetadataCleared

func (m *ReferrerMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*ReferrerMutation) OldAnnotations

func (m *ReferrerMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the Referrer entity. If the Referrer 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 (*ReferrerMutation) OldCreatedAt

func (m *ReferrerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Referrer entity. If the Referrer 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 (*ReferrerMutation) OldDigest

func (m *ReferrerMutation) OldDigest(ctx context.Context) (v string, err error)

OldDigest returns the old "digest" field's value of the Referrer entity. If the Referrer 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 (*ReferrerMutation) OldDownloadable

func (m *ReferrerMutation) OldDownloadable(ctx context.Context) (v bool, err error)

OldDownloadable returns the old "downloadable" field's value of the Referrer entity. If the Referrer 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 (*ReferrerMutation) OldField

func (m *ReferrerMutation) 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 (*ReferrerMutation) OldKind

func (m *ReferrerMutation) OldKind(ctx context.Context) (v string, err error)

OldKind returns the old "kind" field's value of the Referrer entity. If the Referrer 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 (*ReferrerMutation) OldMetadata

func (m *ReferrerMutation) OldMetadata(ctx context.Context) (v map[string]string, err error)

OldMetadata returns the old "metadata" field's value of the Referrer entity. If the Referrer 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 (*ReferrerMutation) Op

func (m *ReferrerMutation) Op() Op

Op returns the operation name.

func (*ReferrerMutation) ReferencesCleared

func (m *ReferrerMutation) ReferencesCleared() bool

ReferencesCleared reports if the "references" edge to the Referrer entity was cleared.

func (*ReferrerMutation) ReferencesIDs

func (m *ReferrerMutation) ReferencesIDs() (ids []uuid.UUID)

ReferencesIDs returns the "references" edge IDs in the mutation.

func (*ReferrerMutation) ReferredByCleared

func (m *ReferrerMutation) ReferredByCleared() bool

ReferredByCleared reports if the "referred_by" edge to the Referrer entity was cleared.

func (*ReferrerMutation) ReferredByIDs

func (m *ReferrerMutation) ReferredByIDs() (ids []uuid.UUID)

ReferredByIDs returns the "referred_by" edge IDs in the mutation.

func (*ReferrerMutation) RemoveReferenceIDs

func (m *ReferrerMutation) RemoveReferenceIDs(ids ...uuid.UUID)

RemoveReferenceIDs removes the "references" edge to the Referrer entity by IDs.

func (*ReferrerMutation) RemoveReferredByIDs

func (m *ReferrerMutation) RemoveReferredByIDs(ids ...uuid.UUID)

RemoveReferredByIDs removes the "referred_by" edge to the Referrer entity by IDs.

func (*ReferrerMutation) RemoveWorkflowIDs

func (m *ReferrerMutation) RemoveWorkflowIDs(ids ...uuid.UUID)

RemoveWorkflowIDs removes the "workflows" edge to the Workflow entity by IDs.

func (*ReferrerMutation) RemovedEdges

func (m *ReferrerMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ReferrerMutation) RemovedIDs

func (m *ReferrerMutation) 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 (*ReferrerMutation) RemovedReferencesIDs

func (m *ReferrerMutation) RemovedReferencesIDs() (ids []uuid.UUID)

RemovedReferences returns the removed IDs of the "references" edge to the Referrer entity.

func (*ReferrerMutation) RemovedReferredByIDs

func (m *ReferrerMutation) RemovedReferredByIDs() (ids []uuid.UUID)

RemovedReferredBy returns the removed IDs of the "referred_by" edge to the Referrer entity.

func (*ReferrerMutation) RemovedWorkflowsIDs

func (m *ReferrerMutation) RemovedWorkflowsIDs() (ids []uuid.UUID)

RemovedWorkflows returns the removed IDs of the "workflows" edge to the Workflow entity.

func (*ReferrerMutation) ResetAnnotations

func (m *ReferrerMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*ReferrerMutation) ResetCreatedAt

func (m *ReferrerMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ReferrerMutation) ResetDigest

func (m *ReferrerMutation) ResetDigest()

ResetDigest resets all changes to the "digest" field.

func (*ReferrerMutation) ResetDownloadable

func (m *ReferrerMutation) ResetDownloadable()

ResetDownloadable resets all changes to the "downloadable" field.

func (*ReferrerMutation) ResetEdge

func (m *ReferrerMutation) 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 (*ReferrerMutation) ResetField

func (m *ReferrerMutation) 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 (*ReferrerMutation) ResetKind

func (m *ReferrerMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*ReferrerMutation) ResetMetadata

func (m *ReferrerMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*ReferrerMutation) ResetReferences

func (m *ReferrerMutation) ResetReferences()

ResetReferences resets all changes to the "references" edge.

func (*ReferrerMutation) ResetReferredBy

func (m *ReferrerMutation) ResetReferredBy()

ResetReferredBy resets all changes to the "referred_by" edge.

func (*ReferrerMutation) ResetWorkflows

func (m *ReferrerMutation) ResetWorkflows()

ResetWorkflows resets all changes to the "workflows" edge.

func (*ReferrerMutation) SetAnnotations

func (m *ReferrerMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*ReferrerMutation) SetCreatedAt

func (m *ReferrerMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ReferrerMutation) SetDigest

func (m *ReferrerMutation) SetDigest(s string)

SetDigest sets the "digest" field.

func (*ReferrerMutation) SetDownloadable

func (m *ReferrerMutation) SetDownloadable(b bool)

SetDownloadable sets the "downloadable" field.

func (*ReferrerMutation) SetField

func (m *ReferrerMutation) 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 (*ReferrerMutation) SetID

func (m *ReferrerMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Referrer entities.

func (*ReferrerMutation) SetKind

func (m *ReferrerMutation) SetKind(s string)

SetKind sets the "kind" field.

func (*ReferrerMutation) SetMetadata

func (m *ReferrerMutation) SetMetadata(value map[string]string)

SetMetadata sets the "metadata" field.

func (*ReferrerMutation) SetOp

func (m *ReferrerMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (ReferrerMutation) Tx

func (m ReferrerMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ReferrerMutation) Type

func (m *ReferrerMutation) Type() string

Type returns the node type of this mutation (Referrer).

func (*ReferrerMutation) Where

func (m *ReferrerMutation) Where(ps ...predicate.Referrer)

Where appends a list predicates to the ReferrerMutation builder.

func (*ReferrerMutation) WhereP

func (m *ReferrerMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ReferrerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ReferrerMutation) WorkflowsCleared

func (m *ReferrerMutation) WorkflowsCleared() bool

WorkflowsCleared reports if the "workflows" edge to the Workflow entity was cleared.

func (*ReferrerMutation) WorkflowsIDs

func (m *ReferrerMutation) WorkflowsIDs() (ids []uuid.UUID)

WorkflowsIDs returns the "workflows" edge IDs in the mutation.

type ReferrerQuery

type ReferrerQuery struct {
	// contains filtered or unexported fields
}

ReferrerQuery is the builder for querying Referrer entities.

func (*ReferrerQuery) Aggregate

func (rq *ReferrerQuery) Aggregate(fns ...AggregateFunc) *ReferrerSelect

Aggregate returns a ReferrerSelect configured with the given aggregations.

func (*ReferrerQuery) All

func (rq *ReferrerQuery) All(ctx context.Context) ([]*Referrer, error)

All executes the query and returns a list of Referrers.

func (*ReferrerQuery) AllX

func (rq *ReferrerQuery) AllX(ctx context.Context) []*Referrer

AllX is like All, but panics if an error occurs.

func (*ReferrerQuery) Clone

func (rq *ReferrerQuery) Clone() *ReferrerQuery

Clone returns a duplicate of the ReferrerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ReferrerQuery) Count

func (rq *ReferrerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ReferrerQuery) CountX

func (rq *ReferrerQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ReferrerQuery) Exist

func (rq *ReferrerQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ReferrerQuery) ExistX

func (rq *ReferrerQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ReferrerQuery) First

func (rq *ReferrerQuery) First(ctx context.Context) (*Referrer, error)

First returns the first Referrer entity from the query. Returns a *NotFoundError when no Referrer was found.

func (*ReferrerQuery) FirstID

func (rq *ReferrerQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Referrer ID from the query. Returns a *NotFoundError when no Referrer ID was found.

func (*ReferrerQuery) FirstIDX

func (rq *ReferrerQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ReferrerQuery) FirstX

func (rq *ReferrerQuery) FirstX(ctx context.Context) *Referrer

FirstX is like First, but panics if an error occurs.

func (*ReferrerQuery) ForShare added in v0.94.3

func (rq *ReferrerQuery) ForShare(opts ...sql.LockOption) *ReferrerQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*ReferrerQuery) ForUpdate added in v0.94.3

func (rq *ReferrerQuery) ForUpdate(opts ...sql.LockOption) *ReferrerQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*ReferrerQuery) GroupBy

func (rq *ReferrerQuery) GroupBy(field string, fields ...string) *ReferrerGroupBy

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 {
	Digest string `json:"digest,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Referrer.Query().
	GroupBy(referrer.FieldDigest).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ReferrerQuery) IDs

func (rq *ReferrerQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Referrer IDs.

func (*ReferrerQuery) IDsX

func (rq *ReferrerQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ReferrerQuery) Limit

func (rq *ReferrerQuery) Limit(limit int) *ReferrerQuery

Limit the number of records to be returned by this query.

func (*ReferrerQuery) Modify

func (rq *ReferrerQuery) Modify(modifiers ...func(s *sql.Selector)) *ReferrerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ReferrerQuery) Offset

func (rq *ReferrerQuery) Offset(offset int) *ReferrerQuery

Offset to start from.

func (*ReferrerQuery) Only

func (rq *ReferrerQuery) Only(ctx context.Context) (*Referrer, error)

Only returns a single Referrer entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Referrer entity is found. Returns a *NotFoundError when no Referrer entities are found.

func (*ReferrerQuery) OnlyID

func (rq *ReferrerQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Referrer ID in the query. Returns a *NotSingularError when more than one Referrer ID is found. Returns a *NotFoundError when no entities are found.

func (*ReferrerQuery) OnlyIDX

func (rq *ReferrerQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ReferrerQuery) OnlyX

func (rq *ReferrerQuery) OnlyX(ctx context.Context) *Referrer

OnlyX is like Only, but panics if an error occurs.

func (*ReferrerQuery) Order

Order specifies how the records should be ordered.

func (*ReferrerQuery) QueryReferences

func (rq *ReferrerQuery) QueryReferences() *ReferrerQuery

QueryReferences chains the current query on the "references" edge.

func (*ReferrerQuery) QueryReferredBy

func (rq *ReferrerQuery) QueryReferredBy() *ReferrerQuery

QueryReferredBy chains the current query on the "referred_by" edge.

func (*ReferrerQuery) QueryWorkflows

func (rq *ReferrerQuery) QueryWorkflows() *WorkflowQuery

QueryWorkflows chains the current query on the "workflows" edge.

func (*ReferrerQuery) Select

func (rq *ReferrerQuery) Select(fields ...string) *ReferrerSelect

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 {
	Digest string `json:"digest,omitempty"`
}

client.Referrer.Query().
	Select(referrer.FieldDigest).
	Scan(ctx, &v)

func (*ReferrerQuery) Unique

func (rq *ReferrerQuery) Unique(unique bool) *ReferrerQuery

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 (*ReferrerQuery) Where

func (rq *ReferrerQuery) Where(ps ...predicate.Referrer) *ReferrerQuery

Where adds a new predicate for the ReferrerQuery builder.

func (*ReferrerQuery) WithReferences

func (rq *ReferrerQuery) WithReferences(opts ...func(*ReferrerQuery)) *ReferrerQuery

WithReferences tells the query-builder to eager-load the nodes that are connected to the "references" edge. The optional arguments are used to configure the query builder of the edge.

func (*ReferrerQuery) WithReferredBy

func (rq *ReferrerQuery) WithReferredBy(opts ...func(*ReferrerQuery)) *ReferrerQuery

WithReferredBy tells the query-builder to eager-load the nodes that are connected to the "referred_by" edge. The optional arguments are used to configure the query builder of the edge.

func (*ReferrerQuery) WithWorkflows

func (rq *ReferrerQuery) WithWorkflows(opts ...func(*WorkflowQuery)) *ReferrerQuery

WithWorkflows tells the query-builder to eager-load the nodes that are connected to the "workflows" edge. The optional arguments are used to configure the query builder of the edge.

type ReferrerSelect

type ReferrerSelect struct {
	*ReferrerQuery
	// contains filtered or unexported fields
}

ReferrerSelect is the builder for selecting fields of Referrer entities.

func (*ReferrerSelect) Aggregate

func (rs *ReferrerSelect) Aggregate(fns ...AggregateFunc) *ReferrerSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ReferrerSelect) Bool

func (s *ReferrerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ReferrerSelect) BoolX

func (s *ReferrerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ReferrerSelect) Bools

func (s *ReferrerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ReferrerSelect) BoolsX

func (s *ReferrerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ReferrerSelect) Float64

func (s *ReferrerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ReferrerSelect) Float64X

func (s *ReferrerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ReferrerSelect) Float64s

func (s *ReferrerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ReferrerSelect) Float64sX

func (s *ReferrerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ReferrerSelect) Int

func (s *ReferrerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ReferrerSelect) IntX

func (s *ReferrerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ReferrerSelect) Ints

func (s *ReferrerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ReferrerSelect) IntsX

func (s *ReferrerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ReferrerSelect) Modify

func (rs *ReferrerSelect) Modify(modifiers ...func(s *sql.Selector)) *ReferrerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ReferrerSelect) Scan

func (rs *ReferrerSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ReferrerSelect) ScanX

func (s *ReferrerSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ReferrerSelect) String

func (s *ReferrerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ReferrerSelect) StringX

func (s *ReferrerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ReferrerSelect) Strings

func (s *ReferrerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ReferrerSelect) StringsX

func (s *ReferrerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ReferrerUpdate

type ReferrerUpdate struct {
	// contains filtered or unexported fields
}

ReferrerUpdate is the builder for updating Referrer entities.

func (*ReferrerUpdate) AddReferenceIDs

func (ru *ReferrerUpdate) AddReferenceIDs(ids ...uuid.UUID) *ReferrerUpdate

AddReferenceIDs adds the "references" edge to the Referrer entity by IDs.

func (*ReferrerUpdate) AddReferences

func (ru *ReferrerUpdate) AddReferences(r ...*Referrer) *ReferrerUpdate

AddReferences adds the "references" edges to the Referrer entity.

func (*ReferrerUpdate) AddWorkflowIDs

func (ru *ReferrerUpdate) AddWorkflowIDs(ids ...uuid.UUID) *ReferrerUpdate

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*ReferrerUpdate) AddWorkflows

func (ru *ReferrerUpdate) AddWorkflows(w ...*Workflow) *ReferrerUpdate

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*ReferrerUpdate) ClearReferences

func (ru *ReferrerUpdate) ClearReferences() *ReferrerUpdate

ClearReferences clears all "references" edges to the Referrer entity.

func (*ReferrerUpdate) ClearWorkflows

func (ru *ReferrerUpdate) ClearWorkflows() *ReferrerUpdate

ClearWorkflows clears all "workflows" edges to the Workflow entity.

func (*ReferrerUpdate) Exec

func (ru *ReferrerUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ReferrerUpdate) ExecX

func (ru *ReferrerUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReferrerUpdate) Modify

func (ru *ReferrerUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ReferrerUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ReferrerUpdate) Mutation

func (ru *ReferrerUpdate) Mutation() *ReferrerMutation

Mutation returns the ReferrerMutation object of the builder.

func (*ReferrerUpdate) RemoveReferenceIDs

func (ru *ReferrerUpdate) RemoveReferenceIDs(ids ...uuid.UUID) *ReferrerUpdate

RemoveReferenceIDs removes the "references" edge to Referrer entities by IDs.

func (*ReferrerUpdate) RemoveReferences

func (ru *ReferrerUpdate) RemoveReferences(r ...*Referrer) *ReferrerUpdate

RemoveReferences removes "references" edges to Referrer entities.

func (*ReferrerUpdate) RemoveWorkflowIDs

func (ru *ReferrerUpdate) RemoveWorkflowIDs(ids ...uuid.UUID) *ReferrerUpdate

RemoveWorkflowIDs removes the "workflows" edge to Workflow entities by IDs.

func (*ReferrerUpdate) RemoveWorkflows

func (ru *ReferrerUpdate) RemoveWorkflows(w ...*Workflow) *ReferrerUpdate

RemoveWorkflows removes "workflows" edges to Workflow entities.

func (*ReferrerUpdate) Save

func (ru *ReferrerUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ReferrerUpdate) SaveX

func (ru *ReferrerUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ReferrerUpdate) Where

func (ru *ReferrerUpdate) Where(ps ...predicate.Referrer) *ReferrerUpdate

Where appends a list predicates to the ReferrerUpdate builder.

type ReferrerUpdateOne

type ReferrerUpdateOne struct {
	// contains filtered or unexported fields
}

ReferrerUpdateOne is the builder for updating a single Referrer entity.

func (*ReferrerUpdateOne) AddReferenceIDs

func (ruo *ReferrerUpdateOne) AddReferenceIDs(ids ...uuid.UUID) *ReferrerUpdateOne

AddReferenceIDs adds the "references" edge to the Referrer entity by IDs.

func (*ReferrerUpdateOne) AddReferences

func (ruo *ReferrerUpdateOne) AddReferences(r ...*Referrer) *ReferrerUpdateOne

AddReferences adds the "references" edges to the Referrer entity.

func (*ReferrerUpdateOne) AddWorkflowIDs

func (ruo *ReferrerUpdateOne) AddWorkflowIDs(ids ...uuid.UUID) *ReferrerUpdateOne

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*ReferrerUpdateOne) AddWorkflows

func (ruo *ReferrerUpdateOne) AddWorkflows(w ...*Workflow) *ReferrerUpdateOne

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*ReferrerUpdateOne) ClearReferences

func (ruo *ReferrerUpdateOne) ClearReferences() *ReferrerUpdateOne

ClearReferences clears all "references" edges to the Referrer entity.

func (*ReferrerUpdateOne) ClearWorkflows

func (ruo *ReferrerUpdateOne) ClearWorkflows() *ReferrerUpdateOne

ClearWorkflows clears all "workflows" edges to the Workflow entity.

func (*ReferrerUpdateOne) Exec

func (ruo *ReferrerUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ReferrerUpdateOne) ExecX

func (ruo *ReferrerUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReferrerUpdateOne) Modify

func (ruo *ReferrerUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ReferrerUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ReferrerUpdateOne) Mutation

func (ruo *ReferrerUpdateOne) Mutation() *ReferrerMutation

Mutation returns the ReferrerMutation object of the builder.

func (*ReferrerUpdateOne) RemoveReferenceIDs

func (ruo *ReferrerUpdateOne) RemoveReferenceIDs(ids ...uuid.UUID) *ReferrerUpdateOne

RemoveReferenceIDs removes the "references" edge to Referrer entities by IDs.

func (*ReferrerUpdateOne) RemoveReferences

func (ruo *ReferrerUpdateOne) RemoveReferences(r ...*Referrer) *ReferrerUpdateOne

RemoveReferences removes "references" edges to Referrer entities.

func (*ReferrerUpdateOne) RemoveWorkflowIDs

func (ruo *ReferrerUpdateOne) RemoveWorkflowIDs(ids ...uuid.UUID) *ReferrerUpdateOne

RemoveWorkflowIDs removes the "workflows" edge to Workflow entities by IDs.

func (*ReferrerUpdateOne) RemoveWorkflows

func (ruo *ReferrerUpdateOne) RemoveWorkflows(w ...*Workflow) *ReferrerUpdateOne

RemoveWorkflows removes "workflows" edges to Workflow entities.

func (*ReferrerUpdateOne) Save

func (ruo *ReferrerUpdateOne) Save(ctx context.Context) (*Referrer, error)

Save executes the query and returns the updated Referrer entity.

func (*ReferrerUpdateOne) SaveX

func (ruo *ReferrerUpdateOne) SaveX(ctx context.Context) *Referrer

SaveX is like Save, but panics if an error occurs.

func (*ReferrerUpdateOne) Select

func (ruo *ReferrerUpdateOne) Select(field string, fields ...string) *ReferrerUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ReferrerUpdateOne) Where

Where appends a list predicates to the ReferrerUpdate builder.

type Referrers

type Referrers []*Referrer

Referrers is a parsable slice of Referrer.

type RobotAccount

type RobotAccount struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// RevokedAt holds the value of the "revoked_at" field.
	RevokedAt time.Time `json:"revoked_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RobotAccountQuery when eager-loading is set.
	Edges RobotAccountEdges `json:"edges"`
	// contains filtered or unexported fields
}

RobotAccount is the model entity for the RobotAccount schema.

func (*RobotAccount) QueryWorkflow

func (ra *RobotAccount) QueryWorkflow() *WorkflowQuery

QueryWorkflow queries the "workflow" edge of the RobotAccount entity.

func (*RobotAccount) String

func (ra *RobotAccount) String() string

String implements the fmt.Stringer.

func (*RobotAccount) Unwrap

func (ra *RobotAccount) Unwrap() *RobotAccount

Unwrap unwraps the RobotAccount 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 (*RobotAccount) Update

func (ra *RobotAccount) Update() *RobotAccountUpdateOne

Update returns a builder for updating this RobotAccount. Note that you need to call RobotAccount.Unwrap() before calling this method if this RobotAccount was returned from a transaction, and the transaction was committed or rolled back.

func (*RobotAccount) Value

func (ra *RobotAccount) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the RobotAccount. This includes values selected through modifiers, order, etc.

type RobotAccountClient

type RobotAccountClient struct {
	// contains filtered or unexported fields
}

RobotAccountClient is a client for the RobotAccount schema.

func NewRobotAccountClient

func NewRobotAccountClient(c config) *RobotAccountClient

NewRobotAccountClient returns a client for the RobotAccount from the given config.

func (*RobotAccountClient) Create

Create returns a builder for creating a RobotAccount entity.

func (*RobotAccountClient) CreateBulk

func (c *RobotAccountClient) CreateBulk(builders ...*RobotAccountCreate) *RobotAccountCreateBulk

CreateBulk returns a builder for creating a bulk of RobotAccount entities.

func (*RobotAccountClient) Delete

Delete returns a delete builder for RobotAccount.

func (*RobotAccountClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RobotAccountClient) DeleteOneID

func (c *RobotAccountClient) DeleteOneID(id uuid.UUID) *RobotAccountDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RobotAccountClient) Get

Get returns a RobotAccount entity by its id.

func (*RobotAccountClient) GetX

GetX is like Get, but panics if an error occurs.

func (*RobotAccountClient) Hooks

func (c *RobotAccountClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RobotAccountClient) Intercept

func (c *RobotAccountClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `robotaccount.Intercept(f(g(h())))`.

func (*RobotAccountClient) Interceptors

func (c *RobotAccountClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RobotAccountClient) MapCreateBulk added in v0.91.6

func (c *RobotAccountClient) MapCreateBulk(slice any, setFunc func(*RobotAccountCreate, int)) *RobotAccountCreateBulk

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 (*RobotAccountClient) Query

Query returns a query builder for RobotAccount.

func (*RobotAccountClient) QueryWorkflow

func (c *RobotAccountClient) QueryWorkflow(ra *RobotAccount) *WorkflowQuery

QueryWorkflow queries the workflow edge of a RobotAccount.

func (*RobotAccountClient) Update

Update returns an update builder for RobotAccount.

func (*RobotAccountClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RobotAccountClient) UpdateOneID

func (c *RobotAccountClient) UpdateOneID(id uuid.UUID) *RobotAccountUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RobotAccountClient) Use

func (c *RobotAccountClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `robotaccount.Hooks(f(g(h())))`.

type RobotAccountCreate

type RobotAccountCreate struct {
	// contains filtered or unexported fields
}

RobotAccountCreate is the builder for creating a RobotAccount entity.

func (*RobotAccountCreate) Exec

func (rac *RobotAccountCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RobotAccountCreate) ExecX

func (rac *RobotAccountCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RobotAccountCreate) Mutation

func (rac *RobotAccountCreate) Mutation() *RobotAccountMutation

Mutation returns the RobotAccountMutation object of the builder.

func (*RobotAccountCreate) Save

Save creates the RobotAccount in the database.

func (*RobotAccountCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*RobotAccountCreate) SetCreatedAt

func (rac *RobotAccountCreate) SetCreatedAt(t time.Time) *RobotAccountCreate

SetCreatedAt sets the "created_at" field.

func (*RobotAccountCreate) SetID

SetID sets the "id" field.

func (*RobotAccountCreate) SetName

func (rac *RobotAccountCreate) SetName(s string) *RobotAccountCreate

SetName sets the "name" field.

func (*RobotAccountCreate) SetNillableCreatedAt

func (rac *RobotAccountCreate) SetNillableCreatedAt(t *time.Time) *RobotAccountCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RobotAccountCreate) SetNillableID

func (rac *RobotAccountCreate) SetNillableID(u *uuid.UUID) *RobotAccountCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*RobotAccountCreate) SetNillableRevokedAt

func (rac *RobotAccountCreate) SetNillableRevokedAt(t *time.Time) *RobotAccountCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*RobotAccountCreate) SetNillableWorkflowID

func (rac *RobotAccountCreate) SetNillableWorkflowID(id *uuid.UUID) *RobotAccountCreate

SetNillableWorkflowID sets the "workflow" edge to the Workflow entity by ID if the given value is not nil.

func (*RobotAccountCreate) SetRevokedAt

func (rac *RobotAccountCreate) SetRevokedAt(t time.Time) *RobotAccountCreate

SetRevokedAt sets the "revoked_at" field.

func (*RobotAccountCreate) SetWorkflow

func (rac *RobotAccountCreate) SetWorkflow(w *Workflow) *RobotAccountCreate

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*RobotAccountCreate) SetWorkflowID

func (rac *RobotAccountCreate) SetWorkflowID(id uuid.UUID) *RobotAccountCreate

SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.

type RobotAccountCreateBulk

type RobotAccountCreateBulk struct {
	// contains filtered or unexported fields
}

RobotAccountCreateBulk is the builder for creating many RobotAccount entities in bulk.

func (*RobotAccountCreateBulk) Exec

func (racb *RobotAccountCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RobotAccountCreateBulk) ExecX

func (racb *RobotAccountCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RobotAccountCreateBulk) Save

Save creates the RobotAccount entities in the database.

func (*RobotAccountCreateBulk) SaveX

func (racb *RobotAccountCreateBulk) SaveX(ctx context.Context) []*RobotAccount

SaveX is like Save, but panics if an error occurs.

type RobotAccountDelete

type RobotAccountDelete struct {
	// contains filtered or unexported fields
}

RobotAccountDelete is the builder for deleting a RobotAccount entity.

func (*RobotAccountDelete) Exec

func (rad *RobotAccountDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RobotAccountDelete) ExecX

func (rad *RobotAccountDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RobotAccountDelete) Where

Where appends a list predicates to the RobotAccountDelete builder.

type RobotAccountDeleteOne

type RobotAccountDeleteOne struct {
	// contains filtered or unexported fields
}

RobotAccountDeleteOne is the builder for deleting a single RobotAccount entity.

func (*RobotAccountDeleteOne) Exec

func (rado *RobotAccountDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RobotAccountDeleteOne) ExecX

func (rado *RobotAccountDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RobotAccountDeleteOne) Where

Where appends a list predicates to the RobotAccountDelete builder.

type RobotAccountEdges

type RobotAccountEdges struct {
	// Workflow holds the value of the workflow edge.
	Workflow *Workflow `json:"workflow,omitempty"`
	// contains filtered or unexported fields
}

RobotAccountEdges holds the relations/edges for other nodes in the graph.

func (RobotAccountEdges) WorkflowOrErr

func (e RobotAccountEdges) WorkflowOrErr() (*Workflow, error)

WorkflowOrErr returns the Workflow value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type RobotAccountGroupBy

type RobotAccountGroupBy struct {
	// contains filtered or unexported fields
}

RobotAccountGroupBy is the group-by builder for RobotAccount entities.

func (*RobotAccountGroupBy) Aggregate

func (ragb *RobotAccountGroupBy) Aggregate(fns ...AggregateFunc) *RobotAccountGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RobotAccountGroupBy) Bool

func (s *RobotAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RobotAccountGroupBy) BoolX

func (s *RobotAccountGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RobotAccountGroupBy) Bools

func (s *RobotAccountGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RobotAccountGroupBy) BoolsX

func (s *RobotAccountGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RobotAccountGroupBy) Float64

func (s *RobotAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RobotAccountGroupBy) Float64X

func (s *RobotAccountGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RobotAccountGroupBy) Float64s

func (s *RobotAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RobotAccountGroupBy) Float64sX

func (s *RobotAccountGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RobotAccountGroupBy) Int

func (s *RobotAccountGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RobotAccountGroupBy) IntX

func (s *RobotAccountGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RobotAccountGroupBy) Ints

func (s *RobotAccountGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RobotAccountGroupBy) IntsX

func (s *RobotAccountGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RobotAccountGroupBy) Scan

func (ragb *RobotAccountGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RobotAccountGroupBy) ScanX

func (s *RobotAccountGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RobotAccountGroupBy) String

func (s *RobotAccountGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RobotAccountGroupBy) StringX

func (s *RobotAccountGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RobotAccountGroupBy) Strings

func (s *RobotAccountGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RobotAccountGroupBy) StringsX

func (s *RobotAccountGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RobotAccountMutation

type RobotAccountMutation struct {
	// contains filtered or unexported fields
}

RobotAccountMutation represents an operation that mutates the RobotAccount nodes in the graph.

func (*RobotAccountMutation) AddField

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) AddedEdges

func (m *RobotAccountMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RobotAccountMutation) AddedField

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) AddedFields

func (m *RobotAccountMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RobotAccountMutation) AddedIDs

func (m *RobotAccountMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RobotAccountMutation) ClearEdge

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) ClearField

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) ClearRevokedAt

func (m *RobotAccountMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*RobotAccountMutation) ClearWorkflow

func (m *RobotAccountMutation) ClearWorkflow()

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*RobotAccountMutation) ClearedEdges

func (m *RobotAccountMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RobotAccountMutation) ClearedFields

func (m *RobotAccountMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RobotAccountMutation) Client

func (m RobotAccountMutation) 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 (*RobotAccountMutation) CreatedAt

func (m *RobotAccountMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RobotAccountMutation) EdgeCleared

func (m *RobotAccountMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RobotAccountMutation) Field

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) FieldCleared

func (m *RobotAccountMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RobotAccountMutation) Fields

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) ID

func (m *RobotAccountMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RobotAccountMutation) 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 (*RobotAccountMutation) Name

func (m *RobotAccountMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RobotAccountMutation) OldCreatedAt

func (m *RobotAccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the RobotAccount entity. If the RobotAccount 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 (*RobotAccountMutation) OldField

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) OldName

func (m *RobotAccountMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the RobotAccount entity. If the RobotAccount 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 (*RobotAccountMutation) OldRevokedAt

func (m *RobotAccountMutation) OldRevokedAt(ctx context.Context) (v time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the RobotAccount entity. If the RobotAccount 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 (*RobotAccountMutation) Op

func (m *RobotAccountMutation) Op() Op

Op returns the operation name.

func (*RobotAccountMutation) RemovedEdges

func (m *RobotAccountMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RobotAccountMutation) RemovedIDs

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) ResetCreatedAt

func (m *RobotAccountMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RobotAccountMutation) ResetEdge

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) ResetField

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) ResetName

func (m *RobotAccountMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RobotAccountMutation) ResetRevokedAt

func (m *RobotAccountMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*RobotAccountMutation) ResetWorkflow

func (m *RobotAccountMutation) ResetWorkflow()

ResetWorkflow resets all changes to the "workflow" edge.

func (*RobotAccountMutation) RevokedAt

func (m *RobotAccountMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*RobotAccountMutation) RevokedAtCleared

func (m *RobotAccountMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*RobotAccountMutation) SetCreatedAt

func (m *RobotAccountMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RobotAccountMutation) SetField

func (m *RobotAccountMutation) 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 (*RobotAccountMutation) SetID

func (m *RobotAccountMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of RobotAccount entities.

func (*RobotAccountMutation) SetName

func (m *RobotAccountMutation) SetName(s string)

SetName sets the "name" field.

func (*RobotAccountMutation) SetOp

func (m *RobotAccountMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RobotAccountMutation) SetRevokedAt

func (m *RobotAccountMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (*RobotAccountMutation) SetWorkflowID

func (m *RobotAccountMutation) SetWorkflowID(id uuid.UUID)

SetWorkflowID sets the "workflow" edge to the Workflow entity by id.

func (RobotAccountMutation) Tx

func (m RobotAccountMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RobotAccountMutation) Type

func (m *RobotAccountMutation) Type() string

Type returns the node type of this mutation (RobotAccount).

func (*RobotAccountMutation) Where

Where appends a list predicates to the RobotAccountMutation builder.

func (*RobotAccountMutation) WhereP

func (m *RobotAccountMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RobotAccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*RobotAccountMutation) WorkflowCleared

func (m *RobotAccountMutation) WorkflowCleared() bool

WorkflowCleared reports if the "workflow" edge to the Workflow entity was cleared.

func (*RobotAccountMutation) WorkflowID

func (m *RobotAccountMutation) WorkflowID() (id uuid.UUID, exists bool)

WorkflowID returns the "workflow" edge ID in the mutation.

func (*RobotAccountMutation) WorkflowIDs

func (m *RobotAccountMutation) WorkflowIDs() (ids []uuid.UUID)

WorkflowIDs returns the "workflow" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorkflowID instead. It exists only for internal usage by the builders.

type RobotAccountQuery

type RobotAccountQuery struct {
	// contains filtered or unexported fields
}

RobotAccountQuery is the builder for querying RobotAccount entities.

func (*RobotAccountQuery) Aggregate

func (raq *RobotAccountQuery) Aggregate(fns ...AggregateFunc) *RobotAccountSelect

Aggregate returns a RobotAccountSelect configured with the given aggregations.

func (*RobotAccountQuery) All

func (raq *RobotAccountQuery) All(ctx context.Context) ([]*RobotAccount, error)

All executes the query and returns a list of RobotAccounts.

func (*RobotAccountQuery) AllX

func (raq *RobotAccountQuery) AllX(ctx context.Context) []*RobotAccount

AllX is like All, but panics if an error occurs.

func (*RobotAccountQuery) Clone

func (raq *RobotAccountQuery) Clone() *RobotAccountQuery

Clone returns a duplicate of the RobotAccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RobotAccountQuery) Count

func (raq *RobotAccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RobotAccountQuery) CountX

func (raq *RobotAccountQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RobotAccountQuery) Exist

func (raq *RobotAccountQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RobotAccountQuery) ExistX

func (raq *RobotAccountQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RobotAccountQuery) First

func (raq *RobotAccountQuery) First(ctx context.Context) (*RobotAccount, error)

First returns the first RobotAccount entity from the query. Returns a *NotFoundError when no RobotAccount was found.

func (*RobotAccountQuery) FirstID

func (raq *RobotAccountQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first RobotAccount ID from the query. Returns a *NotFoundError when no RobotAccount ID was found.

func (*RobotAccountQuery) FirstIDX

func (raq *RobotAccountQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*RobotAccountQuery) FirstX

func (raq *RobotAccountQuery) FirstX(ctx context.Context) *RobotAccount

FirstX is like First, but panics if an error occurs.

func (*RobotAccountQuery) ForShare added in v0.94.3

func (raq *RobotAccountQuery) ForShare(opts ...sql.LockOption) *RobotAccountQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*RobotAccountQuery) ForUpdate added in v0.94.3

func (raq *RobotAccountQuery) ForUpdate(opts ...sql.LockOption) *RobotAccountQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*RobotAccountQuery) GroupBy

func (raq *RobotAccountQuery) GroupBy(field string, fields ...string) *RobotAccountGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RobotAccount.Query().
	GroupBy(robotaccount.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RobotAccountQuery) IDs

func (raq *RobotAccountQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of RobotAccount IDs.

func (*RobotAccountQuery) IDsX

func (raq *RobotAccountQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*RobotAccountQuery) Limit

func (raq *RobotAccountQuery) Limit(limit int) *RobotAccountQuery

Limit the number of records to be returned by this query.

func (*RobotAccountQuery) Modify

func (raq *RobotAccountQuery) Modify(modifiers ...func(s *sql.Selector)) *RobotAccountSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*RobotAccountQuery) Offset

func (raq *RobotAccountQuery) Offset(offset int) *RobotAccountQuery

Offset to start from.

func (*RobotAccountQuery) Only

func (raq *RobotAccountQuery) Only(ctx context.Context) (*RobotAccount, error)

Only returns a single RobotAccount entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RobotAccount entity is found. Returns a *NotFoundError when no RobotAccount entities are found.

func (*RobotAccountQuery) OnlyID

func (raq *RobotAccountQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only RobotAccount ID in the query. Returns a *NotSingularError when more than one RobotAccount ID is found. Returns a *NotFoundError when no entities are found.

func (*RobotAccountQuery) OnlyIDX

func (raq *RobotAccountQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RobotAccountQuery) OnlyX

func (raq *RobotAccountQuery) OnlyX(ctx context.Context) *RobotAccount

OnlyX is like Only, but panics if an error occurs.

func (*RobotAccountQuery) Order

Order specifies how the records should be ordered.

func (*RobotAccountQuery) QueryWorkflow

func (raq *RobotAccountQuery) QueryWorkflow() *WorkflowQuery

QueryWorkflow chains the current query on the "workflow" edge.

func (*RobotAccountQuery) Select

func (raq *RobotAccountQuery) Select(fields ...string) *RobotAccountSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.RobotAccount.Query().
	Select(robotaccount.FieldName).
	Scan(ctx, &v)

func (*RobotAccountQuery) Unique

func (raq *RobotAccountQuery) Unique(unique bool) *RobotAccountQuery

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 (*RobotAccountQuery) Where

Where adds a new predicate for the RobotAccountQuery builder.

func (*RobotAccountQuery) WithWorkflow

func (raq *RobotAccountQuery) WithWorkflow(opts ...func(*WorkflowQuery)) *RobotAccountQuery

WithWorkflow tells the query-builder to eager-load the nodes that are connected to the "workflow" edge. The optional arguments are used to configure the query builder of the edge.

type RobotAccountSelect

type RobotAccountSelect struct {
	*RobotAccountQuery
	// contains filtered or unexported fields
}

RobotAccountSelect is the builder for selecting fields of RobotAccount entities.

func (*RobotAccountSelect) Aggregate

func (ras *RobotAccountSelect) Aggregate(fns ...AggregateFunc) *RobotAccountSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RobotAccountSelect) Bool

func (s *RobotAccountSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RobotAccountSelect) BoolX

func (s *RobotAccountSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RobotAccountSelect) Bools

func (s *RobotAccountSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RobotAccountSelect) BoolsX

func (s *RobotAccountSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RobotAccountSelect) Float64

func (s *RobotAccountSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RobotAccountSelect) Float64X

func (s *RobotAccountSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RobotAccountSelect) Float64s

func (s *RobotAccountSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RobotAccountSelect) Float64sX

func (s *RobotAccountSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RobotAccountSelect) Int

func (s *RobotAccountSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RobotAccountSelect) IntX

func (s *RobotAccountSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RobotAccountSelect) Ints

func (s *RobotAccountSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RobotAccountSelect) IntsX

func (s *RobotAccountSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RobotAccountSelect) Modify

func (ras *RobotAccountSelect) Modify(modifiers ...func(s *sql.Selector)) *RobotAccountSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*RobotAccountSelect) Scan

func (ras *RobotAccountSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RobotAccountSelect) ScanX

func (s *RobotAccountSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RobotAccountSelect) String

func (s *RobotAccountSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RobotAccountSelect) StringX

func (s *RobotAccountSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RobotAccountSelect) Strings

func (s *RobotAccountSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RobotAccountSelect) StringsX

func (s *RobotAccountSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RobotAccountUpdate

type RobotAccountUpdate struct {
	// contains filtered or unexported fields
}

RobotAccountUpdate is the builder for updating RobotAccount entities.

func (*RobotAccountUpdate) ClearRevokedAt

func (rau *RobotAccountUpdate) ClearRevokedAt() *RobotAccountUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*RobotAccountUpdate) ClearWorkflow

func (rau *RobotAccountUpdate) ClearWorkflow() *RobotAccountUpdate

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*RobotAccountUpdate) Exec

func (rau *RobotAccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RobotAccountUpdate) ExecX

func (rau *RobotAccountUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RobotAccountUpdate) Modify

func (rau *RobotAccountUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RobotAccountUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*RobotAccountUpdate) Mutation

func (rau *RobotAccountUpdate) Mutation() *RobotAccountMutation

Mutation returns the RobotAccountMutation object of the builder.

func (*RobotAccountUpdate) Save

func (rau *RobotAccountUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RobotAccountUpdate) SaveX

func (rau *RobotAccountUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RobotAccountUpdate) SetName

func (rau *RobotAccountUpdate) SetName(s string) *RobotAccountUpdate

SetName sets the "name" field.

func (*RobotAccountUpdate) SetNillableName added in v0.91.6

func (rau *RobotAccountUpdate) SetNillableName(s *string) *RobotAccountUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*RobotAccountUpdate) SetNillableRevokedAt

func (rau *RobotAccountUpdate) SetNillableRevokedAt(t *time.Time) *RobotAccountUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*RobotAccountUpdate) SetNillableWorkflowID

func (rau *RobotAccountUpdate) SetNillableWorkflowID(id *uuid.UUID) *RobotAccountUpdate

SetNillableWorkflowID sets the "workflow" edge to the Workflow entity by ID if the given value is not nil.

func (*RobotAccountUpdate) SetRevokedAt

func (rau *RobotAccountUpdate) SetRevokedAt(t time.Time) *RobotAccountUpdate

SetRevokedAt sets the "revoked_at" field.

func (*RobotAccountUpdate) SetWorkflow

func (rau *RobotAccountUpdate) SetWorkflow(w *Workflow) *RobotAccountUpdate

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*RobotAccountUpdate) SetWorkflowID

func (rau *RobotAccountUpdate) SetWorkflowID(id uuid.UUID) *RobotAccountUpdate

SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.

func (*RobotAccountUpdate) Where

Where appends a list predicates to the RobotAccountUpdate builder.

type RobotAccountUpdateOne

type RobotAccountUpdateOne struct {
	// contains filtered or unexported fields
}

RobotAccountUpdateOne is the builder for updating a single RobotAccount entity.

func (*RobotAccountUpdateOne) ClearRevokedAt

func (rauo *RobotAccountUpdateOne) ClearRevokedAt() *RobotAccountUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*RobotAccountUpdateOne) ClearWorkflow

func (rauo *RobotAccountUpdateOne) ClearWorkflow() *RobotAccountUpdateOne

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*RobotAccountUpdateOne) Exec

func (rauo *RobotAccountUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RobotAccountUpdateOne) ExecX

func (rauo *RobotAccountUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RobotAccountUpdateOne) Modify

func (rauo *RobotAccountUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RobotAccountUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*RobotAccountUpdateOne) Mutation

func (rauo *RobotAccountUpdateOne) Mutation() *RobotAccountMutation

Mutation returns the RobotAccountMutation object of the builder.

func (*RobotAccountUpdateOne) Save

Save executes the query and returns the updated RobotAccount entity.

func (*RobotAccountUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*RobotAccountUpdateOne) Select

func (rauo *RobotAccountUpdateOne) Select(field string, fields ...string) *RobotAccountUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RobotAccountUpdateOne) SetName

SetName sets the "name" field.

func (*RobotAccountUpdateOne) SetNillableName added in v0.91.6

func (rauo *RobotAccountUpdateOne) SetNillableName(s *string) *RobotAccountUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*RobotAccountUpdateOne) SetNillableRevokedAt

func (rauo *RobotAccountUpdateOne) SetNillableRevokedAt(t *time.Time) *RobotAccountUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*RobotAccountUpdateOne) SetNillableWorkflowID

func (rauo *RobotAccountUpdateOne) SetNillableWorkflowID(id *uuid.UUID) *RobotAccountUpdateOne

SetNillableWorkflowID sets the "workflow" edge to the Workflow entity by ID if the given value is not nil.

func (*RobotAccountUpdateOne) SetRevokedAt

func (rauo *RobotAccountUpdateOne) SetRevokedAt(t time.Time) *RobotAccountUpdateOne

SetRevokedAt sets the "revoked_at" field.

func (*RobotAccountUpdateOne) SetWorkflow

func (rauo *RobotAccountUpdateOne) SetWorkflow(w *Workflow) *RobotAccountUpdateOne

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*RobotAccountUpdateOne) SetWorkflowID

func (rauo *RobotAccountUpdateOne) SetWorkflowID(id uuid.UUID) *RobotAccountUpdateOne

SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.

func (*RobotAccountUpdateOne) Where

Where appends a list predicates to the RobotAccountUpdate builder.

type RobotAccounts

type RobotAccounts []*RobotAccount

RobotAccounts is a parsable slice of RobotAccount.

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 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 {

	// APIToken is the client for interacting with the APIToken builders.
	APIToken *APITokenClient
	// CASBackend is the client for interacting with the CASBackend builders.
	CASBackend *CASBackendClient
	// CASMapping is the client for interacting with the CASMapping builders.
	CASMapping *CASMappingClient
	// Integration is the client for interacting with the Integration builders.
	Integration *IntegrationClient
	// IntegrationAttachment is the client for interacting with the IntegrationAttachment builders.
	IntegrationAttachment *IntegrationAttachmentClient
	// Membership is the client for interacting with the Membership builders.
	Membership *MembershipClient
	// OrgInvitation is the client for interacting with the OrgInvitation builders.
	OrgInvitation *OrgInvitationClient
	// Organization is the client for interacting with the Organization builders.
	Organization *OrganizationClient
	// Referrer is the client for interacting with the Referrer builders.
	Referrer *ReferrerClient
	// RobotAccount is the client for interacting with the RobotAccount builders.
	RobotAccount *RobotAccountClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// Workflow is the client for interacting with the Workflow builders.
	Workflow *WorkflowClient
	// WorkflowContract is the client for interacting with the WorkflowContract builders.
	WorkflowContract *WorkflowContractClient
	// WorkflowContractVersion is the client for interacting with the WorkflowContractVersion builders.
	WorkflowContractVersion *WorkflowContractVersionClient
	// WorkflowRun is the client for interacting with the WorkflowRun builders.
	WorkflowRun *WorkflowRunClient
	// 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 User

type User struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) QueryMemberships

func (u *User) QueryMemberships() *MembershipQuery

QueryMemberships queries the "memberships" edge of the User entity.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

func (*User) Value

func (u *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) MapCreateBulk added in v0.91.6

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

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 (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryMemberships

func (c *UserClient) QueryMemberships(u *User) *MembershipQuery

QueryMemberships queries the memberships edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddMembershipIDs

func (uc *UserCreate) AddMembershipIDs(ids ...uuid.UUID) *UserCreate

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*UserCreate) AddMemberships

func (uc *UserCreate) AddMemberships(m ...*Membership) *UserCreate

AddMemberships adds the "memberships" edges to the Membership entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetCreatedAt

func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetEmail

func (uc *UserCreate) SetEmail(s string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetNillableCreatedAt

func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableID

func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate

SetNillableID sets the "id" field if the given value is not nil.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserEdges

type UserEdges struct {
	// Memberships holds the value of the memberships edge.
	Memberships []*Membership `json:"memberships,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) MembershipsOrErr

func (e UserEdges) MembershipsOrErr() ([]*Membership, error)

MembershipsOrErr returns the Memberships value or an error if the edge was not loaded in eager-loading.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddMembershipIDs

func (m *UserMutation) AddMembershipIDs(ids ...uuid.UUID)

AddMembershipIDs adds the "memberships" edge to the Membership entity by ids.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearMemberships

func (m *UserMutation) ClearMemberships()

ClearMemberships clears the "memberships" edge to the Membership entity.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Email

func (m *UserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

func (m *UserMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*UserMutation) MembershipsCleared

func (m *UserMutation) MembershipsCleared() bool

MembershipsCleared reports if the "memberships" edge to the Membership entity was cleared.

func (*UserMutation) MembershipsIDs

func (m *UserMutation) MembershipsIDs() (ids []uuid.UUID)

MembershipsIDs returns the "memberships" edge IDs in the mutation.

func (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldEmail

func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) 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 (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) RemoveMembershipIDs

func (m *UserMutation) RemoveMembershipIDs(ids ...uuid.UUID)

RemoveMembershipIDs removes the "memberships" edge to the Membership entity by IDs.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) RemovedMembershipsIDs

func (m *UserMutation) RemovedMembershipsIDs() (ids []uuid.UUID)

RemovedMemberships returns the removed IDs of the "memberships" edge to the Membership entity.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetEmail

func (m *UserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetMemberships

func (m *UserMutation) ResetMemberships()

ResetMemberships resets all changes to the "memberships" edge.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) ForShare added in v0.94.3

func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*UserQuery) ForUpdate added in v0.94.3

func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Email string `json:"email,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldEmail).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Modify

func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) QueryMemberships

func (uq *UserQuery) QueryMemberships() *MembershipQuery

QueryMemberships chains the current query on the "memberships" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Email string `json:"email,omitempty"`
}

client.User.Query().
	Select(user.FieldEmail).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

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 (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithMemberships

func (uq *UserQuery) WithMemberships(opts ...func(*MembershipQuery)) *UserQuery

WithMemberships tells the query-builder to eager-load the nodes that are connected to the "memberships" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Modify

func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddMembershipIDs

func (uu *UserUpdate) AddMembershipIDs(ids ...uuid.UUID) *UserUpdate

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*UserUpdate) AddMemberships

func (uu *UserUpdate) AddMemberships(m ...*Membership) *UserUpdate

AddMemberships adds the "memberships" edges to the Membership entity.

func (*UserUpdate) ClearMemberships

func (uu *UserUpdate) ClearMemberships() *UserUpdate

ClearMemberships clears all "memberships" edges to the Membership entity.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Modify

func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveMembershipIDs

func (uu *UserUpdate) RemoveMembershipIDs(ids ...uuid.UUID) *UserUpdate

RemoveMembershipIDs removes the "memberships" edge to Membership entities by IDs.

func (*UserUpdate) RemoveMemberships

func (uu *UserUpdate) RemoveMemberships(m ...*Membership) *UserUpdate

RemoveMemberships removes "memberships" edges to Membership entities.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetEmail

func (uu *UserUpdate) SetEmail(s string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetNillableEmail added in v0.91.6

func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddMembershipIDs

func (uuo *UserUpdateOne) AddMembershipIDs(ids ...uuid.UUID) *UserUpdateOne

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*UserUpdateOne) AddMemberships

func (uuo *UserUpdateOne) AddMemberships(m ...*Membership) *UserUpdateOne

AddMemberships adds the "memberships" edges to the Membership entity.

func (*UserUpdateOne) ClearMemberships

func (uuo *UserUpdateOne) ClearMemberships() *UserUpdateOne

ClearMemberships clears all "memberships" edges to the Membership entity.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Modify

func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveMembershipIDs

func (uuo *UserUpdateOne) RemoveMembershipIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveMembershipIDs removes the "memberships" edge to Membership entities by IDs.

func (*UserUpdateOne) RemoveMemberships

func (uuo *UserUpdateOne) RemoveMemberships(m ...*Membership) *UserUpdateOne

RemoveMemberships removes "memberships" edges to Membership entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetEmail

func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetNillableEmail added in v0.91.6

func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdateOne) Where

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type Users

type Users []*User

Users is a parsable slice of User.

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.

type Workflow

type Workflow struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Project holds the value of the "project" field.
	Project string `json:"project,omitempty"`
	// Team holds the value of the "team" field.
	Team string `json:"team,omitempty"`
	// RunsCount holds the value of the "runs_count" field.
	RunsCount int `json:"runs_count,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// Public holds the value of the "public" field.
	Public bool `json:"public,omitempty"`
	// OrganizationID holds the value of the "organization_id" field.
	OrganizationID uuid.UUID `json:"organization_id,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorkflowQuery when eager-loading is set.
	Edges WorkflowEdges `json:"edges"`
	// contains filtered or unexported fields
}

Workflow is the model entity for the Workflow schema.

func (*Workflow) QueryContract

func (w *Workflow) QueryContract() *WorkflowContractQuery

QueryContract queries the "contract" edge of the Workflow entity.

func (*Workflow) QueryIntegrationAttachments

func (w *Workflow) QueryIntegrationAttachments() *IntegrationAttachmentQuery

QueryIntegrationAttachments queries the "integration_attachments" edge of the Workflow entity.

func (*Workflow) QueryOrganization

func (w *Workflow) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the Workflow entity.

func (*Workflow) QueryReferrers

func (w *Workflow) QueryReferrers() *ReferrerQuery

QueryReferrers queries the "referrers" edge of the Workflow entity.

func (*Workflow) QueryRobotaccounts

func (w *Workflow) QueryRobotaccounts() *RobotAccountQuery

QueryRobotaccounts queries the "robotaccounts" edge of the Workflow entity.

func (*Workflow) QueryWorkflowruns

func (w *Workflow) QueryWorkflowruns() *WorkflowRunQuery

QueryWorkflowruns queries the "workflowruns" edge of the Workflow entity.

func (*Workflow) String

func (w *Workflow) String() string

String implements the fmt.Stringer.

func (*Workflow) Unwrap

func (w *Workflow) Unwrap() *Workflow

Unwrap unwraps the Workflow 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 (*Workflow) Update

func (w *Workflow) Update() *WorkflowUpdateOne

Update returns a builder for updating this Workflow. Note that you need to call Workflow.Unwrap() before calling this method if this Workflow was returned from a transaction, and the transaction was committed or rolled back.

func (*Workflow) Value

func (w *Workflow) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Workflow. This includes values selected through modifiers, order, etc.

type WorkflowClient

type WorkflowClient struct {
	// contains filtered or unexported fields
}

WorkflowClient is a client for the Workflow schema.

func NewWorkflowClient

func NewWorkflowClient(c config) *WorkflowClient

NewWorkflowClient returns a client for the Workflow from the given config.

func (*WorkflowClient) Create

func (c *WorkflowClient) Create() *WorkflowCreate

Create returns a builder for creating a Workflow entity.

func (*WorkflowClient) CreateBulk

func (c *WorkflowClient) CreateBulk(builders ...*WorkflowCreate) *WorkflowCreateBulk

CreateBulk returns a builder for creating a bulk of Workflow entities.

func (*WorkflowClient) Delete

func (c *WorkflowClient) Delete() *WorkflowDelete

Delete returns a delete builder for Workflow.

func (*WorkflowClient) DeleteOne

func (c *WorkflowClient) DeleteOne(w *Workflow) *WorkflowDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowClient) DeleteOneID

func (c *WorkflowClient) DeleteOneID(id uuid.UUID) *WorkflowDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowClient) Get

func (c *WorkflowClient) Get(ctx context.Context, id uuid.UUID) (*Workflow, error)

Get returns a Workflow entity by its id.

func (*WorkflowClient) GetX

func (c *WorkflowClient) GetX(ctx context.Context, id uuid.UUID) *Workflow

GetX is like Get, but panics if an error occurs.

func (*WorkflowClient) Hooks

func (c *WorkflowClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowClient) Intercept

func (c *WorkflowClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflow.Intercept(f(g(h())))`.

func (*WorkflowClient) Interceptors

func (c *WorkflowClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowClient) MapCreateBulk added in v0.91.6

func (c *WorkflowClient) MapCreateBulk(slice any, setFunc func(*WorkflowCreate, int)) *WorkflowCreateBulk

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 (*WorkflowClient) Query

func (c *WorkflowClient) Query() *WorkflowQuery

Query returns a query builder for Workflow.

func (*WorkflowClient) QueryContract

func (c *WorkflowClient) QueryContract(w *Workflow) *WorkflowContractQuery

QueryContract queries the contract edge of a Workflow.

func (*WorkflowClient) QueryIntegrationAttachments

func (c *WorkflowClient) QueryIntegrationAttachments(w *Workflow) *IntegrationAttachmentQuery

QueryIntegrationAttachments queries the integration_attachments edge of a Workflow.

func (*WorkflowClient) QueryOrganization

func (c *WorkflowClient) QueryOrganization(w *Workflow) *OrganizationQuery

QueryOrganization queries the organization edge of a Workflow.

func (*WorkflowClient) QueryReferrers

func (c *WorkflowClient) QueryReferrers(w *Workflow) *ReferrerQuery

QueryReferrers queries the referrers edge of a Workflow.

func (*WorkflowClient) QueryRobotaccounts

func (c *WorkflowClient) QueryRobotaccounts(w *Workflow) *RobotAccountQuery

QueryRobotaccounts queries the robotaccounts edge of a Workflow.

func (*WorkflowClient) QueryWorkflowruns

func (c *WorkflowClient) QueryWorkflowruns(w *Workflow) *WorkflowRunQuery

QueryWorkflowruns queries the workflowruns edge of a Workflow.

func (*WorkflowClient) Update

func (c *WorkflowClient) Update() *WorkflowUpdate

Update returns an update builder for Workflow.

func (*WorkflowClient) UpdateOne

func (c *WorkflowClient) UpdateOne(w *Workflow) *WorkflowUpdateOne

UpdateOne returns an update builder for the given entity.

func (*WorkflowClient) UpdateOneID

func (c *WorkflowClient) UpdateOneID(id uuid.UUID) *WorkflowUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WorkflowClient) Use

func (c *WorkflowClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflow.Hooks(f(g(h())))`.

type WorkflowContract

type WorkflowContract struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorkflowContractQuery when eager-loading is set.
	Edges WorkflowContractEdges `json:"edges"`
	// contains filtered or unexported fields
}

WorkflowContract is the model entity for the WorkflowContract schema.

func (*WorkflowContract) QueryOrganization

func (wc *WorkflowContract) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the WorkflowContract entity.

func (*WorkflowContract) QueryVersions

func (wc *WorkflowContract) QueryVersions() *WorkflowContractVersionQuery

QueryVersions queries the "versions" edge of the WorkflowContract entity.

func (*WorkflowContract) QueryWorkflows

func (wc *WorkflowContract) QueryWorkflows() *WorkflowQuery

QueryWorkflows queries the "workflows" edge of the WorkflowContract entity.

func (*WorkflowContract) String

func (wc *WorkflowContract) String() string

String implements the fmt.Stringer.

func (*WorkflowContract) Unwrap

func (wc *WorkflowContract) Unwrap() *WorkflowContract

Unwrap unwraps the WorkflowContract 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 (*WorkflowContract) Update

Update returns a builder for updating this WorkflowContract. Note that you need to call WorkflowContract.Unwrap() before calling this method if this WorkflowContract was returned from a transaction, and the transaction was committed or rolled back.

func (*WorkflowContract) Value

func (wc *WorkflowContract) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WorkflowContract. This includes values selected through modifiers, order, etc.

type WorkflowContractClient

type WorkflowContractClient struct {
	// contains filtered or unexported fields
}

WorkflowContractClient is a client for the WorkflowContract schema.

func NewWorkflowContractClient

func NewWorkflowContractClient(c config) *WorkflowContractClient

NewWorkflowContractClient returns a client for the WorkflowContract from the given config.

func (*WorkflowContractClient) Create

Create returns a builder for creating a WorkflowContract entity.

func (*WorkflowContractClient) CreateBulk

CreateBulk returns a builder for creating a bulk of WorkflowContract entities.

func (*WorkflowContractClient) Delete

Delete returns a delete builder for WorkflowContract.

func (*WorkflowContractClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowContractClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowContractClient) Get

Get returns a WorkflowContract entity by its id.

func (*WorkflowContractClient) GetX

GetX is like Get, but panics if an error occurs.

func (*WorkflowContractClient) Hooks

func (c *WorkflowContractClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowContractClient) Intercept

func (c *WorkflowContractClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowcontract.Intercept(f(g(h())))`.

func (*WorkflowContractClient) Interceptors

func (c *WorkflowContractClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowContractClient) MapCreateBulk added in v0.91.6

func (c *WorkflowContractClient) MapCreateBulk(slice any, setFunc func(*WorkflowContractCreate, int)) *WorkflowContractCreateBulk

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 (*WorkflowContractClient) Query

Query returns a query builder for WorkflowContract.

func (*WorkflowContractClient) QueryOrganization

func (c *WorkflowContractClient) QueryOrganization(wc *WorkflowContract) *OrganizationQuery

QueryOrganization queries the organization edge of a WorkflowContract.

func (*WorkflowContractClient) QueryVersions

QueryVersions queries the versions edge of a WorkflowContract.

func (*WorkflowContractClient) QueryWorkflows

func (c *WorkflowContractClient) QueryWorkflows(wc *WorkflowContract) *WorkflowQuery

QueryWorkflows queries the workflows edge of a WorkflowContract.

func (*WorkflowContractClient) Update

Update returns an update builder for WorkflowContract.

func (*WorkflowContractClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*WorkflowContractClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*WorkflowContractClient) Use

func (c *WorkflowContractClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowcontract.Hooks(f(g(h())))`.

type WorkflowContractCreate

type WorkflowContractCreate struct {
	// contains filtered or unexported fields
}

WorkflowContractCreate is the builder for creating a WorkflowContract entity.

func (*WorkflowContractCreate) AddVersionIDs

func (wcc *WorkflowContractCreate) AddVersionIDs(ids ...uuid.UUID) *WorkflowContractCreate

AddVersionIDs adds the "versions" edge to the WorkflowContractVersion entity by IDs.

func (*WorkflowContractCreate) AddVersions

AddVersions adds the "versions" edges to the WorkflowContractVersion entity.

func (*WorkflowContractCreate) AddWorkflowIDs

func (wcc *WorkflowContractCreate) AddWorkflowIDs(ids ...uuid.UUID) *WorkflowContractCreate

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*WorkflowContractCreate) AddWorkflows

func (wcc *WorkflowContractCreate) AddWorkflows(w ...*Workflow) *WorkflowContractCreate

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*WorkflowContractCreate) Exec

Exec executes the query.

func (*WorkflowContractCreate) ExecX

func (wcc *WorkflowContractCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractCreate) Mutation

Mutation returns the WorkflowContractMutation object of the builder.

func (*WorkflowContractCreate) Save

Save creates the WorkflowContract in the database.

func (*WorkflowContractCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*WorkflowContractCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*WorkflowContractCreate) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*WorkflowContractCreate) SetDescription

func (wcc *WorkflowContractCreate) SetDescription(s string) *WorkflowContractCreate

SetDescription sets the "description" field.

func (*WorkflowContractCreate) SetID

SetID sets the "id" field.

func (*WorkflowContractCreate) SetName

SetName sets the "name" field.

func (*WorkflowContractCreate) SetNillableCreatedAt

func (wcc *WorkflowContractCreate) SetNillableCreatedAt(t *time.Time) *WorkflowContractCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*WorkflowContractCreate) SetNillableDeletedAt

func (wcc *WorkflowContractCreate) SetNillableDeletedAt(t *time.Time) *WorkflowContractCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*WorkflowContractCreate) SetNillableDescription

func (wcc *WorkflowContractCreate) SetNillableDescription(s *string) *WorkflowContractCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowContractCreate) SetNillableID

func (wcc *WorkflowContractCreate) SetNillableID(u *uuid.UUID) *WorkflowContractCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*WorkflowContractCreate) SetNillableOrganizationID

func (wcc *WorkflowContractCreate) SetNillableOrganizationID(id *uuid.UUID) *WorkflowContractCreate

SetNillableOrganizationID sets the "organization" edge to the Organization entity by ID if the given value is not nil.

func (*WorkflowContractCreate) SetOrganization

SetOrganization sets the "organization" edge to the Organization entity.

func (*WorkflowContractCreate) SetOrganizationID

func (wcc *WorkflowContractCreate) SetOrganizationID(id uuid.UUID) *WorkflowContractCreate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

type WorkflowContractCreateBulk

type WorkflowContractCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowContractCreateBulk is the builder for creating many WorkflowContract entities in bulk.

func (*WorkflowContractCreateBulk) Exec

Exec executes the query.

func (*WorkflowContractCreateBulk) ExecX

func (wccb *WorkflowContractCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractCreateBulk) Save

Save creates the WorkflowContract entities in the database.

func (*WorkflowContractCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type WorkflowContractDelete

type WorkflowContractDelete struct {
	// contains filtered or unexported fields
}

WorkflowContractDelete is the builder for deleting a WorkflowContract entity.

func (*WorkflowContractDelete) Exec

func (wcd *WorkflowContractDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowContractDelete) ExecX

func (wcd *WorkflowContractDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractDelete) Where

Where appends a list predicates to the WorkflowContractDelete builder.

type WorkflowContractDeleteOne

type WorkflowContractDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowContractDeleteOne is the builder for deleting a single WorkflowContract entity.

func (*WorkflowContractDeleteOne) Exec

Exec executes the deletion query.

func (*WorkflowContractDeleteOne) ExecX

func (wcdo *WorkflowContractDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractDeleteOne) Where

Where appends a list predicates to the WorkflowContractDelete builder.

type WorkflowContractEdges

type WorkflowContractEdges struct {
	// Versions holds the value of the versions edge.
	Versions []*WorkflowContractVersion `json:"versions,omitempty"`
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// Workflows holds the value of the workflows edge.
	Workflows []*Workflow `json:"workflows,omitempty"`
	// contains filtered or unexported fields
}

WorkflowContractEdges holds the relations/edges for other nodes in the graph.

func (WorkflowContractEdges) OrganizationOrErr

func (e WorkflowContractEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowContractEdges) VersionsOrErr

func (e WorkflowContractEdges) VersionsOrErr() ([]*WorkflowContractVersion, error)

VersionsOrErr returns the Versions value or an error if the edge was not loaded in eager-loading.

func (WorkflowContractEdges) WorkflowsOrErr

func (e WorkflowContractEdges) WorkflowsOrErr() ([]*Workflow, error)

WorkflowsOrErr returns the Workflows value or an error if the edge was not loaded in eager-loading.

type WorkflowContractGroupBy

type WorkflowContractGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowContractGroupBy is the group-by builder for WorkflowContract entities.

func (*WorkflowContractGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowContractGroupBy) Bool

func (s *WorkflowContractGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowContractGroupBy) BoolX

func (s *WorkflowContractGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowContractGroupBy) Bools

func (s *WorkflowContractGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowContractGroupBy) BoolsX

func (s *WorkflowContractGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowContractGroupBy) Float64

func (s *WorkflowContractGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowContractGroupBy) Float64X

func (s *WorkflowContractGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowContractGroupBy) Float64s

func (s *WorkflowContractGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowContractGroupBy) Float64sX

func (s *WorkflowContractGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowContractGroupBy) Int

func (s *WorkflowContractGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowContractGroupBy) IntX

func (s *WorkflowContractGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowContractGroupBy) Ints

func (s *WorkflowContractGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowContractGroupBy) IntsX

func (s *WorkflowContractGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowContractGroupBy) Scan

func (wcgb *WorkflowContractGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowContractGroupBy) ScanX

func (s *WorkflowContractGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowContractGroupBy) String

func (s *WorkflowContractGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowContractGroupBy) StringX

func (s *WorkflowContractGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowContractGroupBy) Strings

func (s *WorkflowContractGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowContractGroupBy) StringsX

func (s *WorkflowContractGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowContractMutation

type WorkflowContractMutation struct {
	// contains filtered or unexported fields
}

WorkflowContractMutation represents an operation that mutates the WorkflowContract nodes in the graph.

func (*WorkflowContractMutation) AddField

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) AddVersionIDs

func (m *WorkflowContractMutation) AddVersionIDs(ids ...uuid.UUID)

AddVersionIDs adds the "versions" edge to the WorkflowContractVersion entity by ids.

func (*WorkflowContractMutation) AddWorkflowIDs

func (m *WorkflowContractMutation) AddWorkflowIDs(ids ...uuid.UUID)

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by ids.

func (*WorkflowContractMutation) AddedEdges

func (m *WorkflowContractMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowContractMutation) AddedField

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) AddedFields

func (m *WorkflowContractMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowContractMutation) AddedIDs

func (m *WorkflowContractMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorkflowContractMutation) ClearDeletedAt

func (m *WorkflowContractMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*WorkflowContractMutation) ClearDescription

func (m *WorkflowContractMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*WorkflowContractMutation) ClearEdge

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) ClearField

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) ClearOrganization

func (m *WorkflowContractMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*WorkflowContractMutation) ClearVersions

func (m *WorkflowContractMutation) ClearVersions()

ClearVersions clears the "versions" edge to the WorkflowContractVersion entity.

func (*WorkflowContractMutation) ClearWorkflows

func (m *WorkflowContractMutation) ClearWorkflows()

ClearWorkflows clears the "workflows" edge to the Workflow entity.

func (*WorkflowContractMutation) ClearedEdges

func (m *WorkflowContractMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowContractMutation) ClearedFields

func (m *WorkflowContractMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowContractMutation) Client

func (m WorkflowContractMutation) 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 (*WorkflowContractMutation) CreatedAt

func (m *WorkflowContractMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*WorkflowContractMutation) DeletedAt

func (m *WorkflowContractMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*WorkflowContractMutation) DeletedAtCleared

func (m *WorkflowContractMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*WorkflowContractMutation) Description

func (m *WorkflowContractMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*WorkflowContractMutation) DescriptionCleared

func (m *WorkflowContractMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*WorkflowContractMutation) EdgeCleared

func (m *WorkflowContractMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorkflowContractMutation) Field

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) FieldCleared

func (m *WorkflowContractMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorkflowContractMutation) Fields

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) ID

func (m *WorkflowContractMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WorkflowContractMutation) 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 (*WorkflowContractMutation) Name

func (m *WorkflowContractMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WorkflowContractMutation) OldCreatedAt

func (m *WorkflowContractMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the WorkflowContract entity. If the WorkflowContract 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 (*WorkflowContractMutation) OldDeletedAt

func (m *WorkflowContractMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the WorkflowContract entity. If the WorkflowContract 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 (*WorkflowContractMutation) OldDescription

func (m *WorkflowContractMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the WorkflowContract entity. If the WorkflowContract 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 (*WorkflowContractMutation) OldField

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) OldName

func (m *WorkflowContractMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the WorkflowContract entity. If the WorkflowContract 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 (*WorkflowContractMutation) Op

func (m *WorkflowContractMutation) Op() Op

Op returns the operation name.

func (*WorkflowContractMutation) OrganizationCleared

func (m *WorkflowContractMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*WorkflowContractMutation) OrganizationID

func (m *WorkflowContractMutation) OrganizationID() (id uuid.UUID, exists bool)

OrganizationID returns the "organization" edge ID in the mutation.

func (*WorkflowContractMutation) OrganizationIDs

func (m *WorkflowContractMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*WorkflowContractMutation) RemoveVersionIDs

func (m *WorkflowContractMutation) RemoveVersionIDs(ids ...uuid.UUID)

RemoveVersionIDs removes the "versions" edge to the WorkflowContractVersion entity by IDs.

func (*WorkflowContractMutation) RemoveWorkflowIDs

func (m *WorkflowContractMutation) RemoveWorkflowIDs(ids ...uuid.UUID)

RemoveWorkflowIDs removes the "workflows" edge to the Workflow entity by IDs.

func (*WorkflowContractMutation) RemovedEdges

func (m *WorkflowContractMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowContractMutation) RemovedIDs

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) RemovedVersionsIDs

func (m *WorkflowContractMutation) RemovedVersionsIDs() (ids []uuid.UUID)

RemovedVersions returns the removed IDs of the "versions" edge to the WorkflowContractVersion entity.

func (*WorkflowContractMutation) RemovedWorkflowsIDs

func (m *WorkflowContractMutation) RemovedWorkflowsIDs() (ids []uuid.UUID)

RemovedWorkflows returns the removed IDs of the "workflows" edge to the Workflow entity.

func (*WorkflowContractMutation) ResetCreatedAt

func (m *WorkflowContractMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*WorkflowContractMutation) ResetDeletedAt

func (m *WorkflowContractMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*WorkflowContractMutation) ResetDescription

func (m *WorkflowContractMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*WorkflowContractMutation) ResetEdge

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) ResetField

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) ResetName

func (m *WorkflowContractMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WorkflowContractMutation) ResetOrganization

func (m *WorkflowContractMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*WorkflowContractMutation) ResetVersions

func (m *WorkflowContractMutation) ResetVersions()

ResetVersions resets all changes to the "versions" edge.

func (*WorkflowContractMutation) ResetWorkflows

func (m *WorkflowContractMutation) ResetWorkflows()

ResetWorkflows resets all changes to the "workflows" edge.

func (*WorkflowContractMutation) SetCreatedAt

func (m *WorkflowContractMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*WorkflowContractMutation) SetDeletedAt

func (m *WorkflowContractMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*WorkflowContractMutation) SetDescription

func (m *WorkflowContractMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*WorkflowContractMutation) SetField

func (m *WorkflowContractMutation) 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 (*WorkflowContractMutation) SetID

func (m *WorkflowContractMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowContract entities.

func (*WorkflowContractMutation) SetName

func (m *WorkflowContractMutation) SetName(s string)

SetName sets the "name" field.

func (*WorkflowContractMutation) SetOp

func (m *WorkflowContractMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowContractMutation) SetOrganizationID

func (m *WorkflowContractMutation) SetOrganizationID(id uuid.UUID)

SetOrganizationID sets the "organization" edge to the Organization entity by id.

func (WorkflowContractMutation) Tx

func (m WorkflowContractMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorkflowContractMutation) Type

func (m *WorkflowContractMutation) Type() string

Type returns the node type of this mutation (WorkflowContract).

func (*WorkflowContractMutation) VersionsCleared

func (m *WorkflowContractMutation) VersionsCleared() bool

VersionsCleared reports if the "versions" edge to the WorkflowContractVersion entity was cleared.

func (*WorkflowContractMutation) VersionsIDs

func (m *WorkflowContractMutation) VersionsIDs() (ids []uuid.UUID)

VersionsIDs returns the "versions" edge IDs in the mutation.

func (*WorkflowContractMutation) Where

Where appends a list predicates to the WorkflowContractMutation builder.

func (*WorkflowContractMutation) WhereP

func (m *WorkflowContractMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowContractMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowContractMutation) WorkflowsCleared

func (m *WorkflowContractMutation) WorkflowsCleared() bool

WorkflowsCleared reports if the "workflows" edge to the Workflow entity was cleared.

func (*WorkflowContractMutation) WorkflowsIDs

func (m *WorkflowContractMutation) WorkflowsIDs() (ids []uuid.UUID)

WorkflowsIDs returns the "workflows" edge IDs in the mutation.

type WorkflowContractQuery

type WorkflowContractQuery struct {
	// contains filtered or unexported fields
}

WorkflowContractQuery is the builder for querying WorkflowContract entities.

func (*WorkflowContractQuery) Aggregate

Aggregate returns a WorkflowContractSelect configured with the given aggregations.

func (*WorkflowContractQuery) All

All executes the query and returns a list of WorkflowContracts.

func (*WorkflowContractQuery) AllX

AllX is like All, but panics if an error occurs.

func (*WorkflowContractQuery) Clone

Clone returns a duplicate of the WorkflowContractQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorkflowContractQuery) Count

func (wcq *WorkflowContractQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorkflowContractQuery) CountX

func (wcq *WorkflowContractQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowContractQuery) Exist

func (wcq *WorkflowContractQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WorkflowContractQuery) ExistX

func (wcq *WorkflowContractQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowContractQuery) First

First returns the first WorkflowContract entity from the query. Returns a *NotFoundError when no WorkflowContract was found.

func (*WorkflowContractQuery) FirstID

func (wcq *WorkflowContractQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first WorkflowContract ID from the query. Returns a *NotFoundError when no WorkflowContract ID was found.

func (*WorkflowContractQuery) FirstIDX

func (wcq *WorkflowContractQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowContractQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*WorkflowContractQuery) ForShare added in v0.94.3

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*WorkflowContractQuery) ForUpdate added in v0.94.3

func (wcq *WorkflowContractQuery) ForUpdate(opts ...sql.LockOption) *WorkflowContractQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*WorkflowContractQuery) GroupBy

func (wcq *WorkflowContractQuery) GroupBy(field string, fields ...string) *WorkflowContractGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.WorkflowContract.Query().
	GroupBy(workflowcontract.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WorkflowContractQuery) IDs

func (wcq *WorkflowContractQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of WorkflowContract IDs.

func (*WorkflowContractQuery) IDsX

func (wcq *WorkflowContractQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowContractQuery) Limit

func (wcq *WorkflowContractQuery) Limit(limit int) *WorkflowContractQuery

Limit the number of records to be returned by this query.

func (*WorkflowContractQuery) Modify

func (wcq *WorkflowContractQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowContractSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowContractQuery) Offset

func (wcq *WorkflowContractQuery) Offset(offset int) *WorkflowContractQuery

Offset to start from.

func (*WorkflowContractQuery) Only

Only returns a single WorkflowContract entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowContract entity is found. Returns a *NotFoundError when no WorkflowContract entities are found.

func (*WorkflowContractQuery) OnlyID

func (wcq *WorkflowContractQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only WorkflowContract ID in the query. Returns a *NotSingularError when more than one WorkflowContract ID is found. Returns a *NotFoundError when no entities are found.

func (*WorkflowContractQuery) OnlyIDX

func (wcq *WorkflowContractQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowContractQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowContractQuery) Order

Order specifies how the records should be ordered.

func (*WorkflowContractQuery) QueryOrganization

func (wcq *WorkflowContractQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*WorkflowContractQuery) QueryVersions

QueryVersions chains the current query on the "versions" edge.

func (*WorkflowContractQuery) QueryWorkflows

func (wcq *WorkflowContractQuery) QueryWorkflows() *WorkflowQuery

QueryWorkflows chains the current query on the "workflows" edge.

func (*WorkflowContractQuery) Select

func (wcq *WorkflowContractQuery) Select(fields ...string) *WorkflowContractSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.WorkflowContract.Query().
	Select(workflowcontract.FieldName).
	Scan(ctx, &v)

func (*WorkflowContractQuery) Unique

func (wcq *WorkflowContractQuery) Unique(unique bool) *WorkflowContractQuery

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 (*WorkflowContractQuery) Where

Where adds a new predicate for the WorkflowContractQuery builder.

func (*WorkflowContractQuery) WithOrganization

func (wcq *WorkflowContractQuery) WithOrganization(opts ...func(*OrganizationQuery)) *WorkflowContractQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowContractQuery) WithVersions

WithVersions tells the query-builder to eager-load the nodes that are connected to the "versions" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowContractQuery) WithWorkflows

func (wcq *WorkflowContractQuery) WithWorkflows(opts ...func(*WorkflowQuery)) *WorkflowContractQuery

WithWorkflows tells the query-builder to eager-load the nodes that are connected to the "workflows" edge. The optional arguments are used to configure the query builder of the edge.

type WorkflowContractSelect

type WorkflowContractSelect struct {
	*WorkflowContractQuery
	// contains filtered or unexported fields
}

WorkflowContractSelect is the builder for selecting fields of WorkflowContract entities.

func (*WorkflowContractSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowContractSelect) Bool

func (s *WorkflowContractSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowContractSelect) BoolX

func (s *WorkflowContractSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowContractSelect) Bools

func (s *WorkflowContractSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowContractSelect) BoolsX

func (s *WorkflowContractSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowContractSelect) Float64

func (s *WorkflowContractSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowContractSelect) Float64X

func (s *WorkflowContractSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowContractSelect) Float64s

func (s *WorkflowContractSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowContractSelect) Float64sX

func (s *WorkflowContractSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowContractSelect) Int

func (s *WorkflowContractSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowContractSelect) IntX

func (s *WorkflowContractSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowContractSelect) Ints

func (s *WorkflowContractSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowContractSelect) IntsX

func (s *WorkflowContractSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowContractSelect) Modify

func (wcs *WorkflowContractSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowContractSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowContractSelect) Scan

func (wcs *WorkflowContractSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowContractSelect) ScanX

func (s *WorkflowContractSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowContractSelect) String

func (s *WorkflowContractSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowContractSelect) StringX

func (s *WorkflowContractSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowContractSelect) Strings

func (s *WorkflowContractSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowContractSelect) StringsX

func (s *WorkflowContractSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowContractUpdate

type WorkflowContractUpdate struct {
	// contains filtered or unexported fields
}

WorkflowContractUpdate is the builder for updating WorkflowContract entities.

func (*WorkflowContractUpdate) AddVersionIDs

func (wcu *WorkflowContractUpdate) AddVersionIDs(ids ...uuid.UUID) *WorkflowContractUpdate

AddVersionIDs adds the "versions" edge to the WorkflowContractVersion entity by IDs.

func (*WorkflowContractUpdate) AddVersions

AddVersions adds the "versions" edges to the WorkflowContractVersion entity.

func (*WorkflowContractUpdate) AddWorkflowIDs

func (wcu *WorkflowContractUpdate) AddWorkflowIDs(ids ...uuid.UUID) *WorkflowContractUpdate

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*WorkflowContractUpdate) AddWorkflows

func (wcu *WorkflowContractUpdate) AddWorkflows(w ...*Workflow) *WorkflowContractUpdate

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*WorkflowContractUpdate) ClearDeletedAt

func (wcu *WorkflowContractUpdate) ClearDeletedAt() *WorkflowContractUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*WorkflowContractUpdate) ClearDescription

func (wcu *WorkflowContractUpdate) ClearDescription() *WorkflowContractUpdate

ClearDescription clears the value of the "description" field.

func (*WorkflowContractUpdate) ClearOrganization

func (wcu *WorkflowContractUpdate) ClearOrganization() *WorkflowContractUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*WorkflowContractUpdate) ClearVersions

func (wcu *WorkflowContractUpdate) ClearVersions() *WorkflowContractUpdate

ClearVersions clears all "versions" edges to the WorkflowContractVersion entity.

func (*WorkflowContractUpdate) ClearWorkflows

func (wcu *WorkflowContractUpdate) ClearWorkflows() *WorkflowContractUpdate

ClearWorkflows clears all "workflows" edges to the Workflow entity.

func (*WorkflowContractUpdate) Exec

Exec executes the query.

func (*WorkflowContractUpdate) ExecX

func (wcu *WorkflowContractUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractUpdate) Modify

func (wcu *WorkflowContractUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowContractUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowContractUpdate) Mutation

Mutation returns the WorkflowContractMutation object of the builder.

func (*WorkflowContractUpdate) RemoveVersionIDs

func (wcu *WorkflowContractUpdate) RemoveVersionIDs(ids ...uuid.UUID) *WorkflowContractUpdate

RemoveVersionIDs removes the "versions" edge to WorkflowContractVersion entities by IDs.

func (*WorkflowContractUpdate) RemoveVersions

RemoveVersions removes "versions" edges to WorkflowContractVersion entities.

func (*WorkflowContractUpdate) RemoveWorkflowIDs

func (wcu *WorkflowContractUpdate) RemoveWorkflowIDs(ids ...uuid.UUID) *WorkflowContractUpdate

RemoveWorkflowIDs removes the "workflows" edge to Workflow entities by IDs.

func (*WorkflowContractUpdate) RemoveWorkflows

func (wcu *WorkflowContractUpdate) RemoveWorkflows(w ...*Workflow) *WorkflowContractUpdate

RemoveWorkflows removes "workflows" edges to Workflow entities.

func (*WorkflowContractUpdate) Save

func (wcu *WorkflowContractUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorkflowContractUpdate) SaveX

func (wcu *WorkflowContractUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WorkflowContractUpdate) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*WorkflowContractUpdate) SetDescription

func (wcu *WorkflowContractUpdate) SetDescription(s string) *WorkflowContractUpdate

SetDescription sets the "description" field.

func (*WorkflowContractUpdate) SetNillableDeletedAt

func (wcu *WorkflowContractUpdate) SetNillableDeletedAt(t *time.Time) *WorkflowContractUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*WorkflowContractUpdate) SetNillableDescription

func (wcu *WorkflowContractUpdate) SetNillableDescription(s *string) *WorkflowContractUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowContractUpdate) SetNillableOrganizationID

func (wcu *WorkflowContractUpdate) SetNillableOrganizationID(id *uuid.UUID) *WorkflowContractUpdate

SetNillableOrganizationID sets the "organization" edge to the Organization entity by ID if the given value is not nil.

func (*WorkflowContractUpdate) SetOrganization

SetOrganization sets the "organization" edge to the Organization entity.

func (*WorkflowContractUpdate) SetOrganizationID

func (wcu *WorkflowContractUpdate) SetOrganizationID(id uuid.UUID) *WorkflowContractUpdate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*WorkflowContractUpdate) Where

Where appends a list predicates to the WorkflowContractUpdate builder.

type WorkflowContractUpdateOne

type WorkflowContractUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowContractUpdateOne is the builder for updating a single WorkflowContract entity.

func (*WorkflowContractUpdateOne) AddVersionIDs

func (wcuo *WorkflowContractUpdateOne) AddVersionIDs(ids ...uuid.UUID) *WorkflowContractUpdateOne

AddVersionIDs adds the "versions" edge to the WorkflowContractVersion entity by IDs.

func (*WorkflowContractUpdateOne) AddVersions

AddVersions adds the "versions" edges to the WorkflowContractVersion entity.

func (*WorkflowContractUpdateOne) AddWorkflowIDs

func (wcuo *WorkflowContractUpdateOne) AddWorkflowIDs(ids ...uuid.UUID) *WorkflowContractUpdateOne

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*WorkflowContractUpdateOne) AddWorkflows

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*WorkflowContractUpdateOne) ClearDeletedAt

func (wcuo *WorkflowContractUpdateOne) ClearDeletedAt() *WorkflowContractUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*WorkflowContractUpdateOne) ClearDescription

func (wcuo *WorkflowContractUpdateOne) ClearDescription() *WorkflowContractUpdateOne

ClearDescription clears the value of the "description" field.

func (*WorkflowContractUpdateOne) ClearOrganization

func (wcuo *WorkflowContractUpdateOne) ClearOrganization() *WorkflowContractUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*WorkflowContractUpdateOne) ClearVersions

ClearVersions clears all "versions" edges to the WorkflowContractVersion entity.

func (*WorkflowContractUpdateOne) ClearWorkflows

func (wcuo *WorkflowContractUpdateOne) ClearWorkflows() *WorkflowContractUpdateOne

ClearWorkflows clears all "workflows" edges to the Workflow entity.

func (*WorkflowContractUpdateOne) Exec

Exec executes the query on the entity.

func (*WorkflowContractUpdateOne) ExecX

func (wcuo *WorkflowContractUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractUpdateOne) Modify

func (wcuo *WorkflowContractUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowContractUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowContractUpdateOne) Mutation

Mutation returns the WorkflowContractMutation object of the builder.

func (*WorkflowContractUpdateOne) RemoveVersionIDs

func (wcuo *WorkflowContractUpdateOne) RemoveVersionIDs(ids ...uuid.UUID) *WorkflowContractUpdateOne

RemoveVersionIDs removes the "versions" edge to WorkflowContractVersion entities by IDs.

func (*WorkflowContractUpdateOne) RemoveVersions

RemoveVersions removes "versions" edges to WorkflowContractVersion entities.

func (*WorkflowContractUpdateOne) RemoveWorkflowIDs

func (wcuo *WorkflowContractUpdateOne) RemoveWorkflowIDs(ids ...uuid.UUID) *WorkflowContractUpdateOne

RemoveWorkflowIDs removes the "workflows" edge to Workflow entities by IDs.

func (*WorkflowContractUpdateOne) RemoveWorkflows

func (wcuo *WorkflowContractUpdateOne) RemoveWorkflows(w ...*Workflow) *WorkflowContractUpdateOne

RemoveWorkflows removes "workflows" edges to Workflow entities.

func (*WorkflowContractUpdateOne) Save

Save executes the query and returns the updated WorkflowContract entity.

func (*WorkflowContractUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*WorkflowContractUpdateOne) Select

func (wcuo *WorkflowContractUpdateOne) Select(field string, fields ...string) *WorkflowContractUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WorkflowContractUpdateOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*WorkflowContractUpdateOne) SetDescription

SetDescription sets the "description" field.

func (*WorkflowContractUpdateOne) SetNillableDeletedAt

func (wcuo *WorkflowContractUpdateOne) SetNillableDeletedAt(t *time.Time) *WorkflowContractUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*WorkflowContractUpdateOne) SetNillableDescription

func (wcuo *WorkflowContractUpdateOne) SetNillableDescription(s *string) *WorkflowContractUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowContractUpdateOne) SetNillableOrganizationID

func (wcuo *WorkflowContractUpdateOne) SetNillableOrganizationID(id *uuid.UUID) *WorkflowContractUpdateOne

SetNillableOrganizationID sets the "organization" edge to the Organization entity by ID if the given value is not nil.

func (*WorkflowContractUpdateOne) SetOrganization

SetOrganization sets the "organization" edge to the Organization entity.

func (*WorkflowContractUpdateOne) SetOrganizationID

func (wcuo *WorkflowContractUpdateOne) SetOrganizationID(id uuid.UUID) *WorkflowContractUpdateOne

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*WorkflowContractUpdateOne) Where

Where appends a list predicates to the WorkflowContractUpdate builder.

type WorkflowContractVersion

type WorkflowContractVersion struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Body holds the value of the "body" field.
	Body []byte `json:"body,omitempty"`
	// Revision holds the value of the "revision" field.
	Revision int `json:"revision,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorkflowContractVersionQuery when eager-loading is set.
	Edges WorkflowContractVersionEdges `json:"edges"`
	// contains filtered or unexported fields
}

WorkflowContractVersion is the model entity for the WorkflowContractVersion schema.

func (*WorkflowContractVersion) QueryContract

func (wcv *WorkflowContractVersion) QueryContract() *WorkflowContractQuery

QueryContract queries the "contract" edge of the WorkflowContractVersion entity.

func (*WorkflowContractVersion) String

func (wcv *WorkflowContractVersion) String() string

String implements the fmt.Stringer.

func (*WorkflowContractVersion) Unwrap

Unwrap unwraps the WorkflowContractVersion 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 (*WorkflowContractVersion) Update

Update returns a builder for updating this WorkflowContractVersion. Note that you need to call WorkflowContractVersion.Unwrap() before calling this method if this WorkflowContractVersion was returned from a transaction, and the transaction was committed or rolled back.

func (*WorkflowContractVersion) Value

func (wcv *WorkflowContractVersion) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WorkflowContractVersion. This includes values selected through modifiers, order, etc.

type WorkflowContractVersionClient

type WorkflowContractVersionClient struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionClient is a client for the WorkflowContractVersion schema.

func NewWorkflowContractVersionClient

func NewWorkflowContractVersionClient(c config) *WorkflowContractVersionClient

NewWorkflowContractVersionClient returns a client for the WorkflowContractVersion from the given config.

func (*WorkflowContractVersionClient) Create

Create returns a builder for creating a WorkflowContractVersion entity.

func (*WorkflowContractVersionClient) CreateBulk

CreateBulk returns a builder for creating a bulk of WorkflowContractVersion entities.

func (*WorkflowContractVersionClient) Delete

Delete returns a delete builder for WorkflowContractVersion.

func (*WorkflowContractVersionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowContractVersionClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowContractVersionClient) Get

Get returns a WorkflowContractVersion entity by its id.

func (*WorkflowContractVersionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*WorkflowContractVersionClient) Hooks

func (c *WorkflowContractVersionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowContractVersionClient) Intercept

func (c *WorkflowContractVersionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowcontractversion.Intercept(f(g(h())))`.

func (*WorkflowContractVersionClient) Interceptors

func (c *WorkflowContractVersionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowContractVersionClient) MapCreateBulk added in v0.91.6

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 (*WorkflowContractVersionClient) Query

Query returns a query builder for WorkflowContractVersion.

func (*WorkflowContractVersionClient) QueryContract

QueryContract queries the contract edge of a WorkflowContractVersion.

func (*WorkflowContractVersionClient) Update

Update returns an update builder for WorkflowContractVersion.

func (*WorkflowContractVersionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*WorkflowContractVersionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*WorkflowContractVersionClient) Use

func (c *WorkflowContractVersionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowcontractversion.Hooks(f(g(h())))`.

type WorkflowContractVersionCreate

type WorkflowContractVersionCreate struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionCreate is the builder for creating a WorkflowContractVersion entity.

func (*WorkflowContractVersionCreate) Exec

Exec executes the query.

func (*WorkflowContractVersionCreate) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractVersionCreate) Mutation

Mutation returns the WorkflowContractVersionMutation object of the builder.

func (*WorkflowContractVersionCreate) Save

Save creates the WorkflowContractVersion in the database.

func (*WorkflowContractVersionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*WorkflowContractVersionCreate) SetBody

SetBody sets the "body" field.

func (*WorkflowContractVersionCreate) SetContract

SetContract sets the "contract" edge to the WorkflowContract entity.

func (*WorkflowContractVersionCreate) SetContractID

SetContractID sets the "contract" edge to the WorkflowContract entity by ID.

func (*WorkflowContractVersionCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*WorkflowContractVersionCreate) SetID

SetID sets the "id" field.

func (*WorkflowContractVersionCreate) SetNillableContractID

func (wcvc *WorkflowContractVersionCreate) SetNillableContractID(id *uuid.UUID) *WorkflowContractVersionCreate

SetNillableContractID sets the "contract" edge to the WorkflowContract entity by ID if the given value is not nil.

func (*WorkflowContractVersionCreate) SetNillableCreatedAt

func (wcvc *WorkflowContractVersionCreate) SetNillableCreatedAt(t *time.Time) *WorkflowContractVersionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*WorkflowContractVersionCreate) SetNillableID

SetNillableID sets the "id" field if the given value is not nil.

func (*WorkflowContractVersionCreate) SetNillableRevision

func (wcvc *WorkflowContractVersionCreate) SetNillableRevision(i *int) *WorkflowContractVersionCreate

SetNillableRevision sets the "revision" field if the given value is not nil.

func (*WorkflowContractVersionCreate) SetRevision

SetRevision sets the "revision" field.

type WorkflowContractVersionCreateBulk

type WorkflowContractVersionCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionCreateBulk is the builder for creating many WorkflowContractVersion entities in bulk.

func (*WorkflowContractVersionCreateBulk) Exec

Exec executes the query.

func (*WorkflowContractVersionCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractVersionCreateBulk) Save

Save creates the WorkflowContractVersion entities in the database.

func (*WorkflowContractVersionCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type WorkflowContractVersionDelete

type WorkflowContractVersionDelete struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionDelete is the builder for deleting a WorkflowContractVersion entity.

func (*WorkflowContractVersionDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowContractVersionDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractVersionDelete) Where

Where appends a list predicates to the WorkflowContractVersionDelete builder.

type WorkflowContractVersionDeleteOne

type WorkflowContractVersionDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionDeleteOne is the builder for deleting a single WorkflowContractVersion entity.

func (*WorkflowContractVersionDeleteOne) Exec

Exec executes the deletion query.

func (*WorkflowContractVersionDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractVersionDeleteOne) Where

Where appends a list predicates to the WorkflowContractVersionDelete builder.

type WorkflowContractVersionEdges

type WorkflowContractVersionEdges struct {
	// Contract holds the value of the contract edge.
	Contract *WorkflowContract `json:"contract,omitempty"`
	// contains filtered or unexported fields
}

WorkflowContractVersionEdges holds the relations/edges for other nodes in the graph.

func (WorkflowContractVersionEdges) ContractOrErr

func (e WorkflowContractVersionEdges) ContractOrErr() (*WorkflowContract, error)

ContractOrErr returns the Contract value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WorkflowContractVersionGroupBy

type WorkflowContractVersionGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionGroupBy is the group-by builder for WorkflowContractVersion entities.

func (*WorkflowContractVersionGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowContractVersionGroupBy) Bool

func (s *WorkflowContractVersionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionGroupBy) BoolX

func (s *WorkflowContractVersionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowContractVersionGroupBy) Bools

func (s *WorkflowContractVersionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionGroupBy) BoolsX

func (s *WorkflowContractVersionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowContractVersionGroupBy) Float64

func (s *WorkflowContractVersionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionGroupBy) Float64X

func (s *WorkflowContractVersionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowContractVersionGroupBy) Float64s

func (s *WorkflowContractVersionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionGroupBy) Float64sX

func (s *WorkflowContractVersionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowContractVersionGroupBy) Int

func (s *WorkflowContractVersionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionGroupBy) IntX

func (s *WorkflowContractVersionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowContractVersionGroupBy) Ints

func (s *WorkflowContractVersionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionGroupBy) IntsX

func (s *WorkflowContractVersionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowContractVersionGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*WorkflowContractVersionGroupBy) ScanX

func (s *WorkflowContractVersionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowContractVersionGroupBy) String

func (s *WorkflowContractVersionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionGroupBy) StringX

func (s *WorkflowContractVersionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowContractVersionGroupBy) Strings

func (s *WorkflowContractVersionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionGroupBy) StringsX

func (s *WorkflowContractVersionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowContractVersionMutation

type WorkflowContractVersionMutation struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionMutation represents an operation that mutates the WorkflowContractVersion nodes in the graph.

func (*WorkflowContractVersionMutation) AddField

func (m *WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) AddRevision

func (m *WorkflowContractVersionMutation) AddRevision(i int)

AddRevision adds i to the "revision" field.

func (*WorkflowContractVersionMutation) AddedEdges

func (m *WorkflowContractVersionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowContractVersionMutation) AddedField

func (m *WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) AddedFields

func (m *WorkflowContractVersionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowContractVersionMutation) AddedIDs

func (m *WorkflowContractVersionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorkflowContractVersionMutation) AddedRevision

func (m *WorkflowContractVersionMutation) AddedRevision() (r int, exists bool)

AddedRevision returns the value that was added to the "revision" field in this mutation.

func (*WorkflowContractVersionMutation) Body

func (m *WorkflowContractVersionMutation) Body() (r []byte, exists bool)

Body returns the value of the "body" field in the mutation.

func (*WorkflowContractVersionMutation) ClearContract

func (m *WorkflowContractVersionMutation) ClearContract()

ClearContract clears the "contract" edge to the WorkflowContract entity.

func (*WorkflowContractVersionMutation) ClearEdge

func (m *WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) ClearField

func (m *WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) ClearedEdges

func (m *WorkflowContractVersionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowContractVersionMutation) ClearedFields

func (m *WorkflowContractVersionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) ContractCleared

func (m *WorkflowContractVersionMutation) ContractCleared() bool

ContractCleared reports if the "contract" edge to the WorkflowContract entity was cleared.

func (*WorkflowContractVersionMutation) ContractID

func (m *WorkflowContractVersionMutation) ContractID() (id uuid.UUID, exists bool)

ContractID returns the "contract" edge ID in the mutation.

func (*WorkflowContractVersionMutation) ContractIDs

func (m *WorkflowContractVersionMutation) ContractIDs() (ids []uuid.UUID)

ContractIDs returns the "contract" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ContractID instead. It exists only for internal usage by the builders.

func (*WorkflowContractVersionMutation) CreatedAt

func (m *WorkflowContractVersionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*WorkflowContractVersionMutation) EdgeCleared

func (m *WorkflowContractVersionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorkflowContractVersionMutation) Field

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 (*WorkflowContractVersionMutation) FieldCleared

func (m *WorkflowContractVersionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorkflowContractVersionMutation) Fields

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 (*WorkflowContractVersionMutation) ID

func (m *WorkflowContractVersionMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) OldBody

func (m *WorkflowContractVersionMutation) OldBody(ctx context.Context) (v []byte, err error)

OldBody returns the old "body" field's value of the WorkflowContractVersion entity. If the WorkflowContractVersion 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 (*WorkflowContractVersionMutation) OldCreatedAt

func (m *WorkflowContractVersionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the WorkflowContractVersion entity. If the WorkflowContractVersion 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 (*WorkflowContractVersionMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*WorkflowContractVersionMutation) OldRevision

func (m *WorkflowContractVersionMutation) OldRevision(ctx context.Context) (v int, err error)

OldRevision returns the old "revision" field's value of the WorkflowContractVersion entity. If the WorkflowContractVersion 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 (*WorkflowContractVersionMutation) Op

Op returns the operation name.

func (*WorkflowContractVersionMutation) RemovedEdges

func (m *WorkflowContractVersionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowContractVersionMutation) RemovedIDs

func (m *WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) ResetBody

func (m *WorkflowContractVersionMutation) ResetBody()

ResetBody resets all changes to the "body" field.

func (*WorkflowContractVersionMutation) ResetContract

func (m *WorkflowContractVersionMutation) ResetContract()

ResetContract resets all changes to the "contract" edge.

func (*WorkflowContractVersionMutation) ResetCreatedAt

func (m *WorkflowContractVersionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*WorkflowContractVersionMutation) ResetEdge

func (m *WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) ResetField

func (m *WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) ResetRevision

func (m *WorkflowContractVersionMutation) ResetRevision()

ResetRevision resets all changes to the "revision" field.

func (*WorkflowContractVersionMutation) Revision

func (m *WorkflowContractVersionMutation) Revision() (r int, exists bool)

Revision returns the value of the "revision" field in the mutation.

func (*WorkflowContractVersionMutation) SetBody

func (m *WorkflowContractVersionMutation) SetBody(b []byte)

SetBody sets the "body" field.

func (*WorkflowContractVersionMutation) SetContractID

func (m *WorkflowContractVersionMutation) SetContractID(id uuid.UUID)

SetContractID sets the "contract" edge to the WorkflowContract entity by id.

func (*WorkflowContractVersionMutation) SetCreatedAt

func (m *WorkflowContractVersionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*WorkflowContractVersionMutation) SetField

func (m *WorkflowContractVersionMutation) 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 (*WorkflowContractVersionMutation) SetID

SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowContractVersion entities.

func (*WorkflowContractVersionMutation) SetOp

func (m *WorkflowContractVersionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowContractVersionMutation) SetRevision

func (m *WorkflowContractVersionMutation) SetRevision(i int)

SetRevision sets the "revision" field.

func (WorkflowContractVersionMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorkflowContractVersionMutation) Type

Type returns the node type of this mutation (WorkflowContractVersion).

func (*WorkflowContractVersionMutation) Where

Where appends a list predicates to the WorkflowContractVersionMutation builder.

func (*WorkflowContractVersionMutation) WhereP

func (m *WorkflowContractVersionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowContractVersionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type WorkflowContractVersionQuery

type WorkflowContractVersionQuery struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionQuery is the builder for querying WorkflowContractVersion entities.

func (*WorkflowContractVersionQuery) Aggregate

Aggregate returns a WorkflowContractVersionSelect configured with the given aggregations.

func (*WorkflowContractVersionQuery) All

All executes the query and returns a list of WorkflowContractVersions.

func (*WorkflowContractVersionQuery) AllX

AllX is like All, but panics if an error occurs.

func (*WorkflowContractVersionQuery) Clone

Clone returns a duplicate of the WorkflowContractVersionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorkflowContractVersionQuery) Count

Count returns the count of the given query.

func (*WorkflowContractVersionQuery) CountX

func (wcvq *WorkflowContractVersionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowContractVersionQuery) Exist

Exist returns true if the query has elements in the graph.

func (*WorkflowContractVersionQuery) ExistX

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowContractVersionQuery) First

First returns the first WorkflowContractVersion entity from the query. Returns a *NotFoundError when no WorkflowContractVersion was found.

func (*WorkflowContractVersionQuery) FirstID

func (wcvq *WorkflowContractVersionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first WorkflowContractVersion ID from the query. Returns a *NotFoundError when no WorkflowContractVersion ID was found.

func (*WorkflowContractVersionQuery) FirstIDX

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowContractVersionQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*WorkflowContractVersionQuery) ForShare added in v0.94.3

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*WorkflowContractVersionQuery) ForUpdate added in v0.94.3

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*WorkflowContractVersionQuery) GroupBy

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 {
	Body []byte `json:"body,omitempty"`
	Count int `json:"count,omitempty"`
}

client.WorkflowContractVersion.Query().
	GroupBy(workflowcontractversion.FieldBody).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WorkflowContractVersionQuery) IDs

func (wcvq *WorkflowContractVersionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of WorkflowContractVersion IDs.

func (*WorkflowContractVersionQuery) IDsX

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowContractVersionQuery) Limit

Limit the number of records to be returned by this query.

func (*WorkflowContractVersionQuery) Modify

func (wcvq *WorkflowContractVersionQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowContractVersionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowContractVersionQuery) Offset

Offset to start from.

func (*WorkflowContractVersionQuery) Only

Only returns a single WorkflowContractVersion entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowContractVersion entity is found. Returns a *NotFoundError when no WorkflowContractVersion entities are found.

func (*WorkflowContractVersionQuery) OnlyID

func (wcvq *WorkflowContractVersionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only WorkflowContractVersion ID in the query. Returns a *NotSingularError when more than one WorkflowContractVersion ID is found. Returns a *NotFoundError when no entities are found.

func (*WorkflowContractVersionQuery) OnlyIDX

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowContractVersionQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowContractVersionQuery) Order

Order specifies how the records should be ordered.

func (*WorkflowContractVersionQuery) QueryContract

func (wcvq *WorkflowContractVersionQuery) QueryContract() *WorkflowContractQuery

QueryContract chains the current query on the "contract" edge.

func (*WorkflowContractVersionQuery) 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 {
	Body []byte `json:"body,omitempty"`
}

client.WorkflowContractVersion.Query().
	Select(workflowcontractversion.FieldBody).
	Scan(ctx, &v)

func (*WorkflowContractVersionQuery) 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 (*WorkflowContractVersionQuery) Where

Where adds a new predicate for the WorkflowContractVersionQuery builder.

func (*WorkflowContractVersionQuery) WithContract

WithContract tells the query-builder to eager-load the nodes that are connected to the "contract" edge. The optional arguments are used to configure the query builder of the edge.

type WorkflowContractVersionSelect

type WorkflowContractVersionSelect struct {
	*WorkflowContractVersionQuery
	// contains filtered or unexported fields
}

WorkflowContractVersionSelect is the builder for selecting fields of WorkflowContractVersion entities.

func (*WorkflowContractVersionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowContractVersionSelect) Bool

func (s *WorkflowContractVersionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionSelect) BoolX

func (s *WorkflowContractVersionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowContractVersionSelect) Bools

func (s *WorkflowContractVersionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionSelect) BoolsX

func (s *WorkflowContractVersionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowContractVersionSelect) Float64

func (s *WorkflowContractVersionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionSelect) Float64X

func (s *WorkflowContractVersionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowContractVersionSelect) Float64s

func (s *WorkflowContractVersionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionSelect) Float64sX

func (s *WorkflowContractVersionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowContractVersionSelect) Int

func (s *WorkflowContractVersionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionSelect) IntX

func (s *WorkflowContractVersionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowContractVersionSelect) Ints

func (s *WorkflowContractVersionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionSelect) IntsX

func (s *WorkflowContractVersionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowContractVersionSelect) Modify

func (wcvs *WorkflowContractVersionSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowContractVersionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowContractVersionSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*WorkflowContractVersionSelect) ScanX

func (s *WorkflowContractVersionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowContractVersionSelect) String

func (s *WorkflowContractVersionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionSelect) StringX

func (s *WorkflowContractVersionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowContractVersionSelect) Strings

func (s *WorkflowContractVersionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowContractVersionSelect) StringsX

func (s *WorkflowContractVersionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowContractVersionUpdate

type WorkflowContractVersionUpdate struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionUpdate is the builder for updating WorkflowContractVersion entities.

func (*WorkflowContractVersionUpdate) ClearContract

ClearContract clears the "contract" edge to the WorkflowContract entity.

func (*WorkflowContractVersionUpdate) Exec

Exec executes the query.

func (*WorkflowContractVersionUpdate) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractVersionUpdate) Modify

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowContractVersionUpdate) Mutation

Mutation returns the WorkflowContractVersionMutation object of the builder.

func (*WorkflowContractVersionUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorkflowContractVersionUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*WorkflowContractVersionUpdate) SetContract

SetContract sets the "contract" edge to the WorkflowContract entity.

func (*WorkflowContractVersionUpdate) SetContractID

SetContractID sets the "contract" edge to the WorkflowContract entity by ID.

func (*WorkflowContractVersionUpdate) SetNillableContractID

func (wcvu *WorkflowContractVersionUpdate) SetNillableContractID(id *uuid.UUID) *WorkflowContractVersionUpdate

SetNillableContractID sets the "contract" edge to the WorkflowContract entity by ID if the given value is not nil.

func (*WorkflowContractVersionUpdate) Where

Where appends a list predicates to the WorkflowContractVersionUpdate builder.

type WorkflowContractVersionUpdateOne

type WorkflowContractVersionUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowContractVersionUpdateOne is the builder for updating a single WorkflowContractVersion entity.

func (*WorkflowContractVersionUpdateOne) ClearContract

ClearContract clears the "contract" edge to the WorkflowContract entity.

func (*WorkflowContractVersionUpdateOne) Exec

Exec executes the query on the entity.

func (*WorkflowContractVersionUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowContractVersionUpdateOne) Modify

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowContractVersionUpdateOne) Mutation

Mutation returns the WorkflowContractVersionMutation object of the builder.

func (*WorkflowContractVersionUpdateOne) Save

Save executes the query and returns the updated WorkflowContractVersion entity.

func (*WorkflowContractVersionUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*WorkflowContractVersionUpdateOne) 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 (*WorkflowContractVersionUpdateOne) SetContract

SetContract sets the "contract" edge to the WorkflowContract entity.

func (*WorkflowContractVersionUpdateOne) SetContractID

SetContractID sets the "contract" edge to the WorkflowContract entity by ID.

func (*WorkflowContractVersionUpdateOne) SetNillableContractID

SetNillableContractID sets the "contract" edge to the WorkflowContract entity by ID if the given value is not nil.

func (*WorkflowContractVersionUpdateOne) Where

Where appends a list predicates to the WorkflowContractVersionUpdate builder.

type WorkflowContractVersions

type WorkflowContractVersions []*WorkflowContractVersion

WorkflowContractVersions is a parsable slice of WorkflowContractVersion.

type WorkflowContracts

type WorkflowContracts []*WorkflowContract

WorkflowContracts is a parsable slice of WorkflowContract.

type WorkflowCreate

type WorkflowCreate struct {
	// contains filtered or unexported fields
}

WorkflowCreate is the builder for creating a Workflow entity.

func (*WorkflowCreate) AddIntegrationAttachmentIDs

func (wc *WorkflowCreate) AddIntegrationAttachmentIDs(ids ...uuid.UUID) *WorkflowCreate

AddIntegrationAttachmentIDs adds the "integration_attachments" edge to the IntegrationAttachment entity by IDs.

func (*WorkflowCreate) AddIntegrationAttachments

func (wc *WorkflowCreate) AddIntegrationAttachments(i ...*IntegrationAttachment) *WorkflowCreate

AddIntegrationAttachments adds the "integration_attachments" edges to the IntegrationAttachment entity.

func (*WorkflowCreate) AddReferrerIDs

func (wc *WorkflowCreate) AddReferrerIDs(ids ...uuid.UUID) *WorkflowCreate

AddReferrerIDs adds the "referrers" edge to the Referrer entity by IDs.

func (*WorkflowCreate) AddReferrers

func (wc *WorkflowCreate) AddReferrers(r ...*Referrer) *WorkflowCreate

AddReferrers adds the "referrers" edges to the Referrer entity.

func (*WorkflowCreate) AddRobotaccountIDs

func (wc *WorkflowCreate) AddRobotaccountIDs(ids ...uuid.UUID) *WorkflowCreate

AddRobotaccountIDs adds the "robotaccounts" edge to the RobotAccount entity by IDs.

func (*WorkflowCreate) AddRobotaccounts

func (wc *WorkflowCreate) AddRobotaccounts(r ...*RobotAccount) *WorkflowCreate

AddRobotaccounts adds the "robotaccounts" edges to the RobotAccount entity.

func (*WorkflowCreate) AddWorkflowrunIDs

func (wc *WorkflowCreate) AddWorkflowrunIDs(ids ...uuid.UUID) *WorkflowCreate

AddWorkflowrunIDs adds the "workflowruns" edge to the WorkflowRun entity by IDs.

func (*WorkflowCreate) AddWorkflowruns

func (wc *WorkflowCreate) AddWorkflowruns(w ...*WorkflowRun) *WorkflowCreate

AddWorkflowruns adds the "workflowruns" edges to the WorkflowRun entity.

func (*WorkflowCreate) Exec

func (wc *WorkflowCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowCreate) ExecX

func (wc *WorkflowCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowCreate) Mutation

func (wc *WorkflowCreate) Mutation() *WorkflowMutation

Mutation returns the WorkflowMutation object of the builder.

func (*WorkflowCreate) Save

func (wc *WorkflowCreate) Save(ctx context.Context) (*Workflow, error)

Save creates the Workflow in the database.

func (*WorkflowCreate) SaveX

func (wc *WorkflowCreate) SaveX(ctx context.Context) *Workflow

SaveX calls Save and panics if Save returns an error.

func (*WorkflowCreate) SetContract

func (wc *WorkflowCreate) SetContract(w *WorkflowContract) *WorkflowCreate

SetContract sets the "contract" edge to the WorkflowContract entity.

func (*WorkflowCreate) SetContractID

func (wc *WorkflowCreate) SetContractID(id uuid.UUID) *WorkflowCreate

SetContractID sets the "contract" edge to the WorkflowContract entity by ID.

func (*WorkflowCreate) SetCreatedAt

func (wc *WorkflowCreate) SetCreatedAt(t time.Time) *WorkflowCreate

SetCreatedAt sets the "created_at" field.

func (*WorkflowCreate) SetDeletedAt

func (wc *WorkflowCreate) SetDeletedAt(t time.Time) *WorkflowCreate

SetDeletedAt sets the "deleted_at" field.

func (*WorkflowCreate) SetDescription

func (wc *WorkflowCreate) SetDescription(s string) *WorkflowCreate

SetDescription sets the "description" field.

func (*WorkflowCreate) SetID

func (wc *WorkflowCreate) SetID(u uuid.UUID) *WorkflowCreate

SetID sets the "id" field.

func (*WorkflowCreate) SetName

func (wc *WorkflowCreate) SetName(s string) *WorkflowCreate

SetName sets the "name" field.

func (*WorkflowCreate) SetNillableCreatedAt

func (wc *WorkflowCreate) SetNillableCreatedAt(t *time.Time) *WorkflowCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*WorkflowCreate) SetNillableDeletedAt

func (wc *WorkflowCreate) SetNillableDeletedAt(t *time.Time) *WorkflowCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*WorkflowCreate) SetNillableDescription

func (wc *WorkflowCreate) SetNillableDescription(s *string) *WorkflowCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowCreate) SetNillableID

func (wc *WorkflowCreate) SetNillableID(u *uuid.UUID) *WorkflowCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*WorkflowCreate) SetNillableProject

func (wc *WorkflowCreate) SetNillableProject(s *string) *WorkflowCreate

SetNillableProject sets the "project" field if the given value is not nil.

func (*WorkflowCreate) SetNillablePublic

func (wc *WorkflowCreate) SetNillablePublic(b *bool) *WorkflowCreate

SetNillablePublic sets the "public" field if the given value is not nil.

func (*WorkflowCreate) SetNillableRunsCount

func (wc *WorkflowCreate) SetNillableRunsCount(i *int) *WorkflowCreate

SetNillableRunsCount sets the "runs_count" field if the given value is not nil.

func (*WorkflowCreate) SetNillableTeam

func (wc *WorkflowCreate) SetNillableTeam(s *string) *WorkflowCreate

SetNillableTeam sets the "team" field if the given value is not nil.

func (*WorkflowCreate) SetOrganization

func (wc *WorkflowCreate) SetOrganization(o *Organization) *WorkflowCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*WorkflowCreate) SetOrganizationID

func (wc *WorkflowCreate) SetOrganizationID(u uuid.UUID) *WorkflowCreate

SetOrganizationID sets the "organization_id" field.

func (*WorkflowCreate) SetProject

func (wc *WorkflowCreate) SetProject(s string) *WorkflowCreate

SetProject sets the "project" field.

func (*WorkflowCreate) SetPublic

func (wc *WorkflowCreate) SetPublic(b bool) *WorkflowCreate

SetPublic sets the "public" field.

func (*WorkflowCreate) SetRunsCount

func (wc *WorkflowCreate) SetRunsCount(i int) *WorkflowCreate

SetRunsCount sets the "runs_count" field.

func (*WorkflowCreate) SetTeam

func (wc *WorkflowCreate) SetTeam(s string) *WorkflowCreate

SetTeam sets the "team" field.

type WorkflowCreateBulk

type WorkflowCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowCreateBulk is the builder for creating many Workflow entities in bulk.

func (*WorkflowCreateBulk) Exec

func (wcb *WorkflowCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowCreateBulk) ExecX

func (wcb *WorkflowCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowCreateBulk) Save

func (wcb *WorkflowCreateBulk) Save(ctx context.Context) ([]*Workflow, error)

Save creates the Workflow entities in the database.

func (*WorkflowCreateBulk) SaveX

func (wcb *WorkflowCreateBulk) SaveX(ctx context.Context) []*Workflow

SaveX is like Save, but panics if an error occurs.

type WorkflowDelete

type WorkflowDelete struct {
	// contains filtered or unexported fields
}

WorkflowDelete is the builder for deleting a Workflow entity.

func (*WorkflowDelete) Exec

func (wd *WorkflowDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowDelete) ExecX

func (wd *WorkflowDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowDelete) Where

func (wd *WorkflowDelete) Where(ps ...predicate.Workflow) *WorkflowDelete

Where appends a list predicates to the WorkflowDelete builder.

type WorkflowDeleteOne

type WorkflowDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowDeleteOne is the builder for deleting a single Workflow entity.

func (*WorkflowDeleteOne) Exec

func (wdo *WorkflowDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WorkflowDeleteOne) ExecX

func (wdo *WorkflowDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowDeleteOne) Where

Where appends a list predicates to the WorkflowDelete builder.

type WorkflowEdges

type WorkflowEdges struct {
	// Robotaccounts holds the value of the robotaccounts edge.
	Robotaccounts []*RobotAccount `json:"robotaccounts,omitempty"`
	// Workflowruns holds the value of the workflowruns edge.
	Workflowruns []*WorkflowRun `json:"workflowruns,omitempty"`
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// Contract holds the value of the contract edge.
	Contract *WorkflowContract `json:"contract,omitempty"`
	// IntegrationAttachments holds the value of the integration_attachments edge.
	IntegrationAttachments []*IntegrationAttachment `json:"integration_attachments,omitempty"`
	// Referrers holds the value of the referrers edge.
	Referrers []*Referrer `json:"referrers,omitempty"`
	// contains filtered or unexported fields
}

WorkflowEdges holds the relations/edges for other nodes in the graph.

func (WorkflowEdges) ContractOrErr

func (e WorkflowEdges) ContractOrErr() (*WorkflowContract, error)

ContractOrErr returns the Contract value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowEdges) IntegrationAttachmentsOrErr

func (e WorkflowEdges) IntegrationAttachmentsOrErr() ([]*IntegrationAttachment, error)

IntegrationAttachmentsOrErr returns the IntegrationAttachments value or an error if the edge was not loaded in eager-loading.

func (WorkflowEdges) OrganizationOrErr

func (e WorkflowEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowEdges) ReferrersOrErr

func (e WorkflowEdges) ReferrersOrErr() ([]*Referrer, error)

ReferrersOrErr returns the Referrers value or an error if the edge was not loaded in eager-loading.

func (WorkflowEdges) RobotaccountsOrErr

func (e WorkflowEdges) RobotaccountsOrErr() ([]*RobotAccount, error)

RobotaccountsOrErr returns the Robotaccounts value or an error if the edge was not loaded in eager-loading.

func (WorkflowEdges) WorkflowrunsOrErr

func (e WorkflowEdges) WorkflowrunsOrErr() ([]*WorkflowRun, error)

WorkflowrunsOrErr returns the Workflowruns value or an error if the edge was not loaded in eager-loading.

type WorkflowGroupBy

type WorkflowGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowGroupBy is the group-by builder for Workflow entities.

func (*WorkflowGroupBy) Aggregate

func (wgb *WorkflowGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowGroupBy) Bool

func (s *WorkflowGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowGroupBy) BoolX

func (s *WorkflowGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowGroupBy) Bools

func (s *WorkflowGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowGroupBy) BoolsX

func (s *WorkflowGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowGroupBy) Float64

func (s *WorkflowGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowGroupBy) Float64X

func (s *WorkflowGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowGroupBy) Float64s

func (s *WorkflowGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowGroupBy) Float64sX

func (s *WorkflowGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowGroupBy) Int

func (s *WorkflowGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowGroupBy) IntX

func (s *WorkflowGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowGroupBy) Ints

func (s *WorkflowGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowGroupBy) IntsX

func (s *WorkflowGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowGroupBy) Scan

func (wgb *WorkflowGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowGroupBy) ScanX

func (s *WorkflowGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowGroupBy) String

func (s *WorkflowGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowGroupBy) StringX

func (s *WorkflowGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowGroupBy) Strings

func (s *WorkflowGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowGroupBy) StringsX

func (s *WorkflowGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowMutation

type WorkflowMutation struct {
	// contains filtered or unexported fields
}

WorkflowMutation represents an operation that mutates the Workflow nodes in the graph.

func (*WorkflowMutation) AddField

func (m *WorkflowMutation) 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 (*WorkflowMutation) AddIntegrationAttachmentIDs

func (m *WorkflowMutation) AddIntegrationAttachmentIDs(ids ...uuid.UUID)

AddIntegrationAttachmentIDs adds the "integration_attachments" edge to the IntegrationAttachment entity by ids.

func (*WorkflowMutation) AddReferrerIDs

func (m *WorkflowMutation) AddReferrerIDs(ids ...uuid.UUID)

AddReferrerIDs adds the "referrers" edge to the Referrer entity by ids.

func (*WorkflowMutation) AddRobotaccountIDs

func (m *WorkflowMutation) AddRobotaccountIDs(ids ...uuid.UUID)

AddRobotaccountIDs adds the "robotaccounts" edge to the RobotAccount entity by ids.

func (*WorkflowMutation) AddRunsCount

func (m *WorkflowMutation) AddRunsCount(i int)

AddRunsCount adds i to the "runs_count" field.

func (*WorkflowMutation) AddWorkflowrunIDs

func (m *WorkflowMutation) AddWorkflowrunIDs(ids ...uuid.UUID)

AddWorkflowrunIDs adds the "workflowruns" edge to the WorkflowRun entity by ids.

func (*WorkflowMutation) AddedEdges

func (m *WorkflowMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowMutation) AddedField

func (m *WorkflowMutation) 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 (*WorkflowMutation) AddedFields

func (m *WorkflowMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowMutation) AddedIDs

func (m *WorkflowMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorkflowMutation) AddedRunsCount

func (m *WorkflowMutation) AddedRunsCount() (r int, exists bool)

AddedRunsCount returns the value that was added to the "runs_count" field in this mutation.

func (*WorkflowMutation) ClearContract

func (m *WorkflowMutation) ClearContract()

ClearContract clears the "contract" edge to the WorkflowContract entity.

func (*WorkflowMutation) ClearDeletedAt

func (m *WorkflowMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*WorkflowMutation) ClearDescription

func (m *WorkflowMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*WorkflowMutation) ClearEdge

func (m *WorkflowMutation) 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 (*WorkflowMutation) ClearField

func (m *WorkflowMutation) 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 (*WorkflowMutation) ClearIntegrationAttachments

func (m *WorkflowMutation) ClearIntegrationAttachments()

ClearIntegrationAttachments clears the "integration_attachments" edge to the IntegrationAttachment entity.

func (*WorkflowMutation) ClearOrganization

func (m *WorkflowMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*WorkflowMutation) ClearProject

func (m *WorkflowMutation) ClearProject()

ClearProject clears the value of the "project" field.

func (*WorkflowMutation) ClearReferrers

func (m *WorkflowMutation) ClearReferrers()

ClearReferrers clears the "referrers" edge to the Referrer entity.

func (*WorkflowMutation) ClearRobotaccounts

func (m *WorkflowMutation) ClearRobotaccounts()

ClearRobotaccounts clears the "robotaccounts" edge to the RobotAccount entity.

func (*WorkflowMutation) ClearTeam

func (m *WorkflowMutation) ClearTeam()

ClearTeam clears the value of the "team" field.

func (*WorkflowMutation) ClearWorkflowruns

func (m *WorkflowMutation) ClearWorkflowruns()

ClearWorkflowruns clears the "workflowruns" edge to the WorkflowRun entity.

func (*WorkflowMutation) ClearedEdges

func (m *WorkflowMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowMutation) ClearedFields

func (m *WorkflowMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowMutation) Client

func (m WorkflowMutation) 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 (*WorkflowMutation) ContractCleared

func (m *WorkflowMutation) ContractCleared() bool

ContractCleared reports if the "contract" edge to the WorkflowContract entity was cleared.

func (*WorkflowMutation) ContractID

func (m *WorkflowMutation) ContractID() (id uuid.UUID, exists bool)

ContractID returns the "contract" edge ID in the mutation.

func (*WorkflowMutation) ContractIDs

func (m *WorkflowMutation) ContractIDs() (ids []uuid.UUID)

ContractIDs returns the "contract" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ContractID instead. It exists only for internal usage by the builders.

func (*WorkflowMutation) CreatedAt

func (m *WorkflowMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*WorkflowMutation) DeletedAt

func (m *WorkflowMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*WorkflowMutation) DeletedAtCleared

func (m *WorkflowMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*WorkflowMutation) Description

func (m *WorkflowMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*WorkflowMutation) DescriptionCleared

func (m *WorkflowMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*WorkflowMutation) EdgeCleared

func (m *WorkflowMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorkflowMutation) Field

func (m *WorkflowMutation) 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 (*WorkflowMutation) FieldCleared

func (m *WorkflowMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorkflowMutation) Fields

func (m *WorkflowMutation) 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 (*WorkflowMutation) ID

func (m *WorkflowMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WorkflowMutation) IDs

func (m *WorkflowMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*WorkflowMutation) IntegrationAttachmentsCleared

func (m *WorkflowMutation) IntegrationAttachmentsCleared() bool

IntegrationAttachmentsCleared reports if the "integration_attachments" edge to the IntegrationAttachment entity was cleared.

func (*WorkflowMutation) IntegrationAttachmentsIDs

func (m *WorkflowMutation) IntegrationAttachmentsIDs() (ids []uuid.UUID)

IntegrationAttachmentsIDs returns the "integration_attachments" edge IDs in the mutation.

func (*WorkflowMutation) Name

func (m *WorkflowMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WorkflowMutation) OldCreatedAt

func (m *WorkflowMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldDeletedAt

func (m *WorkflowMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldDescription

func (m *WorkflowMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldField

func (m *WorkflowMutation) 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 (*WorkflowMutation) OldName

func (m *WorkflowMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldOrganizationID

func (m *WorkflowMutation) OldOrganizationID(ctx context.Context) (v uuid.UUID, err error)

OldOrganizationID returns the old "organization_id" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldProject

func (m *WorkflowMutation) OldProject(ctx context.Context) (v string, err error)

OldProject returns the old "project" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldPublic

func (m *WorkflowMutation) OldPublic(ctx context.Context) (v bool, err error)

OldPublic returns the old "public" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldRunsCount

func (m *WorkflowMutation) OldRunsCount(ctx context.Context) (v int, err error)

OldRunsCount returns the old "runs_count" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldTeam

func (m *WorkflowMutation) OldTeam(ctx context.Context) (v string, err error)

OldTeam returns the old "team" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) Op

func (m *WorkflowMutation) Op() Op

Op returns the operation name.

func (*WorkflowMutation) OrganizationCleared

func (m *WorkflowMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*WorkflowMutation) OrganizationID

func (m *WorkflowMutation) OrganizationID() (r uuid.UUID, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*WorkflowMutation) OrganizationIDs

func (m *WorkflowMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*WorkflowMutation) Project

func (m *WorkflowMutation) Project() (r string, exists bool)

Project returns the value of the "project" field in the mutation.

func (*WorkflowMutation) ProjectCleared

func (m *WorkflowMutation) ProjectCleared() bool

ProjectCleared returns if the "project" field was cleared in this mutation.

func (*WorkflowMutation) Public

func (m *WorkflowMutation) Public() (r bool, exists bool)

Public returns the value of the "public" field in the mutation.

func (*WorkflowMutation) ReferrersCleared

func (m *WorkflowMutation) ReferrersCleared() bool

ReferrersCleared reports if the "referrers" edge to the Referrer entity was cleared.

func (*WorkflowMutation) ReferrersIDs

func (m *WorkflowMutation) ReferrersIDs() (ids []uuid.UUID)

ReferrersIDs returns the "referrers" edge IDs in the mutation.

func (*WorkflowMutation) RemoveIntegrationAttachmentIDs

func (m *WorkflowMutation) RemoveIntegrationAttachmentIDs(ids ...uuid.UUID)

RemoveIntegrationAttachmentIDs removes the "integration_attachments" edge to the IntegrationAttachment entity by IDs.

func (*WorkflowMutation) RemoveReferrerIDs

func (m *WorkflowMutation) RemoveReferrerIDs(ids ...uuid.UUID)

RemoveReferrerIDs removes the "referrers" edge to the Referrer entity by IDs.

func (*WorkflowMutation) RemoveRobotaccountIDs

func (m *WorkflowMutation) RemoveRobotaccountIDs(ids ...uuid.UUID)

RemoveRobotaccountIDs removes the "robotaccounts" edge to the RobotAccount entity by IDs.

func (*WorkflowMutation) RemoveWorkflowrunIDs

func (m *WorkflowMutation) RemoveWorkflowrunIDs(ids ...uuid.UUID)

RemoveWorkflowrunIDs removes the "workflowruns" edge to the WorkflowRun entity by IDs.

func (*WorkflowMutation) RemovedEdges

func (m *WorkflowMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowMutation) RemovedIDs

func (m *WorkflowMutation) 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 (*WorkflowMutation) RemovedIntegrationAttachmentsIDs

func (m *WorkflowMutation) RemovedIntegrationAttachmentsIDs() (ids []uuid.UUID)

RemovedIntegrationAttachments returns the removed IDs of the "integration_attachments" edge to the IntegrationAttachment entity.

func (*WorkflowMutation) RemovedReferrersIDs

func (m *WorkflowMutation) RemovedReferrersIDs() (ids []uuid.UUID)

RemovedReferrers returns the removed IDs of the "referrers" edge to the Referrer entity.

func (*WorkflowMutation) RemovedRobotaccountsIDs

func (m *WorkflowMutation) RemovedRobotaccountsIDs() (ids []uuid.UUID)

RemovedRobotaccounts returns the removed IDs of the "robotaccounts" edge to the RobotAccount entity.

func (*WorkflowMutation) RemovedWorkflowrunsIDs

func (m *WorkflowMutation) RemovedWorkflowrunsIDs() (ids []uuid.UUID)

RemovedWorkflowruns returns the removed IDs of the "workflowruns" edge to the WorkflowRun entity.

func (*WorkflowMutation) ResetContract

func (m *WorkflowMutation) ResetContract()

ResetContract resets all changes to the "contract" edge.

func (*WorkflowMutation) ResetCreatedAt

func (m *WorkflowMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*WorkflowMutation) ResetDeletedAt

func (m *WorkflowMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*WorkflowMutation) ResetDescription

func (m *WorkflowMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*WorkflowMutation) ResetEdge

func (m *WorkflowMutation) 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 (*WorkflowMutation) ResetField

func (m *WorkflowMutation) 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 (*WorkflowMutation) ResetIntegrationAttachments

func (m *WorkflowMutation) ResetIntegrationAttachments()

ResetIntegrationAttachments resets all changes to the "integration_attachments" edge.

func (*WorkflowMutation) ResetName

func (m *WorkflowMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WorkflowMutation) ResetOrganization

func (m *WorkflowMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*WorkflowMutation) ResetOrganizationID

func (m *WorkflowMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*WorkflowMutation) ResetProject

func (m *WorkflowMutation) ResetProject()

ResetProject resets all changes to the "project" field.

func (*WorkflowMutation) ResetPublic

func (m *WorkflowMutation) ResetPublic()

ResetPublic resets all changes to the "public" field.

func (*WorkflowMutation) ResetReferrers

func (m *WorkflowMutation) ResetReferrers()

ResetReferrers resets all changes to the "referrers" edge.

func (*WorkflowMutation) ResetRobotaccounts

func (m *WorkflowMutation) ResetRobotaccounts()

ResetRobotaccounts resets all changes to the "robotaccounts" edge.

func (*WorkflowMutation) ResetRunsCount

func (m *WorkflowMutation) ResetRunsCount()

ResetRunsCount resets all changes to the "runs_count" field.

func (*WorkflowMutation) ResetTeam

func (m *WorkflowMutation) ResetTeam()

ResetTeam resets all changes to the "team" field.

func (*WorkflowMutation) ResetWorkflowruns

func (m *WorkflowMutation) ResetWorkflowruns()

ResetWorkflowruns resets all changes to the "workflowruns" edge.

func (*WorkflowMutation) RobotaccountsCleared

func (m *WorkflowMutation) RobotaccountsCleared() bool

RobotaccountsCleared reports if the "robotaccounts" edge to the RobotAccount entity was cleared.

func (*WorkflowMutation) RobotaccountsIDs

func (m *WorkflowMutation) RobotaccountsIDs() (ids []uuid.UUID)

RobotaccountsIDs returns the "robotaccounts" edge IDs in the mutation.

func (*WorkflowMutation) RunsCount

func (m *WorkflowMutation) RunsCount() (r int, exists bool)

RunsCount returns the value of the "runs_count" field in the mutation.

func (*WorkflowMutation) SetContractID

func (m *WorkflowMutation) SetContractID(id uuid.UUID)

SetContractID sets the "contract" edge to the WorkflowContract entity by id.

func (*WorkflowMutation) SetCreatedAt

func (m *WorkflowMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*WorkflowMutation) SetDeletedAt

func (m *WorkflowMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*WorkflowMutation) SetDescription

func (m *WorkflowMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*WorkflowMutation) SetField

func (m *WorkflowMutation) 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 (*WorkflowMutation) SetID

func (m *WorkflowMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Workflow entities.

func (*WorkflowMutation) SetName

func (m *WorkflowMutation) SetName(s string)

SetName sets the "name" field.

func (*WorkflowMutation) SetOp

func (m *WorkflowMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowMutation) SetOrganizationID

func (m *WorkflowMutation) SetOrganizationID(u uuid.UUID)

SetOrganizationID sets the "organization_id" field.

func (*WorkflowMutation) SetProject

func (m *WorkflowMutation) SetProject(s string)

SetProject sets the "project" field.

func (*WorkflowMutation) SetPublic

func (m *WorkflowMutation) SetPublic(b bool)

SetPublic sets the "public" field.

func (*WorkflowMutation) SetRunsCount

func (m *WorkflowMutation) SetRunsCount(i int)

SetRunsCount sets the "runs_count" field.

func (*WorkflowMutation) SetTeam

func (m *WorkflowMutation) SetTeam(s string)

SetTeam sets the "team" field.

func (*WorkflowMutation) Team

func (m *WorkflowMutation) Team() (r string, exists bool)

Team returns the value of the "team" field in the mutation.

func (*WorkflowMutation) TeamCleared

func (m *WorkflowMutation) TeamCleared() bool

TeamCleared returns if the "team" field was cleared in this mutation.

func (WorkflowMutation) Tx

func (m WorkflowMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorkflowMutation) Type

func (m *WorkflowMutation) Type() string

Type returns the node type of this mutation (Workflow).

func (*WorkflowMutation) Where

func (m *WorkflowMutation) Where(ps ...predicate.Workflow)

Where appends a list predicates to the WorkflowMutation builder.

func (*WorkflowMutation) WhereP

func (m *WorkflowMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowMutation) WorkflowrunsCleared

func (m *WorkflowMutation) WorkflowrunsCleared() bool

WorkflowrunsCleared reports if the "workflowruns" edge to the WorkflowRun entity was cleared.

func (*WorkflowMutation) WorkflowrunsIDs

func (m *WorkflowMutation) WorkflowrunsIDs() (ids []uuid.UUID)

WorkflowrunsIDs returns the "workflowruns" edge IDs in the mutation.

type WorkflowQuery

type WorkflowQuery struct {
	// contains filtered or unexported fields
}

WorkflowQuery is the builder for querying Workflow entities.

func (*WorkflowQuery) Aggregate

func (wq *WorkflowQuery) Aggregate(fns ...AggregateFunc) *WorkflowSelect

Aggregate returns a WorkflowSelect configured with the given aggregations.

func (*WorkflowQuery) All

func (wq *WorkflowQuery) All(ctx context.Context) ([]*Workflow, error)

All executes the query and returns a list of Workflows.

func (*WorkflowQuery) AllX

func (wq *WorkflowQuery) AllX(ctx context.Context) []*Workflow

AllX is like All, but panics if an error occurs.

func (*WorkflowQuery) Clone

func (wq *WorkflowQuery) Clone() *WorkflowQuery

Clone returns a duplicate of the WorkflowQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorkflowQuery) Count

func (wq *WorkflowQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorkflowQuery) CountX

func (wq *WorkflowQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowQuery) Exist

func (wq *WorkflowQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WorkflowQuery) ExistX

func (wq *WorkflowQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowQuery) First

func (wq *WorkflowQuery) First(ctx context.Context) (*Workflow, error)

First returns the first Workflow entity from the query. Returns a *NotFoundError when no Workflow was found.

func (*WorkflowQuery) FirstID

func (wq *WorkflowQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Workflow ID from the query. Returns a *NotFoundError when no Workflow ID was found.

func (*WorkflowQuery) FirstIDX

func (wq *WorkflowQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowQuery) FirstX

func (wq *WorkflowQuery) FirstX(ctx context.Context) *Workflow

FirstX is like First, but panics if an error occurs.

func (*WorkflowQuery) ForShare added in v0.94.3

func (wq *WorkflowQuery) ForShare(opts ...sql.LockOption) *WorkflowQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*WorkflowQuery) ForUpdate added in v0.94.3

func (wq *WorkflowQuery) ForUpdate(opts ...sql.LockOption) *WorkflowQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*WorkflowQuery) GroupBy

func (wq *WorkflowQuery) GroupBy(field string, fields ...string) *WorkflowGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Workflow.Query().
	GroupBy(workflow.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WorkflowQuery) IDs

func (wq *WorkflowQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Workflow IDs.

func (*WorkflowQuery) IDsX

func (wq *WorkflowQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowQuery) Limit

func (wq *WorkflowQuery) Limit(limit int) *WorkflowQuery

Limit the number of records to be returned by this query.

func (*WorkflowQuery) Modify

func (wq *WorkflowQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowQuery) Offset

func (wq *WorkflowQuery) Offset(offset int) *WorkflowQuery

Offset to start from.

func (*WorkflowQuery) Only

func (wq *WorkflowQuery) Only(ctx context.Context) (*Workflow, error)

Only returns a single Workflow entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Workflow entity is found. Returns a *NotFoundError when no Workflow entities are found.

func (*WorkflowQuery) OnlyID

func (wq *WorkflowQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Workflow ID in the query. Returns a *NotSingularError when more than one Workflow ID is found. Returns a *NotFoundError when no entities are found.

func (*WorkflowQuery) OnlyIDX

func (wq *WorkflowQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowQuery) OnlyX

func (wq *WorkflowQuery) OnlyX(ctx context.Context) *Workflow

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowQuery) Order

Order specifies how the records should be ordered.

func (*WorkflowQuery) QueryContract

func (wq *WorkflowQuery) QueryContract() *WorkflowContractQuery

QueryContract chains the current query on the "contract" edge.

func (*WorkflowQuery) QueryIntegrationAttachments

func (wq *WorkflowQuery) QueryIntegrationAttachments() *IntegrationAttachmentQuery

QueryIntegrationAttachments chains the current query on the "integration_attachments" edge.

func (*WorkflowQuery) QueryOrganization

func (wq *WorkflowQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*WorkflowQuery) QueryReferrers

func (wq *WorkflowQuery) QueryReferrers() *ReferrerQuery

QueryReferrers chains the current query on the "referrers" edge.

func (*WorkflowQuery) QueryRobotaccounts

func (wq *WorkflowQuery) QueryRobotaccounts() *RobotAccountQuery

QueryRobotaccounts chains the current query on the "robotaccounts" edge.

func (*WorkflowQuery) QueryWorkflowruns

func (wq *WorkflowQuery) QueryWorkflowruns() *WorkflowRunQuery

QueryWorkflowruns chains the current query on the "workflowruns" edge.

func (*WorkflowQuery) Select

func (wq *WorkflowQuery) Select(fields ...string) *WorkflowSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.Workflow.Query().
	Select(workflow.FieldName).
	Scan(ctx, &v)

func (*WorkflowQuery) Unique

func (wq *WorkflowQuery) Unique(unique bool) *WorkflowQuery

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 (*WorkflowQuery) Where

func (wq *WorkflowQuery) Where(ps ...predicate.Workflow) *WorkflowQuery

Where adds a new predicate for the WorkflowQuery builder.

func (*WorkflowQuery) WithContract

func (wq *WorkflowQuery) WithContract(opts ...func(*WorkflowContractQuery)) *WorkflowQuery

WithContract tells the query-builder to eager-load the nodes that are connected to the "contract" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowQuery) WithIntegrationAttachments

func (wq *WorkflowQuery) WithIntegrationAttachments(opts ...func(*IntegrationAttachmentQuery)) *WorkflowQuery

WithIntegrationAttachments tells the query-builder to eager-load the nodes that are connected to the "integration_attachments" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowQuery) WithOrganization

func (wq *WorkflowQuery) WithOrganization(opts ...func(*OrganizationQuery)) *WorkflowQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowQuery) WithReferrers

func (wq *WorkflowQuery) WithReferrers(opts ...func(*ReferrerQuery)) *WorkflowQuery

WithReferrers tells the query-builder to eager-load the nodes that are connected to the "referrers" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowQuery) WithRobotaccounts

func (wq *WorkflowQuery) WithRobotaccounts(opts ...func(*RobotAccountQuery)) *WorkflowQuery

WithRobotaccounts tells the query-builder to eager-load the nodes that are connected to the "robotaccounts" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowQuery) WithWorkflowruns

func (wq *WorkflowQuery) WithWorkflowruns(opts ...func(*WorkflowRunQuery)) *WorkflowQuery

WithWorkflowruns tells the query-builder to eager-load the nodes that are connected to the "workflowruns" edge. The optional arguments are used to configure the query builder of the edge.

type WorkflowRun

type WorkflowRun struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// FinishedAt holds the value of the "finished_at" field.
	FinishedAt time.Time `json:"finished_at,omitempty"`
	// State holds the value of the "state" field.
	State biz.WorkflowRunStatus `json:"state,omitempty"`
	// Reason holds the value of the "reason" field.
	Reason string `json:"reason,omitempty"`
	// RunURL holds the value of the "run_url" field.
	RunURL string `json:"run_url,omitempty"`
	// RunnerType holds the value of the "runner_type" field.
	RunnerType string `json:"runner_type,omitempty"`
	// Attestation holds the value of the "attestation" field.
	Attestation *dsse.Envelope `json:"attestation,omitempty"`
	// AttestationDigest holds the value of the "attestation_digest" field.
	AttestationDigest string `json:"attestation_digest,omitempty"`
	// AttestationState holds the value of the "attestation_state" field.
	AttestationState []byte `json:"attestation_state,omitempty"`
	// ContractRevisionUsed holds the value of the "contract_revision_used" field.
	ContractRevisionUsed int `json:"contract_revision_used,omitempty"`
	// ContractRevisionLatest holds the value of the "contract_revision_latest" field.
	ContractRevisionLatest int `json:"contract_revision_latest,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorkflowRunQuery when eager-loading is set.
	Edges WorkflowRunEdges `json:"edges"`
	// contains filtered or unexported fields
}

WorkflowRun is the model entity for the WorkflowRun schema.

func (*WorkflowRun) QueryCasBackends

func (wr *WorkflowRun) QueryCasBackends() *CASBackendQuery

QueryCasBackends queries the "cas_backends" edge of the WorkflowRun entity.

func (*WorkflowRun) QueryContractVersion

func (wr *WorkflowRun) QueryContractVersion() *WorkflowContractVersionQuery

QueryContractVersion queries the "contract_version" edge of the WorkflowRun entity.

func (*WorkflowRun) QueryWorkflow

func (wr *WorkflowRun) QueryWorkflow() *WorkflowQuery

QueryWorkflow queries the "workflow" edge of the WorkflowRun entity.

func (*WorkflowRun) String

func (wr *WorkflowRun) String() string

String implements the fmt.Stringer.

func (*WorkflowRun) Unwrap

func (wr *WorkflowRun) Unwrap() *WorkflowRun

Unwrap unwraps the WorkflowRun 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 (*WorkflowRun) Update

func (wr *WorkflowRun) Update() *WorkflowRunUpdateOne

Update returns a builder for updating this WorkflowRun. Note that you need to call WorkflowRun.Unwrap() before calling this method if this WorkflowRun was returned from a transaction, and the transaction was committed or rolled back.

func (*WorkflowRun) Value

func (wr *WorkflowRun) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WorkflowRun. This includes values selected through modifiers, order, etc.

type WorkflowRunClient

type WorkflowRunClient struct {
	// contains filtered or unexported fields
}

WorkflowRunClient is a client for the WorkflowRun schema.

func NewWorkflowRunClient

func NewWorkflowRunClient(c config) *WorkflowRunClient

NewWorkflowRunClient returns a client for the WorkflowRun from the given config.

func (*WorkflowRunClient) Create

func (c *WorkflowRunClient) Create() *WorkflowRunCreate

Create returns a builder for creating a WorkflowRun entity.

func (*WorkflowRunClient) CreateBulk

func (c *WorkflowRunClient) CreateBulk(builders ...*WorkflowRunCreate) *WorkflowRunCreateBulk

CreateBulk returns a builder for creating a bulk of WorkflowRun entities.

func (*WorkflowRunClient) Delete

func (c *WorkflowRunClient) Delete() *WorkflowRunDelete

Delete returns a delete builder for WorkflowRun.

func (*WorkflowRunClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowRunClient) DeleteOneID

func (c *WorkflowRunClient) DeleteOneID(id uuid.UUID) *WorkflowRunDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowRunClient) Get

Get returns a WorkflowRun entity by its id.

func (*WorkflowRunClient) GetX

GetX is like Get, but panics if an error occurs.

func (*WorkflowRunClient) Hooks

func (c *WorkflowRunClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowRunClient) Intercept

func (c *WorkflowRunClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowrun.Intercept(f(g(h())))`.

func (*WorkflowRunClient) Interceptors

func (c *WorkflowRunClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowRunClient) MapCreateBulk added in v0.91.6

func (c *WorkflowRunClient) MapCreateBulk(slice any, setFunc func(*WorkflowRunCreate, int)) *WorkflowRunCreateBulk

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 (*WorkflowRunClient) Query

func (c *WorkflowRunClient) Query() *WorkflowRunQuery

Query returns a query builder for WorkflowRun.

func (*WorkflowRunClient) QueryCasBackends

func (c *WorkflowRunClient) QueryCasBackends(wr *WorkflowRun) *CASBackendQuery

QueryCasBackends queries the cas_backends edge of a WorkflowRun.

func (*WorkflowRunClient) QueryContractVersion

func (c *WorkflowRunClient) QueryContractVersion(wr *WorkflowRun) *WorkflowContractVersionQuery

QueryContractVersion queries the contract_version edge of a WorkflowRun.

func (*WorkflowRunClient) QueryWorkflow

func (c *WorkflowRunClient) QueryWorkflow(wr *WorkflowRun) *WorkflowQuery

QueryWorkflow queries the workflow edge of a WorkflowRun.

func (*WorkflowRunClient) Update

func (c *WorkflowRunClient) Update() *WorkflowRunUpdate

Update returns an update builder for WorkflowRun.

func (*WorkflowRunClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*WorkflowRunClient) UpdateOneID

func (c *WorkflowRunClient) UpdateOneID(id uuid.UUID) *WorkflowRunUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WorkflowRunClient) Use

func (c *WorkflowRunClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowrun.Hooks(f(g(h())))`.

type WorkflowRunCreate

type WorkflowRunCreate struct {
	// contains filtered or unexported fields
}

WorkflowRunCreate is the builder for creating a WorkflowRun entity.

func (*WorkflowRunCreate) AddCasBackendIDs

func (wrc *WorkflowRunCreate) AddCasBackendIDs(ids ...uuid.UUID) *WorkflowRunCreate

AddCasBackendIDs adds the "cas_backends" edge to the CASBackend entity by IDs.

func (*WorkflowRunCreate) AddCasBackends

func (wrc *WorkflowRunCreate) AddCasBackends(c ...*CASBackend) *WorkflowRunCreate

AddCasBackends adds the "cas_backends" edges to the CASBackend entity.

func (*WorkflowRunCreate) Exec

func (wrc *WorkflowRunCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowRunCreate) ExecX

func (wrc *WorkflowRunCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowRunCreate) Mutation

func (wrc *WorkflowRunCreate) Mutation() *WorkflowRunMutation

Mutation returns the WorkflowRunMutation object of the builder.

func (*WorkflowRunCreate) Save

func (wrc *WorkflowRunCreate) Save(ctx context.Context) (*WorkflowRun, error)

Save creates the WorkflowRun in the database.

func (*WorkflowRunCreate) SaveX

func (wrc *WorkflowRunCreate) SaveX(ctx context.Context) *WorkflowRun

SaveX calls Save and panics if Save returns an error.

func (*WorkflowRunCreate) SetAttestation

func (wrc *WorkflowRunCreate) SetAttestation(d *dsse.Envelope) *WorkflowRunCreate

SetAttestation sets the "attestation" field.

func (*WorkflowRunCreate) SetAttestationDigest

func (wrc *WorkflowRunCreate) SetAttestationDigest(s string) *WorkflowRunCreate

SetAttestationDigest sets the "attestation_digest" field.

func (*WorkflowRunCreate) SetAttestationState

func (wrc *WorkflowRunCreate) SetAttestationState(b []byte) *WorkflowRunCreate

SetAttestationState sets the "attestation_state" field.

func (*WorkflowRunCreate) SetContractRevisionLatest

func (wrc *WorkflowRunCreate) SetContractRevisionLatest(i int) *WorkflowRunCreate

SetContractRevisionLatest sets the "contract_revision_latest" field.

func (*WorkflowRunCreate) SetContractRevisionUsed

func (wrc *WorkflowRunCreate) SetContractRevisionUsed(i int) *WorkflowRunCreate

SetContractRevisionUsed sets the "contract_revision_used" field.

func (*WorkflowRunCreate) SetContractVersion

func (wrc *WorkflowRunCreate) SetContractVersion(w *WorkflowContractVersion) *WorkflowRunCreate

SetContractVersion sets the "contract_version" edge to the WorkflowContractVersion entity.

func (*WorkflowRunCreate) SetContractVersionID

func (wrc *WorkflowRunCreate) SetContractVersionID(id uuid.UUID) *WorkflowRunCreate

SetContractVersionID sets the "contract_version" edge to the WorkflowContractVersion entity by ID.

func (*WorkflowRunCreate) SetCreatedAt

func (wrc *WorkflowRunCreate) SetCreatedAt(t time.Time) *WorkflowRunCreate

SetCreatedAt sets the "created_at" field.

func (*WorkflowRunCreate) SetFinishedAt

func (wrc *WorkflowRunCreate) SetFinishedAt(t time.Time) *WorkflowRunCreate

SetFinishedAt sets the "finished_at" field.

func (*WorkflowRunCreate) SetID

SetID sets the "id" field.

func (*WorkflowRunCreate) SetNillableAttestationDigest

func (wrc *WorkflowRunCreate) SetNillableAttestationDigest(s *string) *WorkflowRunCreate

SetNillableAttestationDigest sets the "attestation_digest" field if the given value is not nil.

func (*WorkflowRunCreate) SetNillableContractVersionID

func (wrc *WorkflowRunCreate) SetNillableContractVersionID(id *uuid.UUID) *WorkflowRunCreate

SetNillableContractVersionID sets the "contract_version" edge to the WorkflowContractVersion entity by ID if the given value is not nil.

func (*WorkflowRunCreate) SetNillableCreatedAt

func (wrc *WorkflowRunCreate) SetNillableCreatedAt(t *time.Time) *WorkflowRunCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*WorkflowRunCreate) SetNillableFinishedAt

func (wrc *WorkflowRunCreate) SetNillableFinishedAt(t *time.Time) *WorkflowRunCreate

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*WorkflowRunCreate) SetNillableID

func (wrc *WorkflowRunCreate) SetNillableID(u *uuid.UUID) *WorkflowRunCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*WorkflowRunCreate) SetNillableReason

func (wrc *WorkflowRunCreate) SetNillableReason(s *string) *WorkflowRunCreate

SetNillableReason sets the "reason" field if the given value is not nil.

func (*WorkflowRunCreate) SetNillableRunURL

func (wrc *WorkflowRunCreate) SetNillableRunURL(s *string) *WorkflowRunCreate

SetNillableRunURL sets the "run_url" field if the given value is not nil.

func (*WorkflowRunCreate) SetNillableRunnerType

func (wrc *WorkflowRunCreate) SetNillableRunnerType(s *string) *WorkflowRunCreate

SetNillableRunnerType sets the "runner_type" field if the given value is not nil.

func (*WorkflowRunCreate) SetNillableState

func (wrc *WorkflowRunCreate) SetNillableState(brs *biz.WorkflowRunStatus) *WorkflowRunCreate

SetNillableState sets the "state" field if the given value is not nil.

func (*WorkflowRunCreate) SetNillableWorkflowID

func (wrc *WorkflowRunCreate) SetNillableWorkflowID(id *uuid.UUID) *WorkflowRunCreate

SetNillableWorkflowID sets the "workflow" edge to the Workflow entity by ID if the given value is not nil.

func (*WorkflowRunCreate) SetReason

func (wrc *WorkflowRunCreate) SetReason(s string) *WorkflowRunCreate

SetReason sets the "reason" field.

func (*WorkflowRunCreate) SetRunURL

func (wrc *WorkflowRunCreate) SetRunURL(s string) *WorkflowRunCreate

SetRunURL sets the "run_url" field.

func (*WorkflowRunCreate) SetRunnerType

func (wrc *WorkflowRunCreate) SetRunnerType(s string) *WorkflowRunCreate

SetRunnerType sets the "runner_type" field.

func (*WorkflowRunCreate) SetState

SetState sets the "state" field.

func (*WorkflowRunCreate) SetWorkflow

func (wrc *WorkflowRunCreate) SetWorkflow(w *Workflow) *WorkflowRunCreate

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*WorkflowRunCreate) SetWorkflowID

func (wrc *WorkflowRunCreate) SetWorkflowID(id uuid.UUID) *WorkflowRunCreate

SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.

type WorkflowRunCreateBulk

type WorkflowRunCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowRunCreateBulk is the builder for creating many WorkflowRun entities in bulk.

func (*WorkflowRunCreateBulk) Exec

func (wrcb *WorkflowRunCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowRunCreateBulk) ExecX

func (wrcb *WorkflowRunCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowRunCreateBulk) Save

func (wrcb *WorkflowRunCreateBulk) Save(ctx context.Context) ([]*WorkflowRun, error)

Save creates the WorkflowRun entities in the database.

func (*WorkflowRunCreateBulk) SaveX

func (wrcb *WorkflowRunCreateBulk) SaveX(ctx context.Context) []*WorkflowRun

SaveX is like Save, but panics if an error occurs.

type WorkflowRunDelete

type WorkflowRunDelete struct {
	// contains filtered or unexported fields
}

WorkflowRunDelete is the builder for deleting a WorkflowRun entity.

func (*WorkflowRunDelete) Exec

func (wrd *WorkflowRunDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowRunDelete) ExecX

func (wrd *WorkflowRunDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowRunDelete) Where

Where appends a list predicates to the WorkflowRunDelete builder.

type WorkflowRunDeleteOne

type WorkflowRunDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowRunDeleteOne is the builder for deleting a single WorkflowRun entity.

func (*WorkflowRunDeleteOne) Exec

func (wrdo *WorkflowRunDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WorkflowRunDeleteOne) ExecX

func (wrdo *WorkflowRunDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowRunDeleteOne) Where

Where appends a list predicates to the WorkflowRunDelete builder.

type WorkflowRunEdges

type WorkflowRunEdges struct {
	// Workflow holds the value of the workflow edge.
	Workflow *Workflow `json:"workflow,omitempty"`
	// ContractVersion holds the value of the contract_version edge.
	ContractVersion *WorkflowContractVersion `json:"contract_version,omitempty"`
	// CasBackends holds the value of the cas_backends edge.
	CasBackends []*CASBackend `json:"cas_backends,omitempty"`
	// contains filtered or unexported fields
}

WorkflowRunEdges holds the relations/edges for other nodes in the graph.

func (WorkflowRunEdges) CasBackendsOrErr

func (e WorkflowRunEdges) CasBackendsOrErr() ([]*CASBackend, error)

CasBackendsOrErr returns the CasBackends value or an error if the edge was not loaded in eager-loading.

func (WorkflowRunEdges) ContractVersionOrErr

func (e WorkflowRunEdges) ContractVersionOrErr() (*WorkflowContractVersion, error)

ContractVersionOrErr returns the ContractVersion value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowRunEdges) WorkflowOrErr

func (e WorkflowRunEdges) WorkflowOrErr() (*Workflow, error)

WorkflowOrErr returns the Workflow value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WorkflowRunGroupBy

type WorkflowRunGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowRunGroupBy is the group-by builder for WorkflowRun entities.

func (*WorkflowRunGroupBy) Aggregate

func (wrgb *WorkflowRunGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowRunGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowRunGroupBy) Bool

func (s *WorkflowRunGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowRunGroupBy) BoolX

func (s *WorkflowRunGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowRunGroupBy) Bools

func (s *WorkflowRunGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowRunGroupBy) BoolsX

func (s *WorkflowRunGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowRunGroupBy) Float64

func (s *WorkflowRunGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowRunGroupBy) Float64X

func (s *WorkflowRunGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowRunGroupBy) Float64s

func (s *WorkflowRunGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowRunGroupBy) Float64sX

func (s *WorkflowRunGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowRunGroupBy) Int

func (s *WorkflowRunGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowRunGroupBy) IntX

func (s *WorkflowRunGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowRunGroupBy) Ints

func (s *WorkflowRunGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowRunGroupBy) IntsX

func (s *WorkflowRunGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowRunGroupBy) Scan

func (wrgb *WorkflowRunGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowRunGroupBy) ScanX

func (s *WorkflowRunGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowRunGroupBy) String

func (s *WorkflowRunGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowRunGroupBy) StringX

func (s *WorkflowRunGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowRunGroupBy) Strings

func (s *WorkflowRunGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowRunGroupBy) StringsX

func (s *WorkflowRunGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowRunMutation

type WorkflowRunMutation struct {
	// contains filtered or unexported fields
}

WorkflowRunMutation represents an operation that mutates the WorkflowRun nodes in the graph.

func (*WorkflowRunMutation) AddCasBackendIDs

func (m *WorkflowRunMutation) AddCasBackendIDs(ids ...uuid.UUID)

AddCasBackendIDs adds the "cas_backends" edge to the CASBackend entity by ids.

func (*WorkflowRunMutation) AddContractRevisionLatest

func (m *WorkflowRunMutation) AddContractRevisionLatest(i int)

AddContractRevisionLatest adds i to the "contract_revision_latest" field.

func (*WorkflowRunMutation) AddContractRevisionUsed

func (m *WorkflowRunMutation) AddContractRevisionUsed(i int)

AddContractRevisionUsed adds i to the "contract_revision_used" field.

func (*WorkflowRunMutation) AddField

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) AddedContractRevisionLatest

func (m *WorkflowRunMutation) AddedContractRevisionLatest() (r int, exists bool)

AddedContractRevisionLatest returns the value that was added to the "contract_revision_latest" field in this mutation.

func (*WorkflowRunMutation) AddedContractRevisionUsed

func (m *WorkflowRunMutation) AddedContractRevisionUsed() (r int, exists bool)

AddedContractRevisionUsed returns the value that was added to the "contract_revision_used" field in this mutation.

func (*WorkflowRunMutation) AddedEdges

func (m *WorkflowRunMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowRunMutation) AddedField

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) AddedFields

func (m *WorkflowRunMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowRunMutation) AddedIDs

func (m *WorkflowRunMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorkflowRunMutation) Attestation

func (m *WorkflowRunMutation) Attestation() (r *dsse.Envelope, exists bool)

Attestation returns the value of the "attestation" field in the mutation.

func (*WorkflowRunMutation) AttestationCleared

func (m *WorkflowRunMutation) AttestationCleared() bool

AttestationCleared returns if the "attestation" field was cleared in this mutation.

func (*WorkflowRunMutation) AttestationDigest

func (m *WorkflowRunMutation) AttestationDigest() (r string, exists bool)

AttestationDigest returns the value of the "attestation_digest" field in the mutation.

func (*WorkflowRunMutation) AttestationDigestCleared

func (m *WorkflowRunMutation) AttestationDigestCleared() bool

AttestationDigestCleared returns if the "attestation_digest" field was cleared in this mutation.

func (*WorkflowRunMutation) AttestationState

func (m *WorkflowRunMutation) AttestationState() (r []byte, exists bool)

AttestationState returns the value of the "attestation_state" field in the mutation.

func (*WorkflowRunMutation) AttestationStateCleared

func (m *WorkflowRunMutation) AttestationStateCleared() bool

AttestationStateCleared returns if the "attestation_state" field was cleared in this mutation.

func (*WorkflowRunMutation) CasBackendsCleared

func (m *WorkflowRunMutation) CasBackendsCleared() bool

CasBackendsCleared reports if the "cas_backends" edge to the CASBackend entity was cleared.

func (*WorkflowRunMutation) CasBackendsIDs

func (m *WorkflowRunMutation) CasBackendsIDs() (ids []uuid.UUID)

CasBackendsIDs returns the "cas_backends" edge IDs in the mutation.

func (*WorkflowRunMutation) ClearAttestation

func (m *WorkflowRunMutation) ClearAttestation()

ClearAttestation clears the value of the "attestation" field.

func (*WorkflowRunMutation) ClearAttestationDigest

func (m *WorkflowRunMutation) ClearAttestationDigest()

ClearAttestationDigest clears the value of the "attestation_digest" field.

func (*WorkflowRunMutation) ClearAttestationState

func (m *WorkflowRunMutation) ClearAttestationState()

ClearAttestationState clears the value of the "attestation_state" field.

func (*WorkflowRunMutation) ClearCasBackends

func (m *WorkflowRunMutation) ClearCasBackends()

ClearCasBackends clears the "cas_backends" edge to the CASBackend entity.

func (*WorkflowRunMutation) ClearContractVersion

func (m *WorkflowRunMutation) ClearContractVersion()

ClearContractVersion clears the "contract_version" edge to the WorkflowContractVersion entity.

func (*WorkflowRunMutation) ClearEdge

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ClearField

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ClearFinishedAt

func (m *WorkflowRunMutation) ClearFinishedAt()

ClearFinishedAt clears the value of the "finished_at" field.

func (*WorkflowRunMutation) ClearReason

func (m *WorkflowRunMutation) ClearReason()

ClearReason clears the value of the "reason" field.

func (*WorkflowRunMutation) ClearRunURL

func (m *WorkflowRunMutation) ClearRunURL()

ClearRunURL clears the value of the "run_url" field.

func (*WorkflowRunMutation) ClearRunnerType

func (m *WorkflowRunMutation) ClearRunnerType()

ClearRunnerType clears the value of the "runner_type" field.

func (*WorkflowRunMutation) ClearWorkflow

func (m *WorkflowRunMutation) ClearWorkflow()

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*WorkflowRunMutation) ClearedEdges

func (m *WorkflowRunMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowRunMutation) ClearedFields

func (m *WorkflowRunMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowRunMutation) Client

func (m WorkflowRunMutation) 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 (*WorkflowRunMutation) ContractRevisionLatest

func (m *WorkflowRunMutation) ContractRevisionLatest() (r int, exists bool)

ContractRevisionLatest returns the value of the "contract_revision_latest" field in the mutation.

func (*WorkflowRunMutation) ContractRevisionUsed

func (m *WorkflowRunMutation) ContractRevisionUsed() (r int, exists bool)

ContractRevisionUsed returns the value of the "contract_revision_used" field in the mutation.

func (*WorkflowRunMutation) ContractVersionCleared

func (m *WorkflowRunMutation) ContractVersionCleared() bool

ContractVersionCleared reports if the "contract_version" edge to the WorkflowContractVersion entity was cleared.

func (*WorkflowRunMutation) ContractVersionID

func (m *WorkflowRunMutation) ContractVersionID() (id uuid.UUID, exists bool)

ContractVersionID returns the "contract_version" edge ID in the mutation.

func (*WorkflowRunMutation) ContractVersionIDs

func (m *WorkflowRunMutation) ContractVersionIDs() (ids []uuid.UUID)

ContractVersionIDs returns the "contract_version" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ContractVersionID instead. It exists only for internal usage by the builders.

func (*WorkflowRunMutation) CreatedAt

func (m *WorkflowRunMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*WorkflowRunMutation) EdgeCleared

func (m *WorkflowRunMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorkflowRunMutation) Field

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) FieldCleared

func (m *WorkflowRunMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorkflowRunMutation) Fields

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) FinishedAt

func (m *WorkflowRunMutation) FinishedAt() (r time.Time, exists bool)

FinishedAt returns the value of the "finished_at" field in the mutation.

func (*WorkflowRunMutation) FinishedAtCleared

func (m *WorkflowRunMutation) FinishedAtCleared() bool

FinishedAtCleared returns if the "finished_at" field was cleared in this mutation.

func (*WorkflowRunMutation) ID

func (m *WorkflowRunMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WorkflowRunMutation) IDs

func (m *WorkflowRunMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*WorkflowRunMutation) OldAttestation

func (m *WorkflowRunMutation) OldAttestation(ctx context.Context) (v *dsse.Envelope, err error)

OldAttestation returns the old "attestation" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldAttestationDigest

func (m *WorkflowRunMutation) OldAttestationDigest(ctx context.Context) (v string, err error)

OldAttestationDigest returns the old "attestation_digest" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldAttestationState

func (m *WorkflowRunMutation) OldAttestationState(ctx context.Context) (v []byte, err error)

OldAttestationState returns the old "attestation_state" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldContractRevisionLatest

func (m *WorkflowRunMutation) OldContractRevisionLatest(ctx context.Context) (v int, err error)

OldContractRevisionLatest returns the old "contract_revision_latest" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldContractRevisionUsed

func (m *WorkflowRunMutation) OldContractRevisionUsed(ctx context.Context) (v int, err error)

OldContractRevisionUsed returns the old "contract_revision_used" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldCreatedAt

func (m *WorkflowRunMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldField

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) OldFinishedAt

func (m *WorkflowRunMutation) OldFinishedAt(ctx context.Context) (v time.Time, err error)

OldFinishedAt returns the old "finished_at" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldReason

func (m *WorkflowRunMutation) OldReason(ctx context.Context) (v string, err error)

OldReason returns the old "reason" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldRunURL

func (m *WorkflowRunMutation) OldRunURL(ctx context.Context) (v string, err error)

OldRunURL returns the old "run_url" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldRunnerType

func (m *WorkflowRunMutation) OldRunnerType(ctx context.Context) (v string, err error)

OldRunnerType returns the old "runner_type" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldState

func (m *WorkflowRunMutation) OldState(ctx context.Context) (v biz.WorkflowRunStatus, err error)

OldState returns the old "state" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) Op

func (m *WorkflowRunMutation) Op() Op

Op returns the operation name.

func (*WorkflowRunMutation) Reason

func (m *WorkflowRunMutation) Reason() (r string, exists bool)

Reason returns the value of the "reason" field in the mutation.

func (*WorkflowRunMutation) ReasonCleared

func (m *WorkflowRunMutation) ReasonCleared() bool

ReasonCleared returns if the "reason" field was cleared in this mutation.

func (*WorkflowRunMutation) RemoveCasBackendIDs

func (m *WorkflowRunMutation) RemoveCasBackendIDs(ids ...uuid.UUID)

RemoveCasBackendIDs removes the "cas_backends" edge to the CASBackend entity by IDs.

func (*WorkflowRunMutation) RemovedCasBackendsIDs

func (m *WorkflowRunMutation) RemovedCasBackendsIDs() (ids []uuid.UUID)

RemovedCasBackends returns the removed IDs of the "cas_backends" edge to the CASBackend entity.

func (*WorkflowRunMutation) RemovedEdges

func (m *WorkflowRunMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowRunMutation) RemovedIDs

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ResetAttestation

func (m *WorkflowRunMutation) ResetAttestation()

ResetAttestation resets all changes to the "attestation" field.

func (*WorkflowRunMutation) ResetAttestationDigest

func (m *WorkflowRunMutation) ResetAttestationDigest()

ResetAttestationDigest resets all changes to the "attestation_digest" field.

func (*WorkflowRunMutation) ResetAttestationState

func (m *WorkflowRunMutation) ResetAttestationState()

ResetAttestationState resets all changes to the "attestation_state" field.

func (*WorkflowRunMutation) ResetCasBackends

func (m *WorkflowRunMutation) ResetCasBackends()

ResetCasBackends resets all changes to the "cas_backends" edge.

func (*WorkflowRunMutation) ResetContractRevisionLatest

func (m *WorkflowRunMutation) ResetContractRevisionLatest()

ResetContractRevisionLatest resets all changes to the "contract_revision_latest" field.

func (*WorkflowRunMutation) ResetContractRevisionUsed

func (m *WorkflowRunMutation) ResetContractRevisionUsed()

ResetContractRevisionUsed resets all changes to the "contract_revision_used" field.

func (*WorkflowRunMutation) ResetContractVersion

func (m *WorkflowRunMutation) ResetContractVersion()

ResetContractVersion resets all changes to the "contract_version" edge.

func (*WorkflowRunMutation) ResetCreatedAt

func (m *WorkflowRunMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*WorkflowRunMutation) ResetEdge

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ResetField

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ResetFinishedAt

func (m *WorkflowRunMutation) ResetFinishedAt()

ResetFinishedAt resets all changes to the "finished_at" field.

func (*WorkflowRunMutation) ResetReason

func (m *WorkflowRunMutation) ResetReason()

ResetReason resets all changes to the "reason" field.

func (*WorkflowRunMutation) ResetRunURL

func (m *WorkflowRunMutation) ResetRunURL()

ResetRunURL resets all changes to the "run_url" field.

func (*WorkflowRunMutation) ResetRunnerType

func (m *WorkflowRunMutation) ResetRunnerType()

ResetRunnerType resets all changes to the "runner_type" field.

func (*WorkflowRunMutation) ResetState

func (m *WorkflowRunMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*WorkflowRunMutation) ResetWorkflow

func (m *WorkflowRunMutation) ResetWorkflow()

ResetWorkflow resets all changes to the "workflow" edge.

func (*WorkflowRunMutation) RunURL

func (m *WorkflowRunMutation) RunURL() (r string, exists bool)

RunURL returns the value of the "run_url" field in the mutation.

func (*WorkflowRunMutation) RunURLCleared

func (m *WorkflowRunMutation) RunURLCleared() bool

RunURLCleared returns if the "run_url" field was cleared in this mutation.

func (*WorkflowRunMutation) RunnerType

func (m *WorkflowRunMutation) RunnerType() (r string, exists bool)

RunnerType returns the value of the "runner_type" field in the mutation.

func (*WorkflowRunMutation) RunnerTypeCleared

func (m *WorkflowRunMutation) RunnerTypeCleared() bool

RunnerTypeCleared returns if the "runner_type" field was cleared in this mutation.

func (*WorkflowRunMutation) SetAttestation

func (m *WorkflowRunMutation) SetAttestation(d *dsse.Envelope)

SetAttestation sets the "attestation" field.

func (*WorkflowRunMutation) SetAttestationDigest

func (m *WorkflowRunMutation) SetAttestationDigest(s string)

SetAttestationDigest sets the "attestation_digest" field.

func (*WorkflowRunMutation) SetAttestationState

func (m *WorkflowRunMutation) SetAttestationState(b []byte)

SetAttestationState sets the "attestation_state" field.

func (*WorkflowRunMutation) SetContractRevisionLatest

func (m *WorkflowRunMutation) SetContractRevisionLatest(i int)

SetContractRevisionLatest sets the "contract_revision_latest" field.

func (*WorkflowRunMutation) SetContractRevisionUsed

func (m *WorkflowRunMutation) SetContractRevisionUsed(i int)

SetContractRevisionUsed sets the "contract_revision_used" field.

func (*WorkflowRunMutation) SetContractVersionID

func (m *WorkflowRunMutation) SetContractVersionID(id uuid.UUID)

SetContractVersionID sets the "contract_version" edge to the WorkflowContractVersion entity by id.

func (*WorkflowRunMutation) SetCreatedAt

func (m *WorkflowRunMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*WorkflowRunMutation) SetField

func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) SetFinishedAt

func (m *WorkflowRunMutation) SetFinishedAt(t time.Time)

SetFinishedAt sets the "finished_at" field.

func (*WorkflowRunMutation) SetID

func (m *WorkflowRunMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowRun entities.

func (*WorkflowRunMutation) SetOp

func (m *WorkflowRunMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowRunMutation) SetReason

func (m *WorkflowRunMutation) SetReason(s string)

SetReason sets the "reason" field.

func (*WorkflowRunMutation) SetRunURL

func (m *WorkflowRunMutation) SetRunURL(s string)

SetRunURL sets the "run_url" field.

func (*WorkflowRunMutation) SetRunnerType

func (m *WorkflowRunMutation) SetRunnerType(s string)

SetRunnerType sets the "runner_type" field.

func (*WorkflowRunMutation) SetState

func (m *WorkflowRunMutation) SetState(brs biz.WorkflowRunStatus)

SetState sets the "state" field.

func (*WorkflowRunMutation) SetWorkflowID

func (m *WorkflowRunMutation) SetWorkflowID(id uuid.UUID)

SetWorkflowID sets the "workflow" edge to the Workflow entity by id.

func (*WorkflowRunMutation) State

func (m *WorkflowRunMutation) State() (r biz.WorkflowRunStatus, exists bool)

State returns the value of the "state" field in the mutation.

func (WorkflowRunMutation) Tx

func (m WorkflowRunMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorkflowRunMutation) Type

func (m *WorkflowRunMutation) Type() string

Type returns the node type of this mutation (WorkflowRun).

func (*WorkflowRunMutation) Where

func (m *WorkflowRunMutation) Where(ps ...predicate.WorkflowRun)

Where appends a list predicates to the WorkflowRunMutation builder.

func (*WorkflowRunMutation) WhereP

func (m *WorkflowRunMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowRunMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowRunMutation) WorkflowCleared

func (m *WorkflowRunMutation) WorkflowCleared() bool

WorkflowCleared reports if the "workflow" edge to the Workflow entity was cleared.

func (*WorkflowRunMutation) WorkflowID

func (m *WorkflowRunMutation) WorkflowID() (id uuid.UUID, exists bool)

WorkflowID returns the "workflow" edge ID in the mutation.

func (*WorkflowRunMutation) WorkflowIDs

func (m *WorkflowRunMutation) WorkflowIDs() (ids []uuid.UUID)

WorkflowIDs returns the "workflow" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorkflowID instead. It exists only for internal usage by the builders.

type WorkflowRunQuery

type WorkflowRunQuery struct {
	// contains filtered or unexported fields
}

WorkflowRunQuery is the builder for querying WorkflowRun entities.

func (*WorkflowRunQuery) Aggregate

func (wrq *WorkflowRunQuery) Aggregate(fns ...AggregateFunc) *WorkflowRunSelect

Aggregate returns a WorkflowRunSelect configured with the given aggregations.

func (*WorkflowRunQuery) All

func (wrq *WorkflowRunQuery) All(ctx context.Context) ([]*WorkflowRun, error)

All executes the query and returns a list of WorkflowRuns.

func (*WorkflowRunQuery) AllX

func (wrq *WorkflowRunQuery) AllX(ctx context.Context) []*WorkflowRun

AllX is like All, but panics if an error occurs.

func (*WorkflowRunQuery) Clone

func (wrq *WorkflowRunQuery) Clone() *WorkflowRunQuery

Clone returns a duplicate of the WorkflowRunQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorkflowRunQuery) Count

func (wrq *WorkflowRunQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorkflowRunQuery) CountX

func (wrq *WorkflowRunQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowRunQuery) Exist

func (wrq *WorkflowRunQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WorkflowRunQuery) ExistX

func (wrq *WorkflowRunQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowRunQuery) First

func (wrq *WorkflowRunQuery) First(ctx context.Context) (*WorkflowRun, error)

First returns the first WorkflowRun entity from the query. Returns a *NotFoundError when no WorkflowRun was found.

func (*WorkflowRunQuery) FirstID

func (wrq *WorkflowRunQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first WorkflowRun ID from the query. Returns a *NotFoundError when no WorkflowRun ID was found.

func (*WorkflowRunQuery) FirstIDX

func (wrq *WorkflowRunQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowRunQuery) FirstX

func (wrq *WorkflowRunQuery) FirstX(ctx context.Context) *WorkflowRun

FirstX is like First, but panics if an error occurs.

func (*WorkflowRunQuery) ForShare added in v0.94.3

func (wrq *WorkflowRunQuery) ForShare(opts ...sql.LockOption) *WorkflowRunQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*WorkflowRunQuery) ForUpdate added in v0.94.3

func (wrq *WorkflowRunQuery) ForUpdate(opts ...sql.LockOption) *WorkflowRunQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*WorkflowRunQuery) GroupBy

func (wrq *WorkflowRunQuery) GroupBy(field string, fields ...string) *WorkflowRunGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.WorkflowRun.Query().
	GroupBy(workflowrun.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WorkflowRunQuery) IDs

func (wrq *WorkflowRunQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of WorkflowRun IDs.

func (*WorkflowRunQuery) IDsX

func (wrq *WorkflowRunQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowRunQuery) Limit

func (wrq *WorkflowRunQuery) Limit(limit int) *WorkflowRunQuery

Limit the number of records to be returned by this query.

func (*WorkflowRunQuery) Modify

func (wrq *WorkflowRunQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowRunSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowRunQuery) Offset

func (wrq *WorkflowRunQuery) Offset(offset int) *WorkflowRunQuery

Offset to start from.

func (*WorkflowRunQuery) Only

func (wrq *WorkflowRunQuery) Only(ctx context.Context) (*WorkflowRun, error)

Only returns a single WorkflowRun entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowRun entity is found. Returns a *NotFoundError when no WorkflowRun entities are found.

func (*WorkflowRunQuery) OnlyID

func (wrq *WorkflowRunQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only WorkflowRun ID in the query. Returns a *NotSingularError when more than one WorkflowRun ID is found. Returns a *NotFoundError when no entities are found.

func (*WorkflowRunQuery) OnlyIDX

func (wrq *WorkflowRunQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowRunQuery) OnlyX

func (wrq *WorkflowRunQuery) OnlyX(ctx context.Context) *WorkflowRun

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowRunQuery) Order

Order specifies how the records should be ordered.

func (*WorkflowRunQuery) QueryCasBackends

func (wrq *WorkflowRunQuery) QueryCasBackends() *CASBackendQuery

QueryCasBackends chains the current query on the "cas_backends" edge.

func (*WorkflowRunQuery) QueryContractVersion

func (wrq *WorkflowRunQuery) QueryContractVersion() *WorkflowContractVersionQuery

QueryContractVersion chains the current query on the "contract_version" edge.

func (*WorkflowRunQuery) QueryWorkflow

func (wrq *WorkflowRunQuery) QueryWorkflow() *WorkflowQuery

QueryWorkflow chains the current query on the "workflow" edge.

func (*WorkflowRunQuery) Select

func (wrq *WorkflowRunQuery) Select(fields ...string) *WorkflowRunSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.WorkflowRun.Query().
	Select(workflowrun.FieldCreatedAt).
	Scan(ctx, &v)

func (*WorkflowRunQuery) Unique

func (wrq *WorkflowRunQuery) Unique(unique bool) *WorkflowRunQuery

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 (*WorkflowRunQuery) Where

Where adds a new predicate for the WorkflowRunQuery builder.

func (*WorkflowRunQuery) WithCasBackends

func (wrq *WorkflowRunQuery) WithCasBackends(opts ...func(*CASBackendQuery)) *WorkflowRunQuery

WithCasBackends tells the query-builder to eager-load the nodes that are connected to the "cas_backends" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowRunQuery) WithContractVersion

func (wrq *WorkflowRunQuery) WithContractVersion(opts ...func(*WorkflowContractVersionQuery)) *WorkflowRunQuery

WithContractVersion tells the query-builder to eager-load the nodes that are connected to the "contract_version" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowRunQuery) WithWorkflow

func (wrq *WorkflowRunQuery) WithWorkflow(opts ...func(*WorkflowQuery)) *WorkflowRunQuery

WithWorkflow tells the query-builder to eager-load the nodes that are connected to the "workflow" edge. The optional arguments are used to configure the query builder of the edge.

type WorkflowRunSelect

type WorkflowRunSelect struct {
	*WorkflowRunQuery
	// contains filtered or unexported fields
}

WorkflowRunSelect is the builder for selecting fields of WorkflowRun entities.

func (*WorkflowRunSelect) Aggregate

func (wrs *WorkflowRunSelect) Aggregate(fns ...AggregateFunc) *WorkflowRunSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowRunSelect) Bool

func (s *WorkflowRunSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowRunSelect) BoolX

func (s *WorkflowRunSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowRunSelect) Bools

func (s *WorkflowRunSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowRunSelect) BoolsX

func (s *WorkflowRunSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowRunSelect) Float64

func (s *WorkflowRunSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowRunSelect) Float64X

func (s *WorkflowRunSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowRunSelect) Float64s

func (s *WorkflowRunSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowRunSelect) Float64sX

func (s *WorkflowRunSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowRunSelect) Int

func (s *WorkflowRunSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowRunSelect) IntX

func (s *WorkflowRunSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowRunSelect) Ints

func (s *WorkflowRunSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowRunSelect) IntsX

func (s *WorkflowRunSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowRunSelect) Modify

func (wrs *WorkflowRunSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowRunSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowRunSelect) Scan

func (wrs *WorkflowRunSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowRunSelect) ScanX

func (s *WorkflowRunSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowRunSelect) String

func (s *WorkflowRunSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowRunSelect) StringX

func (s *WorkflowRunSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowRunSelect) Strings

func (s *WorkflowRunSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowRunSelect) StringsX

func (s *WorkflowRunSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowRunUpdate

type WorkflowRunUpdate struct {
	// contains filtered or unexported fields
}

WorkflowRunUpdate is the builder for updating WorkflowRun entities.

func (*WorkflowRunUpdate) AddCasBackendIDs

func (wru *WorkflowRunUpdate) AddCasBackendIDs(ids ...uuid.UUID) *WorkflowRunUpdate

AddCasBackendIDs adds the "cas_backends" edge to the CASBackend entity by IDs.

func (*WorkflowRunUpdate) AddCasBackends

func (wru *WorkflowRunUpdate) AddCasBackends(c ...*CASBackend) *WorkflowRunUpdate

AddCasBackends adds the "cas_backends" edges to the CASBackend entity.

func (*WorkflowRunUpdate) AddContractRevisionLatest

func (wru *WorkflowRunUpdate) AddContractRevisionLatest(i int) *WorkflowRunUpdate

AddContractRevisionLatest adds i to the "contract_revision_latest" field.

func (*WorkflowRunUpdate) AddContractRevisionUsed

func (wru *WorkflowRunUpdate) AddContractRevisionUsed(i int) *WorkflowRunUpdate

AddContractRevisionUsed adds i to the "contract_revision_used" field.

func (*WorkflowRunUpdate) ClearAttestation

func (wru *WorkflowRunUpdate) ClearAttestation() *WorkflowRunUpdate

ClearAttestation clears the value of the "attestation" field.

func (*WorkflowRunUpdate) ClearAttestationDigest

func (wru *WorkflowRunUpdate) ClearAttestationDigest() *WorkflowRunUpdate

ClearAttestationDigest clears the value of the "attestation_digest" field.

func (*WorkflowRunUpdate) ClearAttestationState

func (wru *WorkflowRunUpdate) ClearAttestationState() *WorkflowRunUpdate

ClearAttestationState clears the value of the "attestation_state" field.

func (*WorkflowRunUpdate) ClearCasBackends

func (wru *WorkflowRunUpdate) ClearCasBackends() *WorkflowRunUpdate

ClearCasBackends clears all "cas_backends" edges to the CASBackend entity.

func (*WorkflowRunUpdate) ClearContractVersion

func (wru *WorkflowRunUpdate) ClearContractVersion() *WorkflowRunUpdate

ClearContractVersion clears the "contract_version" edge to the WorkflowContractVersion entity.

func (*WorkflowRunUpdate) ClearFinishedAt

func (wru *WorkflowRunUpdate) ClearFinishedAt() *WorkflowRunUpdate

ClearFinishedAt clears the value of the "finished_at" field.

func (*WorkflowRunUpdate) ClearReason

func (wru *WorkflowRunUpdate) ClearReason() *WorkflowRunUpdate

ClearReason clears the value of the "reason" field.

func (*WorkflowRunUpdate) ClearRunURL

func (wru *WorkflowRunUpdate) ClearRunURL() *WorkflowRunUpdate

ClearRunURL clears the value of the "run_url" field.

func (*WorkflowRunUpdate) ClearRunnerType

func (wru *WorkflowRunUpdate) ClearRunnerType() *WorkflowRunUpdate

ClearRunnerType clears the value of the "runner_type" field.

func (*WorkflowRunUpdate) ClearWorkflow

func (wru *WorkflowRunUpdate) ClearWorkflow() *WorkflowRunUpdate

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*WorkflowRunUpdate) Exec

func (wru *WorkflowRunUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowRunUpdate) ExecX

func (wru *WorkflowRunUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowRunUpdate) Modify

func (wru *WorkflowRunUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowRunUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowRunUpdate) Mutation

func (wru *WorkflowRunUpdate) Mutation() *WorkflowRunMutation

Mutation returns the WorkflowRunMutation object of the builder.

func (*WorkflowRunUpdate) RemoveCasBackendIDs

func (wru *WorkflowRunUpdate) RemoveCasBackendIDs(ids ...uuid.UUID) *WorkflowRunUpdate

RemoveCasBackendIDs removes the "cas_backends" edge to CASBackend entities by IDs.

func (*WorkflowRunUpdate) RemoveCasBackends

func (wru *WorkflowRunUpdate) RemoveCasBackends(c ...*CASBackend) *WorkflowRunUpdate

RemoveCasBackends removes "cas_backends" edges to CASBackend entities.

func (*WorkflowRunUpdate) Save

func (wru *WorkflowRunUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorkflowRunUpdate) SaveX

func (wru *WorkflowRunUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WorkflowRunUpdate) SetAttestation

func (wru *WorkflowRunUpdate) SetAttestation(d *dsse.Envelope) *WorkflowRunUpdate

SetAttestation sets the "attestation" field.

func (*WorkflowRunUpdate) SetAttestationDigest

func (wru *WorkflowRunUpdate) SetAttestationDigest(s string) *WorkflowRunUpdate

SetAttestationDigest sets the "attestation_digest" field.

func (*WorkflowRunUpdate) SetAttestationState

func (wru *WorkflowRunUpdate) SetAttestationState(b []byte) *WorkflowRunUpdate

SetAttestationState sets the "attestation_state" field.

func (*WorkflowRunUpdate) SetContractRevisionLatest

func (wru *WorkflowRunUpdate) SetContractRevisionLatest(i int) *WorkflowRunUpdate

SetContractRevisionLatest sets the "contract_revision_latest" field.

func (*WorkflowRunUpdate) SetContractRevisionUsed

func (wru *WorkflowRunUpdate) SetContractRevisionUsed(i int) *WorkflowRunUpdate

SetContractRevisionUsed sets the "contract_revision_used" field.

func (*WorkflowRunUpdate) SetContractVersion

func (wru *WorkflowRunUpdate) SetContractVersion(w *WorkflowContractVersion) *WorkflowRunUpdate

SetContractVersion sets the "contract_version" edge to the WorkflowContractVersion entity.

func (*WorkflowRunUpdate) SetContractVersionID

func (wru *WorkflowRunUpdate) SetContractVersionID(id uuid.UUID) *WorkflowRunUpdate

SetContractVersionID sets the "contract_version" edge to the WorkflowContractVersion entity by ID.

func (*WorkflowRunUpdate) SetFinishedAt

func (wru *WorkflowRunUpdate) SetFinishedAt(t time.Time) *WorkflowRunUpdate

SetFinishedAt sets the "finished_at" field.

func (*WorkflowRunUpdate) SetNillableAttestationDigest

func (wru *WorkflowRunUpdate) SetNillableAttestationDigest(s *string) *WorkflowRunUpdate

SetNillableAttestationDigest sets the "attestation_digest" field if the given value is not nil.

func (*WorkflowRunUpdate) SetNillableContractRevisionLatest added in v0.91.6

func (wru *WorkflowRunUpdate) SetNillableContractRevisionLatest(i *int) *WorkflowRunUpdate

SetNillableContractRevisionLatest sets the "contract_revision_latest" field if the given value is not nil.

func (*WorkflowRunUpdate) SetNillableContractRevisionUsed added in v0.91.6

func (wru *WorkflowRunUpdate) SetNillableContractRevisionUsed(i *int) *WorkflowRunUpdate

SetNillableContractRevisionUsed sets the "contract_revision_used" field if the given value is not nil.

func (*WorkflowRunUpdate) SetNillableContractVersionID

func (wru *WorkflowRunUpdate) SetNillableContractVersionID(id *uuid.UUID) *WorkflowRunUpdate

SetNillableContractVersionID sets the "contract_version" edge to the WorkflowContractVersion entity by ID if the given value is not nil.

func (*WorkflowRunUpdate) SetNillableFinishedAt

func (wru *WorkflowRunUpdate) SetNillableFinishedAt(t *time.Time) *WorkflowRunUpdate

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*WorkflowRunUpdate) SetNillableReason

func (wru *WorkflowRunUpdate) SetNillableReason(s *string) *WorkflowRunUpdate

SetNillableReason sets the "reason" field if the given value is not nil.

func (*WorkflowRunUpdate) SetNillableRunURL

func (wru *WorkflowRunUpdate) SetNillableRunURL(s *string) *WorkflowRunUpdate

SetNillableRunURL sets the "run_url" field if the given value is not nil.

func (*WorkflowRunUpdate) SetNillableRunnerType

func (wru *WorkflowRunUpdate) SetNillableRunnerType(s *string) *WorkflowRunUpdate

SetNillableRunnerType sets the "runner_type" field if the given value is not nil.

func (*WorkflowRunUpdate) SetNillableState

func (wru *WorkflowRunUpdate) SetNillableState(brs *biz.WorkflowRunStatus) *WorkflowRunUpdate

SetNillableState sets the "state" field if the given value is not nil.

func (*WorkflowRunUpdate) SetNillableWorkflowID

func (wru *WorkflowRunUpdate) SetNillableWorkflowID(id *uuid.UUID) *WorkflowRunUpdate

SetNillableWorkflowID sets the "workflow" edge to the Workflow entity by ID if the given value is not nil.

func (*WorkflowRunUpdate) SetReason

func (wru *WorkflowRunUpdate) SetReason(s string) *WorkflowRunUpdate

SetReason sets the "reason" field.

func (*WorkflowRunUpdate) SetRunURL

func (wru *WorkflowRunUpdate) SetRunURL(s string) *WorkflowRunUpdate

SetRunURL sets the "run_url" field.

func (*WorkflowRunUpdate) SetRunnerType

func (wru *WorkflowRunUpdate) SetRunnerType(s string) *WorkflowRunUpdate

SetRunnerType sets the "runner_type" field.

func (*WorkflowRunUpdate) SetState

SetState sets the "state" field.

func (*WorkflowRunUpdate) SetWorkflow

func (wru *WorkflowRunUpdate) SetWorkflow(w *Workflow) *WorkflowRunUpdate

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*WorkflowRunUpdate) SetWorkflowID

func (wru *WorkflowRunUpdate) SetWorkflowID(id uuid.UUID) *WorkflowRunUpdate

SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.

func (*WorkflowRunUpdate) Where

Where appends a list predicates to the WorkflowRunUpdate builder.

type WorkflowRunUpdateOne

type WorkflowRunUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowRunUpdateOne is the builder for updating a single WorkflowRun entity.

func (*WorkflowRunUpdateOne) AddCasBackendIDs

func (wruo *WorkflowRunUpdateOne) AddCasBackendIDs(ids ...uuid.UUID) *WorkflowRunUpdateOne

AddCasBackendIDs adds the "cas_backends" edge to the CASBackend entity by IDs.

func (*WorkflowRunUpdateOne) AddCasBackends

func (wruo *WorkflowRunUpdateOne) AddCasBackends(c ...*CASBackend) *WorkflowRunUpdateOne

AddCasBackends adds the "cas_backends" edges to the CASBackend entity.

func (*WorkflowRunUpdateOne) AddContractRevisionLatest

func (wruo *WorkflowRunUpdateOne) AddContractRevisionLatest(i int) *WorkflowRunUpdateOne

AddContractRevisionLatest adds i to the "contract_revision_latest" field.

func (*WorkflowRunUpdateOne) AddContractRevisionUsed

func (wruo *WorkflowRunUpdateOne) AddContractRevisionUsed(i int) *WorkflowRunUpdateOne

AddContractRevisionUsed adds i to the "contract_revision_used" field.

func (*WorkflowRunUpdateOne) ClearAttestation

func (wruo *WorkflowRunUpdateOne) ClearAttestation() *WorkflowRunUpdateOne

ClearAttestation clears the value of the "attestation" field.

func (*WorkflowRunUpdateOne) ClearAttestationDigest

func (wruo *WorkflowRunUpdateOne) ClearAttestationDigest() *WorkflowRunUpdateOne

ClearAttestationDigest clears the value of the "attestation_digest" field.

func (*WorkflowRunUpdateOne) ClearAttestationState

func (wruo *WorkflowRunUpdateOne) ClearAttestationState() *WorkflowRunUpdateOne

ClearAttestationState clears the value of the "attestation_state" field.

func (*WorkflowRunUpdateOne) ClearCasBackends

func (wruo *WorkflowRunUpdateOne) ClearCasBackends() *WorkflowRunUpdateOne

ClearCasBackends clears all "cas_backends" edges to the CASBackend entity.

func (*WorkflowRunUpdateOne) ClearContractVersion

func (wruo *WorkflowRunUpdateOne) ClearContractVersion() *WorkflowRunUpdateOne

ClearContractVersion clears the "contract_version" edge to the WorkflowContractVersion entity.

func (*WorkflowRunUpdateOne) ClearFinishedAt

func (wruo *WorkflowRunUpdateOne) ClearFinishedAt() *WorkflowRunUpdateOne

ClearFinishedAt clears the value of the "finished_at" field.

func (*WorkflowRunUpdateOne) ClearReason

func (wruo *WorkflowRunUpdateOne) ClearReason() *WorkflowRunUpdateOne

ClearReason clears the value of the "reason" field.

func (*WorkflowRunUpdateOne) ClearRunURL

func (wruo *WorkflowRunUpdateOne) ClearRunURL() *WorkflowRunUpdateOne

ClearRunURL clears the value of the "run_url" field.

func (*WorkflowRunUpdateOne) ClearRunnerType

func (wruo *WorkflowRunUpdateOne) ClearRunnerType() *WorkflowRunUpdateOne

ClearRunnerType clears the value of the "runner_type" field.

func (*WorkflowRunUpdateOne) ClearWorkflow

func (wruo *WorkflowRunUpdateOne) ClearWorkflow() *WorkflowRunUpdateOne

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*WorkflowRunUpdateOne) Exec

func (wruo *WorkflowRunUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WorkflowRunUpdateOne) ExecX

func (wruo *WorkflowRunUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowRunUpdateOne) Modify

func (wruo *WorkflowRunUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowRunUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowRunUpdateOne) Mutation

func (wruo *WorkflowRunUpdateOne) Mutation() *WorkflowRunMutation

Mutation returns the WorkflowRunMutation object of the builder.

func (*WorkflowRunUpdateOne) RemoveCasBackendIDs

func (wruo *WorkflowRunUpdateOne) RemoveCasBackendIDs(ids ...uuid.UUID) *WorkflowRunUpdateOne

RemoveCasBackendIDs removes the "cas_backends" edge to CASBackend entities by IDs.

func (*WorkflowRunUpdateOne) RemoveCasBackends

func (wruo *WorkflowRunUpdateOne) RemoveCasBackends(c ...*CASBackend) *WorkflowRunUpdateOne

RemoveCasBackends removes "cas_backends" edges to CASBackend entities.

func (*WorkflowRunUpdateOne) Save

Save executes the query and returns the updated WorkflowRun entity.

func (*WorkflowRunUpdateOne) SaveX

func (wruo *WorkflowRunUpdateOne) SaveX(ctx context.Context) *WorkflowRun

SaveX is like Save, but panics if an error occurs.

func (*WorkflowRunUpdateOne) Select

func (wruo *WorkflowRunUpdateOne) Select(field string, fields ...string) *WorkflowRunUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WorkflowRunUpdateOne) SetAttestation

func (wruo *WorkflowRunUpdateOne) SetAttestation(d *dsse.Envelope) *WorkflowRunUpdateOne

SetAttestation sets the "attestation" field.

func (*WorkflowRunUpdateOne) SetAttestationDigest

func (wruo *WorkflowRunUpdateOne) SetAttestationDigest(s string) *WorkflowRunUpdateOne

SetAttestationDigest sets the "attestation_digest" field.

func (*WorkflowRunUpdateOne) SetAttestationState

func (wruo *WorkflowRunUpdateOne) SetAttestationState(b []byte) *WorkflowRunUpdateOne

SetAttestationState sets the "attestation_state" field.

func (*WorkflowRunUpdateOne) SetContractRevisionLatest

func (wruo *WorkflowRunUpdateOne) SetContractRevisionLatest(i int) *WorkflowRunUpdateOne

SetContractRevisionLatest sets the "contract_revision_latest" field.

func (*WorkflowRunUpdateOne) SetContractRevisionUsed

func (wruo *WorkflowRunUpdateOne) SetContractRevisionUsed(i int) *WorkflowRunUpdateOne

SetContractRevisionUsed sets the "contract_revision_used" field.

func (*WorkflowRunUpdateOne) SetContractVersion

SetContractVersion sets the "contract_version" edge to the WorkflowContractVersion entity.

func (*WorkflowRunUpdateOne) SetContractVersionID

func (wruo *WorkflowRunUpdateOne) SetContractVersionID(id uuid.UUID) *WorkflowRunUpdateOne

SetContractVersionID sets the "contract_version" edge to the WorkflowContractVersion entity by ID.

func (*WorkflowRunUpdateOne) SetFinishedAt

func (wruo *WorkflowRunUpdateOne) SetFinishedAt(t time.Time) *WorkflowRunUpdateOne

SetFinishedAt sets the "finished_at" field.

func (*WorkflowRunUpdateOne) SetNillableAttestationDigest

func (wruo *WorkflowRunUpdateOne) SetNillableAttestationDigest(s *string) *WorkflowRunUpdateOne

SetNillableAttestationDigest sets the "attestation_digest" field if the given value is not nil.

func (*WorkflowRunUpdateOne) SetNillableContractRevisionLatest added in v0.91.6

func (wruo *WorkflowRunUpdateOne) SetNillableContractRevisionLatest(i *int) *WorkflowRunUpdateOne

SetNillableContractRevisionLatest sets the "contract_revision_latest" field if the given value is not nil.

func (*WorkflowRunUpdateOne) SetNillableContractRevisionUsed added in v0.91.6

func (wruo *WorkflowRunUpdateOne) SetNillableContractRevisionUsed(i *int) *WorkflowRunUpdateOne

SetNillableContractRevisionUsed sets the "contract_revision_used" field if the given value is not nil.

func (*WorkflowRunUpdateOne) SetNillableContractVersionID

func (wruo *WorkflowRunUpdateOne) SetNillableContractVersionID(id *uuid.UUID) *WorkflowRunUpdateOne

SetNillableContractVersionID sets the "contract_version" edge to the WorkflowContractVersion entity by ID if the given value is not nil.

func (*WorkflowRunUpdateOne) SetNillableFinishedAt

func (wruo *WorkflowRunUpdateOne) SetNillableFinishedAt(t *time.Time) *WorkflowRunUpdateOne

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*WorkflowRunUpdateOne) SetNillableReason

func (wruo *WorkflowRunUpdateOne) SetNillableReason(s *string) *WorkflowRunUpdateOne

SetNillableReason sets the "reason" field if the given value is not nil.

func (*WorkflowRunUpdateOne) SetNillableRunURL

func (wruo *WorkflowRunUpdateOne) SetNillableRunURL(s *string) *WorkflowRunUpdateOne

SetNillableRunURL sets the "run_url" field if the given value is not nil.

func (*WorkflowRunUpdateOne) SetNillableRunnerType

func (wruo *WorkflowRunUpdateOne) SetNillableRunnerType(s *string) *WorkflowRunUpdateOne

SetNillableRunnerType sets the "runner_type" field if the given value is not nil.

func (*WorkflowRunUpdateOne) SetNillableState

func (wruo *WorkflowRunUpdateOne) SetNillableState(brs *biz.WorkflowRunStatus) *WorkflowRunUpdateOne

SetNillableState sets the "state" field if the given value is not nil.

func (*WorkflowRunUpdateOne) SetNillableWorkflowID

func (wruo *WorkflowRunUpdateOne) SetNillableWorkflowID(id *uuid.UUID) *WorkflowRunUpdateOne

SetNillableWorkflowID sets the "workflow" edge to the Workflow entity by ID if the given value is not nil.

func (*WorkflowRunUpdateOne) SetReason

func (wruo *WorkflowRunUpdateOne) SetReason(s string) *WorkflowRunUpdateOne

SetReason sets the "reason" field.

func (*WorkflowRunUpdateOne) SetRunURL

func (wruo *WorkflowRunUpdateOne) SetRunURL(s string) *WorkflowRunUpdateOne

SetRunURL sets the "run_url" field.

func (*WorkflowRunUpdateOne) SetRunnerType

func (wruo *WorkflowRunUpdateOne) SetRunnerType(s string) *WorkflowRunUpdateOne

SetRunnerType sets the "runner_type" field.

func (*WorkflowRunUpdateOne) SetState

SetState sets the "state" field.

func (*WorkflowRunUpdateOne) SetWorkflow

func (wruo *WorkflowRunUpdateOne) SetWorkflow(w *Workflow) *WorkflowRunUpdateOne

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*WorkflowRunUpdateOne) SetWorkflowID

func (wruo *WorkflowRunUpdateOne) SetWorkflowID(id uuid.UUID) *WorkflowRunUpdateOne

SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.

func (*WorkflowRunUpdateOne) Where

Where appends a list predicates to the WorkflowRunUpdate builder.

type WorkflowRuns

type WorkflowRuns []*WorkflowRun

WorkflowRuns is a parsable slice of WorkflowRun.

type WorkflowSelect

type WorkflowSelect struct {
	*WorkflowQuery
	// contains filtered or unexported fields
}

WorkflowSelect is the builder for selecting fields of Workflow entities.

func (*WorkflowSelect) Aggregate

func (ws *WorkflowSelect) Aggregate(fns ...AggregateFunc) *WorkflowSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowSelect) Bool

func (s *WorkflowSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowSelect) BoolX

func (s *WorkflowSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowSelect) Bools

func (s *WorkflowSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowSelect) BoolsX

func (s *WorkflowSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowSelect) Float64

func (s *WorkflowSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowSelect) Float64X

func (s *WorkflowSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowSelect) Float64s

func (s *WorkflowSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowSelect) Float64sX

func (s *WorkflowSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowSelect) Int

func (s *WorkflowSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowSelect) IntX

func (s *WorkflowSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowSelect) Ints

func (s *WorkflowSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowSelect) IntsX

func (s *WorkflowSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowSelect) Modify

func (ws *WorkflowSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowSelect) Scan

func (ws *WorkflowSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowSelect) ScanX

func (s *WorkflowSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowSelect) String

func (s *WorkflowSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowSelect) StringX

func (s *WorkflowSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowSelect) Strings

func (s *WorkflowSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowSelect) StringsX

func (s *WorkflowSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowUpdate

type WorkflowUpdate struct {
	// contains filtered or unexported fields
}

WorkflowUpdate is the builder for updating Workflow entities.

func (*WorkflowUpdate) AddIntegrationAttachmentIDs

func (wu *WorkflowUpdate) AddIntegrationAttachmentIDs(ids ...uuid.UUID) *WorkflowUpdate

AddIntegrationAttachmentIDs adds the "integration_attachments" edge to the IntegrationAttachment entity by IDs.

func (*WorkflowUpdate) AddIntegrationAttachments

func (wu *WorkflowUpdate) AddIntegrationAttachments(i ...*IntegrationAttachment) *WorkflowUpdate

AddIntegrationAttachments adds the "integration_attachments" edges to the IntegrationAttachment entity.

func (*WorkflowUpdate) AddReferrerIDs

func (wu *WorkflowUpdate) AddReferrerIDs(ids ...uuid.UUID) *WorkflowUpdate

AddReferrerIDs adds the "referrers" edge to the Referrer entity by IDs.

func (*WorkflowUpdate) AddReferrers

func (wu *WorkflowUpdate) AddReferrers(r ...*Referrer) *WorkflowUpdate

AddReferrers adds the "referrers" edges to the Referrer entity.

func (*WorkflowUpdate) AddRobotaccountIDs

func (wu *WorkflowUpdate) AddRobotaccountIDs(ids ...uuid.UUID) *WorkflowUpdate

AddRobotaccountIDs adds the "robotaccounts" edge to the RobotAccount entity by IDs.

func (*WorkflowUpdate) AddRobotaccounts

func (wu *WorkflowUpdate) AddRobotaccounts(r ...*RobotAccount) *WorkflowUpdate

AddRobotaccounts adds the "robotaccounts" edges to the RobotAccount entity.

func (*WorkflowUpdate) AddRunsCount

func (wu *WorkflowUpdate) AddRunsCount(i int) *WorkflowUpdate

AddRunsCount adds i to the "runs_count" field.

func (*WorkflowUpdate) AddWorkflowrunIDs

func (wu *WorkflowUpdate) AddWorkflowrunIDs(ids ...uuid.UUID) *WorkflowUpdate

AddWorkflowrunIDs adds the "workflowruns" edge to the WorkflowRun entity by IDs.

func (*WorkflowUpdate) AddWorkflowruns

func (wu *WorkflowUpdate) AddWorkflowruns(w ...*WorkflowRun) *WorkflowUpdate

AddWorkflowruns adds the "workflowruns" edges to the WorkflowRun entity.

func (*WorkflowUpdate) ClearContract

func (wu *WorkflowUpdate) ClearContract() *WorkflowUpdate

ClearContract clears the "contract" edge to the WorkflowContract entity.

func (*WorkflowUpdate) ClearDeletedAt

func (wu *WorkflowUpdate) ClearDeletedAt() *WorkflowUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*WorkflowUpdate) ClearDescription

func (wu *WorkflowUpdate) ClearDescription() *WorkflowUpdate

ClearDescription clears the value of the "description" field.

func (*WorkflowUpdate) ClearIntegrationAttachments

func (wu *WorkflowUpdate) ClearIntegrationAttachments() *WorkflowUpdate

ClearIntegrationAttachments clears all "integration_attachments" edges to the IntegrationAttachment entity.

func (*WorkflowUpdate) ClearOrganization

func (wu *WorkflowUpdate) ClearOrganization() *WorkflowUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*WorkflowUpdate) ClearProject

func (wu *WorkflowUpdate) ClearProject() *WorkflowUpdate

ClearProject clears the value of the "project" field.

func (*WorkflowUpdate) ClearReferrers

func (wu *WorkflowUpdate) ClearReferrers() *WorkflowUpdate

ClearReferrers clears all "referrers" edges to the Referrer entity.

func (*WorkflowUpdate) ClearRobotaccounts

func (wu *WorkflowUpdate) ClearRobotaccounts() *WorkflowUpdate

ClearRobotaccounts clears all "robotaccounts" edges to the RobotAccount entity.

func (*WorkflowUpdate) ClearTeam

func (wu *WorkflowUpdate) ClearTeam() *WorkflowUpdate

ClearTeam clears the value of the "team" field.

func (*WorkflowUpdate) ClearWorkflowruns

func (wu *WorkflowUpdate) ClearWorkflowruns() *WorkflowUpdate

ClearWorkflowruns clears all "workflowruns" edges to the WorkflowRun entity.

func (*WorkflowUpdate) Exec

func (wu *WorkflowUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowUpdate) ExecX

func (wu *WorkflowUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowUpdate) Modify

func (wu *WorkflowUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowUpdate) Mutation

func (wu *WorkflowUpdate) Mutation() *WorkflowMutation

Mutation returns the WorkflowMutation object of the builder.

func (*WorkflowUpdate) RemoveIntegrationAttachmentIDs

func (wu *WorkflowUpdate) RemoveIntegrationAttachmentIDs(ids ...uuid.UUID) *WorkflowUpdate

RemoveIntegrationAttachmentIDs removes the "integration_attachments" edge to IntegrationAttachment entities by IDs.

func (*WorkflowUpdate) RemoveIntegrationAttachments

func (wu *WorkflowUpdate) RemoveIntegrationAttachments(i ...*IntegrationAttachment) *WorkflowUpdate

RemoveIntegrationAttachments removes "integration_attachments" edges to IntegrationAttachment entities.

func (*WorkflowUpdate) RemoveReferrerIDs

func (wu *WorkflowUpdate) RemoveReferrerIDs(ids ...uuid.UUID) *WorkflowUpdate

RemoveReferrerIDs removes the "referrers" edge to Referrer entities by IDs.

func (*WorkflowUpdate) RemoveReferrers

func (wu *WorkflowUpdate) RemoveReferrers(r ...*Referrer) *WorkflowUpdate

RemoveReferrers removes "referrers" edges to Referrer entities.

func (*WorkflowUpdate) RemoveRobotaccountIDs

func (wu *WorkflowUpdate) RemoveRobotaccountIDs(ids ...uuid.UUID) *WorkflowUpdate

RemoveRobotaccountIDs removes the "robotaccounts" edge to RobotAccount entities by IDs.

func (*WorkflowUpdate) RemoveRobotaccounts

func (wu *WorkflowUpdate) RemoveRobotaccounts(r ...*RobotAccount) *WorkflowUpdate

RemoveRobotaccounts removes "robotaccounts" edges to RobotAccount entities.

func (*WorkflowUpdate) RemoveWorkflowrunIDs

func (wu *WorkflowUpdate) RemoveWorkflowrunIDs(ids ...uuid.UUID) *WorkflowUpdate

RemoveWorkflowrunIDs removes the "workflowruns" edge to WorkflowRun entities by IDs.

func (*WorkflowUpdate) RemoveWorkflowruns

func (wu *WorkflowUpdate) RemoveWorkflowruns(w ...*WorkflowRun) *WorkflowUpdate

RemoveWorkflowruns removes "workflowruns" edges to WorkflowRun entities.

func (*WorkflowUpdate) Save

func (wu *WorkflowUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorkflowUpdate) SaveX

func (wu *WorkflowUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WorkflowUpdate) SetContract

func (wu *WorkflowUpdate) SetContract(w *WorkflowContract) *WorkflowUpdate

SetContract sets the "contract" edge to the WorkflowContract entity.

func (*WorkflowUpdate) SetContractID

func (wu *WorkflowUpdate) SetContractID(id uuid.UUID) *WorkflowUpdate

SetContractID sets the "contract" edge to the WorkflowContract entity by ID.

func (*WorkflowUpdate) SetDeletedAt

func (wu *WorkflowUpdate) SetDeletedAt(t time.Time) *WorkflowUpdate

SetDeletedAt sets the "deleted_at" field.

func (*WorkflowUpdate) SetDescription

func (wu *WorkflowUpdate) SetDescription(s string) *WorkflowUpdate

SetDescription sets the "description" field.

func (*WorkflowUpdate) SetNillableDeletedAt

func (wu *WorkflowUpdate) SetNillableDeletedAt(t *time.Time) *WorkflowUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*WorkflowUpdate) SetNillableDescription

func (wu *WorkflowUpdate) SetNillableDescription(s *string) *WorkflowUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowUpdate) SetNillableOrganizationID added in v0.91.6

func (wu *WorkflowUpdate) SetNillableOrganizationID(u *uuid.UUID) *WorkflowUpdate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*WorkflowUpdate) SetNillableProject

func (wu *WorkflowUpdate) SetNillableProject(s *string) *WorkflowUpdate

SetNillableProject sets the "project" field if the given value is not nil.

func (*WorkflowUpdate) SetNillablePublic

func (wu *WorkflowUpdate) SetNillablePublic(b *bool) *WorkflowUpdate

SetNillablePublic sets the "public" field if the given value is not nil.

func (*WorkflowUpdate) SetNillableRunsCount

func (wu *WorkflowUpdate) SetNillableRunsCount(i *int) *WorkflowUpdate

SetNillableRunsCount sets the "runs_count" field if the given value is not nil.

func (*WorkflowUpdate) SetNillableTeam

func (wu *WorkflowUpdate) SetNillableTeam(s *string) *WorkflowUpdate

SetNillableTeam sets the "team" field if the given value is not nil.

func (*WorkflowUpdate) SetOrganization

func (wu *WorkflowUpdate) SetOrganization(o *Organization) *WorkflowUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*WorkflowUpdate) SetOrganizationID

func (wu *WorkflowUpdate) SetOrganizationID(u uuid.UUID) *WorkflowUpdate

SetOrganizationID sets the "organization_id" field.

func (*WorkflowUpdate) SetProject

func (wu *WorkflowUpdate) SetProject(s string) *WorkflowUpdate

SetProject sets the "project" field.

func (*WorkflowUpdate) SetPublic

func (wu *WorkflowUpdate) SetPublic(b bool) *WorkflowUpdate

SetPublic sets the "public" field.

func (*WorkflowUpdate) SetRunsCount

func (wu *WorkflowUpdate) SetRunsCount(i int) *WorkflowUpdate

SetRunsCount sets the "runs_count" field.

func (*WorkflowUpdate) SetTeam

func (wu *WorkflowUpdate) SetTeam(s string) *WorkflowUpdate

SetTeam sets the "team" field.

func (*WorkflowUpdate) Where

func (wu *WorkflowUpdate) Where(ps ...predicate.Workflow) *WorkflowUpdate

Where appends a list predicates to the WorkflowUpdate builder.

type WorkflowUpdateOne

type WorkflowUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowUpdateOne is the builder for updating a single Workflow entity.

func (*WorkflowUpdateOne) AddIntegrationAttachmentIDs

func (wuo *WorkflowUpdateOne) AddIntegrationAttachmentIDs(ids ...uuid.UUID) *WorkflowUpdateOne

AddIntegrationAttachmentIDs adds the "integration_attachments" edge to the IntegrationAttachment entity by IDs.

func (*WorkflowUpdateOne) AddIntegrationAttachments

func (wuo *WorkflowUpdateOne) AddIntegrationAttachments(i ...*IntegrationAttachment) *WorkflowUpdateOne

AddIntegrationAttachments adds the "integration_attachments" edges to the IntegrationAttachment entity.

func (*WorkflowUpdateOne) AddReferrerIDs

func (wuo *WorkflowUpdateOne) AddReferrerIDs(ids ...uuid.UUID) *WorkflowUpdateOne

AddReferrerIDs adds the "referrers" edge to the Referrer entity by IDs.

func (*WorkflowUpdateOne) AddReferrers

func (wuo *WorkflowUpdateOne) AddReferrers(r ...*Referrer) *WorkflowUpdateOne

AddReferrers adds the "referrers" edges to the Referrer entity.

func (*WorkflowUpdateOne) AddRobotaccountIDs

func (wuo *WorkflowUpdateOne) AddRobotaccountIDs(ids ...uuid.UUID) *WorkflowUpdateOne

AddRobotaccountIDs adds the "robotaccounts" edge to the RobotAccount entity by IDs.

func (*WorkflowUpdateOne) AddRobotaccounts

func (wuo *WorkflowUpdateOne) AddRobotaccounts(r ...*RobotAccount) *WorkflowUpdateOne

AddRobotaccounts adds the "robotaccounts" edges to the RobotAccount entity.

func (*WorkflowUpdateOne) AddRunsCount

func (wuo *WorkflowUpdateOne) AddRunsCount(i int) *WorkflowUpdateOne

AddRunsCount adds i to the "runs_count" field.

func (*WorkflowUpdateOne) AddWorkflowrunIDs

func (wuo *WorkflowUpdateOne) AddWorkflowrunIDs(ids ...uuid.UUID) *WorkflowUpdateOne

AddWorkflowrunIDs adds the "workflowruns" edge to the WorkflowRun entity by IDs.

func (*WorkflowUpdateOne) AddWorkflowruns

func (wuo *WorkflowUpdateOne) AddWorkflowruns(w ...*WorkflowRun) *WorkflowUpdateOne

AddWorkflowruns adds the "workflowruns" edges to the WorkflowRun entity.

func (*WorkflowUpdateOne) ClearContract

func (wuo *WorkflowUpdateOne) ClearContract() *WorkflowUpdateOne

ClearContract clears the "contract" edge to the WorkflowContract entity.

func (*WorkflowUpdateOne) ClearDeletedAt

func (wuo *WorkflowUpdateOne) ClearDeletedAt() *WorkflowUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*WorkflowUpdateOne) ClearDescription

func (wuo *WorkflowUpdateOne) ClearDescription() *WorkflowUpdateOne

ClearDescription clears the value of the "description" field.

func (*WorkflowUpdateOne) ClearIntegrationAttachments

func (wuo *WorkflowUpdateOne) ClearIntegrationAttachments() *WorkflowUpdateOne

ClearIntegrationAttachments clears all "integration_attachments" edges to the IntegrationAttachment entity.

func (*WorkflowUpdateOne) ClearOrganization

func (wuo *WorkflowUpdateOne) ClearOrganization() *WorkflowUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*WorkflowUpdateOne) ClearProject

func (wuo *WorkflowUpdateOne) ClearProject() *WorkflowUpdateOne

ClearProject clears the value of the "project" field.

func (*WorkflowUpdateOne) ClearReferrers

func (wuo *WorkflowUpdateOne) ClearReferrers() *WorkflowUpdateOne

ClearReferrers clears all "referrers" edges to the Referrer entity.

func (*WorkflowUpdateOne) ClearRobotaccounts

func (wuo *WorkflowUpdateOne) ClearRobotaccounts() *WorkflowUpdateOne

ClearRobotaccounts clears all "robotaccounts" edges to the RobotAccount entity.

func (*WorkflowUpdateOne) ClearTeam

func (wuo *WorkflowUpdateOne) ClearTeam() *WorkflowUpdateOne

ClearTeam clears the value of the "team" field.

func (*WorkflowUpdateOne) ClearWorkflowruns

func (wuo *WorkflowUpdateOne) ClearWorkflowruns() *WorkflowUpdateOne

ClearWorkflowruns clears all "workflowruns" edges to the WorkflowRun entity.

func (*WorkflowUpdateOne) Exec

func (wuo *WorkflowUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WorkflowUpdateOne) ExecX

func (wuo *WorkflowUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowUpdateOne) Modify

func (wuo *WorkflowUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowUpdateOne) Mutation

func (wuo *WorkflowUpdateOne) Mutation() *WorkflowMutation

Mutation returns the WorkflowMutation object of the builder.

func (*WorkflowUpdateOne) RemoveIntegrationAttachmentIDs

func (wuo *WorkflowUpdateOne) RemoveIntegrationAttachmentIDs(ids ...uuid.UUID) *WorkflowUpdateOne

RemoveIntegrationAttachmentIDs removes the "integration_attachments" edge to IntegrationAttachment entities by IDs.

func (*WorkflowUpdateOne) RemoveIntegrationAttachments

func (wuo *WorkflowUpdateOne) RemoveIntegrationAttachments(i ...*IntegrationAttachment) *WorkflowUpdateOne

RemoveIntegrationAttachments removes "integration_attachments" edges to IntegrationAttachment entities.

func (*WorkflowUpdateOne) RemoveReferrerIDs

func (wuo *WorkflowUpdateOne) RemoveReferrerIDs(ids ...uuid.UUID) *WorkflowUpdateOne

RemoveReferrerIDs removes the "referrers" edge to Referrer entities by IDs.

func (*WorkflowUpdateOne) RemoveReferrers

func (wuo *WorkflowUpdateOne) RemoveReferrers(r ...*Referrer) *WorkflowUpdateOne

RemoveReferrers removes "referrers" edges to Referrer entities.

func (*WorkflowUpdateOne) RemoveRobotaccountIDs

func (wuo *WorkflowUpdateOne) RemoveRobotaccountIDs(ids ...uuid.UUID) *WorkflowUpdateOne

RemoveRobotaccountIDs removes the "robotaccounts" edge to RobotAccount entities by IDs.

func (*WorkflowUpdateOne) RemoveRobotaccounts

func (wuo *WorkflowUpdateOne) RemoveRobotaccounts(r ...*RobotAccount) *WorkflowUpdateOne

RemoveRobotaccounts removes "robotaccounts" edges to RobotAccount entities.

func (*WorkflowUpdateOne) RemoveWorkflowrunIDs

func (wuo *WorkflowUpdateOne) RemoveWorkflowrunIDs(ids ...uuid.UUID) *WorkflowUpdateOne

RemoveWorkflowrunIDs removes the "workflowruns" edge to WorkflowRun entities by IDs.

func (*WorkflowUpdateOne) RemoveWorkflowruns

func (wuo *WorkflowUpdateOne) RemoveWorkflowruns(w ...*WorkflowRun) *WorkflowUpdateOne

RemoveWorkflowruns removes "workflowruns" edges to WorkflowRun entities.

func (*WorkflowUpdateOne) Save

func (wuo *WorkflowUpdateOne) Save(ctx context.Context) (*Workflow, error)

Save executes the query and returns the updated Workflow entity.

func (*WorkflowUpdateOne) SaveX

func (wuo *WorkflowUpdateOne) SaveX(ctx context.Context) *Workflow

SaveX is like Save, but panics if an error occurs.

func (*WorkflowUpdateOne) Select

func (wuo *WorkflowUpdateOne) Select(field string, fields ...string) *WorkflowUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WorkflowUpdateOne) SetContract

SetContract sets the "contract" edge to the WorkflowContract entity.

func (*WorkflowUpdateOne) SetContractID

func (wuo *WorkflowUpdateOne) SetContractID(id uuid.UUID) *WorkflowUpdateOne

SetContractID sets the "contract" edge to the WorkflowContract entity by ID.

func (*WorkflowUpdateOne) SetDeletedAt

func (wuo *WorkflowUpdateOne) SetDeletedAt(t time.Time) *WorkflowUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*WorkflowUpdateOne) SetDescription

func (wuo *WorkflowUpdateOne) SetDescription(s string) *WorkflowUpdateOne

SetDescription sets the "description" field.

func (*WorkflowUpdateOne) SetNillableDeletedAt

func (wuo *WorkflowUpdateOne) SetNillableDeletedAt(t *time.Time) *WorkflowUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*WorkflowUpdateOne) SetNillableDescription

func (wuo *WorkflowUpdateOne) SetNillableDescription(s *string) *WorkflowUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowUpdateOne) SetNillableOrganizationID added in v0.91.6

func (wuo *WorkflowUpdateOne) SetNillableOrganizationID(u *uuid.UUID) *WorkflowUpdateOne

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*WorkflowUpdateOne) SetNillableProject

func (wuo *WorkflowUpdateOne) SetNillableProject(s *string) *WorkflowUpdateOne

SetNillableProject sets the "project" field if the given value is not nil.

func (*WorkflowUpdateOne) SetNillablePublic

func (wuo *WorkflowUpdateOne) SetNillablePublic(b *bool) *WorkflowUpdateOne

SetNillablePublic sets the "public" field if the given value is not nil.

func (*WorkflowUpdateOne) SetNillableRunsCount

func (wuo *WorkflowUpdateOne) SetNillableRunsCount(i *int) *WorkflowUpdateOne

SetNillableRunsCount sets the "runs_count" field if the given value is not nil.

func (*WorkflowUpdateOne) SetNillableTeam

func (wuo *WorkflowUpdateOne) SetNillableTeam(s *string) *WorkflowUpdateOne

SetNillableTeam sets the "team" field if the given value is not nil.

func (*WorkflowUpdateOne) SetOrganization

func (wuo *WorkflowUpdateOne) SetOrganization(o *Organization) *WorkflowUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*WorkflowUpdateOne) SetOrganizationID

func (wuo *WorkflowUpdateOne) SetOrganizationID(u uuid.UUID) *WorkflowUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*WorkflowUpdateOne) SetProject

func (wuo *WorkflowUpdateOne) SetProject(s string) *WorkflowUpdateOne

SetProject sets the "project" field.

func (*WorkflowUpdateOne) SetPublic

func (wuo *WorkflowUpdateOne) SetPublic(b bool) *WorkflowUpdateOne

SetPublic sets the "public" field.

func (*WorkflowUpdateOne) SetRunsCount

func (wuo *WorkflowUpdateOne) SetRunsCount(i int) *WorkflowUpdateOne

SetRunsCount sets the "runs_count" field.

func (*WorkflowUpdateOne) SetTeam

func (wuo *WorkflowUpdateOne) SetTeam(s string) *WorkflowUpdateOne

SetTeam sets the "team" field.

func (*WorkflowUpdateOne) Where

Where appends a list predicates to the WorkflowUpdate builder.

type Workflows

type Workflows []*Workflow

Workflows is a parsable slice of Workflow.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL