model

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 59 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.
	TypeCatalog                          = "Catalog"
	TypeConnector                        = "Connector"
	TypeCostReport                       = "CostReport"
	TypeDistributeLock                   = "DistributeLock"
	TypeEnvironment                      = "Environment"
	TypeEnvironmentConnectorRelationship = "EnvironmentConnectorRelationship"
	TypePerspective                      = "Perspective"
	TypeProject                          = "Project"
	TypeResource                         = "Resource"
	TypeResourceComponent                = "ResourceComponent"
	TypeResourceComponentRelationship    = "ResourceComponentRelationship"
	TypeResourceDefinition               = "ResourceDefinition"
	TypeResourceDefinitionMatchingRule   = "ResourceDefinitionMatchingRule"
	TypeResourceRelationship             = "ResourceRelationship"
	TypeResourceRun                      = "ResourceRun"
	TypeResourceState                    = "ResourceState"
	TypeRole                             = "Role"
	TypeSetting                          = "Setting"
	TypeSubject                          = "Subject"
	TypeSubjectRoleRelationship          = "SubjectRoleRelationship"
	TypeTemplate                         = "Template"
	TypeTemplateVersion                  = "TemplateVersion"
	TypeToken                            = "Token"
	TypeVariable                         = "Variable"
	TypeWorkflow                         = "Workflow"
	TypeWorkflowExecution                = "WorkflowExecution"
	TypeWorkflowStage                    = "WorkflowStage"
	TypeWorkflowStageExecution           = "WorkflowStageExecution"
	TypeWorkflowStep                     = "WorkflowStep"
	TypeWorkflowStepExecution            = "WorkflowStepExecution"
)

Variables

View Source
var ErrBlankResourceRefer = errors.New("blank resource refer")
View Source
var ErrTxStarted = errors.New("model: 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 IsBlankResourceReferError

func IsBlankResourceReferError(err error) bool

IsBlankResourceReferError reports whether the error is ErrBlankResourceRefer.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(model.As(model.Sum(field1), "sum_field1"), (model.As(model.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 Catalog

type Catalog struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `json:"status,omitempty"`
	// Type of the catalog.
	Type string `json:"type,omitempty,cli-table-column"`
	// Source of the catalog.
	Source string `json:"source,omitempty"`
	// Sync information of the catalog.
	Sync *types.CatalogSync `json:"sync,omitempty"`
	// ID of the project to belong, empty means for all projects.
	ProjectID object.ID `json:"project_id,omitempty"`
	// Catalog regexp pattern to filter the repositories by names.
	FilterPattern string `json:"filter_pattern,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CatalogQuery when eager-loading is set.
	Edges CatalogEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

Catalog is the model entity for the Catalog schema.

func (*Catalog) ExecContext

func (c *Catalog) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Catalog) QueryContext

func (c *Catalog) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Catalog) QueryProject added in v0.4.0

func (c *Catalog) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Catalog entity.

func (*Catalog) QueryTemplates

func (c *Catalog) QueryTemplates() *TemplateQuery

QueryTemplates queries the "templates" edge of the Catalog entity.

func (*Catalog) String

func (c *Catalog) String() string

String implements the fmt.Stringer.

func (*Catalog) Unwrap

func (c *Catalog) Unwrap() *Catalog

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

func (c *Catalog) Update() *CatalogUpdateOne

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

func (*Catalog) Value

func (c *Catalog) Value(name string) (ent.Value, error)

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

func (*Catalog) View

func (_c *Catalog) View() *CatalogOutput

View returns the output of Catalog entity.

type CatalogClient

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

CatalogClient is a client for the Catalog schema.

func NewCatalogClient

func NewCatalogClient(c config) *CatalogClient

NewCatalogClient returns a client for the Catalog from the given config.

func (*CatalogClient) Create

func (c *CatalogClient) Create() *CatalogCreate

Create returns a builder for creating a Catalog entity.

func (*CatalogClient) CreateBulk

func (c *CatalogClient) CreateBulk(builders ...*CatalogCreate) *CatalogCreateBulk

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

func (*CatalogClient) Delete

func (c *CatalogClient) Delete() *CatalogDelete

Delete returns a delete builder for Catalog.

func (*CatalogClient) DeleteOne

func (c *CatalogClient) DeleteOne(ca *Catalog) *CatalogDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CatalogClient) DeleteOneID

func (c *CatalogClient) DeleteOneID(id object.ID) *CatalogDeleteOne

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

func (*CatalogClient) ExecContext

func (c *CatalogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CatalogClient) Get

func (c *CatalogClient) Get(ctx context.Context, id object.ID) (*Catalog, error)

Get returns a Catalog entity by its id.

func (*CatalogClient) GetX

func (c *CatalogClient) GetX(ctx context.Context, id object.ID) *Catalog

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

func (*CatalogClient) Hooks

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

Hooks returns the client hooks.

func (*CatalogClient) Intercept

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

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

func (*CatalogClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CatalogClient) MapCreateBulk added in v0.5.0

func (c *CatalogClient) MapCreateBulk(slice any, setFunc func(*CatalogCreate, int)) *CatalogCreateBulk

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

func (c *CatalogClient) Query() *CatalogQuery

Query returns a query builder for Catalog.

func (*CatalogClient) QueryContext

func (c *CatalogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CatalogClient) QueryProject added in v0.4.0

func (c *CatalogClient) QueryProject(ca *Catalog) *ProjectQuery

QueryProject queries the project edge of a Catalog.

func (*CatalogClient) QueryTemplates

func (c *CatalogClient) QueryTemplates(ca *Catalog) *TemplateQuery

QueryTemplates queries the templates edge of a Catalog.

func (*CatalogClient) Update

func (c *CatalogClient) Update() *CatalogUpdate

Update returns an update builder for Catalog.

func (*CatalogClient) UpdateOne

func (c *CatalogClient) UpdateOne(ca *Catalog) *CatalogUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CatalogClient) UpdateOneID

func (c *CatalogClient) UpdateOneID(id object.ID) *CatalogUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CatalogClient) Use

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

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

type CatalogClientGetter

type CatalogClientGetter interface {
	// Catalogs returns the client for interacting with the Catalog builders.
	Catalogs() *CatalogClient
}

CatalogClientGetter is an interface that allows getting CatalogClient.

type CatalogCreate

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

CatalogCreate is the builder for creating a Catalog entity.

func (*CatalogCreate) AddTemplateIDs

func (cc *CatalogCreate) AddTemplateIDs(ids ...object.ID) *CatalogCreate

AddTemplateIDs adds the "templates" edge to the Template entity by IDs.

func (*CatalogCreate) AddTemplates

func (cc *CatalogCreate) AddTemplates(t ...*Template) *CatalogCreate

AddTemplates adds the "templates" edges to the Template entity.

func (*CatalogCreate) Exec

func (cc *CatalogCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CatalogCreate) ExecContext

func (c *CatalogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CatalogCreate) ExecE

func (cc *CatalogCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Catalog) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*CatalogCreate) ExecEX

func (cc *CatalogCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Catalog) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*CatalogCreate) ExecX

func (cc *CatalogCreate) ExecX(ctx context.Context)

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

func (*CatalogCreate) Mutation

func (cc *CatalogCreate) Mutation() *CatalogMutation

Mutation returns the CatalogMutation object of the builder.

func (*CatalogCreate) OnConflict

func (cc *CatalogCreate) OnConflict(opts ...sql.ConflictOption) *CatalogUpsertOne

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

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

func (*CatalogCreate) OnConflictColumns

func (cc *CatalogCreate) OnConflictColumns(columns ...string) *CatalogUpsertOne

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

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

func (*CatalogCreate) QueryContext

func (c *CatalogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CatalogCreate) Save

func (cc *CatalogCreate) Save(ctx context.Context) (*Catalog, error)

Save creates the Catalog in the database.

func (*CatalogCreate) SaveE

func (cc *CatalogCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Catalog) error) (*Catalog, error)

SaveE calls the given function after created the Catalog entity, which is always good for cascading create operations.

func (*CatalogCreate) SaveEX

func (cc *CatalogCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Catalog) error) *Catalog

SaveEX is like SaveE, but panics if an error occurs.

func (*CatalogCreate) SaveX

func (cc *CatalogCreate) SaveX(ctx context.Context) *Catalog

SaveX calls Save and panics if Save returns an error.

func (*CatalogCreate) Set

func (cc *CatalogCreate) Set(obj *Catalog) *CatalogCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*CatalogCreate) SetAnnotations

func (cc *CatalogCreate) SetAnnotations(m map[string]string) *CatalogCreate

SetAnnotations sets the "annotations" field.

func (*CatalogCreate) SetCreateTime

func (cc *CatalogCreate) SetCreateTime(t time.Time) *CatalogCreate

SetCreateTime sets the "create_time" field.

func (*CatalogCreate) SetDescription

func (cc *CatalogCreate) SetDescription(s string) *CatalogCreate

SetDescription sets the "description" field.

func (*CatalogCreate) SetFilterPattern added in v0.6.0

func (cc *CatalogCreate) SetFilterPattern(s string) *CatalogCreate

SetFilterPattern sets the "filter_pattern" field.

func (*CatalogCreate) SetID

func (cc *CatalogCreate) SetID(o object.ID) *CatalogCreate

SetID sets the "id" field.

func (*CatalogCreate) SetLabels

func (cc *CatalogCreate) SetLabels(m map[string]string) *CatalogCreate

SetLabels sets the "labels" field.

func (*CatalogCreate) SetName

func (cc *CatalogCreate) SetName(s string) *CatalogCreate

SetName sets the "name" field.

func (*CatalogCreate) SetNillableCreateTime

func (cc *CatalogCreate) SetNillableCreateTime(t *time.Time) *CatalogCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*CatalogCreate) SetNillableDescription

func (cc *CatalogCreate) SetNillableDescription(s *string) *CatalogCreate

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

func (*CatalogCreate) SetNillableFilterPattern added in v0.6.0

func (cc *CatalogCreate) SetNillableFilterPattern(s *string) *CatalogCreate

SetNillableFilterPattern sets the "filter_pattern" field if the given value is not nil.

func (*CatalogCreate) SetNillableProjectID added in v0.4.0

func (cc *CatalogCreate) SetNillableProjectID(o *object.ID) *CatalogCreate

SetNillableProjectID sets the "project_id" field if the given value is not nil.

func (*CatalogCreate) SetNillableStatus

func (cc *CatalogCreate) SetNillableStatus(s *status.Status) *CatalogCreate

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

func (*CatalogCreate) SetNillableUpdateTime

func (cc *CatalogCreate) SetNillableUpdateTime(t *time.Time) *CatalogCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*CatalogCreate) SetProject added in v0.4.0

func (cc *CatalogCreate) SetProject(p *Project) *CatalogCreate

SetProject sets the "project" edge to the Project entity.

func (*CatalogCreate) SetProjectID added in v0.4.0

func (cc *CatalogCreate) SetProjectID(o object.ID) *CatalogCreate

SetProjectID sets the "project_id" field.

func (*CatalogCreate) SetSource

func (cc *CatalogCreate) SetSource(s string) *CatalogCreate

SetSource sets the "source" field.

func (*CatalogCreate) SetStatus

func (cc *CatalogCreate) SetStatus(s status.Status) *CatalogCreate

SetStatus sets the "status" field.

func (*CatalogCreate) SetSync

func (cc *CatalogCreate) SetSync(ts *types.CatalogSync) *CatalogCreate

SetSync sets the "sync" field.

func (*CatalogCreate) SetType

func (cc *CatalogCreate) SetType(s string) *CatalogCreate

SetType sets the "type" field.

func (*CatalogCreate) SetUpdateTime

func (cc *CatalogCreate) SetUpdateTime(t time.Time) *CatalogCreate

SetUpdateTime sets the "update_time" field.

type CatalogCreateBulk

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

CatalogCreateBulk is the builder for creating many Catalog entities in bulk.

func (*CatalogCreateBulk) Exec

func (ccb *CatalogCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CatalogCreateBulk) ExecContext

func (c *CatalogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CatalogCreateBulk) ExecE

func (ccb *CatalogCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Catalog) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*CatalogCreateBulk) ExecEX

func (ccb *CatalogCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Catalog) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*CatalogCreateBulk) ExecX

func (ccb *CatalogCreateBulk) ExecX(ctx context.Context)

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

func (*CatalogCreateBulk) OnConflict

func (ccb *CatalogCreateBulk) OnConflict(opts ...sql.ConflictOption) *CatalogUpsertBulk

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

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

func (*CatalogCreateBulk) OnConflictColumns

func (ccb *CatalogCreateBulk) OnConflictColumns(columns ...string) *CatalogUpsertBulk

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

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

func (*CatalogCreateBulk) QueryContext

func (c *CatalogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CatalogCreateBulk) Save

func (ccb *CatalogCreateBulk) Save(ctx context.Context) ([]*Catalog, error)

Save creates the Catalog entities in the database.

func (*CatalogCreateBulk) SaveE

func (ccb *CatalogCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Catalog) error) ([]*Catalog, error)

SaveE calls the given function after created the Catalog entities, which is always good for cascading create operations.

func (*CatalogCreateBulk) SaveEX

func (ccb *CatalogCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Catalog) error) []*Catalog

SaveEX is like SaveE, but panics if an error occurs.

func (*CatalogCreateBulk) SaveX

func (ccb *CatalogCreateBulk) SaveX(ctx context.Context) []*Catalog

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

func (*CatalogCreateBulk) Set

func (ccb *CatalogCreateBulk) Set(objs ...*Catalog) *CatalogCreateBulk

Set leverages the CatalogCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type CatalogCreateInput

type CatalogCreateInput struct {

	// Project indicates to create Catalog entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Source of the catalog.
	Source string `path:"-" query:"-" json:"source"`
	// Type of the catalog.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Catalog regexp pattern to filter the repositories by names.
	FilterPattern string `path:"-" query:"-" json:"filterPattern,omitempty"`
	// contains filtered or unexported fields
}

CatalogCreateInput holds the creation input of the Catalog entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*CatalogCreateInput) Model

func (cci *CatalogCreateInput) Model() *Catalog

Model returns the Catalog entity for creating, after validating.

func (*CatalogCreateInput) SetGinContext

func (ic *CatalogCreateInput) SetGinContext(ctx *gin.Context)

func (*CatalogCreateInput) SetModelClient

func (ic *CatalogCreateInput) SetModelClient(cli *Client)

func (*CatalogCreateInput) Validate

func (cci *CatalogCreateInput) Validate() error

Validate checks the CatalogCreateInput entity.

func (*CatalogCreateInput) ValidateWith

func (cci *CatalogCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogCreateInput entity with the given context and client set.

type CatalogCreateInputs

type CatalogCreateInputs struct {

	// Project indicates to create Catalog entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*CatalogCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

CatalogCreateInputs holds the creation input of the Catalog entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*CatalogCreateInputs) Model

func (cci *CatalogCreateInputs) Model() []*Catalog

Model returns the Catalog entities for creating, after validating.

func (*CatalogCreateInputs) SetGinContext

func (ic *CatalogCreateInputs) SetGinContext(ctx *gin.Context)

func (*CatalogCreateInputs) SetModelClient

func (ic *CatalogCreateInputs) SetModelClient(cli *Client)

func (*CatalogCreateInputs) Validate

func (cci *CatalogCreateInputs) Validate() error

Validate checks the CatalogCreateInputs entity .

func (*CatalogCreateInputs) ValidateWith

func (cci *CatalogCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogCreateInputs entity with the given context and client set.

type CatalogCreateInputsItem

type CatalogCreateInputsItem struct {
	// Source of the catalog.
	Source string `path:"-" query:"-" json:"source"`
	// Type of the catalog.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Catalog regexp pattern to filter the repositories by names.
	FilterPattern string `path:"-" query:"-" json:"filterPattern,omitempty"`
}

CatalogCreateInputs holds the creation input item of the Catalog entities.

func (*CatalogCreateInputsItem) ValidateWith

func (cci *CatalogCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogCreateInputsItem entity with the given context and client set.

type CatalogDelete

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

CatalogDelete is the builder for deleting a Catalog entity.

func (*CatalogDelete) Exec

func (cd *CatalogDelete) Exec(ctx context.Context) (int, error)

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

func (*CatalogDelete) ExecContext

func (c *CatalogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CatalogDelete) ExecX

func (cd *CatalogDelete) ExecX(ctx context.Context) int

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

func (*CatalogDelete) QueryContext

func (c *CatalogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CatalogDelete) Where

func (cd *CatalogDelete) Where(ps ...predicate.Catalog) *CatalogDelete

Where appends a list predicates to the CatalogDelete builder.

type CatalogDeleteInput

type CatalogDeleteInput struct {
	CatalogQueryInput `path:",inline"`
}

CatalogDeleteInput holds the deletion input of the Catalog entity, please tags with `path:",inline"` if embedding.

func (*CatalogDeleteInput) SetGinContext

func (ic *CatalogDeleteInput) SetGinContext(ctx *gin.Context)

func (*CatalogDeleteInput) SetModelClient

func (ic *CatalogDeleteInput) SetModelClient(cli *Client)

type CatalogDeleteInputs

type CatalogDeleteInputs struct {

	// Project indicates to delete Catalog entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*CatalogDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

CatalogDeleteInputs holds the deletion input of the Catalog entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*CatalogDeleteInputs) IDs

func (cdi *CatalogDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Catalog entities for deleting, after validating.

func (*CatalogDeleteInputs) Model

func (cdi *CatalogDeleteInputs) Model() []*Catalog

Model returns the Catalog entities for deleting, after validating.

func (*CatalogDeleteInputs) SetGinContext

func (ic *CatalogDeleteInputs) SetGinContext(ctx *gin.Context)

func (*CatalogDeleteInputs) SetModelClient

func (ic *CatalogDeleteInputs) SetModelClient(cli *Client)

func (*CatalogDeleteInputs) Validate

func (cdi *CatalogDeleteInputs) Validate() error

Validate checks the CatalogDeleteInputs entity.

func (*CatalogDeleteInputs) ValidateWith

func (cdi *CatalogDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogDeleteInputs entity with the given context and client set.

type CatalogDeleteInputsItem

type CatalogDeleteInputsItem struct {
	// ID of the Catalog entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Catalog entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

CatalogDeleteInputs holds the deletion input item of the Catalog entities.

type CatalogDeleteOne

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

CatalogDeleteOne is the builder for deleting a single Catalog entity.

func (*CatalogDeleteOne) Exec

func (cdo *CatalogDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CatalogDeleteOne) ExecX

func (cdo *CatalogDeleteOne) ExecX(ctx context.Context)

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

func (*CatalogDeleteOne) Where

Where appends a list predicates to the CatalogDelete builder.

type CatalogEdges

type CatalogEdges struct {
	// Templates that belong to this catalog.
	Templates []*Template `json:"templates,omitempty"`
	// Project to which the catalog belongs.
	Project *Project `json:"project,omitempty"`
	// contains filtered or unexported fields
}

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

func (CatalogEdges) ProjectOrErr added in v0.4.0

func (e CatalogEdges) ProjectOrErr() (*Project, error)

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

func (CatalogEdges) TemplatesOrErr

func (e CatalogEdges) TemplatesOrErr() ([]*Template, error)

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

type CatalogGroupBy

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

CatalogGroupBy is the group-by builder for Catalog entities.

func (*CatalogGroupBy) Aggregate

func (cgb *CatalogGroupBy) Aggregate(fns ...AggregateFunc) *CatalogGroupBy

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

func (*CatalogGroupBy) Bool

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

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

func (*CatalogGroupBy) BoolX

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

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

func (*CatalogGroupBy) Bools

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

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

func (*CatalogGroupBy) BoolsX

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

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

func (*CatalogGroupBy) Float64

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

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

func (*CatalogGroupBy) Float64X

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

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

func (*CatalogGroupBy) Float64s

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

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

func (*CatalogGroupBy) Float64sX

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

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

func (*CatalogGroupBy) Int

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

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

func (*CatalogGroupBy) IntX

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

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

func (*CatalogGroupBy) Ints

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

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

func (*CatalogGroupBy) IntsX

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

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

func (*CatalogGroupBy) Scan

func (cgb *CatalogGroupBy) Scan(ctx context.Context, v any) error

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

func (*CatalogGroupBy) ScanX

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

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

func (*CatalogGroupBy) String

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

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

func (*CatalogGroupBy) StringX

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

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

func (*CatalogGroupBy) Strings

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

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

func (*CatalogGroupBy) StringsX

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

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

type CatalogMutation

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

CatalogMutation represents an operation that mutates the Catalog nodes in the graph.

func (*CatalogMutation) AddField

func (m *CatalogMutation) 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 (*CatalogMutation) AddTemplateIDs

func (m *CatalogMutation) AddTemplateIDs(ids ...object.ID)

AddTemplateIDs adds the "templates" edge to the Template entity by ids.

func (*CatalogMutation) AddedEdges

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

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

func (*CatalogMutation) AddedField

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

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

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

func (*CatalogMutation) AddedIDs

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

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

func (*CatalogMutation) Annotations

func (m *CatalogMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*CatalogMutation) AnnotationsCleared

func (m *CatalogMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*CatalogMutation) ClearAnnotations

func (m *CatalogMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*CatalogMutation) ClearDescription

func (m *CatalogMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*CatalogMutation) ClearEdge

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

func (m *CatalogMutation) 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 (*CatalogMutation) ClearFilterPattern added in v0.6.0

func (m *CatalogMutation) ClearFilterPattern()

ClearFilterPattern clears the value of the "filter_pattern" field.

func (*CatalogMutation) ClearLabels

func (m *CatalogMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*CatalogMutation) ClearProject added in v0.4.0

func (m *CatalogMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*CatalogMutation) ClearProjectID added in v0.4.0

func (m *CatalogMutation) ClearProjectID()

ClearProjectID clears the value of the "project_id" field.

func (*CatalogMutation) ClearStatus

func (m *CatalogMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*CatalogMutation) ClearSync

func (m *CatalogMutation) ClearSync()

ClearSync clears the value of the "sync" field.

func (*CatalogMutation) ClearTemplates

func (m *CatalogMutation) ClearTemplates()

ClearTemplates clears the "templates" edge to the Template entity.

func (*CatalogMutation) ClearedEdges

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

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

func (*CatalogMutation) ClearedFields

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

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

func (CatalogMutation) Client

func (m CatalogMutation) 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 (*CatalogMutation) CreateTime

func (m *CatalogMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*CatalogMutation) Description

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

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

func (*CatalogMutation) DescriptionCleared

func (m *CatalogMutation) DescriptionCleared() bool

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

func (*CatalogMutation) EdgeCleared

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

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

func (*CatalogMutation) ExecContext

func (c *CatalogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CatalogMutation) Field

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

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

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

func (*CatalogMutation) Fields

func (m *CatalogMutation) 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 (*CatalogMutation) FilterPattern added in v0.6.0

func (m *CatalogMutation) FilterPattern() (r string, exists bool)

FilterPattern returns the value of the "filter_pattern" field in the mutation.

func (*CatalogMutation) FilterPatternCleared added in v0.6.0

func (m *CatalogMutation) FilterPatternCleared() bool

FilterPatternCleared returns if the "filter_pattern" field was cleared in this mutation.

func (*CatalogMutation) GetType

func (m *CatalogMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*CatalogMutation) ID

func (m *CatalogMutation) ID() (id object.ID, 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 (*CatalogMutation) IDs

func (m *CatalogMutation) IDs(ctx context.Context) ([]object.ID, 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 (*CatalogMutation) Labels

func (m *CatalogMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*CatalogMutation) LabelsCleared

func (m *CatalogMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*CatalogMutation) Name

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

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

func (*CatalogMutation) OldAnnotations

func (m *CatalogMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) OldCreateTime

func (m *CatalogMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) OldDescription

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

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

func (m *CatalogMutation) 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 (*CatalogMutation) OldFilterPattern added in v0.6.0

func (m *CatalogMutation) OldFilterPattern(ctx context.Context) (v string, err error)

OldFilterPattern returns the old "filter_pattern" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) OldLabels

func (m *CatalogMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) OldName

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

OldName returns the old "name" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) OldProjectID added in v0.4.0

func (m *CatalogMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) OldSource

func (m *CatalogMutation) OldSource(ctx context.Context) (v string, err error)

OldSource returns the old "source" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) OldStatus

func (m *CatalogMutation) OldStatus(ctx context.Context) (v status.Status, err error)

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

func (m *CatalogMutation) OldSync(ctx context.Context) (v *types.CatalogSync, err error)

OldSync returns the old "sync" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) OldType

func (m *CatalogMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) OldUpdateTime

func (m *CatalogMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Catalog entity. If the Catalog 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 (*CatalogMutation) Op

func (m *CatalogMutation) Op() Op

Op returns the operation name.

func (*CatalogMutation) ProjectCleared added in v0.4.0

func (m *CatalogMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*CatalogMutation) ProjectID added in v0.4.0

func (m *CatalogMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*CatalogMutation) ProjectIDCleared added in v0.4.0

func (m *CatalogMutation) ProjectIDCleared() bool

ProjectIDCleared returns if the "project_id" field was cleared in this mutation.

func (*CatalogMutation) ProjectIDs added in v0.4.0

func (m *CatalogMutation) ProjectIDs() (ids []object.ID)

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

func (*CatalogMutation) QueryContext

func (c *CatalogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CatalogMutation) RemoveTemplateIDs

func (m *CatalogMutation) RemoveTemplateIDs(ids ...object.ID)

RemoveTemplateIDs removes the "templates" edge to the Template entity by IDs.

func (*CatalogMutation) RemovedEdges

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

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

func (*CatalogMutation) RemovedIDs

func (m *CatalogMutation) 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 (*CatalogMutation) RemovedTemplatesIDs

func (m *CatalogMutation) RemovedTemplatesIDs() (ids []object.ID)

RemovedTemplates returns the removed IDs of the "templates" edge to the Template entity.

func (*CatalogMutation) ResetAnnotations

func (m *CatalogMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*CatalogMutation) ResetCreateTime

func (m *CatalogMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*CatalogMutation) ResetDescription

func (m *CatalogMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*CatalogMutation) ResetEdge

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

func (m *CatalogMutation) 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 (*CatalogMutation) ResetFilterPattern added in v0.6.0

func (m *CatalogMutation) ResetFilterPattern()

ResetFilterPattern resets all changes to the "filter_pattern" field.

func (*CatalogMutation) ResetLabels

func (m *CatalogMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*CatalogMutation) ResetName

func (m *CatalogMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CatalogMutation) ResetProject added in v0.4.0

func (m *CatalogMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*CatalogMutation) ResetProjectID added in v0.4.0

func (m *CatalogMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*CatalogMutation) ResetSource

func (m *CatalogMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*CatalogMutation) ResetStatus

func (m *CatalogMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*CatalogMutation) ResetSync

func (m *CatalogMutation) ResetSync()

ResetSync resets all changes to the "sync" field.

func (*CatalogMutation) ResetTemplates

func (m *CatalogMutation) ResetTemplates()

ResetTemplates resets all changes to the "templates" edge.

func (*CatalogMutation) ResetType

func (m *CatalogMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*CatalogMutation) ResetUpdateTime

func (m *CatalogMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*CatalogMutation) SetAnnotations

func (m *CatalogMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*CatalogMutation) SetCreateTime

func (m *CatalogMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*CatalogMutation) SetDescription

func (m *CatalogMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*CatalogMutation) SetField

func (m *CatalogMutation) 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 (*CatalogMutation) SetFilterPattern added in v0.6.0

func (m *CatalogMutation) SetFilterPattern(s string)

SetFilterPattern sets the "filter_pattern" field.

func (*CatalogMutation) SetID

func (m *CatalogMutation) SetID(id object.ID)

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

func (*CatalogMutation) SetLabels

func (m *CatalogMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*CatalogMutation) SetName

func (m *CatalogMutation) SetName(s string)

SetName sets the "name" field.

func (*CatalogMutation) SetOp

func (m *CatalogMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CatalogMutation) SetProjectID added in v0.4.0

func (m *CatalogMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*CatalogMutation) SetSource

func (m *CatalogMutation) SetSource(s string)

SetSource sets the "source" field.

func (*CatalogMutation) SetStatus

func (m *CatalogMutation) SetStatus(s status.Status)

SetStatus sets the "status" field.

func (*CatalogMutation) SetSync

func (m *CatalogMutation) SetSync(ts *types.CatalogSync)

SetSync sets the "sync" field.

func (*CatalogMutation) SetType

func (m *CatalogMutation) SetType(s string)

SetType sets the "type" field.

func (*CatalogMutation) SetUpdateTime

func (m *CatalogMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*CatalogMutation) Source

func (m *CatalogMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (*CatalogMutation) Status

func (m *CatalogMutation) Status() (r status.Status, exists bool)

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

func (*CatalogMutation) StatusCleared

func (m *CatalogMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*CatalogMutation) Sync

func (m *CatalogMutation) Sync() (r *types.CatalogSync, exists bool)

Sync returns the value of the "sync" field in the mutation.

func (*CatalogMutation) SyncCleared

func (m *CatalogMutation) SyncCleared() bool

SyncCleared returns if the "sync" field was cleared in this mutation.

func (*CatalogMutation) TemplatesCleared

func (m *CatalogMutation) TemplatesCleared() bool

TemplatesCleared reports if the "templates" edge to the Template entity was cleared.

func (*CatalogMutation) TemplatesIDs

func (m *CatalogMutation) TemplatesIDs() (ids []object.ID)

TemplatesIDs returns the "templates" edge IDs in the mutation.

func (CatalogMutation) Tx

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

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

func (*CatalogMutation) Type

func (m *CatalogMutation) Type() string

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

func (*CatalogMutation) UpdateTime

func (m *CatalogMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*CatalogMutation) Where

func (m *CatalogMutation) Where(ps ...predicate.Catalog)

Where appends a list predicates to the CatalogMutation builder.

func (*CatalogMutation) WhereP

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

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

type CatalogOutput

type CatalogOutput struct {
	ID            object.ID          `json:"id,omitempty"`
	Name          string             `json:"name,omitempty"`
	Description   string             `json:"description,omitempty"`
	Labels        map[string]string  `json:"labels,omitempty"`
	CreateTime    *time.Time         `json:"createTime,omitempty"`
	UpdateTime    *time.Time         `json:"updateTime,omitempty"`
	Status        status.Status      `json:"status,omitempty"`
	Type          string             `json:"type,cli-table-column,omitempty"`
	Source        string             `json:"source,omitempty"`
	Sync          *types.CatalogSync `json:"sync,omitempty"`
	FilterPattern string             `json:"filterPattern,omitempty"`

	Project *ProjectOutput `json:"project,omitempty"`
}

CatalogOutput holds the output of the Catalog entity.

func ExposeCatalog

func ExposeCatalog(_c *Catalog) *CatalogOutput

ExposeCatalog converts the Catalog to CatalogOutput.

func ExposeCatalogs

func ExposeCatalogs(_cs []*Catalog) []*CatalogOutput

ExposeCatalogs converts the Catalog slice to CatalogOutput pointer slice.

type CatalogPatchInput added in v0.5.0

type CatalogPatchInput struct {
	CatalogQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `path:"-" query:"-" json:"status,omitempty"`
	// Type of the catalog.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Source of the catalog.
	Source string `path:"-" query:"-" json:"source,omitempty"`
	// Sync information of the catalog.
	Sync *types.CatalogSync `path:"-" query:"-" json:"sync,omitempty"`
	// Catalog regexp pattern to filter the repositories by names.
	FilterPattern string `path:"-" query:"-" json:"filterPattern,omitempty"`
	// contains filtered or unexported fields
}

CatalogPatchInput holds the patch input of the Catalog entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*CatalogPatchInput) Model added in v0.5.0

func (cpi *CatalogPatchInput) Model() *Catalog

Model returns the Catalog patched entity, after validating.

func (*CatalogPatchInput) PatchModel added in v0.5.0

func (cpi *CatalogPatchInput) PatchModel() *Catalog

PatchModel returns the Catalog partition entity for patching.

func (*CatalogPatchInput) SetGinContext added in v0.5.0

func (ic *CatalogPatchInput) SetGinContext(ctx *gin.Context)

func (*CatalogPatchInput) SetModelClient added in v0.5.0

func (ic *CatalogPatchInput) SetModelClient(cli *Client)

func (*CatalogPatchInput) Validate added in v0.5.0

func (cpi *CatalogPatchInput) Validate() error

Validate checks the CatalogPatchInput entity.

func (*CatalogPatchInput) ValidateWith added in v0.5.0

func (cpi *CatalogPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogPatchInput entity with the given context and client set.

type CatalogQuery

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

CatalogQuery is the builder for querying Catalog entities.

func (*CatalogQuery) Aggregate

func (cq *CatalogQuery) Aggregate(fns ...AggregateFunc) *CatalogSelect

Aggregate returns a CatalogSelect configured with the given aggregations.

func (*CatalogQuery) All

func (cq *CatalogQuery) All(ctx context.Context) ([]*Catalog, error)

All executes the query and returns a list of Catalogs.

func (*CatalogQuery) AllX

func (cq *CatalogQuery) AllX(ctx context.Context) []*Catalog

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

func (*CatalogQuery) Clone

func (cq *CatalogQuery) Clone() *CatalogQuery

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

func (*CatalogQuery) Count

func (cq *CatalogQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CatalogQuery) CountX

func (cq *CatalogQuery) CountX(ctx context.Context) int

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

func (*CatalogQuery) ExecContext

func (c *CatalogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CatalogQuery) Exist

func (cq *CatalogQuery) Exist(ctx context.Context) (bool, error)

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

func (*CatalogQuery) ExistX

func (cq *CatalogQuery) ExistX(ctx context.Context) bool

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

func (*CatalogQuery) First

func (cq *CatalogQuery) First(ctx context.Context) (*Catalog, error)

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

func (*CatalogQuery) FirstID

func (cq *CatalogQuery) FirstID(ctx context.Context) (id object.ID, err error)

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

func (*CatalogQuery) FirstIDX

func (cq *CatalogQuery) FirstIDX(ctx context.Context) object.ID

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

func (*CatalogQuery) FirstX

func (cq *CatalogQuery) FirstX(ctx context.Context) *Catalog

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

func (*CatalogQuery) ForShare

func (cq *CatalogQuery) ForShare(opts ...sql.LockOption) *CatalogQuery

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 (*CatalogQuery) ForUpdate

func (cq *CatalogQuery) ForUpdate(opts ...sql.LockOption) *CatalogQuery

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 (*CatalogQuery) GroupBy

func (cq *CatalogQuery) GroupBy(field string, fields ...string) *CatalogGroupBy

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.Catalog.Query().
	GroupBy(catalog.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*CatalogQuery) IDs

func (cq *CatalogQuery) IDs(ctx context.Context) (ids []object.ID, err error)

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

func (*CatalogQuery) IDsX

func (cq *CatalogQuery) IDsX(ctx context.Context) []object.ID

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

func (*CatalogQuery) Limit

func (cq *CatalogQuery) Limit(limit int) *CatalogQuery

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

func (*CatalogQuery) Modify

func (cq *CatalogQuery) Modify(modifiers ...func(s *sql.Selector)) *CatalogSelect

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

func (*CatalogQuery) Offset

func (cq *CatalogQuery) Offset(offset int) *CatalogQuery

Offset to start from.

func (*CatalogQuery) Only

func (cq *CatalogQuery) Only(ctx context.Context) (*Catalog, error)

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

func (*CatalogQuery) OnlyID

func (cq *CatalogQuery) OnlyID(ctx context.Context) (id object.ID, err error)

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

func (*CatalogQuery) OnlyIDX

func (cq *CatalogQuery) OnlyIDX(ctx context.Context) object.ID

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

func (*CatalogQuery) OnlyX

func (cq *CatalogQuery) OnlyX(ctx context.Context) *Catalog

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

func (*CatalogQuery) Order

func (cq *CatalogQuery) Order(o ...catalog.OrderOption) *CatalogQuery

Order specifies how the records should be ordered.

func (*CatalogQuery) QueryContext

func (c *CatalogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CatalogQuery) QueryProject added in v0.4.0

func (cq *CatalogQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*CatalogQuery) QueryTemplates

func (cq *CatalogQuery) QueryTemplates() *TemplateQuery

QueryTemplates chains the current query on the "templates" edge.

func (*CatalogQuery) Select

func (cq *CatalogQuery) Select(fields ...string) *CatalogSelect

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.Catalog.Query().
	Select(catalog.FieldName).
	Scan(ctx, &v)

func (*CatalogQuery) Unique

func (cq *CatalogQuery) Unique(unique bool) *CatalogQuery

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

func (cq *CatalogQuery) Where(ps ...predicate.Catalog) *CatalogQuery

Where adds a new predicate for the CatalogQuery builder.

func (*CatalogQuery) WhereP

func (cq *CatalogQuery) WhereP(ps ...func(*sql.Selector))

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

func (*CatalogQuery) WithProject added in v0.4.0

func (cq *CatalogQuery) WithProject(opts ...func(*ProjectQuery)) *CatalogQuery

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

func (*CatalogQuery) WithTemplates

func (cq *CatalogQuery) WithTemplates(opts ...func(*TemplateQuery)) *CatalogQuery

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

type CatalogQueryInput

type CatalogQueryInput struct {

	// Project indicates to query Catalog entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project,omitempty"`

	// Refer holds the route path reference of the Catalog entity.
	Refer *object.Refer `path:"catalog,default=" query:"-" json:"-"`
	// ID of the Catalog entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Catalog entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

CatalogQueryInput holds the query input of the Catalog entity, please tags with `path:",inline"` if embedding.

func (*CatalogQueryInput) Model

func (cqi *CatalogQueryInput) Model() *Catalog

Model returns the Catalog entity for querying, after validating.

func (*CatalogQueryInput) SetGinContext

func (ic *CatalogQueryInput) SetGinContext(ctx *gin.Context)

func (*CatalogQueryInput) SetModelClient

func (ic *CatalogQueryInput) SetModelClient(cli *Client)

func (*CatalogQueryInput) Validate

func (cqi *CatalogQueryInput) Validate() error

Validate checks the CatalogQueryInput entity.

func (*CatalogQueryInput) ValidateWith

func (cqi *CatalogQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogQueryInput entity with the given context and client set.

type CatalogQueryInputs

type CatalogQueryInputs struct {

	// Project indicates to query Catalog entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

CatalogQueryInputs holds the query input of the Catalog entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*CatalogQueryInputs) SetGinContext

func (ic *CatalogQueryInputs) SetGinContext(ctx *gin.Context)

func (*CatalogQueryInputs) SetModelClient

func (ic *CatalogQueryInputs) SetModelClient(cli *Client)

func (*CatalogQueryInputs) Validate

func (cqi *CatalogQueryInputs) Validate() error

Validate checks the CatalogQueryInputs entity.

func (*CatalogQueryInputs) ValidateWith

func (cqi *CatalogQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogQueryInputs entity with the given context and client set.

type CatalogSelect

type CatalogSelect struct {
	*CatalogQuery
	// contains filtered or unexported fields
}

CatalogSelect is the builder for selecting fields of Catalog entities.

func (*CatalogSelect) Aggregate

func (cs *CatalogSelect) Aggregate(fns ...AggregateFunc) *CatalogSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CatalogSelect) Bool

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

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

func (*CatalogSelect) BoolX

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

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

func (*CatalogSelect) Bools

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

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

func (*CatalogSelect) BoolsX

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

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

func (CatalogSelect) ExecContext

func (c CatalogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CatalogSelect) Float64

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

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

func (*CatalogSelect) Float64X

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

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

func (*CatalogSelect) Float64s

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

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

func (*CatalogSelect) Float64sX

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

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

func (*CatalogSelect) Int

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

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

func (*CatalogSelect) IntX

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

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

func (*CatalogSelect) Ints

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

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

func (*CatalogSelect) IntsX

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

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

func (*CatalogSelect) Modify

func (cs *CatalogSelect) Modify(modifiers ...func(s *sql.Selector)) *CatalogSelect

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

func (CatalogSelect) QueryContext

func (c CatalogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CatalogSelect) Scan

func (cs *CatalogSelect) Scan(ctx context.Context, v any) error

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

func (*CatalogSelect) ScanX

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

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

func (*CatalogSelect) String

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

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

func (*CatalogSelect) StringX

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

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

func (*CatalogSelect) Strings

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

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

func (*CatalogSelect) StringsX

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

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

type CatalogUpdate

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

CatalogUpdate is the builder for updating Catalog entities.

func (*CatalogUpdate) AddTemplateIDs

func (cu *CatalogUpdate) AddTemplateIDs(ids ...object.ID) *CatalogUpdate

AddTemplateIDs adds the "templates" edge to the Template entity by IDs.

func (*CatalogUpdate) AddTemplates

func (cu *CatalogUpdate) AddTemplates(t ...*Template) *CatalogUpdate

AddTemplates adds the "templates" edges to the Template entity.

func (*CatalogUpdate) ClearAnnotations

func (cu *CatalogUpdate) ClearAnnotations() *CatalogUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*CatalogUpdate) ClearDescription

func (cu *CatalogUpdate) ClearDescription() *CatalogUpdate

ClearDescription clears the value of the "description" field.

func (*CatalogUpdate) ClearFilterPattern added in v0.6.0

func (cu *CatalogUpdate) ClearFilterPattern() *CatalogUpdate

ClearFilterPattern clears the value of the "filter_pattern" field.

func (*CatalogUpdate) ClearLabels

func (cu *CatalogUpdate) ClearLabels() *CatalogUpdate

ClearLabels clears the value of the "labels" field.

func (*CatalogUpdate) ClearStatus

func (cu *CatalogUpdate) ClearStatus() *CatalogUpdate

ClearStatus clears the value of the "status" field.

func (*CatalogUpdate) ClearSync

func (cu *CatalogUpdate) ClearSync() *CatalogUpdate

ClearSync clears the value of the "sync" field.

func (*CatalogUpdate) ClearTemplates

func (cu *CatalogUpdate) ClearTemplates() *CatalogUpdate

ClearTemplates clears all "templates" edges to the Template entity.

func (*CatalogUpdate) Exec

func (cu *CatalogUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CatalogUpdate) ExecContext

func (c *CatalogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CatalogUpdate) ExecX

func (cu *CatalogUpdate) ExecX(ctx context.Context)

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

func (*CatalogUpdate) Modify

func (cu *CatalogUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CatalogUpdate

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

func (*CatalogUpdate) Mutation

func (cu *CatalogUpdate) Mutation() *CatalogMutation

Mutation returns the CatalogMutation object of the builder.

func (*CatalogUpdate) QueryContext

func (c *CatalogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CatalogUpdate) RemoveTemplateIDs

func (cu *CatalogUpdate) RemoveTemplateIDs(ids ...object.ID) *CatalogUpdate

RemoveTemplateIDs removes the "templates" edge to Template entities by IDs.

func (*CatalogUpdate) RemoveTemplates

func (cu *CatalogUpdate) RemoveTemplates(t ...*Template) *CatalogUpdate

RemoveTemplates removes "templates" edges to Template entities.

func (*CatalogUpdate) Save

func (cu *CatalogUpdate) Save(ctx context.Context) (int, error)

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

func (*CatalogUpdate) SaveX

func (cu *CatalogUpdate) SaveX(ctx context.Context) int

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

func (*CatalogUpdate) Set

func (cu *CatalogUpdate) Set(obj *Catalog) *CatalogUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*CatalogUpdate) SetAnnotations

func (cu *CatalogUpdate) SetAnnotations(m map[string]string) *CatalogUpdate

SetAnnotations sets the "annotations" field.

func (*CatalogUpdate) SetDescription

func (cu *CatalogUpdate) SetDescription(s string) *CatalogUpdate

SetDescription sets the "description" field.

func (*CatalogUpdate) SetFilterPattern added in v0.6.0

func (cu *CatalogUpdate) SetFilterPattern(s string) *CatalogUpdate

SetFilterPattern sets the "filter_pattern" field.

func (*CatalogUpdate) SetLabels

func (cu *CatalogUpdate) SetLabels(m map[string]string) *CatalogUpdate

SetLabels sets the "labels" field.

func (*CatalogUpdate) SetNillableDescription

func (cu *CatalogUpdate) SetNillableDescription(s *string) *CatalogUpdate

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

func (*CatalogUpdate) SetNillableFilterPattern added in v0.6.0

func (cu *CatalogUpdate) SetNillableFilterPattern(s *string) *CatalogUpdate

SetNillableFilterPattern sets the "filter_pattern" field if the given value is not nil.

func (*CatalogUpdate) SetNillableStatus

func (cu *CatalogUpdate) SetNillableStatus(s *status.Status) *CatalogUpdate

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

func (*CatalogUpdate) SetStatus

func (cu *CatalogUpdate) SetStatus(s status.Status) *CatalogUpdate

SetStatus sets the "status" field.

func (*CatalogUpdate) SetSync

func (cu *CatalogUpdate) SetSync(ts *types.CatalogSync) *CatalogUpdate

SetSync sets the "sync" field.

func (*CatalogUpdate) SetUpdateTime

func (cu *CatalogUpdate) SetUpdateTime(t time.Time) *CatalogUpdate

SetUpdateTime sets the "update_time" field.

func (*CatalogUpdate) Where

func (cu *CatalogUpdate) Where(ps ...predicate.Catalog) *CatalogUpdate

Where appends a list predicates to the CatalogUpdate builder.

type CatalogUpdateInput

type CatalogUpdateInput struct {
	CatalogQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Catalog regexp pattern to filter the repositories by names.
	FilterPattern string `path:"-" query:"-" json:"filterPattern,omitempty"`
}

CatalogUpdateInput holds the modification input of the Catalog entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*CatalogUpdateInput) Model

func (cui *CatalogUpdateInput) Model() *Catalog

Model returns the Catalog entity for modifying, after validating.

func (*CatalogUpdateInput) SetGinContext

func (ic *CatalogUpdateInput) SetGinContext(ctx *gin.Context)

func (*CatalogUpdateInput) SetModelClient

func (ic *CatalogUpdateInput) SetModelClient(cli *Client)

func (*CatalogUpdateInput) Validate

func (cui *CatalogUpdateInput) Validate() error

Validate checks the CatalogUpdateInput entity.

func (*CatalogUpdateInput) ValidateWith

func (cui *CatalogUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogUpdateInput entity with the given context and client set.

type CatalogUpdateInputs

type CatalogUpdateInputs struct {

	// Project indicates to update Catalog entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*CatalogUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

CatalogUpdateInputs holds the modification input of the Catalog entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*CatalogUpdateInputs) IDs

func (cui *CatalogUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Catalog entities for modifying, after validating.

func (*CatalogUpdateInputs) Model

func (cui *CatalogUpdateInputs) Model() []*Catalog

Model returns the Catalog entities for modifying, after validating.

func (*CatalogUpdateInputs) SetGinContext

func (ic *CatalogUpdateInputs) SetGinContext(ctx *gin.Context)

func (*CatalogUpdateInputs) SetModelClient

func (ic *CatalogUpdateInputs) SetModelClient(cli *Client)

func (*CatalogUpdateInputs) Validate

func (cui *CatalogUpdateInputs) Validate() error

Validate checks the CatalogUpdateInputs entity.

func (*CatalogUpdateInputs) ValidateWith

func (cui *CatalogUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogUpdateInputs entity with the given context and client set.

type CatalogUpdateInputsItem

type CatalogUpdateInputsItem struct {
	// ID of the Catalog entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Catalog entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Catalog regexp pattern to filter the repositories by names.
	FilterPattern string `path:"-" query:"-" json:"filterPattern,omitempty"`
}

CatalogUpdateInputs holds the modification input item of the Catalog entities.

func (*CatalogUpdateInputsItem) ValidateWith

func (cui *CatalogUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CatalogUpdateInputsItem entity with the given context and client set.

type CatalogUpdateOne

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

CatalogUpdateOne is the builder for updating a single Catalog entity.

func (*CatalogUpdateOne) AddTemplateIDs

func (cuo *CatalogUpdateOne) AddTemplateIDs(ids ...object.ID) *CatalogUpdateOne

AddTemplateIDs adds the "templates" edge to the Template entity by IDs.

func (*CatalogUpdateOne) AddTemplates

func (cuo *CatalogUpdateOne) AddTemplates(t ...*Template) *CatalogUpdateOne

AddTemplates adds the "templates" edges to the Template entity.

func (*CatalogUpdateOne) ClearAnnotations

func (cuo *CatalogUpdateOne) ClearAnnotations() *CatalogUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*CatalogUpdateOne) ClearDescription

func (cuo *CatalogUpdateOne) ClearDescription() *CatalogUpdateOne

ClearDescription clears the value of the "description" field.

func (*CatalogUpdateOne) ClearFilterPattern added in v0.6.0

func (cuo *CatalogUpdateOne) ClearFilterPattern() *CatalogUpdateOne

ClearFilterPattern clears the value of the "filter_pattern" field.

func (*CatalogUpdateOne) ClearLabels

func (cuo *CatalogUpdateOne) ClearLabels() *CatalogUpdateOne

ClearLabels clears the value of the "labels" field.

func (*CatalogUpdateOne) ClearStatus

func (cuo *CatalogUpdateOne) ClearStatus() *CatalogUpdateOne

ClearStatus clears the value of the "status" field.

func (*CatalogUpdateOne) ClearSync

func (cuo *CatalogUpdateOne) ClearSync() *CatalogUpdateOne

ClearSync clears the value of the "sync" field.

func (*CatalogUpdateOne) ClearTemplates

func (cuo *CatalogUpdateOne) ClearTemplates() *CatalogUpdateOne

ClearTemplates clears all "templates" edges to the Template entity.

func (*CatalogUpdateOne) Exec

func (cuo *CatalogUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CatalogUpdateOne) ExecContext

func (c *CatalogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CatalogUpdateOne) ExecE

func (cuo *CatalogUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Catalog) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*CatalogUpdateOne) ExecEX

func (cuo *CatalogUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Catalog) error)

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

func (*CatalogUpdateOne) ExecX

func (cuo *CatalogUpdateOne) ExecX(ctx context.Context)

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

func (*CatalogUpdateOne) Modify

func (cuo *CatalogUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CatalogUpdateOne

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

func (*CatalogUpdateOne) Mutation

func (cuo *CatalogUpdateOne) Mutation() *CatalogMutation

Mutation returns the CatalogMutation object of the builder.

func (*CatalogUpdateOne) QueryContext

func (c *CatalogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CatalogUpdateOne) RemoveTemplateIDs

func (cuo *CatalogUpdateOne) RemoveTemplateIDs(ids ...object.ID) *CatalogUpdateOne

RemoveTemplateIDs removes the "templates" edge to Template entities by IDs.

func (*CatalogUpdateOne) RemoveTemplates

func (cuo *CatalogUpdateOne) RemoveTemplates(t ...*Template) *CatalogUpdateOne

RemoveTemplates removes "templates" edges to Template entities.

func (*CatalogUpdateOne) Save

func (cuo *CatalogUpdateOne) Save(ctx context.Context) (*Catalog, error)

Save executes the query and returns the updated Catalog entity.

func (*CatalogUpdateOne) SaveE

func (cuo *CatalogUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Catalog) error) (*Catalog, error)

SaveE calls the given function after updated the Catalog entity, which is always good for cascading update operations.

func (*CatalogUpdateOne) SaveEX

func (cuo *CatalogUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Catalog) error) *Catalog

SaveEX is like SaveE, but panics if an error occurs.

func (*CatalogUpdateOne) SaveX

func (cuo *CatalogUpdateOne) SaveX(ctx context.Context) *Catalog

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

func (*CatalogUpdateOne) Select

func (cuo *CatalogUpdateOne) Select(field string, fields ...string) *CatalogUpdateOne

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

func (*CatalogUpdateOne) Set

func (cuo *CatalogUpdateOne) Set(obj *Catalog) *CatalogUpdateOne

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*CatalogUpdateOne) SetAnnotations

func (cuo *CatalogUpdateOne) SetAnnotations(m map[string]string) *CatalogUpdateOne

SetAnnotations sets the "annotations" field.

func (*CatalogUpdateOne) SetDescription

func (cuo *CatalogUpdateOne) SetDescription(s string) *CatalogUpdateOne

SetDescription sets the "description" field.

func (*CatalogUpdateOne) SetFilterPattern added in v0.6.0

func (cuo *CatalogUpdateOne) SetFilterPattern(s string) *CatalogUpdateOne

SetFilterPattern sets the "filter_pattern" field.

func (*CatalogUpdateOne) SetLabels

func (cuo *CatalogUpdateOne) SetLabels(m map[string]string) *CatalogUpdateOne

SetLabels sets the "labels" field.

func (*CatalogUpdateOne) SetNillableDescription

func (cuo *CatalogUpdateOne) SetNillableDescription(s *string) *CatalogUpdateOne

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

func (*CatalogUpdateOne) SetNillableFilterPattern added in v0.6.0

func (cuo *CatalogUpdateOne) SetNillableFilterPattern(s *string) *CatalogUpdateOne

SetNillableFilterPattern sets the "filter_pattern" field if the given value is not nil.

func (*CatalogUpdateOne) SetNillableStatus

func (cuo *CatalogUpdateOne) SetNillableStatus(s *status.Status) *CatalogUpdateOne

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

func (*CatalogUpdateOne) SetStatus

func (cuo *CatalogUpdateOne) SetStatus(s status.Status) *CatalogUpdateOne

SetStatus sets the "status" field.

func (*CatalogUpdateOne) SetSync

SetSync sets the "sync" field.

func (*CatalogUpdateOne) SetUpdateTime

func (cuo *CatalogUpdateOne) SetUpdateTime(t time.Time) *CatalogUpdateOne

SetUpdateTime sets the "update_time" field.

func (*CatalogUpdateOne) Where

Where appends a list predicates to the CatalogUpdate builder.

type CatalogUpsert

type CatalogUpsert struct {
	*sql.UpdateSet
}

CatalogUpsert is the "OnConflict" setter.

func (*CatalogUpsert) ClearAnnotations

func (u *CatalogUpsert) ClearAnnotations() *CatalogUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*CatalogUpsert) ClearDescription

func (u *CatalogUpsert) ClearDescription() *CatalogUpsert

ClearDescription clears the value of the "description" field.

func (*CatalogUpsert) ClearFilterPattern added in v0.6.0

func (u *CatalogUpsert) ClearFilterPattern() *CatalogUpsert

ClearFilterPattern clears the value of the "filter_pattern" field.

func (*CatalogUpsert) ClearLabels

func (u *CatalogUpsert) ClearLabels() *CatalogUpsert

ClearLabels clears the value of the "labels" field.

func (*CatalogUpsert) ClearStatus

func (u *CatalogUpsert) ClearStatus() *CatalogUpsert

ClearStatus clears the value of the "status" field.

func (*CatalogUpsert) ClearSync

func (u *CatalogUpsert) ClearSync() *CatalogUpsert

ClearSync clears the value of the "sync" field.

func (*CatalogUpsert) SetAnnotations

func (u *CatalogUpsert) SetAnnotations(v map[string]string) *CatalogUpsert

SetAnnotations sets the "annotations" field.

func (*CatalogUpsert) SetDescription

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

SetDescription sets the "description" field.

func (*CatalogUpsert) SetFilterPattern added in v0.6.0

func (u *CatalogUpsert) SetFilterPattern(v string) *CatalogUpsert

SetFilterPattern sets the "filter_pattern" field.

func (*CatalogUpsert) SetLabels

func (u *CatalogUpsert) SetLabels(v map[string]string) *CatalogUpsert

SetLabels sets the "labels" field.

func (*CatalogUpsert) SetStatus

func (u *CatalogUpsert) SetStatus(v status.Status) *CatalogUpsert

SetStatus sets the "status" field.

func (*CatalogUpsert) SetSync

func (u *CatalogUpsert) SetSync(v *types.CatalogSync) *CatalogUpsert

SetSync sets the "sync" field.

func (*CatalogUpsert) SetUpdateTime

func (u *CatalogUpsert) SetUpdateTime(v time.Time) *CatalogUpsert

SetUpdateTime sets the "update_time" field.

func (*CatalogUpsert) UpdateAnnotations

func (u *CatalogUpsert) UpdateAnnotations() *CatalogUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*CatalogUpsert) UpdateDescription

func (u *CatalogUpsert) UpdateDescription() *CatalogUpsert

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

func (*CatalogUpsert) UpdateFilterPattern added in v0.6.0

func (u *CatalogUpsert) UpdateFilterPattern() *CatalogUpsert

UpdateFilterPattern sets the "filter_pattern" field to the value that was provided on create.

func (*CatalogUpsert) UpdateLabels

func (u *CatalogUpsert) UpdateLabels() *CatalogUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*CatalogUpsert) UpdateStatus

func (u *CatalogUpsert) UpdateStatus() *CatalogUpsert

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

func (*CatalogUpsert) UpdateSync

func (u *CatalogUpsert) UpdateSync() *CatalogUpsert

UpdateSync sets the "sync" field to the value that was provided on create.

func (*CatalogUpsert) UpdateUpdateTime

func (u *CatalogUpsert) UpdateUpdateTime() *CatalogUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type CatalogUpsertBulk

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

CatalogUpsertBulk is the builder for "upsert"-ing a bulk of Catalog nodes.

func (*CatalogUpsertBulk) ClearAnnotations

func (u *CatalogUpsertBulk) ClearAnnotations() *CatalogUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*CatalogUpsertBulk) ClearDescription

func (u *CatalogUpsertBulk) ClearDescription() *CatalogUpsertBulk

ClearDescription clears the value of the "description" field.

func (*CatalogUpsertBulk) ClearFilterPattern added in v0.6.0

func (u *CatalogUpsertBulk) ClearFilterPattern() *CatalogUpsertBulk

ClearFilterPattern clears the value of the "filter_pattern" field.

func (*CatalogUpsertBulk) ClearLabels

func (u *CatalogUpsertBulk) ClearLabels() *CatalogUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*CatalogUpsertBulk) ClearStatus

func (u *CatalogUpsertBulk) ClearStatus() *CatalogUpsertBulk

ClearStatus clears the value of the "status" field.

func (*CatalogUpsertBulk) ClearSync

func (u *CatalogUpsertBulk) ClearSync() *CatalogUpsertBulk

ClearSync clears the value of the "sync" field.

func (*CatalogUpsertBulk) DoNothing

func (u *CatalogUpsertBulk) DoNothing() *CatalogUpsertBulk

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

func (*CatalogUpsertBulk) Exec

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

Exec executes the query.

func (*CatalogUpsertBulk) ExecE

func (u *CatalogUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Catalog) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*CatalogUpsertBulk) ExecEX

func (u *CatalogUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Catalog) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*CatalogUpsertBulk) ExecX

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

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

func (*CatalogUpsertBulk) Ignore

func (u *CatalogUpsertBulk) Ignore() *CatalogUpsertBulk

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

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

func (*CatalogUpsertBulk) SetAnnotations

func (u *CatalogUpsertBulk) SetAnnotations(v map[string]string) *CatalogUpsertBulk

SetAnnotations sets the "annotations" field.

func (*CatalogUpsertBulk) SetDescription

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

SetDescription sets the "description" field.

func (*CatalogUpsertBulk) SetFilterPattern added in v0.6.0

func (u *CatalogUpsertBulk) SetFilterPattern(v string) *CatalogUpsertBulk

SetFilterPattern sets the "filter_pattern" field.

func (*CatalogUpsertBulk) SetLabels

func (u *CatalogUpsertBulk) SetLabels(v map[string]string) *CatalogUpsertBulk

SetLabels sets the "labels" field.

func (*CatalogUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*CatalogUpsertBulk) SetSync

SetSync sets the "sync" field.

func (*CatalogUpsertBulk) SetUpdateTime

func (u *CatalogUpsertBulk) SetUpdateTime(v time.Time) *CatalogUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*CatalogUpsertBulk) Update

func (u *CatalogUpsertBulk) Update(set func(*CatalogUpsert)) *CatalogUpsertBulk

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

func (*CatalogUpsertBulk) UpdateAnnotations

func (u *CatalogUpsertBulk) UpdateAnnotations() *CatalogUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*CatalogUpsertBulk) UpdateDescription

func (u *CatalogUpsertBulk) UpdateDescription() *CatalogUpsertBulk

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

func (*CatalogUpsertBulk) UpdateFilterPattern added in v0.6.0

func (u *CatalogUpsertBulk) UpdateFilterPattern() *CatalogUpsertBulk

UpdateFilterPattern sets the "filter_pattern" field to the value that was provided on create.

func (*CatalogUpsertBulk) UpdateLabels

func (u *CatalogUpsertBulk) UpdateLabels() *CatalogUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*CatalogUpsertBulk) UpdateNewValues

func (u *CatalogUpsertBulk) UpdateNewValues() *CatalogUpsertBulk

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

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

func (*CatalogUpsertBulk) UpdateStatus

func (u *CatalogUpsertBulk) UpdateStatus() *CatalogUpsertBulk

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

func (*CatalogUpsertBulk) UpdateSync

func (u *CatalogUpsertBulk) UpdateSync() *CatalogUpsertBulk

UpdateSync sets the "sync" field to the value that was provided on create.

func (*CatalogUpsertBulk) UpdateUpdateTime

func (u *CatalogUpsertBulk) UpdateUpdateTime() *CatalogUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type CatalogUpsertOne

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

CatalogUpsertOne is the builder for "upsert"-ing

one Catalog node.

func (*CatalogUpsertOne) ClearAnnotations

func (u *CatalogUpsertOne) ClearAnnotations() *CatalogUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*CatalogUpsertOne) ClearDescription

func (u *CatalogUpsertOne) ClearDescription() *CatalogUpsertOne

ClearDescription clears the value of the "description" field.

func (*CatalogUpsertOne) ClearFilterPattern added in v0.6.0

func (u *CatalogUpsertOne) ClearFilterPattern() *CatalogUpsertOne

ClearFilterPattern clears the value of the "filter_pattern" field.

func (*CatalogUpsertOne) ClearLabels

func (u *CatalogUpsertOne) ClearLabels() *CatalogUpsertOne

ClearLabels clears the value of the "labels" field.

func (*CatalogUpsertOne) ClearStatus

func (u *CatalogUpsertOne) ClearStatus() *CatalogUpsertOne

ClearStatus clears the value of the "status" field.

func (*CatalogUpsertOne) ClearSync

func (u *CatalogUpsertOne) ClearSync() *CatalogUpsertOne

ClearSync clears the value of the "sync" field.

func (*CatalogUpsertOne) DoNothing

func (u *CatalogUpsertOne) DoNothing() *CatalogUpsertOne

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

func (*CatalogUpsertOne) Exec

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

Exec executes the query.

func (*CatalogUpsertOne) ExecE

func (u *CatalogUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Catalog) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*CatalogUpsertOne) ExecEX

func (u *CatalogUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Catalog) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*CatalogUpsertOne) ExecX

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

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

func (*CatalogUpsertOne) ID

func (u *CatalogUpsertOne) ID(ctx context.Context) (id object.ID, err error)

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

func (*CatalogUpsertOne) IDX

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

func (*CatalogUpsertOne) Ignore

func (u *CatalogUpsertOne) Ignore() *CatalogUpsertOne

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

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

func (*CatalogUpsertOne) SetAnnotations

func (u *CatalogUpsertOne) SetAnnotations(v map[string]string) *CatalogUpsertOne

SetAnnotations sets the "annotations" field.

func (*CatalogUpsertOne) SetDescription

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

SetDescription sets the "description" field.

func (*CatalogUpsertOne) SetFilterPattern added in v0.6.0

func (u *CatalogUpsertOne) SetFilterPattern(v string) *CatalogUpsertOne

SetFilterPattern sets the "filter_pattern" field.

func (*CatalogUpsertOne) SetLabels

func (u *CatalogUpsertOne) SetLabels(v map[string]string) *CatalogUpsertOne

SetLabels sets the "labels" field.

func (*CatalogUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*CatalogUpsertOne) SetSync

SetSync sets the "sync" field.

func (*CatalogUpsertOne) SetUpdateTime

func (u *CatalogUpsertOne) SetUpdateTime(v time.Time) *CatalogUpsertOne

SetUpdateTime sets the "update_time" field.

func (*CatalogUpsertOne) Update

func (u *CatalogUpsertOne) Update(set func(*CatalogUpsert)) *CatalogUpsertOne

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

func (*CatalogUpsertOne) UpdateAnnotations

func (u *CatalogUpsertOne) UpdateAnnotations() *CatalogUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*CatalogUpsertOne) UpdateDescription

func (u *CatalogUpsertOne) UpdateDescription() *CatalogUpsertOne

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

func (*CatalogUpsertOne) UpdateFilterPattern added in v0.6.0

func (u *CatalogUpsertOne) UpdateFilterPattern() *CatalogUpsertOne

UpdateFilterPattern sets the "filter_pattern" field to the value that was provided on create.

func (*CatalogUpsertOne) UpdateLabels

func (u *CatalogUpsertOne) UpdateLabels() *CatalogUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*CatalogUpsertOne) UpdateNewValues

func (u *CatalogUpsertOne) UpdateNewValues() *CatalogUpsertOne

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

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

func (*CatalogUpsertOne) UpdateStatus

func (u *CatalogUpsertOne) UpdateStatus() *CatalogUpsertOne

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

func (*CatalogUpsertOne) UpdateSync

func (u *CatalogUpsertOne) UpdateSync() *CatalogUpsertOne

UpdateSync sets the "sync" field to the value that was provided on create.

func (*CatalogUpsertOne) UpdateUpdateTime

func (u *CatalogUpsertOne) UpdateUpdateTime() *CatalogUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Catalogs

type Catalogs []*Catalog

Catalogs is a parsable slice of Catalog.

func (Catalogs) View

func (_cs Catalogs) View() []*CatalogOutput

View returns the output of Catalog entities.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Catalog is the client for interacting with the Catalog builders.
	Catalog *CatalogClient
	// Connector is the client for interacting with the Connector builders.
	Connector *ConnectorClient
	// CostReport is the client for interacting with the CostReport builders.
	CostReport *CostReportClient
	// DistributeLock is the client for interacting with the DistributeLock builders.
	DistributeLock *DistributeLockClient
	// Environment is the client for interacting with the Environment builders.
	Environment *EnvironmentClient
	// EnvironmentConnectorRelationship is the client for interacting with the EnvironmentConnectorRelationship builders.
	EnvironmentConnectorRelationship *EnvironmentConnectorRelationshipClient
	// Perspective is the client for interacting with the Perspective builders.
	Perspective *PerspectiveClient
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// Resource is the client for interacting with the Resource builders.
	Resource *ResourceClient
	// ResourceComponent is the client for interacting with the ResourceComponent builders.
	ResourceComponent *ResourceComponentClient
	// ResourceComponentRelationship is the client for interacting with the ResourceComponentRelationship builders.
	ResourceComponentRelationship *ResourceComponentRelationshipClient
	// ResourceDefinition is the client for interacting with the ResourceDefinition builders.
	ResourceDefinition *ResourceDefinitionClient
	// ResourceDefinitionMatchingRule is the client for interacting with the ResourceDefinitionMatchingRule builders.
	ResourceDefinitionMatchingRule *ResourceDefinitionMatchingRuleClient
	// ResourceRelationship is the client for interacting with the ResourceRelationship builders.
	ResourceRelationship *ResourceRelationshipClient
	// ResourceRun is the client for interacting with the ResourceRun builders.
	ResourceRun *ResourceRunClient
	// ResourceState is the client for interacting with the ResourceState builders.
	ResourceState *ResourceStateClient
	// Role is the client for interacting with the Role builders.
	Role *RoleClient
	// Setting is the client for interacting with the Setting builders.
	Setting *SettingClient
	// Subject is the client for interacting with the Subject builders.
	Subject *SubjectClient
	// SubjectRoleRelationship is the client for interacting with the SubjectRoleRelationship builders.
	SubjectRoleRelationship *SubjectRoleRelationshipClient
	// Template is the client for interacting with the Template builders.
	Template *TemplateClient
	// TemplateVersion is the client for interacting with the TemplateVersion builders.
	TemplateVersion *TemplateVersionClient
	// Token is the client for interacting with the Token builders.
	Token *TokenClient
	// Variable is the client for interacting with the Variable builders.
	Variable *VariableClient
	// Workflow is the client for interacting with the Workflow builders.
	Workflow *WorkflowClient
	// WorkflowExecution is the client for interacting with the WorkflowExecution builders.
	WorkflowExecution *WorkflowExecutionClient
	// WorkflowStage is the client for interacting with the WorkflowStage builders.
	WorkflowStage *WorkflowStageClient
	// WorkflowStageExecution is the client for interacting with the WorkflowStageExecution builders.
	WorkflowStageExecution *WorkflowStageExecutionClient
	// WorkflowStep is the client for interacting with the WorkflowStep builders.
	WorkflowStep *WorkflowStepClient
	// WorkflowStepExecution is the client for interacting with the WorkflowStepExecution builders.
	WorkflowStepExecution *WorkflowStepExecutionClient
	// 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) Catalogs

func (c *Client) Catalogs() *CatalogClient

Catalogs implements the ClientSet.

func (*Client) Close

func (c *Client) Close() error

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

func (*Client) Connectors

func (c *Client) Connectors() *ConnectorClient

Connectors implements the ClientSet.

func (*Client) CostReports

func (c *Client) CostReports() *CostReportClient

CostReports implements the ClientSet.

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().
	Catalog.
	Query().
	Count(ctx)

func (*Client) Dialect

func (c *Client) Dialect() string

Dialect returns the dialect name of the driver.

func (*Client) DistributeLocks

func (c *Client) DistributeLocks() *DistributeLockClient

DistributeLocks implements the ClientSet.

func (*Client) EnvironmentConnectorRelationships

func (c *Client) EnvironmentConnectorRelationships() *EnvironmentConnectorRelationshipClient

EnvironmentConnectorRelationships implements the ClientSet.

func (*Client) Environments

func (c *Client) Environments() *EnvironmentClient

Environments implements the ClientSet.

func (*Client) ExecContext

func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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

func (c *Client) Perspectives() *PerspectiveClient

Perspectives implements the ClientSet.

func (*Client) Projects

func (c *Client) Projects() *ProjectClient

Projects implements the ClientSet.

func (*Client) QueryContext

func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Client) ResourceComponentRelationships added in v0.4.0

func (c *Client) ResourceComponentRelationships() *ResourceComponentRelationshipClient

ResourceComponentRelationships implements the ClientSet.

func (*Client) ResourceComponents added in v0.4.0

func (c *Client) ResourceComponents() *ResourceComponentClient

ResourceComponents implements the ClientSet.

func (*Client) ResourceDefinitionMatchingRules added in v0.4.0

func (c *Client) ResourceDefinitionMatchingRules() *ResourceDefinitionMatchingRuleClient

ResourceDefinitionMatchingRules implements the ClientSet.

func (*Client) ResourceDefinitions added in v0.4.0

func (c *Client) ResourceDefinitions() *ResourceDefinitionClient

ResourceDefinitions implements the ClientSet.

func (*Client) ResourceRelationships added in v0.4.0

func (c *Client) ResourceRelationships() *ResourceRelationshipClient

ResourceRelationships implements the ClientSet.

func (*Client) ResourceRuns added in v0.6.0

func (c *Client) ResourceRuns() *ResourceRunClient

ResourceRuns implements the ClientSet.

func (*Client) ResourceStates added in v0.6.0

func (c *Client) ResourceStates() *ResourceStateClient

ResourceStates implements the ClientSet.

func (*Client) Resources added in v0.4.0

func (c *Client) Resources() *ResourceClient

Resources implements the ClientSet.

func (*Client) Roles

func (c *Client) Roles() *RoleClient

Roles implements the ClientSet.

func (*Client) Settings

func (c *Client) Settings() *SettingClient

Settings implements the ClientSet.

func (*Client) SubjectRoleRelationships

func (c *Client) SubjectRoleRelationships() *SubjectRoleRelationshipClient

SubjectRoleRelationships implements the ClientSet.

func (*Client) Subjects

func (c *Client) Subjects() *SubjectClient

Subjects implements the ClientSet.

func (*Client) TemplateVersions

func (c *Client) TemplateVersions() *TemplateVersionClient

TemplateVersions implements the ClientSet.

func (*Client) Templates

func (c *Client) Templates() *TemplateClient

Templates implements the ClientSet.

func (*Client) Tokens

func (c *Client) Tokens() *TokenClient

Tokens implements the ClientSet.

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(...)`.

func (*Client) Variables

func (c *Client) Variables() *VariableClient

Variables implements the ClientSet.

func (*Client) WithDebug

func (c *Client) WithDebug() ClientSet

WithDebug enables the debug mode of the client.

func (*Client) WithTx

func (c *Client) WithTx(ctx context.Context, fn func(tx *Tx) error) (err error)

WithTx gives a new transactional client in the callback function, if already in a transaction, this will keep in the same transaction.

func (*Client) WorkflowExecutions added in v0.4.0

func (c *Client) WorkflowExecutions() *WorkflowExecutionClient

WorkflowExecutions implements the ClientSet.

func (*Client) WorkflowStageExecutions added in v0.4.0

func (c *Client) WorkflowStageExecutions() *WorkflowStageExecutionClient

WorkflowStageExecutions implements the ClientSet.

func (*Client) WorkflowStages added in v0.4.0

func (c *Client) WorkflowStages() *WorkflowStageClient

WorkflowStages implements the ClientSet.

func (*Client) WorkflowStepExecutions added in v0.4.0

func (c *Client) WorkflowStepExecutions() *WorkflowStepExecutionClient

WorkflowStepExecutions implements the ClientSet.

func (*Client) WorkflowSteps added in v0.4.0

func (c *Client) WorkflowSteps() *WorkflowStepClient

WorkflowSteps implements the ClientSet.

func (*Client) Workflows added in v0.4.0

func (c *Client) Workflows() *WorkflowClient

Workflows implements the ClientSet.

type ClientSet

type ClientSet interface {
	// Catalogs returns the client for interacting with the Catalog builders.
	Catalogs() *CatalogClient

	// Connectors returns the client for interacting with the Connector builders.
	Connectors() *ConnectorClient

	// CostReports returns the client for interacting with the CostReport builders.
	CostReports() *CostReportClient

	// DistributeLocks returns the client for interacting with the DistributeLock builders.
	DistributeLocks() *DistributeLockClient

	// Environments returns the client for interacting with the Environment builders.
	Environments() *EnvironmentClient

	// EnvironmentConnectorRelationships returns the client for interacting with the EnvironmentConnectorRelationship builders.
	EnvironmentConnectorRelationships() *EnvironmentConnectorRelationshipClient

	// Perspectives returns the client for interacting with the Perspective builders.
	Perspectives() *PerspectiveClient

	// Projects returns the client for interacting with the Project builders.
	Projects() *ProjectClient

	// Resources returns the client for interacting with the Resource builders.
	Resources() *ResourceClient

	// ResourceComponents returns the client for interacting with the ResourceComponent builders.
	ResourceComponents() *ResourceComponentClient

	// ResourceComponentRelationships returns the client for interacting with the ResourceComponentRelationship builders.
	ResourceComponentRelationships() *ResourceComponentRelationshipClient

	// ResourceDefinitions returns the client for interacting with the ResourceDefinition builders.
	ResourceDefinitions() *ResourceDefinitionClient

	// ResourceDefinitionMatchingRules returns the client for interacting with the ResourceDefinitionMatchingRule builders.
	ResourceDefinitionMatchingRules() *ResourceDefinitionMatchingRuleClient

	// ResourceRelationships returns the client for interacting with the ResourceRelationship builders.
	ResourceRelationships() *ResourceRelationshipClient

	// ResourceRuns returns the client for interacting with the ResourceRun builders.
	ResourceRuns() *ResourceRunClient

	// ResourceStates returns the client for interacting with the ResourceState builders.
	ResourceStates() *ResourceStateClient

	// Roles returns the client for interacting with the Role builders.
	Roles() *RoleClient

	// Settings returns the client for interacting with the Setting builders.
	Settings() *SettingClient

	// Subjects returns the client for interacting with the Subject builders.
	Subjects() *SubjectClient

	// SubjectRoleRelationships returns the client for interacting with the SubjectRoleRelationship builders.
	SubjectRoleRelationships() *SubjectRoleRelationshipClient

	// Templates returns the client for interacting with the Template builders.
	Templates() *TemplateClient

	// TemplateVersions returns the client for interacting with the TemplateVersion builders.
	TemplateVersions() *TemplateVersionClient

	// Tokens returns the client for interacting with the Token builders.
	Tokens() *TokenClient

	// Variables returns the client for interacting with the Variable builders.
	Variables() *VariableClient

	// Workflows returns the client for interacting with the Workflow builders.
	Workflows() *WorkflowClient

	// WorkflowExecutions returns the client for interacting with the WorkflowExecution builders.
	WorkflowExecutions() *WorkflowExecutionClient

	// WorkflowStages returns the client for interacting with the WorkflowStage builders.
	WorkflowStages() *WorkflowStageClient

	// WorkflowStageExecutions returns the client for interacting with the WorkflowStageExecution builders.
	WorkflowStageExecutions() *WorkflowStageExecutionClient

	// WorkflowSteps returns the client for interacting with the WorkflowStep builders.
	WorkflowSteps() *WorkflowStepClient

	// WorkflowStepExecutions returns the client for interacting with the WorkflowStepExecution builders.
	WorkflowStepExecutions() *WorkflowStepExecutionClient

	// Dialect returns the dialect name of the driver.
	Dialect() string

	// Use adds the mutation hooks to all the entity clients.
	Use(...Hook)

	// Intercept adds the query interceptors to all the entity clients.
	Intercept(...Interceptor)

	// WithDebug returns the debug mode of the client.
	WithDebug() ClientSet

	// WithTx gives a new transactional client in the callback function,
	// if already in a transaction, this will keep in the same transaction.
	WithTx(context.Context, func(tx *Tx) error) error
}

ClientSet is an interface that allows getting all clients.

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 Connector

type Connector struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `json:"status,omitempty"`
	// ID of the project to belong, empty means for all projects.
	ProjectID object.ID `json:"project_id,omitempty"`
	// Category of the connector.
	Category string `json:"category,omitempty,cli-table-column"`
	// Type of the connector.
	Type string `json:"type,omitempty,cli-table-column"`
	// Environment type of the connector to apply.
	ApplicableEnvironmentType string `json:"applicable_environment_type,omitempty"`
	// Connector config version.
	ConfigVersion string `json:"config_version,omitempty"`
	// Connector config data.
	ConfigData crypto.Properties `json:"config_data,omitempty"`
	// Config whether enable finOps, will install prometheus and opencost while enable.
	EnableFinOps bool `json:"enable_fin_ops,omitempty"`
	// Custom pricing user defined.
	FinOpsCustomPricing *types.FinOpsCustomPricing `json:"fin_ops_custom_pricing,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ConnectorQuery when eager-loading is set.
	Edges ConnectorEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

Connector is the model entity for the Connector schema.

func (*Connector) ExecContext

func (c *Connector) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Connector) QueryContext

func (c *Connector) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Connector) QueryCostReports

func (c *Connector) QueryCostReports() *CostReportQuery

QueryCostReports queries the "cost_reports" edge of the Connector entity.

func (*Connector) QueryEnvironments

func (c *Connector) QueryEnvironments() *EnvironmentConnectorRelationshipQuery

QueryEnvironments queries the "environments" edge of the Connector entity.

func (*Connector) QueryProject

func (c *Connector) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Connector entity.

func (*Connector) QueryResourceComponents added in v0.4.0

func (c *Connector) QueryResourceComponents() *ResourceComponentQuery

QueryResourceComponents queries the "resource_components" edge of the Connector entity.

func (*Connector) String

func (c *Connector) String() string

String implements the fmt.Stringer.

func (*Connector) Unwrap

func (c *Connector) Unwrap() *Connector

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

func (c *Connector) Update() *ConnectorUpdateOne

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

func (*Connector) Value

func (c *Connector) Value(name string) (ent.Value, error)

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

func (*Connector) View

func (_c *Connector) View() *ConnectorOutput

View returns the output of Connector entity.

type ConnectorClient

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

ConnectorClient is a client for the Connector schema.

func NewConnectorClient

func NewConnectorClient(c config) *ConnectorClient

NewConnectorClient returns a client for the Connector from the given config.

func (*ConnectorClient) Create

func (c *ConnectorClient) Create() *ConnectorCreate

Create returns a builder for creating a Connector entity.

func (*ConnectorClient) CreateBulk

func (c *ConnectorClient) CreateBulk(builders ...*ConnectorCreate) *ConnectorCreateBulk

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

func (*ConnectorClient) Delete

func (c *ConnectorClient) Delete() *ConnectorDelete

Delete returns a delete builder for Connector.

func (*ConnectorClient) DeleteOne

func (c *ConnectorClient) DeleteOne(co *Connector) *ConnectorDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ConnectorClient) DeleteOneID

func (c *ConnectorClient) DeleteOneID(id object.ID) *ConnectorDeleteOne

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

func (*ConnectorClient) ExecContext

func (c *ConnectorClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ConnectorClient) Get

func (c *ConnectorClient) Get(ctx context.Context, id object.ID) (*Connector, error)

Get returns a Connector entity by its id.

func (*ConnectorClient) GetX

func (c *ConnectorClient) GetX(ctx context.Context, id object.ID) *Connector

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

func (*ConnectorClient) Hooks

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

Hooks returns the client hooks.

func (*ConnectorClient) Intercept

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

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

func (*ConnectorClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ConnectorClient) MapCreateBulk added in v0.5.0

func (c *ConnectorClient) MapCreateBulk(slice any, setFunc func(*ConnectorCreate, int)) *ConnectorCreateBulk

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

func (c *ConnectorClient) Query() *ConnectorQuery

Query returns a query builder for Connector.

func (*ConnectorClient) QueryContext

func (c *ConnectorClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ConnectorClient) QueryCostReports

func (c *ConnectorClient) QueryCostReports(co *Connector) *CostReportQuery

QueryCostReports queries the cost_reports edge of a Connector.

func (*ConnectorClient) QueryEnvironments

QueryEnvironments queries the environments edge of a Connector.

func (*ConnectorClient) QueryProject

func (c *ConnectorClient) QueryProject(co *Connector) *ProjectQuery

QueryProject queries the project edge of a Connector.

func (*ConnectorClient) QueryResourceComponents added in v0.4.0

func (c *ConnectorClient) QueryResourceComponents(co *Connector) *ResourceComponentQuery

QueryResourceComponents queries the resource_components edge of a Connector.

func (*ConnectorClient) Update

func (c *ConnectorClient) Update() *ConnectorUpdate

Update returns an update builder for Connector.

func (*ConnectorClient) UpdateOne

func (c *ConnectorClient) UpdateOne(co *Connector) *ConnectorUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ConnectorClient) UpdateOneID

func (c *ConnectorClient) UpdateOneID(id object.ID) *ConnectorUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ConnectorClient) Use

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

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

type ConnectorClientGetter

type ConnectorClientGetter interface {
	// Connectors returns the client for interacting with the Connector builders.
	Connectors() *ConnectorClient
}

ConnectorClientGetter is an interface that allows getting ConnectorClient.

type ConnectorCreate

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

ConnectorCreate is the builder for creating a Connector entity.

func (*ConnectorCreate) AddCostReportIDs

func (cc *ConnectorCreate) AddCostReportIDs(ids ...int) *ConnectorCreate

AddCostReportIDs adds the "cost_reports" edge to the CostReport entity by IDs.

func (*ConnectorCreate) AddCostReports

func (cc *ConnectorCreate) AddCostReports(c ...*CostReport) *ConnectorCreate

AddCostReports adds the "cost_reports" edges to the CostReport entity.

func (*ConnectorCreate) AddEnvironmentIDs

func (cc *ConnectorCreate) AddEnvironmentIDs(ids ...object.ID) *ConnectorCreate

AddEnvironmentIDs adds the "environments" edge to the EnvironmentConnectorRelationship entity by IDs.

func (*ConnectorCreate) AddEnvironments

AddEnvironments adds the "environments" edges to the EnvironmentConnectorRelationship entity.

func (*ConnectorCreate) AddResourceComponentIDs added in v0.4.0

func (cc *ConnectorCreate) AddResourceComponentIDs(ids ...object.ID) *ConnectorCreate

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by IDs.

func (*ConnectorCreate) AddResourceComponents added in v0.4.0

func (cc *ConnectorCreate) AddResourceComponents(r ...*ResourceComponent) *ConnectorCreate

AddResourceComponents adds the "resource_components" edges to the ResourceComponent entity.

func (*ConnectorCreate) Exec

func (cc *ConnectorCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConnectorCreate) ExecContext

func (c *ConnectorCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ConnectorCreate) ExecE

func (cc *ConnectorCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Connector) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ConnectorCreate) ExecEX

func (cc *ConnectorCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Connector) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ConnectorCreate) ExecX

func (cc *ConnectorCreate) ExecX(ctx context.Context)

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

func (*ConnectorCreate) Mutation

func (cc *ConnectorCreate) Mutation() *ConnectorMutation

Mutation returns the ConnectorMutation object of the builder.

func (*ConnectorCreate) OnConflict

func (cc *ConnectorCreate) OnConflict(opts ...sql.ConflictOption) *ConnectorUpsertOne

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

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

func (*ConnectorCreate) OnConflictColumns

func (cc *ConnectorCreate) OnConflictColumns(columns ...string) *ConnectorUpsertOne

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

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

func (*ConnectorCreate) QueryContext

func (c *ConnectorCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ConnectorCreate) Save

func (cc *ConnectorCreate) Save(ctx context.Context) (*Connector, error)

Save creates the Connector in the database.

func (*ConnectorCreate) SaveE

func (cc *ConnectorCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Connector) error) (*Connector, error)

SaveE calls the given function after created the Connector entity, which is always good for cascading create operations.

func (*ConnectorCreate) SaveEX

func (cc *ConnectorCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Connector) error) *Connector

SaveEX is like SaveE, but panics if an error occurs.

func (*ConnectorCreate) SaveX

func (cc *ConnectorCreate) SaveX(ctx context.Context) *Connector

SaveX calls Save and panics if Save returns an error.

func (*ConnectorCreate) Set

func (cc *ConnectorCreate) Set(obj *Connector) *ConnectorCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ConnectorCreate) SetAnnotations

func (cc *ConnectorCreate) SetAnnotations(m map[string]string) *ConnectorCreate

SetAnnotations sets the "annotations" field.

func (*ConnectorCreate) SetApplicableEnvironmentType added in v0.4.0

func (cc *ConnectorCreate) SetApplicableEnvironmentType(s string) *ConnectorCreate

SetApplicableEnvironmentType sets the "applicable_environment_type" field.

func (*ConnectorCreate) SetCategory

func (cc *ConnectorCreate) SetCategory(s string) *ConnectorCreate

SetCategory sets the "category" field.

func (*ConnectorCreate) SetConfigData

func (cc *ConnectorCreate) SetConfigData(c crypto.Properties) *ConnectorCreate

SetConfigData sets the "config_data" field.

func (*ConnectorCreate) SetConfigVersion

func (cc *ConnectorCreate) SetConfigVersion(s string) *ConnectorCreate

SetConfigVersion sets the "config_version" field.

func (*ConnectorCreate) SetCreateTime

func (cc *ConnectorCreate) SetCreateTime(t time.Time) *ConnectorCreate

SetCreateTime sets the "create_time" field.

func (*ConnectorCreate) SetDescription

func (cc *ConnectorCreate) SetDescription(s string) *ConnectorCreate

SetDescription sets the "description" field.

func (*ConnectorCreate) SetEnableFinOps

func (cc *ConnectorCreate) SetEnableFinOps(b bool) *ConnectorCreate

SetEnableFinOps sets the "enable_fin_ops" field.

func (*ConnectorCreate) SetFinOpsCustomPricing

func (cc *ConnectorCreate) SetFinOpsCustomPricing(tocp *types.FinOpsCustomPricing) *ConnectorCreate

SetFinOpsCustomPricing sets the "fin_ops_custom_pricing" field.

func (*ConnectorCreate) SetID

func (cc *ConnectorCreate) SetID(o object.ID) *ConnectorCreate

SetID sets the "id" field.

func (*ConnectorCreate) SetLabels

func (cc *ConnectorCreate) SetLabels(m map[string]string) *ConnectorCreate

SetLabels sets the "labels" field.

func (*ConnectorCreate) SetName

func (cc *ConnectorCreate) SetName(s string) *ConnectorCreate

SetName sets the "name" field.

func (*ConnectorCreate) SetNillableCreateTime

func (cc *ConnectorCreate) SetNillableCreateTime(t *time.Time) *ConnectorCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ConnectorCreate) SetNillableDescription

func (cc *ConnectorCreate) SetNillableDescription(s *string) *ConnectorCreate

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

func (*ConnectorCreate) SetNillableProjectID

func (cc *ConnectorCreate) SetNillableProjectID(o *object.ID) *ConnectorCreate

SetNillableProjectID sets the "project_id" field if the given value is not nil.

func (*ConnectorCreate) SetNillableStatus

func (cc *ConnectorCreate) SetNillableStatus(s *status.Status) *ConnectorCreate

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

func (*ConnectorCreate) SetNillableUpdateTime

func (cc *ConnectorCreate) SetNillableUpdateTime(t *time.Time) *ConnectorCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*ConnectorCreate) SetProject

func (cc *ConnectorCreate) SetProject(p *Project) *ConnectorCreate

SetProject sets the "project" edge to the Project entity.

func (*ConnectorCreate) SetProjectID

func (cc *ConnectorCreate) SetProjectID(o object.ID) *ConnectorCreate

SetProjectID sets the "project_id" field.

func (*ConnectorCreate) SetStatus

func (cc *ConnectorCreate) SetStatus(s status.Status) *ConnectorCreate

SetStatus sets the "status" field.

func (*ConnectorCreate) SetType

func (cc *ConnectorCreate) SetType(s string) *ConnectorCreate

SetType sets the "type" field.

func (*ConnectorCreate) SetUpdateTime

func (cc *ConnectorCreate) SetUpdateTime(t time.Time) *ConnectorCreate

SetUpdateTime sets the "update_time" field.

type ConnectorCreateBulk

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

ConnectorCreateBulk is the builder for creating many Connector entities in bulk.

func (*ConnectorCreateBulk) Exec

func (ccb *ConnectorCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ConnectorCreateBulk) ExecContext

func (c *ConnectorCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ConnectorCreateBulk) ExecE

func (ccb *ConnectorCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Connector) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ConnectorCreateBulk) ExecEX

func (ccb *ConnectorCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Connector) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ConnectorCreateBulk) ExecX

func (ccb *ConnectorCreateBulk) ExecX(ctx context.Context)

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

func (*ConnectorCreateBulk) OnConflict

func (ccb *ConnectorCreateBulk) OnConflict(opts ...sql.ConflictOption) *ConnectorUpsertBulk

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

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

func (*ConnectorCreateBulk) OnConflictColumns

func (ccb *ConnectorCreateBulk) OnConflictColumns(columns ...string) *ConnectorUpsertBulk

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

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

func (*ConnectorCreateBulk) QueryContext

func (c *ConnectorCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ConnectorCreateBulk) Save

func (ccb *ConnectorCreateBulk) Save(ctx context.Context) ([]*Connector, error)

Save creates the Connector entities in the database.

func (*ConnectorCreateBulk) SaveE

func (ccb *ConnectorCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Connector) error) ([]*Connector, error)

SaveE calls the given function after created the Connector entities, which is always good for cascading create operations.

func (*ConnectorCreateBulk) SaveEX

func (ccb *ConnectorCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Connector) error) []*Connector

SaveEX is like SaveE, but panics if an error occurs.

func (*ConnectorCreateBulk) SaveX

func (ccb *ConnectorCreateBulk) SaveX(ctx context.Context) []*Connector

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

func (*ConnectorCreateBulk) Set

Set leverages the ConnectorCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ConnectorCreateInput

type ConnectorCreateInput struct {

	// Project indicates to create Connector entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Config whether enable finOps, will install prometheus and opencost while enable.
	EnableFinOps bool `path:"-" query:"-" json:"enableFinOps"`
	// Connector config version.
	ConfigVersion string `path:"-" query:"-" json:"configVersion"`
	// Environment type of the connector to apply.
	ApplicableEnvironmentType string `path:"-" query:"-" json:"applicableEnvironmentType"`
	// Type of the connector.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Category of the connector.
	Category string `path:"-" query:"-" json:"category,cli-table-column"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Connector config data.
	ConfigData crypto.Properties `path:"-" query:"-" json:"configData,omitempty"`
	// Custom pricing user defined.
	FinOpsCustomPricing *types.FinOpsCustomPricing `path:"-" query:"-" json:"finOpsCustomPricing,omitempty"`
	// contains filtered or unexported fields
}

ConnectorCreateInput holds the creation input of the Connector entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ConnectorCreateInput) Model

func (cci *ConnectorCreateInput) Model() *Connector

Model returns the Connector entity for creating, after validating.

func (*ConnectorCreateInput) SetGinContext

func (ic *ConnectorCreateInput) SetGinContext(ctx *gin.Context)

func (*ConnectorCreateInput) SetModelClient

func (ic *ConnectorCreateInput) SetModelClient(cli *Client)

func (*ConnectorCreateInput) Validate

func (cci *ConnectorCreateInput) Validate() error

Validate checks the ConnectorCreateInput entity.

func (*ConnectorCreateInput) ValidateWith

func (cci *ConnectorCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorCreateInput entity with the given context and client set.

type ConnectorCreateInputs

type ConnectorCreateInputs struct {

	// Project indicates to create Connector entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ConnectorCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ConnectorCreateInputs holds the creation input of the Connector entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ConnectorCreateInputs) Model

func (cci *ConnectorCreateInputs) Model() []*Connector

Model returns the Connector entities for creating, after validating.

func (*ConnectorCreateInputs) SetGinContext

func (ic *ConnectorCreateInputs) SetGinContext(ctx *gin.Context)

func (*ConnectorCreateInputs) SetModelClient

func (ic *ConnectorCreateInputs) SetModelClient(cli *Client)

func (*ConnectorCreateInputs) Validate

func (cci *ConnectorCreateInputs) Validate() error

Validate checks the ConnectorCreateInputs entity .

func (*ConnectorCreateInputs) ValidateWith

func (cci *ConnectorCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorCreateInputs entity with the given context and client set.

type ConnectorCreateInputsItem

type ConnectorCreateInputsItem struct {
	// Config whether enable finOps, will install prometheus and opencost while enable.
	EnableFinOps bool `path:"-" query:"-" json:"enableFinOps"`
	// Connector config version.
	ConfigVersion string `path:"-" query:"-" json:"configVersion"`
	// Environment type of the connector to apply.
	ApplicableEnvironmentType string `path:"-" query:"-" json:"applicableEnvironmentType"`
	// Type of the connector.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Category of the connector.
	Category string `path:"-" query:"-" json:"category,cli-table-column"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Connector config data.
	ConfigData crypto.Properties `path:"-" query:"-" json:"configData,omitempty"`
	// Custom pricing user defined.
	FinOpsCustomPricing *types.FinOpsCustomPricing `path:"-" query:"-" json:"finOpsCustomPricing,omitempty"`
}

ConnectorCreateInputs holds the creation input item of the Connector entities.

func (*ConnectorCreateInputsItem) ValidateWith

func (cci *ConnectorCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorCreateInputsItem entity with the given context and client set.

type ConnectorDelete

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

ConnectorDelete is the builder for deleting a Connector entity.

func (*ConnectorDelete) Exec

func (cd *ConnectorDelete) Exec(ctx context.Context) (int, error)

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

func (*ConnectorDelete) ExecContext

func (c *ConnectorDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ConnectorDelete) ExecX

func (cd *ConnectorDelete) ExecX(ctx context.Context) int

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

func (*ConnectorDelete) QueryContext

func (c *ConnectorDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ConnectorDelete) Where

Where appends a list predicates to the ConnectorDelete builder.

type ConnectorDeleteInput

type ConnectorDeleteInput struct {
	ConnectorQueryInput `path:",inline"`
}

ConnectorDeleteInput holds the deletion input of the Connector entity, please tags with `path:",inline"` if embedding.

func (*ConnectorDeleteInput) SetGinContext

func (ic *ConnectorDeleteInput) SetGinContext(ctx *gin.Context)

func (*ConnectorDeleteInput) SetModelClient

func (ic *ConnectorDeleteInput) SetModelClient(cli *Client)

type ConnectorDeleteInputs

type ConnectorDeleteInputs struct {

	// Project indicates to delete Connector entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ConnectorDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ConnectorDeleteInputs holds the deletion input of the Connector entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ConnectorDeleteInputs) IDs

func (cdi *ConnectorDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Connector entities for deleting, after validating.

func (*ConnectorDeleteInputs) Model

func (cdi *ConnectorDeleteInputs) Model() []*Connector

Model returns the Connector entities for deleting, after validating.

func (*ConnectorDeleteInputs) SetGinContext

func (ic *ConnectorDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ConnectorDeleteInputs) SetModelClient

func (ic *ConnectorDeleteInputs) SetModelClient(cli *Client)

func (*ConnectorDeleteInputs) Validate

func (cdi *ConnectorDeleteInputs) Validate() error

Validate checks the ConnectorDeleteInputs entity.

func (*ConnectorDeleteInputs) ValidateWith

func (cdi *ConnectorDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorDeleteInputs entity with the given context and client set.

type ConnectorDeleteInputsItem

type ConnectorDeleteInputsItem struct {
	// ID of the Connector entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Connector entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

ConnectorDeleteInputs holds the deletion input item of the Connector entities.

type ConnectorDeleteOne

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

ConnectorDeleteOne is the builder for deleting a single Connector entity.

func (*ConnectorDeleteOne) Exec

func (cdo *ConnectorDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ConnectorDeleteOne) ExecX

func (cdo *ConnectorDeleteOne) ExecX(ctx context.Context)

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

func (*ConnectorDeleteOne) Where

Where appends a list predicates to the ConnectorDelete builder.

type ConnectorEdges

type ConnectorEdges struct {
	// Project to which the connector belongs.
	Project *Project `json:"project,omitempty"`
	// Environments holds the value of the environments edge.
	Environments []*EnvironmentConnectorRelationship `json:"environments,omitempty"`
	// ResourceComponents that use the connector.
	ResourceComponents []*ResourceComponent `json:"resource_components,omitempty"`
	// CostReports that linked to the connection.
	CostReports []*CostReport `json:"cost_reports,omitempty"`
	// contains filtered or unexported fields
}

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

func (ConnectorEdges) CostReportsOrErr

func (e ConnectorEdges) CostReportsOrErr() ([]*CostReport, error)

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

func (ConnectorEdges) EnvironmentsOrErr

func (e ConnectorEdges) EnvironmentsOrErr() ([]*EnvironmentConnectorRelationship, error)

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

func (ConnectorEdges) ProjectOrErr

func (e ConnectorEdges) ProjectOrErr() (*Project, error)

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

func (ConnectorEdges) ResourceComponentsOrErr added in v0.4.0

func (e ConnectorEdges) ResourceComponentsOrErr() ([]*ResourceComponent, error)

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

type ConnectorGroupBy

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

ConnectorGroupBy is the group-by builder for Connector entities.

func (*ConnectorGroupBy) Aggregate

func (cgb *ConnectorGroupBy) Aggregate(fns ...AggregateFunc) *ConnectorGroupBy

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

func (*ConnectorGroupBy) Bool

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

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

func (*ConnectorGroupBy) BoolX

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

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

func (*ConnectorGroupBy) Bools

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

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

func (*ConnectorGroupBy) BoolsX

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

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

func (*ConnectorGroupBy) Float64

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

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

func (*ConnectorGroupBy) Float64X

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

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

func (*ConnectorGroupBy) Float64s

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

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

func (*ConnectorGroupBy) Float64sX

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

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

func (*ConnectorGroupBy) Int

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

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

func (*ConnectorGroupBy) IntX

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

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

func (*ConnectorGroupBy) Ints

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

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

func (*ConnectorGroupBy) IntsX

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

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

func (*ConnectorGroupBy) Scan

func (cgb *ConnectorGroupBy) Scan(ctx context.Context, v any) error

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

func (*ConnectorGroupBy) ScanX

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

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

func (*ConnectorGroupBy) String

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

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

func (*ConnectorGroupBy) StringX

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

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

func (*ConnectorGroupBy) Strings

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

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

func (*ConnectorGroupBy) StringsX

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

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

type ConnectorMutation

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

ConnectorMutation represents an operation that mutates the Connector nodes in the graph.

func (*ConnectorMutation) AddCostReportIDs

func (m *ConnectorMutation) AddCostReportIDs(ids ...int)

AddCostReportIDs adds the "cost_reports" edge to the CostReport entity by ids.

func (*ConnectorMutation) AddEnvironmentIDs

func (m *ConnectorMutation) AddEnvironmentIDs(ids ...object.ID)

AddEnvironmentIDs adds the "environments" edge to the EnvironmentConnectorRelationship entity by ids.

func (*ConnectorMutation) AddField

func (m *ConnectorMutation) 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 (*ConnectorMutation) AddResourceComponentIDs added in v0.4.0

func (m *ConnectorMutation) AddResourceComponentIDs(ids ...object.ID)

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by ids.

func (*ConnectorMutation) AddedEdges

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

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

func (*ConnectorMutation) AddedField

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

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

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

func (*ConnectorMutation) AddedIDs

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

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

func (*ConnectorMutation) Annotations

func (m *ConnectorMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*ConnectorMutation) AnnotationsCleared

func (m *ConnectorMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*ConnectorMutation) ApplicableEnvironmentType added in v0.4.0

func (m *ConnectorMutation) ApplicableEnvironmentType() (r string, exists bool)

ApplicableEnvironmentType returns the value of the "applicable_environment_type" field in the mutation.

func (*ConnectorMutation) Category

func (m *ConnectorMutation) Category() (r string, exists bool)

Category returns the value of the "category" field in the mutation.

func (*ConnectorMutation) ClearAnnotations

func (m *ConnectorMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*ConnectorMutation) ClearConfigData

func (m *ConnectorMutation) ClearConfigData()

ClearConfigData clears the value of the "config_data" field.

func (*ConnectorMutation) ClearCostReports

func (m *ConnectorMutation) ClearCostReports()

ClearCostReports clears the "cost_reports" edge to the CostReport entity.

func (*ConnectorMutation) ClearDescription

func (m *ConnectorMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*ConnectorMutation) ClearEdge

func (m *ConnectorMutation) 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 (*ConnectorMutation) ClearEnvironments

func (m *ConnectorMutation) ClearEnvironments()

ClearEnvironments clears the "environments" edge to the EnvironmentConnectorRelationship entity.

func (*ConnectorMutation) ClearField

func (m *ConnectorMutation) 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 (*ConnectorMutation) ClearFinOpsCustomPricing

func (m *ConnectorMutation) ClearFinOpsCustomPricing()

ClearFinOpsCustomPricing clears the value of the "fin_ops_custom_pricing" field.

func (*ConnectorMutation) ClearLabels

func (m *ConnectorMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*ConnectorMutation) ClearProject

func (m *ConnectorMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*ConnectorMutation) ClearProjectID

func (m *ConnectorMutation) ClearProjectID()

ClearProjectID clears the value of the "project_id" field.

func (*ConnectorMutation) ClearResourceComponents added in v0.4.0

func (m *ConnectorMutation) ClearResourceComponents()

ClearResourceComponents clears the "resource_components" edge to the ResourceComponent entity.

func (*ConnectorMutation) ClearStatus

func (m *ConnectorMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*ConnectorMutation) ClearedEdges

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

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

func (*ConnectorMutation) ClearedFields

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

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

func (ConnectorMutation) Client

func (m ConnectorMutation) 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 (*ConnectorMutation) ConfigData

func (m *ConnectorMutation) ConfigData() (r crypto.Properties, exists bool)

ConfigData returns the value of the "config_data" field in the mutation.

func (*ConnectorMutation) ConfigDataCleared

func (m *ConnectorMutation) ConfigDataCleared() bool

ConfigDataCleared returns if the "config_data" field was cleared in this mutation.

func (*ConnectorMutation) ConfigVersion

func (m *ConnectorMutation) ConfigVersion() (r string, exists bool)

ConfigVersion returns the value of the "config_version" field in the mutation.

func (*ConnectorMutation) CostReportsCleared

func (m *ConnectorMutation) CostReportsCleared() bool

CostReportsCleared reports if the "cost_reports" edge to the CostReport entity was cleared.

func (*ConnectorMutation) CostReportsIDs

func (m *ConnectorMutation) CostReportsIDs() (ids []int)

CostReportsIDs returns the "cost_reports" edge IDs in the mutation.

func (*ConnectorMutation) CreateTime

func (m *ConnectorMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ConnectorMutation) Description

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

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

func (*ConnectorMutation) DescriptionCleared

func (m *ConnectorMutation) DescriptionCleared() bool

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

func (*ConnectorMutation) EdgeCleared

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

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

func (*ConnectorMutation) EnableFinOps

func (m *ConnectorMutation) EnableFinOps() (r bool, exists bool)

EnableFinOps returns the value of the "enable_fin_ops" field in the mutation.

func (*ConnectorMutation) EnvironmentsCleared

func (m *ConnectorMutation) EnvironmentsCleared() bool

EnvironmentsCleared reports if the "environments" edge to the EnvironmentConnectorRelationship entity was cleared.

func (*ConnectorMutation) EnvironmentsIDs

func (m *ConnectorMutation) EnvironmentsIDs() (ids []object.ID)

EnvironmentsIDs returns the "environments" edge IDs in the mutation.

func (*ConnectorMutation) ExecContext

func (c *ConnectorMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ConnectorMutation) Field

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

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

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

func (*ConnectorMutation) Fields

func (m *ConnectorMutation) 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 (*ConnectorMutation) FinOpsCustomPricing

func (m *ConnectorMutation) FinOpsCustomPricing() (r *types.FinOpsCustomPricing, exists bool)

FinOpsCustomPricing returns the value of the "fin_ops_custom_pricing" field in the mutation.

func (*ConnectorMutation) FinOpsCustomPricingCleared

func (m *ConnectorMutation) FinOpsCustomPricingCleared() bool

FinOpsCustomPricingCleared returns if the "fin_ops_custom_pricing" field was cleared in this mutation.

func (*ConnectorMutation) GetType

func (m *ConnectorMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ConnectorMutation) ID

func (m *ConnectorMutation) ID() (id object.ID, 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 (*ConnectorMutation) IDs

func (m *ConnectorMutation) IDs(ctx context.Context) ([]object.ID, 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 (*ConnectorMutation) Labels

func (m *ConnectorMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*ConnectorMutation) LabelsCleared

func (m *ConnectorMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*ConnectorMutation) Name

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

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

func (*ConnectorMutation) OldAnnotations

func (m *ConnectorMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldApplicableEnvironmentType added in v0.4.0

func (m *ConnectorMutation) OldApplicableEnvironmentType(ctx context.Context) (v string, err error)

OldApplicableEnvironmentType returns the old "applicable_environment_type" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldCategory

func (m *ConnectorMutation) OldCategory(ctx context.Context) (v string, err error)

OldCategory returns the old "category" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldConfigData

func (m *ConnectorMutation) OldConfigData(ctx context.Context) (v crypto.Properties, err error)

OldConfigData returns the old "config_data" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldConfigVersion

func (m *ConnectorMutation) OldConfigVersion(ctx context.Context) (v string, err error)

OldConfigVersion returns the old "config_version" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldCreateTime

func (m *ConnectorMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldDescription

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

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

func (m *ConnectorMutation) OldEnableFinOps(ctx context.Context) (v bool, err error)

OldEnableFinOps returns the old "enable_fin_ops" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldField

func (m *ConnectorMutation) 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 (*ConnectorMutation) OldFinOpsCustomPricing

func (m *ConnectorMutation) OldFinOpsCustomPricing(ctx context.Context) (v *types.FinOpsCustomPricing, err error)

OldFinOpsCustomPricing returns the old "fin_ops_custom_pricing" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldLabels

func (m *ConnectorMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldName

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

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

func (m *ConnectorMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldStatus

func (m *ConnectorMutation) OldStatus(ctx context.Context) (v status.Status, err error)

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

func (m *ConnectorMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) OldUpdateTime

func (m *ConnectorMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Connector entity. If the Connector 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 (*ConnectorMutation) Op

func (m *ConnectorMutation) Op() Op

Op returns the operation name.

func (*ConnectorMutation) ProjectCleared

func (m *ConnectorMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*ConnectorMutation) ProjectID

func (m *ConnectorMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*ConnectorMutation) ProjectIDCleared

func (m *ConnectorMutation) ProjectIDCleared() bool

ProjectIDCleared returns if the "project_id" field was cleared in this mutation.

func (*ConnectorMutation) ProjectIDs

func (m *ConnectorMutation) ProjectIDs() (ids []object.ID)

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

func (*ConnectorMutation) QueryContext

func (c *ConnectorMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ConnectorMutation) RemoveCostReportIDs

func (m *ConnectorMutation) RemoveCostReportIDs(ids ...int)

RemoveCostReportIDs removes the "cost_reports" edge to the CostReport entity by IDs.

func (*ConnectorMutation) RemoveEnvironmentIDs

func (m *ConnectorMutation) RemoveEnvironmentIDs(ids ...object.ID)

RemoveEnvironmentIDs removes the "environments" edge to the EnvironmentConnectorRelationship entity by IDs.

func (*ConnectorMutation) RemoveResourceComponentIDs added in v0.4.0

func (m *ConnectorMutation) RemoveResourceComponentIDs(ids ...object.ID)

RemoveResourceComponentIDs removes the "resource_components" edge to the ResourceComponent entity by IDs.

func (*ConnectorMutation) RemovedCostReportsIDs

func (m *ConnectorMutation) RemovedCostReportsIDs() (ids []int)

RemovedCostReports returns the removed IDs of the "cost_reports" edge to the CostReport entity.

func (*ConnectorMutation) RemovedEdges

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

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

func (*ConnectorMutation) RemovedEnvironmentsIDs

func (m *ConnectorMutation) RemovedEnvironmentsIDs() (ids []object.ID)

RemovedEnvironments returns the removed IDs of the "environments" edge to the EnvironmentConnectorRelationship entity.

func (*ConnectorMutation) RemovedIDs

func (m *ConnectorMutation) 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 (*ConnectorMutation) RemovedResourceComponentsIDs added in v0.4.0

func (m *ConnectorMutation) RemovedResourceComponentsIDs() (ids []object.ID)

RemovedResourceComponents returns the removed IDs of the "resource_components" edge to the ResourceComponent entity.

func (*ConnectorMutation) ResetAnnotations

func (m *ConnectorMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*ConnectorMutation) ResetApplicableEnvironmentType added in v0.4.0

func (m *ConnectorMutation) ResetApplicableEnvironmentType()

ResetApplicableEnvironmentType resets all changes to the "applicable_environment_type" field.

func (*ConnectorMutation) ResetCategory

func (m *ConnectorMutation) ResetCategory()

ResetCategory resets all changes to the "category" field.

func (*ConnectorMutation) ResetConfigData

func (m *ConnectorMutation) ResetConfigData()

ResetConfigData resets all changes to the "config_data" field.

func (*ConnectorMutation) ResetConfigVersion

func (m *ConnectorMutation) ResetConfigVersion()

ResetConfigVersion resets all changes to the "config_version" field.

func (*ConnectorMutation) ResetCostReports

func (m *ConnectorMutation) ResetCostReports()

ResetCostReports resets all changes to the "cost_reports" edge.

func (*ConnectorMutation) ResetCreateTime

func (m *ConnectorMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ConnectorMutation) ResetDescription

func (m *ConnectorMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ConnectorMutation) ResetEdge

func (m *ConnectorMutation) 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 (*ConnectorMutation) ResetEnableFinOps

func (m *ConnectorMutation) ResetEnableFinOps()

ResetEnableFinOps resets all changes to the "enable_fin_ops" field.

func (*ConnectorMutation) ResetEnvironments

func (m *ConnectorMutation) ResetEnvironments()

ResetEnvironments resets all changes to the "environments" edge.

func (*ConnectorMutation) ResetField

func (m *ConnectorMutation) 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 (*ConnectorMutation) ResetFinOpsCustomPricing

func (m *ConnectorMutation) ResetFinOpsCustomPricing()

ResetFinOpsCustomPricing resets all changes to the "fin_ops_custom_pricing" field.

func (*ConnectorMutation) ResetLabels

func (m *ConnectorMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*ConnectorMutation) ResetName

func (m *ConnectorMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ConnectorMutation) ResetProject

func (m *ConnectorMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*ConnectorMutation) ResetProjectID

func (m *ConnectorMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*ConnectorMutation) ResetResourceComponents added in v0.4.0

func (m *ConnectorMutation) ResetResourceComponents()

ResetResourceComponents resets all changes to the "resource_components" edge.

func (*ConnectorMutation) ResetStatus

func (m *ConnectorMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ConnectorMutation) ResetType

func (m *ConnectorMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ConnectorMutation) ResetUpdateTime

func (m *ConnectorMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*ConnectorMutation) ResourceComponentsCleared added in v0.4.0

func (m *ConnectorMutation) ResourceComponentsCleared() bool

ResourceComponentsCleared reports if the "resource_components" edge to the ResourceComponent entity was cleared.

func (*ConnectorMutation) ResourceComponentsIDs added in v0.4.0

func (m *ConnectorMutation) ResourceComponentsIDs() (ids []object.ID)

ResourceComponentsIDs returns the "resource_components" edge IDs in the mutation.

func (*ConnectorMutation) SetAnnotations

func (m *ConnectorMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*ConnectorMutation) SetApplicableEnvironmentType added in v0.4.0

func (m *ConnectorMutation) SetApplicableEnvironmentType(s string)

SetApplicableEnvironmentType sets the "applicable_environment_type" field.

func (*ConnectorMutation) SetCategory

func (m *ConnectorMutation) SetCategory(s string)

SetCategory sets the "category" field.

func (*ConnectorMutation) SetConfigData

func (m *ConnectorMutation) SetConfigData(c crypto.Properties)

SetConfigData sets the "config_data" field.

func (*ConnectorMutation) SetConfigVersion

func (m *ConnectorMutation) SetConfigVersion(s string)

SetConfigVersion sets the "config_version" field.

func (*ConnectorMutation) SetCreateTime

func (m *ConnectorMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ConnectorMutation) SetDescription

func (m *ConnectorMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ConnectorMutation) SetEnableFinOps

func (m *ConnectorMutation) SetEnableFinOps(b bool)

SetEnableFinOps sets the "enable_fin_ops" field.

func (*ConnectorMutation) SetField

func (m *ConnectorMutation) 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 (*ConnectorMutation) SetFinOpsCustomPricing

func (m *ConnectorMutation) SetFinOpsCustomPricing(tocp *types.FinOpsCustomPricing)

SetFinOpsCustomPricing sets the "fin_ops_custom_pricing" field.

func (*ConnectorMutation) SetID

func (m *ConnectorMutation) SetID(id object.ID)

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

func (*ConnectorMutation) SetLabels

func (m *ConnectorMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*ConnectorMutation) SetName

func (m *ConnectorMutation) SetName(s string)

SetName sets the "name" field.

func (*ConnectorMutation) SetOp

func (m *ConnectorMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ConnectorMutation) SetProjectID

func (m *ConnectorMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*ConnectorMutation) SetStatus

func (m *ConnectorMutation) SetStatus(s status.Status)

SetStatus sets the "status" field.

func (*ConnectorMutation) SetType

func (m *ConnectorMutation) SetType(s string)

SetType sets the "type" field.

func (*ConnectorMutation) SetUpdateTime

func (m *ConnectorMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*ConnectorMutation) Status

func (m *ConnectorMutation) Status() (r status.Status, exists bool)

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

func (*ConnectorMutation) StatusCleared

func (m *ConnectorMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (ConnectorMutation) Tx

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

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

func (*ConnectorMutation) Type

func (m *ConnectorMutation) Type() string

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

func (*ConnectorMutation) UpdateTime

func (m *ConnectorMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*ConnectorMutation) Where

func (m *ConnectorMutation) Where(ps ...predicate.Connector)

Where appends a list predicates to the ConnectorMutation builder.

func (*ConnectorMutation) WhereP

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

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

type ConnectorOutput

type ConnectorOutput struct {
	ID                        object.ID                  `json:"id,omitempty"`
	Name                      string                     `json:"name,omitempty"`
	Description               string                     `json:"description,omitempty"`
	Labels                    map[string]string          `json:"labels,omitempty"`
	CreateTime                *time.Time                 `json:"createTime,omitempty"`
	UpdateTime                *time.Time                 `json:"updateTime,omitempty"`
	Status                    status.Status              `json:"status,omitempty"`
	Category                  string                     `json:"category,cli-table-column,omitempty"`
	Type                      string                     `json:"type,cli-table-column,omitempty"`
	ApplicableEnvironmentType string                     `json:"applicableEnvironmentType,omitempty"`
	ConfigVersion             string                     `json:"configVersion,omitempty"`
	ConfigData                crypto.Properties          `json:"configData,omitempty"`
	EnableFinOps              bool                       `json:"enableFinOps,omitempty"`
	FinOpsCustomPricing       *types.FinOpsCustomPricing `json:"finOpsCustomPricing,omitempty"`

	Project *ProjectOutput `json:"project,omitempty"`
}

ConnectorOutput holds the output of the Connector entity.

func ExposeConnector

func ExposeConnector(_c *Connector) *ConnectorOutput

ExposeConnector converts the Connector to ConnectorOutput.

func ExposeConnectors

func ExposeConnectors(_cs []*Connector) []*ConnectorOutput

ExposeConnectors converts the Connector slice to ConnectorOutput pointer slice.

type ConnectorPatchInput added in v0.5.0

type ConnectorPatchInput struct {
	ConnectorQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `path:"-" query:"-" json:"status,omitempty"`
	// Category of the connector.
	Category string `path:"-" query:"-" json:"category,omitempty"`
	// Type of the connector.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Environment type of the connector to apply.
	ApplicableEnvironmentType string `path:"-" query:"-" json:"applicableEnvironmentType,omitempty"`
	// Connector config version.
	ConfigVersion string `path:"-" query:"-" json:"configVersion,omitempty"`
	// Connector config data.
	ConfigData crypto.Properties `path:"-" query:"-" json:"configData,omitempty"`
	// Config whether enable finOps, will install prometheus and opencost while enable.
	EnableFinOps bool `path:"-" query:"-" json:"enableFinOps,omitempty"`
	// Custom pricing user defined.
	FinOpsCustomPricing *types.FinOpsCustomPricing `path:"-" query:"-" json:"finOpsCustomPricing,omitempty"`
	// contains filtered or unexported fields
}

ConnectorPatchInput holds the patch input of the Connector entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ConnectorPatchInput) Model added in v0.5.0

func (cpi *ConnectorPatchInput) Model() *Connector

Model returns the Connector patched entity, after validating.

func (*ConnectorPatchInput) PatchModel added in v0.5.0

func (cpi *ConnectorPatchInput) PatchModel() *Connector

PatchModel returns the Connector partition entity for patching.

func (*ConnectorPatchInput) SetGinContext added in v0.5.0

func (ic *ConnectorPatchInput) SetGinContext(ctx *gin.Context)

func (*ConnectorPatchInput) SetModelClient added in v0.5.0

func (ic *ConnectorPatchInput) SetModelClient(cli *Client)

func (*ConnectorPatchInput) Validate added in v0.5.0

func (cpi *ConnectorPatchInput) Validate() error

Validate checks the ConnectorPatchInput entity.

func (*ConnectorPatchInput) ValidateWith added in v0.5.0

func (cpi *ConnectorPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorPatchInput entity with the given context and client set.

type ConnectorQuery

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

ConnectorQuery is the builder for querying Connector entities.

func (*ConnectorQuery) Aggregate

func (cq *ConnectorQuery) Aggregate(fns ...AggregateFunc) *ConnectorSelect

Aggregate returns a ConnectorSelect configured with the given aggregations.

func (*ConnectorQuery) All

func (cq *ConnectorQuery) All(ctx context.Context) ([]*Connector, error)

All executes the query and returns a list of Connectors.

func (*ConnectorQuery) AllX

func (cq *ConnectorQuery) AllX(ctx context.Context) []*Connector

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

func (*ConnectorQuery) Clone

func (cq *ConnectorQuery) Clone() *ConnectorQuery

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

func (*ConnectorQuery) Count

func (cq *ConnectorQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ConnectorQuery) CountX

func (cq *ConnectorQuery) CountX(ctx context.Context) int

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

func (*ConnectorQuery) ExecContext

func (c *ConnectorQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ConnectorQuery) Exist

func (cq *ConnectorQuery) Exist(ctx context.Context) (bool, error)

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

func (*ConnectorQuery) ExistX

func (cq *ConnectorQuery) ExistX(ctx context.Context) bool

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

func (*ConnectorQuery) First

func (cq *ConnectorQuery) First(ctx context.Context) (*Connector, error)

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

func (*ConnectorQuery) FirstID

func (cq *ConnectorQuery) FirstID(ctx context.Context) (id object.ID, err error)

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

func (*ConnectorQuery) FirstIDX

func (cq *ConnectorQuery) FirstIDX(ctx context.Context) object.ID

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

func (*ConnectorQuery) FirstX

func (cq *ConnectorQuery) FirstX(ctx context.Context) *Connector

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

func (*ConnectorQuery) ForShare

func (cq *ConnectorQuery) ForShare(opts ...sql.LockOption) *ConnectorQuery

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 (*ConnectorQuery) ForUpdate

func (cq *ConnectorQuery) ForUpdate(opts ...sql.LockOption) *ConnectorQuery

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 (*ConnectorQuery) GroupBy

func (cq *ConnectorQuery) GroupBy(field string, fields ...string) *ConnectorGroupBy

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.Connector.Query().
	GroupBy(connector.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ConnectorQuery) IDs

func (cq *ConnectorQuery) IDs(ctx context.Context) (ids []object.ID, err error)

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

func (*ConnectorQuery) IDsX

func (cq *ConnectorQuery) IDsX(ctx context.Context) []object.ID

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

func (*ConnectorQuery) Limit

func (cq *ConnectorQuery) Limit(limit int) *ConnectorQuery

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

func (*ConnectorQuery) Modify

func (cq *ConnectorQuery) Modify(modifiers ...func(s *sql.Selector)) *ConnectorSelect

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

func (*ConnectorQuery) Offset

func (cq *ConnectorQuery) Offset(offset int) *ConnectorQuery

Offset to start from.

func (*ConnectorQuery) Only

func (cq *ConnectorQuery) Only(ctx context.Context) (*Connector, error)

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

func (*ConnectorQuery) OnlyID

func (cq *ConnectorQuery) OnlyID(ctx context.Context) (id object.ID, err error)

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

func (*ConnectorQuery) OnlyIDX

func (cq *ConnectorQuery) OnlyIDX(ctx context.Context) object.ID

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

func (*ConnectorQuery) OnlyX

func (cq *ConnectorQuery) OnlyX(ctx context.Context) *Connector

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

func (*ConnectorQuery) Order

Order specifies how the records should be ordered.

func (*ConnectorQuery) QueryContext

func (c *ConnectorQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ConnectorQuery) QueryCostReports

func (cq *ConnectorQuery) QueryCostReports() *CostReportQuery

QueryCostReports chains the current query on the "cost_reports" edge.

func (*ConnectorQuery) QueryEnvironments

func (cq *ConnectorQuery) QueryEnvironments() *EnvironmentConnectorRelationshipQuery

QueryEnvironments chains the current query on the "environments" edge.

func (*ConnectorQuery) QueryProject

func (cq *ConnectorQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*ConnectorQuery) QueryResourceComponents added in v0.4.0

func (cq *ConnectorQuery) QueryResourceComponents() *ResourceComponentQuery

QueryResourceComponents chains the current query on the "resource_components" edge.

func (*ConnectorQuery) Select

func (cq *ConnectorQuery) Select(fields ...string) *ConnectorSelect

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.Connector.Query().
	Select(connector.FieldName).
	Scan(ctx, &v)

func (*ConnectorQuery) Unique

func (cq *ConnectorQuery) Unique(unique bool) *ConnectorQuery

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

Where adds a new predicate for the ConnectorQuery builder.

func (*ConnectorQuery) WhereP

func (cq *ConnectorQuery) WhereP(ps ...func(*sql.Selector))

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

func (*ConnectorQuery) WithCostReports

func (cq *ConnectorQuery) WithCostReports(opts ...func(*CostReportQuery)) *ConnectorQuery

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

func (*ConnectorQuery) WithEnvironments

func (cq *ConnectorQuery) WithEnvironments(opts ...func(*EnvironmentConnectorRelationshipQuery)) *ConnectorQuery

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

func (*ConnectorQuery) WithProject

func (cq *ConnectorQuery) WithProject(opts ...func(*ProjectQuery)) *ConnectorQuery

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

func (*ConnectorQuery) WithResourceComponents added in v0.4.0

func (cq *ConnectorQuery) WithResourceComponents(opts ...func(*ResourceComponentQuery)) *ConnectorQuery

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

type ConnectorQueryInput

type ConnectorQueryInput struct {

	// Project indicates to query Connector entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project,omitempty"`

	// Refer holds the route path reference of the Connector entity.
	Refer *object.Refer `path:"connector,default=" query:"-" json:"-"`
	// ID of the Connector entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Connector entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

ConnectorQueryInput holds the query input of the Connector entity, please tags with `path:",inline"` if embedding.

func (*ConnectorQueryInput) Model

func (cqi *ConnectorQueryInput) Model() *Connector

Model returns the Connector entity for querying, after validating.

func (*ConnectorQueryInput) SetGinContext

func (ic *ConnectorQueryInput) SetGinContext(ctx *gin.Context)

func (*ConnectorQueryInput) SetModelClient

func (ic *ConnectorQueryInput) SetModelClient(cli *Client)

func (*ConnectorQueryInput) Validate

func (cqi *ConnectorQueryInput) Validate() error

Validate checks the ConnectorQueryInput entity.

func (*ConnectorQueryInput) ValidateWith

func (cqi *ConnectorQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorQueryInput entity with the given context and client set.

type ConnectorQueryInputs

type ConnectorQueryInputs struct {

	// Project indicates to query Connector entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Category of the connector.
	Category string `path:"-" query:"category,omitempty" json:"-"`
	// Type of the connector.
	Type string `path:"-" query:"type,omitempty" json:"-"`
	// Environment type of the connector to apply.
	ApplicableEnvironmentType string `path:"-" query:"applicableEnvironmentType,omitempty" json:"-"`
	// contains filtered or unexported fields
}

ConnectorQueryInputs holds the query input of the Connector entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ConnectorQueryInputs) SetGinContext

func (ic *ConnectorQueryInputs) SetGinContext(ctx *gin.Context)

func (*ConnectorQueryInputs) SetModelClient

func (ic *ConnectorQueryInputs) SetModelClient(cli *Client)

func (*ConnectorQueryInputs) Validate

func (cqi *ConnectorQueryInputs) Validate() error

Validate checks the ConnectorQueryInputs entity.

func (*ConnectorQueryInputs) ValidateWith

func (cqi *ConnectorQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorQueryInputs entity with the given context and client set.

type ConnectorSelect

type ConnectorSelect struct {
	*ConnectorQuery
	// contains filtered or unexported fields
}

ConnectorSelect is the builder for selecting fields of Connector entities.

func (*ConnectorSelect) Aggregate

func (cs *ConnectorSelect) Aggregate(fns ...AggregateFunc) *ConnectorSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ConnectorSelect) Bool

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

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

func (*ConnectorSelect) BoolX

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

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

func (*ConnectorSelect) Bools

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

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

func (*ConnectorSelect) BoolsX

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

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

func (ConnectorSelect) ExecContext

func (c ConnectorSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ConnectorSelect) Float64

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

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

func (*ConnectorSelect) Float64X

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

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

func (*ConnectorSelect) Float64s

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

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

func (*ConnectorSelect) Float64sX

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

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

func (*ConnectorSelect) Int

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

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

func (*ConnectorSelect) IntX

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

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

func (*ConnectorSelect) Ints

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

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

func (*ConnectorSelect) IntsX

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

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

func (*ConnectorSelect) Modify

func (cs *ConnectorSelect) Modify(modifiers ...func(s *sql.Selector)) *ConnectorSelect

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

func (ConnectorSelect) QueryContext

func (c ConnectorSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ConnectorSelect) Scan

func (cs *ConnectorSelect) Scan(ctx context.Context, v any) error

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

func (*ConnectorSelect) ScanX

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

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

func (*ConnectorSelect) String

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

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

func (*ConnectorSelect) StringX

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

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

func (*ConnectorSelect) Strings

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

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

func (*ConnectorSelect) StringsX

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

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

type ConnectorUpdate

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

ConnectorUpdate is the builder for updating Connector entities.

func (*ConnectorUpdate) AddCostReportIDs

func (cu *ConnectorUpdate) AddCostReportIDs(ids ...int) *ConnectorUpdate

AddCostReportIDs adds the "cost_reports" edge to the CostReport entity by IDs.

func (*ConnectorUpdate) AddCostReports

func (cu *ConnectorUpdate) AddCostReports(c ...*CostReport) *ConnectorUpdate

AddCostReports adds the "cost_reports" edges to the CostReport entity.

func (*ConnectorUpdate) AddEnvironmentIDs

func (cu *ConnectorUpdate) AddEnvironmentIDs(ids ...object.ID) *ConnectorUpdate

AddEnvironmentIDs adds the "environments" edge to the EnvironmentConnectorRelationship entity by IDs.

func (*ConnectorUpdate) AddEnvironments

AddEnvironments adds the "environments" edges to the EnvironmentConnectorRelationship entity.

func (*ConnectorUpdate) AddResourceComponentIDs added in v0.4.0

func (cu *ConnectorUpdate) AddResourceComponentIDs(ids ...object.ID) *ConnectorUpdate

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by IDs.

func (*ConnectorUpdate) AddResourceComponents added in v0.4.0

func (cu *ConnectorUpdate) AddResourceComponents(r ...*ResourceComponent) *ConnectorUpdate

AddResourceComponents adds the "resource_components" edges to the ResourceComponent entity.

func (*ConnectorUpdate) ClearAnnotations

func (cu *ConnectorUpdate) ClearAnnotations() *ConnectorUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*ConnectorUpdate) ClearConfigData

func (cu *ConnectorUpdate) ClearConfigData() *ConnectorUpdate

ClearConfigData clears the value of the "config_data" field.

func (*ConnectorUpdate) ClearCostReports

func (cu *ConnectorUpdate) ClearCostReports() *ConnectorUpdate

ClearCostReports clears all "cost_reports" edges to the CostReport entity.

func (*ConnectorUpdate) ClearDescription

func (cu *ConnectorUpdate) ClearDescription() *ConnectorUpdate

ClearDescription clears the value of the "description" field.

func (*ConnectorUpdate) ClearEnvironments

func (cu *ConnectorUpdate) ClearEnvironments() *ConnectorUpdate

ClearEnvironments clears all "environments" edges to the EnvironmentConnectorRelationship entity.

func (*ConnectorUpdate) ClearFinOpsCustomPricing

func (cu *ConnectorUpdate) ClearFinOpsCustomPricing() *ConnectorUpdate

ClearFinOpsCustomPricing clears the value of the "fin_ops_custom_pricing" field.

func (*ConnectorUpdate) ClearLabels

func (cu *ConnectorUpdate) ClearLabels() *ConnectorUpdate

ClearLabels clears the value of the "labels" field.

func (*ConnectorUpdate) ClearResourceComponents added in v0.4.0

func (cu *ConnectorUpdate) ClearResourceComponents() *ConnectorUpdate

ClearResourceComponents clears all "resource_components" edges to the ResourceComponent entity.

func (*ConnectorUpdate) ClearStatus

func (cu *ConnectorUpdate) ClearStatus() *ConnectorUpdate

ClearStatus clears the value of the "status" field.

func (*ConnectorUpdate) Exec

func (cu *ConnectorUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConnectorUpdate) ExecContext

func (c *ConnectorUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ConnectorUpdate) ExecX

func (cu *ConnectorUpdate) ExecX(ctx context.Context)

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

func (*ConnectorUpdate) Modify

func (cu *ConnectorUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ConnectorUpdate

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

func (*ConnectorUpdate) Mutation

func (cu *ConnectorUpdate) Mutation() *ConnectorMutation

Mutation returns the ConnectorMutation object of the builder.

func (*ConnectorUpdate) QueryContext

func (c *ConnectorUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ConnectorUpdate) RemoveCostReportIDs

func (cu *ConnectorUpdate) RemoveCostReportIDs(ids ...int) *ConnectorUpdate

RemoveCostReportIDs removes the "cost_reports" edge to CostReport entities by IDs.

func (*ConnectorUpdate) RemoveCostReports

func (cu *ConnectorUpdate) RemoveCostReports(c ...*CostReport) *ConnectorUpdate

RemoveCostReports removes "cost_reports" edges to CostReport entities.

func (*ConnectorUpdate) RemoveEnvironmentIDs

func (cu *ConnectorUpdate) RemoveEnvironmentIDs(ids ...object.ID) *ConnectorUpdate

RemoveEnvironmentIDs removes the "environments" edge to EnvironmentConnectorRelationship entities by IDs.

func (*ConnectorUpdate) RemoveEnvironments

func (cu *ConnectorUpdate) RemoveEnvironments(e ...*EnvironmentConnectorRelationship) *ConnectorUpdate

RemoveEnvironments removes "environments" edges to EnvironmentConnectorRelationship entities.

func (*ConnectorUpdate) RemoveResourceComponentIDs added in v0.4.0

func (cu *ConnectorUpdate) RemoveResourceComponentIDs(ids ...object.ID) *ConnectorUpdate

RemoveResourceComponentIDs removes the "resource_components" edge to ResourceComponent entities by IDs.

func (*ConnectorUpdate) RemoveResourceComponents added in v0.4.0

func (cu *ConnectorUpdate) RemoveResourceComponents(r ...*ResourceComponent) *ConnectorUpdate

RemoveResourceComponents removes "resource_components" edges to ResourceComponent entities.

func (*ConnectorUpdate) Save

func (cu *ConnectorUpdate) Save(ctx context.Context) (int, error)

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

func (*ConnectorUpdate) SaveX

func (cu *ConnectorUpdate) SaveX(ctx context.Context) int

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

func (*ConnectorUpdate) Set

func (cu *ConnectorUpdate) Set(obj *Connector) *ConnectorUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ConnectorUpdate) SetAnnotations

func (cu *ConnectorUpdate) SetAnnotations(m map[string]string) *ConnectorUpdate

SetAnnotations sets the "annotations" field.

func (*ConnectorUpdate) SetConfigData

func (cu *ConnectorUpdate) SetConfigData(c crypto.Properties) *ConnectorUpdate

SetConfigData sets the "config_data" field.

func (*ConnectorUpdate) SetConfigVersion

func (cu *ConnectorUpdate) SetConfigVersion(s string) *ConnectorUpdate

SetConfigVersion sets the "config_version" field.

func (*ConnectorUpdate) SetDescription

func (cu *ConnectorUpdate) SetDescription(s string) *ConnectorUpdate

SetDescription sets the "description" field.

func (*ConnectorUpdate) SetEnableFinOps

func (cu *ConnectorUpdate) SetEnableFinOps(b bool) *ConnectorUpdate

SetEnableFinOps sets the "enable_fin_ops" field.

func (*ConnectorUpdate) SetFinOpsCustomPricing

func (cu *ConnectorUpdate) SetFinOpsCustomPricing(tocp *types.FinOpsCustomPricing) *ConnectorUpdate

SetFinOpsCustomPricing sets the "fin_ops_custom_pricing" field.

func (*ConnectorUpdate) SetLabels

func (cu *ConnectorUpdate) SetLabels(m map[string]string) *ConnectorUpdate

SetLabels sets the "labels" field.

func (*ConnectorUpdate) SetNillableConfigVersion added in v0.5.0

func (cu *ConnectorUpdate) SetNillableConfigVersion(s *string) *ConnectorUpdate

SetNillableConfigVersion sets the "config_version" field if the given value is not nil.

func (*ConnectorUpdate) SetNillableDescription

func (cu *ConnectorUpdate) SetNillableDescription(s *string) *ConnectorUpdate

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

func (*ConnectorUpdate) SetNillableEnableFinOps added in v0.5.0

func (cu *ConnectorUpdate) SetNillableEnableFinOps(b *bool) *ConnectorUpdate

SetNillableEnableFinOps sets the "enable_fin_ops" field if the given value is not nil.

func (*ConnectorUpdate) SetNillableStatus

func (cu *ConnectorUpdate) SetNillableStatus(s *status.Status) *ConnectorUpdate

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

func (*ConnectorUpdate) SetStatus

func (cu *ConnectorUpdate) SetStatus(s status.Status) *ConnectorUpdate

SetStatus sets the "status" field.

func (*ConnectorUpdate) SetUpdateTime

func (cu *ConnectorUpdate) SetUpdateTime(t time.Time) *ConnectorUpdate

SetUpdateTime sets the "update_time" field.

func (*ConnectorUpdate) Where

Where appends a list predicates to the ConnectorUpdate builder.

type ConnectorUpdateInput

type ConnectorUpdateInput struct {
	ConnectorQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Category of the connector.
	Category string `path:"-" query:"-" json:"category,omitempty"`
	// Type of the connector.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Connector config version.
	ConfigVersion string `path:"-" query:"-" json:"configVersion,omitempty"`
	// Connector config data.
	ConfigData crypto.Properties `path:"-" query:"-" json:"configData,omitempty"`
	// Config whether enable finOps, will install prometheus and opencost while enable.
	EnableFinOps bool `path:"-" query:"-" json:"enableFinOps,omitempty"`
	// Custom pricing user defined.
	FinOpsCustomPricing *types.FinOpsCustomPricing `path:"-" query:"-" json:"finOpsCustomPricing,omitempty"`
}

ConnectorUpdateInput holds the modification input of the Connector entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ConnectorUpdateInput) Model

func (cui *ConnectorUpdateInput) Model() *Connector

Model returns the Connector entity for modifying, after validating.

func (*ConnectorUpdateInput) SetGinContext

func (ic *ConnectorUpdateInput) SetGinContext(ctx *gin.Context)

func (*ConnectorUpdateInput) SetModelClient

func (ic *ConnectorUpdateInput) SetModelClient(cli *Client)

func (*ConnectorUpdateInput) Validate

func (cui *ConnectorUpdateInput) Validate() error

Validate checks the ConnectorUpdateInput entity.

func (*ConnectorUpdateInput) ValidateWith

func (cui *ConnectorUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorUpdateInput entity with the given context and client set.

type ConnectorUpdateInputs

type ConnectorUpdateInputs struct {

	// Project indicates to update Connector entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ConnectorUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ConnectorUpdateInputs holds the modification input of the Connector entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ConnectorUpdateInputs) IDs

func (cui *ConnectorUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Connector entities for modifying, after validating.

func (*ConnectorUpdateInputs) Model

func (cui *ConnectorUpdateInputs) Model() []*Connector

Model returns the Connector entities for modifying, after validating.

func (*ConnectorUpdateInputs) SetGinContext

func (ic *ConnectorUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ConnectorUpdateInputs) SetModelClient

func (ic *ConnectorUpdateInputs) SetModelClient(cli *Client)

func (*ConnectorUpdateInputs) Validate

func (cui *ConnectorUpdateInputs) Validate() error

Validate checks the ConnectorUpdateInputs entity.

func (*ConnectorUpdateInputs) ValidateWith

func (cui *ConnectorUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorUpdateInputs entity with the given context and client set.

type ConnectorUpdateInputsItem

type ConnectorUpdateInputsItem struct {
	// ID of the Connector entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Connector entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Category of the connector.
	Category string `path:"-" query:"-" json:"category,cli-table-column"`
	// Type of the connector.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Connector config version.
	ConfigVersion string `path:"-" query:"-" json:"configVersion"`
	// Connector config data.
	ConfigData crypto.Properties `path:"-" query:"-" json:"configData,omitempty"`
	// Config whether enable finOps, will install prometheus and opencost while enable.
	EnableFinOps bool `path:"-" query:"-" json:"enableFinOps"`
	// Custom pricing user defined.
	FinOpsCustomPricing *types.FinOpsCustomPricing `path:"-" query:"-" json:"finOpsCustomPricing,omitempty"`
}

ConnectorUpdateInputs holds the modification input item of the Connector entities.

func (*ConnectorUpdateInputsItem) ValidateWith

func (cui *ConnectorUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ConnectorUpdateInputsItem entity with the given context and client set.

type ConnectorUpdateOne

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

ConnectorUpdateOne is the builder for updating a single Connector entity.

func (*ConnectorUpdateOne) AddCostReportIDs

func (cuo *ConnectorUpdateOne) AddCostReportIDs(ids ...int) *ConnectorUpdateOne

AddCostReportIDs adds the "cost_reports" edge to the CostReport entity by IDs.

func (*ConnectorUpdateOne) AddCostReports

func (cuo *ConnectorUpdateOne) AddCostReports(c ...*CostReport) *ConnectorUpdateOne

AddCostReports adds the "cost_reports" edges to the CostReport entity.

func (*ConnectorUpdateOne) AddEnvironmentIDs

func (cuo *ConnectorUpdateOne) AddEnvironmentIDs(ids ...object.ID) *ConnectorUpdateOne

AddEnvironmentIDs adds the "environments" edge to the EnvironmentConnectorRelationship entity by IDs.

func (*ConnectorUpdateOne) AddEnvironments

AddEnvironments adds the "environments" edges to the EnvironmentConnectorRelationship entity.

func (*ConnectorUpdateOne) AddResourceComponentIDs added in v0.4.0

func (cuo *ConnectorUpdateOne) AddResourceComponentIDs(ids ...object.ID) *ConnectorUpdateOne

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by IDs.

func (*ConnectorUpdateOne) AddResourceComponents added in v0.4.0

func (cuo *ConnectorUpdateOne) AddResourceComponents(r ...*ResourceComponent) *ConnectorUpdateOne

AddResourceComponents adds the "resource_components" edges to the ResourceComponent entity.

func (*ConnectorUpdateOne) ClearAnnotations

func (cuo *ConnectorUpdateOne) ClearAnnotations() *ConnectorUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*ConnectorUpdateOne) ClearConfigData

func (cuo *ConnectorUpdateOne) ClearConfigData() *ConnectorUpdateOne

ClearConfigData clears the value of the "config_data" field.

func (*ConnectorUpdateOne) ClearCostReports

func (cuo *ConnectorUpdateOne) ClearCostReports() *ConnectorUpdateOne

ClearCostReports clears all "cost_reports" edges to the CostReport entity.

func (*ConnectorUpdateOne) ClearDescription

func (cuo *ConnectorUpdateOne) ClearDescription() *ConnectorUpdateOne

ClearDescription clears the value of the "description" field.

func (*ConnectorUpdateOne) ClearEnvironments

func (cuo *ConnectorUpdateOne) ClearEnvironments() *ConnectorUpdateOne

ClearEnvironments clears all "environments" edges to the EnvironmentConnectorRelationship entity.

func (*ConnectorUpdateOne) ClearFinOpsCustomPricing

func (cuo *ConnectorUpdateOne) ClearFinOpsCustomPricing() *ConnectorUpdateOne

ClearFinOpsCustomPricing clears the value of the "fin_ops_custom_pricing" field.

func (*ConnectorUpdateOne) ClearLabels

func (cuo *ConnectorUpdateOne) ClearLabels() *ConnectorUpdateOne

ClearLabels clears the value of the "labels" field.

func (*ConnectorUpdateOne) ClearResourceComponents added in v0.4.0

func (cuo *ConnectorUpdateOne) ClearResourceComponents() *ConnectorUpdateOne

ClearResourceComponents clears all "resource_components" edges to the ResourceComponent entity.

func (*ConnectorUpdateOne) ClearStatus

func (cuo *ConnectorUpdateOne) ClearStatus() *ConnectorUpdateOne

ClearStatus clears the value of the "status" field.

func (*ConnectorUpdateOne) Exec

func (cuo *ConnectorUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ConnectorUpdateOne) ExecContext

func (c *ConnectorUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ConnectorUpdateOne) ExecE

func (cuo *ConnectorUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Connector) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*ConnectorUpdateOne) ExecEX

func (cuo *ConnectorUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Connector) error)

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

func (*ConnectorUpdateOne) ExecX

func (cuo *ConnectorUpdateOne) ExecX(ctx context.Context)

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

func (*ConnectorUpdateOne) Modify

func (cuo *ConnectorUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ConnectorUpdateOne

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

func (*ConnectorUpdateOne) Mutation

func (cuo *ConnectorUpdateOne) Mutation() *ConnectorMutation

Mutation returns the ConnectorMutation object of the builder.

func (*ConnectorUpdateOne) QueryContext

func (c *ConnectorUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ConnectorUpdateOne) RemoveCostReportIDs

func (cuo *ConnectorUpdateOne) RemoveCostReportIDs(ids ...int) *ConnectorUpdateOne

RemoveCostReportIDs removes the "cost_reports" edge to CostReport entities by IDs.

func (*ConnectorUpdateOne) RemoveCostReports

func (cuo *ConnectorUpdateOne) RemoveCostReports(c ...*CostReport) *ConnectorUpdateOne

RemoveCostReports removes "cost_reports" edges to CostReport entities.

func (*ConnectorUpdateOne) RemoveEnvironmentIDs

func (cuo *ConnectorUpdateOne) RemoveEnvironmentIDs(ids ...object.ID) *ConnectorUpdateOne

RemoveEnvironmentIDs removes the "environments" edge to EnvironmentConnectorRelationship entities by IDs.

func (*ConnectorUpdateOne) RemoveEnvironments

RemoveEnvironments removes "environments" edges to EnvironmentConnectorRelationship entities.

func (*ConnectorUpdateOne) RemoveResourceComponentIDs added in v0.4.0

func (cuo *ConnectorUpdateOne) RemoveResourceComponentIDs(ids ...object.ID) *ConnectorUpdateOne

RemoveResourceComponentIDs removes the "resource_components" edge to ResourceComponent entities by IDs.

func (*ConnectorUpdateOne) RemoveResourceComponents added in v0.4.0

func (cuo *ConnectorUpdateOne) RemoveResourceComponents(r ...*ResourceComponent) *ConnectorUpdateOne

RemoveResourceComponents removes "resource_components" edges to ResourceComponent entities.

func (*ConnectorUpdateOne) Save

func (cuo *ConnectorUpdateOne) Save(ctx context.Context) (*Connector, error)

Save executes the query and returns the updated Connector entity.

func (*ConnectorUpdateOne) SaveE

func (cuo *ConnectorUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Connector) error) (*Connector, error)

SaveE calls the given function after updated the Connector entity, which is always good for cascading update operations.

func (*ConnectorUpdateOne) SaveEX

func (cuo *ConnectorUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Connector) error) *Connector

SaveEX is like SaveE, but panics if an error occurs.

func (*ConnectorUpdateOne) SaveX

func (cuo *ConnectorUpdateOne) SaveX(ctx context.Context) *Connector

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

func (*ConnectorUpdateOne) Select

func (cuo *ConnectorUpdateOne) Select(field string, fields ...string) *ConnectorUpdateOne

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

func (*ConnectorUpdateOne) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*ConnectorUpdateOne) SetAnnotations

func (cuo *ConnectorUpdateOne) SetAnnotations(m map[string]string) *ConnectorUpdateOne

SetAnnotations sets the "annotations" field.

func (*ConnectorUpdateOne) SetConfigData

func (cuo *ConnectorUpdateOne) SetConfigData(c crypto.Properties) *ConnectorUpdateOne

SetConfigData sets the "config_data" field.

func (*ConnectorUpdateOne) SetConfigVersion

func (cuo *ConnectorUpdateOne) SetConfigVersion(s string) *ConnectorUpdateOne

SetConfigVersion sets the "config_version" field.

func (*ConnectorUpdateOne) SetDescription

func (cuo *ConnectorUpdateOne) SetDescription(s string) *ConnectorUpdateOne

SetDescription sets the "description" field.

func (*ConnectorUpdateOne) SetEnableFinOps

func (cuo *ConnectorUpdateOne) SetEnableFinOps(b bool) *ConnectorUpdateOne

SetEnableFinOps sets the "enable_fin_ops" field.

func (*ConnectorUpdateOne) SetFinOpsCustomPricing

func (cuo *ConnectorUpdateOne) SetFinOpsCustomPricing(tocp *types.FinOpsCustomPricing) *ConnectorUpdateOne

SetFinOpsCustomPricing sets the "fin_ops_custom_pricing" field.

func (*ConnectorUpdateOne) SetLabels

func (cuo *ConnectorUpdateOne) SetLabels(m map[string]string) *ConnectorUpdateOne

SetLabels sets the "labels" field.

func (*ConnectorUpdateOne) SetNillableConfigVersion added in v0.5.0

func (cuo *ConnectorUpdateOne) SetNillableConfigVersion(s *string) *ConnectorUpdateOne

SetNillableConfigVersion sets the "config_version" field if the given value is not nil.

func (*ConnectorUpdateOne) SetNillableDescription

func (cuo *ConnectorUpdateOne) SetNillableDescription(s *string) *ConnectorUpdateOne

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

func (*ConnectorUpdateOne) SetNillableEnableFinOps added in v0.5.0

func (cuo *ConnectorUpdateOne) SetNillableEnableFinOps(b *bool) *ConnectorUpdateOne

SetNillableEnableFinOps sets the "enable_fin_ops" field if the given value is not nil.

func (*ConnectorUpdateOne) SetNillableStatus

func (cuo *ConnectorUpdateOne) SetNillableStatus(s *status.Status) *ConnectorUpdateOne

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

func (*ConnectorUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*ConnectorUpdateOne) SetUpdateTime

func (cuo *ConnectorUpdateOne) SetUpdateTime(t time.Time) *ConnectorUpdateOne

SetUpdateTime sets the "update_time" field.

func (*ConnectorUpdateOne) Where

Where appends a list predicates to the ConnectorUpdate builder.

type ConnectorUpsert

type ConnectorUpsert struct {
	*sql.UpdateSet
}

ConnectorUpsert is the "OnConflict" setter.

func (*ConnectorUpsert) ClearAnnotations

func (u *ConnectorUpsert) ClearAnnotations() *ConnectorUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*ConnectorUpsert) ClearConfigData

func (u *ConnectorUpsert) ClearConfigData() *ConnectorUpsert

ClearConfigData clears the value of the "config_data" field.

func (*ConnectorUpsert) ClearDescription

func (u *ConnectorUpsert) ClearDescription() *ConnectorUpsert

ClearDescription clears the value of the "description" field.

func (*ConnectorUpsert) ClearFinOpsCustomPricing

func (u *ConnectorUpsert) ClearFinOpsCustomPricing() *ConnectorUpsert

ClearFinOpsCustomPricing clears the value of the "fin_ops_custom_pricing" field.

func (*ConnectorUpsert) ClearLabels

func (u *ConnectorUpsert) ClearLabels() *ConnectorUpsert

ClearLabels clears the value of the "labels" field.

func (*ConnectorUpsert) ClearStatus

func (u *ConnectorUpsert) ClearStatus() *ConnectorUpsert

ClearStatus clears the value of the "status" field.

func (*ConnectorUpsert) SetAnnotations

func (u *ConnectorUpsert) SetAnnotations(v map[string]string) *ConnectorUpsert

SetAnnotations sets the "annotations" field.

func (*ConnectorUpsert) SetConfigData

func (u *ConnectorUpsert) SetConfigData(v crypto.Properties) *ConnectorUpsert

SetConfigData sets the "config_data" field.

func (*ConnectorUpsert) SetConfigVersion

func (u *ConnectorUpsert) SetConfigVersion(v string) *ConnectorUpsert

SetConfigVersion sets the "config_version" field.

func (*ConnectorUpsert) SetDescription

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

SetDescription sets the "description" field.

func (*ConnectorUpsert) SetEnableFinOps

func (u *ConnectorUpsert) SetEnableFinOps(v bool) *ConnectorUpsert

SetEnableFinOps sets the "enable_fin_ops" field.

func (*ConnectorUpsert) SetFinOpsCustomPricing

func (u *ConnectorUpsert) SetFinOpsCustomPricing(v *types.FinOpsCustomPricing) *ConnectorUpsert

SetFinOpsCustomPricing sets the "fin_ops_custom_pricing" field.

func (*ConnectorUpsert) SetLabels

func (u *ConnectorUpsert) SetLabels(v map[string]string) *ConnectorUpsert

SetLabels sets the "labels" field.

func (*ConnectorUpsert) SetStatus

func (u *ConnectorUpsert) SetStatus(v status.Status) *ConnectorUpsert

SetStatus sets the "status" field.

func (*ConnectorUpsert) SetUpdateTime

func (u *ConnectorUpsert) SetUpdateTime(v time.Time) *ConnectorUpsert

SetUpdateTime sets the "update_time" field.

func (*ConnectorUpsert) UpdateAnnotations

func (u *ConnectorUpsert) UpdateAnnotations() *ConnectorUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ConnectorUpsert) UpdateConfigData

func (u *ConnectorUpsert) UpdateConfigData() *ConnectorUpsert

UpdateConfigData sets the "config_data" field to the value that was provided on create.

func (*ConnectorUpsert) UpdateConfigVersion

func (u *ConnectorUpsert) UpdateConfigVersion() *ConnectorUpsert

UpdateConfigVersion sets the "config_version" field to the value that was provided on create.

func (*ConnectorUpsert) UpdateDescription

func (u *ConnectorUpsert) UpdateDescription() *ConnectorUpsert

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

func (*ConnectorUpsert) UpdateEnableFinOps

func (u *ConnectorUpsert) UpdateEnableFinOps() *ConnectorUpsert

UpdateEnableFinOps sets the "enable_fin_ops" field to the value that was provided on create.

func (*ConnectorUpsert) UpdateFinOpsCustomPricing

func (u *ConnectorUpsert) UpdateFinOpsCustomPricing() *ConnectorUpsert

UpdateFinOpsCustomPricing sets the "fin_ops_custom_pricing" field to the value that was provided on create.

func (*ConnectorUpsert) UpdateLabels

func (u *ConnectorUpsert) UpdateLabels() *ConnectorUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ConnectorUpsert) UpdateStatus

func (u *ConnectorUpsert) UpdateStatus() *ConnectorUpsert

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

func (*ConnectorUpsert) UpdateUpdateTime

func (u *ConnectorUpsert) UpdateUpdateTime() *ConnectorUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ConnectorUpsertBulk

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

ConnectorUpsertBulk is the builder for "upsert"-ing a bulk of Connector nodes.

func (*ConnectorUpsertBulk) ClearAnnotations

func (u *ConnectorUpsertBulk) ClearAnnotations() *ConnectorUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*ConnectorUpsertBulk) ClearConfigData

func (u *ConnectorUpsertBulk) ClearConfigData() *ConnectorUpsertBulk

ClearConfigData clears the value of the "config_data" field.

func (*ConnectorUpsertBulk) ClearDescription

func (u *ConnectorUpsertBulk) ClearDescription() *ConnectorUpsertBulk

ClearDescription clears the value of the "description" field.

func (*ConnectorUpsertBulk) ClearFinOpsCustomPricing

func (u *ConnectorUpsertBulk) ClearFinOpsCustomPricing() *ConnectorUpsertBulk

ClearFinOpsCustomPricing clears the value of the "fin_ops_custom_pricing" field.

func (*ConnectorUpsertBulk) ClearLabels

func (u *ConnectorUpsertBulk) ClearLabels() *ConnectorUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*ConnectorUpsertBulk) ClearStatus

func (u *ConnectorUpsertBulk) ClearStatus() *ConnectorUpsertBulk

ClearStatus clears the value of the "status" field.

func (*ConnectorUpsertBulk) DoNothing

func (u *ConnectorUpsertBulk) DoNothing() *ConnectorUpsertBulk

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

func (*ConnectorUpsertBulk) Exec

Exec executes the query.

func (*ConnectorUpsertBulk) ExecE

func (u *ConnectorUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Connector) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ConnectorUpsertBulk) ExecEX

func (u *ConnectorUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Connector) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ConnectorUpsertBulk) ExecX

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

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

func (*ConnectorUpsertBulk) Ignore

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

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

func (*ConnectorUpsertBulk) SetAnnotations

func (u *ConnectorUpsertBulk) SetAnnotations(v map[string]string) *ConnectorUpsertBulk

SetAnnotations sets the "annotations" field.

func (*ConnectorUpsertBulk) SetConfigData

SetConfigData sets the "config_data" field.

func (*ConnectorUpsertBulk) SetConfigVersion

func (u *ConnectorUpsertBulk) SetConfigVersion(v string) *ConnectorUpsertBulk

SetConfigVersion sets the "config_version" field.

func (*ConnectorUpsertBulk) SetDescription

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

SetDescription sets the "description" field.

func (*ConnectorUpsertBulk) SetEnableFinOps

func (u *ConnectorUpsertBulk) SetEnableFinOps(v bool) *ConnectorUpsertBulk

SetEnableFinOps sets the "enable_fin_ops" field.

func (*ConnectorUpsertBulk) SetFinOpsCustomPricing

func (u *ConnectorUpsertBulk) SetFinOpsCustomPricing(v *types.FinOpsCustomPricing) *ConnectorUpsertBulk

SetFinOpsCustomPricing sets the "fin_ops_custom_pricing" field.

func (*ConnectorUpsertBulk) SetLabels

SetLabels sets the "labels" field.

func (*ConnectorUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*ConnectorUpsertBulk) SetUpdateTime

func (u *ConnectorUpsertBulk) SetUpdateTime(v time.Time) *ConnectorUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*ConnectorUpsertBulk) Update

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

func (*ConnectorUpsertBulk) UpdateAnnotations

func (u *ConnectorUpsertBulk) UpdateAnnotations() *ConnectorUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ConnectorUpsertBulk) UpdateConfigData

func (u *ConnectorUpsertBulk) UpdateConfigData() *ConnectorUpsertBulk

UpdateConfigData sets the "config_data" field to the value that was provided on create.

func (*ConnectorUpsertBulk) UpdateConfigVersion

func (u *ConnectorUpsertBulk) UpdateConfigVersion() *ConnectorUpsertBulk

UpdateConfigVersion sets the "config_version" field to the value that was provided on create.

func (*ConnectorUpsertBulk) UpdateDescription

func (u *ConnectorUpsertBulk) UpdateDescription() *ConnectorUpsertBulk

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

func (*ConnectorUpsertBulk) UpdateEnableFinOps

func (u *ConnectorUpsertBulk) UpdateEnableFinOps() *ConnectorUpsertBulk

UpdateEnableFinOps sets the "enable_fin_ops" field to the value that was provided on create.

func (*ConnectorUpsertBulk) UpdateFinOpsCustomPricing

func (u *ConnectorUpsertBulk) UpdateFinOpsCustomPricing() *ConnectorUpsertBulk

UpdateFinOpsCustomPricing sets the "fin_ops_custom_pricing" field to the value that was provided on create.

func (*ConnectorUpsertBulk) UpdateLabels

func (u *ConnectorUpsertBulk) UpdateLabels() *ConnectorUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ConnectorUpsertBulk) UpdateNewValues

func (u *ConnectorUpsertBulk) UpdateNewValues() *ConnectorUpsertBulk

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

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

func (*ConnectorUpsertBulk) UpdateStatus

func (u *ConnectorUpsertBulk) UpdateStatus() *ConnectorUpsertBulk

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

func (*ConnectorUpsertBulk) UpdateUpdateTime

func (u *ConnectorUpsertBulk) UpdateUpdateTime() *ConnectorUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ConnectorUpsertOne

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

ConnectorUpsertOne is the builder for "upsert"-ing

one Connector node.

func (*ConnectorUpsertOne) ClearAnnotations

func (u *ConnectorUpsertOne) ClearAnnotations() *ConnectorUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*ConnectorUpsertOne) ClearConfigData

func (u *ConnectorUpsertOne) ClearConfigData() *ConnectorUpsertOne

ClearConfigData clears the value of the "config_data" field.

func (*ConnectorUpsertOne) ClearDescription

func (u *ConnectorUpsertOne) ClearDescription() *ConnectorUpsertOne

ClearDescription clears the value of the "description" field.

func (*ConnectorUpsertOne) ClearFinOpsCustomPricing

func (u *ConnectorUpsertOne) ClearFinOpsCustomPricing() *ConnectorUpsertOne

ClearFinOpsCustomPricing clears the value of the "fin_ops_custom_pricing" field.

func (*ConnectorUpsertOne) ClearLabels

func (u *ConnectorUpsertOne) ClearLabels() *ConnectorUpsertOne

ClearLabels clears the value of the "labels" field.

func (*ConnectorUpsertOne) ClearStatus

func (u *ConnectorUpsertOne) ClearStatus() *ConnectorUpsertOne

ClearStatus clears the value of the "status" field.

func (*ConnectorUpsertOne) DoNothing

func (u *ConnectorUpsertOne) DoNothing() *ConnectorUpsertOne

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

func (*ConnectorUpsertOne) Exec

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

Exec executes the query.

func (*ConnectorUpsertOne) ExecE

func (u *ConnectorUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Connector) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ConnectorUpsertOne) ExecEX

func (u *ConnectorUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Connector) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ConnectorUpsertOne) ExecX

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

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

func (*ConnectorUpsertOne) ID

func (u *ConnectorUpsertOne) ID(ctx context.Context) (id object.ID, err error)

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

func (*ConnectorUpsertOne) IDX

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

func (*ConnectorUpsertOne) Ignore

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

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

func (*ConnectorUpsertOne) SetAnnotations

func (u *ConnectorUpsertOne) SetAnnotations(v map[string]string) *ConnectorUpsertOne

SetAnnotations sets the "annotations" field.

func (*ConnectorUpsertOne) SetConfigData

SetConfigData sets the "config_data" field.

func (*ConnectorUpsertOne) SetConfigVersion

func (u *ConnectorUpsertOne) SetConfigVersion(v string) *ConnectorUpsertOne

SetConfigVersion sets the "config_version" field.

func (*ConnectorUpsertOne) SetDescription

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

SetDescription sets the "description" field.

func (*ConnectorUpsertOne) SetEnableFinOps

func (u *ConnectorUpsertOne) SetEnableFinOps(v bool) *ConnectorUpsertOne

SetEnableFinOps sets the "enable_fin_ops" field.

func (*ConnectorUpsertOne) SetFinOpsCustomPricing

func (u *ConnectorUpsertOne) SetFinOpsCustomPricing(v *types.FinOpsCustomPricing) *ConnectorUpsertOne

SetFinOpsCustomPricing sets the "fin_ops_custom_pricing" field.

func (*ConnectorUpsertOne) SetLabels

func (u *ConnectorUpsertOne) SetLabels(v map[string]string) *ConnectorUpsertOne

SetLabels sets the "labels" field.

func (*ConnectorUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*ConnectorUpsertOne) SetUpdateTime

func (u *ConnectorUpsertOne) SetUpdateTime(v time.Time) *ConnectorUpsertOne

SetUpdateTime sets the "update_time" field.

func (*ConnectorUpsertOne) Update

func (u *ConnectorUpsertOne) Update(set func(*ConnectorUpsert)) *ConnectorUpsertOne

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

func (*ConnectorUpsertOne) UpdateAnnotations

func (u *ConnectorUpsertOne) UpdateAnnotations() *ConnectorUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ConnectorUpsertOne) UpdateConfigData

func (u *ConnectorUpsertOne) UpdateConfigData() *ConnectorUpsertOne

UpdateConfigData sets the "config_data" field to the value that was provided on create.

func (*ConnectorUpsertOne) UpdateConfigVersion

func (u *ConnectorUpsertOne) UpdateConfigVersion() *ConnectorUpsertOne

UpdateConfigVersion sets the "config_version" field to the value that was provided on create.

func (*ConnectorUpsertOne) UpdateDescription

func (u *ConnectorUpsertOne) UpdateDescription() *ConnectorUpsertOne

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

func (*ConnectorUpsertOne) UpdateEnableFinOps

func (u *ConnectorUpsertOne) UpdateEnableFinOps() *ConnectorUpsertOne

UpdateEnableFinOps sets the "enable_fin_ops" field to the value that was provided on create.

func (*ConnectorUpsertOne) UpdateFinOpsCustomPricing

func (u *ConnectorUpsertOne) UpdateFinOpsCustomPricing() *ConnectorUpsertOne

UpdateFinOpsCustomPricing sets the "fin_ops_custom_pricing" field to the value that was provided on create.

func (*ConnectorUpsertOne) UpdateLabels

func (u *ConnectorUpsertOne) UpdateLabels() *ConnectorUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ConnectorUpsertOne) UpdateNewValues

func (u *ConnectorUpsertOne) UpdateNewValues() *ConnectorUpsertOne

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

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

func (*ConnectorUpsertOne) UpdateStatus

func (u *ConnectorUpsertOne) UpdateStatus() *ConnectorUpsertOne

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

func (*ConnectorUpsertOne) UpdateUpdateTime

func (u *ConnectorUpsertOne) UpdateUpdateTime() *ConnectorUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Connectors

type Connectors []*Connector

Connectors is a parsable slice of Connector.

func (Connectors) View

func (_cs Connectors) View() []*ConnectorOutput

View returns the output of Connector entities.

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 CostReport

type CostReport struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Usage start time for current cost.
	StartTime time.Time `json:"start_time,omitempty"`
	// Usage end time for current cost.
	EndTime time.Time `json:"end_time,omitempty"`
	// Usage minutes from start time to end time.
	Minutes float64 `json:"minutes,omitempty"`
	// ID of the connector.
	ConnectorID object.ID `json:"connector_id,omitempty"`
	// Resource name for current cost, could be __unmounted__.
	Name string `json:"name,omitempty"`
	// String generated from resource properties, used to identify this cost.
	Fingerprint string `json:"fingerprint,omitempty"`
	// Cluster name for current cost.
	ClusterName string `json:"cluster_name,omitempty"`
	// Namespace for current cost.
	Namespace string `json:"namespace,omitempty"`
	// Node for current cost.
	Node string `json:"node,omitempty"`
	// Controller name for the cost linked resource.
	Controller string `json:"controller,omitempty"`
	// Controller kind for the cost linked resource, deployment, statefulSet etc.
	ControllerKind string `json:"controller_kind,omitempty"`
	// Pod name for current cost.
	Pod string `json:"pod,omitempty"`
	// Container name for current cost.
	Container string `json:"container,omitempty"`
	// PV list for current cost linked.
	Pvs map[string]types.PVCost `json:"pvs,omitempty"`
	// Labels for the cost linked resource.
	Labels map[string]string `json:"labels,omitempty"`
	// Cost number.
	TotalCost float64 `json:"totalCost,omitempty"`
	// Cost currency.
	Currency int `json:"currency,omitempty"`
	// Cpu cost for current cost.
	CPUCost float64 `json:"cpu_cost,omitempty"`
	// Cpu core requested.
	CPUCoreRequest float64 `json:"cpu_core_request,omitempty"`
	// GPU cost for current cost.
	GPUCost float64 `json:"gpu_cost,omitempty"`
	// GPU core count.
	GPUCount float64 `json:"gpu_count,omitempty"`
	// Ram cost for current cost.
	RAMCost float64 `json:"ram_cost,omitempty"`
	// Ram requested in byte.
	RAMByteRequest float64 `json:"ram_byte_request,omitempty"`
	// PV cost for current cost linked.
	PVCost float64 `json:"pv_cost,omitempty"`
	// PV bytes for current cost linked.
	PVBytes float64 `json:"pv_bytes,omitempty"`
	// LoadBalancer cost for current cost linked.
	LoadBalancerCost float64 `json:"load_balancer_cost,omitempty"`
	// CPU core average usage.
	CPUCoreUsageAverage float64 `json:"cpu_core_usage_average,omitempty"`
	// CPU core max usage.
	CPUCoreUsageMax float64 `json:"cpu_core_usage_max,omitempty"`
	// Ram average usage in byte.
	RAMByteUsageAverage float64 `json:"ram_byte_usage_average,omitempty"`
	// Ram max usage in byte.
	RAMByteUsageMax float64 `json:"ram_byte_usage_max,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CostReportQuery when eager-loading is set.
	Edges CostReportEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

CostReport is the model entity for the CostReport schema.

func (*CostReport) ExecContext

func (c *CostReport) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReport) QueryConnector

func (cr *CostReport) QueryConnector() *ConnectorQuery

QueryConnector queries the "connector" edge of the CostReport entity.

func (*CostReport) QueryContext

func (c *CostReport) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReport) String

func (cr *CostReport) String() string

String implements the fmt.Stringer.

func (*CostReport) Unwrap

func (cr *CostReport) Unwrap() *CostReport

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

func (cr *CostReport) Update() *CostReportUpdateOne

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

func (*CostReport) Value

func (cr *CostReport) Value(name string) (ent.Value, error)

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

func (*CostReport) View

func (_cr *CostReport) View() *CostReportOutput

View returns the output of CostReport entity.

type CostReportClient

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

CostReportClient is a client for the CostReport schema.

func NewCostReportClient

func NewCostReportClient(c config) *CostReportClient

NewCostReportClient returns a client for the CostReport from the given config.

func (*CostReportClient) Create

func (c *CostReportClient) Create() *CostReportCreate

Create returns a builder for creating a CostReport entity.

func (*CostReportClient) CreateBulk

func (c *CostReportClient) CreateBulk(builders ...*CostReportCreate) *CostReportCreateBulk

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

func (*CostReportClient) Delete

func (c *CostReportClient) Delete() *CostReportDelete

Delete returns a delete builder for CostReport.

func (*CostReportClient) DeleteOne

func (c *CostReportClient) DeleteOne(cr *CostReport) *CostReportDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CostReportClient) DeleteOneID

func (c *CostReportClient) DeleteOneID(id int) *CostReportDeleteOne

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

func (*CostReportClient) ExecContext

func (c *CostReportClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReportClient) Get

func (c *CostReportClient) Get(ctx context.Context, id int) (*CostReport, error)

Get returns a CostReport entity by its id.

func (*CostReportClient) GetX

func (c *CostReportClient) GetX(ctx context.Context, id int) *CostReport

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

func (*CostReportClient) Hooks

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

Hooks returns the client hooks.

func (*CostReportClient) Intercept

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

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

func (*CostReportClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CostReportClient) MapCreateBulk added in v0.5.0

func (c *CostReportClient) MapCreateBulk(slice any, setFunc func(*CostReportCreate, int)) *CostReportCreateBulk

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

func (c *CostReportClient) Query() *CostReportQuery

Query returns a query builder for CostReport.

func (*CostReportClient) QueryConnector

func (c *CostReportClient) QueryConnector(cr *CostReport) *ConnectorQuery

QueryConnector queries the connector edge of a CostReport.

func (*CostReportClient) QueryContext

func (c *CostReportClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReportClient) Update

func (c *CostReportClient) Update() *CostReportUpdate

Update returns an update builder for CostReport.

func (*CostReportClient) UpdateOne

func (c *CostReportClient) UpdateOne(cr *CostReport) *CostReportUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CostReportClient) UpdateOneID

func (c *CostReportClient) UpdateOneID(id int) *CostReportUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CostReportClient) Use

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

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

type CostReportClientGetter

type CostReportClientGetter interface {
	// CostReports returns the client for interacting with the CostReport builders.
	CostReports() *CostReportClient
}

CostReportClientGetter is an interface that allows getting CostReportClient.

type CostReportCreate

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

CostReportCreate is the builder for creating a CostReport entity.

func (*CostReportCreate) Exec

func (crc *CostReportCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CostReportCreate) ExecContext

func (c *CostReportCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReportCreate) ExecE

func (crc *CostReportCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *CostReport) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*CostReportCreate) ExecEX

func (crc *CostReportCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *CostReport) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*CostReportCreate) ExecX

func (crc *CostReportCreate) ExecX(ctx context.Context)

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

func (*CostReportCreate) Mutation

func (crc *CostReportCreate) Mutation() *CostReportMutation

Mutation returns the CostReportMutation object of the builder.

func (*CostReportCreate) OnConflict

func (crc *CostReportCreate) OnConflict(opts ...sql.ConflictOption) *CostReportUpsertOne

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

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

func (*CostReportCreate) OnConflictColumns

func (crc *CostReportCreate) OnConflictColumns(columns ...string) *CostReportUpsertOne

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

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

func (*CostReportCreate) QueryContext

func (c *CostReportCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReportCreate) Save

func (crc *CostReportCreate) Save(ctx context.Context) (*CostReport, error)

Save creates the CostReport in the database.

func (*CostReportCreate) SaveE

func (crc *CostReportCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *CostReport) error) (*CostReport, error)

SaveE calls the given function after created the CostReport entity, which is always good for cascading create operations.

func (*CostReportCreate) SaveEX

func (crc *CostReportCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *CostReport) error) *CostReport

SaveEX is like SaveE, but panics if an error occurs.

func (*CostReportCreate) SaveX

func (crc *CostReportCreate) SaveX(ctx context.Context) *CostReport

SaveX calls Save and panics if Save returns an error.

func (*CostReportCreate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*CostReportCreate) SetCPUCoreRequest

func (crc *CostReportCreate) SetCPUCoreRequest(f float64) *CostReportCreate

SetCPUCoreRequest sets the "cpu_core_request" field.

func (*CostReportCreate) SetCPUCoreUsageAverage

func (crc *CostReportCreate) SetCPUCoreUsageAverage(f float64) *CostReportCreate

SetCPUCoreUsageAverage sets the "cpu_core_usage_average" field.

func (*CostReportCreate) SetCPUCoreUsageMax

func (crc *CostReportCreate) SetCPUCoreUsageMax(f float64) *CostReportCreate

SetCPUCoreUsageMax sets the "cpu_core_usage_max" field.

func (*CostReportCreate) SetCPUCost

func (crc *CostReportCreate) SetCPUCost(f float64) *CostReportCreate

SetCPUCost sets the "cpu_cost" field.

func (*CostReportCreate) SetClusterName

func (crc *CostReportCreate) SetClusterName(s string) *CostReportCreate

SetClusterName sets the "cluster_name" field.

func (*CostReportCreate) SetConnector

func (crc *CostReportCreate) SetConnector(c *Connector) *CostReportCreate

SetConnector sets the "connector" edge to the Connector entity.

func (*CostReportCreate) SetConnectorID

func (crc *CostReportCreate) SetConnectorID(o object.ID) *CostReportCreate

SetConnectorID sets the "connector_id" field.

func (*CostReportCreate) SetContainer

func (crc *CostReportCreate) SetContainer(s string) *CostReportCreate

SetContainer sets the "container" field.

func (*CostReportCreate) SetController

func (crc *CostReportCreate) SetController(s string) *CostReportCreate

SetController sets the "controller" field.

func (*CostReportCreate) SetControllerKind

func (crc *CostReportCreate) SetControllerKind(s string) *CostReportCreate

SetControllerKind sets the "controller_kind" field.

func (*CostReportCreate) SetCurrency

func (crc *CostReportCreate) SetCurrency(i int) *CostReportCreate

SetCurrency sets the "currency" field.

func (*CostReportCreate) SetEndTime

func (crc *CostReportCreate) SetEndTime(t time.Time) *CostReportCreate

SetEndTime sets the "end_time" field.

func (*CostReportCreate) SetFingerprint

func (crc *CostReportCreate) SetFingerprint(s string) *CostReportCreate

SetFingerprint sets the "fingerprint" field.

func (*CostReportCreate) SetGPUCost

func (crc *CostReportCreate) SetGPUCost(f float64) *CostReportCreate

SetGPUCost sets the "gpu_cost" field.

func (*CostReportCreate) SetGPUCount

func (crc *CostReportCreate) SetGPUCount(f float64) *CostReportCreate

SetGPUCount sets the "gpu_count" field.

func (*CostReportCreate) SetLabels

func (crc *CostReportCreate) SetLabels(m map[string]string) *CostReportCreate

SetLabels sets the "labels" field.

func (*CostReportCreate) SetLoadBalancerCost

func (crc *CostReportCreate) SetLoadBalancerCost(f float64) *CostReportCreate

SetLoadBalancerCost sets the "load_balancer_cost" field.

func (*CostReportCreate) SetMinutes

func (crc *CostReportCreate) SetMinutes(f float64) *CostReportCreate

SetMinutes sets the "minutes" field.

func (*CostReportCreate) SetName

func (crc *CostReportCreate) SetName(s string) *CostReportCreate

SetName sets the "name" field.

func (*CostReportCreate) SetNamespace

func (crc *CostReportCreate) SetNamespace(s string) *CostReportCreate

SetNamespace sets the "namespace" field.

func (*CostReportCreate) SetNillableCPUCoreRequest

func (crc *CostReportCreate) SetNillableCPUCoreRequest(f *float64) *CostReportCreate

SetNillableCPUCoreRequest sets the "cpu_core_request" field if the given value is not nil.

func (*CostReportCreate) SetNillableCPUCoreUsageAverage

func (crc *CostReportCreate) SetNillableCPUCoreUsageAverage(f *float64) *CostReportCreate

SetNillableCPUCoreUsageAverage sets the "cpu_core_usage_average" field if the given value is not nil.

func (*CostReportCreate) SetNillableCPUCoreUsageMax

func (crc *CostReportCreate) SetNillableCPUCoreUsageMax(f *float64) *CostReportCreate

SetNillableCPUCoreUsageMax sets the "cpu_core_usage_max" field if the given value is not nil.

func (*CostReportCreate) SetNillableCPUCost

func (crc *CostReportCreate) SetNillableCPUCost(f *float64) *CostReportCreate

SetNillableCPUCost sets the "cpu_cost" field if the given value is not nil.

func (*CostReportCreate) SetNillableClusterName

func (crc *CostReportCreate) SetNillableClusterName(s *string) *CostReportCreate

SetNillableClusterName sets the "cluster_name" field if the given value is not nil.

func (*CostReportCreate) SetNillableContainer

func (crc *CostReportCreate) SetNillableContainer(s *string) *CostReportCreate

SetNillableContainer sets the "container" field if the given value is not nil.

func (*CostReportCreate) SetNillableController

func (crc *CostReportCreate) SetNillableController(s *string) *CostReportCreate

SetNillableController sets the "controller" field if the given value is not nil.

func (*CostReportCreate) SetNillableControllerKind

func (crc *CostReportCreate) SetNillableControllerKind(s *string) *CostReportCreate

SetNillableControllerKind sets the "controller_kind" field if the given value is not nil.

func (*CostReportCreate) SetNillableCurrency

func (crc *CostReportCreate) SetNillableCurrency(i *int) *CostReportCreate

SetNillableCurrency sets the "currency" field if the given value is not nil.

func (*CostReportCreate) SetNillableGPUCost

func (crc *CostReportCreate) SetNillableGPUCost(f *float64) *CostReportCreate

SetNillableGPUCost sets the "gpu_cost" field if the given value is not nil.

func (*CostReportCreate) SetNillableGPUCount

func (crc *CostReportCreate) SetNillableGPUCount(f *float64) *CostReportCreate

SetNillableGPUCount sets the "gpu_count" field if the given value is not nil.

func (*CostReportCreate) SetNillableLoadBalancerCost

func (crc *CostReportCreate) SetNillableLoadBalancerCost(f *float64) *CostReportCreate

SetNillableLoadBalancerCost sets the "load_balancer_cost" field if the given value is not nil.

func (*CostReportCreate) SetNillableNamespace

func (crc *CostReportCreate) SetNillableNamespace(s *string) *CostReportCreate

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*CostReportCreate) SetNillableNode

func (crc *CostReportCreate) SetNillableNode(s *string) *CostReportCreate

SetNillableNode sets the "node" field if the given value is not nil.

func (*CostReportCreate) SetNillablePVBytes

func (crc *CostReportCreate) SetNillablePVBytes(f *float64) *CostReportCreate

SetNillablePVBytes sets the "pv_bytes" field if the given value is not nil.

func (*CostReportCreate) SetNillablePVCost

func (crc *CostReportCreate) SetNillablePVCost(f *float64) *CostReportCreate

SetNillablePVCost sets the "pv_cost" field if the given value is not nil.

func (*CostReportCreate) SetNillablePod

func (crc *CostReportCreate) SetNillablePod(s *string) *CostReportCreate

SetNillablePod sets the "pod" field if the given value is not nil.

func (*CostReportCreate) SetNillableRAMByteRequest

func (crc *CostReportCreate) SetNillableRAMByteRequest(f *float64) *CostReportCreate

SetNillableRAMByteRequest sets the "ram_byte_request" field if the given value is not nil.

func (*CostReportCreate) SetNillableRAMByteUsageAverage

func (crc *CostReportCreate) SetNillableRAMByteUsageAverage(f *float64) *CostReportCreate

SetNillableRAMByteUsageAverage sets the "ram_byte_usage_average" field if the given value is not nil.

func (*CostReportCreate) SetNillableRAMByteUsageMax

func (crc *CostReportCreate) SetNillableRAMByteUsageMax(f *float64) *CostReportCreate

SetNillableRAMByteUsageMax sets the "ram_byte_usage_max" field if the given value is not nil.

func (*CostReportCreate) SetNillableRAMCost

func (crc *CostReportCreate) SetNillableRAMCost(f *float64) *CostReportCreate

SetNillableRAMCost sets the "ram_cost" field if the given value is not nil.

func (*CostReportCreate) SetNillableTotalCost

func (crc *CostReportCreate) SetNillableTotalCost(f *float64) *CostReportCreate

SetNillableTotalCost sets the "totalCost" field if the given value is not nil.

func (*CostReportCreate) SetNode

func (crc *CostReportCreate) SetNode(s string) *CostReportCreate

SetNode sets the "node" field.

func (*CostReportCreate) SetPVBytes

func (crc *CostReportCreate) SetPVBytes(f float64) *CostReportCreate

SetPVBytes sets the "pv_bytes" field.

func (*CostReportCreate) SetPVCost

func (crc *CostReportCreate) SetPVCost(f float64) *CostReportCreate

SetPVCost sets the "pv_cost" field.

func (*CostReportCreate) SetPod

func (crc *CostReportCreate) SetPod(s string) *CostReportCreate

SetPod sets the "pod" field.

func (*CostReportCreate) SetPvs

func (crc *CostReportCreate) SetPvs(mc map[string]types.PVCost) *CostReportCreate

SetPvs sets the "pvs" field.

func (*CostReportCreate) SetRAMByteRequest

func (crc *CostReportCreate) SetRAMByteRequest(f float64) *CostReportCreate

SetRAMByteRequest sets the "ram_byte_request" field.

func (*CostReportCreate) SetRAMByteUsageAverage

func (crc *CostReportCreate) SetRAMByteUsageAverage(f float64) *CostReportCreate

SetRAMByteUsageAverage sets the "ram_byte_usage_average" field.

func (*CostReportCreate) SetRAMByteUsageMax

func (crc *CostReportCreate) SetRAMByteUsageMax(f float64) *CostReportCreate

SetRAMByteUsageMax sets the "ram_byte_usage_max" field.

func (*CostReportCreate) SetRAMCost

func (crc *CostReportCreate) SetRAMCost(f float64) *CostReportCreate

SetRAMCost sets the "ram_cost" field.

func (*CostReportCreate) SetStartTime

func (crc *CostReportCreate) SetStartTime(t time.Time) *CostReportCreate

SetStartTime sets the "start_time" field.

func (*CostReportCreate) SetTotalCost

func (crc *CostReportCreate) SetTotalCost(f float64) *CostReportCreate

SetTotalCost sets the "totalCost" field.

type CostReportCreateBulk

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

CostReportCreateBulk is the builder for creating many CostReport entities in bulk.

func (*CostReportCreateBulk) Exec

func (crcb *CostReportCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CostReportCreateBulk) ExecContext

func (c *CostReportCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReportCreateBulk) ExecE

func (crcb *CostReportCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *CostReport) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*CostReportCreateBulk) ExecEX

func (crcb *CostReportCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *CostReport) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*CostReportCreateBulk) ExecX

func (crcb *CostReportCreateBulk) ExecX(ctx context.Context)

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

func (*CostReportCreateBulk) OnConflict

func (crcb *CostReportCreateBulk) OnConflict(opts ...sql.ConflictOption) *CostReportUpsertBulk

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

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

func (*CostReportCreateBulk) OnConflictColumns

func (crcb *CostReportCreateBulk) OnConflictColumns(columns ...string) *CostReportUpsertBulk

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

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

func (*CostReportCreateBulk) QueryContext

func (c *CostReportCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReportCreateBulk) Save

func (crcb *CostReportCreateBulk) Save(ctx context.Context) ([]*CostReport, error)

Save creates the CostReport entities in the database.

func (*CostReportCreateBulk) SaveE

func (crcb *CostReportCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *CostReport) error) ([]*CostReport, error)

SaveE calls the given function after created the CostReport entities, which is always good for cascading create operations.

func (*CostReportCreateBulk) SaveEX

func (crcb *CostReportCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *CostReport) error) []*CostReport

SaveEX is like SaveE, but panics if an error occurs.

func (*CostReportCreateBulk) SaveX

func (crcb *CostReportCreateBulk) SaveX(ctx context.Context) []*CostReport

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

func (*CostReportCreateBulk) Set

Set leverages the CostReportCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type CostReportCreateInput

type CostReportCreateInput struct {

	// String generated from resource properties, used to identify this cost.
	Fingerprint string `path:"-" query:"-" json:"fingerprint"`
	// Resource name for current cost, could be __unmounted__.
	Name string `path:"-" query:"-" json:"name"`
	// Usage minutes from start time to end time.
	Minutes float64 `path:"-" query:"-" json:"minutes"`
	// Usage end time for current cost.
	EndTime time.Time `path:"-" query:"-" json:"endTime"`
	// Usage start time for current cost.
	StartTime time.Time `path:"-" query:"-" json:"startTime"`
	// Cluster name for current cost.
	ClusterName string `path:"-" query:"-" json:"clusterName,omitempty"`
	// Namespace for current cost.
	Namespace string `path:"-" query:"-" json:"namespace,omitempty"`
	// Node for current cost.
	Node string `path:"-" query:"-" json:"node,omitempty"`
	// Controller name for the cost linked resource.
	Controller string `path:"-" query:"-" json:"controller,omitempty"`
	// Controller kind for the cost linked resource, deployment, statefulSet etc.
	ControllerKind string `path:"-" query:"-" json:"controllerKind,omitempty"`
	// Pod name for current cost.
	Pod string `path:"-" query:"-" json:"pod,omitempty"`
	// Container name for current cost.
	Container string `path:"-" query:"-" json:"container,omitempty"`
	// PV list for current cost linked.
	Pvs map[string]types.PVCost `path:"-" query:"-" json:"pvs,omitempty"`
	// Labels for the cost linked resource.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Cost number.
	TotalCost float64 `path:"-" query:"-" json:"totalCost,omitempty"`
	// Cost currency.
	Currency int `path:"-" query:"-" json:"currency,omitempty"`
	// Cpu cost for current cost.
	CPUCost float64 `path:"-" query:"-" json:"cpuCost,omitempty"`
	// Cpu core requested.
	CPUCoreRequest float64 `path:"-" query:"-" json:"cpuCoreRequest,omitempty"`
	// GPU cost for current cost.
	GPUCost float64 `path:"-" query:"-" json:"gpuCost,omitempty"`
	// GPU core count.
	GPUCount float64 `path:"-" query:"-" json:"gpuCount,omitempty"`
	// Ram cost for current cost.
	RAMCost float64 `path:"-" query:"-" json:"ramCost,omitempty"`
	// Ram requested in byte.
	RAMByteRequest float64 `path:"-" query:"-" json:"ramByteRequest,omitempty"`
	// PV cost for current cost linked.
	PVCost float64 `path:"-" query:"-" json:"pvCost,omitempty"`
	// PV bytes for current cost linked.
	PVBytes float64 `path:"-" query:"-" json:"pvBytes,omitempty"`
	// LoadBalancer cost for current cost linked.
	LoadBalancerCost float64 `path:"-" query:"-" json:"loadBalancerCost,omitempty"`
	// CPU core average usage.
	CPUCoreUsageAverage float64 `path:"-" query:"-" json:"cpuCoreUsageAverage,omitempty"`
	// CPU core max usage.
	CPUCoreUsageMax float64 `path:"-" query:"-" json:"cpuCoreUsageMax,omitempty"`
	// Ram average usage in byte.
	RAMByteUsageAverage float64 `path:"-" query:"-" json:"ramByteUsageAverage,omitempty"`
	// Ram max usage in byte.
	RAMByteUsageMax float64 `path:"-" query:"-" json:"ramByteUsageMax,omitempty"`
	// contains filtered or unexported fields
}

CostReportCreateInput holds the creation input of the CostReport entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*CostReportCreateInput) Model

func (crci *CostReportCreateInput) Model() *CostReport

Model returns the CostReport entity for creating, after validating.

func (*CostReportCreateInput) SetGinContext

func (ic *CostReportCreateInput) SetGinContext(ctx *gin.Context)

func (*CostReportCreateInput) SetModelClient

func (ic *CostReportCreateInput) SetModelClient(cli *Client)

func (*CostReportCreateInput) Validate

func (crci *CostReportCreateInput) Validate() error

Validate checks the CostReportCreateInput entity.

func (*CostReportCreateInput) ValidateWith

func (crci *CostReportCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportCreateInput entity with the given context and client set.

type CostReportCreateInputs

type CostReportCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*CostReportCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

CostReportCreateInputs holds the creation input of the CostReport entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*CostReportCreateInputs) Model

func (crci *CostReportCreateInputs) Model() []*CostReport

Model returns the CostReport entities for creating, after validating.

func (*CostReportCreateInputs) SetGinContext

func (ic *CostReportCreateInputs) SetGinContext(ctx *gin.Context)

func (*CostReportCreateInputs) SetModelClient

func (ic *CostReportCreateInputs) SetModelClient(cli *Client)

func (*CostReportCreateInputs) Validate

func (crci *CostReportCreateInputs) Validate() error

Validate checks the CostReportCreateInputs entity .

func (*CostReportCreateInputs) ValidateWith

func (crci *CostReportCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportCreateInputs entity with the given context and client set.

type CostReportCreateInputsItem

type CostReportCreateInputsItem struct {
	// String generated from resource properties, used to identify this cost.
	Fingerprint string `path:"-" query:"-" json:"fingerprint"`
	// Resource name for current cost, could be __unmounted__.
	Name string `path:"-" query:"-" json:"name"`
	// Usage minutes from start time to end time.
	Minutes float64 `path:"-" query:"-" json:"minutes"`
	// Usage end time for current cost.
	EndTime time.Time `path:"-" query:"-" json:"endTime"`
	// Usage start time for current cost.
	StartTime time.Time `path:"-" query:"-" json:"startTime"`
	// Cluster name for current cost.
	ClusterName string `path:"-" query:"-" json:"clusterName,omitempty"`
	// Namespace for current cost.
	Namespace string `path:"-" query:"-" json:"namespace,omitempty"`
	// Node for current cost.
	Node string `path:"-" query:"-" json:"node,omitempty"`
	// Controller name for the cost linked resource.
	Controller string `path:"-" query:"-" json:"controller,omitempty"`
	// Controller kind for the cost linked resource, deployment, statefulSet etc.
	ControllerKind string `path:"-" query:"-" json:"controllerKind,omitempty"`
	// Pod name for current cost.
	Pod string `path:"-" query:"-" json:"pod,omitempty"`
	// Container name for current cost.
	Container string `path:"-" query:"-" json:"container,omitempty"`
	// PV list for current cost linked.
	Pvs map[string]types.PVCost `path:"-" query:"-" json:"pvs,omitempty"`
	// Labels for the cost linked resource.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Cost number.
	TotalCost float64 `path:"-" query:"-" json:"totalCost,omitempty"`
	// Cost currency.
	Currency int `path:"-" query:"-" json:"currency,omitempty"`
	// Cpu cost for current cost.
	CPUCost float64 `path:"-" query:"-" json:"cpuCost,omitempty"`
	// Cpu core requested.
	CPUCoreRequest float64 `path:"-" query:"-" json:"cpuCoreRequest,omitempty"`
	// GPU cost for current cost.
	GPUCost float64 `path:"-" query:"-" json:"gpuCost,omitempty"`
	// GPU core count.
	GPUCount float64 `path:"-" query:"-" json:"gpuCount,omitempty"`
	// Ram cost for current cost.
	RAMCost float64 `path:"-" query:"-" json:"ramCost,omitempty"`
	// Ram requested in byte.
	RAMByteRequest float64 `path:"-" query:"-" json:"ramByteRequest,omitempty"`
	// PV cost for current cost linked.
	PVCost float64 `path:"-" query:"-" json:"pvCost,omitempty"`
	// PV bytes for current cost linked.
	PVBytes float64 `path:"-" query:"-" json:"pvBytes,omitempty"`
	// LoadBalancer cost for current cost linked.
	LoadBalancerCost float64 `path:"-" query:"-" json:"loadBalancerCost,omitempty"`
	// CPU core average usage.
	CPUCoreUsageAverage float64 `path:"-" query:"-" json:"cpuCoreUsageAverage,omitempty"`
	// CPU core max usage.
	CPUCoreUsageMax float64 `path:"-" query:"-" json:"cpuCoreUsageMax,omitempty"`
	// Ram average usage in byte.
	RAMByteUsageAverage float64 `path:"-" query:"-" json:"ramByteUsageAverage,omitempty"`
	// Ram max usage in byte.
	RAMByteUsageMax float64 `path:"-" query:"-" json:"ramByteUsageMax,omitempty"`
}

CostReportCreateInputs holds the creation input item of the CostReport entities.

func (*CostReportCreateInputsItem) ValidateWith

func (crci *CostReportCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportCreateInputsItem entity with the given context and client set.

type CostReportDelete

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

CostReportDelete is the builder for deleting a CostReport entity.

func (*CostReportDelete) Exec

func (crd *CostReportDelete) Exec(ctx context.Context) (int, error)

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

func (*CostReportDelete) ExecContext

func (c *CostReportDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReportDelete) ExecX

func (crd *CostReportDelete) ExecX(ctx context.Context) int

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

func (*CostReportDelete) QueryContext

func (c *CostReportDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReportDelete) Where

Where appends a list predicates to the CostReportDelete builder.

type CostReportDeleteInput

type CostReportDeleteInput struct {
	CostReportQueryInput `path:",inline"`
}

CostReportDeleteInput holds the deletion input of the CostReport entity, please tags with `path:",inline"` if embedding.

func (*CostReportDeleteInput) SetGinContext

func (ic *CostReportDeleteInput) SetGinContext(ctx *gin.Context)

func (*CostReportDeleteInput) SetModelClient

func (ic *CostReportDeleteInput) SetModelClient(cli *Client)

type CostReportDeleteInputs

type CostReportDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*CostReportDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

CostReportDeleteInputs holds the deletion input of the CostReport entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*CostReportDeleteInputs) IDs

func (crdi *CostReportDeleteInputs) IDs() []int

IDs returns the ID list of the CostReport entities for deleting, after validating.

func (*CostReportDeleteInputs) Model

func (crdi *CostReportDeleteInputs) Model() []*CostReport

Model returns the CostReport entities for deleting, after validating.

func (*CostReportDeleteInputs) SetGinContext

func (ic *CostReportDeleteInputs) SetGinContext(ctx *gin.Context)

func (*CostReportDeleteInputs) SetModelClient

func (ic *CostReportDeleteInputs) SetModelClient(cli *Client)

func (*CostReportDeleteInputs) Validate

func (crdi *CostReportDeleteInputs) Validate() error

Validate checks the CostReportDeleteInputs entity.

func (*CostReportDeleteInputs) ValidateWith

func (crdi *CostReportDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportDeleteInputs entity with the given context and client set.

type CostReportDeleteInputsItem

type CostReportDeleteInputsItem struct {
	// ID of the CostReport entity.
	ID int `path:"-" query:"-" json:"id"`
}

CostReportDeleteInputs holds the deletion input item of the CostReport entities.

type CostReportDeleteOne

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

CostReportDeleteOne is the builder for deleting a single CostReport entity.

func (*CostReportDeleteOne) Exec

func (crdo *CostReportDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CostReportDeleteOne) ExecX

func (crdo *CostReportDeleteOne) ExecX(ctx context.Context)

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

func (*CostReportDeleteOne) Where

Where appends a list predicates to the CostReportDelete builder.

type CostReportEdges

type CostReportEdges struct {
	// Connector current cost item linked.
	Connector *Connector `json:"connector,omitempty"`
	// contains filtered or unexported fields
}

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

func (CostReportEdges) ConnectorOrErr

func (e CostReportEdges) ConnectorOrErr() (*Connector, error)

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

type CostReportGroupBy

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

CostReportGroupBy is the group-by builder for CostReport entities.

func (*CostReportGroupBy) Aggregate

func (crgb *CostReportGroupBy) Aggregate(fns ...AggregateFunc) *CostReportGroupBy

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

func (*CostReportGroupBy) Bool

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

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

func (*CostReportGroupBy) BoolX

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

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

func (*CostReportGroupBy) Bools

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

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

func (*CostReportGroupBy) BoolsX

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

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

func (*CostReportGroupBy) Float64

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

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

func (*CostReportGroupBy) Float64X

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

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

func (*CostReportGroupBy) Float64s

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

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

func (*CostReportGroupBy) Float64sX

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

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

func (*CostReportGroupBy) Int

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

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

func (*CostReportGroupBy) IntX

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

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

func (*CostReportGroupBy) Ints

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

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

func (*CostReportGroupBy) IntsX

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

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

func (*CostReportGroupBy) Scan

func (crgb *CostReportGroupBy) Scan(ctx context.Context, v any) error

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

func (*CostReportGroupBy) ScanX

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

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

func (*CostReportGroupBy) String

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

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

func (*CostReportGroupBy) StringX

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

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

func (*CostReportGroupBy) Strings

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

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

func (*CostReportGroupBy) StringsX

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

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

type CostReportMutation

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

CostReportMutation represents an operation that mutates the CostReport nodes in the graph.

func (*CostReportMutation) AddCPUCoreRequest

func (m *CostReportMutation) AddCPUCoreRequest(f float64)

AddCPUCoreRequest adds f to the "cpu_core_request" field.

func (*CostReportMutation) AddCPUCoreUsageAverage

func (m *CostReportMutation) AddCPUCoreUsageAverage(f float64)

AddCPUCoreUsageAverage adds f to the "cpu_core_usage_average" field.

func (*CostReportMutation) AddCPUCoreUsageMax

func (m *CostReportMutation) AddCPUCoreUsageMax(f float64)

AddCPUCoreUsageMax adds f to the "cpu_core_usage_max" field.

func (*CostReportMutation) AddCPUCost

func (m *CostReportMutation) AddCPUCost(f float64)

AddCPUCost adds f to the "cpu_cost" field.

func (*CostReportMutation) AddCurrency

func (m *CostReportMutation) AddCurrency(i int)

AddCurrency adds i to the "currency" field.

func (*CostReportMutation) AddField

func (m *CostReportMutation) 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 (*CostReportMutation) AddGPUCost

func (m *CostReportMutation) AddGPUCost(f float64)

AddGPUCost adds f to the "gpu_cost" field.

func (*CostReportMutation) AddGPUCount

func (m *CostReportMutation) AddGPUCount(f float64)

AddGPUCount adds f to the "gpu_count" field.

func (*CostReportMutation) AddLoadBalancerCost

func (m *CostReportMutation) AddLoadBalancerCost(f float64)

AddLoadBalancerCost adds f to the "load_balancer_cost" field.

func (*CostReportMutation) AddMinutes

func (m *CostReportMutation) AddMinutes(f float64)

AddMinutes adds f to the "minutes" field.

func (*CostReportMutation) AddPVBytes

func (m *CostReportMutation) AddPVBytes(f float64)

AddPVBytes adds f to the "pv_bytes" field.

func (*CostReportMutation) AddPVCost

func (m *CostReportMutation) AddPVCost(f float64)

AddPVCost adds f to the "pv_cost" field.

func (*CostReportMutation) AddRAMByteRequest

func (m *CostReportMutation) AddRAMByteRequest(f float64)

AddRAMByteRequest adds f to the "ram_byte_request" field.

func (*CostReportMutation) AddRAMByteUsageAverage

func (m *CostReportMutation) AddRAMByteUsageAverage(f float64)

AddRAMByteUsageAverage adds f to the "ram_byte_usage_average" field.

func (*CostReportMutation) AddRAMByteUsageMax

func (m *CostReportMutation) AddRAMByteUsageMax(f float64)

AddRAMByteUsageMax adds f to the "ram_byte_usage_max" field.

func (*CostReportMutation) AddRAMCost

func (m *CostReportMutation) AddRAMCost(f float64)

AddRAMCost adds f to the "ram_cost" field.

func (*CostReportMutation) AddTotalCost

func (m *CostReportMutation) AddTotalCost(f float64)

AddTotalCost adds f to the "totalCost" field.

func (*CostReportMutation) AddedCPUCoreRequest

func (m *CostReportMutation) AddedCPUCoreRequest() (r float64, exists bool)

AddedCPUCoreRequest returns the value that was added to the "cpu_core_request" field in this mutation.

func (*CostReportMutation) AddedCPUCoreUsageAverage

func (m *CostReportMutation) AddedCPUCoreUsageAverage() (r float64, exists bool)

AddedCPUCoreUsageAverage returns the value that was added to the "cpu_core_usage_average" field in this mutation.

func (*CostReportMutation) AddedCPUCoreUsageMax

func (m *CostReportMutation) AddedCPUCoreUsageMax() (r float64, exists bool)

AddedCPUCoreUsageMax returns the value that was added to the "cpu_core_usage_max" field in this mutation.

func (*CostReportMutation) AddedCPUCost

func (m *CostReportMutation) AddedCPUCost() (r float64, exists bool)

AddedCPUCost returns the value that was added to the "cpu_cost" field in this mutation.

func (*CostReportMutation) AddedCurrency

func (m *CostReportMutation) AddedCurrency() (r int, exists bool)

AddedCurrency returns the value that was added to the "currency" field in this mutation.

func (*CostReportMutation) AddedEdges

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

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

func (*CostReportMutation) AddedField

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

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

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

func (*CostReportMutation) AddedGPUCost

func (m *CostReportMutation) AddedGPUCost() (r float64, exists bool)

AddedGPUCost returns the value that was added to the "gpu_cost" field in this mutation.

func (*CostReportMutation) AddedGPUCount

func (m *CostReportMutation) AddedGPUCount() (r float64, exists bool)

AddedGPUCount returns the value that was added to the "gpu_count" field in this mutation.

func (*CostReportMutation) AddedIDs

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

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

func (*CostReportMutation) AddedLoadBalancerCost

func (m *CostReportMutation) AddedLoadBalancerCost() (r float64, exists bool)

AddedLoadBalancerCost returns the value that was added to the "load_balancer_cost" field in this mutation.

func (*CostReportMutation) AddedMinutes

func (m *CostReportMutation) AddedMinutes() (r float64, exists bool)

AddedMinutes returns the value that was added to the "minutes" field in this mutation.

func (*CostReportMutation) AddedPVBytes

func (m *CostReportMutation) AddedPVBytes() (r float64, exists bool)

AddedPVBytes returns the value that was added to the "pv_bytes" field in this mutation.

func (*CostReportMutation) AddedPVCost

func (m *CostReportMutation) AddedPVCost() (r float64, exists bool)

AddedPVCost returns the value that was added to the "pv_cost" field in this mutation.

func (*CostReportMutation) AddedRAMByteRequest

func (m *CostReportMutation) AddedRAMByteRequest() (r float64, exists bool)

AddedRAMByteRequest returns the value that was added to the "ram_byte_request" field in this mutation.

func (*CostReportMutation) AddedRAMByteUsageAverage

func (m *CostReportMutation) AddedRAMByteUsageAverage() (r float64, exists bool)

AddedRAMByteUsageAverage returns the value that was added to the "ram_byte_usage_average" field in this mutation.

func (*CostReportMutation) AddedRAMByteUsageMax

func (m *CostReportMutation) AddedRAMByteUsageMax() (r float64, exists bool)

AddedRAMByteUsageMax returns the value that was added to the "ram_byte_usage_max" field in this mutation.

func (*CostReportMutation) AddedRAMCost

func (m *CostReportMutation) AddedRAMCost() (r float64, exists bool)

AddedRAMCost returns the value that was added to the "ram_cost" field in this mutation.

func (*CostReportMutation) AddedTotalCost

func (m *CostReportMutation) AddedTotalCost() (r float64, exists bool)

AddedTotalCost returns the value that was added to the "totalCost" field in this mutation.

func (*CostReportMutation) CPUCoreRequest

func (m *CostReportMutation) CPUCoreRequest() (r float64, exists bool)

CPUCoreRequest returns the value of the "cpu_core_request" field in the mutation.

func (*CostReportMutation) CPUCoreUsageAverage

func (m *CostReportMutation) CPUCoreUsageAverage() (r float64, exists bool)

CPUCoreUsageAverage returns the value of the "cpu_core_usage_average" field in the mutation.

func (*CostReportMutation) CPUCoreUsageMax

func (m *CostReportMutation) CPUCoreUsageMax() (r float64, exists bool)

CPUCoreUsageMax returns the value of the "cpu_core_usage_max" field in the mutation.

func (*CostReportMutation) CPUCost

func (m *CostReportMutation) CPUCost() (r float64, exists bool)

CPUCost returns the value of the "cpu_cost" field in the mutation.

func (*CostReportMutation) ClearClusterName

func (m *CostReportMutation) ClearClusterName()

ClearClusterName clears the value of the "cluster_name" field.

func (*CostReportMutation) ClearConnector

func (m *CostReportMutation) ClearConnector()

ClearConnector clears the "connector" edge to the Connector entity.

func (*CostReportMutation) ClearContainer

func (m *CostReportMutation) ClearContainer()

ClearContainer clears the value of the "container" field.

func (*CostReportMutation) ClearController

func (m *CostReportMutation) ClearController()

ClearController clears the value of the "controller" field.

func (*CostReportMutation) ClearControllerKind

func (m *CostReportMutation) ClearControllerKind()

ClearControllerKind clears the value of the "controller_kind" field.

func (*CostReportMutation) ClearCurrency

func (m *CostReportMutation) ClearCurrency()

ClearCurrency clears the value of the "currency" field.

func (*CostReportMutation) ClearEdge

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

func (m *CostReportMutation) 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 (*CostReportMutation) ClearNamespace

func (m *CostReportMutation) ClearNamespace()

ClearNamespace clears the value of the "namespace" field.

func (*CostReportMutation) ClearNode

func (m *CostReportMutation) ClearNode()

ClearNode clears the value of the "node" field.

func (*CostReportMutation) ClearPod

func (m *CostReportMutation) ClearPod()

ClearPod clears the value of the "pod" field.

func (*CostReportMutation) ClearedEdges

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

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

func (*CostReportMutation) ClearedFields

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

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

func (CostReportMutation) Client

func (m CostReportMutation) 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 (*CostReportMutation) ClusterName

func (m *CostReportMutation) ClusterName() (r string, exists bool)

ClusterName returns the value of the "cluster_name" field in the mutation.

func (*CostReportMutation) ClusterNameCleared

func (m *CostReportMutation) ClusterNameCleared() bool

ClusterNameCleared returns if the "cluster_name" field was cleared in this mutation.

func (*CostReportMutation) ConnectorCleared

func (m *CostReportMutation) ConnectorCleared() bool

ConnectorCleared reports if the "connector" edge to the Connector entity was cleared.

func (*CostReportMutation) ConnectorID

func (m *CostReportMutation) ConnectorID() (r object.ID, exists bool)

ConnectorID returns the value of the "connector_id" field in the mutation.

func (*CostReportMutation) ConnectorIDs

func (m *CostReportMutation) ConnectorIDs() (ids []object.ID)

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

func (*CostReportMutation) Container

func (m *CostReportMutation) Container() (r string, exists bool)

Container returns the value of the "container" field in the mutation.

func (*CostReportMutation) ContainerCleared

func (m *CostReportMutation) ContainerCleared() bool

ContainerCleared returns if the "container" field was cleared in this mutation.

func (*CostReportMutation) Controller

func (m *CostReportMutation) Controller() (r string, exists bool)

Controller returns the value of the "controller" field in the mutation.

func (*CostReportMutation) ControllerCleared

func (m *CostReportMutation) ControllerCleared() bool

ControllerCleared returns if the "controller" field was cleared in this mutation.

func (*CostReportMutation) ControllerKind

func (m *CostReportMutation) ControllerKind() (r string, exists bool)

ControllerKind returns the value of the "controller_kind" field in the mutation.

func (*CostReportMutation) ControllerKindCleared

func (m *CostReportMutation) ControllerKindCleared() bool

ControllerKindCleared returns if the "controller_kind" field was cleared in this mutation.

func (*CostReportMutation) Currency

func (m *CostReportMutation) Currency() (r int, exists bool)

Currency returns the value of the "currency" field in the mutation.

func (*CostReportMutation) CurrencyCleared

func (m *CostReportMutation) CurrencyCleared() bool

CurrencyCleared returns if the "currency" field was cleared in this mutation.

func (*CostReportMutation) EdgeCleared

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

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

func (*CostReportMutation) EndTime

func (m *CostReportMutation) EndTime() (r time.Time, exists bool)

EndTime returns the value of the "end_time" field in the mutation.

func (*CostReportMutation) ExecContext

func (c *CostReportMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReportMutation) Field

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

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

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

func (*CostReportMutation) Fields

func (m *CostReportMutation) 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 (*CostReportMutation) Fingerprint

func (m *CostReportMutation) Fingerprint() (r string, exists bool)

Fingerprint returns the value of the "fingerprint" field in the mutation.

func (*CostReportMutation) GPUCost

func (m *CostReportMutation) GPUCost() (r float64, exists bool)

GPUCost returns the value of the "gpu_cost" field in the mutation.

func (*CostReportMutation) GPUCount

func (m *CostReportMutation) GPUCount() (r float64, exists bool)

GPUCount returns the value of the "gpu_count" field in the mutation.

func (*CostReportMutation) ID

func (m *CostReportMutation) ID() (id int, exists bool)

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

func (*CostReportMutation) IDs

func (m *CostReportMutation) IDs(ctx context.Context) ([]int, error)

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

func (*CostReportMutation) Labels

func (m *CostReportMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*CostReportMutation) LoadBalancerCost

func (m *CostReportMutation) LoadBalancerCost() (r float64, exists bool)

LoadBalancerCost returns the value of the "load_balancer_cost" field in the mutation.

func (*CostReportMutation) Minutes

func (m *CostReportMutation) Minutes() (r float64, exists bool)

Minutes returns the value of the "minutes" field in the mutation.

func (*CostReportMutation) Name

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

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

func (*CostReportMutation) Namespace

func (m *CostReportMutation) Namespace() (r string, exists bool)

Namespace returns the value of the "namespace" field in the mutation.

func (*CostReportMutation) NamespaceCleared

func (m *CostReportMutation) NamespaceCleared() bool

NamespaceCleared returns if the "namespace" field was cleared in this mutation.

func (*CostReportMutation) Node

func (m *CostReportMutation) Node() (r string, exists bool)

Node returns the value of the "node" field in the mutation.

func (*CostReportMutation) NodeCleared

func (m *CostReportMutation) NodeCleared() bool

NodeCleared returns if the "node" field was cleared in this mutation.

func (*CostReportMutation) OldCPUCoreRequest

func (m *CostReportMutation) OldCPUCoreRequest(ctx context.Context) (v float64, err error)

OldCPUCoreRequest returns the old "cpu_core_request" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldCPUCoreUsageAverage

func (m *CostReportMutation) OldCPUCoreUsageAverage(ctx context.Context) (v float64, err error)

OldCPUCoreUsageAverage returns the old "cpu_core_usage_average" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldCPUCoreUsageMax

func (m *CostReportMutation) OldCPUCoreUsageMax(ctx context.Context) (v float64, err error)

OldCPUCoreUsageMax returns the old "cpu_core_usage_max" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldCPUCost

func (m *CostReportMutation) OldCPUCost(ctx context.Context) (v float64, err error)

OldCPUCost returns the old "cpu_cost" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldClusterName

func (m *CostReportMutation) OldClusterName(ctx context.Context) (v string, err error)

OldClusterName returns the old "cluster_name" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldConnectorID

func (m *CostReportMutation) OldConnectorID(ctx context.Context) (v object.ID, err error)

OldConnectorID returns the old "connector_id" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldContainer

func (m *CostReportMutation) OldContainer(ctx context.Context) (v string, err error)

OldContainer returns the old "container" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldController

func (m *CostReportMutation) OldController(ctx context.Context) (v string, err error)

OldController returns the old "controller" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldControllerKind

func (m *CostReportMutation) OldControllerKind(ctx context.Context) (v string, err error)

OldControllerKind returns the old "controller_kind" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldCurrency

func (m *CostReportMutation) OldCurrency(ctx context.Context) (v int, err error)

OldCurrency returns the old "currency" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldEndTime

func (m *CostReportMutation) OldEndTime(ctx context.Context) (v time.Time, err error)

OldEndTime returns the old "end_time" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldField

func (m *CostReportMutation) 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 (*CostReportMutation) OldFingerprint

func (m *CostReportMutation) OldFingerprint(ctx context.Context) (v string, err error)

OldFingerprint returns the old "fingerprint" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldGPUCost

func (m *CostReportMutation) OldGPUCost(ctx context.Context) (v float64, err error)

OldGPUCost returns the old "gpu_cost" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldGPUCount

func (m *CostReportMutation) OldGPUCount(ctx context.Context) (v float64, err error)

OldGPUCount returns the old "gpu_count" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldLabels

func (m *CostReportMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldLoadBalancerCost

func (m *CostReportMutation) OldLoadBalancerCost(ctx context.Context) (v float64, err error)

OldLoadBalancerCost returns the old "load_balancer_cost" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldMinutes

func (m *CostReportMutation) OldMinutes(ctx context.Context) (v float64, err error)

OldMinutes returns the old "minutes" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldName

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

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

func (m *CostReportMutation) OldNamespace(ctx context.Context) (v string, err error)

OldNamespace returns the old "namespace" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldNode

func (m *CostReportMutation) OldNode(ctx context.Context) (v string, err error)

OldNode returns the old "node" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldPVBytes

func (m *CostReportMutation) OldPVBytes(ctx context.Context) (v float64, err error)

OldPVBytes returns the old "pv_bytes" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldPVCost

func (m *CostReportMutation) OldPVCost(ctx context.Context) (v float64, err error)

OldPVCost returns the old "pv_cost" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldPod

func (m *CostReportMutation) OldPod(ctx context.Context) (v string, err error)

OldPod returns the old "pod" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldPvs

func (m *CostReportMutation) OldPvs(ctx context.Context) (v map[string]types.PVCost, err error)

OldPvs returns the old "pvs" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldRAMByteRequest

func (m *CostReportMutation) OldRAMByteRequest(ctx context.Context) (v float64, err error)

OldRAMByteRequest returns the old "ram_byte_request" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldRAMByteUsageAverage

func (m *CostReportMutation) OldRAMByteUsageAverage(ctx context.Context) (v float64, err error)

OldRAMByteUsageAverage returns the old "ram_byte_usage_average" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldRAMByteUsageMax

func (m *CostReportMutation) OldRAMByteUsageMax(ctx context.Context) (v float64, err error)

OldRAMByteUsageMax returns the old "ram_byte_usage_max" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldRAMCost

func (m *CostReportMutation) OldRAMCost(ctx context.Context) (v float64, err error)

OldRAMCost returns the old "ram_cost" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldStartTime

func (m *CostReportMutation) OldStartTime(ctx context.Context) (v time.Time, err error)

OldStartTime returns the old "start_time" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) OldTotalCost

func (m *CostReportMutation) OldTotalCost(ctx context.Context) (v float64, err error)

OldTotalCost returns the old "totalCost" field's value of the CostReport entity. If the CostReport 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 (*CostReportMutation) Op

func (m *CostReportMutation) Op() Op

Op returns the operation name.

func (*CostReportMutation) PVBytes

func (m *CostReportMutation) PVBytes() (r float64, exists bool)

PVBytes returns the value of the "pv_bytes" field in the mutation.

func (*CostReportMutation) PVCost

func (m *CostReportMutation) PVCost() (r float64, exists bool)

PVCost returns the value of the "pv_cost" field in the mutation.

func (*CostReportMutation) Pod

func (m *CostReportMutation) Pod() (r string, exists bool)

Pod returns the value of the "pod" field in the mutation.

func (*CostReportMutation) PodCleared

func (m *CostReportMutation) PodCleared() bool

PodCleared returns if the "pod" field was cleared in this mutation.

func (*CostReportMutation) Pvs

func (m *CostReportMutation) Pvs() (r map[string]types.PVCost, exists bool)

Pvs returns the value of the "pvs" field in the mutation.

func (*CostReportMutation) QueryContext

func (c *CostReportMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReportMutation) RAMByteRequest

func (m *CostReportMutation) RAMByteRequest() (r float64, exists bool)

RAMByteRequest returns the value of the "ram_byte_request" field in the mutation.

func (*CostReportMutation) RAMByteUsageAverage

func (m *CostReportMutation) RAMByteUsageAverage() (r float64, exists bool)

RAMByteUsageAverage returns the value of the "ram_byte_usage_average" field in the mutation.

func (*CostReportMutation) RAMByteUsageMax

func (m *CostReportMutation) RAMByteUsageMax() (r float64, exists bool)

RAMByteUsageMax returns the value of the "ram_byte_usage_max" field in the mutation.

func (*CostReportMutation) RAMCost

func (m *CostReportMutation) RAMCost() (r float64, exists bool)

RAMCost returns the value of the "ram_cost" field in the mutation.

func (*CostReportMutation) RemovedEdges

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

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

func (*CostReportMutation) RemovedIDs

func (m *CostReportMutation) 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 (*CostReportMutation) ResetCPUCoreRequest

func (m *CostReportMutation) ResetCPUCoreRequest()

ResetCPUCoreRequest resets all changes to the "cpu_core_request" field.

func (*CostReportMutation) ResetCPUCoreUsageAverage

func (m *CostReportMutation) ResetCPUCoreUsageAverage()

ResetCPUCoreUsageAverage resets all changes to the "cpu_core_usage_average" field.

func (*CostReportMutation) ResetCPUCoreUsageMax

func (m *CostReportMutation) ResetCPUCoreUsageMax()

ResetCPUCoreUsageMax resets all changes to the "cpu_core_usage_max" field.

func (*CostReportMutation) ResetCPUCost

func (m *CostReportMutation) ResetCPUCost()

ResetCPUCost resets all changes to the "cpu_cost" field.

func (*CostReportMutation) ResetClusterName

func (m *CostReportMutation) ResetClusterName()

ResetClusterName resets all changes to the "cluster_name" field.

func (*CostReportMutation) ResetConnector

func (m *CostReportMutation) ResetConnector()

ResetConnector resets all changes to the "connector" edge.

func (*CostReportMutation) ResetConnectorID

func (m *CostReportMutation) ResetConnectorID()

ResetConnectorID resets all changes to the "connector_id" field.

func (*CostReportMutation) ResetContainer

func (m *CostReportMutation) ResetContainer()

ResetContainer resets all changes to the "container" field.

func (*CostReportMutation) ResetController

func (m *CostReportMutation) ResetController()

ResetController resets all changes to the "controller" field.

func (*CostReportMutation) ResetControllerKind

func (m *CostReportMutation) ResetControllerKind()

ResetControllerKind resets all changes to the "controller_kind" field.

func (*CostReportMutation) ResetCurrency

func (m *CostReportMutation) ResetCurrency()

ResetCurrency resets all changes to the "currency" field.

func (*CostReportMutation) ResetEdge

func (m *CostReportMutation) 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 (*CostReportMutation) ResetEndTime

func (m *CostReportMutation) ResetEndTime()

ResetEndTime resets all changes to the "end_time" field.

func (*CostReportMutation) ResetField

func (m *CostReportMutation) 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 (*CostReportMutation) ResetFingerprint

func (m *CostReportMutation) ResetFingerprint()

ResetFingerprint resets all changes to the "fingerprint" field.

func (*CostReportMutation) ResetGPUCost

func (m *CostReportMutation) ResetGPUCost()

ResetGPUCost resets all changes to the "gpu_cost" field.

func (*CostReportMutation) ResetGPUCount

func (m *CostReportMutation) ResetGPUCount()

ResetGPUCount resets all changes to the "gpu_count" field.

func (*CostReportMutation) ResetLabels

func (m *CostReportMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*CostReportMutation) ResetLoadBalancerCost

func (m *CostReportMutation) ResetLoadBalancerCost()

ResetLoadBalancerCost resets all changes to the "load_balancer_cost" field.

func (*CostReportMutation) ResetMinutes

func (m *CostReportMutation) ResetMinutes()

ResetMinutes resets all changes to the "minutes" field.

func (*CostReportMutation) ResetName

func (m *CostReportMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CostReportMutation) ResetNamespace

func (m *CostReportMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" field.

func (*CostReportMutation) ResetNode

func (m *CostReportMutation) ResetNode()

ResetNode resets all changes to the "node" field.

func (*CostReportMutation) ResetPVBytes

func (m *CostReportMutation) ResetPVBytes()

ResetPVBytes resets all changes to the "pv_bytes" field.

func (*CostReportMutation) ResetPVCost

func (m *CostReportMutation) ResetPVCost()

ResetPVCost resets all changes to the "pv_cost" field.

func (*CostReportMutation) ResetPod

func (m *CostReportMutation) ResetPod()

ResetPod resets all changes to the "pod" field.

func (*CostReportMutation) ResetPvs

func (m *CostReportMutation) ResetPvs()

ResetPvs resets all changes to the "pvs" field.

func (*CostReportMutation) ResetRAMByteRequest

func (m *CostReportMutation) ResetRAMByteRequest()

ResetRAMByteRequest resets all changes to the "ram_byte_request" field.

func (*CostReportMutation) ResetRAMByteUsageAverage

func (m *CostReportMutation) ResetRAMByteUsageAverage()

ResetRAMByteUsageAverage resets all changes to the "ram_byte_usage_average" field.

func (*CostReportMutation) ResetRAMByteUsageMax

func (m *CostReportMutation) ResetRAMByteUsageMax()

ResetRAMByteUsageMax resets all changes to the "ram_byte_usage_max" field.

func (*CostReportMutation) ResetRAMCost

func (m *CostReportMutation) ResetRAMCost()

ResetRAMCost resets all changes to the "ram_cost" field.

func (*CostReportMutation) ResetStartTime

func (m *CostReportMutation) ResetStartTime()

ResetStartTime resets all changes to the "start_time" field.

func (*CostReportMutation) ResetTotalCost

func (m *CostReportMutation) ResetTotalCost()

ResetTotalCost resets all changes to the "totalCost" field.

func (*CostReportMutation) SetCPUCoreRequest

func (m *CostReportMutation) SetCPUCoreRequest(f float64)

SetCPUCoreRequest sets the "cpu_core_request" field.

func (*CostReportMutation) SetCPUCoreUsageAverage

func (m *CostReportMutation) SetCPUCoreUsageAverage(f float64)

SetCPUCoreUsageAverage sets the "cpu_core_usage_average" field.

func (*CostReportMutation) SetCPUCoreUsageMax

func (m *CostReportMutation) SetCPUCoreUsageMax(f float64)

SetCPUCoreUsageMax sets the "cpu_core_usage_max" field.

func (*CostReportMutation) SetCPUCost

func (m *CostReportMutation) SetCPUCost(f float64)

SetCPUCost sets the "cpu_cost" field.

func (*CostReportMutation) SetClusterName

func (m *CostReportMutation) SetClusterName(s string)

SetClusterName sets the "cluster_name" field.

func (*CostReportMutation) SetConnectorID

func (m *CostReportMutation) SetConnectorID(o object.ID)

SetConnectorID sets the "connector_id" field.

func (*CostReportMutation) SetContainer

func (m *CostReportMutation) SetContainer(s string)

SetContainer sets the "container" field.

func (*CostReportMutation) SetController

func (m *CostReportMutation) SetController(s string)

SetController sets the "controller" field.

func (*CostReportMutation) SetControllerKind

func (m *CostReportMutation) SetControllerKind(s string)

SetControllerKind sets the "controller_kind" field.

func (*CostReportMutation) SetCurrency

func (m *CostReportMutation) SetCurrency(i int)

SetCurrency sets the "currency" field.

func (*CostReportMutation) SetEndTime

func (m *CostReportMutation) SetEndTime(t time.Time)

SetEndTime sets the "end_time" field.

func (*CostReportMutation) SetField

func (m *CostReportMutation) 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 (*CostReportMutation) SetFingerprint

func (m *CostReportMutation) SetFingerprint(s string)

SetFingerprint sets the "fingerprint" field.

func (*CostReportMutation) SetGPUCost

func (m *CostReportMutation) SetGPUCost(f float64)

SetGPUCost sets the "gpu_cost" field.

func (*CostReportMutation) SetGPUCount

func (m *CostReportMutation) SetGPUCount(f float64)

SetGPUCount sets the "gpu_count" field.

func (*CostReportMutation) SetLabels

func (m *CostReportMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*CostReportMutation) SetLoadBalancerCost

func (m *CostReportMutation) SetLoadBalancerCost(f float64)

SetLoadBalancerCost sets the "load_balancer_cost" field.

func (*CostReportMutation) SetMinutes

func (m *CostReportMutation) SetMinutes(f float64)

SetMinutes sets the "minutes" field.

func (*CostReportMutation) SetName

func (m *CostReportMutation) SetName(s string)

SetName sets the "name" field.

func (*CostReportMutation) SetNamespace

func (m *CostReportMutation) SetNamespace(s string)

SetNamespace sets the "namespace" field.

func (*CostReportMutation) SetNode

func (m *CostReportMutation) SetNode(s string)

SetNode sets the "node" field.

func (*CostReportMutation) SetOp

func (m *CostReportMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CostReportMutation) SetPVBytes

func (m *CostReportMutation) SetPVBytes(f float64)

SetPVBytes sets the "pv_bytes" field.

func (*CostReportMutation) SetPVCost

func (m *CostReportMutation) SetPVCost(f float64)

SetPVCost sets the "pv_cost" field.

func (*CostReportMutation) SetPod

func (m *CostReportMutation) SetPod(s string)

SetPod sets the "pod" field.

func (*CostReportMutation) SetPvs

func (m *CostReportMutation) SetPvs(mc map[string]types.PVCost)

SetPvs sets the "pvs" field.

func (*CostReportMutation) SetRAMByteRequest

func (m *CostReportMutation) SetRAMByteRequest(f float64)

SetRAMByteRequest sets the "ram_byte_request" field.

func (*CostReportMutation) SetRAMByteUsageAverage

func (m *CostReportMutation) SetRAMByteUsageAverage(f float64)

SetRAMByteUsageAverage sets the "ram_byte_usage_average" field.

func (*CostReportMutation) SetRAMByteUsageMax

func (m *CostReportMutation) SetRAMByteUsageMax(f float64)

SetRAMByteUsageMax sets the "ram_byte_usage_max" field.

func (*CostReportMutation) SetRAMCost

func (m *CostReportMutation) SetRAMCost(f float64)

SetRAMCost sets the "ram_cost" field.

func (*CostReportMutation) SetStartTime

func (m *CostReportMutation) SetStartTime(t time.Time)

SetStartTime sets the "start_time" field.

func (*CostReportMutation) SetTotalCost

func (m *CostReportMutation) SetTotalCost(f float64)

SetTotalCost sets the "totalCost" field.

func (*CostReportMutation) StartTime

func (m *CostReportMutation) StartTime() (r time.Time, exists bool)

StartTime returns the value of the "start_time" field in the mutation.

func (*CostReportMutation) TotalCost

func (m *CostReportMutation) TotalCost() (r float64, exists bool)

TotalCost returns the value of the "totalCost" field in the mutation.

func (CostReportMutation) Tx

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

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

func (*CostReportMutation) Type

func (m *CostReportMutation) Type() string

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

func (*CostReportMutation) Where

func (m *CostReportMutation) Where(ps ...predicate.CostReport)

Where appends a list predicates to the CostReportMutation builder.

func (*CostReportMutation) WhereP

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

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

type CostReportOutput

type CostReportOutput struct {
	ID                  int                     `json:"id,omitempty"`
	StartTime           time.Time               `json:"startTime,omitempty"`
	EndTime             time.Time               `json:"endTime,omitempty"`
	Minutes             float64                 `json:"minutes,omitempty"`
	Name                string                  `json:"name,omitempty"`
	Fingerprint         string                  `json:"fingerprint,omitempty"`
	ClusterName         string                  `json:"clusterName,omitempty"`
	Namespace           string                  `json:"namespace,omitempty"`
	Node                string                  `json:"node,omitempty"`
	Controller          string                  `json:"controller,omitempty"`
	ControllerKind      string                  `json:"controllerKind,omitempty"`
	Pod                 string                  `json:"pod,omitempty"`
	Container           string                  `json:"container,omitempty"`
	Pvs                 map[string]types.PVCost `json:"pvs,omitempty"`
	Labels              map[string]string       `json:"labels,omitempty"`
	TotalCost           float64                 `json:"totalCost,omitempty"`
	Currency            int                     `json:"currency,omitempty"`
	CPUCost             float64                 `json:"cpuCost,omitempty"`
	CPUCoreRequest      float64                 `json:"cpuCoreRequest,omitempty"`
	GPUCost             float64                 `json:"gpuCost,omitempty"`
	GPUCount            float64                 `json:"gpuCount,omitempty"`
	RAMCost             float64                 `json:"ramCost,omitempty"`
	RAMByteRequest      float64                 `json:"ramByteRequest,omitempty"`
	PVCost              float64                 `json:"pvCost,omitempty"`
	PVBytes             float64                 `json:"pvBytes,omitempty"`
	LoadBalancerCost    float64                 `json:"loadBalancerCost,omitempty"`
	CPUCoreUsageAverage float64                 `json:"cpuCoreUsageAverage,omitempty"`
	CPUCoreUsageMax     float64                 `json:"cpuCoreUsageMax,omitempty"`
	RAMByteUsageAverage float64                 `json:"ramByteUsageAverage,omitempty"`
	RAMByteUsageMax     float64                 `json:"ramByteUsageMax,omitempty"`
}

CostReportOutput holds the output of the CostReport entity.

func ExposeCostReport

func ExposeCostReport(_cr *CostReport) *CostReportOutput

ExposeCostReport converts the CostReport to CostReportOutput.

func ExposeCostReports

func ExposeCostReports(_crs []*CostReport) []*CostReportOutput

ExposeCostReports converts the CostReport slice to CostReportOutput pointer slice.

type CostReportPatchInput added in v0.5.0

type CostReportPatchInput struct {
	CostReportQueryInput `path:",inline" query:"-" json:"-"`

	// Usage start time for current cost.
	StartTime time.Time `path:"-" query:"-" json:"startTime,omitempty"`
	// Usage end time for current cost.
	EndTime time.Time `path:"-" query:"-" json:"endTime,omitempty"`
	// Usage minutes from start time to end time.
	Minutes float64 `path:"-" query:"-" json:"minutes,omitempty"`
	// Resource name for current cost, could be __unmounted__.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// String generated from resource properties, used to identify this cost.
	Fingerprint string `path:"-" query:"-" json:"fingerprint,omitempty"`
	// Cluster name for current cost.
	ClusterName string `path:"-" query:"-" json:"clusterName,omitempty"`
	// Namespace for current cost.
	Namespace string `path:"-" query:"-" json:"namespace,omitempty"`
	// Node for current cost.
	Node string `path:"-" query:"-" json:"node,omitempty"`
	// Controller name for the cost linked resource.
	Controller string `path:"-" query:"-" json:"controller,omitempty"`
	// Controller kind for the cost linked resource, deployment, statefulSet etc.
	ControllerKind string `path:"-" query:"-" json:"controllerKind,omitempty"`
	// Pod name for current cost.
	Pod string `path:"-" query:"-" json:"pod,omitempty"`
	// Container name for current cost.
	Container string `path:"-" query:"-" json:"container,omitempty"`
	// PV list for current cost linked.
	Pvs map[string]types.PVCost `path:"-" query:"-" json:"pvs,omitempty"`
	// Labels for the cost linked resource.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Cost number.
	TotalCost float64 `path:"-" query:"-" json:"totalCost,omitempty"`
	// Cost currency.
	Currency int `path:"-" query:"-" json:"currency,omitempty"`
	// Cpu cost for current cost.
	CPUCost float64 `path:"-" query:"-" json:"cpuCost,omitempty"`
	// Cpu core requested.
	CPUCoreRequest float64 `path:"-" query:"-" json:"cpuCoreRequest,omitempty"`
	// GPU cost for current cost.
	GPUCost float64 `path:"-" query:"-" json:"gpuCost,omitempty"`
	// GPU core count.
	GPUCount float64 `path:"-" query:"-" json:"gpuCount,omitempty"`
	// Ram cost for current cost.
	RAMCost float64 `path:"-" query:"-" json:"ramCost,omitempty"`
	// Ram requested in byte.
	RAMByteRequest float64 `path:"-" query:"-" json:"rambyteRequest,omitempty"`
	// PV cost for current cost linked.
	PVCost float64 `path:"-" query:"-" json:"pvCost,omitempty"`
	// PV bytes for current cost linked.
	PVBytes float64 `path:"-" query:"-" json:"pvBytes,omitempty"`
	// LoadBalancer cost for current cost linked.
	LoadBalancerCost float64 `path:"-" query:"-" json:"loadBalancerCost,omitempty"`
	// CPU core average usage.
	CPUCoreUsageAverage float64 `path:"-" query:"-" json:"cpuCoreUsageAverage,omitempty"`
	// CPU core max usage.
	CPUCoreUsageMax float64 `path:"-" query:"-" json:"cpuCoreUsageMax,omitempty"`
	// Ram average usage in byte.
	RAMByteUsageAverage float64 `path:"-" query:"-" json:"rambyteUsageAverage,omitempty"`
	// Ram max usage in byte.
	RAMByteUsageMax float64 `path:"-" query:"-" json:"rambyteUsageMax,omitempty"`
	// contains filtered or unexported fields
}

CostReportPatchInput holds the patch input of the CostReport entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*CostReportPatchInput) Model added in v0.5.0

func (crpi *CostReportPatchInput) Model() *CostReport

Model returns the CostReport patched entity, after validating.

func (*CostReportPatchInput) PatchModel added in v0.5.0

func (crpi *CostReportPatchInput) PatchModel() *CostReport

PatchModel returns the CostReport partition entity for patching.

func (*CostReportPatchInput) SetGinContext added in v0.5.0

func (ic *CostReportPatchInput) SetGinContext(ctx *gin.Context)

func (*CostReportPatchInput) SetModelClient added in v0.5.0

func (ic *CostReportPatchInput) SetModelClient(cli *Client)

func (*CostReportPatchInput) Validate added in v0.5.0

func (crpi *CostReportPatchInput) Validate() error

Validate checks the CostReportPatchInput entity.

func (*CostReportPatchInput) ValidateWith added in v0.5.0

func (crpi *CostReportPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportPatchInput entity with the given context and client set.

type CostReportQuery

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

CostReportQuery is the builder for querying CostReport entities.

func (*CostReportQuery) Aggregate

func (crq *CostReportQuery) Aggregate(fns ...AggregateFunc) *CostReportSelect

Aggregate returns a CostReportSelect configured with the given aggregations.

func (*CostReportQuery) All

func (crq *CostReportQuery) All(ctx context.Context) ([]*CostReport, error)

All executes the query and returns a list of CostReports.

func (*CostReportQuery) AllX

func (crq *CostReportQuery) AllX(ctx context.Context) []*CostReport

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

func (*CostReportQuery) Clone

func (crq *CostReportQuery) Clone() *CostReportQuery

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

func (*CostReportQuery) Count

func (crq *CostReportQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CostReportQuery) CountX

func (crq *CostReportQuery) CountX(ctx context.Context) int

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

func (*CostReportQuery) ExecContext

func (c *CostReportQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReportQuery) Exist

func (crq *CostReportQuery) Exist(ctx context.Context) (bool, error)

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

func (*CostReportQuery) ExistX

func (crq *CostReportQuery) ExistX(ctx context.Context) bool

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

func (*CostReportQuery) First

func (crq *CostReportQuery) First(ctx context.Context) (*CostReport, error)

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

func (*CostReportQuery) FirstID

func (crq *CostReportQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CostReportQuery) FirstIDX

func (crq *CostReportQuery) FirstIDX(ctx context.Context) int

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

func (*CostReportQuery) FirstX

func (crq *CostReportQuery) FirstX(ctx context.Context) *CostReport

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

func (*CostReportQuery) ForShare

func (crq *CostReportQuery) ForShare(opts ...sql.LockOption) *CostReportQuery

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 (*CostReportQuery) ForUpdate

func (crq *CostReportQuery) ForUpdate(opts ...sql.LockOption) *CostReportQuery

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 (*CostReportQuery) GroupBy

func (crq *CostReportQuery) GroupBy(field string, fields ...string) *CostReportGroupBy

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 {
	StartTime time.Time `json:"start_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CostReport.Query().
	GroupBy(costreport.FieldStartTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*CostReportQuery) IDs

func (crq *CostReportQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*CostReportQuery) IDsX

func (crq *CostReportQuery) IDsX(ctx context.Context) []int

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

func (*CostReportQuery) Limit

func (crq *CostReportQuery) Limit(limit int) *CostReportQuery

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

func (*CostReportQuery) Modify

func (crq *CostReportQuery) Modify(modifiers ...func(s *sql.Selector)) *CostReportSelect

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

func (*CostReportQuery) Offset

func (crq *CostReportQuery) Offset(offset int) *CostReportQuery

Offset to start from.

func (*CostReportQuery) Only

func (crq *CostReportQuery) Only(ctx context.Context) (*CostReport, error)

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

func (*CostReportQuery) OnlyID

func (crq *CostReportQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CostReportQuery) OnlyIDX

func (crq *CostReportQuery) OnlyIDX(ctx context.Context) int

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

func (*CostReportQuery) OnlyX

func (crq *CostReportQuery) OnlyX(ctx context.Context) *CostReport

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

func (*CostReportQuery) Order

Order specifies how the records should be ordered.

func (*CostReportQuery) QueryConnector

func (crq *CostReportQuery) QueryConnector() *ConnectorQuery

QueryConnector chains the current query on the "connector" edge.

func (*CostReportQuery) QueryContext

func (c *CostReportQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReportQuery) Select

func (crq *CostReportQuery) Select(fields ...string) *CostReportSelect

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 {
	StartTime time.Time `json:"start_time,omitempty"`
}

client.CostReport.Query().
	Select(costreport.FieldStartTime).
	Scan(ctx, &v)

func (*CostReportQuery) Unique

func (crq *CostReportQuery) Unique(unique bool) *CostReportQuery

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

Where adds a new predicate for the CostReportQuery builder.

func (*CostReportQuery) WhereP

func (crq *CostReportQuery) WhereP(ps ...func(*sql.Selector))

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

func (*CostReportQuery) WithConnector

func (crq *CostReportQuery) WithConnector(opts ...func(*ConnectorQuery)) *CostReportQuery

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

type CostReportQueryInput

type CostReportQueryInput struct {

	// Refer holds the route path reference of the CostReport entity.
	Refer *object.Refer `path:"costreport,default=" query:"-" json:"-"`
	// ID of the CostReport entity.
	ID int `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

CostReportQueryInput holds the query input of the CostReport entity, please tags with `path:",inline"` if embedding.

func (*CostReportQueryInput) Model

func (crqi *CostReportQueryInput) Model() *CostReport

Model returns the CostReport entity for querying, after validating.

func (*CostReportQueryInput) SetGinContext

func (ic *CostReportQueryInput) SetGinContext(ctx *gin.Context)

func (*CostReportQueryInput) SetModelClient

func (ic *CostReportQueryInput) SetModelClient(cli *Client)

func (*CostReportQueryInput) Validate

func (crqi *CostReportQueryInput) Validate() error

Validate checks the CostReportQueryInput entity.

func (*CostReportQueryInput) ValidateWith

func (crqi *CostReportQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportQueryInput entity with the given context and client set.

type CostReportQueryInputs

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

CostReportQueryInputs holds the query input of the CostReport entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*CostReportQueryInputs) SetGinContext

func (ic *CostReportQueryInputs) SetGinContext(ctx *gin.Context)

func (*CostReportQueryInputs) SetModelClient

func (ic *CostReportQueryInputs) SetModelClient(cli *Client)

func (*CostReportQueryInputs) Validate

func (crqi *CostReportQueryInputs) Validate() error

Validate checks the CostReportQueryInputs entity.

func (*CostReportQueryInputs) ValidateWith

func (crqi *CostReportQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportQueryInputs entity with the given context and client set.

type CostReportSelect

type CostReportSelect struct {
	*CostReportQuery
	// contains filtered or unexported fields
}

CostReportSelect is the builder for selecting fields of CostReport entities.

func (*CostReportSelect) Aggregate

func (crs *CostReportSelect) Aggregate(fns ...AggregateFunc) *CostReportSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CostReportSelect) Bool

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

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

func (*CostReportSelect) BoolX

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

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

func (*CostReportSelect) Bools

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

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

func (*CostReportSelect) BoolsX

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

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

func (CostReportSelect) ExecContext

func (c CostReportSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReportSelect) Float64

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

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

func (*CostReportSelect) Float64X

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

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

func (*CostReportSelect) Float64s

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

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

func (*CostReportSelect) Float64sX

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

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

func (*CostReportSelect) Int

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

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

func (*CostReportSelect) IntX

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

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

func (*CostReportSelect) Ints

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

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

func (*CostReportSelect) IntsX

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

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

func (*CostReportSelect) Modify

func (crs *CostReportSelect) Modify(modifiers ...func(s *sql.Selector)) *CostReportSelect

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

func (CostReportSelect) QueryContext

func (c CostReportSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReportSelect) Scan

func (crs *CostReportSelect) Scan(ctx context.Context, v any) error

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

func (*CostReportSelect) ScanX

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

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

func (*CostReportSelect) String

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

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

func (*CostReportSelect) StringX

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

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

func (*CostReportSelect) Strings

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

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

func (*CostReportSelect) StringsX

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

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

type CostReportUpdate

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

CostReportUpdate is the builder for updating CostReport entities.

func (*CostReportUpdate) AddCPUCoreUsageAverage

func (cru *CostReportUpdate) AddCPUCoreUsageAverage(f float64) *CostReportUpdate

AddCPUCoreUsageAverage adds f to the "cpu_core_usage_average" field.

func (*CostReportUpdate) AddCPUCoreUsageMax

func (cru *CostReportUpdate) AddCPUCoreUsageMax(f float64) *CostReportUpdate

AddCPUCoreUsageMax adds f to the "cpu_core_usage_max" field.

func (*CostReportUpdate) AddCPUCost

func (cru *CostReportUpdate) AddCPUCost(f float64) *CostReportUpdate

AddCPUCost adds f to the "cpu_cost" field.

func (*CostReportUpdate) AddCurrency

func (cru *CostReportUpdate) AddCurrency(i int) *CostReportUpdate

AddCurrency adds i to the "currency" field.

func (*CostReportUpdate) AddGPUCost

func (cru *CostReportUpdate) AddGPUCost(f float64) *CostReportUpdate

AddGPUCost adds f to the "gpu_cost" field.

func (*CostReportUpdate) AddLoadBalancerCost

func (cru *CostReportUpdate) AddLoadBalancerCost(f float64) *CostReportUpdate

AddLoadBalancerCost adds f to the "load_balancer_cost" field.

func (*CostReportUpdate) AddPVBytes

func (cru *CostReportUpdate) AddPVBytes(f float64) *CostReportUpdate

AddPVBytes adds f to the "pv_bytes" field.

func (*CostReportUpdate) AddPVCost

func (cru *CostReportUpdate) AddPVCost(f float64) *CostReportUpdate

AddPVCost adds f to the "pv_cost" field.

func (*CostReportUpdate) AddRAMByteUsageAverage

func (cru *CostReportUpdate) AddRAMByteUsageAverage(f float64) *CostReportUpdate

AddRAMByteUsageAverage adds f to the "ram_byte_usage_average" field.

func (*CostReportUpdate) AddRAMByteUsageMax

func (cru *CostReportUpdate) AddRAMByteUsageMax(f float64) *CostReportUpdate

AddRAMByteUsageMax adds f to the "ram_byte_usage_max" field.

func (*CostReportUpdate) AddRAMCost

func (cru *CostReportUpdate) AddRAMCost(f float64) *CostReportUpdate

AddRAMCost adds f to the "ram_cost" field.

func (*CostReportUpdate) AddTotalCost

func (cru *CostReportUpdate) AddTotalCost(f float64) *CostReportUpdate

AddTotalCost adds f to the "totalCost" field.

func (*CostReportUpdate) ClearCurrency

func (cru *CostReportUpdate) ClearCurrency() *CostReportUpdate

ClearCurrency clears the value of the "currency" field.

func (*CostReportUpdate) Exec

func (cru *CostReportUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CostReportUpdate) ExecContext

func (c *CostReportUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReportUpdate) ExecX

func (cru *CostReportUpdate) ExecX(ctx context.Context)

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

func (*CostReportUpdate) Modify

func (cru *CostReportUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CostReportUpdate

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

func (*CostReportUpdate) Mutation

func (cru *CostReportUpdate) Mutation() *CostReportMutation

Mutation returns the CostReportMutation object of the builder.

func (*CostReportUpdate) QueryContext

func (c *CostReportUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReportUpdate) Save

func (cru *CostReportUpdate) Save(ctx context.Context) (int, error)

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

func (*CostReportUpdate) SaveX

func (cru *CostReportUpdate) SaveX(ctx context.Context) int

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

func (*CostReportUpdate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*CostReportUpdate) SetCPUCoreUsageAverage

func (cru *CostReportUpdate) SetCPUCoreUsageAverage(f float64) *CostReportUpdate

SetCPUCoreUsageAverage sets the "cpu_core_usage_average" field.

func (*CostReportUpdate) SetCPUCoreUsageMax

func (cru *CostReportUpdate) SetCPUCoreUsageMax(f float64) *CostReportUpdate

SetCPUCoreUsageMax sets the "cpu_core_usage_max" field.

func (*CostReportUpdate) SetCPUCost

func (cru *CostReportUpdate) SetCPUCost(f float64) *CostReportUpdate

SetCPUCost sets the "cpu_cost" field.

func (*CostReportUpdate) SetCurrency

func (cru *CostReportUpdate) SetCurrency(i int) *CostReportUpdate

SetCurrency sets the "currency" field.

func (*CostReportUpdate) SetGPUCost

func (cru *CostReportUpdate) SetGPUCost(f float64) *CostReportUpdate

SetGPUCost sets the "gpu_cost" field.

func (*CostReportUpdate) SetLoadBalancerCost

func (cru *CostReportUpdate) SetLoadBalancerCost(f float64) *CostReportUpdate

SetLoadBalancerCost sets the "load_balancer_cost" field.

func (*CostReportUpdate) SetNillableCPUCoreUsageAverage

func (cru *CostReportUpdate) SetNillableCPUCoreUsageAverage(f *float64) *CostReportUpdate

SetNillableCPUCoreUsageAverage sets the "cpu_core_usage_average" field if the given value is not nil.

func (*CostReportUpdate) SetNillableCPUCoreUsageMax

func (cru *CostReportUpdate) SetNillableCPUCoreUsageMax(f *float64) *CostReportUpdate

SetNillableCPUCoreUsageMax sets the "cpu_core_usage_max" field if the given value is not nil.

func (*CostReportUpdate) SetNillableCPUCost

func (cru *CostReportUpdate) SetNillableCPUCost(f *float64) *CostReportUpdate

SetNillableCPUCost sets the "cpu_cost" field if the given value is not nil.

func (*CostReportUpdate) SetNillableCurrency

func (cru *CostReportUpdate) SetNillableCurrency(i *int) *CostReportUpdate

SetNillableCurrency sets the "currency" field if the given value is not nil.

func (*CostReportUpdate) SetNillableGPUCost

func (cru *CostReportUpdate) SetNillableGPUCost(f *float64) *CostReportUpdate

SetNillableGPUCost sets the "gpu_cost" field if the given value is not nil.

func (*CostReportUpdate) SetNillableLoadBalancerCost

func (cru *CostReportUpdate) SetNillableLoadBalancerCost(f *float64) *CostReportUpdate

SetNillableLoadBalancerCost sets the "load_balancer_cost" field if the given value is not nil.

func (*CostReportUpdate) SetNillablePVBytes

func (cru *CostReportUpdate) SetNillablePVBytes(f *float64) *CostReportUpdate

SetNillablePVBytes sets the "pv_bytes" field if the given value is not nil.

func (*CostReportUpdate) SetNillablePVCost

func (cru *CostReportUpdate) SetNillablePVCost(f *float64) *CostReportUpdate

SetNillablePVCost sets the "pv_cost" field if the given value is not nil.

func (*CostReportUpdate) SetNillableRAMByteUsageAverage

func (cru *CostReportUpdate) SetNillableRAMByteUsageAverage(f *float64) *CostReportUpdate

SetNillableRAMByteUsageAverage sets the "ram_byte_usage_average" field if the given value is not nil.

func (*CostReportUpdate) SetNillableRAMByteUsageMax

func (cru *CostReportUpdate) SetNillableRAMByteUsageMax(f *float64) *CostReportUpdate

SetNillableRAMByteUsageMax sets the "ram_byte_usage_max" field if the given value is not nil.

func (*CostReportUpdate) SetNillableRAMCost

func (cru *CostReportUpdate) SetNillableRAMCost(f *float64) *CostReportUpdate

SetNillableRAMCost sets the "ram_cost" field if the given value is not nil.

func (*CostReportUpdate) SetNillableTotalCost

func (cru *CostReportUpdate) SetNillableTotalCost(f *float64) *CostReportUpdate

SetNillableTotalCost sets the "totalCost" field if the given value is not nil.

func (*CostReportUpdate) SetPVBytes

func (cru *CostReportUpdate) SetPVBytes(f float64) *CostReportUpdate

SetPVBytes sets the "pv_bytes" field.

func (*CostReportUpdate) SetPVCost

func (cru *CostReportUpdate) SetPVCost(f float64) *CostReportUpdate

SetPVCost sets the "pv_cost" field.

func (*CostReportUpdate) SetRAMByteUsageAverage

func (cru *CostReportUpdate) SetRAMByteUsageAverage(f float64) *CostReportUpdate

SetRAMByteUsageAverage sets the "ram_byte_usage_average" field.

func (*CostReportUpdate) SetRAMByteUsageMax

func (cru *CostReportUpdate) SetRAMByteUsageMax(f float64) *CostReportUpdate

SetRAMByteUsageMax sets the "ram_byte_usage_max" field.

func (*CostReportUpdate) SetRAMCost

func (cru *CostReportUpdate) SetRAMCost(f float64) *CostReportUpdate

SetRAMCost sets the "ram_cost" field.

func (*CostReportUpdate) SetTotalCost

func (cru *CostReportUpdate) SetTotalCost(f float64) *CostReportUpdate

SetTotalCost sets the "totalCost" field.

func (*CostReportUpdate) Where

Where appends a list predicates to the CostReportUpdate builder.

type CostReportUpdateInput

type CostReportUpdateInput struct {
	CostReportQueryInput `path:",inline" query:"-" json:"-"`

	// Cost number.
	TotalCost float64 `path:"-" query:"-" json:"totalCost,omitempty"`
	// Cost currency.
	Currency int `path:"-" query:"-" json:"currency,omitempty"`
	// Cpu cost for current cost.
	CPUCost float64 `path:"-" query:"-" json:"cpuCost,omitempty"`
	// GPU cost for current cost.
	GPUCost float64 `path:"-" query:"-" json:"gpuCost,omitempty"`
	// Ram cost for current cost.
	RAMCost float64 `path:"-" query:"-" json:"ramCost,omitempty"`
	// PV cost for current cost linked.
	PVCost float64 `path:"-" query:"-" json:"pvCost,omitempty"`
	// PV bytes for current cost linked.
	PVBytes float64 `path:"-" query:"-" json:"pvBytes,omitempty"`
	// LoadBalancer cost for current cost linked.
	LoadBalancerCost float64 `path:"-" query:"-" json:"loadBalancerCost,omitempty"`
	// CPU core average usage.
	CPUCoreUsageAverage float64 `path:"-" query:"-" json:"cpuCoreUsageAverage,omitempty"`
	// CPU core max usage.
	CPUCoreUsageMax float64 `path:"-" query:"-" json:"cpuCoreUsageMax,omitempty"`
	// Ram average usage in byte.
	RAMByteUsageAverage float64 `path:"-" query:"-" json:"rambyteUsageAverage,omitempty"`
	// Ram max usage in byte.
	RAMByteUsageMax float64 `path:"-" query:"-" json:"rambyteUsageMax,omitempty"`
}

CostReportUpdateInput holds the modification input of the CostReport entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*CostReportUpdateInput) Model

func (crui *CostReportUpdateInput) Model() *CostReport

Model returns the CostReport entity for modifying, after validating.

func (*CostReportUpdateInput) SetGinContext

func (ic *CostReportUpdateInput) SetGinContext(ctx *gin.Context)

func (*CostReportUpdateInput) SetModelClient

func (ic *CostReportUpdateInput) SetModelClient(cli *Client)

func (*CostReportUpdateInput) Validate

func (crui *CostReportUpdateInput) Validate() error

Validate checks the CostReportUpdateInput entity.

func (*CostReportUpdateInput) ValidateWith

func (crui *CostReportUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportUpdateInput entity with the given context and client set.

type CostReportUpdateInputs

type CostReportUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*CostReportUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

CostReportUpdateInputs holds the modification input of the CostReport entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*CostReportUpdateInputs) IDs

func (crui *CostReportUpdateInputs) IDs() []int

IDs returns the ID list of the CostReport entities for modifying, after validating.

func (*CostReportUpdateInputs) Model

func (crui *CostReportUpdateInputs) Model() []*CostReport

Model returns the CostReport entities for modifying, after validating.

func (*CostReportUpdateInputs) SetGinContext

func (ic *CostReportUpdateInputs) SetGinContext(ctx *gin.Context)

func (*CostReportUpdateInputs) SetModelClient

func (ic *CostReportUpdateInputs) SetModelClient(cli *Client)

func (*CostReportUpdateInputs) Validate

func (crui *CostReportUpdateInputs) Validate() error

Validate checks the CostReportUpdateInputs entity.

func (*CostReportUpdateInputs) ValidateWith

func (crui *CostReportUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportUpdateInputs entity with the given context and client set.

type CostReportUpdateInputsItem

type CostReportUpdateInputsItem struct {
	// ID of the CostReport entity.
	ID int `path:"-" query:"-" json:"id"`

	// Cost number.
	TotalCost float64 `path:"-" query:"-" json:"totalCost"`
	// Cost currency.
	Currency int `path:"-" query:"-" json:"currency,omitempty"`
	// Cpu cost for current cost.
	CPUCost float64 `path:"-" query:"-" json:"cpuCost"`
	// GPU cost for current cost.
	GPUCost float64 `path:"-" query:"-" json:"gpuCost"`
	// Ram cost for current cost.
	RAMCost float64 `path:"-" query:"-" json:"ramCost"`
	// PV cost for current cost linked.
	PVCost float64 `path:"-" query:"-" json:"pvCost"`
	// PV bytes for current cost linked.
	PVBytes float64 `path:"-" query:"-" json:"pvBytes"`
	// LoadBalancer cost for current cost linked.
	LoadBalancerCost float64 `path:"-" query:"-" json:"loadBalancerCost"`
	// CPU core average usage.
	CPUCoreUsageAverage float64 `path:"-" query:"-" json:"cpuCoreUsageAverage"`
	// CPU core max usage.
	CPUCoreUsageMax float64 `path:"-" query:"-" json:"cpuCoreUsageMax"`
	// Ram average usage in byte.
	RAMByteUsageAverage float64 `path:"-" query:"-" json:"ramByteUsageAverage"`
	// Ram max usage in byte.
	RAMByteUsageMax float64 `path:"-" query:"-" json:"ramByteUsageMax"`
}

CostReportUpdateInputs holds the modification input item of the CostReport entities.

func (*CostReportUpdateInputsItem) ValidateWith

func (crui *CostReportUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the CostReportUpdateInputsItem entity with the given context and client set.

type CostReportUpdateOne

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

CostReportUpdateOne is the builder for updating a single CostReport entity.

func (*CostReportUpdateOne) AddCPUCoreUsageAverage

func (cruo *CostReportUpdateOne) AddCPUCoreUsageAverage(f float64) *CostReportUpdateOne

AddCPUCoreUsageAverage adds f to the "cpu_core_usage_average" field.

func (*CostReportUpdateOne) AddCPUCoreUsageMax

func (cruo *CostReportUpdateOne) AddCPUCoreUsageMax(f float64) *CostReportUpdateOne

AddCPUCoreUsageMax adds f to the "cpu_core_usage_max" field.

func (*CostReportUpdateOne) AddCPUCost

func (cruo *CostReportUpdateOne) AddCPUCost(f float64) *CostReportUpdateOne

AddCPUCost adds f to the "cpu_cost" field.

func (*CostReportUpdateOne) AddCurrency

func (cruo *CostReportUpdateOne) AddCurrency(i int) *CostReportUpdateOne

AddCurrency adds i to the "currency" field.

func (*CostReportUpdateOne) AddGPUCost

func (cruo *CostReportUpdateOne) AddGPUCost(f float64) *CostReportUpdateOne

AddGPUCost adds f to the "gpu_cost" field.

func (*CostReportUpdateOne) AddLoadBalancerCost

func (cruo *CostReportUpdateOne) AddLoadBalancerCost(f float64) *CostReportUpdateOne

AddLoadBalancerCost adds f to the "load_balancer_cost" field.

func (*CostReportUpdateOne) AddPVBytes

func (cruo *CostReportUpdateOne) AddPVBytes(f float64) *CostReportUpdateOne

AddPVBytes adds f to the "pv_bytes" field.

func (*CostReportUpdateOne) AddPVCost

func (cruo *CostReportUpdateOne) AddPVCost(f float64) *CostReportUpdateOne

AddPVCost adds f to the "pv_cost" field.

func (*CostReportUpdateOne) AddRAMByteUsageAverage

func (cruo *CostReportUpdateOne) AddRAMByteUsageAverage(f float64) *CostReportUpdateOne

AddRAMByteUsageAverage adds f to the "ram_byte_usage_average" field.

func (*CostReportUpdateOne) AddRAMByteUsageMax

func (cruo *CostReportUpdateOne) AddRAMByteUsageMax(f float64) *CostReportUpdateOne

AddRAMByteUsageMax adds f to the "ram_byte_usage_max" field.

func (*CostReportUpdateOne) AddRAMCost

func (cruo *CostReportUpdateOne) AddRAMCost(f float64) *CostReportUpdateOne

AddRAMCost adds f to the "ram_cost" field.

func (*CostReportUpdateOne) AddTotalCost

func (cruo *CostReportUpdateOne) AddTotalCost(f float64) *CostReportUpdateOne

AddTotalCost adds f to the "totalCost" field.

func (*CostReportUpdateOne) ClearCurrency

func (cruo *CostReportUpdateOne) ClearCurrency() *CostReportUpdateOne

ClearCurrency clears the value of the "currency" field.

func (*CostReportUpdateOne) Exec

func (cruo *CostReportUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CostReportUpdateOne) ExecContext

func (c *CostReportUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CostReportUpdateOne) ExecE

func (cruo *CostReportUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *CostReport) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*CostReportUpdateOne) ExecEX

func (cruo *CostReportUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *CostReport) error)

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

func (*CostReportUpdateOne) ExecX

func (cruo *CostReportUpdateOne) ExecX(ctx context.Context)

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

func (*CostReportUpdateOne) Modify

func (cruo *CostReportUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CostReportUpdateOne

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

func (*CostReportUpdateOne) Mutation

func (cruo *CostReportUpdateOne) Mutation() *CostReportMutation

Mutation returns the CostReportMutation object of the builder.

func (*CostReportUpdateOne) QueryContext

func (c *CostReportUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CostReportUpdateOne) Save

func (cruo *CostReportUpdateOne) Save(ctx context.Context) (*CostReport, error)

Save executes the query and returns the updated CostReport entity.

func (*CostReportUpdateOne) SaveE

func (cruo *CostReportUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *CostReport) error) (*CostReport, error)

SaveE calls the given function after updated the CostReport entity, which is always good for cascading update operations.

func (*CostReportUpdateOne) SaveEX

func (cruo *CostReportUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *CostReport) error) *CostReport

SaveEX is like SaveE, but panics if an error occurs.

func (*CostReportUpdateOne) SaveX

func (cruo *CostReportUpdateOne) SaveX(ctx context.Context) *CostReport

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

func (*CostReportUpdateOne) Select

func (cruo *CostReportUpdateOne) Select(field string, fields ...string) *CostReportUpdateOne

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

func (*CostReportUpdateOne) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*CostReportUpdateOne) SetCPUCoreUsageAverage

func (cruo *CostReportUpdateOne) SetCPUCoreUsageAverage(f float64) *CostReportUpdateOne

SetCPUCoreUsageAverage sets the "cpu_core_usage_average" field.

func (*CostReportUpdateOne) SetCPUCoreUsageMax

func (cruo *CostReportUpdateOne) SetCPUCoreUsageMax(f float64) *CostReportUpdateOne

SetCPUCoreUsageMax sets the "cpu_core_usage_max" field.

func (*CostReportUpdateOne) SetCPUCost

func (cruo *CostReportUpdateOne) SetCPUCost(f float64) *CostReportUpdateOne

SetCPUCost sets the "cpu_cost" field.

func (*CostReportUpdateOne) SetCurrency

func (cruo *CostReportUpdateOne) SetCurrency(i int) *CostReportUpdateOne

SetCurrency sets the "currency" field.

func (*CostReportUpdateOne) SetGPUCost

func (cruo *CostReportUpdateOne) SetGPUCost(f float64) *CostReportUpdateOne

SetGPUCost sets the "gpu_cost" field.

func (*CostReportUpdateOne) SetLoadBalancerCost

func (cruo *CostReportUpdateOne) SetLoadBalancerCost(f float64) *CostReportUpdateOne

SetLoadBalancerCost sets the "load_balancer_cost" field.

func (*CostReportUpdateOne) SetNillableCPUCoreUsageAverage

func (cruo *CostReportUpdateOne) SetNillableCPUCoreUsageAverage(f *float64) *CostReportUpdateOne

SetNillableCPUCoreUsageAverage sets the "cpu_core_usage_average" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillableCPUCoreUsageMax

func (cruo *CostReportUpdateOne) SetNillableCPUCoreUsageMax(f *float64) *CostReportUpdateOne

SetNillableCPUCoreUsageMax sets the "cpu_core_usage_max" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillableCPUCost

func (cruo *CostReportUpdateOne) SetNillableCPUCost(f *float64) *CostReportUpdateOne

SetNillableCPUCost sets the "cpu_cost" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillableCurrency

func (cruo *CostReportUpdateOne) SetNillableCurrency(i *int) *CostReportUpdateOne

SetNillableCurrency sets the "currency" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillableGPUCost

func (cruo *CostReportUpdateOne) SetNillableGPUCost(f *float64) *CostReportUpdateOne

SetNillableGPUCost sets the "gpu_cost" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillableLoadBalancerCost

func (cruo *CostReportUpdateOne) SetNillableLoadBalancerCost(f *float64) *CostReportUpdateOne

SetNillableLoadBalancerCost sets the "load_balancer_cost" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillablePVBytes

func (cruo *CostReportUpdateOne) SetNillablePVBytes(f *float64) *CostReportUpdateOne

SetNillablePVBytes sets the "pv_bytes" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillablePVCost

func (cruo *CostReportUpdateOne) SetNillablePVCost(f *float64) *CostReportUpdateOne

SetNillablePVCost sets the "pv_cost" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillableRAMByteUsageAverage

func (cruo *CostReportUpdateOne) SetNillableRAMByteUsageAverage(f *float64) *CostReportUpdateOne

SetNillableRAMByteUsageAverage sets the "ram_byte_usage_average" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillableRAMByteUsageMax

func (cruo *CostReportUpdateOne) SetNillableRAMByteUsageMax(f *float64) *CostReportUpdateOne

SetNillableRAMByteUsageMax sets the "ram_byte_usage_max" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillableRAMCost

func (cruo *CostReportUpdateOne) SetNillableRAMCost(f *float64) *CostReportUpdateOne

SetNillableRAMCost sets the "ram_cost" field if the given value is not nil.

func (*CostReportUpdateOne) SetNillableTotalCost

func (cruo *CostReportUpdateOne) SetNillableTotalCost(f *float64) *CostReportUpdateOne

SetNillableTotalCost sets the "totalCost" field if the given value is not nil.

func (*CostReportUpdateOne) SetPVBytes

func (cruo *CostReportUpdateOne) SetPVBytes(f float64) *CostReportUpdateOne

SetPVBytes sets the "pv_bytes" field.

func (*CostReportUpdateOne) SetPVCost

func (cruo *CostReportUpdateOne) SetPVCost(f float64) *CostReportUpdateOne

SetPVCost sets the "pv_cost" field.

func (*CostReportUpdateOne) SetRAMByteUsageAverage

func (cruo *CostReportUpdateOne) SetRAMByteUsageAverage(f float64) *CostReportUpdateOne

SetRAMByteUsageAverage sets the "ram_byte_usage_average" field.

func (*CostReportUpdateOne) SetRAMByteUsageMax

func (cruo *CostReportUpdateOne) SetRAMByteUsageMax(f float64) *CostReportUpdateOne

SetRAMByteUsageMax sets the "ram_byte_usage_max" field.

func (*CostReportUpdateOne) SetRAMCost

func (cruo *CostReportUpdateOne) SetRAMCost(f float64) *CostReportUpdateOne

SetRAMCost sets the "ram_cost" field.

func (*CostReportUpdateOne) SetTotalCost

func (cruo *CostReportUpdateOne) SetTotalCost(f float64) *CostReportUpdateOne

SetTotalCost sets the "totalCost" field.

func (*CostReportUpdateOne) Where

Where appends a list predicates to the CostReportUpdate builder.

type CostReportUpsert

type CostReportUpsert struct {
	*sql.UpdateSet
}

CostReportUpsert is the "OnConflict" setter.

func (*CostReportUpsert) AddCPUCoreUsageAverage

func (u *CostReportUpsert) AddCPUCoreUsageAverage(v float64) *CostReportUpsert

AddCPUCoreUsageAverage adds v to the "cpu_core_usage_average" field.

func (*CostReportUpsert) AddCPUCoreUsageMax

func (u *CostReportUpsert) AddCPUCoreUsageMax(v float64) *CostReportUpsert

AddCPUCoreUsageMax adds v to the "cpu_core_usage_max" field.

func (*CostReportUpsert) AddCPUCost

func (u *CostReportUpsert) AddCPUCost(v float64) *CostReportUpsert

AddCPUCost adds v to the "cpu_cost" field.

func (*CostReportUpsert) AddCurrency

func (u *CostReportUpsert) AddCurrency(v int) *CostReportUpsert

AddCurrency adds v to the "currency" field.

func (*CostReportUpsert) AddGPUCost

func (u *CostReportUpsert) AddGPUCost(v float64) *CostReportUpsert

AddGPUCost adds v to the "gpu_cost" field.

func (*CostReportUpsert) AddLoadBalancerCost

func (u *CostReportUpsert) AddLoadBalancerCost(v float64) *CostReportUpsert

AddLoadBalancerCost adds v to the "load_balancer_cost" field.

func (*CostReportUpsert) AddPVBytes

func (u *CostReportUpsert) AddPVBytes(v float64) *CostReportUpsert

AddPVBytes adds v to the "pv_bytes" field.

func (*CostReportUpsert) AddPVCost

func (u *CostReportUpsert) AddPVCost(v float64) *CostReportUpsert

AddPVCost adds v to the "pv_cost" field.

func (*CostReportUpsert) AddRAMByteUsageAverage

func (u *CostReportUpsert) AddRAMByteUsageAverage(v float64) *CostReportUpsert

AddRAMByteUsageAverage adds v to the "ram_byte_usage_average" field.

func (*CostReportUpsert) AddRAMByteUsageMax

func (u *CostReportUpsert) AddRAMByteUsageMax(v float64) *CostReportUpsert

AddRAMByteUsageMax adds v to the "ram_byte_usage_max" field.

func (*CostReportUpsert) AddRAMCost

func (u *CostReportUpsert) AddRAMCost(v float64) *CostReportUpsert

AddRAMCost adds v to the "ram_cost" field.

func (*CostReportUpsert) AddTotalCost

func (u *CostReportUpsert) AddTotalCost(v float64) *CostReportUpsert

AddTotalCost adds v to the "totalCost" field.

func (*CostReportUpsert) ClearCurrency

func (u *CostReportUpsert) ClearCurrency() *CostReportUpsert

ClearCurrency clears the value of the "currency" field.

func (*CostReportUpsert) SetCPUCoreUsageAverage

func (u *CostReportUpsert) SetCPUCoreUsageAverage(v float64) *CostReportUpsert

SetCPUCoreUsageAverage sets the "cpu_core_usage_average" field.

func (*CostReportUpsert) SetCPUCoreUsageMax

func (u *CostReportUpsert) SetCPUCoreUsageMax(v float64) *CostReportUpsert

SetCPUCoreUsageMax sets the "cpu_core_usage_max" field.

func (*CostReportUpsert) SetCPUCost

func (u *CostReportUpsert) SetCPUCost(v float64) *CostReportUpsert

SetCPUCost sets the "cpu_cost" field.

func (*CostReportUpsert) SetCurrency

func (u *CostReportUpsert) SetCurrency(v int) *CostReportUpsert

SetCurrency sets the "currency" field.

func (*CostReportUpsert) SetGPUCost

func (u *CostReportUpsert) SetGPUCost(v float64) *CostReportUpsert

SetGPUCost sets the "gpu_cost" field.

func (*CostReportUpsert) SetLoadBalancerCost

func (u *CostReportUpsert) SetLoadBalancerCost(v float64) *CostReportUpsert

SetLoadBalancerCost sets the "load_balancer_cost" field.

func (*CostReportUpsert) SetPVBytes

func (u *CostReportUpsert) SetPVBytes(v float64) *CostReportUpsert

SetPVBytes sets the "pv_bytes" field.

func (*CostReportUpsert) SetPVCost

func (u *CostReportUpsert) SetPVCost(v float64) *CostReportUpsert

SetPVCost sets the "pv_cost" field.

func (*CostReportUpsert) SetRAMByteUsageAverage

func (u *CostReportUpsert) SetRAMByteUsageAverage(v float64) *CostReportUpsert

SetRAMByteUsageAverage sets the "ram_byte_usage_average" field.

func (*CostReportUpsert) SetRAMByteUsageMax

func (u *CostReportUpsert) SetRAMByteUsageMax(v float64) *CostReportUpsert

SetRAMByteUsageMax sets the "ram_byte_usage_max" field.

func (*CostReportUpsert) SetRAMCost

func (u *CostReportUpsert) SetRAMCost(v float64) *CostReportUpsert

SetRAMCost sets the "ram_cost" field.

func (*CostReportUpsert) SetTotalCost

func (u *CostReportUpsert) SetTotalCost(v float64) *CostReportUpsert

SetTotalCost sets the "totalCost" field.

func (*CostReportUpsert) UpdateCPUCoreUsageAverage

func (u *CostReportUpsert) UpdateCPUCoreUsageAverage() *CostReportUpsert

UpdateCPUCoreUsageAverage sets the "cpu_core_usage_average" field to the value that was provided on create.

func (*CostReportUpsert) UpdateCPUCoreUsageMax

func (u *CostReportUpsert) UpdateCPUCoreUsageMax() *CostReportUpsert

UpdateCPUCoreUsageMax sets the "cpu_core_usage_max" field to the value that was provided on create.

func (*CostReportUpsert) UpdateCPUCost

func (u *CostReportUpsert) UpdateCPUCost() *CostReportUpsert

UpdateCPUCost sets the "cpu_cost" field to the value that was provided on create.

func (*CostReportUpsert) UpdateCurrency

func (u *CostReportUpsert) UpdateCurrency() *CostReportUpsert

UpdateCurrency sets the "currency" field to the value that was provided on create.

func (*CostReportUpsert) UpdateGPUCost

func (u *CostReportUpsert) UpdateGPUCost() *CostReportUpsert

UpdateGPUCost sets the "gpu_cost" field to the value that was provided on create.

func (*CostReportUpsert) UpdateLoadBalancerCost

func (u *CostReportUpsert) UpdateLoadBalancerCost() *CostReportUpsert

UpdateLoadBalancerCost sets the "load_balancer_cost" field to the value that was provided on create.

func (*CostReportUpsert) UpdatePVBytes

func (u *CostReportUpsert) UpdatePVBytes() *CostReportUpsert

UpdatePVBytes sets the "pv_bytes" field to the value that was provided on create.

func (*CostReportUpsert) UpdatePVCost

func (u *CostReportUpsert) UpdatePVCost() *CostReportUpsert

UpdatePVCost sets the "pv_cost" field to the value that was provided on create.

func (*CostReportUpsert) UpdateRAMByteUsageAverage

func (u *CostReportUpsert) UpdateRAMByteUsageAverage() *CostReportUpsert

UpdateRAMByteUsageAverage sets the "ram_byte_usage_average" field to the value that was provided on create.

func (*CostReportUpsert) UpdateRAMByteUsageMax

func (u *CostReportUpsert) UpdateRAMByteUsageMax() *CostReportUpsert

UpdateRAMByteUsageMax sets the "ram_byte_usage_max" field to the value that was provided on create.

func (*CostReportUpsert) UpdateRAMCost

func (u *CostReportUpsert) UpdateRAMCost() *CostReportUpsert

UpdateRAMCost sets the "ram_cost" field to the value that was provided on create.

func (*CostReportUpsert) UpdateTotalCost

func (u *CostReportUpsert) UpdateTotalCost() *CostReportUpsert

UpdateTotalCost sets the "totalCost" field to the value that was provided on create.

type CostReportUpsertBulk

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

CostReportUpsertBulk is the builder for "upsert"-ing a bulk of CostReport nodes.

func (*CostReportUpsertBulk) AddCPUCoreUsageAverage

func (u *CostReportUpsertBulk) AddCPUCoreUsageAverage(v float64) *CostReportUpsertBulk

AddCPUCoreUsageAverage adds v to the "cpu_core_usage_average" field.

func (*CostReportUpsertBulk) AddCPUCoreUsageMax

func (u *CostReportUpsertBulk) AddCPUCoreUsageMax(v float64) *CostReportUpsertBulk

AddCPUCoreUsageMax adds v to the "cpu_core_usage_max" field.

func (*CostReportUpsertBulk) AddCPUCost

AddCPUCost adds v to the "cpu_cost" field.

func (*CostReportUpsertBulk) AddCurrency

func (u *CostReportUpsertBulk) AddCurrency(v int) *CostReportUpsertBulk

AddCurrency adds v to the "currency" field.

func (*CostReportUpsertBulk) AddGPUCost

AddGPUCost adds v to the "gpu_cost" field.

func (*CostReportUpsertBulk) AddLoadBalancerCost

func (u *CostReportUpsertBulk) AddLoadBalancerCost(v float64) *CostReportUpsertBulk

AddLoadBalancerCost adds v to the "load_balancer_cost" field.

func (*CostReportUpsertBulk) AddPVBytes

AddPVBytes adds v to the "pv_bytes" field.

func (*CostReportUpsertBulk) AddPVCost

AddPVCost adds v to the "pv_cost" field.

func (*CostReportUpsertBulk) AddRAMByteUsageAverage

func (u *CostReportUpsertBulk) AddRAMByteUsageAverage(v float64) *CostReportUpsertBulk

AddRAMByteUsageAverage adds v to the "ram_byte_usage_average" field.

func (*CostReportUpsertBulk) AddRAMByteUsageMax

func (u *CostReportUpsertBulk) AddRAMByteUsageMax(v float64) *CostReportUpsertBulk

AddRAMByteUsageMax adds v to the "ram_byte_usage_max" field.

func (*CostReportUpsertBulk) AddRAMCost

AddRAMCost adds v to the "ram_cost" field.

func (*CostReportUpsertBulk) AddTotalCost

AddTotalCost adds v to the "totalCost" field.

func (*CostReportUpsertBulk) ClearCurrency

func (u *CostReportUpsertBulk) ClearCurrency() *CostReportUpsertBulk

ClearCurrency clears the value of the "currency" field.

func (*CostReportUpsertBulk) DoNothing

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

func (*CostReportUpsertBulk) Exec

Exec executes the query.

func (*CostReportUpsertBulk) ExecE

func (u *CostReportUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *CostReport) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*CostReportUpsertBulk) ExecEX

func (u *CostReportUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *CostReport) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*CostReportUpsertBulk) ExecX

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

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

func (*CostReportUpsertBulk) Ignore

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

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

func (*CostReportUpsertBulk) SetCPUCoreUsageAverage

func (u *CostReportUpsertBulk) SetCPUCoreUsageAverage(v float64) *CostReportUpsertBulk

SetCPUCoreUsageAverage sets the "cpu_core_usage_average" field.

func (*CostReportUpsertBulk) SetCPUCoreUsageMax

func (u *CostReportUpsertBulk) SetCPUCoreUsageMax(v float64) *CostReportUpsertBulk

SetCPUCoreUsageMax sets the "cpu_core_usage_max" field.

func (*CostReportUpsertBulk) SetCPUCost

SetCPUCost sets the "cpu_cost" field.

func (*CostReportUpsertBulk) SetCurrency

func (u *CostReportUpsertBulk) SetCurrency(v int) *CostReportUpsertBulk

SetCurrency sets the "currency" field.

func (*CostReportUpsertBulk) SetGPUCost

SetGPUCost sets the "gpu_cost" field.

func (*CostReportUpsertBulk) SetLoadBalancerCost

func (u *CostReportUpsertBulk) SetLoadBalancerCost(v float64) *CostReportUpsertBulk

SetLoadBalancerCost sets the "load_balancer_cost" field.

func (*CostReportUpsertBulk) SetPVBytes

SetPVBytes sets the "pv_bytes" field.

func (*CostReportUpsertBulk) SetPVCost

SetPVCost sets the "pv_cost" field.

func (*CostReportUpsertBulk) SetRAMByteUsageAverage

func (u *CostReportUpsertBulk) SetRAMByteUsageAverage(v float64) *CostReportUpsertBulk

SetRAMByteUsageAverage sets the "ram_byte_usage_average" field.

func (*CostReportUpsertBulk) SetRAMByteUsageMax

func (u *CostReportUpsertBulk) SetRAMByteUsageMax(v float64) *CostReportUpsertBulk

SetRAMByteUsageMax sets the "ram_byte_usage_max" field.

func (*CostReportUpsertBulk) SetRAMCost

SetRAMCost sets the "ram_cost" field.

func (*CostReportUpsertBulk) SetTotalCost

SetTotalCost sets the "totalCost" field.

func (*CostReportUpsertBulk) Update

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

func (*CostReportUpsertBulk) UpdateCPUCoreUsageAverage

func (u *CostReportUpsertBulk) UpdateCPUCoreUsageAverage() *CostReportUpsertBulk

UpdateCPUCoreUsageAverage sets the "cpu_core_usage_average" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateCPUCoreUsageMax

func (u *CostReportUpsertBulk) UpdateCPUCoreUsageMax() *CostReportUpsertBulk

UpdateCPUCoreUsageMax sets the "cpu_core_usage_max" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateCPUCost

func (u *CostReportUpsertBulk) UpdateCPUCost() *CostReportUpsertBulk

UpdateCPUCost sets the "cpu_cost" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateCurrency

func (u *CostReportUpsertBulk) UpdateCurrency() *CostReportUpsertBulk

UpdateCurrency sets the "currency" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateGPUCost

func (u *CostReportUpsertBulk) UpdateGPUCost() *CostReportUpsertBulk

UpdateGPUCost sets the "gpu_cost" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateLoadBalancerCost

func (u *CostReportUpsertBulk) UpdateLoadBalancerCost() *CostReportUpsertBulk

UpdateLoadBalancerCost sets the "load_balancer_cost" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateNewValues

func (u *CostReportUpsertBulk) UpdateNewValues() *CostReportUpsertBulk

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

client.CostReport.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CostReportUpsertBulk) UpdatePVBytes

func (u *CostReportUpsertBulk) UpdatePVBytes() *CostReportUpsertBulk

UpdatePVBytes sets the "pv_bytes" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdatePVCost

func (u *CostReportUpsertBulk) UpdatePVCost() *CostReportUpsertBulk

UpdatePVCost sets the "pv_cost" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateRAMByteUsageAverage

func (u *CostReportUpsertBulk) UpdateRAMByteUsageAverage() *CostReportUpsertBulk

UpdateRAMByteUsageAverage sets the "ram_byte_usage_average" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateRAMByteUsageMax

func (u *CostReportUpsertBulk) UpdateRAMByteUsageMax() *CostReportUpsertBulk

UpdateRAMByteUsageMax sets the "ram_byte_usage_max" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateRAMCost

func (u *CostReportUpsertBulk) UpdateRAMCost() *CostReportUpsertBulk

UpdateRAMCost sets the "ram_cost" field to the value that was provided on create.

func (*CostReportUpsertBulk) UpdateTotalCost

func (u *CostReportUpsertBulk) UpdateTotalCost() *CostReportUpsertBulk

UpdateTotalCost sets the "totalCost" field to the value that was provided on create.

type CostReportUpsertOne

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

CostReportUpsertOne is the builder for "upsert"-ing

one CostReport node.

func (*CostReportUpsertOne) AddCPUCoreUsageAverage

func (u *CostReportUpsertOne) AddCPUCoreUsageAverage(v float64) *CostReportUpsertOne

AddCPUCoreUsageAverage adds v to the "cpu_core_usage_average" field.

func (*CostReportUpsertOne) AddCPUCoreUsageMax

func (u *CostReportUpsertOne) AddCPUCoreUsageMax(v float64) *CostReportUpsertOne

AddCPUCoreUsageMax adds v to the "cpu_core_usage_max" field.

func (*CostReportUpsertOne) AddCPUCost

AddCPUCost adds v to the "cpu_cost" field.

func (*CostReportUpsertOne) AddCurrency

func (u *CostReportUpsertOne) AddCurrency(v int) *CostReportUpsertOne

AddCurrency adds v to the "currency" field.

func (*CostReportUpsertOne) AddGPUCost

AddGPUCost adds v to the "gpu_cost" field.

func (*CostReportUpsertOne) AddLoadBalancerCost

func (u *CostReportUpsertOne) AddLoadBalancerCost(v float64) *CostReportUpsertOne

AddLoadBalancerCost adds v to the "load_balancer_cost" field.

func (*CostReportUpsertOne) AddPVBytes

AddPVBytes adds v to the "pv_bytes" field.

func (*CostReportUpsertOne) AddPVCost

AddPVCost adds v to the "pv_cost" field.

func (*CostReportUpsertOne) AddRAMByteUsageAverage

func (u *CostReportUpsertOne) AddRAMByteUsageAverage(v float64) *CostReportUpsertOne

AddRAMByteUsageAverage adds v to the "ram_byte_usage_average" field.

func (*CostReportUpsertOne) AddRAMByteUsageMax

func (u *CostReportUpsertOne) AddRAMByteUsageMax(v float64) *CostReportUpsertOne

AddRAMByteUsageMax adds v to the "ram_byte_usage_max" field.

func (*CostReportUpsertOne) AddRAMCost

AddRAMCost adds v to the "ram_cost" field.

func (*CostReportUpsertOne) AddTotalCost

func (u *CostReportUpsertOne) AddTotalCost(v float64) *CostReportUpsertOne

AddTotalCost adds v to the "totalCost" field.

func (*CostReportUpsertOne) ClearCurrency

func (u *CostReportUpsertOne) ClearCurrency() *CostReportUpsertOne

ClearCurrency clears the value of the "currency" field.

func (*CostReportUpsertOne) DoNothing

func (u *CostReportUpsertOne) DoNothing() *CostReportUpsertOne

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

func (*CostReportUpsertOne) Exec

Exec executes the query.

func (*CostReportUpsertOne) ExecE

func (u *CostReportUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *CostReport) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*CostReportUpsertOne) ExecEX

func (u *CostReportUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *CostReport) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*CostReportUpsertOne) ExecX

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

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

func (*CostReportUpsertOne) ID

func (u *CostReportUpsertOne) ID(ctx context.Context) (id int, err error)

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

func (*CostReportUpsertOne) IDX

func (u *CostReportUpsertOne) IDX(ctx context.Context) int

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

func (*CostReportUpsertOne) Ignore

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

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

func (*CostReportUpsertOne) SetCPUCoreUsageAverage

func (u *CostReportUpsertOne) SetCPUCoreUsageAverage(v float64) *CostReportUpsertOne

SetCPUCoreUsageAverage sets the "cpu_core_usage_average" field.

func (*CostReportUpsertOne) SetCPUCoreUsageMax

func (u *CostReportUpsertOne) SetCPUCoreUsageMax(v float64) *CostReportUpsertOne

SetCPUCoreUsageMax sets the "cpu_core_usage_max" field.

func (*CostReportUpsertOne) SetCPUCost

SetCPUCost sets the "cpu_cost" field.

func (*CostReportUpsertOne) SetCurrency

func (u *CostReportUpsertOne) SetCurrency(v int) *CostReportUpsertOne

SetCurrency sets the "currency" field.

func (*CostReportUpsertOne) SetGPUCost

SetGPUCost sets the "gpu_cost" field.

func (*CostReportUpsertOne) SetLoadBalancerCost

func (u *CostReportUpsertOne) SetLoadBalancerCost(v float64) *CostReportUpsertOne

SetLoadBalancerCost sets the "load_balancer_cost" field.

func (*CostReportUpsertOne) SetPVBytes

SetPVBytes sets the "pv_bytes" field.

func (*CostReportUpsertOne) SetPVCost

SetPVCost sets the "pv_cost" field.

func (*CostReportUpsertOne) SetRAMByteUsageAverage

func (u *CostReportUpsertOne) SetRAMByteUsageAverage(v float64) *CostReportUpsertOne

SetRAMByteUsageAverage sets the "ram_byte_usage_average" field.

func (*CostReportUpsertOne) SetRAMByteUsageMax

func (u *CostReportUpsertOne) SetRAMByteUsageMax(v float64) *CostReportUpsertOne

SetRAMByteUsageMax sets the "ram_byte_usage_max" field.

func (*CostReportUpsertOne) SetRAMCost

SetRAMCost sets the "ram_cost" field.

func (*CostReportUpsertOne) SetTotalCost

func (u *CostReportUpsertOne) SetTotalCost(v float64) *CostReportUpsertOne

SetTotalCost sets the "totalCost" field.

func (*CostReportUpsertOne) Update

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

func (*CostReportUpsertOne) UpdateCPUCoreUsageAverage

func (u *CostReportUpsertOne) UpdateCPUCoreUsageAverage() *CostReportUpsertOne

UpdateCPUCoreUsageAverage sets the "cpu_core_usage_average" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateCPUCoreUsageMax

func (u *CostReportUpsertOne) UpdateCPUCoreUsageMax() *CostReportUpsertOne

UpdateCPUCoreUsageMax sets the "cpu_core_usage_max" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateCPUCost

func (u *CostReportUpsertOne) UpdateCPUCost() *CostReportUpsertOne

UpdateCPUCost sets the "cpu_cost" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateCurrency

func (u *CostReportUpsertOne) UpdateCurrency() *CostReportUpsertOne

UpdateCurrency sets the "currency" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateGPUCost

func (u *CostReportUpsertOne) UpdateGPUCost() *CostReportUpsertOne

UpdateGPUCost sets the "gpu_cost" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateLoadBalancerCost

func (u *CostReportUpsertOne) UpdateLoadBalancerCost() *CostReportUpsertOne

UpdateLoadBalancerCost sets the "load_balancer_cost" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateNewValues

func (u *CostReportUpsertOne) UpdateNewValues() *CostReportUpsertOne

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

client.CostReport.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CostReportUpsertOne) UpdatePVBytes

func (u *CostReportUpsertOne) UpdatePVBytes() *CostReportUpsertOne

UpdatePVBytes sets the "pv_bytes" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdatePVCost

func (u *CostReportUpsertOne) UpdatePVCost() *CostReportUpsertOne

UpdatePVCost sets the "pv_cost" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateRAMByteUsageAverage

func (u *CostReportUpsertOne) UpdateRAMByteUsageAverage() *CostReportUpsertOne

UpdateRAMByteUsageAverage sets the "ram_byte_usage_average" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateRAMByteUsageMax

func (u *CostReportUpsertOne) UpdateRAMByteUsageMax() *CostReportUpsertOne

UpdateRAMByteUsageMax sets the "ram_byte_usage_max" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateRAMCost

func (u *CostReportUpsertOne) UpdateRAMCost() *CostReportUpsertOne

UpdateRAMCost sets the "ram_cost" field to the value that was provided on create.

func (*CostReportUpsertOne) UpdateTotalCost

func (u *CostReportUpsertOne) UpdateTotalCost() *CostReportUpsertOne

UpdateTotalCost sets the "totalCost" field to the value that was provided on create.

type CostReports

type CostReports []*CostReport

CostReports is a parsable slice of CostReport.

func (CostReports) View

func (_crs CostReports) View() []*CostReportOutput

View returns the output of CostReport entities.

type DistributeLock

type DistributeLock struct {

	// ID of the ent.
	// ID is the lock key.
	ID string `json:"id,omitempty"`
	// Expiration timestamp to prevent the lock be occupied for long time.
	ExpireAt int64 `json:"expireAt,omitempty"`
	// Holder is the id for current key owner
	Holder string `json:"holder,omitempty"`
	// contains filtered or unexported fields
}

DistributeLock is the model entity for the DistributeLock schema.

func (*DistributeLock) ExecContext

func (c *DistributeLock) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLock) QueryContext

func (c *DistributeLock) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLock) String

func (dl *DistributeLock) String() string

String implements the fmt.Stringer.

func (*DistributeLock) Unwrap

func (dl *DistributeLock) Unwrap() *DistributeLock

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

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

func (*DistributeLock) Value

func (dl *DistributeLock) Value(name string) (ent.Value, error)

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

func (*DistributeLock) View

func (_dl *DistributeLock) View() *DistributeLockOutput

View returns the output of DistributeLock entity.

type DistributeLockClient

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

DistributeLockClient is a client for the DistributeLock schema.

func NewDistributeLockClient

func NewDistributeLockClient(c config) *DistributeLockClient

NewDistributeLockClient returns a client for the DistributeLock from the given config.

func (*DistributeLockClient) Create

Create returns a builder for creating a DistributeLock entity.

func (*DistributeLockClient) CreateBulk

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

func (*DistributeLockClient) Delete

Delete returns a delete builder for DistributeLock.

func (*DistributeLockClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DistributeLockClient) DeleteOneID

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

func (*DistributeLockClient) ExecContext

func (c *DistributeLockClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLockClient) Get

Get returns a DistributeLock entity by its id.

func (*DistributeLockClient) GetX

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

func (*DistributeLockClient) Hooks

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

Hooks returns the client hooks.

func (*DistributeLockClient) Intercept

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

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

func (*DistributeLockClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DistributeLockClient) MapCreateBulk added in v0.5.0

func (c *DistributeLockClient) MapCreateBulk(slice any, setFunc func(*DistributeLockCreate, int)) *DistributeLockCreateBulk

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

Query returns a query builder for DistributeLock.

func (*DistributeLockClient) QueryContext

func (c *DistributeLockClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLockClient) Update

Update returns an update builder for DistributeLock.

func (*DistributeLockClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DistributeLockClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DistributeLockClient) Use

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

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

type DistributeLockClientGetter

type DistributeLockClientGetter interface {
	// DistributeLocks returns the client for interacting with the DistributeLock builders.
	DistributeLocks() *DistributeLockClient
}

DistributeLockClientGetter is an interface that allows getting DistributeLockClient.

type DistributeLockCreate

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

DistributeLockCreate is the builder for creating a DistributeLock entity.

func (*DistributeLockCreate) Exec

func (dlc *DistributeLockCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DistributeLockCreate) ExecContext

func (c *DistributeLockCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLockCreate) ExecE

func (dlc *DistributeLockCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *DistributeLock) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*DistributeLockCreate) ExecEX

func (dlc *DistributeLockCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *DistributeLock) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*DistributeLockCreate) ExecX

func (dlc *DistributeLockCreate) ExecX(ctx context.Context)

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

func (*DistributeLockCreate) Mutation

Mutation returns the DistributeLockMutation object of the builder.

func (*DistributeLockCreate) OnConflict

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

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

func (*DistributeLockCreate) OnConflictColumns

func (dlc *DistributeLockCreate) OnConflictColumns(columns ...string) *DistributeLockUpsertOne

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

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

func (*DistributeLockCreate) QueryContext

func (c *DistributeLockCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLockCreate) Save

Save creates the DistributeLock in the database.

func (*DistributeLockCreate) SaveE

func (dlc *DistributeLockCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *DistributeLock) error) (*DistributeLock, error)

SaveE calls the given function after created the DistributeLock entity, which is always good for cascading create operations.

func (*DistributeLockCreate) SaveEX

func (dlc *DistributeLockCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *DistributeLock) error) *DistributeLock

SaveEX is like SaveE, but panics if an error occurs.

func (*DistributeLockCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DistributeLockCreate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*DistributeLockCreate) SetExpireAt

func (dlc *DistributeLockCreate) SetExpireAt(i int64) *DistributeLockCreate

SetExpireAt sets the "expireAt" field.

func (*DistributeLockCreate) SetHolder

SetHolder sets the "holder" field.

func (*DistributeLockCreate) SetID

SetID sets the "id" field.

type DistributeLockCreateBulk

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

DistributeLockCreateBulk is the builder for creating many DistributeLock entities in bulk.

func (*DistributeLockCreateBulk) Exec

Exec executes the query.

func (*DistributeLockCreateBulk) ExecContext

func (c *DistributeLockCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLockCreateBulk) ExecE

func (dlcb *DistributeLockCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *DistributeLock) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*DistributeLockCreateBulk) ExecEX

func (dlcb *DistributeLockCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *DistributeLock) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*DistributeLockCreateBulk) ExecX

func (dlcb *DistributeLockCreateBulk) ExecX(ctx context.Context)

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

func (*DistributeLockCreateBulk) OnConflict

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

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

func (*DistributeLockCreateBulk) OnConflictColumns

func (dlcb *DistributeLockCreateBulk) OnConflictColumns(columns ...string) *DistributeLockUpsertBulk

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

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

func (*DistributeLockCreateBulk) QueryContext

func (c *DistributeLockCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLockCreateBulk) Save

Save creates the DistributeLock entities in the database.

func (*DistributeLockCreateBulk) SaveE

func (dlcb *DistributeLockCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *DistributeLock) error) ([]*DistributeLock, error)

SaveE calls the given function after created the DistributeLock entities, which is always good for cascading create operations.

func (*DistributeLockCreateBulk) SaveEX

func (dlcb *DistributeLockCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *DistributeLock) error) []*DistributeLock

SaveEX is like SaveE, but panics if an error occurs.

func (*DistributeLockCreateBulk) SaveX

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

func (*DistributeLockCreateBulk) Set

Set leverages the DistributeLockCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type DistributeLockCreateInput

type DistributeLockCreateInput struct {

	// Holder is the id for current key owner
	Holder string `path:"-" query:"-" json:"holder"`
	// Expiration timestamp to prevent the lock be occupied for long time.
	ExpireAt int64 `path:"-" query:"-" json:"expireAt"`
	// contains filtered or unexported fields
}

DistributeLockCreateInput holds the creation input of the DistributeLock entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*DistributeLockCreateInput) Model

Model returns the DistributeLock entity for creating, after validating.

func (*DistributeLockCreateInput) SetGinContext

func (ic *DistributeLockCreateInput) SetGinContext(ctx *gin.Context)

func (*DistributeLockCreateInput) SetModelClient

func (ic *DistributeLockCreateInput) SetModelClient(cli *Client)

func (*DistributeLockCreateInput) Validate

func (dlci *DistributeLockCreateInput) Validate() error

Validate checks the DistributeLockCreateInput entity.

func (*DistributeLockCreateInput) ValidateWith

func (dlci *DistributeLockCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockCreateInput entity with the given context and client set.

type DistributeLockCreateInputs

type DistributeLockCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*DistributeLockCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

DistributeLockCreateInputs holds the creation input of the DistributeLock entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*DistributeLockCreateInputs) Model

func (dlci *DistributeLockCreateInputs) Model() []*DistributeLock

Model returns the DistributeLock entities for creating, after validating.

func (*DistributeLockCreateInputs) SetGinContext

func (ic *DistributeLockCreateInputs) SetGinContext(ctx *gin.Context)

func (*DistributeLockCreateInputs) SetModelClient

func (ic *DistributeLockCreateInputs) SetModelClient(cli *Client)

func (*DistributeLockCreateInputs) Validate

func (dlci *DistributeLockCreateInputs) Validate() error

Validate checks the DistributeLockCreateInputs entity .

func (*DistributeLockCreateInputs) ValidateWith

func (dlci *DistributeLockCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockCreateInputs entity with the given context and client set.

type DistributeLockCreateInputsItem

type DistributeLockCreateInputsItem struct {
	// Holder is the id for current key owner
	Holder string `path:"-" query:"-" json:"holder"`
	// Expiration timestamp to prevent the lock be occupied for long time.
	ExpireAt int64 `path:"-" query:"-" json:"expireAt"`
}

DistributeLockCreateInputs holds the creation input item of the DistributeLock entities.

func (*DistributeLockCreateInputsItem) ValidateWith

func (dlci *DistributeLockCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockCreateInputsItem entity with the given context and client set.

type DistributeLockDelete

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

DistributeLockDelete is the builder for deleting a DistributeLock entity.

func (*DistributeLockDelete) Exec

func (dld *DistributeLockDelete) Exec(ctx context.Context) (int, error)

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

func (*DistributeLockDelete) ExecContext

func (c *DistributeLockDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLockDelete) ExecX

func (dld *DistributeLockDelete) ExecX(ctx context.Context) int

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

func (*DistributeLockDelete) QueryContext

func (c *DistributeLockDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLockDelete) Where

Where appends a list predicates to the DistributeLockDelete builder.

type DistributeLockDeleteInput

type DistributeLockDeleteInput struct {
	DistributeLockQueryInput `path:",inline"`
}

DistributeLockDeleteInput holds the deletion input of the DistributeLock entity, please tags with `path:",inline"` if embedding.

func (*DistributeLockDeleteInput) SetGinContext

func (ic *DistributeLockDeleteInput) SetGinContext(ctx *gin.Context)

func (*DistributeLockDeleteInput) SetModelClient

func (ic *DistributeLockDeleteInput) SetModelClient(cli *Client)

type DistributeLockDeleteInputs

type DistributeLockDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*DistributeLockDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

DistributeLockDeleteInputs holds the deletion input of the DistributeLock entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*DistributeLockDeleteInputs) IDs

func (dldi *DistributeLockDeleteInputs) IDs() []string

IDs returns the ID list of the DistributeLock entities for deleting, after validating.

func (*DistributeLockDeleteInputs) Model

func (dldi *DistributeLockDeleteInputs) Model() []*DistributeLock

Model returns the DistributeLock entities for deleting, after validating.

func (*DistributeLockDeleteInputs) SetGinContext

func (ic *DistributeLockDeleteInputs) SetGinContext(ctx *gin.Context)

func (*DistributeLockDeleteInputs) SetModelClient

func (ic *DistributeLockDeleteInputs) SetModelClient(cli *Client)

func (*DistributeLockDeleteInputs) Validate

func (dldi *DistributeLockDeleteInputs) Validate() error

Validate checks the DistributeLockDeleteInputs entity.

func (*DistributeLockDeleteInputs) ValidateWith

func (dldi *DistributeLockDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockDeleteInputs entity with the given context and client set.

type DistributeLockDeleteInputsItem

type DistributeLockDeleteInputsItem struct {
	// ID of the DistributeLock entity.
	ID string `path:"-" query:"-" json:"id"`
}

DistributeLockDeleteInputs holds the deletion input item of the DistributeLock entities.

type DistributeLockDeleteOne

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

DistributeLockDeleteOne is the builder for deleting a single DistributeLock entity.

func (*DistributeLockDeleteOne) Exec

func (dldo *DistributeLockDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DistributeLockDeleteOne) ExecX

func (dldo *DistributeLockDeleteOne) ExecX(ctx context.Context)

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

func (*DistributeLockDeleteOne) Where

Where appends a list predicates to the DistributeLockDelete builder.

type DistributeLockGroupBy

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

DistributeLockGroupBy is the group-by builder for DistributeLock entities.

func (*DistributeLockGroupBy) Aggregate

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

func (*DistributeLockGroupBy) Bool

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

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

func (*DistributeLockGroupBy) BoolX

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

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

func (*DistributeLockGroupBy) Bools

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

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

func (*DistributeLockGroupBy) BoolsX

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

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

func (*DistributeLockGroupBy) Float64

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

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

func (*DistributeLockGroupBy) Float64X

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

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

func (*DistributeLockGroupBy) Float64s

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

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

func (*DistributeLockGroupBy) Float64sX

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

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

func (*DistributeLockGroupBy) Int

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

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

func (*DistributeLockGroupBy) IntX

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

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

func (*DistributeLockGroupBy) Ints

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

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

func (*DistributeLockGroupBy) IntsX

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

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

func (*DistributeLockGroupBy) Scan

func (dlgb *DistributeLockGroupBy) Scan(ctx context.Context, v any) error

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

func (*DistributeLockGroupBy) ScanX

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

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

func (*DistributeLockGroupBy) String

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

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

func (*DistributeLockGroupBy) StringX

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

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

func (*DistributeLockGroupBy) Strings

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

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

func (*DistributeLockGroupBy) StringsX

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

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

type DistributeLockMutation

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

DistributeLockMutation represents an operation that mutates the DistributeLock nodes in the graph.

func (*DistributeLockMutation) AddExpireAt

func (m *DistributeLockMutation) AddExpireAt(i int64)

AddExpireAt adds i to the "expireAt" field.

func (*DistributeLockMutation) AddField

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

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

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

func (*DistributeLockMutation) AddedExpireAt

func (m *DistributeLockMutation) AddedExpireAt() (r int64, exists bool)

AddedExpireAt returns the value that was added to the "expireAt" field in this mutation.

func (*DistributeLockMutation) AddedField

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

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

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

func (*DistributeLockMutation) AddedIDs

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

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

func (*DistributeLockMutation) ClearEdge

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

func (m *DistributeLockMutation) 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 (*DistributeLockMutation) ClearedEdges

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

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

func (*DistributeLockMutation) ClearedFields

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

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

func (DistributeLockMutation) Client

func (m DistributeLockMutation) 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 (*DistributeLockMutation) EdgeCleared

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

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

func (*DistributeLockMutation) ExecContext

func (c *DistributeLockMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLockMutation) ExpireAt

func (m *DistributeLockMutation) ExpireAt() (r int64, exists bool)

ExpireAt returns the value of the "expireAt" field in the mutation.

func (*DistributeLockMutation) Field

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

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

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

func (*DistributeLockMutation) Fields

func (m *DistributeLockMutation) 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 (*DistributeLockMutation) Holder

func (m *DistributeLockMutation) Holder() (r string, exists bool)

Holder returns the value of the "holder" field in the mutation.

func (*DistributeLockMutation) ID

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

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

func (*DistributeLockMutation) 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 (*DistributeLockMutation) OldExpireAt

func (m *DistributeLockMutation) OldExpireAt(ctx context.Context) (v int64, err error)

OldExpireAt returns the old "expireAt" field's value of the DistributeLock entity. If the DistributeLock 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 (*DistributeLockMutation) OldField

func (m *DistributeLockMutation) 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 (*DistributeLockMutation) OldHolder

func (m *DistributeLockMutation) OldHolder(ctx context.Context) (v string, err error)

OldHolder returns the old "holder" field's value of the DistributeLock entity. If the DistributeLock 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 (*DistributeLockMutation) Op

func (m *DistributeLockMutation) Op() Op

Op returns the operation name.

func (*DistributeLockMutation) QueryContext

func (c *DistributeLockMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLockMutation) RemovedEdges

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

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

func (*DistributeLockMutation) RemovedIDs

func (m *DistributeLockMutation) 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 (*DistributeLockMutation) ResetEdge

func (m *DistributeLockMutation) 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 (*DistributeLockMutation) ResetExpireAt

func (m *DistributeLockMutation) ResetExpireAt()

ResetExpireAt resets all changes to the "expireAt" field.

func (*DistributeLockMutation) ResetField

func (m *DistributeLockMutation) 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 (*DistributeLockMutation) ResetHolder

func (m *DistributeLockMutation) ResetHolder()

ResetHolder resets all changes to the "holder" field.

func (*DistributeLockMutation) SetExpireAt

func (m *DistributeLockMutation) SetExpireAt(i int64)

SetExpireAt sets the "expireAt" field.

func (*DistributeLockMutation) SetField

func (m *DistributeLockMutation) 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 (*DistributeLockMutation) SetHolder

func (m *DistributeLockMutation) SetHolder(s string)

SetHolder sets the "holder" field.

func (*DistributeLockMutation) SetID

func (m *DistributeLockMutation) SetID(id string)

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

func (*DistributeLockMutation) SetOp

func (m *DistributeLockMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (DistributeLockMutation) Tx

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

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

func (*DistributeLockMutation) Type

func (m *DistributeLockMutation) Type() string

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

func (*DistributeLockMutation) Where

Where appends a list predicates to the DistributeLockMutation builder.

func (*DistributeLockMutation) WhereP

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

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

type DistributeLockOutput

type DistributeLockOutput struct {
	ID       string `json:"id,omitempty"`
	ExpireAt int64  `json:"expireAt,omitempty"`
	Holder   string `json:"holder,omitempty"`
}

DistributeLockOutput holds the output of the DistributeLock entity.

func ExposeDistributeLock

func ExposeDistributeLock(_dl *DistributeLock) *DistributeLockOutput

ExposeDistributeLock converts the DistributeLock to DistributeLockOutput.

func ExposeDistributeLocks

func ExposeDistributeLocks(_dls []*DistributeLock) []*DistributeLockOutput

ExposeDistributeLocks converts the DistributeLock slice to DistributeLockOutput pointer slice.

type DistributeLockPatchInput added in v0.5.0

type DistributeLockPatchInput struct {
	DistributeLockQueryInput `path:",inline" query:"-" json:"-"`

	// Expiration timestamp to prevent the lock be occupied for long time.
	ExpireAt int64 `path:"-" query:"-" json:"expireAt,omitempty"`
	// Holder is the id for current key owner
	Holder string `path:"-" query:"-" json:"holder,omitempty"`
	// contains filtered or unexported fields
}

DistributeLockPatchInput holds the patch input of the DistributeLock entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*DistributeLockPatchInput) Model added in v0.5.0

Model returns the DistributeLock patched entity, after validating.

func (*DistributeLockPatchInput) PatchModel added in v0.5.0

func (dlpi *DistributeLockPatchInput) PatchModel() *DistributeLock

PatchModel returns the DistributeLock partition entity for patching.

func (*DistributeLockPatchInput) SetGinContext added in v0.5.0

func (ic *DistributeLockPatchInput) SetGinContext(ctx *gin.Context)

func (*DistributeLockPatchInput) SetModelClient added in v0.5.0

func (ic *DistributeLockPatchInput) SetModelClient(cli *Client)

func (*DistributeLockPatchInput) Validate added in v0.5.0

func (dlpi *DistributeLockPatchInput) Validate() error

Validate checks the DistributeLockPatchInput entity.

func (*DistributeLockPatchInput) ValidateWith added in v0.5.0

func (dlpi *DistributeLockPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockPatchInput entity with the given context and client set.

type DistributeLockQuery

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

DistributeLockQuery is the builder for querying DistributeLock entities.

func (*DistributeLockQuery) Aggregate

func (dlq *DistributeLockQuery) Aggregate(fns ...AggregateFunc) *DistributeLockSelect

Aggregate returns a DistributeLockSelect configured with the given aggregations.

func (*DistributeLockQuery) All

All executes the query and returns a list of DistributeLocks.

func (*DistributeLockQuery) AllX

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

func (*DistributeLockQuery) Clone

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

func (*DistributeLockQuery) Count

func (dlq *DistributeLockQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DistributeLockQuery) CountX

func (dlq *DistributeLockQuery) CountX(ctx context.Context) int

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

func (*DistributeLockQuery) ExecContext

func (c *DistributeLockQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLockQuery) Exist

func (dlq *DistributeLockQuery) Exist(ctx context.Context) (bool, error)

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

func (*DistributeLockQuery) ExistX

func (dlq *DistributeLockQuery) ExistX(ctx context.Context) bool

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

func (*DistributeLockQuery) First

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

func (*DistributeLockQuery) FirstID

func (dlq *DistributeLockQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*DistributeLockQuery) FirstIDX

func (dlq *DistributeLockQuery) FirstIDX(ctx context.Context) string

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

func (*DistributeLockQuery) FirstX

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

func (*DistributeLockQuery) ForShare

func (dlq *DistributeLockQuery) ForShare(opts ...sql.LockOption) *DistributeLockQuery

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 (*DistributeLockQuery) ForUpdate

func (dlq *DistributeLockQuery) ForUpdate(opts ...sql.LockOption) *DistributeLockQuery

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 (*DistributeLockQuery) GroupBy

func (dlq *DistributeLockQuery) GroupBy(field string, fields ...string) *DistributeLockGroupBy

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 {
	ExpireAt int64 `json:"expireAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DistributeLock.Query().
	GroupBy(distributelock.FieldExpireAt).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*DistributeLockQuery) IDs

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

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

func (*DistributeLockQuery) IDsX

func (dlq *DistributeLockQuery) IDsX(ctx context.Context) []string

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

func (*DistributeLockQuery) Limit

func (dlq *DistributeLockQuery) Limit(limit int) *DistributeLockQuery

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

func (*DistributeLockQuery) Modify

func (dlq *DistributeLockQuery) Modify(modifiers ...func(s *sql.Selector)) *DistributeLockSelect

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

func (*DistributeLockQuery) Offset

func (dlq *DistributeLockQuery) Offset(offset int) *DistributeLockQuery

Offset to start from.

func (*DistributeLockQuery) Only

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

func (*DistributeLockQuery) OnlyID

func (dlq *DistributeLockQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*DistributeLockQuery) OnlyIDX

func (dlq *DistributeLockQuery) OnlyIDX(ctx context.Context) string

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

func (*DistributeLockQuery) OnlyX

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

func (*DistributeLockQuery) Order

Order specifies how the records should be ordered.

func (*DistributeLockQuery) QueryContext

func (c *DistributeLockQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLockQuery) Select

func (dlq *DistributeLockQuery) Select(fields ...string) *DistributeLockSelect

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 {
	ExpireAt int64 `json:"expireAt,omitempty"`
}

client.DistributeLock.Query().
	Select(distributelock.FieldExpireAt).
	Scan(ctx, &v)

func (*DistributeLockQuery) Unique

func (dlq *DistributeLockQuery) Unique(unique bool) *DistributeLockQuery

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

Where adds a new predicate for the DistributeLockQuery builder.

func (*DistributeLockQuery) WhereP

func (dlq *DistributeLockQuery) WhereP(ps ...func(*sql.Selector))

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

type DistributeLockQueryInput

type DistributeLockQueryInput struct {

	// Refer holds the route path reference of the DistributeLock entity.
	Refer *object.Refer `path:"distributelock,default=" query:"-" json:"-"`
	// ID of the DistributeLock entity.
	ID string `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

DistributeLockQueryInput holds the query input of the DistributeLock entity, please tags with `path:",inline"` if embedding.

func (*DistributeLockQueryInput) Model

Model returns the DistributeLock entity for querying, after validating.

func (*DistributeLockQueryInput) SetGinContext

func (ic *DistributeLockQueryInput) SetGinContext(ctx *gin.Context)

func (*DistributeLockQueryInput) SetModelClient

func (ic *DistributeLockQueryInput) SetModelClient(cli *Client)

func (*DistributeLockQueryInput) Validate

func (dlqi *DistributeLockQueryInput) Validate() error

Validate checks the DistributeLockQueryInput entity.

func (*DistributeLockQueryInput) ValidateWith

func (dlqi *DistributeLockQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockQueryInput entity with the given context and client set.

type DistributeLockQueryInputs

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

DistributeLockQueryInputs holds the query input of the DistributeLock entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*DistributeLockQueryInputs) SetGinContext

func (ic *DistributeLockQueryInputs) SetGinContext(ctx *gin.Context)

func (*DistributeLockQueryInputs) SetModelClient

func (ic *DistributeLockQueryInputs) SetModelClient(cli *Client)

func (*DistributeLockQueryInputs) Validate

func (dlqi *DistributeLockQueryInputs) Validate() error

Validate checks the DistributeLockQueryInputs entity.

func (*DistributeLockQueryInputs) ValidateWith

func (dlqi *DistributeLockQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockQueryInputs entity with the given context and client set.

type DistributeLockSelect

type DistributeLockSelect struct {
	*DistributeLockQuery
	// contains filtered or unexported fields
}

DistributeLockSelect is the builder for selecting fields of DistributeLock entities.

func (*DistributeLockSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DistributeLockSelect) Bool

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

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

func (*DistributeLockSelect) BoolX

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

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

func (*DistributeLockSelect) Bools

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

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

func (*DistributeLockSelect) BoolsX

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

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

func (DistributeLockSelect) ExecContext

func (c DistributeLockSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLockSelect) Float64

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

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

func (*DistributeLockSelect) Float64X

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

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

func (*DistributeLockSelect) Float64s

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

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

func (*DistributeLockSelect) Float64sX

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

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

func (*DistributeLockSelect) Int

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

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

func (*DistributeLockSelect) IntX

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

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

func (*DistributeLockSelect) Ints

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

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

func (*DistributeLockSelect) IntsX

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

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

func (*DistributeLockSelect) Modify

func (dls *DistributeLockSelect) Modify(modifiers ...func(s *sql.Selector)) *DistributeLockSelect

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

func (DistributeLockSelect) QueryContext

func (c DistributeLockSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLockSelect) Scan

func (dls *DistributeLockSelect) Scan(ctx context.Context, v any) error

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

func (*DistributeLockSelect) ScanX

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

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

func (*DistributeLockSelect) String

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

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

func (*DistributeLockSelect) StringX

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

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

func (*DistributeLockSelect) Strings

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

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

func (*DistributeLockSelect) StringsX

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

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

type DistributeLockUpdate

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

DistributeLockUpdate is the builder for updating DistributeLock entities.

func (*DistributeLockUpdate) AddExpireAt

func (dlu *DistributeLockUpdate) AddExpireAt(i int64) *DistributeLockUpdate

AddExpireAt adds i to the "expireAt" field.

func (*DistributeLockUpdate) Exec

func (dlu *DistributeLockUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DistributeLockUpdate) ExecContext

func (c *DistributeLockUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLockUpdate) ExecX

func (dlu *DistributeLockUpdate) ExecX(ctx context.Context)

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

func (*DistributeLockUpdate) Modify

func (dlu *DistributeLockUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DistributeLockUpdate

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

func (*DistributeLockUpdate) Mutation

Mutation returns the DistributeLockMutation object of the builder.

func (*DistributeLockUpdate) QueryContext

func (c *DistributeLockUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLockUpdate) Save

func (dlu *DistributeLockUpdate) Save(ctx context.Context) (int, error)

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

func (*DistributeLockUpdate) SaveX

func (dlu *DistributeLockUpdate) SaveX(ctx context.Context) int

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

func (*DistributeLockUpdate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*DistributeLockUpdate) SetExpireAt

func (dlu *DistributeLockUpdate) SetExpireAt(i int64) *DistributeLockUpdate

SetExpireAt sets the "expireAt" field.

func (*DistributeLockUpdate) SetNillableExpireAt added in v0.5.0

func (dlu *DistributeLockUpdate) SetNillableExpireAt(i *int64) *DistributeLockUpdate

SetNillableExpireAt sets the "expireAt" field if the given value is not nil.

func (*DistributeLockUpdate) Where

Where appends a list predicates to the DistributeLockUpdate builder.

type DistributeLockUpdateInput

type DistributeLockUpdateInput struct {
	DistributeLockQueryInput `path:",inline" query:"-" json:"-"`

	// Expiration timestamp to prevent the lock be occupied for long time.
	ExpireAt int64 `path:"-" query:"-" json:"expireAt,omitempty"`
}

DistributeLockUpdateInput holds the modification input of the DistributeLock entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*DistributeLockUpdateInput) Model

Model returns the DistributeLock entity for modifying, after validating.

func (*DistributeLockUpdateInput) SetGinContext

func (ic *DistributeLockUpdateInput) SetGinContext(ctx *gin.Context)

func (*DistributeLockUpdateInput) SetModelClient

func (ic *DistributeLockUpdateInput) SetModelClient(cli *Client)

func (*DistributeLockUpdateInput) Validate

func (dlui *DistributeLockUpdateInput) Validate() error

Validate checks the DistributeLockUpdateInput entity.

func (*DistributeLockUpdateInput) ValidateWith

func (dlui *DistributeLockUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockUpdateInput entity with the given context and client set.

type DistributeLockUpdateInputs

type DistributeLockUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*DistributeLockUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

DistributeLockUpdateInputs holds the modification input of the DistributeLock entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*DistributeLockUpdateInputs) IDs

func (dlui *DistributeLockUpdateInputs) IDs() []string

IDs returns the ID list of the DistributeLock entities for modifying, after validating.

func (*DistributeLockUpdateInputs) Model

func (dlui *DistributeLockUpdateInputs) Model() []*DistributeLock

Model returns the DistributeLock entities for modifying, after validating.

func (*DistributeLockUpdateInputs) SetGinContext

func (ic *DistributeLockUpdateInputs) SetGinContext(ctx *gin.Context)

func (*DistributeLockUpdateInputs) SetModelClient

func (ic *DistributeLockUpdateInputs) SetModelClient(cli *Client)

func (*DistributeLockUpdateInputs) Validate

func (dlui *DistributeLockUpdateInputs) Validate() error

Validate checks the DistributeLockUpdateInputs entity.

func (*DistributeLockUpdateInputs) ValidateWith

func (dlui *DistributeLockUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockUpdateInputs entity with the given context and client set.

type DistributeLockUpdateInputsItem

type DistributeLockUpdateInputsItem struct {
	// ID of the DistributeLock entity.
	ID string `path:"-" query:"-" json:"id"`

	// Expiration timestamp to prevent the lock be occupied for long time.
	ExpireAt int64 `path:"-" query:"-" json:"expireAt"`
}

DistributeLockUpdateInputs holds the modification input item of the DistributeLock entities.

func (*DistributeLockUpdateInputsItem) ValidateWith

func (dlui *DistributeLockUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the DistributeLockUpdateInputsItem entity with the given context and client set.

type DistributeLockUpdateOne

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

DistributeLockUpdateOne is the builder for updating a single DistributeLock entity.

func (*DistributeLockUpdateOne) AddExpireAt

AddExpireAt adds i to the "expireAt" field.

func (*DistributeLockUpdateOne) Exec

func (dluo *DistributeLockUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DistributeLockUpdateOne) ExecContext

func (c *DistributeLockUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DistributeLockUpdateOne) ExecE

func (dluo *DistributeLockUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *DistributeLock) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*DistributeLockUpdateOne) ExecEX

func (dluo *DistributeLockUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *DistributeLock) error)

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

func (*DistributeLockUpdateOne) ExecX

func (dluo *DistributeLockUpdateOne) ExecX(ctx context.Context)

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

func (*DistributeLockUpdateOne) Modify

func (dluo *DistributeLockUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DistributeLockUpdateOne

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

func (*DistributeLockUpdateOne) Mutation

Mutation returns the DistributeLockMutation object of the builder.

func (*DistributeLockUpdateOne) QueryContext

func (c *DistributeLockUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DistributeLockUpdateOne) Save

Save executes the query and returns the updated DistributeLock entity.

func (*DistributeLockUpdateOne) SaveE

func (dluo *DistributeLockUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *DistributeLock) error) (*DistributeLock, error)

SaveE calls the given function after updated the DistributeLock entity, which is always good for cascading update operations.

func (*DistributeLockUpdateOne) SaveEX

func (dluo *DistributeLockUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *DistributeLock) error) *DistributeLock

SaveEX is like SaveE, but panics if an error occurs.

func (*DistributeLockUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DistributeLockUpdateOne) Select

func (dluo *DistributeLockUpdateOne) Select(field string, fields ...string) *DistributeLockUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DistributeLockUpdateOne) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*DistributeLockUpdateOne) SetExpireAt

SetExpireAt sets the "expireAt" field.

func (*DistributeLockUpdateOne) SetNillableExpireAt added in v0.5.0

func (dluo *DistributeLockUpdateOne) SetNillableExpireAt(i *int64) *DistributeLockUpdateOne

SetNillableExpireAt sets the "expireAt" field if the given value is not nil.

func (*DistributeLockUpdateOne) Where

Where appends a list predicates to the DistributeLockUpdate builder.

type DistributeLockUpsert

type DistributeLockUpsert struct {
	*sql.UpdateSet
}

DistributeLockUpsert is the "OnConflict" setter.

func (*DistributeLockUpsert) AddExpireAt

func (u *DistributeLockUpsert) AddExpireAt(v int64) *DistributeLockUpsert

AddExpireAt adds v to the "expireAt" field.

func (*DistributeLockUpsert) SetExpireAt

func (u *DistributeLockUpsert) SetExpireAt(v int64) *DistributeLockUpsert

SetExpireAt sets the "expireAt" field.

func (*DistributeLockUpsert) UpdateExpireAt

func (u *DistributeLockUpsert) UpdateExpireAt() *DistributeLockUpsert

UpdateExpireAt sets the "expireAt" field to the value that was provided on create.

type DistributeLockUpsertBulk

type DistributeLockUpsertBulk struct {
	// contains filtered or unexported fields
}

DistributeLockUpsertBulk is the builder for "upsert"-ing a bulk of DistributeLock nodes.

func (*DistributeLockUpsertBulk) AddExpireAt

AddExpireAt adds v to the "expireAt" field.

func (*DistributeLockUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DistributeLockUpsertBulk) Exec

Exec executes the query.

func (*DistributeLockUpsertBulk) ExecE

func (u *DistributeLockUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *DistributeLock) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*DistributeLockUpsertBulk) ExecEX

func (u *DistributeLockUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *DistributeLock) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*DistributeLockUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DistributeLockUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DistributeLock.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DistributeLockUpsertBulk) SetExpireAt

SetExpireAt sets the "expireAt" field.

func (*DistributeLockUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DistributeLockCreateBulk.OnConflict documentation for more info.

func (*DistributeLockUpsertBulk) UpdateExpireAt

UpdateExpireAt sets the "expireAt" field to the value that was provided on create.

func (*DistributeLockUpsertBulk) UpdateNewValues

func (u *DistributeLockUpsertBulk) UpdateNewValues() *DistributeLockUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DistributeLock.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(distributelock.FieldID)
		}),
	).
	Exec(ctx)

type DistributeLockUpsertOne

type DistributeLockUpsertOne struct {
	// contains filtered or unexported fields
}

DistributeLockUpsertOne is the builder for "upsert"-ing

one DistributeLock node.

func (*DistributeLockUpsertOne) AddExpireAt

AddExpireAt adds v to the "expireAt" field.

func (*DistributeLockUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DistributeLockUpsertOne) Exec

Exec executes the query.

func (*DistributeLockUpsertOne) ExecE

func (u *DistributeLockUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *DistributeLock) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*DistributeLockUpsertOne) ExecEX

func (u *DistributeLockUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *DistributeLock) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*DistributeLockUpsertOne) ExecX

func (u *DistributeLockUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DistributeLockUpsertOne) ID

func (u *DistributeLockUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DistributeLockUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DistributeLockUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DistributeLock.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DistributeLockUpsertOne) SetExpireAt

SetExpireAt sets the "expireAt" field.

func (*DistributeLockUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DistributeLockCreate.OnConflict documentation for more info.

func (*DistributeLockUpsertOne) UpdateExpireAt

func (u *DistributeLockUpsertOne) UpdateExpireAt() *DistributeLockUpsertOne

UpdateExpireAt sets the "expireAt" field to the value that was provided on create.

func (*DistributeLockUpsertOne) UpdateNewValues

func (u *DistributeLockUpsertOne) UpdateNewValues() *DistributeLockUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DistributeLock.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(distributelock.FieldID)
		}),
	).
	Exec(ctx)

type DistributeLocks

type DistributeLocks []*DistributeLock

DistributeLocks is a parsable slice of DistributeLock.

func (DistributeLocks) View

func (_dls DistributeLocks) View() []*DistributeLockOutput

View returns the output of DistributeLock entities.

type Environment

type Environment struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// ID of the project to belong.
	ProjectID object.ID `json:"project_id,omitempty"`
	// Type of the environment.
	Type string `json:"type,omitempty,cli-table-column"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EnvironmentQuery when eager-loading is set.
	Edges EnvironmentEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

Environment is the model entity for the Environment schema.

func (*Environment) ExecContext

func (c *Environment) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Environment) QueryConnectors

func (e *Environment) QueryConnectors() *EnvironmentConnectorRelationshipQuery

QueryConnectors queries the "connectors" edge of the Environment entity.

func (*Environment) QueryContext

func (c *Environment) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Environment) QueryProject

func (e *Environment) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Environment entity.

func (*Environment) QueryResourceComponents added in v0.4.0

func (e *Environment) QueryResourceComponents() *ResourceComponentQuery

QueryResourceComponents queries the "resource_components" edge of the Environment entity.

func (*Environment) QueryResourceRuns added in v0.6.0

func (e *Environment) QueryResourceRuns() *ResourceRunQuery

QueryResourceRuns queries the "resource_runs" edge of the Environment entity.

func (*Environment) QueryResources added in v0.4.0

func (e *Environment) QueryResources() *ResourceQuery

QueryResources queries the "resources" edge of the Environment entity.

func (*Environment) QueryVariables

func (e *Environment) QueryVariables() *VariableQuery

QueryVariables queries the "variables" edge of the Environment entity.

func (*Environment) String

func (e *Environment) String() string

String implements the fmt.Stringer.

func (*Environment) Unwrap

func (e *Environment) Unwrap() *Environment

Unwrap unwraps the Environment 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 (*Environment) Update

func (e *Environment) Update() *EnvironmentUpdateOne

Update returns a builder for updating this Environment. Note that you need to call Environment.Unwrap() before calling this method if this Environment was returned from a transaction, and the transaction was committed or rolled back.

func (*Environment) Value

func (e *Environment) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Environment. This includes values selected through modifiers, order, etc.

func (*Environment) View

func (_e *Environment) View() *EnvironmentOutput

View returns the output of Environment entity.

type EnvironmentClient

type EnvironmentClient struct {
	// contains filtered or unexported fields
}

EnvironmentClient is a client for the Environment schema.

func NewEnvironmentClient

func NewEnvironmentClient(c config) *EnvironmentClient

NewEnvironmentClient returns a client for the Environment from the given config.

func (*EnvironmentClient) Create

func (c *EnvironmentClient) Create() *EnvironmentCreate

Create returns a builder for creating a Environment entity.

func (*EnvironmentClient) CreateBulk

func (c *EnvironmentClient) CreateBulk(builders ...*EnvironmentCreate) *EnvironmentCreateBulk

CreateBulk returns a builder for creating a bulk of Environment entities.

func (*EnvironmentClient) Delete

func (c *EnvironmentClient) Delete() *EnvironmentDelete

Delete returns a delete builder for Environment.

func (*EnvironmentClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EnvironmentClient) DeleteOneID

func (c *EnvironmentClient) DeleteOneID(id object.ID) *EnvironmentDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*EnvironmentClient) ExecContext

func (c *EnvironmentClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentClient) Get

Get returns a Environment entity by its id.

func (*EnvironmentClient) GetX

GetX is like Get, but panics if an error occurs.

func (*EnvironmentClient) Hooks

func (c *EnvironmentClient) Hooks() []Hook

Hooks returns the client hooks.

func (*EnvironmentClient) Intercept

func (c *EnvironmentClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `environment.Intercept(f(g(h())))`.

func (*EnvironmentClient) Interceptors

func (c *EnvironmentClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*EnvironmentClient) MapCreateBulk added in v0.5.0

func (c *EnvironmentClient) MapCreateBulk(slice any, setFunc func(*EnvironmentCreate, int)) *EnvironmentCreateBulk

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 (*EnvironmentClient) Query

func (c *EnvironmentClient) Query() *EnvironmentQuery

Query returns a query builder for Environment.

func (*EnvironmentClient) QueryConnectors

QueryConnectors queries the connectors edge of a Environment.

func (*EnvironmentClient) QueryContext

func (c *EnvironmentClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentClient) QueryProject

func (c *EnvironmentClient) QueryProject(e *Environment) *ProjectQuery

QueryProject queries the project edge of a Environment.

func (*EnvironmentClient) QueryResourceComponents added in v0.4.0

func (c *EnvironmentClient) QueryResourceComponents(e *Environment) *ResourceComponentQuery

QueryResourceComponents queries the resource_components edge of a Environment.

func (*EnvironmentClient) QueryResourceRuns added in v0.6.0

func (c *EnvironmentClient) QueryResourceRuns(e *Environment) *ResourceRunQuery

QueryResourceRuns queries the resource_runs edge of a Environment.

func (*EnvironmentClient) QueryResources added in v0.4.0

func (c *EnvironmentClient) QueryResources(e *Environment) *ResourceQuery

QueryResources queries the resources edge of a Environment.

func (*EnvironmentClient) QueryVariables

func (c *EnvironmentClient) QueryVariables(e *Environment) *VariableQuery

QueryVariables queries the variables edge of a Environment.

func (*EnvironmentClient) Update

func (c *EnvironmentClient) Update() *EnvironmentUpdate

Update returns an update builder for Environment.

func (*EnvironmentClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EnvironmentClient) UpdateOneID

func (c *EnvironmentClient) UpdateOneID(id object.ID) *EnvironmentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EnvironmentClient) Use

func (c *EnvironmentClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `environment.Hooks(f(g(h())))`.

type EnvironmentClientGetter

type EnvironmentClientGetter interface {
	// Environments returns the client for interacting with the Environment builders.
	Environments() *EnvironmentClient
}

EnvironmentClientGetter is an interface that allows getting EnvironmentClient.

type EnvironmentConnectorRelationship

type EnvironmentConnectorRelationship struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// ID of the environment to which the relationship connects.
	EnvironmentID object.ID `json:"environment_id,omitempty"`
	// ID of the connector to which the relationship connects.
	ConnectorID object.ID `json:"connector_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EnvironmentConnectorRelationshipQuery when eager-loading is set.
	Edges EnvironmentConnectorRelationshipEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationship is the model entity for the EnvironmentConnectorRelationship schema.

func (*EnvironmentConnectorRelationship) ExecContext

func (c *EnvironmentConnectorRelationship) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationship) QueryConnector

func (ecr *EnvironmentConnectorRelationship) QueryConnector() *ConnectorQuery

QueryConnector queries the "connector" edge of the EnvironmentConnectorRelationship entity.

func (*EnvironmentConnectorRelationship) QueryContext

func (c *EnvironmentConnectorRelationship) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationship) QueryEnvironment

func (ecr *EnvironmentConnectorRelationship) QueryEnvironment() *EnvironmentQuery

QueryEnvironment queries the "environment" edge of the EnvironmentConnectorRelationship entity.

func (*EnvironmentConnectorRelationship) String

String implements the fmt.Stringer.

func (*EnvironmentConnectorRelationship) Unwrap

Unwrap unwraps the EnvironmentConnectorRelationship 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 (*EnvironmentConnectorRelationship) Update

Update returns a builder for updating this EnvironmentConnectorRelationship. Note that you need to call EnvironmentConnectorRelationship.Unwrap() before calling this method if this EnvironmentConnectorRelationship was returned from a transaction, and the transaction was committed or rolled back.

func (*EnvironmentConnectorRelationship) Value

Value returns the ent.Value that was dynamically selected and assigned to the EnvironmentConnectorRelationship. This includes values selected through modifiers, order, etc.

func (*EnvironmentConnectorRelationship) View

View returns the output of EnvironmentConnectorRelationship entity.

type EnvironmentConnectorRelationshipClient

type EnvironmentConnectorRelationshipClient struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipClient is a client for the EnvironmentConnectorRelationship schema.

func NewEnvironmentConnectorRelationshipClient

func NewEnvironmentConnectorRelationshipClient(c config) *EnvironmentConnectorRelationshipClient

NewEnvironmentConnectorRelationshipClient returns a client for the EnvironmentConnectorRelationship from the given config.

func (*EnvironmentConnectorRelationshipClient) Create

Create returns a builder for creating a EnvironmentConnectorRelationship entity.

func (*EnvironmentConnectorRelationshipClient) CreateBulk

CreateBulk returns a builder for creating a bulk of EnvironmentConnectorRelationship entities.

func (*EnvironmentConnectorRelationshipClient) Delete

Delete returns a delete builder for EnvironmentConnectorRelationship.

func (*EnvironmentConnectorRelationshipClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EnvironmentConnectorRelationshipClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*EnvironmentConnectorRelationshipClient) ExecContext

func (c *EnvironmentConnectorRelationshipClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationshipClient) Get

Get returns a EnvironmentConnectorRelationship entity by its id.

func (*EnvironmentConnectorRelationshipClient) GetX

GetX is like Get, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipClient) Hooks

Hooks returns the client hooks.

func (*EnvironmentConnectorRelationshipClient) Intercept

func (c *EnvironmentConnectorRelationshipClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `environmentconnectorrelationship.Intercept(f(g(h())))`.

func (*EnvironmentConnectorRelationshipClient) Interceptors

Interceptors returns the client interceptors.

func (*EnvironmentConnectorRelationshipClient) MapCreateBulk added in v0.5.0

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 (*EnvironmentConnectorRelationshipClient) Query

Query returns a query builder for EnvironmentConnectorRelationship.

func (*EnvironmentConnectorRelationshipClient) QueryConnector

QueryConnector queries the connector edge of a EnvironmentConnectorRelationship.

func (*EnvironmentConnectorRelationshipClient) QueryContext

func (c *EnvironmentConnectorRelationshipClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationshipClient) QueryEnvironment

QueryEnvironment queries the environment edge of a EnvironmentConnectorRelationship.

func (*EnvironmentConnectorRelationshipClient) Update

Update returns an update builder for EnvironmentConnectorRelationship.

func (*EnvironmentConnectorRelationshipClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EnvironmentConnectorRelationshipClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*EnvironmentConnectorRelationshipClient) Use

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `environmentconnectorrelationship.Hooks(f(g(h())))`.

type EnvironmentConnectorRelationshipClientGetter

type EnvironmentConnectorRelationshipClientGetter interface {
	// EnvironmentConnectorRelationships returns the client for interacting with the EnvironmentConnectorRelationship builders.
	EnvironmentConnectorRelationships() *EnvironmentConnectorRelationshipClient
}

EnvironmentConnectorRelationshipClientGetter is an interface that allows getting EnvironmentConnectorRelationshipClient.

type EnvironmentConnectorRelationshipCreate

type EnvironmentConnectorRelationshipCreate struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipCreate is the builder for creating a EnvironmentConnectorRelationship entity.

func (*EnvironmentConnectorRelationshipCreate) Exec

Exec executes the query.

func (*EnvironmentConnectorRelationshipCreate) ExecContext

func (c *EnvironmentConnectorRelationshipCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationshipCreate) ExecE

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*EnvironmentConnectorRelationshipCreate) ExecEX

ExecEX is like ExecE, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipCreate) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipCreate) Mutation

Mutation returns the EnvironmentConnectorRelationshipMutation object of the builder.

func (*EnvironmentConnectorRelationshipCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.EnvironmentConnectorRelationship.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.EnvironmentConnectorRelationshipUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*EnvironmentConnectorRelationshipCreate) OnConflictColumns

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.EnvironmentConnectorRelationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*EnvironmentConnectorRelationshipCreate) QueryContext

func (c *EnvironmentConnectorRelationshipCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationshipCreate) Save

Save creates the EnvironmentConnectorRelationship in the database.

func (*EnvironmentConnectorRelationshipCreate) SaveE

SaveE calls the given function after created the EnvironmentConnectorRelationship entity, which is always good for cascading create operations.

func (*EnvironmentConnectorRelationshipCreate) SaveEX

SaveEX is like SaveE, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*EnvironmentConnectorRelationshipCreate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*EnvironmentConnectorRelationshipCreate) SetConnector

SetConnector sets the "connector" edge to the Connector entity.

func (*EnvironmentConnectorRelationshipCreate) SetConnectorID

SetConnectorID sets the "connector_id" field.

func (*EnvironmentConnectorRelationshipCreate) SetCreateTime

SetCreateTime sets the "create_time" field.

func (*EnvironmentConnectorRelationshipCreate) SetEnvironment

SetEnvironment sets the "environment" edge to the Environment entity.

func (*EnvironmentConnectorRelationshipCreate) SetEnvironmentID

SetEnvironmentID sets the "environment_id" field.

func (*EnvironmentConnectorRelationshipCreate) SetID

SetID sets the "id" field.

func (*EnvironmentConnectorRelationshipCreate) SetNillableCreateTime

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

type EnvironmentConnectorRelationshipCreateBulk

type EnvironmentConnectorRelationshipCreateBulk struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipCreateBulk is the builder for creating many EnvironmentConnectorRelationship entities in bulk.

func (*EnvironmentConnectorRelationshipCreateBulk) Exec

Exec executes the query.

func (*EnvironmentConnectorRelationshipCreateBulk) ExecContext

func (c *EnvironmentConnectorRelationshipCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationshipCreateBulk) ExecE

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*EnvironmentConnectorRelationshipCreateBulk) ExecEX

ExecEX is like ExecE, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.EnvironmentConnectorRelationship.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.EnvironmentConnectorRelationshipUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*EnvironmentConnectorRelationshipCreateBulk) OnConflictColumns

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.EnvironmentConnectorRelationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*EnvironmentConnectorRelationshipCreateBulk) QueryContext

func (c *EnvironmentConnectorRelationshipCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationshipCreateBulk) Save

Save creates the EnvironmentConnectorRelationship entities in the database.

func (*EnvironmentConnectorRelationshipCreateBulk) SaveE

SaveE calls the given function after created the EnvironmentConnectorRelationship entities, which is always good for cascading create operations.

func (*EnvironmentConnectorRelationshipCreateBulk) SaveEX

SaveEX is like SaveE, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipCreateBulk) Set

Set leverages the EnvironmentConnectorRelationshipCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type EnvironmentConnectorRelationshipCreateInput

type EnvironmentConnectorRelationshipCreateInput struct {

	// Connector specifies full inserting the new Connector entity of the EnvironmentConnectorRelationship entity.
	Connector *ConnectorQueryInput `uri:"-" query:"-" json:"connector"`
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipCreateInput holds the creation input of the EnvironmentConnectorRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentConnectorRelationshipCreateInput) Model

Model returns the EnvironmentConnectorRelationship entity for creating, after validating.

func (*EnvironmentConnectorRelationshipCreateInput) SetGinContext

func (ic *EnvironmentConnectorRelationshipCreateInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentConnectorRelationshipCreateInput) SetModelClient

func (ic *EnvironmentConnectorRelationshipCreateInput) SetModelClient(cli *Client)

func (*EnvironmentConnectorRelationshipCreateInput) Validate

Validate checks the EnvironmentConnectorRelationshipCreateInput entity.

func (*EnvironmentConnectorRelationshipCreateInput) ValidateWith

func (ecrci *EnvironmentConnectorRelationshipCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentConnectorRelationshipCreateInput entity with the given context and client set.

type EnvironmentConnectorRelationshipCreateInputs

type EnvironmentConnectorRelationshipCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*EnvironmentConnectorRelationshipCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipCreateInputs holds the creation input of the EnvironmentConnectorRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentConnectorRelationshipCreateInputs) Model

Model returns the EnvironmentConnectorRelationship entities for creating, after validating.

func (*EnvironmentConnectorRelationshipCreateInputs) SetGinContext

func (ic *EnvironmentConnectorRelationshipCreateInputs) SetGinContext(ctx *gin.Context)

func (*EnvironmentConnectorRelationshipCreateInputs) SetModelClient

func (ic *EnvironmentConnectorRelationshipCreateInputs) SetModelClient(cli *Client)

func (*EnvironmentConnectorRelationshipCreateInputs) Validate

Validate checks the EnvironmentConnectorRelationshipCreateInputs entity .

func (*EnvironmentConnectorRelationshipCreateInputs) ValidateWith

func (ecrci *EnvironmentConnectorRelationshipCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentConnectorRelationshipCreateInputs entity with the given context and client set.

type EnvironmentConnectorRelationshipCreateInputsItem

type EnvironmentConnectorRelationshipCreateInputsItem struct {

	// Connector specifies full inserting the new Connector entity.
	Connector *ConnectorQueryInput `uri:"-" query:"-" json:"connector"`
}

EnvironmentConnectorRelationshipCreateInputs holds the creation input item of the EnvironmentConnectorRelationship entities.

func (*EnvironmentConnectorRelationshipCreateInputsItem) ValidateWith

ValidateWith checks the EnvironmentConnectorRelationshipCreateInputsItem entity with the given context and client set.

type EnvironmentConnectorRelationshipDelete

type EnvironmentConnectorRelationshipDelete struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipDelete is the builder for deleting a EnvironmentConnectorRelationship entity.

func (*EnvironmentConnectorRelationshipDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*EnvironmentConnectorRelationshipDelete) ExecContext

func (c *EnvironmentConnectorRelationshipDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationshipDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipDelete) QueryContext

func (c *EnvironmentConnectorRelationshipDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationshipDelete) Where

Where appends a list predicates to the EnvironmentConnectorRelationshipDelete builder.

type EnvironmentConnectorRelationshipDeleteInput

type EnvironmentConnectorRelationshipDeleteInput struct {
	EnvironmentConnectorRelationshipQueryInput `path:",inline"`
}

EnvironmentConnectorRelationshipDeleteInput holds the deletion input of the EnvironmentConnectorRelationship entity, please tags with `path:",inline"` if embedding.

func (*EnvironmentConnectorRelationshipDeleteInput) SetGinContext

func (ic *EnvironmentConnectorRelationshipDeleteInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentConnectorRelationshipDeleteInput) SetModelClient

func (ic *EnvironmentConnectorRelationshipDeleteInput) SetModelClient(cli *Client)

type EnvironmentConnectorRelationshipDeleteInputs

type EnvironmentConnectorRelationshipDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*EnvironmentConnectorRelationshipDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipDeleteInputs holds the deletion input of the EnvironmentConnectorRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentConnectorRelationshipDeleteInputs) IDs

IDs returns the ID list of the EnvironmentConnectorRelationship entities for deleting, after validating.

func (*EnvironmentConnectorRelationshipDeleteInputs) Model

Model returns the EnvironmentConnectorRelationship entities for deleting, after validating.

func (*EnvironmentConnectorRelationshipDeleteInputs) SetGinContext

func (ic *EnvironmentConnectorRelationshipDeleteInputs) SetGinContext(ctx *gin.Context)

func (*EnvironmentConnectorRelationshipDeleteInputs) SetModelClient

func (ic *EnvironmentConnectorRelationshipDeleteInputs) SetModelClient(cli *Client)

func (*EnvironmentConnectorRelationshipDeleteInputs) Validate

Validate checks the EnvironmentConnectorRelationshipDeleteInputs entity.

func (*EnvironmentConnectorRelationshipDeleteInputs) ValidateWith

func (ecrdi *EnvironmentConnectorRelationshipDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentConnectorRelationshipDeleteInputs entity with the given context and client set.

type EnvironmentConnectorRelationshipDeleteInputsItem

type EnvironmentConnectorRelationshipDeleteInputsItem struct {
	// ID of the EnvironmentConnectorRelationship entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

EnvironmentConnectorRelationshipDeleteInputs holds the deletion input item of the EnvironmentConnectorRelationship entities.

type EnvironmentConnectorRelationshipDeleteOne

type EnvironmentConnectorRelationshipDeleteOne struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipDeleteOne is the builder for deleting a single EnvironmentConnectorRelationship entity.

func (*EnvironmentConnectorRelationshipDeleteOne) Exec

Exec executes the deletion query.

func (*EnvironmentConnectorRelationshipDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipDeleteOne) Where

Where appends a list predicates to the EnvironmentConnectorRelationshipDelete builder.

type EnvironmentConnectorRelationshipEdges

type EnvironmentConnectorRelationshipEdges struct {
	// Environment that connect to the relationship.
	Environment *Environment `json:"environment,omitempty"`
	// Connector that connect to the relationship.
	Connector *Connector `json:"connector,omitempty"`
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipEdges holds the relations/edges for other nodes in the graph.

func (EnvironmentConnectorRelationshipEdges) ConnectorOrErr

func (e EnvironmentConnectorRelationshipEdges) ConnectorOrErr() (*Connector, error)

ConnectorOrErr returns the Connector value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EnvironmentConnectorRelationshipEdges) EnvironmentOrErr

func (e EnvironmentConnectorRelationshipEdges) EnvironmentOrErr() (*Environment, error)

EnvironmentOrErr returns the Environment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EnvironmentConnectorRelationshipGroupBy

type EnvironmentConnectorRelationshipGroupBy struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipGroupBy is the group-by builder for EnvironmentConnectorRelationship entities.

func (*EnvironmentConnectorRelationshipGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*EnvironmentConnectorRelationshipGroupBy) Bool

func (s *EnvironmentConnectorRelationshipGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipGroupBy) BoolX

func (s *EnvironmentConnectorRelationshipGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipGroupBy) Bools

func (s *EnvironmentConnectorRelationshipGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipGroupBy) BoolsX

func (s *EnvironmentConnectorRelationshipGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipGroupBy) Float64

func (s *EnvironmentConnectorRelationshipGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipGroupBy) Float64X

func (s *EnvironmentConnectorRelationshipGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipGroupBy) Float64s

func (s *EnvironmentConnectorRelationshipGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipGroupBy) Float64sX

func (s *EnvironmentConnectorRelationshipGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipGroupBy) Int

func (s *EnvironmentConnectorRelationshipGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipGroupBy) IntX

func (s *EnvironmentConnectorRelationshipGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipGroupBy) Ints

func (s *EnvironmentConnectorRelationshipGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipGroupBy) IntsX

func (s *EnvironmentConnectorRelationshipGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*EnvironmentConnectorRelationshipGroupBy) ScanX

func (s *EnvironmentConnectorRelationshipGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipGroupBy) String

func (s *EnvironmentConnectorRelationshipGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipGroupBy) StringX

func (s *EnvironmentConnectorRelationshipGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipGroupBy) Strings

func (s *EnvironmentConnectorRelationshipGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipGroupBy) StringsX

func (s *EnvironmentConnectorRelationshipGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EnvironmentConnectorRelationshipMutation

type EnvironmentConnectorRelationshipMutation struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipMutation represents an operation that mutates the EnvironmentConnectorRelationship nodes in the graph.

func (*EnvironmentConnectorRelationshipMutation) AddField

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 (*EnvironmentConnectorRelationshipMutation) AddedEdges

AddedEdges returns all edge names that were set/added in this mutation.

func (*EnvironmentConnectorRelationshipMutation) AddedField

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 (*EnvironmentConnectorRelationshipMutation) AddedFields

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EnvironmentConnectorRelationshipMutation) AddedIDs

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EnvironmentConnectorRelationshipMutation) ClearConnector

func (m *EnvironmentConnectorRelationshipMutation) ClearConnector()

ClearConnector clears the "connector" edge to the Connector entity.

func (*EnvironmentConnectorRelationshipMutation) ClearEdge

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 (*EnvironmentConnectorRelationshipMutation) ClearEnvironment

func (m *EnvironmentConnectorRelationshipMutation) ClearEnvironment()

ClearEnvironment clears the "environment" edge to the Environment entity.

func (*EnvironmentConnectorRelationshipMutation) ClearField

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 (*EnvironmentConnectorRelationshipMutation) ClearedEdges

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EnvironmentConnectorRelationshipMutation) ClearedFields

func (m *EnvironmentConnectorRelationshipMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EnvironmentConnectorRelationshipMutation) 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 (*EnvironmentConnectorRelationshipMutation) ConnectorCleared

func (m *EnvironmentConnectorRelationshipMutation) ConnectorCleared() bool

ConnectorCleared reports if the "connector" edge to the Connector entity was cleared.

func (*EnvironmentConnectorRelationshipMutation) ConnectorID

func (m *EnvironmentConnectorRelationshipMutation) ConnectorID() (r object.ID, exists bool)

ConnectorID returns the value of the "connector_id" field in the mutation.

func (*EnvironmentConnectorRelationshipMutation) ConnectorIDs

func (m *EnvironmentConnectorRelationshipMutation) ConnectorIDs() (ids []object.ID)

ConnectorIDs returns the "connector" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ConnectorID instead. It exists only for internal usage by the builders.

func (*EnvironmentConnectorRelationshipMutation) CreateTime

func (m *EnvironmentConnectorRelationshipMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*EnvironmentConnectorRelationshipMutation) EdgeCleared

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EnvironmentConnectorRelationshipMutation) EnvironmentCleared

func (m *EnvironmentConnectorRelationshipMutation) EnvironmentCleared() bool

EnvironmentCleared reports if the "environment" edge to the Environment entity was cleared.

func (*EnvironmentConnectorRelationshipMutation) EnvironmentID

func (m *EnvironmentConnectorRelationshipMutation) EnvironmentID() (r object.ID, exists bool)

EnvironmentID returns the value of the "environment_id" field in the mutation.

func (*EnvironmentConnectorRelationshipMutation) EnvironmentIDs

func (m *EnvironmentConnectorRelationshipMutation) EnvironmentIDs() (ids []object.ID)

EnvironmentIDs returns the "environment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EnvironmentID instead. It exists only for internal usage by the builders.

func (*EnvironmentConnectorRelationshipMutation) ExecContext

func (c *EnvironmentConnectorRelationshipMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationshipMutation) 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 (*EnvironmentConnectorRelationshipMutation) FieldCleared

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EnvironmentConnectorRelationshipMutation) 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 (*EnvironmentConnectorRelationshipMutation) ID

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 (*EnvironmentConnectorRelationshipMutation) 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 (*EnvironmentConnectorRelationshipMutation) OldConnectorID

func (m *EnvironmentConnectorRelationshipMutation) OldConnectorID(ctx context.Context) (v object.ID, err error)

OldConnectorID returns the old "connector_id" field's value of the EnvironmentConnectorRelationship entity. If the EnvironmentConnectorRelationship 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 (*EnvironmentConnectorRelationshipMutation) OldCreateTime

func (m *EnvironmentConnectorRelationshipMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the EnvironmentConnectorRelationship entity. If the EnvironmentConnectorRelationship 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 (*EnvironmentConnectorRelationshipMutation) OldEnvironmentID

func (m *EnvironmentConnectorRelationshipMutation) OldEnvironmentID(ctx context.Context) (v object.ID, err error)

OldEnvironmentID returns the old "environment_id" field's value of the EnvironmentConnectorRelationship entity. If the EnvironmentConnectorRelationship 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 (*EnvironmentConnectorRelationshipMutation) 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 (*EnvironmentConnectorRelationshipMutation) Op

Op returns the operation name.

func (*EnvironmentConnectorRelationshipMutation) QueryContext

func (c *EnvironmentConnectorRelationshipMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationshipMutation) RemovedEdges

RemovedEdges returns all edge names that were removed in this mutation.

func (*EnvironmentConnectorRelationshipMutation) RemovedIDs

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*EnvironmentConnectorRelationshipMutation) ResetConnector

func (m *EnvironmentConnectorRelationshipMutation) ResetConnector()

ResetConnector resets all changes to the "connector" edge.

func (*EnvironmentConnectorRelationshipMutation) ResetConnectorID

func (m *EnvironmentConnectorRelationshipMutation) ResetConnectorID()

ResetConnectorID resets all changes to the "connector_id" field.

func (*EnvironmentConnectorRelationshipMutation) ResetCreateTime

func (m *EnvironmentConnectorRelationshipMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*EnvironmentConnectorRelationshipMutation) ResetEdge

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 (*EnvironmentConnectorRelationshipMutation) ResetEnvironment

func (m *EnvironmentConnectorRelationshipMutation) ResetEnvironment()

ResetEnvironment resets all changes to the "environment" edge.

func (*EnvironmentConnectorRelationshipMutation) ResetEnvironmentID

func (m *EnvironmentConnectorRelationshipMutation) ResetEnvironmentID()

ResetEnvironmentID resets all changes to the "environment_id" field.

func (*EnvironmentConnectorRelationshipMutation) ResetField

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 (*EnvironmentConnectorRelationshipMutation) SetConnectorID

func (m *EnvironmentConnectorRelationshipMutation) SetConnectorID(o object.ID)

SetConnectorID sets the "connector_id" field.

func (*EnvironmentConnectorRelationshipMutation) SetCreateTime

SetCreateTime sets the "create_time" field.

func (*EnvironmentConnectorRelationshipMutation) SetEnvironmentID

func (m *EnvironmentConnectorRelationshipMutation) SetEnvironmentID(o object.ID)

SetEnvironmentID sets the "environment_id" field.

func (*EnvironmentConnectorRelationshipMutation) SetField

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 (*EnvironmentConnectorRelationshipMutation) SetID

SetID sets the value of the id field. Note that this operation is only accepted on creation of EnvironmentConnectorRelationship entities.

func (*EnvironmentConnectorRelationshipMutation) SetOp

SetOp allows setting the mutation operation.

func (EnvironmentConnectorRelationshipMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EnvironmentConnectorRelationshipMutation) Type

Type returns the node type of this mutation (EnvironmentConnectorRelationship).

func (*EnvironmentConnectorRelationshipMutation) Where

Where appends a list predicates to the EnvironmentConnectorRelationshipMutation builder.

func (*EnvironmentConnectorRelationshipMutation) WhereP

func (m *EnvironmentConnectorRelationshipMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the EnvironmentConnectorRelationshipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type EnvironmentConnectorRelationshipOutput

type EnvironmentConnectorRelationshipOutput struct {
	ID         object.ID  `json:"id,omitempty"`
	CreateTime *time.Time `json:"createTime,omitempty"`

	Connector *ConnectorOutput `json:"connector,omitempty"`
}

EnvironmentConnectorRelationshipOutput holds the output of the EnvironmentConnectorRelationship entity.

func ExposeEnvironmentConnectorRelationship

func ExposeEnvironmentConnectorRelationship(_ecr *EnvironmentConnectorRelationship) *EnvironmentConnectorRelationshipOutput

ExposeEnvironmentConnectorRelationship converts the EnvironmentConnectorRelationship to EnvironmentConnectorRelationshipOutput.

func ExposeEnvironmentConnectorRelationships

func ExposeEnvironmentConnectorRelationships(_ecrs []*EnvironmentConnectorRelationship) []*EnvironmentConnectorRelationshipOutput

ExposeEnvironmentConnectorRelationships converts the EnvironmentConnectorRelationship slice to EnvironmentConnectorRelationshipOutput pointer slice.

type EnvironmentConnectorRelationshipPatchInput added in v0.5.0

type EnvironmentConnectorRelationshipPatchInput struct {
	EnvironmentConnectorRelationshipQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`

	// Connector indicates replacing the stale Connector entity.
	Connector *ConnectorQueryInput `uri:"-" query:"-" json:"connector"`
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipPatchInput holds the patch input of the EnvironmentConnectorRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentConnectorRelationshipPatchInput) Model added in v0.5.0

Model returns the EnvironmentConnectorRelationship patched entity, after validating.

func (*EnvironmentConnectorRelationshipPatchInput) PatchModel added in v0.5.0

PatchModel returns the EnvironmentConnectorRelationship partition entity for patching.

func (*EnvironmentConnectorRelationshipPatchInput) SetGinContext added in v0.5.0

func (ic *EnvironmentConnectorRelationshipPatchInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentConnectorRelationshipPatchInput) SetModelClient added in v0.5.0

func (ic *EnvironmentConnectorRelationshipPatchInput) SetModelClient(cli *Client)

func (*EnvironmentConnectorRelationshipPatchInput) Validate added in v0.5.0

Validate checks the EnvironmentConnectorRelationshipPatchInput entity.

func (*EnvironmentConnectorRelationshipPatchInput) ValidateWith added in v0.5.0

func (ecrpi *EnvironmentConnectorRelationshipPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentConnectorRelationshipPatchInput entity with the given context and client set.

type EnvironmentConnectorRelationshipQuery

type EnvironmentConnectorRelationshipQuery struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipQuery is the builder for querying EnvironmentConnectorRelationship entities.

func (*EnvironmentConnectorRelationshipQuery) Aggregate

Aggregate returns a EnvironmentConnectorRelationshipSelect configured with the given aggregations.

func (*EnvironmentConnectorRelationshipQuery) All

All executes the query and returns a list of EnvironmentConnectorRelationships.

func (*EnvironmentConnectorRelationshipQuery) AllX

AllX is like All, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipQuery) Clone

Clone returns a duplicate of the EnvironmentConnectorRelationshipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EnvironmentConnectorRelationshipQuery) Count

Count returns the count of the given query.

func (*EnvironmentConnectorRelationshipQuery) CountX

CountX is like Count, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipQuery) ExecContext

func (c *EnvironmentConnectorRelationshipQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationshipQuery) Exist

Exist returns true if the query has elements in the graph.

func (*EnvironmentConnectorRelationshipQuery) ExistX

ExistX is like Exist, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipQuery) First

First returns the first EnvironmentConnectorRelationship entity from the query. Returns a *NotFoundError when no EnvironmentConnectorRelationship was found.

func (*EnvironmentConnectorRelationshipQuery) FirstID

func (ecrq *EnvironmentConnectorRelationshipQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first EnvironmentConnectorRelationship ID from the query. Returns a *NotFoundError when no EnvironmentConnectorRelationship ID was found.

func (*EnvironmentConnectorRelationshipQuery) FirstIDX

FirstIDX is like FirstID, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipQuery) ForShare

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 (*EnvironmentConnectorRelationshipQuery) ForUpdate

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 (*EnvironmentConnectorRelationshipQuery) 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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.EnvironmentConnectorRelationship.Query().
	GroupBy(environmentconnectorrelationship.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*EnvironmentConnectorRelationshipQuery) IDs

IDs executes the query and returns a list of EnvironmentConnectorRelationship IDs.

func (*EnvironmentConnectorRelationshipQuery) IDsX

IDsX is like IDs, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipQuery) Limit

Limit the number of records to be returned by this query.

func (*EnvironmentConnectorRelationshipQuery) Modify

Modify adds a query modifier for attaching custom logic to queries.

func (*EnvironmentConnectorRelationshipQuery) Offset

Offset to start from.

func (*EnvironmentConnectorRelationshipQuery) Only

Only returns a single EnvironmentConnectorRelationship entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EnvironmentConnectorRelationship entity is found. Returns a *NotFoundError when no EnvironmentConnectorRelationship entities are found.

func (*EnvironmentConnectorRelationshipQuery) OnlyID

OnlyID is like Only, but returns the only EnvironmentConnectorRelationship ID in the query. Returns a *NotSingularError when more than one EnvironmentConnectorRelationship ID is found. Returns a *NotFoundError when no entities are found.

func (*EnvironmentConnectorRelationshipQuery) OnlyIDX

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipQuery) Order

Order specifies how the records should be ordered.

func (*EnvironmentConnectorRelationshipQuery) QueryConnector

func (ecrq *EnvironmentConnectorRelationshipQuery) QueryConnector() *ConnectorQuery

QueryConnector chains the current query on the "connector" edge.

func (*EnvironmentConnectorRelationshipQuery) QueryContext

func (c *EnvironmentConnectorRelationshipQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationshipQuery) QueryEnvironment

func (ecrq *EnvironmentConnectorRelationshipQuery) QueryEnvironment() *EnvironmentQuery

QueryEnvironment chains the current query on the "environment" edge.

func (*EnvironmentConnectorRelationshipQuery) 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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.EnvironmentConnectorRelationship.Query().
	Select(environmentconnectorrelationship.FieldCreateTime).
	Scan(ctx, &v)

func (*EnvironmentConnectorRelationshipQuery) 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 (*EnvironmentConnectorRelationshipQuery) Where

Where adds a new predicate for the EnvironmentConnectorRelationshipQuery builder.

func (*EnvironmentConnectorRelationshipQuery) WhereP

func (ecrq *EnvironmentConnectorRelationshipQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the EnvironmentConnectorRelationshipQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*EnvironmentConnectorRelationshipQuery) WithConnector

WithConnector tells the query-builder to eager-load the nodes that are connected to the "connector" edge. The optional arguments are used to configure the query builder of the edge.

func (*EnvironmentConnectorRelationshipQuery) WithEnvironment

WithEnvironment tells the query-builder to eager-load the nodes that are connected to the "environment" edge. The optional arguments are used to configure the query builder of the edge.

type EnvironmentConnectorRelationshipQueryInput

type EnvironmentConnectorRelationshipQueryInput struct {

	// Refer holds the route path reference of the EnvironmentConnectorRelationship entity.
	Refer *object.Refer `path:"environmentconnectorrelationship,default=" query:"-" json:"-"`
	// ID of the EnvironmentConnectorRelationship entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipQueryInput holds the query input of the EnvironmentConnectorRelationship entity, please tags with `path:",inline"` if embedding.

func (*EnvironmentConnectorRelationshipQueryInput) Model

Model returns the EnvironmentConnectorRelationship entity for querying, after validating.

func (*EnvironmentConnectorRelationshipQueryInput) SetGinContext

func (ic *EnvironmentConnectorRelationshipQueryInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentConnectorRelationshipQueryInput) SetModelClient

func (ic *EnvironmentConnectorRelationshipQueryInput) SetModelClient(cli *Client)

func (*EnvironmentConnectorRelationshipQueryInput) Validate

Validate checks the EnvironmentConnectorRelationshipQueryInput entity.

func (*EnvironmentConnectorRelationshipQueryInput) ValidateWith

func (ecrqi *EnvironmentConnectorRelationshipQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentConnectorRelationshipQueryInput entity with the given context and client set.

type EnvironmentConnectorRelationshipQueryInputs

type EnvironmentConnectorRelationshipQueryInputs struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipQueryInputs holds the query input of the EnvironmentConnectorRelationship entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*EnvironmentConnectorRelationshipQueryInputs) SetGinContext

func (ic *EnvironmentConnectorRelationshipQueryInputs) SetGinContext(ctx *gin.Context)

func (*EnvironmentConnectorRelationshipQueryInputs) SetModelClient

func (ic *EnvironmentConnectorRelationshipQueryInputs) SetModelClient(cli *Client)

func (*EnvironmentConnectorRelationshipQueryInputs) Validate

Validate checks the EnvironmentConnectorRelationshipQueryInputs entity.

func (*EnvironmentConnectorRelationshipQueryInputs) ValidateWith

func (ecrqi *EnvironmentConnectorRelationshipQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentConnectorRelationshipQueryInputs entity with the given context and client set.

type EnvironmentConnectorRelationshipSelect

type EnvironmentConnectorRelationshipSelect struct {
	*EnvironmentConnectorRelationshipQuery
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipSelect is the builder for selecting fields of EnvironmentConnectorRelationship entities.

func (*EnvironmentConnectorRelationshipSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*EnvironmentConnectorRelationshipSelect) Bool

func (s *EnvironmentConnectorRelationshipSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipSelect) BoolX

func (s *EnvironmentConnectorRelationshipSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipSelect) Bools

func (s *EnvironmentConnectorRelationshipSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipSelect) BoolsX

func (s *EnvironmentConnectorRelationshipSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (EnvironmentConnectorRelationshipSelect) ExecContext

func (c EnvironmentConnectorRelationshipSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationshipSelect) Float64

func (s *EnvironmentConnectorRelationshipSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipSelect) Float64X

func (s *EnvironmentConnectorRelationshipSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipSelect) Float64s

func (s *EnvironmentConnectorRelationshipSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipSelect) Float64sX

func (s *EnvironmentConnectorRelationshipSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipSelect) Int

func (s *EnvironmentConnectorRelationshipSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipSelect) IntX

func (s *EnvironmentConnectorRelationshipSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipSelect) Ints

func (s *EnvironmentConnectorRelationshipSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipSelect) IntsX

func (s *EnvironmentConnectorRelationshipSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipSelect) Modify

Modify adds a query modifier for attaching custom logic to queries.

func (EnvironmentConnectorRelationshipSelect) QueryContext

func (c EnvironmentConnectorRelationshipSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationshipSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*EnvironmentConnectorRelationshipSelect) ScanX

func (s *EnvironmentConnectorRelationshipSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipSelect) String

func (s *EnvironmentConnectorRelationshipSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipSelect) StringX

func (s *EnvironmentConnectorRelationshipSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipSelect) Strings

func (s *EnvironmentConnectorRelationshipSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EnvironmentConnectorRelationshipSelect) StringsX

func (s *EnvironmentConnectorRelationshipSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EnvironmentConnectorRelationshipUpdate

type EnvironmentConnectorRelationshipUpdate struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipUpdate is the builder for updating EnvironmentConnectorRelationship entities.

func (*EnvironmentConnectorRelationshipUpdate) Exec

Exec executes the query.

func (*EnvironmentConnectorRelationshipUpdate) ExecContext

func (c *EnvironmentConnectorRelationshipUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationshipUpdate) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipUpdate) Modify

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvironmentConnectorRelationshipUpdate) Mutation

Mutation returns the EnvironmentConnectorRelationshipMutation object of the builder.

func (*EnvironmentConnectorRelationshipUpdate) QueryContext

func (c *EnvironmentConnectorRelationshipUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationshipUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*EnvironmentConnectorRelationshipUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipUpdate) Where

Where appends a list predicates to the EnvironmentConnectorRelationshipUpdate builder.

type EnvironmentConnectorRelationshipUpdateInput

type EnvironmentConnectorRelationshipUpdateInput struct {
	EnvironmentConnectorRelationshipQueryInput `path:",inline" query:"-" json:"-"`

	// Connector indicates replacing the stale Connector entity.
	Connector *ConnectorQueryInput `uri:"-" query:"-" json:"connector"`
}

EnvironmentConnectorRelationshipUpdateInput holds the modification input of the EnvironmentConnectorRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentConnectorRelationshipUpdateInput) Model

Model returns the EnvironmentConnectorRelationship entity for modifying, after validating.

func (*EnvironmentConnectorRelationshipUpdateInput) SetGinContext

func (ic *EnvironmentConnectorRelationshipUpdateInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentConnectorRelationshipUpdateInput) SetModelClient

func (ic *EnvironmentConnectorRelationshipUpdateInput) SetModelClient(cli *Client)

func (*EnvironmentConnectorRelationshipUpdateInput) Validate

Validate checks the EnvironmentConnectorRelationshipUpdateInput entity.

func (*EnvironmentConnectorRelationshipUpdateInput) ValidateWith

func (ecrui *EnvironmentConnectorRelationshipUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentConnectorRelationshipUpdateInput entity with the given context and client set.

type EnvironmentConnectorRelationshipUpdateInputs

type EnvironmentConnectorRelationshipUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*EnvironmentConnectorRelationshipUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipUpdateInputs holds the modification input of the EnvironmentConnectorRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentConnectorRelationshipUpdateInputs) IDs

IDs returns the ID list of the EnvironmentConnectorRelationship entities for modifying, after validating.

func (*EnvironmentConnectorRelationshipUpdateInputs) Model

Model returns the EnvironmentConnectorRelationship entities for modifying, after validating.

func (*EnvironmentConnectorRelationshipUpdateInputs) SetGinContext

func (ic *EnvironmentConnectorRelationshipUpdateInputs) SetGinContext(ctx *gin.Context)

func (*EnvironmentConnectorRelationshipUpdateInputs) SetModelClient

func (ic *EnvironmentConnectorRelationshipUpdateInputs) SetModelClient(cli *Client)

func (*EnvironmentConnectorRelationshipUpdateInputs) Validate

Validate checks the EnvironmentConnectorRelationshipUpdateInputs entity.

func (*EnvironmentConnectorRelationshipUpdateInputs) ValidateWith

func (ecrui *EnvironmentConnectorRelationshipUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentConnectorRelationshipUpdateInputs entity with the given context and client set.

type EnvironmentConnectorRelationshipUpdateInputsItem

type EnvironmentConnectorRelationshipUpdateInputsItem struct {
	// ID of the EnvironmentConnectorRelationship entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Connector indicates replacing the stale Connector entity.
	Connector *ConnectorQueryInput `uri:"-" query:"-" json:"connector"`
}

EnvironmentConnectorRelationshipUpdateInputs holds the modification input item of the EnvironmentConnectorRelationship entities.

func (*EnvironmentConnectorRelationshipUpdateInputsItem) ValidateWith

ValidateWith checks the EnvironmentConnectorRelationshipUpdateInputsItem entity with the given context and client set.

type EnvironmentConnectorRelationshipUpdateOne

type EnvironmentConnectorRelationshipUpdateOne struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipUpdateOne is the builder for updating a single EnvironmentConnectorRelationship entity.

func (*EnvironmentConnectorRelationshipUpdateOne) Exec

Exec executes the query on the entity.

func (*EnvironmentConnectorRelationshipUpdateOne) ExecContext

func (c *EnvironmentConnectorRelationshipUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentConnectorRelationshipUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipUpdateOne) Modify

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvironmentConnectorRelationshipUpdateOne) Mutation

Mutation returns the EnvironmentConnectorRelationshipMutation object of the builder.

func (*EnvironmentConnectorRelationshipUpdateOne) QueryContext

func (c *EnvironmentConnectorRelationshipUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentConnectorRelationshipUpdateOne) Save

Save executes the query and returns the updated EnvironmentConnectorRelationship entity.

func (*EnvironmentConnectorRelationshipUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipUpdateOne) 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 (*EnvironmentConnectorRelationshipUpdateOne) Where

Where appends a list predicates to the EnvironmentConnectorRelationshipUpdate builder.

type EnvironmentConnectorRelationshipUpsert

type EnvironmentConnectorRelationshipUpsert struct {
	*sql.UpdateSet
}

EnvironmentConnectorRelationshipUpsert is the "OnConflict" setter.

type EnvironmentConnectorRelationshipUpsertBulk

type EnvironmentConnectorRelationshipUpsertBulk struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipUpsertBulk is the builder for "upsert"-ing a bulk of EnvironmentConnectorRelationship nodes.

func (*EnvironmentConnectorRelationshipUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*EnvironmentConnectorRelationshipUpsertBulk) Exec

Exec executes the query.

func (*EnvironmentConnectorRelationshipUpsertBulk) ExecE

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*EnvironmentConnectorRelationshipUpsertBulk) ExecEX

ExecEX is like ExecE, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.EnvironmentConnectorRelationship.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*EnvironmentConnectorRelationshipUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the EnvironmentConnectorRelationshipCreateBulk.OnConflict documentation for more info.

func (*EnvironmentConnectorRelationshipUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.EnvironmentConnectorRelationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(environmentconnectorrelationship.FieldID)
		}),
	).
	Exec(ctx)

type EnvironmentConnectorRelationshipUpsertOne

type EnvironmentConnectorRelationshipUpsertOne struct {
	// contains filtered or unexported fields
}

EnvironmentConnectorRelationshipUpsertOne is the builder for "upsert"-ing

one EnvironmentConnectorRelationship node.

func (*EnvironmentConnectorRelationshipUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*EnvironmentConnectorRelationshipUpsertOne) Exec

Exec executes the query.

func (*EnvironmentConnectorRelationshipUpsertOne) ExecE

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*EnvironmentConnectorRelationshipUpsertOne) ExecEX

ExecEX is like ExecE, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*EnvironmentConnectorRelationshipUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*EnvironmentConnectorRelationshipUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.EnvironmentConnectorRelationship.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*EnvironmentConnectorRelationshipUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the EnvironmentConnectorRelationshipCreate.OnConflict documentation for more info.

func (*EnvironmentConnectorRelationshipUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.EnvironmentConnectorRelationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(environmentconnectorrelationship.FieldID)
		}),
	).
	Exec(ctx)

type EnvironmentConnectorRelationships

type EnvironmentConnectorRelationships []*EnvironmentConnectorRelationship

EnvironmentConnectorRelationships is a parsable slice of EnvironmentConnectorRelationship.

func (EnvironmentConnectorRelationships) View

View returns the output of EnvironmentConnectorRelationship entities.

type EnvironmentCreate

type EnvironmentCreate struct {
	// contains filtered or unexported fields
}

EnvironmentCreate is the builder for creating a Environment entity.

func (*EnvironmentCreate) AddConnectorIDs

func (ec *EnvironmentCreate) AddConnectorIDs(ids ...object.ID) *EnvironmentCreate

AddConnectorIDs adds the "connectors" edge to the EnvironmentConnectorRelationship entity by IDs.

func (*EnvironmentCreate) AddConnectors

AddConnectors adds the "connectors" edges to the EnvironmentConnectorRelationship entity.

func (*EnvironmentCreate) AddResourceComponentIDs added in v0.4.0

func (ec *EnvironmentCreate) AddResourceComponentIDs(ids ...object.ID) *EnvironmentCreate

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by IDs.

func (*EnvironmentCreate) AddResourceComponents added in v0.4.0

func (ec *EnvironmentCreate) AddResourceComponents(r ...*ResourceComponent) *EnvironmentCreate

AddResourceComponents adds the "resource_components" edges to the ResourceComponent entity.

func (*EnvironmentCreate) AddResourceIDs added in v0.4.0

func (ec *EnvironmentCreate) AddResourceIDs(ids ...object.ID) *EnvironmentCreate

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*EnvironmentCreate) AddResourceRunIDs added in v0.6.0

func (ec *EnvironmentCreate) AddResourceRunIDs(ids ...object.ID) *EnvironmentCreate

AddResourceRunIDs adds the "resource_runs" edge to the ResourceRun entity by IDs.

func (*EnvironmentCreate) AddResourceRuns added in v0.6.0

func (ec *EnvironmentCreate) AddResourceRuns(r ...*ResourceRun) *EnvironmentCreate

AddResourceRuns adds the "resource_runs" edges to the ResourceRun entity.

func (*EnvironmentCreate) AddResources added in v0.4.0

func (ec *EnvironmentCreate) AddResources(r ...*Resource) *EnvironmentCreate

AddResources adds the "resources" edges to the Resource entity.

func (*EnvironmentCreate) AddVariableIDs

func (ec *EnvironmentCreate) AddVariableIDs(ids ...object.ID) *EnvironmentCreate

AddVariableIDs adds the "variables" edge to the Variable entity by IDs.

func (*EnvironmentCreate) AddVariables

func (ec *EnvironmentCreate) AddVariables(v ...*Variable) *EnvironmentCreate

AddVariables adds the "variables" edges to the Variable entity.

func (*EnvironmentCreate) Exec

func (ec *EnvironmentCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvironmentCreate) ExecContext

func (c *EnvironmentCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentCreate) ExecE

func (ec *EnvironmentCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Environment) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*EnvironmentCreate) ExecEX

func (ec *EnvironmentCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Environment) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*EnvironmentCreate) ExecX

func (ec *EnvironmentCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentCreate) Mutation

func (ec *EnvironmentCreate) Mutation() *EnvironmentMutation

Mutation returns the EnvironmentMutation object of the builder.

func (*EnvironmentCreate) OnConflict

func (ec *EnvironmentCreate) OnConflict(opts ...sql.ConflictOption) *EnvironmentUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Environment.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.EnvironmentUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*EnvironmentCreate) OnConflictColumns

func (ec *EnvironmentCreate) OnConflictColumns(columns ...string) *EnvironmentUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Environment.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*EnvironmentCreate) QueryContext

func (c *EnvironmentCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentCreate) Save

Save creates the Environment in the database.

func (*EnvironmentCreate) SaveE

func (ec *EnvironmentCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Environment) error) (*Environment, error)

SaveE calls the given function after created the Environment entity, which is always good for cascading create operations.

func (*EnvironmentCreate) SaveEX

func (ec *EnvironmentCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Environment) error) *Environment

SaveEX is like SaveE, but panics if an error occurs.

func (*EnvironmentCreate) SaveX

func (ec *EnvironmentCreate) SaveX(ctx context.Context) *Environment

SaveX calls Save and panics if Save returns an error.

func (*EnvironmentCreate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*EnvironmentCreate) SetAnnotations

func (ec *EnvironmentCreate) SetAnnotations(m map[string]string) *EnvironmentCreate

SetAnnotations sets the "annotations" field.

func (*EnvironmentCreate) SetCreateTime

func (ec *EnvironmentCreate) SetCreateTime(t time.Time) *EnvironmentCreate

SetCreateTime sets the "create_time" field.

func (*EnvironmentCreate) SetDescription

func (ec *EnvironmentCreate) SetDescription(s string) *EnvironmentCreate

SetDescription sets the "description" field.

func (*EnvironmentCreate) SetID

SetID sets the "id" field.

func (*EnvironmentCreate) SetLabels

func (ec *EnvironmentCreate) SetLabels(m map[string]string) *EnvironmentCreate

SetLabels sets the "labels" field.

func (*EnvironmentCreate) SetName

func (ec *EnvironmentCreate) SetName(s string) *EnvironmentCreate

SetName sets the "name" field.

func (*EnvironmentCreate) SetNillableCreateTime

func (ec *EnvironmentCreate) SetNillableCreateTime(t *time.Time) *EnvironmentCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*EnvironmentCreate) SetNillableDescription

func (ec *EnvironmentCreate) SetNillableDescription(s *string) *EnvironmentCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*EnvironmentCreate) SetNillableUpdateTime

func (ec *EnvironmentCreate) SetNillableUpdateTime(t *time.Time) *EnvironmentCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*EnvironmentCreate) SetProject

func (ec *EnvironmentCreate) SetProject(p *Project) *EnvironmentCreate

SetProject sets the "project" edge to the Project entity.

func (*EnvironmentCreate) SetProjectID

func (ec *EnvironmentCreate) SetProjectID(o object.ID) *EnvironmentCreate

SetProjectID sets the "project_id" field.

func (*EnvironmentCreate) SetType added in v0.4.0

func (ec *EnvironmentCreate) SetType(s string) *EnvironmentCreate

SetType sets the "type" field.

func (*EnvironmentCreate) SetUpdateTime

func (ec *EnvironmentCreate) SetUpdateTime(t time.Time) *EnvironmentCreate

SetUpdateTime sets the "update_time" field.

type EnvironmentCreateBulk

type EnvironmentCreateBulk struct {
	// contains filtered or unexported fields
}

EnvironmentCreateBulk is the builder for creating many Environment entities in bulk.

func (*EnvironmentCreateBulk) Exec

func (ecb *EnvironmentCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvironmentCreateBulk) ExecContext

func (c *EnvironmentCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentCreateBulk) ExecE

func (ecb *EnvironmentCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Environment) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*EnvironmentCreateBulk) ExecEX

func (ecb *EnvironmentCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Environment) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*EnvironmentCreateBulk) ExecX

func (ecb *EnvironmentCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Environment.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.EnvironmentUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*EnvironmentCreateBulk) OnConflictColumns

func (ecb *EnvironmentCreateBulk) OnConflictColumns(columns ...string) *EnvironmentUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Environment.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*EnvironmentCreateBulk) QueryContext

func (c *EnvironmentCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentCreateBulk) Save

func (ecb *EnvironmentCreateBulk) Save(ctx context.Context) ([]*Environment, error)

Save creates the Environment entities in the database.

func (*EnvironmentCreateBulk) SaveE

func (ecb *EnvironmentCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Environment) error) ([]*Environment, error)

SaveE calls the given function after created the Environment entities, which is always good for cascading create operations.

func (*EnvironmentCreateBulk) SaveEX

func (ecb *EnvironmentCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Environment) error) []*Environment

SaveEX is like SaveE, but panics if an error occurs.

func (*EnvironmentCreateBulk) SaveX

func (ecb *EnvironmentCreateBulk) SaveX(ctx context.Context) []*Environment

SaveX is like Save, but panics if an error occurs.

func (*EnvironmentCreateBulk) Set

Set leverages the EnvironmentCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type EnvironmentCreateInput

type EnvironmentCreateInput struct {

	// Project indicates to create Environment entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Type of the environment.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`

	// Connectors specifies full inserting the new EnvironmentConnectorRelationship entities of the Environment entity.
	Connectors []*EnvironmentConnectorRelationshipCreateInput `uri:"-" query:"-" json:"connectors,omitempty"`
	// Resources specifies full inserting the new Resource entities of the Environment entity.
	Resources []*ResourceCreateInput `uri:"-" query:"-" json:"resources,cli-ignore,omitempty"`
	// Variables specifies full inserting the new Variable entities of the Environment entity.
	Variables []*VariableCreateInput `uri:"-" query:"-" json:"variables,omitempty"`
	// contains filtered or unexported fields
}

EnvironmentCreateInput holds the creation input of the Environment entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentCreateInput) Model

func (eci *EnvironmentCreateInput) Model() *Environment

Model returns the Environment entity for creating, after validating.

func (*EnvironmentCreateInput) SetGinContext

func (ic *EnvironmentCreateInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentCreateInput) SetModelClient

func (ic *EnvironmentCreateInput) SetModelClient(cli *Client)

func (*EnvironmentCreateInput) Validate

func (eci *EnvironmentCreateInput) Validate() error

Validate checks the EnvironmentCreateInput entity.

func (*EnvironmentCreateInput) ValidateWith

func (eci *EnvironmentCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentCreateInput entity with the given context and client set.

type EnvironmentCreateInputs

type EnvironmentCreateInputs struct {

	// Project indicates to create Environment entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*EnvironmentCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

EnvironmentCreateInputs holds the creation input of the Environment entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentCreateInputs) Model

func (eci *EnvironmentCreateInputs) Model() []*Environment

Model returns the Environment entities for creating, after validating.

func (*EnvironmentCreateInputs) SetGinContext

func (ic *EnvironmentCreateInputs) SetGinContext(ctx *gin.Context)

func (*EnvironmentCreateInputs) SetModelClient

func (ic *EnvironmentCreateInputs) SetModelClient(cli *Client)

func (*EnvironmentCreateInputs) Validate

func (eci *EnvironmentCreateInputs) Validate() error

Validate checks the EnvironmentCreateInputs entity .

func (*EnvironmentCreateInputs) ValidateWith

func (eci *EnvironmentCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentCreateInputs entity with the given context and client set.

type EnvironmentCreateInputsItem

type EnvironmentCreateInputsItem struct {
	// Type of the environment.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`

	// Connectors specifies full inserting the new EnvironmentConnectorRelationship entities.
	Connectors []*EnvironmentConnectorRelationshipCreateInput `uri:"-" query:"-" json:"connectors,omitempty"`
	// Resources specifies full inserting the new Resource entities.
	Resources []*ResourceCreateInput `uri:"-" query:"-" json:"resources,cli-ignore,omitempty"`
	// Variables specifies full inserting the new Variable entities.
	Variables []*VariableCreateInput `uri:"-" query:"-" json:"variables,omitempty"`
}

EnvironmentCreateInputs holds the creation input item of the Environment entities.

func (*EnvironmentCreateInputsItem) ValidateWith

func (eci *EnvironmentCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentCreateInputsItem entity with the given context and client set.

type EnvironmentDelete

type EnvironmentDelete struct {
	// contains filtered or unexported fields
}

EnvironmentDelete is the builder for deleting a Environment entity.

func (*EnvironmentDelete) Exec

func (ed *EnvironmentDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*EnvironmentDelete) ExecContext

func (c *EnvironmentDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentDelete) ExecX

func (ed *EnvironmentDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentDelete) QueryContext

func (c *EnvironmentDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentDelete) Where

Where appends a list predicates to the EnvironmentDelete builder.

type EnvironmentDeleteInput

type EnvironmentDeleteInput struct {
	EnvironmentQueryInput `path:",inline"`
}

EnvironmentDeleteInput holds the deletion input of the Environment entity, please tags with `path:",inline"` if embedding.

func (*EnvironmentDeleteInput) SetGinContext

func (ic *EnvironmentDeleteInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentDeleteInput) SetModelClient

func (ic *EnvironmentDeleteInput) SetModelClient(cli *Client)

type EnvironmentDeleteInputs

type EnvironmentDeleteInputs struct {

	// Project indicates to delete Environment entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*EnvironmentDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

EnvironmentDeleteInputs holds the deletion input of the Environment entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentDeleteInputs) IDs

func (edi *EnvironmentDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Environment entities for deleting, after validating.

func (*EnvironmentDeleteInputs) Model

func (edi *EnvironmentDeleteInputs) Model() []*Environment

Model returns the Environment entities for deleting, after validating.

func (*EnvironmentDeleteInputs) SetGinContext

func (ic *EnvironmentDeleteInputs) SetGinContext(ctx *gin.Context)

func (*EnvironmentDeleteInputs) SetModelClient

func (ic *EnvironmentDeleteInputs) SetModelClient(cli *Client)

func (*EnvironmentDeleteInputs) Validate

func (edi *EnvironmentDeleteInputs) Validate() error

Validate checks the EnvironmentDeleteInputs entity.

func (*EnvironmentDeleteInputs) ValidateWith

func (edi *EnvironmentDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentDeleteInputs entity with the given context and client set.

type EnvironmentDeleteInputsItem

type EnvironmentDeleteInputsItem struct {
	// ID of the Environment entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Environment entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

EnvironmentDeleteInputs holds the deletion input item of the Environment entities.

type EnvironmentDeleteOne

type EnvironmentDeleteOne struct {
	// contains filtered or unexported fields
}

EnvironmentDeleteOne is the builder for deleting a single Environment entity.

func (*EnvironmentDeleteOne) Exec

func (edo *EnvironmentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EnvironmentDeleteOne) ExecX

func (edo *EnvironmentDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentDeleteOne) Where

Where appends a list predicates to the EnvironmentDelete builder.

type EnvironmentEdges

type EnvironmentEdges struct {
	// Project to which the environment belongs.
	Project *Project `json:"project,omitempty"`
	// Connectors holds the value of the connectors edge.
	Connectors []*EnvironmentConnectorRelationship `json:"connectors,omitempty"`
	// Resources that belong to the environment.
	Resources []*Resource `json:"resources,omitempty,cli-ignore"`
	// ResourceRuns that belong to the environment.
	ResourceRuns []*ResourceRun `json:"resource_runs,omitempty"`
	// ResourceComponents that belong to the environment.
	ResourceComponents []*ResourceComponent `json:"resource_components,omitempty"`
	// Variables that belong to the environment.
	Variables []*Variable `json:"variables,omitempty"`
	// contains filtered or unexported fields
}

EnvironmentEdges holds the relations/edges for other nodes in the graph.

func (EnvironmentEdges) ConnectorsOrErr

func (e EnvironmentEdges) ConnectorsOrErr() ([]*EnvironmentConnectorRelationship, error)

ConnectorsOrErr returns the Connectors value or an error if the edge was not loaded in eager-loading.

func (EnvironmentEdges) ProjectOrErr

func (e EnvironmentEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EnvironmentEdges) ResourceComponentsOrErr added in v0.4.0

func (e EnvironmentEdges) ResourceComponentsOrErr() ([]*ResourceComponent, error)

ResourceComponentsOrErr returns the ResourceComponents value or an error if the edge was not loaded in eager-loading.

func (EnvironmentEdges) ResourceRunsOrErr added in v0.6.0

func (e EnvironmentEdges) ResourceRunsOrErr() ([]*ResourceRun, error)

ResourceRunsOrErr returns the ResourceRuns value or an error if the edge was not loaded in eager-loading.

func (EnvironmentEdges) ResourcesOrErr added in v0.4.0

func (e EnvironmentEdges) ResourcesOrErr() ([]*Resource, error)

ResourcesOrErr returns the Resources value or an error if the edge was not loaded in eager-loading.

func (EnvironmentEdges) VariablesOrErr

func (e EnvironmentEdges) VariablesOrErr() ([]*Variable, error)

VariablesOrErr returns the Variables value or an error if the edge was not loaded in eager-loading.

type EnvironmentGroupBy

type EnvironmentGroupBy struct {
	// contains filtered or unexported fields
}

EnvironmentGroupBy is the group-by builder for Environment entities.

func (*EnvironmentGroupBy) Aggregate

func (egb *EnvironmentGroupBy) Aggregate(fns ...AggregateFunc) *EnvironmentGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*EnvironmentGroupBy) Bool

func (s *EnvironmentGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EnvironmentGroupBy) BoolX

func (s *EnvironmentGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EnvironmentGroupBy) Bools

func (s *EnvironmentGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EnvironmentGroupBy) BoolsX

func (s *EnvironmentGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EnvironmentGroupBy) Float64

func (s *EnvironmentGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EnvironmentGroupBy) Float64X

func (s *EnvironmentGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EnvironmentGroupBy) Float64s

func (s *EnvironmentGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EnvironmentGroupBy) Float64sX

func (s *EnvironmentGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EnvironmentGroupBy) Int

func (s *EnvironmentGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EnvironmentGroupBy) IntX

func (s *EnvironmentGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EnvironmentGroupBy) Ints

func (s *EnvironmentGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EnvironmentGroupBy) IntsX

func (s *EnvironmentGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EnvironmentGroupBy) Scan

func (egb *EnvironmentGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EnvironmentGroupBy) ScanX

func (s *EnvironmentGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EnvironmentGroupBy) String

func (s *EnvironmentGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EnvironmentGroupBy) StringX

func (s *EnvironmentGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EnvironmentGroupBy) Strings

func (s *EnvironmentGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EnvironmentGroupBy) StringsX

func (s *EnvironmentGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EnvironmentMutation

type EnvironmentMutation struct {
	// contains filtered or unexported fields
}

EnvironmentMutation represents an operation that mutates the Environment nodes in the graph.

func (*EnvironmentMutation) AddConnectorIDs

func (m *EnvironmentMutation) AddConnectorIDs(ids ...object.ID)

AddConnectorIDs adds the "connectors" edge to the EnvironmentConnectorRelationship entity by ids.

func (*EnvironmentMutation) AddField

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) AddResourceComponentIDs added in v0.4.0

func (m *EnvironmentMutation) AddResourceComponentIDs(ids ...object.ID)

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by ids.

func (*EnvironmentMutation) AddResourceIDs added in v0.4.0

func (m *EnvironmentMutation) AddResourceIDs(ids ...object.ID)

AddResourceIDs adds the "resources" edge to the Resource entity by ids.

func (*EnvironmentMutation) AddResourceRunIDs added in v0.6.0

func (m *EnvironmentMutation) AddResourceRunIDs(ids ...object.ID)

AddResourceRunIDs adds the "resource_runs" edge to the ResourceRun entity by ids.

func (*EnvironmentMutation) AddVariableIDs

func (m *EnvironmentMutation) AddVariableIDs(ids ...object.ID)

AddVariableIDs adds the "variables" edge to the Variable entity by ids.

func (*EnvironmentMutation) AddedEdges

func (m *EnvironmentMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*EnvironmentMutation) AddedField

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) AddedFields

func (m *EnvironmentMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EnvironmentMutation) AddedIDs

func (m *EnvironmentMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EnvironmentMutation) Annotations

func (m *EnvironmentMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*EnvironmentMutation) AnnotationsCleared

func (m *EnvironmentMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*EnvironmentMutation) ClearAnnotations

func (m *EnvironmentMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*EnvironmentMutation) ClearConnectors

func (m *EnvironmentMutation) ClearConnectors()

ClearConnectors clears the "connectors" edge to the EnvironmentConnectorRelationship entity.

func (*EnvironmentMutation) ClearDescription

func (m *EnvironmentMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*EnvironmentMutation) ClearEdge

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) ClearField

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) ClearLabels

func (m *EnvironmentMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*EnvironmentMutation) ClearProject

func (m *EnvironmentMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*EnvironmentMutation) ClearResourceComponents added in v0.4.0

func (m *EnvironmentMutation) ClearResourceComponents()

ClearResourceComponents clears the "resource_components" edge to the ResourceComponent entity.

func (*EnvironmentMutation) ClearResourceRuns added in v0.6.0

func (m *EnvironmentMutation) ClearResourceRuns()

ClearResourceRuns clears the "resource_runs" edge to the ResourceRun entity.

func (*EnvironmentMutation) ClearResources added in v0.4.0

func (m *EnvironmentMutation) ClearResources()

ClearResources clears the "resources" edge to the Resource entity.

func (*EnvironmentMutation) ClearVariables

func (m *EnvironmentMutation) ClearVariables()

ClearVariables clears the "variables" edge to the Variable entity.

func (*EnvironmentMutation) ClearedEdges

func (m *EnvironmentMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EnvironmentMutation) ClearedFields

func (m *EnvironmentMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EnvironmentMutation) Client

func (m EnvironmentMutation) 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 (*EnvironmentMutation) ConnectorsCleared

func (m *EnvironmentMutation) ConnectorsCleared() bool

ConnectorsCleared reports if the "connectors" edge to the EnvironmentConnectorRelationship entity was cleared.

func (*EnvironmentMutation) ConnectorsIDs

func (m *EnvironmentMutation) ConnectorsIDs() (ids []object.ID)

ConnectorsIDs returns the "connectors" edge IDs in the mutation.

func (*EnvironmentMutation) CreateTime

func (m *EnvironmentMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*EnvironmentMutation) Description

func (m *EnvironmentMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*EnvironmentMutation) DescriptionCleared

func (m *EnvironmentMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*EnvironmentMutation) EdgeCleared

func (m *EnvironmentMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EnvironmentMutation) ExecContext

func (c *EnvironmentMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentMutation) Field

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) FieldCleared

func (m *EnvironmentMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EnvironmentMutation) Fields

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) GetType added in v0.4.0

func (m *EnvironmentMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*EnvironmentMutation) ID

func (m *EnvironmentMutation) ID() (id object.ID, 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 (*EnvironmentMutation) IDs

func (m *EnvironmentMutation) IDs(ctx context.Context) ([]object.ID, 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 (*EnvironmentMutation) Labels

func (m *EnvironmentMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*EnvironmentMutation) LabelsCleared

func (m *EnvironmentMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*EnvironmentMutation) Name

func (m *EnvironmentMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*EnvironmentMutation) OldAnnotations

func (m *EnvironmentMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the Environment entity. If the Environment 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 (*EnvironmentMutation) OldCreateTime

func (m *EnvironmentMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Environment entity. If the Environment 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 (*EnvironmentMutation) OldDescription

func (m *EnvironmentMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Environment entity. If the Environment 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 (*EnvironmentMutation) OldField

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) OldLabels

func (m *EnvironmentMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the Environment entity. If the Environment 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 (*EnvironmentMutation) OldName

func (m *EnvironmentMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Environment entity. If the Environment 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 (*EnvironmentMutation) OldProjectID

func (m *EnvironmentMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the Environment entity. If the Environment 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 (*EnvironmentMutation) OldType added in v0.4.0

func (m *EnvironmentMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the Environment entity. If the Environment 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 (*EnvironmentMutation) OldUpdateTime

func (m *EnvironmentMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Environment entity. If the Environment 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 (*EnvironmentMutation) Op

func (m *EnvironmentMutation) Op() Op

Op returns the operation name.

func (*EnvironmentMutation) ProjectCleared

func (m *EnvironmentMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*EnvironmentMutation) ProjectID

func (m *EnvironmentMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*EnvironmentMutation) ProjectIDs

func (m *EnvironmentMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*EnvironmentMutation) QueryContext

func (c *EnvironmentMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentMutation) RemoveConnectorIDs

func (m *EnvironmentMutation) RemoveConnectorIDs(ids ...object.ID)

RemoveConnectorIDs removes the "connectors" edge to the EnvironmentConnectorRelationship entity by IDs.

func (*EnvironmentMutation) RemoveResourceComponentIDs added in v0.4.0

func (m *EnvironmentMutation) RemoveResourceComponentIDs(ids ...object.ID)

RemoveResourceComponentIDs removes the "resource_components" edge to the ResourceComponent entity by IDs.

func (*EnvironmentMutation) RemoveResourceIDs added in v0.4.0

func (m *EnvironmentMutation) RemoveResourceIDs(ids ...object.ID)

RemoveResourceIDs removes the "resources" edge to the Resource entity by IDs.

func (*EnvironmentMutation) RemoveResourceRunIDs added in v0.6.0

func (m *EnvironmentMutation) RemoveResourceRunIDs(ids ...object.ID)

RemoveResourceRunIDs removes the "resource_runs" edge to the ResourceRun entity by IDs.

func (*EnvironmentMutation) RemoveVariableIDs

func (m *EnvironmentMutation) RemoveVariableIDs(ids ...object.ID)

RemoveVariableIDs removes the "variables" edge to the Variable entity by IDs.

func (*EnvironmentMutation) RemovedConnectorsIDs

func (m *EnvironmentMutation) RemovedConnectorsIDs() (ids []object.ID)

RemovedConnectors returns the removed IDs of the "connectors" edge to the EnvironmentConnectorRelationship entity.

func (*EnvironmentMutation) RemovedEdges

func (m *EnvironmentMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EnvironmentMutation) RemovedIDs

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) RemovedResourceComponentsIDs added in v0.4.0

func (m *EnvironmentMutation) RemovedResourceComponentsIDs() (ids []object.ID)

RemovedResourceComponents returns the removed IDs of the "resource_components" edge to the ResourceComponent entity.

func (*EnvironmentMutation) RemovedResourceRunsIDs added in v0.6.0

func (m *EnvironmentMutation) RemovedResourceRunsIDs() (ids []object.ID)

RemovedResourceRuns returns the removed IDs of the "resource_runs" edge to the ResourceRun entity.

func (*EnvironmentMutation) RemovedResourcesIDs added in v0.4.0

func (m *EnvironmentMutation) RemovedResourcesIDs() (ids []object.ID)

RemovedResources returns the removed IDs of the "resources" edge to the Resource entity.

func (*EnvironmentMutation) RemovedVariablesIDs

func (m *EnvironmentMutation) RemovedVariablesIDs() (ids []object.ID)

RemovedVariables returns the removed IDs of the "variables" edge to the Variable entity.

func (*EnvironmentMutation) ResetAnnotations

func (m *EnvironmentMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*EnvironmentMutation) ResetConnectors

func (m *EnvironmentMutation) ResetConnectors()

ResetConnectors resets all changes to the "connectors" edge.

func (*EnvironmentMutation) ResetCreateTime

func (m *EnvironmentMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*EnvironmentMutation) ResetDescription

func (m *EnvironmentMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*EnvironmentMutation) ResetEdge

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) ResetField

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) ResetLabels

func (m *EnvironmentMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*EnvironmentMutation) ResetName

func (m *EnvironmentMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*EnvironmentMutation) ResetProject

func (m *EnvironmentMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*EnvironmentMutation) ResetProjectID

func (m *EnvironmentMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*EnvironmentMutation) ResetResourceComponents added in v0.4.0

func (m *EnvironmentMutation) ResetResourceComponents()

ResetResourceComponents resets all changes to the "resource_components" edge.

func (*EnvironmentMutation) ResetResourceRuns added in v0.6.0

func (m *EnvironmentMutation) ResetResourceRuns()

ResetResourceRuns resets all changes to the "resource_runs" edge.

func (*EnvironmentMutation) ResetResources added in v0.4.0

func (m *EnvironmentMutation) ResetResources()

ResetResources resets all changes to the "resources" edge.

func (*EnvironmentMutation) ResetType added in v0.4.0

func (m *EnvironmentMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*EnvironmentMutation) ResetUpdateTime

func (m *EnvironmentMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*EnvironmentMutation) ResetVariables

func (m *EnvironmentMutation) ResetVariables()

ResetVariables resets all changes to the "variables" edge.

func (*EnvironmentMutation) ResourceComponentsCleared added in v0.4.0

func (m *EnvironmentMutation) ResourceComponentsCleared() bool

ResourceComponentsCleared reports if the "resource_components" edge to the ResourceComponent entity was cleared.

func (*EnvironmentMutation) ResourceComponentsIDs added in v0.4.0

func (m *EnvironmentMutation) ResourceComponentsIDs() (ids []object.ID)

ResourceComponentsIDs returns the "resource_components" edge IDs in the mutation.

func (*EnvironmentMutation) ResourceRunsCleared added in v0.6.0

func (m *EnvironmentMutation) ResourceRunsCleared() bool

ResourceRunsCleared reports if the "resource_runs" edge to the ResourceRun entity was cleared.

func (*EnvironmentMutation) ResourceRunsIDs added in v0.6.0

func (m *EnvironmentMutation) ResourceRunsIDs() (ids []object.ID)

ResourceRunsIDs returns the "resource_runs" edge IDs in the mutation.

func (*EnvironmentMutation) ResourcesCleared added in v0.4.0

func (m *EnvironmentMutation) ResourcesCleared() bool

ResourcesCleared reports if the "resources" edge to the Resource entity was cleared.

func (*EnvironmentMutation) ResourcesIDs added in v0.4.0

func (m *EnvironmentMutation) ResourcesIDs() (ids []object.ID)

ResourcesIDs returns the "resources" edge IDs in the mutation.

func (*EnvironmentMutation) SetAnnotations

func (m *EnvironmentMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*EnvironmentMutation) SetCreateTime

func (m *EnvironmentMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*EnvironmentMutation) SetDescription

func (m *EnvironmentMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*EnvironmentMutation) SetField

func (m *EnvironmentMutation) 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 (*EnvironmentMutation) SetID

func (m *EnvironmentMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Environment entities.

func (*EnvironmentMutation) SetLabels

func (m *EnvironmentMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*EnvironmentMutation) SetName

func (m *EnvironmentMutation) SetName(s string)

SetName sets the "name" field.

func (*EnvironmentMutation) SetOp

func (m *EnvironmentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EnvironmentMutation) SetProjectID

func (m *EnvironmentMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*EnvironmentMutation) SetType added in v0.4.0

func (m *EnvironmentMutation) SetType(s string)

SetType sets the "type" field.

func (*EnvironmentMutation) SetUpdateTime

func (m *EnvironmentMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (EnvironmentMutation) Tx

func (m EnvironmentMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EnvironmentMutation) Type

func (m *EnvironmentMutation) Type() string

Type returns the node type of this mutation (Environment).

func (*EnvironmentMutation) UpdateTime

func (m *EnvironmentMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*EnvironmentMutation) VariablesCleared

func (m *EnvironmentMutation) VariablesCleared() bool

VariablesCleared reports if the "variables" edge to the Variable entity was cleared.

func (*EnvironmentMutation) VariablesIDs

func (m *EnvironmentMutation) VariablesIDs() (ids []object.ID)

VariablesIDs returns the "variables" edge IDs in the mutation.

func (*EnvironmentMutation) Where

func (m *EnvironmentMutation) Where(ps ...predicate.Environment)

Where appends a list predicates to the EnvironmentMutation builder.

func (*EnvironmentMutation) WhereP

func (m *EnvironmentMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the EnvironmentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type EnvironmentOutput

type EnvironmentOutput struct {
	ID          object.ID         `json:"id,omitempty"`
	Name        string            `json:"name,omitempty"`
	Description string            `json:"description,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	CreateTime  *time.Time        `json:"createTime,omitempty"`
	UpdateTime  *time.Time        `json:"updateTime,omitempty"`
	Type        string            `json:"type,cli-table-column,omitempty"`

	Project    *ProjectOutput                            `json:"project,omitempty"`
	Connectors []*EnvironmentConnectorRelationshipOutput `json:"connectors,omitempty"`
}

EnvironmentOutput holds the output of the Environment entity.

func ExposeEnvironment

func ExposeEnvironment(_e *Environment) *EnvironmentOutput

ExposeEnvironment converts the Environment to EnvironmentOutput.

func ExposeEnvironments

func ExposeEnvironments(_es []*Environment) []*EnvironmentOutput

ExposeEnvironments converts the Environment slice to EnvironmentOutput pointer slice.

type EnvironmentPatchInput added in v0.5.0

type EnvironmentPatchInput struct {
	EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Type of the environment.
	Type string `path:"-" query:"-" json:"type,omitempty"`

	// Connectors indicates replacing the stale EnvironmentConnectorRelationship entities.
	Connectors []*EnvironmentConnectorRelationshipCreateInput `uri:"-" query:"-" json:"connectors,omitempty"`
	// contains filtered or unexported fields
}

EnvironmentPatchInput holds the patch input of the Environment entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentPatchInput) Model added in v0.5.0

func (epi *EnvironmentPatchInput) Model() *Environment

Model returns the Environment patched entity, after validating.

func (*EnvironmentPatchInput) PatchModel added in v0.5.0

func (epi *EnvironmentPatchInput) PatchModel() *Environment

PatchModel returns the Environment partition entity for patching.

func (*EnvironmentPatchInput) SetGinContext added in v0.5.0

func (ic *EnvironmentPatchInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentPatchInput) SetModelClient added in v0.5.0

func (ic *EnvironmentPatchInput) SetModelClient(cli *Client)

func (*EnvironmentPatchInput) Validate added in v0.5.0

func (epi *EnvironmentPatchInput) Validate() error

Validate checks the EnvironmentPatchInput entity.

func (*EnvironmentPatchInput) ValidateWith added in v0.5.0

func (epi *EnvironmentPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentPatchInput entity with the given context and client set.

type EnvironmentQuery

type EnvironmentQuery struct {
	// contains filtered or unexported fields
}

EnvironmentQuery is the builder for querying Environment entities.

func (*EnvironmentQuery) Aggregate

func (eq *EnvironmentQuery) Aggregate(fns ...AggregateFunc) *EnvironmentSelect

Aggregate returns a EnvironmentSelect configured with the given aggregations.

func (*EnvironmentQuery) All

func (eq *EnvironmentQuery) All(ctx context.Context) ([]*Environment, error)

All executes the query and returns a list of Environments.

func (*EnvironmentQuery) AllX

func (eq *EnvironmentQuery) AllX(ctx context.Context) []*Environment

AllX is like All, but panics if an error occurs.

func (*EnvironmentQuery) Clone

func (eq *EnvironmentQuery) Clone() *EnvironmentQuery

Clone returns a duplicate of the EnvironmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EnvironmentQuery) Count

func (eq *EnvironmentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EnvironmentQuery) CountX

func (eq *EnvironmentQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EnvironmentQuery) ExecContext

func (c *EnvironmentQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentQuery) Exist

func (eq *EnvironmentQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EnvironmentQuery) ExistX

func (eq *EnvironmentQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EnvironmentQuery) First

func (eq *EnvironmentQuery) First(ctx context.Context) (*Environment, error)

First returns the first Environment entity from the query. Returns a *NotFoundError when no Environment was found.

func (*EnvironmentQuery) FirstID

func (eq *EnvironmentQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Environment ID from the query. Returns a *NotFoundError when no Environment ID was found.

func (*EnvironmentQuery) FirstIDX

func (eq *EnvironmentQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*EnvironmentQuery) FirstX

func (eq *EnvironmentQuery) FirstX(ctx context.Context) *Environment

FirstX is like First, but panics if an error occurs.

func (*EnvironmentQuery) ForShare

func (eq *EnvironmentQuery) ForShare(opts ...sql.LockOption) *EnvironmentQuery

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 (*EnvironmentQuery) ForUpdate

func (eq *EnvironmentQuery) ForUpdate(opts ...sql.LockOption) *EnvironmentQuery

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 (*EnvironmentQuery) GroupBy

func (eq *EnvironmentQuery) GroupBy(field string, fields ...string) *EnvironmentGroupBy

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.Environment.Query().
	GroupBy(environment.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*EnvironmentQuery) IDs

func (eq *EnvironmentQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Environment IDs.

func (*EnvironmentQuery) IDsX

func (eq *EnvironmentQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*EnvironmentQuery) Limit

func (eq *EnvironmentQuery) Limit(limit int) *EnvironmentQuery

Limit the number of records to be returned by this query.

func (*EnvironmentQuery) Modify

func (eq *EnvironmentQuery) Modify(modifiers ...func(s *sql.Selector)) *EnvironmentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*EnvironmentQuery) Offset

func (eq *EnvironmentQuery) Offset(offset int) *EnvironmentQuery

Offset to start from.

func (*EnvironmentQuery) Only

func (eq *EnvironmentQuery) Only(ctx context.Context) (*Environment, error)

Only returns a single Environment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Environment entity is found. Returns a *NotFoundError when no Environment entities are found.

func (*EnvironmentQuery) OnlyID

func (eq *EnvironmentQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only Environment ID in the query. Returns a *NotSingularError when more than one Environment ID is found. Returns a *NotFoundError when no entities are found.

func (*EnvironmentQuery) OnlyIDX

func (eq *EnvironmentQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EnvironmentQuery) OnlyX

func (eq *EnvironmentQuery) OnlyX(ctx context.Context) *Environment

OnlyX is like Only, but panics if an error occurs.

func (*EnvironmentQuery) Order

Order specifies how the records should be ordered.

func (*EnvironmentQuery) QueryConnectors

QueryConnectors chains the current query on the "connectors" edge.

func (*EnvironmentQuery) QueryContext

func (c *EnvironmentQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentQuery) QueryProject

func (eq *EnvironmentQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*EnvironmentQuery) QueryResourceComponents added in v0.4.0

func (eq *EnvironmentQuery) QueryResourceComponents() *ResourceComponentQuery

QueryResourceComponents chains the current query on the "resource_components" edge.

func (*EnvironmentQuery) QueryResourceRuns added in v0.6.0

func (eq *EnvironmentQuery) QueryResourceRuns() *ResourceRunQuery

QueryResourceRuns chains the current query on the "resource_runs" edge.

func (*EnvironmentQuery) QueryResources added in v0.4.0

func (eq *EnvironmentQuery) QueryResources() *ResourceQuery

QueryResources chains the current query on the "resources" edge.

func (*EnvironmentQuery) QueryVariables

func (eq *EnvironmentQuery) QueryVariables() *VariableQuery

QueryVariables chains the current query on the "variables" edge.

func (*EnvironmentQuery) Select

func (eq *EnvironmentQuery) Select(fields ...string) *EnvironmentSelect

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.Environment.Query().
	Select(environment.FieldName).
	Scan(ctx, &v)

func (*EnvironmentQuery) Unique

func (eq *EnvironmentQuery) Unique(unique bool) *EnvironmentQuery

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 (*EnvironmentQuery) Where

Where adds a new predicate for the EnvironmentQuery builder.

func (*EnvironmentQuery) WhereP

func (eq *EnvironmentQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the EnvironmentQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*EnvironmentQuery) WithConnectors

func (eq *EnvironmentQuery) WithConnectors(opts ...func(*EnvironmentConnectorRelationshipQuery)) *EnvironmentQuery

WithConnectors tells the query-builder to eager-load the nodes that are connected to the "connectors" edge. The optional arguments are used to configure the query builder of the edge.

func (*EnvironmentQuery) WithProject

func (eq *EnvironmentQuery) WithProject(opts ...func(*ProjectQuery)) *EnvironmentQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*EnvironmentQuery) WithResourceComponents added in v0.4.0

func (eq *EnvironmentQuery) WithResourceComponents(opts ...func(*ResourceComponentQuery)) *EnvironmentQuery

WithResourceComponents tells the query-builder to eager-load the nodes that are connected to the "resource_components" edge. The optional arguments are used to configure the query builder of the edge.

func (*EnvironmentQuery) WithResourceRuns added in v0.6.0

func (eq *EnvironmentQuery) WithResourceRuns(opts ...func(*ResourceRunQuery)) *EnvironmentQuery

WithResourceRuns tells the query-builder to eager-load the nodes that are connected to the "resource_runs" edge. The optional arguments are used to configure the query builder of the edge.

func (*EnvironmentQuery) WithResources added in v0.4.0

func (eq *EnvironmentQuery) WithResources(opts ...func(*ResourceQuery)) *EnvironmentQuery

WithResources tells the query-builder to eager-load the nodes that are connected to the "resources" edge. The optional arguments are used to configure the query builder of the edge.

func (*EnvironmentQuery) WithVariables

func (eq *EnvironmentQuery) WithVariables(opts ...func(*VariableQuery)) *EnvironmentQuery

WithVariables tells the query-builder to eager-load the nodes that are connected to the "variables" edge. The optional arguments are used to configure the query builder of the edge.

type EnvironmentQueryInput

type EnvironmentQueryInput struct {

	// Project indicates to query Environment entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project"`

	// Refer holds the route path reference of the Environment entity.
	Refer *object.Refer `path:"environment,default=" query:"-" json:"-"`
	// ID of the Environment entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Environment entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

EnvironmentQueryInput holds the query input of the Environment entity, please tags with `path:",inline"` if embedding.

func (*EnvironmentQueryInput) Model

func (eqi *EnvironmentQueryInput) Model() *Environment

Model returns the Environment entity for querying, after validating.

func (*EnvironmentQueryInput) SetGinContext

func (ic *EnvironmentQueryInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentQueryInput) SetModelClient

func (ic *EnvironmentQueryInput) SetModelClient(cli *Client)

func (*EnvironmentQueryInput) Validate

func (eqi *EnvironmentQueryInput) Validate() error

Validate checks the EnvironmentQueryInput entity.

func (*EnvironmentQueryInput) ValidateWith

func (eqi *EnvironmentQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentQueryInput entity with the given context and client set.

type EnvironmentQueryInputs

type EnvironmentQueryInputs struct {

	// Project indicates to query Environment entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

EnvironmentQueryInputs holds the query input of the Environment entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*EnvironmentQueryInputs) SetGinContext

func (ic *EnvironmentQueryInputs) SetGinContext(ctx *gin.Context)

func (*EnvironmentQueryInputs) SetModelClient

func (ic *EnvironmentQueryInputs) SetModelClient(cli *Client)

func (*EnvironmentQueryInputs) Validate

func (eqi *EnvironmentQueryInputs) Validate() error

Validate checks the EnvironmentQueryInputs entity.

func (*EnvironmentQueryInputs) ValidateWith

func (eqi *EnvironmentQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentQueryInputs entity with the given context and client set.

type EnvironmentSelect

type EnvironmentSelect struct {
	*EnvironmentQuery
	// contains filtered or unexported fields
}

EnvironmentSelect is the builder for selecting fields of Environment entities.

func (*EnvironmentSelect) Aggregate

func (es *EnvironmentSelect) Aggregate(fns ...AggregateFunc) *EnvironmentSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EnvironmentSelect) Bool

func (s *EnvironmentSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EnvironmentSelect) BoolX

func (s *EnvironmentSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EnvironmentSelect) Bools

func (s *EnvironmentSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EnvironmentSelect) BoolsX

func (s *EnvironmentSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (EnvironmentSelect) ExecContext

func (c EnvironmentSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentSelect) Float64

func (s *EnvironmentSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EnvironmentSelect) Float64X

func (s *EnvironmentSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EnvironmentSelect) Float64s

func (s *EnvironmentSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EnvironmentSelect) Float64sX

func (s *EnvironmentSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EnvironmentSelect) Int

func (s *EnvironmentSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EnvironmentSelect) IntX

func (s *EnvironmentSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EnvironmentSelect) Ints

func (s *EnvironmentSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EnvironmentSelect) IntsX

func (s *EnvironmentSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EnvironmentSelect) Modify

func (es *EnvironmentSelect) Modify(modifiers ...func(s *sql.Selector)) *EnvironmentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (EnvironmentSelect) QueryContext

func (c EnvironmentSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentSelect) Scan

func (es *EnvironmentSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EnvironmentSelect) ScanX

func (s *EnvironmentSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EnvironmentSelect) String

func (s *EnvironmentSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EnvironmentSelect) StringX

func (s *EnvironmentSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EnvironmentSelect) Strings

func (s *EnvironmentSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EnvironmentSelect) StringsX

func (s *EnvironmentSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EnvironmentUpdate

type EnvironmentUpdate struct {
	// contains filtered or unexported fields
}

EnvironmentUpdate is the builder for updating Environment entities.

func (*EnvironmentUpdate) AddConnectorIDs

func (eu *EnvironmentUpdate) AddConnectorIDs(ids ...object.ID) *EnvironmentUpdate

AddConnectorIDs adds the "connectors" edge to the EnvironmentConnectorRelationship entity by IDs.

func (*EnvironmentUpdate) AddConnectors

AddConnectors adds the "connectors" edges to the EnvironmentConnectorRelationship entity.

func (*EnvironmentUpdate) AddResourceComponentIDs added in v0.4.0

func (eu *EnvironmentUpdate) AddResourceComponentIDs(ids ...object.ID) *EnvironmentUpdate

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by IDs.

func (*EnvironmentUpdate) AddResourceComponents added in v0.4.0

func (eu *EnvironmentUpdate) AddResourceComponents(r ...*ResourceComponent) *EnvironmentUpdate

AddResourceComponents adds the "resource_components" edges to the ResourceComponent entity.

func (*EnvironmentUpdate) AddResourceIDs added in v0.4.0

func (eu *EnvironmentUpdate) AddResourceIDs(ids ...object.ID) *EnvironmentUpdate

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*EnvironmentUpdate) AddResourceRunIDs added in v0.6.0

func (eu *EnvironmentUpdate) AddResourceRunIDs(ids ...object.ID) *EnvironmentUpdate

AddResourceRunIDs adds the "resource_runs" edge to the ResourceRun entity by IDs.

func (*EnvironmentUpdate) AddResourceRuns added in v0.6.0

func (eu *EnvironmentUpdate) AddResourceRuns(r ...*ResourceRun) *EnvironmentUpdate

AddResourceRuns adds the "resource_runs" edges to the ResourceRun entity.

func (*EnvironmentUpdate) AddResources added in v0.4.0

func (eu *EnvironmentUpdate) AddResources(r ...*Resource) *EnvironmentUpdate

AddResources adds the "resources" edges to the Resource entity.

func (*EnvironmentUpdate) AddVariableIDs

func (eu *EnvironmentUpdate) AddVariableIDs(ids ...object.ID) *EnvironmentUpdate

AddVariableIDs adds the "variables" edge to the Variable entity by IDs.

func (*EnvironmentUpdate) AddVariables

func (eu *EnvironmentUpdate) AddVariables(v ...*Variable) *EnvironmentUpdate

AddVariables adds the "variables" edges to the Variable entity.

func (*EnvironmentUpdate) ClearAnnotations

func (eu *EnvironmentUpdate) ClearAnnotations() *EnvironmentUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*EnvironmentUpdate) ClearConnectors

func (eu *EnvironmentUpdate) ClearConnectors() *EnvironmentUpdate

ClearConnectors clears all "connectors" edges to the EnvironmentConnectorRelationship entity.

func (*EnvironmentUpdate) ClearDescription

func (eu *EnvironmentUpdate) ClearDescription() *EnvironmentUpdate

ClearDescription clears the value of the "description" field.

func (*EnvironmentUpdate) ClearLabels

func (eu *EnvironmentUpdate) ClearLabels() *EnvironmentUpdate

ClearLabels clears the value of the "labels" field.

func (*EnvironmentUpdate) ClearResourceComponents added in v0.4.0

func (eu *EnvironmentUpdate) ClearResourceComponents() *EnvironmentUpdate

ClearResourceComponents clears all "resource_components" edges to the ResourceComponent entity.

func (*EnvironmentUpdate) ClearResourceRuns added in v0.6.0

func (eu *EnvironmentUpdate) ClearResourceRuns() *EnvironmentUpdate

ClearResourceRuns clears all "resource_runs" edges to the ResourceRun entity.

func (*EnvironmentUpdate) ClearResources added in v0.4.0

func (eu *EnvironmentUpdate) ClearResources() *EnvironmentUpdate

ClearResources clears all "resources" edges to the Resource entity.

func (*EnvironmentUpdate) ClearVariables

func (eu *EnvironmentUpdate) ClearVariables() *EnvironmentUpdate

ClearVariables clears all "variables" edges to the Variable entity.

func (*EnvironmentUpdate) Exec

func (eu *EnvironmentUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvironmentUpdate) ExecContext

func (c *EnvironmentUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentUpdate) ExecX

func (eu *EnvironmentUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentUpdate) Modify

func (eu *EnvironmentUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *EnvironmentUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvironmentUpdate) Mutation

func (eu *EnvironmentUpdate) Mutation() *EnvironmentMutation

Mutation returns the EnvironmentMutation object of the builder.

func (*EnvironmentUpdate) QueryContext

func (c *EnvironmentUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentUpdate) RemoveConnectorIDs

func (eu *EnvironmentUpdate) RemoveConnectorIDs(ids ...object.ID) *EnvironmentUpdate

RemoveConnectorIDs removes the "connectors" edge to EnvironmentConnectorRelationship entities by IDs.

func (*EnvironmentUpdate) RemoveConnectors

RemoveConnectors removes "connectors" edges to EnvironmentConnectorRelationship entities.

func (*EnvironmentUpdate) RemoveResourceComponentIDs added in v0.4.0

func (eu *EnvironmentUpdate) RemoveResourceComponentIDs(ids ...object.ID) *EnvironmentUpdate

RemoveResourceComponentIDs removes the "resource_components" edge to ResourceComponent entities by IDs.

func (*EnvironmentUpdate) RemoveResourceComponents added in v0.4.0

func (eu *EnvironmentUpdate) RemoveResourceComponents(r ...*ResourceComponent) *EnvironmentUpdate

RemoveResourceComponents removes "resource_components" edges to ResourceComponent entities.

func (*EnvironmentUpdate) RemoveResourceIDs added in v0.4.0

func (eu *EnvironmentUpdate) RemoveResourceIDs(ids ...object.ID) *EnvironmentUpdate

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*EnvironmentUpdate) RemoveResourceRunIDs added in v0.6.0

func (eu *EnvironmentUpdate) RemoveResourceRunIDs(ids ...object.ID) *EnvironmentUpdate

RemoveResourceRunIDs removes the "resource_runs" edge to ResourceRun entities by IDs.

func (*EnvironmentUpdate) RemoveResourceRuns added in v0.6.0

func (eu *EnvironmentUpdate) RemoveResourceRuns(r ...*ResourceRun) *EnvironmentUpdate

RemoveResourceRuns removes "resource_runs" edges to ResourceRun entities.

func (*EnvironmentUpdate) RemoveResources added in v0.4.0

func (eu *EnvironmentUpdate) RemoveResources(r ...*Resource) *EnvironmentUpdate

RemoveResources removes "resources" edges to Resource entities.

func (*EnvironmentUpdate) RemoveVariableIDs

func (eu *EnvironmentUpdate) RemoveVariableIDs(ids ...object.ID) *EnvironmentUpdate

RemoveVariableIDs removes the "variables" edge to Variable entities by IDs.

func (*EnvironmentUpdate) RemoveVariables

func (eu *EnvironmentUpdate) RemoveVariables(v ...*Variable) *EnvironmentUpdate

RemoveVariables removes "variables" edges to Variable entities.

func (*EnvironmentUpdate) Save

func (eu *EnvironmentUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EnvironmentUpdate) SaveX

func (eu *EnvironmentUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EnvironmentUpdate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*EnvironmentUpdate) SetAnnotations

func (eu *EnvironmentUpdate) SetAnnotations(m map[string]string) *EnvironmentUpdate

SetAnnotations sets the "annotations" field.

func (*EnvironmentUpdate) SetDescription

func (eu *EnvironmentUpdate) SetDescription(s string) *EnvironmentUpdate

SetDescription sets the "description" field.

func (*EnvironmentUpdate) SetLabels

func (eu *EnvironmentUpdate) SetLabels(m map[string]string) *EnvironmentUpdate

SetLabels sets the "labels" field.

func (*EnvironmentUpdate) SetNillableDescription

func (eu *EnvironmentUpdate) SetNillableDescription(s *string) *EnvironmentUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*EnvironmentUpdate) SetUpdateTime

func (eu *EnvironmentUpdate) SetUpdateTime(t time.Time) *EnvironmentUpdate

SetUpdateTime sets the "update_time" field.

func (*EnvironmentUpdate) Where

Where appends a list predicates to the EnvironmentUpdate builder.

type EnvironmentUpdateInput

type EnvironmentUpdateInput struct {
	EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`

	// Connectors indicates replacing the stale EnvironmentConnectorRelationship entities.
	Connectors []*EnvironmentConnectorRelationshipCreateInput `uri:"-" query:"-" json:"connectors,omitempty"`
}

EnvironmentUpdateInput holds the modification input of the Environment entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentUpdateInput) Model

func (eui *EnvironmentUpdateInput) Model() *Environment

Model returns the Environment entity for modifying, after validating.

func (*EnvironmentUpdateInput) SetGinContext

func (ic *EnvironmentUpdateInput) SetGinContext(ctx *gin.Context)

func (*EnvironmentUpdateInput) SetModelClient

func (ic *EnvironmentUpdateInput) SetModelClient(cli *Client)

func (*EnvironmentUpdateInput) Validate

func (eui *EnvironmentUpdateInput) Validate() error

Validate checks the EnvironmentUpdateInput entity.

func (*EnvironmentUpdateInput) ValidateWith

func (eui *EnvironmentUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentUpdateInput entity with the given context and client set.

type EnvironmentUpdateInputs

type EnvironmentUpdateInputs struct {

	// Project indicates to update Environment entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*EnvironmentUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

EnvironmentUpdateInputs holds the modification input of the Environment entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*EnvironmentUpdateInputs) IDs

func (eui *EnvironmentUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Environment entities for modifying, after validating.

func (*EnvironmentUpdateInputs) Model

func (eui *EnvironmentUpdateInputs) Model() []*Environment

Model returns the Environment entities for modifying, after validating.

func (*EnvironmentUpdateInputs) SetGinContext

func (ic *EnvironmentUpdateInputs) SetGinContext(ctx *gin.Context)

func (*EnvironmentUpdateInputs) SetModelClient

func (ic *EnvironmentUpdateInputs) SetModelClient(cli *Client)

func (*EnvironmentUpdateInputs) Validate

func (eui *EnvironmentUpdateInputs) Validate() error

Validate checks the EnvironmentUpdateInputs entity.

func (*EnvironmentUpdateInputs) ValidateWith

func (eui *EnvironmentUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentUpdateInputs entity with the given context and client set.

type EnvironmentUpdateInputsItem

type EnvironmentUpdateInputsItem struct {
	// ID of the Environment entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Environment entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`

	// Connectors indicates replacing the stale EnvironmentConnectorRelationship entities.
	Connectors []*EnvironmentConnectorRelationshipCreateInput `uri:"-" query:"-" json:"connectors,omitempty"`
}

EnvironmentUpdateInputs holds the modification input item of the Environment entities.

func (*EnvironmentUpdateInputsItem) ValidateWith

func (eui *EnvironmentUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the EnvironmentUpdateInputsItem entity with the given context and client set.

type EnvironmentUpdateOne

type EnvironmentUpdateOne struct {
	// contains filtered or unexported fields
}

EnvironmentUpdateOne is the builder for updating a single Environment entity.

func (*EnvironmentUpdateOne) AddConnectorIDs

func (euo *EnvironmentUpdateOne) AddConnectorIDs(ids ...object.ID) *EnvironmentUpdateOne

AddConnectorIDs adds the "connectors" edge to the EnvironmentConnectorRelationship entity by IDs.

func (*EnvironmentUpdateOne) AddConnectors

AddConnectors adds the "connectors" edges to the EnvironmentConnectorRelationship entity.

func (*EnvironmentUpdateOne) AddResourceComponentIDs added in v0.4.0

func (euo *EnvironmentUpdateOne) AddResourceComponentIDs(ids ...object.ID) *EnvironmentUpdateOne

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by IDs.

func (*EnvironmentUpdateOne) AddResourceComponents added in v0.4.0

func (euo *EnvironmentUpdateOne) AddResourceComponents(r ...*ResourceComponent) *EnvironmentUpdateOne

AddResourceComponents adds the "resource_components" edges to the ResourceComponent entity.

func (*EnvironmentUpdateOne) AddResourceIDs added in v0.4.0

func (euo *EnvironmentUpdateOne) AddResourceIDs(ids ...object.ID) *EnvironmentUpdateOne

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*EnvironmentUpdateOne) AddResourceRunIDs added in v0.6.0

func (euo *EnvironmentUpdateOne) AddResourceRunIDs(ids ...object.ID) *EnvironmentUpdateOne

AddResourceRunIDs adds the "resource_runs" edge to the ResourceRun entity by IDs.

func (*EnvironmentUpdateOne) AddResourceRuns added in v0.6.0

func (euo *EnvironmentUpdateOne) AddResourceRuns(r ...*ResourceRun) *EnvironmentUpdateOne

AddResourceRuns adds the "resource_runs" edges to the ResourceRun entity.

func (*EnvironmentUpdateOne) AddResources added in v0.4.0

func (euo *EnvironmentUpdateOne) AddResources(r ...*Resource) *EnvironmentUpdateOne

AddResources adds the "resources" edges to the Resource entity.

func (*EnvironmentUpdateOne) AddVariableIDs

func (euo *EnvironmentUpdateOne) AddVariableIDs(ids ...object.ID) *EnvironmentUpdateOne

AddVariableIDs adds the "variables" edge to the Variable entity by IDs.

func (*EnvironmentUpdateOne) AddVariables

func (euo *EnvironmentUpdateOne) AddVariables(v ...*Variable) *EnvironmentUpdateOne

AddVariables adds the "variables" edges to the Variable entity.

func (*EnvironmentUpdateOne) ClearAnnotations

func (euo *EnvironmentUpdateOne) ClearAnnotations() *EnvironmentUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*EnvironmentUpdateOne) ClearConnectors

func (euo *EnvironmentUpdateOne) ClearConnectors() *EnvironmentUpdateOne

ClearConnectors clears all "connectors" edges to the EnvironmentConnectorRelationship entity.

func (*EnvironmentUpdateOne) ClearDescription

func (euo *EnvironmentUpdateOne) ClearDescription() *EnvironmentUpdateOne

ClearDescription clears the value of the "description" field.

func (*EnvironmentUpdateOne) ClearLabels

func (euo *EnvironmentUpdateOne) ClearLabels() *EnvironmentUpdateOne

ClearLabels clears the value of the "labels" field.

func (*EnvironmentUpdateOne) ClearResourceComponents added in v0.4.0

func (euo *EnvironmentUpdateOne) ClearResourceComponents() *EnvironmentUpdateOne

ClearResourceComponents clears all "resource_components" edges to the ResourceComponent entity.

func (*EnvironmentUpdateOne) ClearResourceRuns added in v0.6.0

func (euo *EnvironmentUpdateOne) ClearResourceRuns() *EnvironmentUpdateOne

ClearResourceRuns clears all "resource_runs" edges to the ResourceRun entity.

func (*EnvironmentUpdateOne) ClearResources added in v0.4.0

func (euo *EnvironmentUpdateOne) ClearResources() *EnvironmentUpdateOne

ClearResources clears all "resources" edges to the Resource entity.

func (*EnvironmentUpdateOne) ClearVariables

func (euo *EnvironmentUpdateOne) ClearVariables() *EnvironmentUpdateOne

ClearVariables clears all "variables" edges to the Variable entity.

func (*EnvironmentUpdateOne) Exec

func (euo *EnvironmentUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EnvironmentUpdateOne) ExecContext

func (c *EnvironmentUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EnvironmentUpdateOne) ExecE

func (euo *EnvironmentUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Environment) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*EnvironmentUpdateOne) ExecEX

func (euo *EnvironmentUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Environment) error)

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentUpdateOne) ExecX

func (euo *EnvironmentUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentUpdateOne) Modify

func (euo *EnvironmentUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *EnvironmentUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvironmentUpdateOne) Mutation

func (euo *EnvironmentUpdateOne) Mutation() *EnvironmentMutation

Mutation returns the EnvironmentMutation object of the builder.

func (*EnvironmentUpdateOne) QueryContext

func (c *EnvironmentUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EnvironmentUpdateOne) RemoveConnectorIDs

func (euo *EnvironmentUpdateOne) RemoveConnectorIDs(ids ...object.ID) *EnvironmentUpdateOne

RemoveConnectorIDs removes the "connectors" edge to EnvironmentConnectorRelationship entities by IDs.

func (*EnvironmentUpdateOne) RemoveConnectors

RemoveConnectors removes "connectors" edges to EnvironmentConnectorRelationship entities.

func (*EnvironmentUpdateOne) RemoveResourceComponentIDs added in v0.4.0

func (euo *EnvironmentUpdateOne) RemoveResourceComponentIDs(ids ...object.ID) *EnvironmentUpdateOne

RemoveResourceComponentIDs removes the "resource_components" edge to ResourceComponent entities by IDs.

func (*EnvironmentUpdateOne) RemoveResourceComponents added in v0.4.0

func (euo *EnvironmentUpdateOne) RemoveResourceComponents(r ...*ResourceComponent) *EnvironmentUpdateOne

RemoveResourceComponents removes "resource_components" edges to ResourceComponent entities.

func (*EnvironmentUpdateOne) RemoveResourceIDs added in v0.4.0

func (euo *EnvironmentUpdateOne) RemoveResourceIDs(ids ...object.ID) *EnvironmentUpdateOne

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*EnvironmentUpdateOne) RemoveResourceRunIDs added in v0.6.0

func (euo *EnvironmentUpdateOne) RemoveResourceRunIDs(ids ...object.ID) *EnvironmentUpdateOne

RemoveResourceRunIDs removes the "resource_runs" edge to ResourceRun entities by IDs.

func (*EnvironmentUpdateOne) RemoveResourceRuns added in v0.6.0

func (euo *EnvironmentUpdateOne) RemoveResourceRuns(r ...*ResourceRun) *EnvironmentUpdateOne

RemoveResourceRuns removes "resource_runs" edges to ResourceRun entities.

func (*EnvironmentUpdateOne) RemoveResources added in v0.4.0

func (euo *EnvironmentUpdateOne) RemoveResources(r ...*Resource) *EnvironmentUpdateOne

RemoveResources removes "resources" edges to Resource entities.

func (*EnvironmentUpdateOne) RemoveVariableIDs

func (euo *EnvironmentUpdateOne) RemoveVariableIDs(ids ...object.ID) *EnvironmentUpdateOne

RemoveVariableIDs removes the "variables" edge to Variable entities by IDs.

func (*EnvironmentUpdateOne) RemoveVariables

func (euo *EnvironmentUpdateOne) RemoveVariables(v ...*Variable) *EnvironmentUpdateOne

RemoveVariables removes "variables" edges to Variable entities.

func (*EnvironmentUpdateOne) Save

Save executes the query and returns the updated Environment entity.

func (*EnvironmentUpdateOne) SaveE

func (euo *EnvironmentUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Environment) error) (*Environment, error)

SaveE calls the given function after updated the Environment entity, which is always good for cascading update operations.

func (*EnvironmentUpdateOne) SaveEX

func (euo *EnvironmentUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Environment) error) *Environment

SaveEX is like SaveE, but panics if an error occurs.

func (*EnvironmentUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EnvironmentUpdateOne) Select

func (euo *EnvironmentUpdateOne) Select(field string, fields ...string) *EnvironmentUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*EnvironmentUpdateOne) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*EnvironmentUpdateOne) SetAnnotations

func (euo *EnvironmentUpdateOne) SetAnnotations(m map[string]string) *EnvironmentUpdateOne

SetAnnotations sets the "annotations" field.

func (*EnvironmentUpdateOne) SetDescription

func (euo *EnvironmentUpdateOne) SetDescription(s string) *EnvironmentUpdateOne

SetDescription sets the "description" field.

func (*EnvironmentUpdateOne) SetLabels

func (euo *EnvironmentUpdateOne) SetLabels(m map[string]string) *EnvironmentUpdateOne

SetLabels sets the "labels" field.

func (*EnvironmentUpdateOne) SetNillableDescription

func (euo *EnvironmentUpdateOne) SetNillableDescription(s *string) *EnvironmentUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*EnvironmentUpdateOne) SetUpdateTime

func (euo *EnvironmentUpdateOne) SetUpdateTime(t time.Time) *EnvironmentUpdateOne

SetUpdateTime sets the "update_time" field.

func (*EnvironmentUpdateOne) Where

Where appends a list predicates to the EnvironmentUpdate builder.

type EnvironmentUpsert

type EnvironmentUpsert struct {
	*sql.UpdateSet
}

EnvironmentUpsert is the "OnConflict" setter.

func (*EnvironmentUpsert) ClearAnnotations

func (u *EnvironmentUpsert) ClearAnnotations() *EnvironmentUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*EnvironmentUpsert) ClearDescription

func (u *EnvironmentUpsert) ClearDescription() *EnvironmentUpsert

ClearDescription clears the value of the "description" field.

func (*EnvironmentUpsert) ClearLabels

func (u *EnvironmentUpsert) ClearLabels() *EnvironmentUpsert

ClearLabels clears the value of the "labels" field.

func (*EnvironmentUpsert) SetAnnotations

func (u *EnvironmentUpsert) SetAnnotations(v map[string]string) *EnvironmentUpsert

SetAnnotations sets the "annotations" field.

func (*EnvironmentUpsert) SetDescription

func (u *EnvironmentUpsert) SetDescription(v string) *EnvironmentUpsert

SetDescription sets the "description" field.

func (*EnvironmentUpsert) SetLabels

func (u *EnvironmentUpsert) SetLabels(v map[string]string) *EnvironmentUpsert

SetLabels sets the "labels" field.

func (*EnvironmentUpsert) SetUpdateTime

func (u *EnvironmentUpsert) SetUpdateTime(v time.Time) *EnvironmentUpsert

SetUpdateTime sets the "update_time" field.

func (*EnvironmentUpsert) UpdateAnnotations

func (u *EnvironmentUpsert) UpdateAnnotations() *EnvironmentUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*EnvironmentUpsert) UpdateDescription

func (u *EnvironmentUpsert) UpdateDescription() *EnvironmentUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*EnvironmentUpsert) UpdateLabels

func (u *EnvironmentUpsert) UpdateLabels() *EnvironmentUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*EnvironmentUpsert) UpdateUpdateTime

func (u *EnvironmentUpsert) UpdateUpdateTime() *EnvironmentUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type EnvironmentUpsertBulk

type EnvironmentUpsertBulk struct {
	// contains filtered or unexported fields
}

EnvironmentUpsertBulk is the builder for "upsert"-ing a bulk of Environment nodes.

func (*EnvironmentUpsertBulk) ClearAnnotations

func (u *EnvironmentUpsertBulk) ClearAnnotations() *EnvironmentUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*EnvironmentUpsertBulk) ClearDescription

func (u *EnvironmentUpsertBulk) ClearDescription() *EnvironmentUpsertBulk

ClearDescription clears the value of the "description" field.

func (*EnvironmentUpsertBulk) ClearLabels

func (u *EnvironmentUpsertBulk) ClearLabels() *EnvironmentUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*EnvironmentUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*EnvironmentUpsertBulk) Exec

Exec executes the query.

func (*EnvironmentUpsertBulk) ExecE

func (u *EnvironmentUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Environment) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*EnvironmentUpsertBulk) ExecEX

func (u *EnvironmentUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Environment) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*EnvironmentUpsertBulk) ExecX

func (u *EnvironmentUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Environment.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*EnvironmentUpsertBulk) SetAnnotations

func (u *EnvironmentUpsertBulk) SetAnnotations(v map[string]string) *EnvironmentUpsertBulk

SetAnnotations sets the "annotations" field.

func (*EnvironmentUpsertBulk) SetDescription

func (u *EnvironmentUpsertBulk) SetDescription(v string) *EnvironmentUpsertBulk

SetDescription sets the "description" field.

func (*EnvironmentUpsertBulk) SetLabels

SetLabels sets the "labels" field.

func (*EnvironmentUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*EnvironmentUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the EnvironmentCreateBulk.OnConflict documentation for more info.

func (*EnvironmentUpsertBulk) UpdateAnnotations

func (u *EnvironmentUpsertBulk) UpdateAnnotations() *EnvironmentUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*EnvironmentUpsertBulk) UpdateDescription

func (u *EnvironmentUpsertBulk) UpdateDescription() *EnvironmentUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*EnvironmentUpsertBulk) UpdateLabels

func (u *EnvironmentUpsertBulk) UpdateLabels() *EnvironmentUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*EnvironmentUpsertBulk) UpdateNewValues

func (u *EnvironmentUpsertBulk) UpdateNewValues() *EnvironmentUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Environment.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(environment.FieldID)
		}),
	).
	Exec(ctx)

func (*EnvironmentUpsertBulk) UpdateUpdateTime

func (u *EnvironmentUpsertBulk) UpdateUpdateTime() *EnvironmentUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type EnvironmentUpsertOne

type EnvironmentUpsertOne struct {
	// contains filtered or unexported fields
}

EnvironmentUpsertOne is the builder for "upsert"-ing

one Environment node.

func (*EnvironmentUpsertOne) ClearAnnotations

func (u *EnvironmentUpsertOne) ClearAnnotations() *EnvironmentUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*EnvironmentUpsertOne) ClearDescription

func (u *EnvironmentUpsertOne) ClearDescription() *EnvironmentUpsertOne

ClearDescription clears the value of the "description" field.

func (*EnvironmentUpsertOne) ClearLabels

func (u *EnvironmentUpsertOne) ClearLabels() *EnvironmentUpsertOne

ClearLabels clears the value of the "labels" field.

func (*EnvironmentUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*EnvironmentUpsertOne) Exec

Exec executes the query.

func (*EnvironmentUpsertOne) ExecE

func (u *EnvironmentUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Environment) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*EnvironmentUpsertOne) ExecEX

func (u *EnvironmentUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Environment) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*EnvironmentUpsertOne) ExecX

func (u *EnvironmentUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EnvironmentUpsertOne) ID

func (u *EnvironmentUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*EnvironmentUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*EnvironmentUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Environment.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*EnvironmentUpsertOne) SetAnnotations

func (u *EnvironmentUpsertOne) SetAnnotations(v map[string]string) *EnvironmentUpsertOne

SetAnnotations sets the "annotations" field.

func (*EnvironmentUpsertOne) SetDescription

func (u *EnvironmentUpsertOne) SetDescription(v string) *EnvironmentUpsertOne

SetDescription sets the "description" field.

func (*EnvironmentUpsertOne) SetLabels

SetLabels sets the "labels" field.

func (*EnvironmentUpsertOne) SetUpdateTime

func (u *EnvironmentUpsertOne) SetUpdateTime(v time.Time) *EnvironmentUpsertOne

SetUpdateTime sets the "update_time" field.

func (*EnvironmentUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the EnvironmentCreate.OnConflict documentation for more info.

func (*EnvironmentUpsertOne) UpdateAnnotations

func (u *EnvironmentUpsertOne) UpdateAnnotations() *EnvironmentUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*EnvironmentUpsertOne) UpdateDescription

func (u *EnvironmentUpsertOne) UpdateDescription() *EnvironmentUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*EnvironmentUpsertOne) UpdateLabels

func (u *EnvironmentUpsertOne) UpdateLabels() *EnvironmentUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*EnvironmentUpsertOne) UpdateNewValues

func (u *EnvironmentUpsertOne) UpdateNewValues() *EnvironmentUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Environment.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(environment.FieldID)
		}),
	).
	Exec(ctx)

func (*EnvironmentUpsertOne) UpdateUpdateTime

func (u *EnvironmentUpsertOne) UpdateUpdateTime() *EnvironmentUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Environments

type Environments []*Environment

Environments is a parsable slice of Environment.

func (Environments) View

func (_es Environments) View() []*EnvironmentOutput

View returns the output of Environment entities.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func AlternateSchema

func AlternateSchema(schemaConfig SchemaConfig) Option

AlternateSchemas allows alternate schema names to be passed into ent operations.

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 Perspective

type Perspective struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Start time for the perspective.
	StartTime string `json:"start_time,omitempty"`
	// End time for the perspective.
	EndTime string `json:"end_time,omitempty"`
	// Is builtin perspective.
	Builtin bool `json:"builtin,omitempty"`
	// Indicated the perspective included cost queries, record the used query condition.
	CostQueries []types.QueryCondition `json:"cost_queries,omitempty"`
	// contains filtered or unexported fields
}

Perspective is the model entity for the Perspective schema.

func (*Perspective) ExecContext

func (c *Perspective) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Perspective) QueryContext

func (c *Perspective) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Perspective) String

func (pe *Perspective) String() string

String implements the fmt.Stringer.

func (*Perspective) Unwrap

func (pe *Perspective) Unwrap() *Perspective

Unwrap unwraps the Perspective 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 (*Perspective) Update

func (pe *Perspective) Update() *PerspectiveUpdateOne

Update returns a builder for updating this Perspective. Note that you need to call Perspective.Unwrap() before calling this method if this Perspective was returned from a transaction, and the transaction was committed or rolled back.

func (*Perspective) Value

func (pe *Perspective) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Perspective. This includes values selected through modifiers, order, etc.

func (*Perspective) View

func (_p *Perspective) View() *PerspectiveOutput

View returns the output of Perspective entity.

type PerspectiveClient

type PerspectiveClient struct {
	// contains filtered or unexported fields
}

PerspectiveClient is a client for the Perspective schema.

func NewPerspectiveClient

func NewPerspectiveClient(c config) *PerspectiveClient

NewPerspectiveClient returns a client for the Perspective from the given config.

func (*PerspectiveClient) Create

func (c *PerspectiveClient) Create() *PerspectiveCreate

Create returns a builder for creating a Perspective entity.

func (*PerspectiveClient) CreateBulk

func (c *PerspectiveClient) CreateBulk(builders ...*PerspectiveCreate) *PerspectiveCreateBulk

CreateBulk returns a builder for creating a bulk of Perspective entities.

func (*PerspectiveClient) Delete

func (c *PerspectiveClient) Delete() *PerspectiveDelete

Delete returns a delete builder for Perspective.

func (*PerspectiveClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PerspectiveClient) DeleteOneID

func (c *PerspectiveClient) DeleteOneID(id object.ID) *PerspectiveDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PerspectiveClient) ExecContext

func (c *PerspectiveClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PerspectiveClient) Get

Get returns a Perspective entity by its id.

func (*PerspectiveClient) GetX

GetX is like Get, but panics if an error occurs.

func (*PerspectiveClient) Hooks

func (c *PerspectiveClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PerspectiveClient) Intercept

func (c *PerspectiveClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `perspective.Intercept(f(g(h())))`.

func (*PerspectiveClient) Interceptors

func (c *PerspectiveClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PerspectiveClient) MapCreateBulk added in v0.5.0

func (c *PerspectiveClient) MapCreateBulk(slice any, setFunc func(*PerspectiveCreate, int)) *PerspectiveCreateBulk

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 (*PerspectiveClient) Query

func (c *PerspectiveClient) Query() *PerspectiveQuery

Query returns a query builder for Perspective.

func (*PerspectiveClient) QueryContext

func (c *PerspectiveClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PerspectiveClient) Update

func (c *PerspectiveClient) Update() *PerspectiveUpdate

Update returns an update builder for Perspective.

func (*PerspectiveClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PerspectiveClient) UpdateOneID

func (c *PerspectiveClient) UpdateOneID(id object.ID) *PerspectiveUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PerspectiveClient) Use

func (c *PerspectiveClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `perspective.Hooks(f(g(h())))`.

type PerspectiveClientGetter

type PerspectiveClientGetter interface {
	// Perspectives returns the client for interacting with the Perspective builders.
	Perspectives() *PerspectiveClient
}

PerspectiveClientGetter is an interface that allows getting PerspectiveClient.

type PerspectiveCreate

type PerspectiveCreate struct {
	// contains filtered or unexported fields
}

PerspectiveCreate is the builder for creating a Perspective entity.

func (*PerspectiveCreate) Exec

func (pc *PerspectiveCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PerspectiveCreate) ExecContext

func (c *PerspectiveCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PerspectiveCreate) ExecE

func (pc *PerspectiveCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Perspective) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*PerspectiveCreate) ExecEX

func (pc *PerspectiveCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Perspective) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*PerspectiveCreate) ExecX

func (pc *PerspectiveCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PerspectiveCreate) Mutation

func (pc *PerspectiveCreate) Mutation() *PerspectiveMutation

Mutation returns the PerspectiveMutation object of the builder.

func (*PerspectiveCreate) OnConflict

func (pc *PerspectiveCreate) OnConflict(opts ...sql.ConflictOption) *PerspectiveUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Perspective.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PerspectiveUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*PerspectiveCreate) OnConflictColumns

func (pc *PerspectiveCreate) OnConflictColumns(columns ...string) *PerspectiveUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Perspective.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PerspectiveCreate) QueryContext

func (c *PerspectiveCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PerspectiveCreate) Save

Save creates the Perspective in the database.

func (*PerspectiveCreate) SaveE

func (pc *PerspectiveCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Perspective) error) (*Perspective, error)

SaveE calls the given function after created the Perspective entity, which is always good for cascading create operations.

func (*PerspectiveCreate) SaveEX

func (pc *PerspectiveCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Perspective) error) *Perspective

SaveEX is like SaveE, but panics if an error occurs.

func (*PerspectiveCreate) SaveX

func (pc *PerspectiveCreate) SaveX(ctx context.Context) *Perspective

SaveX calls Save and panics if Save returns an error.

func (*PerspectiveCreate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*PerspectiveCreate) SetAnnotations

func (pc *PerspectiveCreate) SetAnnotations(m map[string]string) *PerspectiveCreate

SetAnnotations sets the "annotations" field.

func (*PerspectiveCreate) SetBuiltin

func (pc *PerspectiveCreate) SetBuiltin(b bool) *PerspectiveCreate

SetBuiltin sets the "builtin" field.

func (*PerspectiveCreate) SetCostQueries

func (pc *PerspectiveCreate) SetCostQueries(tc []types.QueryCondition) *PerspectiveCreate

SetCostQueries sets the "cost_queries" field.

func (*PerspectiveCreate) SetCreateTime

func (pc *PerspectiveCreate) SetCreateTime(t time.Time) *PerspectiveCreate

SetCreateTime sets the "create_time" field.

func (*PerspectiveCreate) SetDescription

func (pc *PerspectiveCreate) SetDescription(s string) *PerspectiveCreate

SetDescription sets the "description" field.

func (*PerspectiveCreate) SetEndTime

func (pc *PerspectiveCreate) SetEndTime(s string) *PerspectiveCreate

SetEndTime sets the "end_time" field.

func (*PerspectiveCreate) SetID

SetID sets the "id" field.

func (*PerspectiveCreate) SetLabels

func (pc *PerspectiveCreate) SetLabels(m map[string]string) *PerspectiveCreate

SetLabels sets the "labels" field.

func (*PerspectiveCreate) SetName

func (pc *PerspectiveCreate) SetName(s string) *PerspectiveCreate

SetName sets the "name" field.

func (*PerspectiveCreate) SetNillableBuiltin

func (pc *PerspectiveCreate) SetNillableBuiltin(b *bool) *PerspectiveCreate

SetNillableBuiltin sets the "builtin" field if the given value is not nil.

func (*PerspectiveCreate) SetNillableCreateTime

func (pc *PerspectiveCreate) SetNillableCreateTime(t *time.Time) *PerspectiveCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*PerspectiveCreate) SetNillableDescription

func (pc *PerspectiveCreate) SetNillableDescription(s *string) *PerspectiveCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*PerspectiveCreate) SetNillableUpdateTime

func (pc *PerspectiveCreate) SetNillableUpdateTime(t *time.Time) *PerspectiveCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*PerspectiveCreate) SetStartTime

func (pc *PerspectiveCreate) SetStartTime(s string) *PerspectiveCreate

SetStartTime sets the "start_time" field.

func (*PerspectiveCreate) SetUpdateTime

func (pc *PerspectiveCreate) SetUpdateTime(t time.Time) *PerspectiveCreate

SetUpdateTime sets the "update_time" field.

type PerspectiveCreateBulk

type PerspectiveCreateBulk struct {
	// contains filtered or unexported fields
}

PerspectiveCreateBulk is the builder for creating many Perspective entities in bulk.

func (*PerspectiveCreateBulk) Exec

func (pcb *PerspectiveCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PerspectiveCreateBulk) ExecContext

func (c *PerspectiveCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PerspectiveCreateBulk) ExecE

func (pcb *PerspectiveCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Perspective) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*PerspectiveCreateBulk) ExecEX

func (pcb *PerspectiveCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Perspective) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*PerspectiveCreateBulk) ExecX

func (pcb *PerspectiveCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PerspectiveCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Perspective.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PerspectiveUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*PerspectiveCreateBulk) OnConflictColumns

func (pcb *PerspectiveCreateBulk) OnConflictColumns(columns ...string) *PerspectiveUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Perspective.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PerspectiveCreateBulk) QueryContext

func (c *PerspectiveCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PerspectiveCreateBulk) Save

func (pcb *PerspectiveCreateBulk) Save(ctx context.Context) ([]*Perspective, error)

Save creates the Perspective entities in the database.

func (*PerspectiveCreateBulk) SaveE

func (pcb *PerspectiveCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Perspective) error) ([]*Perspective, error)

SaveE calls the given function after created the Perspective entities, which is always good for cascading create operations.

func (*PerspectiveCreateBulk) SaveEX

func (pcb *PerspectiveCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Perspective) error) []*Perspective

SaveEX is like SaveE, but panics if an error occurs.

func (*PerspectiveCreateBulk) SaveX

func (pcb *PerspectiveCreateBulk) SaveX(ctx context.Context) []*Perspective

SaveX is like Save, but panics if an error occurs.

func (*PerspectiveCreateBulk) Set

Set leverages the PerspectiveCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type PerspectiveCreateInput

type PerspectiveCreateInput struct {

	// End time for the perspective.
	EndTime string `path:"-" query:"-" json:"endTime"`
	// Start time for the perspective.
	StartTime string `path:"-" query:"-" json:"startTime"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Is builtin perspective.
	Builtin bool `path:"-" query:"-" json:"builtin,omitempty"`
	// Indicated the perspective included cost queries, record the used query condition.
	CostQueries []types.QueryCondition `path:"-" query:"-" json:"costQueries,omitempty"`
	// contains filtered or unexported fields
}

PerspectiveCreateInput holds the creation input of the Perspective entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*PerspectiveCreateInput) Model

func (pci *PerspectiveCreateInput) Model() *Perspective

Model returns the Perspective entity for creating, after validating.

func (*PerspectiveCreateInput) SetGinContext

func (ic *PerspectiveCreateInput) SetGinContext(ctx *gin.Context)

func (*PerspectiveCreateInput) SetModelClient

func (ic *PerspectiveCreateInput) SetModelClient(cli *Client)

func (*PerspectiveCreateInput) Validate

func (pci *PerspectiveCreateInput) Validate() error

Validate checks the PerspectiveCreateInput entity.

func (*PerspectiveCreateInput) ValidateWith

func (pci *PerspectiveCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectiveCreateInput entity with the given context and client set.

type PerspectiveCreateInputs

type PerspectiveCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*PerspectiveCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

PerspectiveCreateInputs holds the creation input of the Perspective entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*PerspectiveCreateInputs) Model

func (pci *PerspectiveCreateInputs) Model() []*Perspective

Model returns the Perspective entities for creating, after validating.

func (*PerspectiveCreateInputs) SetGinContext

func (ic *PerspectiveCreateInputs) SetGinContext(ctx *gin.Context)

func (*PerspectiveCreateInputs) SetModelClient

func (ic *PerspectiveCreateInputs) SetModelClient(cli *Client)

func (*PerspectiveCreateInputs) Validate

func (pci *PerspectiveCreateInputs) Validate() error

Validate checks the PerspectiveCreateInputs entity .

func (*PerspectiveCreateInputs) ValidateWith

func (pci *PerspectiveCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectiveCreateInputs entity with the given context and client set.

type PerspectiveCreateInputsItem

type PerspectiveCreateInputsItem struct {
	// End time for the perspective.
	EndTime string `path:"-" query:"-" json:"endTime"`
	// Start time for the perspective.
	StartTime string `path:"-" query:"-" json:"startTime"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Is builtin perspective.
	Builtin bool `path:"-" query:"-" json:"builtin,omitempty"`
	// Indicated the perspective included cost queries, record the used query condition.
	CostQueries []types.QueryCondition `path:"-" query:"-" json:"costQueries,omitempty"`
}

PerspectiveCreateInputs holds the creation input item of the Perspective entities.

func (*PerspectiveCreateInputsItem) ValidateWith

func (pci *PerspectiveCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectiveCreateInputsItem entity with the given context and client set.

type PerspectiveDelete

type PerspectiveDelete struct {
	// contains filtered or unexported fields
}

PerspectiveDelete is the builder for deleting a Perspective entity.

func (*PerspectiveDelete) Exec

func (pd *PerspectiveDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PerspectiveDelete) ExecContext

func (c *PerspectiveDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PerspectiveDelete) ExecX

func (pd *PerspectiveDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PerspectiveDelete) QueryContext

func (c *PerspectiveDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PerspectiveDelete) Where

Where appends a list predicates to the PerspectiveDelete builder.

type PerspectiveDeleteInput

type PerspectiveDeleteInput struct {
	PerspectiveQueryInput `path:",inline"`
}

PerspectiveDeleteInput holds the deletion input of the Perspective entity, please tags with `path:",inline"` if embedding.

func (*PerspectiveDeleteInput) SetGinContext

func (ic *PerspectiveDeleteInput) SetGinContext(ctx *gin.Context)

func (*PerspectiveDeleteInput) SetModelClient

func (ic *PerspectiveDeleteInput) SetModelClient(cli *Client)

type PerspectiveDeleteInputs

type PerspectiveDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*PerspectiveDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

PerspectiveDeleteInputs holds the deletion input of the Perspective entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*PerspectiveDeleteInputs) IDs

func (pdi *PerspectiveDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Perspective entities for deleting, after validating.

func (*PerspectiveDeleteInputs) Model

func (pdi *PerspectiveDeleteInputs) Model() []*Perspective

Model returns the Perspective entities for deleting, after validating.

func (*PerspectiveDeleteInputs) SetGinContext

func (ic *PerspectiveDeleteInputs) SetGinContext(ctx *gin.Context)

func (*PerspectiveDeleteInputs) SetModelClient

func (ic *PerspectiveDeleteInputs) SetModelClient(cli *Client)

func (*PerspectiveDeleteInputs) Validate

func (pdi *PerspectiveDeleteInputs) Validate() error

Validate checks the PerspectiveDeleteInputs entity.

func (*PerspectiveDeleteInputs) ValidateWith

func (pdi *PerspectiveDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectiveDeleteInputs entity with the given context and client set.

type PerspectiveDeleteInputsItem

type PerspectiveDeleteInputsItem struct {
	// ID of the Perspective entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Perspective entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

PerspectiveDeleteInputs holds the deletion input item of the Perspective entities.

type PerspectiveDeleteOne

type PerspectiveDeleteOne struct {
	// contains filtered or unexported fields
}

PerspectiveDeleteOne is the builder for deleting a single Perspective entity.

func (*PerspectiveDeleteOne) Exec

func (pdo *PerspectiveDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PerspectiveDeleteOne) ExecX

func (pdo *PerspectiveDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PerspectiveDeleteOne) Where

Where appends a list predicates to the PerspectiveDelete builder.

type PerspectiveGroupBy

type PerspectiveGroupBy struct {
	// contains filtered or unexported fields
}

PerspectiveGroupBy is the group-by builder for Perspective entities.

func (*PerspectiveGroupBy) Aggregate

func (pgb *PerspectiveGroupBy) Aggregate(fns ...AggregateFunc) *PerspectiveGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PerspectiveGroupBy) Bool

func (s *PerspectiveGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PerspectiveGroupBy) BoolX

func (s *PerspectiveGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PerspectiveGroupBy) Bools

func (s *PerspectiveGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PerspectiveGroupBy) BoolsX

func (s *PerspectiveGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PerspectiveGroupBy) Float64

func (s *PerspectiveGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PerspectiveGroupBy) Float64X

func (s *PerspectiveGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PerspectiveGroupBy) Float64s

func (s *PerspectiveGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PerspectiveGroupBy) Float64sX

func (s *PerspectiveGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PerspectiveGroupBy) Int

func (s *PerspectiveGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PerspectiveGroupBy) IntX

func (s *PerspectiveGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PerspectiveGroupBy) Ints

func (s *PerspectiveGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PerspectiveGroupBy) IntsX

func (s *PerspectiveGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PerspectiveGroupBy) Scan

func (pgb *PerspectiveGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PerspectiveGroupBy) ScanX

func (s *PerspectiveGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PerspectiveGroupBy) String

func (s *PerspectiveGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PerspectiveGroupBy) StringX

func (s *PerspectiveGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PerspectiveGroupBy) Strings

func (s *PerspectiveGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PerspectiveGroupBy) StringsX

func (s *PerspectiveGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PerspectiveMutation

type PerspectiveMutation struct {
	// contains filtered or unexported fields
}

PerspectiveMutation represents an operation that mutates the Perspective nodes in the graph.

func (*PerspectiveMutation) AddField

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) AddedEdges

func (m *PerspectiveMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PerspectiveMutation) AddedField

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) AddedFields

func (m *PerspectiveMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PerspectiveMutation) AddedIDs

func (m *PerspectiveMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PerspectiveMutation) Annotations

func (m *PerspectiveMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*PerspectiveMutation) AnnotationsCleared

func (m *PerspectiveMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*PerspectiveMutation) AppendCostQueries

func (m *PerspectiveMutation) AppendCostQueries(tc []types.QueryCondition)

AppendCostQueries adds tc to the "cost_queries" field.

func (*PerspectiveMutation) AppendedCostQueries

func (m *PerspectiveMutation) AppendedCostQueries() ([]types.QueryCondition, bool)

AppendedCostQueries returns the list of values that were appended to the "cost_queries" field in this mutation.

func (*PerspectiveMutation) Builtin

func (m *PerspectiveMutation) Builtin() (r bool, exists bool)

Builtin returns the value of the "builtin" field in the mutation.

func (*PerspectiveMutation) ClearAnnotations

func (m *PerspectiveMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*PerspectiveMutation) ClearDescription

func (m *PerspectiveMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*PerspectiveMutation) ClearEdge

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) ClearField

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) ClearLabels

func (m *PerspectiveMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*PerspectiveMutation) ClearedEdges

func (m *PerspectiveMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PerspectiveMutation) ClearedFields

func (m *PerspectiveMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PerspectiveMutation) Client

func (m PerspectiveMutation) 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 (*PerspectiveMutation) CostQueries

func (m *PerspectiveMutation) CostQueries() (r []types.QueryCondition, exists bool)

CostQueries returns the value of the "cost_queries" field in the mutation.

func (*PerspectiveMutation) CreateTime

func (m *PerspectiveMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*PerspectiveMutation) Description

func (m *PerspectiveMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*PerspectiveMutation) DescriptionCleared

func (m *PerspectiveMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*PerspectiveMutation) EdgeCleared

func (m *PerspectiveMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PerspectiveMutation) EndTime

func (m *PerspectiveMutation) EndTime() (r string, exists bool)

EndTime returns the value of the "end_time" field in the mutation.

func (*PerspectiveMutation) ExecContext

func (c *PerspectiveMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PerspectiveMutation) Field

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) FieldCleared

func (m *PerspectiveMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PerspectiveMutation) Fields

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) ID

func (m *PerspectiveMutation) ID() (id object.ID, 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 (*PerspectiveMutation) IDs

func (m *PerspectiveMutation) IDs(ctx context.Context) ([]object.ID, 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 (*PerspectiveMutation) Labels

func (m *PerspectiveMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*PerspectiveMutation) LabelsCleared

func (m *PerspectiveMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*PerspectiveMutation) Name

func (m *PerspectiveMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PerspectiveMutation) OldAnnotations

func (m *PerspectiveMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) OldBuiltin

func (m *PerspectiveMutation) OldBuiltin(ctx context.Context) (v bool, err error)

OldBuiltin returns the old "builtin" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) OldCostQueries

func (m *PerspectiveMutation) OldCostQueries(ctx context.Context) (v []types.QueryCondition, err error)

OldCostQueries returns the old "cost_queries" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) OldCreateTime

func (m *PerspectiveMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) OldDescription

func (m *PerspectiveMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) OldEndTime

func (m *PerspectiveMutation) OldEndTime(ctx context.Context) (v string, err error)

OldEndTime returns the old "end_time" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) OldField

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) OldLabels

func (m *PerspectiveMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) OldName

func (m *PerspectiveMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) OldStartTime

func (m *PerspectiveMutation) OldStartTime(ctx context.Context) (v string, err error)

OldStartTime returns the old "start_time" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) OldUpdateTime

func (m *PerspectiveMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Perspective entity. If the Perspective 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 (*PerspectiveMutation) Op

func (m *PerspectiveMutation) Op() Op

Op returns the operation name.

func (*PerspectiveMutation) QueryContext

func (c *PerspectiveMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PerspectiveMutation) RemovedEdges

func (m *PerspectiveMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PerspectiveMutation) RemovedIDs

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) ResetAnnotations

func (m *PerspectiveMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*PerspectiveMutation) ResetBuiltin

func (m *PerspectiveMutation) ResetBuiltin()

ResetBuiltin resets all changes to the "builtin" field.

func (*PerspectiveMutation) ResetCostQueries

func (m *PerspectiveMutation) ResetCostQueries()

ResetCostQueries resets all changes to the "cost_queries" field.

func (*PerspectiveMutation) ResetCreateTime

func (m *PerspectiveMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*PerspectiveMutation) ResetDescription

func (m *PerspectiveMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*PerspectiveMutation) ResetEdge

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) ResetEndTime

func (m *PerspectiveMutation) ResetEndTime()

ResetEndTime resets all changes to the "end_time" field.

func (*PerspectiveMutation) ResetField

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) ResetLabels

func (m *PerspectiveMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*PerspectiveMutation) ResetName

func (m *PerspectiveMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PerspectiveMutation) ResetStartTime

func (m *PerspectiveMutation) ResetStartTime()

ResetStartTime resets all changes to the "start_time" field.

func (*PerspectiveMutation) ResetUpdateTime

func (m *PerspectiveMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*PerspectiveMutation) SetAnnotations

func (m *PerspectiveMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*PerspectiveMutation) SetBuiltin

func (m *PerspectiveMutation) SetBuiltin(b bool)

SetBuiltin sets the "builtin" field.

func (*PerspectiveMutation) SetCostQueries

func (m *PerspectiveMutation) SetCostQueries(tc []types.QueryCondition)

SetCostQueries sets the "cost_queries" field.

func (*PerspectiveMutation) SetCreateTime

func (m *PerspectiveMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*PerspectiveMutation) SetDescription

func (m *PerspectiveMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*PerspectiveMutation) SetEndTime

func (m *PerspectiveMutation) SetEndTime(s string)

SetEndTime sets the "end_time" field.

func (*PerspectiveMutation) SetField

func (m *PerspectiveMutation) 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 (*PerspectiveMutation) SetID

func (m *PerspectiveMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Perspective entities.

func (*PerspectiveMutation) SetLabels

func (m *PerspectiveMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*PerspectiveMutation) SetName

func (m *PerspectiveMutation) SetName(s string)

SetName sets the "name" field.

func (*PerspectiveMutation) SetOp

func (m *PerspectiveMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PerspectiveMutation) SetStartTime

func (m *PerspectiveMutation) SetStartTime(s string)

SetStartTime sets the "start_time" field.

func (*PerspectiveMutation) SetUpdateTime

func (m *PerspectiveMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*PerspectiveMutation) StartTime

func (m *PerspectiveMutation) StartTime() (r string, exists bool)

StartTime returns the value of the "start_time" field in the mutation.

func (PerspectiveMutation) Tx

func (m PerspectiveMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PerspectiveMutation) Type

func (m *PerspectiveMutation) Type() string

Type returns the node type of this mutation (Perspective).

func (*PerspectiveMutation) UpdateTime

func (m *PerspectiveMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*PerspectiveMutation) Where

func (m *PerspectiveMutation) Where(ps ...predicate.Perspective)

Where appends a list predicates to the PerspectiveMutation builder.

func (*PerspectiveMutation) WhereP

func (m *PerspectiveMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PerspectiveMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PerspectiveOutput

type PerspectiveOutput struct {
	ID          object.ID              `json:"id,omitempty"`
	Name        string                 `json:"name,omitempty"`
	Description string                 `json:"description,omitempty"`
	Labels      map[string]string      `json:"labels,omitempty"`
	CreateTime  *time.Time             `json:"createTime,omitempty"`
	UpdateTime  *time.Time             `json:"updateTime,omitempty"`
	StartTime   string                 `json:"startTime,omitempty"`
	EndTime     string                 `json:"endTime,omitempty"`
	Builtin     bool                   `json:"builtin,omitempty"`
	CostQueries []types.QueryCondition `json:"costQueries,omitempty"`
}

PerspectiveOutput holds the output of the Perspective entity.

func ExposePerspective

func ExposePerspective(_p *Perspective) *PerspectiveOutput

ExposePerspective converts the Perspective to PerspectiveOutput.

func ExposePerspectives

func ExposePerspectives(_ps []*Perspective) []*PerspectiveOutput

ExposePerspectives converts the Perspective slice to PerspectiveOutput pointer slice.

type PerspectivePatchInput added in v0.5.0

type PerspectivePatchInput struct {
	PerspectiveQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Start time for the perspective.
	StartTime string `path:"-" query:"-" json:"startTime,omitempty"`
	// End time for the perspective.
	EndTime string `path:"-" query:"-" json:"endTime,omitempty"`
	// Is builtin perspective.
	Builtin bool `path:"-" query:"-" json:"builtin,omitempty"`
	// Indicated the perspective included cost queries, record the used query condition.
	CostQueries []types.QueryCondition `path:"-" query:"-" json:"costQueries,omitempty"`
	// contains filtered or unexported fields
}

PerspectivePatchInput holds the patch input of the Perspective entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*PerspectivePatchInput) Model added in v0.5.0

func (ppi *PerspectivePatchInput) Model() *Perspective

Model returns the Perspective patched entity, after validating.

func (*PerspectivePatchInput) PatchModel added in v0.5.0

func (ppi *PerspectivePatchInput) PatchModel() *Perspective

PatchModel returns the Perspective partition entity for patching.

func (*PerspectivePatchInput) SetGinContext added in v0.5.0

func (ic *PerspectivePatchInput) SetGinContext(ctx *gin.Context)

func (*PerspectivePatchInput) SetModelClient added in v0.5.0

func (ic *PerspectivePatchInput) SetModelClient(cli *Client)

func (*PerspectivePatchInput) Validate added in v0.5.0

func (ppi *PerspectivePatchInput) Validate() error

Validate checks the PerspectivePatchInput entity.

func (*PerspectivePatchInput) ValidateWith added in v0.5.0

func (ppi *PerspectivePatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectivePatchInput entity with the given context and client set.

type PerspectiveQuery

type PerspectiveQuery struct {
	// contains filtered or unexported fields
}

PerspectiveQuery is the builder for querying Perspective entities.

func (*PerspectiveQuery) Aggregate

func (pq *PerspectiveQuery) Aggregate(fns ...AggregateFunc) *PerspectiveSelect

Aggregate returns a PerspectiveSelect configured with the given aggregations.

func (*PerspectiveQuery) All

func (pq *PerspectiveQuery) All(ctx context.Context) ([]*Perspective, error)

All executes the query and returns a list of Perspectives.

func (*PerspectiveQuery) AllX

func (pq *PerspectiveQuery) AllX(ctx context.Context) []*Perspective

AllX is like All, but panics if an error occurs.

func (*PerspectiveQuery) Clone

func (pq *PerspectiveQuery) Clone() *PerspectiveQuery

Clone returns a duplicate of the PerspectiveQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PerspectiveQuery) Count

func (pq *PerspectiveQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PerspectiveQuery) CountX

func (pq *PerspectiveQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PerspectiveQuery) ExecContext

func (c *PerspectiveQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PerspectiveQuery) Exist

func (pq *PerspectiveQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PerspectiveQuery) ExistX

func (pq *PerspectiveQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PerspectiveQuery) First

func (pq *PerspectiveQuery) First(ctx context.Context) (*Perspective, error)

First returns the first Perspective entity from the query. Returns a *NotFoundError when no Perspective was found.

func (*PerspectiveQuery) FirstID

func (pq *PerspectiveQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Perspective ID from the query. Returns a *NotFoundError when no Perspective ID was found.

func (*PerspectiveQuery) FirstIDX

func (pq *PerspectiveQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PerspectiveQuery) FirstX

func (pq *PerspectiveQuery) FirstX(ctx context.Context) *Perspective

FirstX is like First, but panics if an error occurs.

func (*PerspectiveQuery) ForShare

func (pq *PerspectiveQuery) ForShare(opts ...sql.LockOption) *PerspectiveQuery

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 (*PerspectiveQuery) ForUpdate

func (pq *PerspectiveQuery) ForUpdate(opts ...sql.LockOption) *PerspectiveQuery

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 (*PerspectiveQuery) GroupBy

func (pq *PerspectiveQuery) GroupBy(field string, fields ...string) *PerspectiveGroupBy

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.Perspective.Query().
	GroupBy(perspective.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*PerspectiveQuery) IDs

func (pq *PerspectiveQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Perspective IDs.

func (*PerspectiveQuery) IDsX

func (pq *PerspectiveQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*PerspectiveQuery) Limit

func (pq *PerspectiveQuery) Limit(limit int) *PerspectiveQuery

Limit the number of records to be returned by this query.

func (*PerspectiveQuery) Modify

func (pq *PerspectiveQuery) Modify(modifiers ...func(s *sql.Selector)) *PerspectiveSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*PerspectiveQuery) Offset

func (pq *PerspectiveQuery) Offset(offset int) *PerspectiveQuery

Offset to start from.

func (*PerspectiveQuery) Only

func (pq *PerspectiveQuery) Only(ctx context.Context) (*Perspective, error)

Only returns a single Perspective entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Perspective entity is found. Returns a *NotFoundError when no Perspective entities are found.

func (*PerspectiveQuery) OnlyID

func (pq *PerspectiveQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only Perspective ID in the query. Returns a *NotSingularError when more than one Perspective ID is found. Returns a *NotFoundError when no entities are found.

func (*PerspectiveQuery) OnlyIDX

func (pq *PerspectiveQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PerspectiveQuery) OnlyX

func (pq *PerspectiveQuery) OnlyX(ctx context.Context) *Perspective

OnlyX is like Only, but panics if an error occurs.

func (*PerspectiveQuery) Order

Order specifies how the records should be ordered.

func (*PerspectiveQuery) QueryContext

func (c *PerspectiveQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PerspectiveQuery) Select

func (pq *PerspectiveQuery) Select(fields ...string) *PerspectiveSelect

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.Perspective.Query().
	Select(perspective.FieldName).
	Scan(ctx, &v)

func (*PerspectiveQuery) Unique

func (pq *PerspectiveQuery) Unique(unique bool) *PerspectiveQuery

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 (*PerspectiveQuery) Where

Where adds a new predicate for the PerspectiveQuery builder.

func (*PerspectiveQuery) WhereP

func (pq *PerspectiveQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PerspectiveQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PerspectiveQueryInput

type PerspectiveQueryInput struct {

	// Refer holds the route path reference of the Perspective entity.
	Refer *object.Refer `path:"perspective,default=" query:"-" json:"-"`
	// ID of the Perspective entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Perspective entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

PerspectiveQueryInput holds the query input of the Perspective entity, please tags with `path:",inline"` if embedding.

func (*PerspectiveQueryInput) Model

func (pqi *PerspectiveQueryInput) Model() *Perspective

Model returns the Perspective entity for querying, after validating.

func (*PerspectiveQueryInput) SetGinContext

func (ic *PerspectiveQueryInput) SetGinContext(ctx *gin.Context)

func (*PerspectiveQueryInput) SetModelClient

func (ic *PerspectiveQueryInput) SetModelClient(cli *Client)

func (*PerspectiveQueryInput) Validate

func (pqi *PerspectiveQueryInput) Validate() error

Validate checks the PerspectiveQueryInput entity.

func (*PerspectiveQueryInput) ValidateWith

func (pqi *PerspectiveQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectiveQueryInput entity with the given context and client set.

type PerspectiveQueryInputs

type PerspectiveQueryInputs struct {
	// contains filtered or unexported fields
}

PerspectiveQueryInputs holds the query input of the Perspective entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*PerspectiveQueryInputs) SetGinContext

func (ic *PerspectiveQueryInputs) SetGinContext(ctx *gin.Context)

func (*PerspectiveQueryInputs) SetModelClient

func (ic *PerspectiveQueryInputs) SetModelClient(cli *Client)

func (*PerspectiveQueryInputs) Validate

func (pqi *PerspectiveQueryInputs) Validate() error

Validate checks the PerspectiveQueryInputs entity.

func (*PerspectiveQueryInputs) ValidateWith

func (pqi *PerspectiveQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectiveQueryInputs entity with the given context and client set.

type PerspectiveSelect

type PerspectiveSelect struct {
	*PerspectiveQuery
	// contains filtered or unexported fields
}

PerspectiveSelect is the builder for selecting fields of Perspective entities.

func (*PerspectiveSelect) Aggregate

func (ps *PerspectiveSelect) Aggregate(fns ...AggregateFunc) *PerspectiveSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PerspectiveSelect) Bool

func (s *PerspectiveSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PerspectiveSelect) BoolX

func (s *PerspectiveSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PerspectiveSelect) Bools

func (s *PerspectiveSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PerspectiveSelect) BoolsX

func (s *PerspectiveSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (PerspectiveSelect) ExecContext

func (c PerspectiveSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PerspectiveSelect) Float64

func (s *PerspectiveSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PerspectiveSelect) Float64X

func (s *PerspectiveSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PerspectiveSelect) Float64s

func (s *PerspectiveSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PerspectiveSelect) Float64sX

func (s *PerspectiveSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PerspectiveSelect) Int

func (s *PerspectiveSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PerspectiveSelect) IntX

func (s *PerspectiveSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PerspectiveSelect) Ints

func (s *PerspectiveSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PerspectiveSelect) IntsX

func (s *PerspectiveSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PerspectiveSelect) Modify

func (ps *PerspectiveSelect) Modify(modifiers ...func(s *sql.Selector)) *PerspectiveSelect

Modify adds a query modifier for attaching custom logic to queries.

func (PerspectiveSelect) QueryContext

func (c PerspectiveSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PerspectiveSelect) Scan

func (ps *PerspectiveSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PerspectiveSelect) ScanX

func (s *PerspectiveSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PerspectiveSelect) String

func (s *PerspectiveSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PerspectiveSelect) StringX

func (s *PerspectiveSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PerspectiveSelect) Strings

func (s *PerspectiveSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PerspectiveSelect) StringsX

func (s *PerspectiveSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PerspectiveUpdate

type PerspectiveUpdate struct {
	// contains filtered or unexported fields
}

PerspectiveUpdate is the builder for updating Perspective entities.

func (*PerspectiveUpdate) AppendCostQueries

func (pu *PerspectiveUpdate) AppendCostQueries(tc []types.QueryCondition) *PerspectiveUpdate

AppendCostQueries appends tc to the "cost_queries" field.

func (*PerspectiveUpdate) ClearAnnotations

func (pu *PerspectiveUpdate) ClearAnnotations() *PerspectiveUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*PerspectiveUpdate) ClearDescription

func (pu *PerspectiveUpdate) ClearDescription() *PerspectiveUpdate

ClearDescription clears the value of the "description" field.

func (*PerspectiveUpdate) ClearLabels

func (pu *PerspectiveUpdate) ClearLabels() *PerspectiveUpdate

ClearLabels clears the value of the "labels" field.

func (*PerspectiveUpdate) Exec

func (pu *PerspectiveUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PerspectiveUpdate) ExecContext

func (c *PerspectiveUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PerspectiveUpdate) ExecX

func (pu *PerspectiveUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PerspectiveUpdate) Modify

func (pu *PerspectiveUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PerspectiveUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*PerspectiveUpdate) Mutation

func (pu *PerspectiveUpdate) Mutation() *PerspectiveMutation

Mutation returns the PerspectiveMutation object of the builder.

func (*PerspectiveUpdate) QueryContext

func (c *PerspectiveUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PerspectiveUpdate) Save

func (pu *PerspectiveUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PerspectiveUpdate) SaveX

func (pu *PerspectiveUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PerspectiveUpdate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*PerspectiveUpdate) SetAnnotations

func (pu *PerspectiveUpdate) SetAnnotations(m map[string]string) *PerspectiveUpdate

SetAnnotations sets the "annotations" field.

func (*PerspectiveUpdate) SetBuiltin

func (pu *PerspectiveUpdate) SetBuiltin(b bool) *PerspectiveUpdate

SetBuiltin sets the "builtin" field.

func (*PerspectiveUpdate) SetCostQueries

func (pu *PerspectiveUpdate) SetCostQueries(tc []types.QueryCondition) *PerspectiveUpdate

SetCostQueries sets the "cost_queries" field.

func (*PerspectiveUpdate) SetDescription

func (pu *PerspectiveUpdate) SetDescription(s string) *PerspectiveUpdate

SetDescription sets the "description" field.

func (*PerspectiveUpdate) SetEndTime

func (pu *PerspectiveUpdate) SetEndTime(s string) *PerspectiveUpdate

SetEndTime sets the "end_time" field.

func (*PerspectiveUpdate) SetLabels

func (pu *PerspectiveUpdate) SetLabels(m map[string]string) *PerspectiveUpdate

SetLabels sets the "labels" field.

func (*PerspectiveUpdate) SetNillableBuiltin

func (pu *PerspectiveUpdate) SetNillableBuiltin(b *bool) *PerspectiveUpdate

SetNillableBuiltin sets the "builtin" field if the given value is not nil.

func (*PerspectiveUpdate) SetNillableDescription

func (pu *PerspectiveUpdate) SetNillableDescription(s *string) *PerspectiveUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*PerspectiveUpdate) SetNillableEndTime added in v0.5.0

func (pu *PerspectiveUpdate) SetNillableEndTime(s *string) *PerspectiveUpdate

SetNillableEndTime sets the "end_time" field if the given value is not nil.

func (*PerspectiveUpdate) SetNillableStartTime added in v0.5.0

func (pu *PerspectiveUpdate) SetNillableStartTime(s *string) *PerspectiveUpdate

SetNillableStartTime sets the "start_time" field if the given value is not nil.

func (*PerspectiveUpdate) SetStartTime

func (pu *PerspectiveUpdate) SetStartTime(s string) *PerspectiveUpdate

SetStartTime sets the "start_time" field.

func (*PerspectiveUpdate) SetUpdateTime

func (pu *PerspectiveUpdate) SetUpdateTime(t time.Time) *PerspectiveUpdate

SetUpdateTime sets the "update_time" field.

func (*PerspectiveUpdate) Where

Where appends a list predicates to the PerspectiveUpdate builder.

type PerspectiveUpdateInput

type PerspectiveUpdateInput struct {
	PerspectiveQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Start time for the perspective.
	StartTime string `path:"-" query:"-" json:"startTime,omitempty"`
	// End time for the perspective.
	EndTime string `path:"-" query:"-" json:"endTime,omitempty"`
	// Is builtin perspective.
	Builtin bool `path:"-" query:"-" json:"builtin,omitempty"`
	// Indicated the perspective included cost queries, record the used query condition.
	CostQueries []types.QueryCondition `path:"-" query:"-" json:"costQueries,omitempty"`
}

PerspectiveUpdateInput holds the modification input of the Perspective entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*PerspectiveUpdateInput) Model

func (pui *PerspectiveUpdateInput) Model() *Perspective

Model returns the Perspective entity for modifying, after validating.

func (*PerspectiveUpdateInput) SetGinContext

func (ic *PerspectiveUpdateInput) SetGinContext(ctx *gin.Context)

func (*PerspectiveUpdateInput) SetModelClient

func (ic *PerspectiveUpdateInput) SetModelClient(cli *Client)

func (*PerspectiveUpdateInput) Validate

func (pui *PerspectiveUpdateInput) Validate() error

Validate checks the PerspectiveUpdateInput entity.

func (*PerspectiveUpdateInput) ValidateWith

func (pui *PerspectiveUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectiveUpdateInput entity with the given context and client set.

type PerspectiveUpdateInputs

type PerspectiveUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*PerspectiveUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

PerspectiveUpdateInputs holds the modification input of the Perspective entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*PerspectiveUpdateInputs) IDs

func (pui *PerspectiveUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Perspective entities for modifying, after validating.

func (*PerspectiveUpdateInputs) Model

func (pui *PerspectiveUpdateInputs) Model() []*Perspective

Model returns the Perspective entities for modifying, after validating.

func (*PerspectiveUpdateInputs) SetGinContext

func (ic *PerspectiveUpdateInputs) SetGinContext(ctx *gin.Context)

func (*PerspectiveUpdateInputs) SetModelClient

func (ic *PerspectiveUpdateInputs) SetModelClient(cli *Client)

func (*PerspectiveUpdateInputs) Validate

func (pui *PerspectiveUpdateInputs) Validate() error

Validate checks the PerspectiveUpdateInputs entity.

func (*PerspectiveUpdateInputs) ValidateWith

func (pui *PerspectiveUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectiveUpdateInputs entity with the given context and client set.

type PerspectiveUpdateInputsItem

type PerspectiveUpdateInputsItem struct {
	// ID of the Perspective entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Perspective entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Start time for the perspective.
	StartTime string `path:"-" query:"-" json:"startTime"`
	// End time for the perspective.
	EndTime string `path:"-" query:"-" json:"endTime"`
	// Is builtin perspective.
	Builtin bool `path:"-" query:"-" json:"builtin"`
	// Indicated the perspective included cost queries, record the used query condition.
	CostQueries []types.QueryCondition `path:"-" query:"-" json:"costQueries"`
}

PerspectiveUpdateInputs holds the modification input item of the Perspective entities.

func (*PerspectiveUpdateInputsItem) ValidateWith

func (pui *PerspectiveUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the PerspectiveUpdateInputsItem entity with the given context and client set.

type PerspectiveUpdateOne

type PerspectiveUpdateOne struct {
	// contains filtered or unexported fields
}

PerspectiveUpdateOne is the builder for updating a single Perspective entity.

func (*PerspectiveUpdateOne) AppendCostQueries

func (puo *PerspectiveUpdateOne) AppendCostQueries(tc []types.QueryCondition) *PerspectiveUpdateOne

AppendCostQueries appends tc to the "cost_queries" field.

func (*PerspectiveUpdateOne) ClearAnnotations

func (puo *PerspectiveUpdateOne) ClearAnnotations() *PerspectiveUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*PerspectiveUpdateOne) ClearDescription

func (puo *PerspectiveUpdateOne) ClearDescription() *PerspectiveUpdateOne

ClearDescription clears the value of the "description" field.

func (*PerspectiveUpdateOne) ClearLabels

func (puo *PerspectiveUpdateOne) ClearLabels() *PerspectiveUpdateOne

ClearLabels clears the value of the "labels" field.

func (*PerspectiveUpdateOne) Exec

func (puo *PerspectiveUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PerspectiveUpdateOne) ExecContext

func (c *PerspectiveUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PerspectiveUpdateOne) ExecE

func (puo *PerspectiveUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Perspective) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*PerspectiveUpdateOne) ExecEX

func (puo *PerspectiveUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Perspective) error)

ExecX is like Exec, but panics if an error occurs.

func (*PerspectiveUpdateOne) ExecX

func (puo *PerspectiveUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PerspectiveUpdateOne) Modify

func (puo *PerspectiveUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PerspectiveUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*PerspectiveUpdateOne) Mutation

func (puo *PerspectiveUpdateOne) Mutation() *PerspectiveMutation

Mutation returns the PerspectiveMutation object of the builder.

func (*PerspectiveUpdateOne) QueryContext

func (c *PerspectiveUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PerspectiveUpdateOne) Save

Save executes the query and returns the updated Perspective entity.

func (*PerspectiveUpdateOne) SaveE

func (puo *PerspectiveUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Perspective) error) (*Perspective, error)

SaveE calls the given function after updated the Perspective entity, which is always good for cascading update operations.

func (*PerspectiveUpdateOne) SaveEX

func (puo *PerspectiveUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Perspective) error) *Perspective

SaveEX is like SaveE, but panics if an error occurs.

func (*PerspectiveUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PerspectiveUpdateOne) Select

func (puo *PerspectiveUpdateOne) Select(field string, fields ...string) *PerspectiveUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PerspectiveUpdateOne) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*PerspectiveUpdateOne) SetAnnotations

func (puo *PerspectiveUpdateOne) SetAnnotations(m map[string]string) *PerspectiveUpdateOne

SetAnnotations sets the "annotations" field.

func (*PerspectiveUpdateOne) SetBuiltin

func (puo *PerspectiveUpdateOne) SetBuiltin(b bool) *PerspectiveUpdateOne

SetBuiltin sets the "builtin" field.

func (*PerspectiveUpdateOne) SetCostQueries

SetCostQueries sets the "cost_queries" field.

func (*PerspectiveUpdateOne) SetDescription

func (puo *PerspectiveUpdateOne) SetDescription(s string) *PerspectiveUpdateOne

SetDescription sets the "description" field.

func (*PerspectiveUpdateOne) SetEndTime

func (puo *PerspectiveUpdateOne) SetEndTime(s string) *PerspectiveUpdateOne

SetEndTime sets the "end_time" field.

func (*PerspectiveUpdateOne) SetLabels

func (puo *PerspectiveUpdateOne) SetLabels(m map[string]string) *PerspectiveUpdateOne

SetLabels sets the "labels" field.

func (*PerspectiveUpdateOne) SetNillableBuiltin

func (puo *PerspectiveUpdateOne) SetNillableBuiltin(b *bool) *PerspectiveUpdateOne

SetNillableBuiltin sets the "builtin" field if the given value is not nil.

func (*PerspectiveUpdateOne) SetNillableDescription

func (puo *PerspectiveUpdateOne) SetNillableDescription(s *string) *PerspectiveUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*PerspectiveUpdateOne) SetNillableEndTime added in v0.5.0

func (puo *PerspectiveUpdateOne) SetNillableEndTime(s *string) *PerspectiveUpdateOne

SetNillableEndTime sets the "end_time" field if the given value is not nil.

func (*PerspectiveUpdateOne) SetNillableStartTime added in v0.5.0

func (puo *PerspectiveUpdateOne) SetNillableStartTime(s *string) *PerspectiveUpdateOne

SetNillableStartTime sets the "start_time" field if the given value is not nil.

func (*PerspectiveUpdateOne) SetStartTime

func (puo *PerspectiveUpdateOne) SetStartTime(s string) *PerspectiveUpdateOne

SetStartTime sets the "start_time" field.

func (*PerspectiveUpdateOne) SetUpdateTime

func (puo *PerspectiveUpdateOne) SetUpdateTime(t time.Time) *PerspectiveUpdateOne

SetUpdateTime sets the "update_time" field.

func (*PerspectiveUpdateOne) Where

Where appends a list predicates to the PerspectiveUpdate builder.

type PerspectiveUpsert

type PerspectiveUpsert struct {
	*sql.UpdateSet
}

PerspectiveUpsert is the "OnConflict" setter.

func (*PerspectiveUpsert) ClearAnnotations

func (u *PerspectiveUpsert) ClearAnnotations() *PerspectiveUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*PerspectiveUpsert) ClearDescription

func (u *PerspectiveUpsert) ClearDescription() *PerspectiveUpsert

ClearDescription clears the value of the "description" field.

func (*PerspectiveUpsert) ClearLabels

func (u *PerspectiveUpsert) ClearLabels() *PerspectiveUpsert

ClearLabels clears the value of the "labels" field.

func (*PerspectiveUpsert) SetAnnotations

func (u *PerspectiveUpsert) SetAnnotations(v map[string]string) *PerspectiveUpsert

SetAnnotations sets the "annotations" field.

func (*PerspectiveUpsert) SetBuiltin

func (u *PerspectiveUpsert) SetBuiltin(v bool) *PerspectiveUpsert

SetBuiltin sets the "builtin" field.

func (*PerspectiveUpsert) SetCostQueries

func (u *PerspectiveUpsert) SetCostQueries(v []types.QueryCondition) *PerspectiveUpsert

SetCostQueries sets the "cost_queries" field.

func (*PerspectiveUpsert) SetDescription

func (u *PerspectiveUpsert) SetDescription(v string) *PerspectiveUpsert

SetDescription sets the "description" field.

func (*PerspectiveUpsert) SetEndTime

func (u *PerspectiveUpsert) SetEndTime(v string) *PerspectiveUpsert

SetEndTime sets the "end_time" field.

func (*PerspectiveUpsert) SetLabels

func (u *PerspectiveUpsert) SetLabels(v map[string]string) *PerspectiveUpsert

SetLabels sets the "labels" field.

func (*PerspectiveUpsert) SetStartTime

func (u *PerspectiveUpsert) SetStartTime(v string) *PerspectiveUpsert

SetStartTime sets the "start_time" field.

func (*PerspectiveUpsert) SetUpdateTime

func (u *PerspectiveUpsert) SetUpdateTime(v time.Time) *PerspectiveUpsert

SetUpdateTime sets the "update_time" field.

func (*PerspectiveUpsert) UpdateAnnotations

func (u *PerspectiveUpsert) UpdateAnnotations() *PerspectiveUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*PerspectiveUpsert) UpdateBuiltin

func (u *PerspectiveUpsert) UpdateBuiltin() *PerspectiveUpsert

UpdateBuiltin sets the "builtin" field to the value that was provided on create.

func (*PerspectiveUpsert) UpdateCostQueries

func (u *PerspectiveUpsert) UpdateCostQueries() *PerspectiveUpsert

UpdateCostQueries sets the "cost_queries" field to the value that was provided on create.

func (*PerspectiveUpsert) UpdateDescription

func (u *PerspectiveUpsert) UpdateDescription() *PerspectiveUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*PerspectiveUpsert) UpdateEndTime

func (u *PerspectiveUpsert) UpdateEndTime() *PerspectiveUpsert

UpdateEndTime sets the "end_time" field to the value that was provided on create.

func (*PerspectiveUpsert) UpdateLabels

func (u *PerspectiveUpsert) UpdateLabels() *PerspectiveUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*PerspectiveUpsert) UpdateStartTime

func (u *PerspectiveUpsert) UpdateStartTime() *PerspectiveUpsert

UpdateStartTime sets the "start_time" field to the value that was provided on create.

func (*PerspectiveUpsert) UpdateUpdateTime

func (u *PerspectiveUpsert) UpdateUpdateTime() *PerspectiveUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type PerspectiveUpsertBulk

type PerspectiveUpsertBulk struct {
	// contains filtered or unexported fields
}

PerspectiveUpsertBulk is the builder for "upsert"-ing a bulk of Perspective nodes.

func (*PerspectiveUpsertBulk) ClearAnnotations

func (u *PerspectiveUpsertBulk) ClearAnnotations() *PerspectiveUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*PerspectiveUpsertBulk) ClearDescription

func (u *PerspectiveUpsertBulk) ClearDescription() *PerspectiveUpsertBulk

ClearDescription clears the value of the "description" field.

func (*PerspectiveUpsertBulk) ClearLabels

func (u *PerspectiveUpsertBulk) ClearLabels() *PerspectiveUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*PerspectiveUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PerspectiveUpsertBulk) Exec

Exec executes the query.

func (*PerspectiveUpsertBulk) ExecE

func (u *PerspectiveUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Perspective) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*PerspectiveUpsertBulk) ExecEX

func (u *PerspectiveUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Perspective) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*PerspectiveUpsertBulk) ExecX

func (u *PerspectiveUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PerspectiveUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Perspective.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PerspectiveUpsertBulk) SetAnnotations

func (u *PerspectiveUpsertBulk) SetAnnotations(v map[string]string) *PerspectiveUpsertBulk

SetAnnotations sets the "annotations" field.

func (*PerspectiveUpsertBulk) SetBuiltin

SetBuiltin sets the "builtin" field.

func (*PerspectiveUpsertBulk) SetCostQueries

SetCostQueries sets the "cost_queries" field.

func (*PerspectiveUpsertBulk) SetDescription

func (u *PerspectiveUpsertBulk) SetDescription(v string) *PerspectiveUpsertBulk

SetDescription sets the "description" field.

func (*PerspectiveUpsertBulk) SetEndTime

SetEndTime sets the "end_time" field.

func (*PerspectiveUpsertBulk) SetLabels

SetLabels sets the "labels" field.

func (*PerspectiveUpsertBulk) SetStartTime

SetStartTime sets the "start_time" field.

func (*PerspectiveUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*PerspectiveUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the PerspectiveCreateBulk.OnConflict documentation for more info.

func (*PerspectiveUpsertBulk) UpdateAnnotations

func (u *PerspectiveUpsertBulk) UpdateAnnotations() *PerspectiveUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*PerspectiveUpsertBulk) UpdateBuiltin

func (u *PerspectiveUpsertBulk) UpdateBuiltin() *PerspectiveUpsertBulk

UpdateBuiltin sets the "builtin" field to the value that was provided on create.

func (*PerspectiveUpsertBulk) UpdateCostQueries

func (u *PerspectiveUpsertBulk) UpdateCostQueries() *PerspectiveUpsertBulk

UpdateCostQueries sets the "cost_queries" field to the value that was provided on create.

func (*PerspectiveUpsertBulk) UpdateDescription

func (u *PerspectiveUpsertBulk) UpdateDescription() *PerspectiveUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*PerspectiveUpsertBulk) UpdateEndTime

func (u *PerspectiveUpsertBulk) UpdateEndTime() *PerspectiveUpsertBulk

UpdateEndTime sets the "end_time" field to the value that was provided on create.

func (*PerspectiveUpsertBulk) UpdateLabels

func (u *PerspectiveUpsertBulk) UpdateLabels() *PerspectiveUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*PerspectiveUpsertBulk) UpdateNewValues

func (u *PerspectiveUpsertBulk) UpdateNewValues() *PerspectiveUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Perspective.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(perspective.FieldID)
		}),
	).
	Exec(ctx)

func (*PerspectiveUpsertBulk) UpdateStartTime

func (u *PerspectiveUpsertBulk) UpdateStartTime() *PerspectiveUpsertBulk

UpdateStartTime sets the "start_time" field to the value that was provided on create.

func (*PerspectiveUpsertBulk) UpdateUpdateTime

func (u *PerspectiveUpsertBulk) UpdateUpdateTime() *PerspectiveUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type PerspectiveUpsertOne

type PerspectiveUpsertOne struct {
	// contains filtered or unexported fields
}

PerspectiveUpsertOne is the builder for "upsert"-ing

one Perspective node.

func (*PerspectiveUpsertOne) ClearAnnotations

func (u *PerspectiveUpsertOne) ClearAnnotations() *PerspectiveUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*PerspectiveUpsertOne) ClearDescription

func (u *PerspectiveUpsertOne) ClearDescription() *PerspectiveUpsertOne

ClearDescription clears the value of the "description" field.

func (*PerspectiveUpsertOne) ClearLabels

func (u *PerspectiveUpsertOne) ClearLabels() *PerspectiveUpsertOne

ClearLabels clears the value of the "labels" field.

func (*PerspectiveUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PerspectiveUpsertOne) Exec

Exec executes the query.

func (*PerspectiveUpsertOne) ExecE

func (u *PerspectiveUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Perspective) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*PerspectiveUpsertOne) ExecEX

func (u *PerspectiveUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Perspective) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*PerspectiveUpsertOne) ExecX

func (u *PerspectiveUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PerspectiveUpsertOne) ID

func (u *PerspectiveUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PerspectiveUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*PerspectiveUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Perspective.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PerspectiveUpsertOne) SetAnnotations

func (u *PerspectiveUpsertOne) SetAnnotations(v map[string]string) *PerspectiveUpsertOne

SetAnnotations sets the "annotations" field.

func (*PerspectiveUpsertOne) SetBuiltin

SetBuiltin sets the "builtin" field.

func (*PerspectiveUpsertOne) SetCostQueries

SetCostQueries sets the "cost_queries" field.

func (*PerspectiveUpsertOne) SetDescription

func (u *PerspectiveUpsertOne) SetDescription(v string) *PerspectiveUpsertOne

SetDescription sets the "description" field.

func (*PerspectiveUpsertOne) SetEndTime

SetEndTime sets the "end_time" field.

func (*PerspectiveUpsertOne) SetLabels

SetLabels sets the "labels" field.

func (*PerspectiveUpsertOne) SetStartTime

func (u *PerspectiveUpsertOne) SetStartTime(v string) *PerspectiveUpsertOne

SetStartTime sets the "start_time" field.

func (*PerspectiveUpsertOne) SetUpdateTime

func (u *PerspectiveUpsertOne) SetUpdateTime(v time.Time) *PerspectiveUpsertOne

SetUpdateTime sets the "update_time" field.

func (*PerspectiveUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the PerspectiveCreate.OnConflict documentation for more info.

func (*PerspectiveUpsertOne) UpdateAnnotations

func (u *PerspectiveUpsertOne) UpdateAnnotations() *PerspectiveUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*PerspectiveUpsertOne) UpdateBuiltin

func (u *PerspectiveUpsertOne) UpdateBuiltin() *PerspectiveUpsertOne

UpdateBuiltin sets the "builtin" field to the value that was provided on create.

func (*PerspectiveUpsertOne) UpdateCostQueries

func (u *PerspectiveUpsertOne) UpdateCostQueries() *PerspectiveUpsertOne

UpdateCostQueries sets the "cost_queries" field to the value that was provided on create.

func (*PerspectiveUpsertOne) UpdateDescription

func (u *PerspectiveUpsertOne) UpdateDescription() *PerspectiveUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*PerspectiveUpsertOne) UpdateEndTime

func (u *PerspectiveUpsertOne) UpdateEndTime() *PerspectiveUpsertOne

UpdateEndTime sets the "end_time" field to the value that was provided on create.

func (*PerspectiveUpsertOne) UpdateLabels

func (u *PerspectiveUpsertOne) UpdateLabels() *PerspectiveUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*PerspectiveUpsertOne) UpdateNewValues

func (u *PerspectiveUpsertOne) UpdateNewValues() *PerspectiveUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Perspective.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(perspective.FieldID)
		}),
	).
	Exec(ctx)

func (*PerspectiveUpsertOne) UpdateStartTime

func (u *PerspectiveUpsertOne) UpdateStartTime() *PerspectiveUpsertOne

UpdateStartTime sets the "start_time" field to the value that was provided on create.

func (*PerspectiveUpsertOne) UpdateUpdateTime

func (u *PerspectiveUpsertOne) UpdateUpdateTime() *PerspectiveUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Perspectives

type Perspectives []*Perspective

Perspectives is a parsable slice of Perspective.

func (Perspectives) View

func (_ps Perspectives) View() []*PerspectiveOutput

View returns the output of Perspective entities.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Project

type Project struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProjectQuery when eager-loading is set.
	Edges ProjectEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

Project is the model entity for the Project schema.

func (*Project) ExecContext

func (c *Project) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Project) QueryCatalogs added in v0.4.0

func (pr *Project) QueryCatalogs() *CatalogQuery

QueryCatalogs queries the "catalogs" edge of the Project entity.

func (*Project) QueryConnectors

func (pr *Project) QueryConnectors() *ConnectorQuery

QueryConnectors queries the "connectors" edge of the Project entity.

func (*Project) QueryContext

func (c *Project) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Project) QueryEnvironments

func (pr *Project) QueryEnvironments() *EnvironmentQuery

QueryEnvironments queries the "environments" edge of the Project entity.

func (*Project) QueryResourceComponents added in v0.4.0

func (pr *Project) QueryResourceComponents() *ResourceComponentQuery

QueryResourceComponents queries the "resource_components" edge of the Project entity.

func (*Project) QueryResourceRuns added in v0.6.0

func (pr *Project) QueryResourceRuns() *ResourceRunQuery

QueryResourceRuns queries the "resource_runs" edge of the Project entity.

func (*Project) QueryResources added in v0.4.0

func (pr *Project) QueryResources() *ResourceQuery

QueryResources queries the "resources" edge of the Project entity.

func (*Project) QuerySubjectRoles

func (pr *Project) QuerySubjectRoles() *SubjectRoleRelationshipQuery

QuerySubjectRoles queries the "subject_roles" edge of the Project entity.

func (*Project) QueryTemplateVersions added in v0.4.0

func (pr *Project) QueryTemplateVersions() *TemplateVersionQuery

QueryTemplateVersions queries the "template_versions" edge of the Project entity.

func (*Project) QueryTemplates added in v0.4.0

func (pr *Project) QueryTemplates() *TemplateQuery

QueryTemplates queries the "templates" edge of the Project entity.

func (*Project) QueryVariables

func (pr *Project) QueryVariables() *VariableQuery

QueryVariables queries the "variables" edge of the Project entity.

func (*Project) QueryWorkflowExecutions added in v0.4.0

func (pr *Project) QueryWorkflowExecutions() *WorkflowExecutionQuery

QueryWorkflowExecutions queries the "workflow_executions" edge of the Project entity.

func (*Project) QueryWorkflowStageExecutions added in v0.4.0

func (pr *Project) QueryWorkflowStageExecutions() *WorkflowStageExecutionQuery

QueryWorkflowStageExecutions queries the "workflow_stage_executions" edge of the Project entity.

func (*Project) QueryWorkflowStages added in v0.4.0

func (pr *Project) QueryWorkflowStages() *WorkflowStageQuery

QueryWorkflowStages queries the "workflow_stages" edge of the Project entity.

func (*Project) QueryWorkflowStepExecutions added in v0.4.0

func (pr *Project) QueryWorkflowStepExecutions() *WorkflowStepExecutionQuery

QueryWorkflowStepExecutions queries the "workflow_step_executions" edge of the Project entity.

func (*Project) QueryWorkflowSteps added in v0.4.0

func (pr *Project) QueryWorkflowSteps() *WorkflowStepQuery

QueryWorkflowSteps queries the "workflow_steps" edge of the Project entity.

func (*Project) QueryWorkflows added in v0.4.0

func (pr *Project) QueryWorkflows() *WorkflowQuery

QueryWorkflows queries the "workflows" edge of the Project entity.

func (*Project) String

func (pr *Project) String() string

String implements the fmt.Stringer.

func (*Project) Unwrap

func (pr *Project) Unwrap() *Project

Unwrap unwraps the Project 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 (*Project) Update

func (pr *Project) Update() *ProjectUpdateOne

Update returns a builder for updating this Project. Note that you need to call Project.Unwrap() before calling this method if this Project was returned from a transaction, and the transaction was committed or rolled back.

func (*Project) Value

func (pr *Project) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Project. This includes values selected through modifiers, order, etc.

func (*Project) View

func (_p *Project) View() *ProjectOutput

View returns the output of Project entity.

type ProjectClient

type ProjectClient struct {
	// contains filtered or unexported fields
}

ProjectClient is a client for the Project schema.

func NewProjectClient

func NewProjectClient(c config) *ProjectClient

NewProjectClient returns a client for the Project from the given config.

func (*ProjectClient) Create

func (c *ProjectClient) Create() *ProjectCreate

Create returns a builder for creating a Project entity.

func (*ProjectClient) CreateBulk

func (c *ProjectClient) CreateBulk(builders ...*ProjectCreate) *ProjectCreateBulk

CreateBulk returns a builder for creating a bulk of Project entities.

func (*ProjectClient) Delete

func (c *ProjectClient) Delete() *ProjectDelete

Delete returns a delete builder for Project.

func (*ProjectClient) DeleteOne

func (c *ProjectClient) DeleteOne(pr *Project) *ProjectDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProjectClient) DeleteOneID

func (c *ProjectClient) DeleteOneID(id object.ID) *ProjectDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProjectClient) ExecContext

func (c *ProjectClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProjectClient) Get

func (c *ProjectClient) Get(ctx context.Context, id object.ID) (*Project, error)

Get returns a Project entity by its id.

func (*ProjectClient) GetX

func (c *ProjectClient) GetX(ctx context.Context, id object.ID) *Project

GetX is like Get, but panics if an error occurs.

func (*ProjectClient) Hooks

func (c *ProjectClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProjectClient) Intercept

func (c *ProjectClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `project.Intercept(f(g(h())))`.

func (*ProjectClient) Interceptors

func (c *ProjectClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProjectClient) MapCreateBulk added in v0.5.0

func (c *ProjectClient) MapCreateBulk(slice any, setFunc func(*ProjectCreate, int)) *ProjectCreateBulk

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 (*ProjectClient) Query

func (c *ProjectClient) Query() *ProjectQuery

Query returns a query builder for Project.

func (*ProjectClient) QueryCatalogs added in v0.4.0

func (c *ProjectClient) QueryCatalogs(pr *Project) *CatalogQuery

QueryCatalogs queries the catalogs edge of a Project.

func (*ProjectClient) QueryConnectors

func (c *ProjectClient) QueryConnectors(pr *Project) *ConnectorQuery

QueryConnectors queries the connectors edge of a Project.

func (*ProjectClient) QueryContext

func (c *ProjectClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProjectClient) QueryEnvironments

func (c *ProjectClient) QueryEnvironments(pr *Project) *EnvironmentQuery

QueryEnvironments queries the environments edge of a Project.

func (*ProjectClient) QueryResourceComponents added in v0.4.0

func (c *ProjectClient) QueryResourceComponents(pr *Project) *ResourceComponentQuery

QueryResourceComponents queries the resource_components edge of a Project.

func (*ProjectClient) QueryResourceRuns added in v0.6.0

func (c *ProjectClient) QueryResourceRuns(pr *Project) *ResourceRunQuery

QueryResourceRuns queries the resource_runs edge of a Project.

func (*ProjectClient) QueryResources added in v0.4.0

func (c *ProjectClient) QueryResources(pr *Project) *ResourceQuery

QueryResources queries the resources edge of a Project.

func (*ProjectClient) QuerySubjectRoles

func (c *ProjectClient) QuerySubjectRoles(pr *Project) *SubjectRoleRelationshipQuery

QuerySubjectRoles queries the subject_roles edge of a Project.

func (*ProjectClient) QueryTemplateVersions added in v0.4.0

func (c *ProjectClient) QueryTemplateVersions(pr *Project) *TemplateVersionQuery

QueryTemplateVersions queries the template_versions edge of a Project.

func (*ProjectClient) QueryTemplates added in v0.4.0

func (c *ProjectClient) QueryTemplates(pr *Project) *TemplateQuery

QueryTemplates queries the templates edge of a Project.

func (*ProjectClient) QueryVariables

func (c *ProjectClient) QueryVariables(pr *Project) *VariableQuery

QueryVariables queries the variables edge of a Project.

func (*ProjectClient) QueryWorkflowExecutions added in v0.4.0

func (c *ProjectClient) QueryWorkflowExecutions(pr *Project) *WorkflowExecutionQuery

QueryWorkflowExecutions queries the workflow_executions edge of a Project.

func (*ProjectClient) QueryWorkflowStageExecutions added in v0.4.0

func (c *ProjectClient) QueryWorkflowStageExecutions(pr *Project) *WorkflowStageExecutionQuery

QueryWorkflowStageExecutions queries the workflow_stage_executions edge of a Project.

func (*ProjectClient) QueryWorkflowStages added in v0.4.0

func (c *ProjectClient) QueryWorkflowStages(pr *Project) *WorkflowStageQuery

QueryWorkflowStages queries the workflow_stages edge of a Project.

func (*ProjectClient) QueryWorkflowStepExecutions added in v0.4.0

func (c *ProjectClient) QueryWorkflowStepExecutions(pr *Project) *WorkflowStepExecutionQuery

QueryWorkflowStepExecutions queries the workflow_step_executions edge of a Project.

func (*ProjectClient) QueryWorkflowSteps added in v0.4.0

func (c *ProjectClient) QueryWorkflowSteps(pr *Project) *WorkflowStepQuery

QueryWorkflowSteps queries the workflow_steps edge of a Project.

func (*ProjectClient) QueryWorkflows added in v0.4.0

func (c *ProjectClient) QueryWorkflows(pr *Project) *WorkflowQuery

QueryWorkflows queries the workflows edge of a Project.

func (*ProjectClient) Update

func (c *ProjectClient) Update() *ProjectUpdate

Update returns an update builder for Project.

func (*ProjectClient) UpdateOne

func (c *ProjectClient) UpdateOne(pr *Project) *ProjectUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProjectClient) UpdateOneID

func (c *ProjectClient) UpdateOneID(id object.ID) *ProjectUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProjectClient) Use

func (c *ProjectClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `project.Hooks(f(g(h())))`.

type ProjectClientGetter

type ProjectClientGetter interface {
	// Projects returns the client for interacting with the Project builders.
	Projects() *ProjectClient
}

ProjectClientGetter is an interface that allows getting ProjectClient.

type ProjectCreate

type ProjectCreate struct {
	// contains filtered or unexported fields
}

ProjectCreate is the builder for creating a Project entity.

func (*ProjectCreate) AddCatalogIDs added in v0.4.0

func (pc *ProjectCreate) AddCatalogIDs(ids ...object.ID) *ProjectCreate

AddCatalogIDs adds the "catalogs" edge to the Catalog entity by IDs.

func (*ProjectCreate) AddCatalogs added in v0.4.0

func (pc *ProjectCreate) AddCatalogs(c ...*Catalog) *ProjectCreate

AddCatalogs adds the "catalogs" edges to the Catalog entity.

func (*ProjectCreate) AddConnectorIDs

func (pc *ProjectCreate) AddConnectorIDs(ids ...object.ID) *ProjectCreate

AddConnectorIDs adds the "connectors" edge to the Connector entity by IDs.

func (*ProjectCreate) AddConnectors

func (pc *ProjectCreate) AddConnectors(c ...*Connector) *ProjectCreate

AddConnectors adds the "connectors" edges to the Connector entity.

func (*ProjectCreate) AddEnvironmentIDs

func (pc *ProjectCreate) AddEnvironmentIDs(ids ...object.ID) *ProjectCreate

AddEnvironmentIDs adds the "environments" edge to the Environment entity by IDs.

func (*ProjectCreate) AddEnvironments

func (pc *ProjectCreate) AddEnvironments(e ...*Environment) *ProjectCreate

AddEnvironments adds the "environments" edges to the Environment entity.

func (*ProjectCreate) AddResourceComponentIDs added in v0.4.0

func (pc *ProjectCreate) AddResourceComponentIDs(ids ...object.ID) *ProjectCreate

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by IDs.

func (*ProjectCreate) AddResourceComponents added in v0.4.0

func (pc *ProjectCreate) AddResourceComponents(r ...*ResourceComponent) *ProjectCreate

AddResourceComponents adds the "resource_components" edges to the ResourceComponent entity.

func (*ProjectCreate) AddResourceIDs added in v0.4.0

func (pc *ProjectCreate) AddResourceIDs(ids ...object.ID) *ProjectCreate

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*ProjectCreate) AddResourceRunIDs added in v0.6.0

func (pc *ProjectCreate) AddResourceRunIDs(ids ...object.ID) *ProjectCreate

AddResourceRunIDs adds the "resource_runs" edge to the ResourceRun entity by IDs.

func (*ProjectCreate) AddResourceRuns added in v0.6.0

func (pc *ProjectCreate) AddResourceRuns(r ...*ResourceRun) *ProjectCreate

AddResourceRuns adds the "resource_runs" edges to the ResourceRun entity.

func (*ProjectCreate) AddResources added in v0.4.0

func (pc *ProjectCreate) AddResources(r ...*Resource) *ProjectCreate

AddResources adds the "resources" edges to the Resource entity.

func (*ProjectCreate) AddSubjectRoleIDs

func (pc *ProjectCreate) AddSubjectRoleIDs(ids ...object.ID) *ProjectCreate

AddSubjectRoleIDs adds the "subject_roles" edge to the SubjectRoleRelationship entity by IDs.

func (*ProjectCreate) AddSubjectRoles

func (pc *ProjectCreate) AddSubjectRoles(s ...*SubjectRoleRelationship) *ProjectCreate

AddSubjectRoles adds the "subject_roles" edges to the SubjectRoleRelationship entity.

func (*ProjectCreate) AddTemplateIDs added in v0.4.0

func (pc *ProjectCreate) AddTemplateIDs(ids ...object.ID) *ProjectCreate

AddTemplateIDs adds the "templates" edge to the Template entity by IDs.

func (*ProjectCreate) AddTemplateVersionIDs added in v0.4.0

func (pc *ProjectCreate) AddTemplateVersionIDs(ids ...object.ID) *ProjectCreate

AddTemplateVersionIDs adds the "template_versions" edge to the TemplateVersion entity by IDs.

func (*ProjectCreate) AddTemplateVersions added in v0.4.0

func (pc *ProjectCreate) AddTemplateVersions(t ...*TemplateVersion) *ProjectCreate

AddTemplateVersions adds the "template_versions" edges to the TemplateVersion entity.

func (*ProjectCreate) AddTemplates added in v0.4.0

func (pc *ProjectCreate) AddTemplates(t ...*Template) *ProjectCreate

AddTemplates adds the "templates" edges to the Template entity.

func (*ProjectCreate) AddVariableIDs

func (pc *ProjectCreate) AddVariableIDs(ids ...object.ID) *ProjectCreate

AddVariableIDs adds the "variables" edge to the Variable entity by IDs.

func (*ProjectCreate) AddVariables

func (pc *ProjectCreate) AddVariables(v ...*Variable) *ProjectCreate

AddVariables adds the "variables" edges to the Variable entity.

func (*ProjectCreate) AddWorkflowExecutionIDs added in v0.4.0

func (pc *ProjectCreate) AddWorkflowExecutionIDs(ids ...object.ID) *ProjectCreate

AddWorkflowExecutionIDs adds the "workflow_executions" edge to the WorkflowExecution entity by IDs.

func (*ProjectCreate) AddWorkflowExecutions added in v0.4.0

func (pc *ProjectCreate) AddWorkflowExecutions(w ...*WorkflowExecution) *ProjectCreate

AddWorkflowExecutions adds the "workflow_executions" edges to the WorkflowExecution entity.

func (*ProjectCreate) AddWorkflowIDs added in v0.4.0

func (pc *ProjectCreate) AddWorkflowIDs(ids ...object.ID) *ProjectCreate

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*ProjectCreate) AddWorkflowStageExecutionIDs added in v0.4.0

func (pc *ProjectCreate) AddWorkflowStageExecutionIDs(ids ...object.ID) *ProjectCreate

AddWorkflowStageExecutionIDs adds the "workflow_stage_executions" edge to the WorkflowStageExecution entity by IDs.

func (*ProjectCreate) AddWorkflowStageExecutions added in v0.4.0

func (pc *ProjectCreate) AddWorkflowStageExecutions(w ...*WorkflowStageExecution) *ProjectCreate

AddWorkflowStageExecutions adds the "workflow_stage_executions" edges to the WorkflowStageExecution entity.

func (*ProjectCreate) AddWorkflowStageIDs added in v0.4.0

func (pc *ProjectCreate) AddWorkflowStageIDs(ids ...object.ID) *ProjectCreate

AddWorkflowStageIDs adds the "workflow_stages" edge to the WorkflowStage entity by IDs.

func (*ProjectCreate) AddWorkflowStages added in v0.4.0

func (pc *ProjectCreate) AddWorkflowStages(w ...*WorkflowStage) *ProjectCreate

AddWorkflowStages adds the "workflow_stages" edges to the WorkflowStage entity.

func (*ProjectCreate) AddWorkflowStepExecutionIDs added in v0.4.0

func (pc *ProjectCreate) AddWorkflowStepExecutionIDs(ids ...object.ID) *ProjectCreate

AddWorkflowStepExecutionIDs adds the "workflow_step_executions" edge to the WorkflowStepExecution entity by IDs.

func (*ProjectCreate) AddWorkflowStepExecutions added in v0.4.0

func (pc *ProjectCreate) AddWorkflowStepExecutions(w ...*WorkflowStepExecution) *ProjectCreate

AddWorkflowStepExecutions adds the "workflow_step_executions" edges to the WorkflowStepExecution entity.

func (*ProjectCreate) AddWorkflowStepIDs added in v0.4.0

func (pc *ProjectCreate) AddWorkflowStepIDs(ids ...object.ID) *ProjectCreate

AddWorkflowStepIDs adds the "workflow_steps" edge to the WorkflowStep entity by IDs.

func (*ProjectCreate) AddWorkflowSteps added in v0.4.0

func (pc *ProjectCreate) AddWorkflowSteps(w ...*WorkflowStep) *ProjectCreate

AddWorkflowSteps adds the "workflow_steps" edges to the WorkflowStep entity.

func (*ProjectCreate) AddWorkflows added in v0.4.0

func (pc *ProjectCreate) AddWorkflows(w ...*Workflow) *ProjectCreate

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*ProjectCreate) Exec

func (pc *ProjectCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectCreate) ExecContext

func (c *ProjectCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProjectCreate) ExecE

func (pc *ProjectCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Project) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ProjectCreate) ExecEX

func (pc *ProjectCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Project) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ProjectCreate) ExecX

func (pc *ProjectCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectCreate) Mutation

func (pc *ProjectCreate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectCreate) OnConflict

func (pc *ProjectCreate) OnConflict(opts ...sql.ConflictOption) *ProjectUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Project.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ProjectUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*ProjectCreate) OnConflictColumns

func (pc *ProjectCreate) OnConflictColumns(columns ...string) *ProjectUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProjectCreate) QueryContext

func (c *ProjectCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProjectCreate) Save

func (pc *ProjectCreate) Save(ctx context.Context) (*Project, error)

Save creates the Project in the database.

func (*ProjectCreate) SaveE

func (pc *ProjectCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Project) error) (*Project, error)

SaveE calls the given function after created the Project entity, which is always good for cascading create operations.

func (*ProjectCreate) SaveEX

func (pc *ProjectCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Project) error) *Project

SaveEX is like SaveE, but panics if an error occurs.

func (*ProjectCreate) SaveX

func (pc *ProjectCreate) SaveX(ctx context.Context) *Project

SaveX calls Save and panics if Save returns an error.

func (*ProjectCreate) Set

func (pc *ProjectCreate) Set(obj *Project) *ProjectCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ProjectCreate) SetAnnotations

func (pc *ProjectCreate) SetAnnotations(m map[string]string) *ProjectCreate

SetAnnotations sets the "annotations" field.

func (*ProjectCreate) SetCreateTime

func (pc *ProjectCreate) SetCreateTime(t time.Time) *ProjectCreate

SetCreateTime sets the "create_time" field.

func (*ProjectCreate) SetDescription

func (pc *ProjectCreate) SetDescription(s string) *ProjectCreate

SetDescription sets the "description" field.

func (*ProjectCreate) SetID

func (pc *ProjectCreate) SetID(o object.ID) *ProjectCreate

SetID sets the "id" field.

func (*ProjectCreate) SetLabels

func (pc *ProjectCreate) SetLabels(m map[string]string) *ProjectCreate

SetLabels sets the "labels" field.

func (*ProjectCreate) SetName

func (pc *ProjectCreate) SetName(s string) *ProjectCreate

SetName sets the "name" field.

func (*ProjectCreate) SetNillableCreateTime

func (pc *ProjectCreate) SetNillableCreateTime(t *time.Time) *ProjectCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ProjectCreate) SetNillableDescription

func (pc *ProjectCreate) SetNillableDescription(s *string) *ProjectCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ProjectCreate) SetNillableUpdateTime

func (pc *ProjectCreate) SetNillableUpdateTime(t *time.Time) *ProjectCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*ProjectCreate) SetUpdateTime

func (pc *ProjectCreate) SetUpdateTime(t time.Time) *ProjectCreate

SetUpdateTime sets the "update_time" field.

type ProjectCreateBulk

type ProjectCreateBulk struct {
	// contains filtered or unexported fields
}

ProjectCreateBulk is the builder for creating many Project entities in bulk.

func (*ProjectCreateBulk) Exec

func (pcb *ProjectCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectCreateBulk) ExecContext

func (c *ProjectCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProjectCreateBulk) ExecE

func (pcb *ProjectCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Project) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ProjectCreateBulk) ExecEX

func (pcb *ProjectCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Project) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ProjectCreateBulk) ExecX

func (pcb *ProjectCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectCreateBulk) OnConflict

func (pcb *ProjectCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProjectUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Project.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ProjectUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*ProjectCreateBulk) OnConflictColumns

func (pcb *ProjectCreateBulk) OnConflictColumns(columns ...string) *ProjectUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProjectCreateBulk) QueryContext

func (c *ProjectCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProjectCreateBulk) Save

func (pcb *ProjectCreateBulk) Save(ctx context.Context) ([]*Project, error)

Save creates the Project entities in the database.

func (*ProjectCreateBulk) SaveE

func (pcb *ProjectCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Project) error) ([]*Project, error)

SaveE calls the given function after created the Project entities, which is always good for cascading create operations.

func (*ProjectCreateBulk) SaveEX

func (pcb *ProjectCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Project) error) []*Project

SaveEX is like SaveE, but panics if an error occurs.

func (*ProjectCreateBulk) SaveX

func (pcb *ProjectCreateBulk) SaveX(ctx context.Context) []*Project

SaveX is like Save, but panics if an error occurs.

func (*ProjectCreateBulk) Set

func (pcb *ProjectCreateBulk) Set(objs ...*Project) *ProjectCreateBulk

Set leverages the ProjectCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ProjectCreateInput

type ProjectCreateInput struct {

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// contains filtered or unexported fields
}

ProjectCreateInput holds the creation input of the Project entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ProjectCreateInput) Model

func (pci *ProjectCreateInput) Model() *Project

Model returns the Project entity for creating, after validating.

func (*ProjectCreateInput) SetGinContext

func (ic *ProjectCreateInput) SetGinContext(ctx *gin.Context)

func (*ProjectCreateInput) SetModelClient

func (ic *ProjectCreateInput) SetModelClient(cli *Client)

func (*ProjectCreateInput) Validate

func (pci *ProjectCreateInput) Validate() error

Validate checks the ProjectCreateInput entity.

func (*ProjectCreateInput) ValidateWith

func (pci *ProjectCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectCreateInput entity with the given context and client set.

type ProjectCreateInputs

type ProjectCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ProjectCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ProjectCreateInputs holds the creation input of the Project entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ProjectCreateInputs) Model

func (pci *ProjectCreateInputs) Model() []*Project

Model returns the Project entities for creating, after validating.

func (*ProjectCreateInputs) SetGinContext

func (ic *ProjectCreateInputs) SetGinContext(ctx *gin.Context)

func (*ProjectCreateInputs) SetModelClient

func (ic *ProjectCreateInputs) SetModelClient(cli *Client)

func (*ProjectCreateInputs) Validate

func (pci *ProjectCreateInputs) Validate() error

Validate checks the ProjectCreateInputs entity .

func (*ProjectCreateInputs) ValidateWith

func (pci *ProjectCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectCreateInputs entity with the given context and client set.

type ProjectCreateInputsItem

type ProjectCreateInputsItem struct {
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
}

ProjectCreateInputs holds the creation input item of the Project entities.

func (*ProjectCreateInputsItem) ValidateWith

func (pci *ProjectCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectCreateInputsItem entity with the given context and client set.

type ProjectDelete

type ProjectDelete struct {
	// contains filtered or unexported fields
}

ProjectDelete is the builder for deleting a Project entity.

func (*ProjectDelete) Exec

func (pd *ProjectDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProjectDelete) ExecContext

func (c *ProjectDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProjectDelete) ExecX

func (pd *ProjectDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProjectDelete) QueryContext

func (c *ProjectDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProjectDelete) Where

func (pd *ProjectDelete) Where(ps ...predicate.Project) *ProjectDelete

Where appends a list predicates to the ProjectDelete builder.

type ProjectDeleteInput

type ProjectDeleteInput struct {
	ProjectQueryInput `path:",inline"`
}

ProjectDeleteInput holds the deletion input of the Project entity, please tags with `path:",inline"` if embedding.

func (*ProjectDeleteInput) SetGinContext

func (ic *ProjectDeleteInput) SetGinContext(ctx *gin.Context)

func (*ProjectDeleteInput) SetModelClient

func (ic *ProjectDeleteInput) SetModelClient(cli *Client)

type ProjectDeleteInputs

type ProjectDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ProjectDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ProjectDeleteInputs holds the deletion input of the Project entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ProjectDeleteInputs) IDs

func (pdi *ProjectDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Project entities for deleting, after validating.

func (*ProjectDeleteInputs) Model

func (pdi *ProjectDeleteInputs) Model() []*Project

Model returns the Project entities for deleting, after validating.

func (*ProjectDeleteInputs) SetGinContext

func (ic *ProjectDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ProjectDeleteInputs) SetModelClient

func (ic *ProjectDeleteInputs) SetModelClient(cli *Client)

func (*ProjectDeleteInputs) Validate

func (pdi *ProjectDeleteInputs) Validate() error

Validate checks the ProjectDeleteInputs entity.

func (*ProjectDeleteInputs) ValidateWith

func (pdi *ProjectDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectDeleteInputs entity with the given context and client set.

type ProjectDeleteInputsItem

type ProjectDeleteInputsItem struct {
	// ID of the Project entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Project entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

ProjectDeleteInputs holds the deletion input item of the Project entities.

type ProjectDeleteOne

type ProjectDeleteOne struct {
	// contains filtered or unexported fields
}

ProjectDeleteOne is the builder for deleting a single Project entity.

func (*ProjectDeleteOne) Exec

func (pdo *ProjectDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProjectDeleteOne) ExecX

func (pdo *ProjectDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectDeleteOne) Where

Where appends a list predicates to the ProjectDelete builder.

type ProjectEdges

type ProjectEdges struct {
	// Environments that belong to the project.
	Environments []*Environment `json:"environments,omitempty"`
	// Connectors that belong to the project.
	Connectors []*Connector `json:"connectors,omitempty"`
	// Roles of a subject that belong to the project.
	SubjectRoles []*SubjectRoleRelationship `json:"subject_roles,omitempty"`
	// Resources that belong to the project.
	Resources []*Resource `json:"resources,omitempty"`
	// ResourceComponents that belong to the project.
	ResourceComponents []*ResourceComponent `json:"resource_components,omitempty"`
	// ResourceRuns that belong to the project.
	ResourceRuns []*ResourceRun `json:"resource_runs,omitempty"`
	// Variables that belong to the project.
	Variables []*Variable `json:"variables,omitempty"`
	// Templates that belong to the project.
	Templates []*Template `json:"templates,omitempty"`
	// TemplateVersions that belong to the project.
	TemplateVersions []*TemplateVersion `json:"template_versions,omitempty"`
	// Catalogs that belong to the project.
	Catalogs []*Catalog `json:"catalogs,omitempty"`
	// Workflows that belong to the project.
	Workflows []*Workflow `json:"workflows,omitempty"`
	// WorkflowStages that belong to the project.
	WorkflowStages []*WorkflowStage `json:"workflow_stages,omitempty"`
	// WorkflowSteps that belong to the project.
	WorkflowSteps []*WorkflowStep `json:"workflow_steps,omitempty"`
	// WorkflowExecutions that belong to the project.
	WorkflowExecutions []*WorkflowExecution `json:"workflow_executions,omitempty"`
	// WorkflowStageExecutions that belong to the project.
	WorkflowStageExecutions []*WorkflowStageExecution `json:"workflow_stage_executions,omitempty"`
	// WorkflowStepExecutions that belong to the project.
	WorkflowStepExecutions []*WorkflowStepExecution `json:"workflow_step_executions,omitempty"`
	// contains filtered or unexported fields
}

ProjectEdges holds the relations/edges for other nodes in the graph.

func (ProjectEdges) CatalogsOrErr added in v0.4.0

func (e ProjectEdges) CatalogsOrErr() ([]*Catalog, error)

CatalogsOrErr returns the Catalogs value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) ConnectorsOrErr

func (e ProjectEdges) ConnectorsOrErr() ([]*Connector, error)

ConnectorsOrErr returns the Connectors value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) EnvironmentsOrErr

func (e ProjectEdges) EnvironmentsOrErr() ([]*Environment, error)

EnvironmentsOrErr returns the Environments value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) ResourceComponentsOrErr added in v0.4.0

func (e ProjectEdges) ResourceComponentsOrErr() ([]*ResourceComponent, error)

ResourceComponentsOrErr returns the ResourceComponents value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) ResourceRunsOrErr added in v0.6.0

func (e ProjectEdges) ResourceRunsOrErr() ([]*ResourceRun, error)

ResourceRunsOrErr returns the ResourceRuns value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) ResourcesOrErr added in v0.4.0

func (e ProjectEdges) ResourcesOrErr() ([]*Resource, error)

ResourcesOrErr returns the Resources value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) SubjectRolesOrErr

func (e ProjectEdges) SubjectRolesOrErr() ([]*SubjectRoleRelationship, error)

SubjectRolesOrErr returns the SubjectRoles value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) TemplateVersionsOrErr added in v0.4.0

func (e ProjectEdges) TemplateVersionsOrErr() ([]*TemplateVersion, error)

TemplateVersionsOrErr returns the TemplateVersions value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) TemplatesOrErr added in v0.4.0

func (e ProjectEdges) TemplatesOrErr() ([]*Template, error)

TemplatesOrErr returns the Templates value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) VariablesOrErr

func (e ProjectEdges) VariablesOrErr() ([]*Variable, error)

VariablesOrErr returns the Variables value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) WorkflowExecutionsOrErr added in v0.4.0

func (e ProjectEdges) WorkflowExecutionsOrErr() ([]*WorkflowExecution, error)

WorkflowExecutionsOrErr returns the WorkflowExecutions value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) WorkflowStageExecutionsOrErr added in v0.4.0

func (e ProjectEdges) WorkflowStageExecutionsOrErr() ([]*WorkflowStageExecution, error)

WorkflowStageExecutionsOrErr returns the WorkflowStageExecutions value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) WorkflowStagesOrErr added in v0.4.0

func (e ProjectEdges) WorkflowStagesOrErr() ([]*WorkflowStage, error)

WorkflowStagesOrErr returns the WorkflowStages value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) WorkflowStepExecutionsOrErr added in v0.4.0

func (e ProjectEdges) WorkflowStepExecutionsOrErr() ([]*WorkflowStepExecution, error)

WorkflowStepExecutionsOrErr returns the WorkflowStepExecutions value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) WorkflowStepsOrErr added in v0.4.0

func (e ProjectEdges) WorkflowStepsOrErr() ([]*WorkflowStep, error)

WorkflowStepsOrErr returns the WorkflowSteps value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) WorkflowsOrErr added in v0.4.0

func (e ProjectEdges) WorkflowsOrErr() ([]*Workflow, error)

WorkflowsOrErr returns the Workflows value or an error if the edge was not loaded in eager-loading.

type ProjectGroupBy

type ProjectGroupBy struct {
	// contains filtered or unexported fields
}

ProjectGroupBy is the group-by builder for Project entities.

func (*ProjectGroupBy) Aggregate

func (pgb *ProjectGroupBy) Aggregate(fns ...AggregateFunc) *ProjectGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ProjectGroupBy) Bool

func (s *ProjectGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) BoolX

func (s *ProjectGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProjectGroupBy) Bools

func (s *ProjectGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) BoolsX

func (s *ProjectGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProjectGroupBy) Float64

func (s *ProjectGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) Float64X

func (s *ProjectGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProjectGroupBy) Float64s

func (s *ProjectGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) Float64sX

func (s *ProjectGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProjectGroupBy) Int

func (s *ProjectGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) IntX

func (s *ProjectGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProjectGroupBy) Ints

func (s *ProjectGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) IntsX

func (s *ProjectGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProjectGroupBy) Scan

func (pgb *ProjectGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProjectGroupBy) ScanX

func (s *ProjectGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProjectGroupBy) String

func (s *ProjectGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) StringX

func (s *ProjectGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProjectGroupBy) Strings

func (s *ProjectGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) StringsX

func (s *ProjectGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProjectMutation

type ProjectMutation struct {
	// contains filtered or unexported fields
}

ProjectMutation represents an operation that mutates the Project nodes in the graph.

func (*ProjectMutation) AddCatalogIDs added in v0.4.0

func (m *ProjectMutation) AddCatalogIDs(ids ...object.ID)

AddCatalogIDs adds the "catalogs" edge to the Catalog entity by ids.

func (*ProjectMutation) AddConnectorIDs

func (m *ProjectMutation) AddConnectorIDs(ids ...object.ID)

AddConnectorIDs adds the "connectors" edge to the Connector entity by ids.

func (*ProjectMutation) AddEnvironmentIDs

func (m *ProjectMutation) AddEnvironmentIDs(ids ...object.ID)

AddEnvironmentIDs adds the "environments" edge to the Environment entity by ids.

func (*ProjectMutation) AddField

func (m *ProjectMutation) 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 (*ProjectMutation) AddResourceComponentIDs added in v0.4.0

func (m *ProjectMutation) AddResourceComponentIDs(ids ...object.ID)

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by ids.

func (*ProjectMutation) AddResourceIDs added in v0.4.0

func (m *ProjectMutation) AddResourceIDs(ids ...object.ID)

AddResourceIDs adds the "resources" edge to the Resource entity by ids.

func (*ProjectMutation) AddResourceRunIDs added in v0.6.0

func (m *ProjectMutation) AddResourceRunIDs(ids ...object.ID)

AddResourceRunIDs adds the "resource_runs" edge to the ResourceRun entity by ids.

func (*ProjectMutation) AddSubjectRoleIDs

func (m *ProjectMutation) AddSubjectRoleIDs(ids ...object.ID)

AddSubjectRoleIDs adds the "subject_roles" edge to the SubjectRoleRelationship entity by ids.

func (*ProjectMutation) AddTemplateIDs added in v0.4.0

func (m *ProjectMutation) AddTemplateIDs(ids ...object.ID)

AddTemplateIDs adds the "templates" edge to the Template entity by ids.

func (*ProjectMutation) AddTemplateVersionIDs added in v0.4.0

func (m *ProjectMutation) AddTemplateVersionIDs(ids ...object.ID)

AddTemplateVersionIDs adds the "template_versions" edge to the TemplateVersion entity by ids.

func (*ProjectMutation) AddVariableIDs

func (m *ProjectMutation) AddVariableIDs(ids ...object.ID)

AddVariableIDs adds the "variables" edge to the Variable entity by ids.

func (*ProjectMutation) AddWorkflowExecutionIDs added in v0.4.0

func (m *ProjectMutation) AddWorkflowExecutionIDs(ids ...object.ID)

AddWorkflowExecutionIDs adds the "workflow_executions" edge to the WorkflowExecution entity by ids.

func (*ProjectMutation) AddWorkflowIDs added in v0.4.0

func (m *ProjectMutation) AddWorkflowIDs(ids ...object.ID)

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by ids.

func (*ProjectMutation) AddWorkflowStageExecutionIDs added in v0.4.0

func (m *ProjectMutation) AddWorkflowStageExecutionIDs(ids ...object.ID)

AddWorkflowStageExecutionIDs adds the "workflow_stage_executions" edge to the WorkflowStageExecution entity by ids.

func (*ProjectMutation) AddWorkflowStageIDs added in v0.4.0

func (m *ProjectMutation) AddWorkflowStageIDs(ids ...object.ID)

AddWorkflowStageIDs adds the "workflow_stages" edge to the WorkflowStage entity by ids.

func (*ProjectMutation) AddWorkflowStepExecutionIDs added in v0.4.0

func (m *ProjectMutation) AddWorkflowStepExecutionIDs(ids ...object.ID)

AddWorkflowStepExecutionIDs adds the "workflow_step_executions" edge to the WorkflowStepExecution entity by ids.

func (*ProjectMutation) AddWorkflowStepIDs added in v0.4.0

func (m *ProjectMutation) AddWorkflowStepIDs(ids ...object.ID)

AddWorkflowStepIDs adds the "workflow_steps" edge to the WorkflowStep entity by ids.

func (*ProjectMutation) AddedEdges

func (m *ProjectMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProjectMutation) AddedField

func (m *ProjectMutation) 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 (*ProjectMutation) AddedFields

func (m *ProjectMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProjectMutation) AddedIDs

func (m *ProjectMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProjectMutation) Annotations

func (m *ProjectMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*ProjectMutation) AnnotationsCleared

func (m *ProjectMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*ProjectMutation) CatalogsCleared added in v0.4.0

func (m *ProjectMutation) CatalogsCleared() bool

CatalogsCleared reports if the "catalogs" edge to the Catalog entity was cleared.

func (*ProjectMutation) CatalogsIDs added in v0.4.0

func (m *ProjectMutation) CatalogsIDs() (ids []object.ID)

CatalogsIDs returns the "catalogs" edge IDs in the mutation.

func (*ProjectMutation) ClearAnnotations

func (m *ProjectMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*ProjectMutation) ClearCatalogs added in v0.4.0

func (m *ProjectMutation) ClearCatalogs()

ClearCatalogs clears the "catalogs" edge to the Catalog entity.

func (*ProjectMutation) ClearConnectors

func (m *ProjectMutation) ClearConnectors()

ClearConnectors clears the "connectors" edge to the Connector entity.

func (*ProjectMutation) ClearDescription

func (m *ProjectMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*ProjectMutation) ClearEdge

func (m *ProjectMutation) 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 (*ProjectMutation) ClearEnvironments

func (m *ProjectMutation) ClearEnvironments()

ClearEnvironments clears the "environments" edge to the Environment entity.

func (*ProjectMutation) ClearField

func (m *ProjectMutation) 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 (*ProjectMutation) ClearLabels

func (m *ProjectMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*ProjectMutation) ClearResourceComponents added in v0.4.0

func (m *ProjectMutation) ClearResourceComponents()

ClearResourceComponents clears the "resource_components" edge to the ResourceComponent entity.

func (*ProjectMutation) ClearResourceRuns added in v0.6.0

func (m *ProjectMutation) ClearResourceRuns()

ClearResourceRuns clears the "resource_runs" edge to the ResourceRun entity.

func (*ProjectMutation) ClearResources added in v0.4.0

func (m *ProjectMutation) ClearResources()

ClearResources clears the "resources" edge to the Resource entity.

func (*ProjectMutation) ClearSubjectRoles

func (m *ProjectMutation) ClearSubjectRoles()

ClearSubjectRoles clears the "subject_roles" edge to the SubjectRoleRelationship entity.

func (*ProjectMutation) ClearTemplateVersions added in v0.4.0

func (m *ProjectMutation) ClearTemplateVersions()

ClearTemplateVersions clears the "template_versions" edge to the TemplateVersion entity.

func (*ProjectMutation) ClearTemplates added in v0.4.0

func (m *ProjectMutation) ClearTemplates()

ClearTemplates clears the "templates" edge to the Template entity.

func (*ProjectMutation) ClearVariables

func (m *ProjectMutation) ClearVariables()

ClearVariables clears the "variables" edge to the Variable entity.

func (*ProjectMutation) ClearWorkflowExecutions added in v0.4.0

func (m *ProjectMutation) ClearWorkflowExecutions()

ClearWorkflowExecutions clears the "workflow_executions" edge to the WorkflowExecution entity.

func (*ProjectMutation) ClearWorkflowStageExecutions added in v0.4.0

func (m *ProjectMutation) ClearWorkflowStageExecutions()

ClearWorkflowStageExecutions clears the "workflow_stage_executions" edge to the WorkflowStageExecution entity.

func (*ProjectMutation) ClearWorkflowStages added in v0.4.0

func (m *ProjectMutation) ClearWorkflowStages()

ClearWorkflowStages clears the "workflow_stages" edge to the WorkflowStage entity.

func (*ProjectMutation) ClearWorkflowStepExecutions added in v0.4.0

func (m *ProjectMutation) ClearWorkflowStepExecutions()

ClearWorkflowStepExecutions clears the "workflow_step_executions" edge to the WorkflowStepExecution entity.

func (*ProjectMutation) ClearWorkflowSteps added in v0.4.0

func (m *ProjectMutation) ClearWorkflowSteps()

ClearWorkflowSteps clears the "workflow_steps" edge to the WorkflowStep entity.

func (*ProjectMutation) ClearWorkflows added in v0.4.0

func (m *ProjectMutation) ClearWorkflows()

ClearWorkflows clears the "workflows" edge to the Workflow entity.

func (*ProjectMutation) ClearedEdges

func (m *ProjectMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProjectMutation) ClearedFields

func (m *ProjectMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProjectMutation) Client

func (m ProjectMutation) 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 (*ProjectMutation) ConnectorsCleared

func (m *ProjectMutation) ConnectorsCleared() bool

ConnectorsCleared reports if the "connectors" edge to the Connector entity was cleared.

func (*ProjectMutation) ConnectorsIDs

func (m *ProjectMutation) ConnectorsIDs() (ids []object.ID)

ConnectorsIDs returns the "connectors" edge IDs in the mutation.

func (*ProjectMutation) CreateTime

func (m *ProjectMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ProjectMutation) Description

func (m *ProjectMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*ProjectMutation) DescriptionCleared

func (m *ProjectMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*ProjectMutation) EdgeCleared

func (m *ProjectMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProjectMutation) EnvironmentsCleared

func (m *ProjectMutation) EnvironmentsCleared() bool

EnvironmentsCleared reports if the "environments" edge to the Environment entity was cleared.

func (*ProjectMutation) EnvironmentsIDs

func (m *ProjectMutation) EnvironmentsIDs() (ids []object.ID)

EnvironmentsIDs returns the "environments" edge IDs in the mutation.

func (*ProjectMutation) ExecContext

func (c *ProjectMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProjectMutation) Field

func (m *ProjectMutation) 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 (*ProjectMutation) FieldCleared

func (m *ProjectMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProjectMutation) Fields

func (m *ProjectMutation) 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 (*ProjectMutation) ID

func (m *ProjectMutation) ID() (id object.ID, 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 (*ProjectMutation) IDs

func (m *ProjectMutation) IDs(ctx context.Context) ([]object.ID, 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 (*ProjectMutation) Labels

func (m *ProjectMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*ProjectMutation) LabelsCleared

func (m *ProjectMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*ProjectMutation) Name

func (m *ProjectMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ProjectMutation) OldAnnotations

func (m *ProjectMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldCreateTime

func (m *ProjectMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldDescription

func (m *ProjectMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldField

func (m *ProjectMutation) 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 (*ProjectMutation) OldLabels

func (m *ProjectMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldName

func (m *ProjectMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldUpdateTime

func (m *ProjectMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Project entity. If the Project 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 (*ProjectMutation) Op

func (m *ProjectMutation) Op() Op

Op returns the operation name.

func (*ProjectMutation) QueryContext

func (c *ProjectMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProjectMutation) RemoveCatalogIDs added in v0.4.0

func (m *ProjectMutation) RemoveCatalogIDs(ids ...object.ID)

RemoveCatalogIDs removes the "catalogs" edge to the Catalog entity by IDs.

func (*ProjectMutation) RemoveConnectorIDs

func (m *ProjectMutation) RemoveConnectorIDs(ids ...object.ID)

RemoveConnectorIDs removes the "connectors" edge to the Connector entity by IDs.

func (*ProjectMutation) RemoveEnvironmentIDs

func (m *ProjectMutation) RemoveEnvironmentIDs(ids ...object.ID)

RemoveEnvironmentIDs removes the "environments" edge to the Environment entity by IDs.

func (*ProjectMutation) RemoveResourceComponentIDs added in v0.4.0

func (m *ProjectMutation) RemoveResourceComponentIDs(ids ...object.ID)

RemoveResourceComponentIDs removes the "resource_components" edge to the ResourceComponent entity by IDs.

func (*ProjectMutation) RemoveResourceIDs added in v0.4.0

func (m *ProjectMutation) RemoveResourceIDs(ids ...object.ID)

RemoveResourceIDs removes the "resources" edge to the Resource entity by IDs.

func (*ProjectMutation) RemoveResourceRunIDs added in v0.6.0

func (m *ProjectMutation) RemoveResourceRunIDs(ids ...object.ID)

RemoveResourceRunIDs removes the "resource_runs" edge to the ResourceRun entity by IDs.

func (*ProjectMutation) RemoveSubjectRoleIDs

func (m *ProjectMutation) RemoveSubjectRoleIDs(ids ...object.ID)

RemoveSubjectRoleIDs removes the "subject_roles" edge to the SubjectRoleRelationship entity by IDs.

func (*ProjectMutation) RemoveTemplateIDs added in v0.4.0

func (m *ProjectMutation) RemoveTemplateIDs(ids ...object.ID)

RemoveTemplateIDs removes the "templates" edge to the Template entity by IDs.

func (*ProjectMutation) RemoveTemplateVersionIDs added in v0.4.0

func (m *ProjectMutation) RemoveTemplateVersionIDs(ids ...object.ID)

RemoveTemplateVersionIDs removes the "template_versions" edge to the TemplateVersion entity by IDs.

func (*ProjectMutation) RemoveVariableIDs

func (m *ProjectMutation) RemoveVariableIDs(ids ...object.ID)

RemoveVariableIDs removes the "variables" edge to the Variable entity by IDs.

func (*ProjectMutation) RemoveWorkflowExecutionIDs added in v0.4.0

func (m *ProjectMutation) RemoveWorkflowExecutionIDs(ids ...object.ID)

RemoveWorkflowExecutionIDs removes the "workflow_executions" edge to the WorkflowExecution entity by IDs.

func (*ProjectMutation) RemoveWorkflowIDs added in v0.4.0

func (m *ProjectMutation) RemoveWorkflowIDs(ids ...object.ID)

RemoveWorkflowIDs removes the "workflows" edge to the Workflow entity by IDs.

func (*ProjectMutation) RemoveWorkflowStageExecutionIDs added in v0.4.0

func (m *ProjectMutation) RemoveWorkflowStageExecutionIDs(ids ...object.ID)

RemoveWorkflowStageExecutionIDs removes the "workflow_stage_executions" edge to the WorkflowStageExecution entity by IDs.

func (*ProjectMutation) RemoveWorkflowStageIDs added in v0.4.0

func (m *ProjectMutation) RemoveWorkflowStageIDs(ids ...object.ID)

RemoveWorkflowStageIDs removes the "workflow_stages" edge to the WorkflowStage entity by IDs.

func (*ProjectMutation) RemoveWorkflowStepExecutionIDs added in v0.4.0

func (m *ProjectMutation) RemoveWorkflowStepExecutionIDs(ids ...object.ID)

RemoveWorkflowStepExecutionIDs removes the "workflow_step_executions" edge to the WorkflowStepExecution entity by IDs.

func (*ProjectMutation) RemoveWorkflowStepIDs added in v0.4.0

func (m *ProjectMutation) RemoveWorkflowStepIDs(ids ...object.ID)

RemoveWorkflowStepIDs removes the "workflow_steps" edge to the WorkflowStep entity by IDs.

func (*ProjectMutation) RemovedCatalogsIDs added in v0.4.0

func (m *ProjectMutation) RemovedCatalogsIDs() (ids []object.ID)

RemovedCatalogs returns the removed IDs of the "catalogs" edge to the Catalog entity.

func (*ProjectMutation) RemovedConnectorsIDs

func (m *ProjectMutation) RemovedConnectorsIDs() (ids []object.ID)

RemovedConnectors returns the removed IDs of the "connectors" edge to the Connector entity.

func (*ProjectMutation) RemovedEdges

func (m *ProjectMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProjectMutation) RemovedEnvironmentsIDs

func (m *ProjectMutation) RemovedEnvironmentsIDs() (ids []object.ID)

RemovedEnvironments returns the removed IDs of the "environments" edge to the Environment entity.

func (*ProjectMutation) RemovedIDs

func (m *ProjectMutation) 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 (*ProjectMutation) RemovedResourceComponentsIDs added in v0.4.0

func (m *ProjectMutation) RemovedResourceComponentsIDs() (ids []object.ID)

RemovedResourceComponents returns the removed IDs of the "resource_components" edge to the ResourceComponent entity.

func (*ProjectMutation) RemovedResourceRunsIDs added in v0.6.0

func (m *ProjectMutation) RemovedResourceRunsIDs() (ids []object.ID)

RemovedResourceRuns returns the removed IDs of the "resource_runs" edge to the ResourceRun entity.

func (*ProjectMutation) RemovedResourcesIDs added in v0.4.0

func (m *ProjectMutation) RemovedResourcesIDs() (ids []object.ID)

RemovedResources returns the removed IDs of the "resources" edge to the Resource entity.

func (*ProjectMutation) RemovedSubjectRolesIDs

func (m *ProjectMutation) RemovedSubjectRolesIDs() (ids []object.ID)

RemovedSubjectRoles returns the removed IDs of the "subject_roles" edge to the SubjectRoleRelationship entity.

func (*ProjectMutation) RemovedTemplateVersionsIDs added in v0.4.0

func (m *ProjectMutation) RemovedTemplateVersionsIDs() (ids []object.ID)

RemovedTemplateVersions returns the removed IDs of the "template_versions" edge to the TemplateVersion entity.

func (*ProjectMutation) RemovedTemplatesIDs added in v0.4.0

func (m *ProjectMutation) RemovedTemplatesIDs() (ids []object.ID)

RemovedTemplates returns the removed IDs of the "templates" edge to the Template entity.

func (*ProjectMutation) RemovedVariablesIDs

func (m *ProjectMutation) RemovedVariablesIDs() (ids []object.ID)

RemovedVariables returns the removed IDs of the "variables" edge to the Variable entity.

func (*ProjectMutation) RemovedWorkflowExecutionsIDs added in v0.4.0

func (m *ProjectMutation) RemovedWorkflowExecutionsIDs() (ids []object.ID)

RemovedWorkflowExecutions returns the removed IDs of the "workflow_executions" edge to the WorkflowExecution entity.

func (*ProjectMutation) RemovedWorkflowStageExecutionsIDs added in v0.4.0

func (m *ProjectMutation) RemovedWorkflowStageExecutionsIDs() (ids []object.ID)

RemovedWorkflowStageExecutions returns the removed IDs of the "workflow_stage_executions" edge to the WorkflowStageExecution entity.

func (*ProjectMutation) RemovedWorkflowStagesIDs added in v0.4.0

func (m *ProjectMutation) RemovedWorkflowStagesIDs() (ids []object.ID)

RemovedWorkflowStages returns the removed IDs of the "workflow_stages" edge to the WorkflowStage entity.

func (*ProjectMutation) RemovedWorkflowStepExecutionsIDs added in v0.4.0

func (m *ProjectMutation) RemovedWorkflowStepExecutionsIDs() (ids []object.ID)

RemovedWorkflowStepExecutions returns the removed IDs of the "workflow_step_executions" edge to the WorkflowStepExecution entity.

func (*ProjectMutation) RemovedWorkflowStepsIDs added in v0.4.0

func (m *ProjectMutation) RemovedWorkflowStepsIDs() (ids []object.ID)

RemovedWorkflowSteps returns the removed IDs of the "workflow_steps" edge to the WorkflowStep entity.

func (*ProjectMutation) RemovedWorkflowsIDs added in v0.4.0

func (m *ProjectMutation) RemovedWorkflowsIDs() (ids []object.ID)

RemovedWorkflows returns the removed IDs of the "workflows" edge to the Workflow entity.

func (*ProjectMutation) ResetAnnotations

func (m *ProjectMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*ProjectMutation) ResetCatalogs added in v0.4.0

func (m *ProjectMutation) ResetCatalogs()

ResetCatalogs resets all changes to the "catalogs" edge.

func (*ProjectMutation) ResetConnectors

func (m *ProjectMutation) ResetConnectors()

ResetConnectors resets all changes to the "connectors" edge.

func (*ProjectMutation) ResetCreateTime

func (m *ProjectMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ProjectMutation) ResetDescription

func (m *ProjectMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ProjectMutation) ResetEdge

func (m *ProjectMutation) 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 (*ProjectMutation) ResetEnvironments

func (m *ProjectMutation) ResetEnvironments()

ResetEnvironments resets all changes to the "environments" edge.

func (*ProjectMutation) ResetField

func (m *ProjectMutation) 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 (*ProjectMutation) ResetLabels

func (m *ProjectMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*ProjectMutation) ResetName

func (m *ProjectMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ProjectMutation) ResetResourceComponents added in v0.4.0

func (m *ProjectMutation) ResetResourceComponents()

ResetResourceComponents resets all changes to the "resource_components" edge.

func (*ProjectMutation) ResetResourceRuns added in v0.6.0

func (m *ProjectMutation) ResetResourceRuns()

ResetResourceRuns resets all changes to the "resource_runs" edge.

func (*ProjectMutation) ResetResources added in v0.4.0

func (m *ProjectMutation) ResetResources()

ResetResources resets all changes to the "resources" edge.

func (*ProjectMutation) ResetSubjectRoles

func (m *ProjectMutation) ResetSubjectRoles()

ResetSubjectRoles resets all changes to the "subject_roles" edge.

func (*ProjectMutation) ResetTemplateVersions added in v0.4.0

func (m *ProjectMutation) ResetTemplateVersions()

ResetTemplateVersions resets all changes to the "template_versions" edge.

func (*ProjectMutation) ResetTemplates added in v0.4.0

func (m *ProjectMutation) ResetTemplates()

ResetTemplates resets all changes to the "templates" edge.

func (*ProjectMutation) ResetUpdateTime

func (m *ProjectMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*ProjectMutation) ResetVariables

func (m *ProjectMutation) ResetVariables()

ResetVariables resets all changes to the "variables" edge.

func (*ProjectMutation) ResetWorkflowExecutions added in v0.4.0

func (m *ProjectMutation) ResetWorkflowExecutions()

ResetWorkflowExecutions resets all changes to the "workflow_executions" edge.

func (*ProjectMutation) ResetWorkflowStageExecutions added in v0.4.0

func (m *ProjectMutation) ResetWorkflowStageExecutions()

ResetWorkflowStageExecutions resets all changes to the "workflow_stage_executions" edge.

func (*ProjectMutation) ResetWorkflowStages added in v0.4.0

func (m *ProjectMutation) ResetWorkflowStages()

ResetWorkflowStages resets all changes to the "workflow_stages" edge.

func (*ProjectMutation) ResetWorkflowStepExecutions added in v0.4.0

func (m *ProjectMutation) ResetWorkflowStepExecutions()

ResetWorkflowStepExecutions resets all changes to the "workflow_step_executions" edge.

func (*ProjectMutation) ResetWorkflowSteps added in v0.4.0

func (m *ProjectMutation) ResetWorkflowSteps()

ResetWorkflowSteps resets all changes to the "workflow_steps" edge.

func (*ProjectMutation) ResetWorkflows added in v0.4.0

func (m *ProjectMutation) ResetWorkflows()

ResetWorkflows resets all changes to the "workflows" edge.

func (*ProjectMutation) ResourceComponentsCleared added in v0.4.0

func (m *ProjectMutation) ResourceComponentsCleared() bool

ResourceComponentsCleared reports if the "resource_components" edge to the ResourceComponent entity was cleared.

func (*ProjectMutation) ResourceComponentsIDs added in v0.4.0

func (m *ProjectMutation) ResourceComponentsIDs() (ids []object.ID)

ResourceComponentsIDs returns the "resource_components" edge IDs in the mutation.

func (*ProjectMutation) ResourceRunsCleared added in v0.6.0

func (m *ProjectMutation) ResourceRunsCleared() bool

ResourceRunsCleared reports if the "resource_runs" edge to the ResourceRun entity was cleared.

func (*ProjectMutation) ResourceRunsIDs added in v0.6.0

func (m *ProjectMutation) ResourceRunsIDs() (ids []object.ID)

ResourceRunsIDs returns the "resource_runs" edge IDs in the mutation.

func (*ProjectMutation) ResourcesCleared added in v0.4.0

func (m *ProjectMutation) ResourcesCleared() bool

ResourcesCleared reports if the "resources" edge to the Resource entity was cleared.

func (*ProjectMutation) ResourcesIDs added in v0.4.0

func (m *ProjectMutation) ResourcesIDs() (ids []object.ID)

ResourcesIDs returns the "resources" edge IDs in the mutation.

func (*ProjectMutation) SetAnnotations

func (m *ProjectMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*ProjectMutation) SetCreateTime

func (m *ProjectMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ProjectMutation) SetDescription

func (m *ProjectMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ProjectMutation) SetField

func (m *ProjectMutation) 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 (*ProjectMutation) SetID

func (m *ProjectMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Project entities.

func (*ProjectMutation) SetLabels

func (m *ProjectMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*ProjectMutation) SetName

func (m *ProjectMutation) SetName(s string)

SetName sets the "name" field.

func (*ProjectMutation) SetOp

func (m *ProjectMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProjectMutation) SetUpdateTime

func (m *ProjectMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*ProjectMutation) SubjectRolesCleared

func (m *ProjectMutation) SubjectRolesCleared() bool

SubjectRolesCleared reports if the "subject_roles" edge to the SubjectRoleRelationship entity was cleared.

func (*ProjectMutation) SubjectRolesIDs

func (m *ProjectMutation) SubjectRolesIDs() (ids []object.ID)

SubjectRolesIDs returns the "subject_roles" edge IDs in the mutation.

func (*ProjectMutation) TemplateVersionsCleared added in v0.4.0

func (m *ProjectMutation) TemplateVersionsCleared() bool

TemplateVersionsCleared reports if the "template_versions" edge to the TemplateVersion entity was cleared.

func (*ProjectMutation) TemplateVersionsIDs added in v0.4.0

func (m *ProjectMutation) TemplateVersionsIDs() (ids []object.ID)

TemplateVersionsIDs returns the "template_versions" edge IDs in the mutation.

func (*ProjectMutation) TemplatesCleared added in v0.4.0

func (m *ProjectMutation) TemplatesCleared() bool

TemplatesCleared reports if the "templates" edge to the Template entity was cleared.

func (*ProjectMutation) TemplatesIDs added in v0.4.0

func (m *ProjectMutation) TemplatesIDs() (ids []object.ID)

TemplatesIDs returns the "templates" edge IDs in the mutation.

func (ProjectMutation) Tx

func (m ProjectMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProjectMutation) Type

func (m *ProjectMutation) Type() string

Type returns the node type of this mutation (Project).

func (*ProjectMutation) UpdateTime

func (m *ProjectMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*ProjectMutation) VariablesCleared

func (m *ProjectMutation) VariablesCleared() bool

VariablesCleared reports if the "variables" edge to the Variable entity was cleared.

func (*ProjectMutation) VariablesIDs

func (m *ProjectMutation) VariablesIDs() (ids []object.ID)

VariablesIDs returns the "variables" edge IDs in the mutation.

func (*ProjectMutation) Where

func (m *ProjectMutation) Where(ps ...predicate.Project)

Where appends a list predicates to the ProjectMutation builder.

func (*ProjectMutation) WhereP

func (m *ProjectMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProjectMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ProjectMutation) WorkflowExecutionsCleared added in v0.4.0

func (m *ProjectMutation) WorkflowExecutionsCleared() bool

WorkflowExecutionsCleared reports if the "workflow_executions" edge to the WorkflowExecution entity was cleared.

func (*ProjectMutation) WorkflowExecutionsIDs added in v0.4.0

func (m *ProjectMutation) WorkflowExecutionsIDs() (ids []object.ID)

WorkflowExecutionsIDs returns the "workflow_executions" edge IDs in the mutation.

func (*ProjectMutation) WorkflowStageExecutionsCleared added in v0.4.0

func (m *ProjectMutation) WorkflowStageExecutionsCleared() bool

WorkflowStageExecutionsCleared reports if the "workflow_stage_executions" edge to the WorkflowStageExecution entity was cleared.

func (*ProjectMutation) WorkflowStageExecutionsIDs added in v0.4.0

func (m *ProjectMutation) WorkflowStageExecutionsIDs() (ids []object.ID)

WorkflowStageExecutionsIDs returns the "workflow_stage_executions" edge IDs in the mutation.

func (*ProjectMutation) WorkflowStagesCleared added in v0.4.0

func (m *ProjectMutation) WorkflowStagesCleared() bool

WorkflowStagesCleared reports if the "workflow_stages" edge to the WorkflowStage entity was cleared.

func (*ProjectMutation) WorkflowStagesIDs added in v0.4.0

func (m *ProjectMutation) WorkflowStagesIDs() (ids []object.ID)

WorkflowStagesIDs returns the "workflow_stages" edge IDs in the mutation.

func (*ProjectMutation) WorkflowStepExecutionsCleared added in v0.4.0

func (m *ProjectMutation) WorkflowStepExecutionsCleared() bool

WorkflowStepExecutionsCleared reports if the "workflow_step_executions" edge to the WorkflowStepExecution entity was cleared.

func (*ProjectMutation) WorkflowStepExecutionsIDs added in v0.4.0

func (m *ProjectMutation) WorkflowStepExecutionsIDs() (ids []object.ID)

WorkflowStepExecutionsIDs returns the "workflow_step_executions" edge IDs in the mutation.

func (*ProjectMutation) WorkflowStepsCleared added in v0.4.0

func (m *ProjectMutation) WorkflowStepsCleared() bool

WorkflowStepsCleared reports if the "workflow_steps" edge to the WorkflowStep entity was cleared.

func (*ProjectMutation) WorkflowStepsIDs added in v0.4.0

func (m *ProjectMutation) WorkflowStepsIDs() (ids []object.ID)

WorkflowStepsIDs returns the "workflow_steps" edge IDs in the mutation.

func (*ProjectMutation) WorkflowsCleared added in v0.4.0

func (m *ProjectMutation) WorkflowsCleared() bool

WorkflowsCleared reports if the "workflows" edge to the Workflow entity was cleared.

func (*ProjectMutation) WorkflowsIDs added in v0.4.0

func (m *ProjectMutation) WorkflowsIDs() (ids []object.ID)

WorkflowsIDs returns the "workflows" edge IDs in the mutation.

type ProjectOutput

type ProjectOutput struct {
	ID          object.ID         `json:"id,omitempty"`
	Name        string            `json:"name,omitempty"`
	Description string            `json:"description,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	CreateTime  *time.Time        `json:"createTime,omitempty"`
	UpdateTime  *time.Time        `json:"updateTime,omitempty"`
}

ProjectOutput holds the output of the Project entity.

func ExposeProject

func ExposeProject(_p *Project) *ProjectOutput

ExposeProject converts the Project to ProjectOutput.

func ExposeProjects

func ExposeProjects(_ps []*Project) []*ProjectOutput

ExposeProjects converts the Project slice to ProjectOutput pointer slice.

type ProjectPatchInput added in v0.5.0

type ProjectPatchInput struct {
	ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// contains filtered or unexported fields
}

ProjectPatchInput holds the patch input of the Project entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ProjectPatchInput) Model added in v0.5.0

func (ppi *ProjectPatchInput) Model() *Project

Model returns the Project patched entity, after validating.

func (*ProjectPatchInput) PatchModel added in v0.5.0

func (ppi *ProjectPatchInput) PatchModel() *Project

PatchModel returns the Project partition entity for patching.

func (*ProjectPatchInput) SetGinContext added in v0.5.0

func (ic *ProjectPatchInput) SetGinContext(ctx *gin.Context)

func (*ProjectPatchInput) SetModelClient added in v0.5.0

func (ic *ProjectPatchInput) SetModelClient(cli *Client)

func (*ProjectPatchInput) Validate added in v0.5.0

func (ppi *ProjectPatchInput) Validate() error

Validate checks the ProjectPatchInput entity.

func (*ProjectPatchInput) ValidateWith added in v0.5.0

func (ppi *ProjectPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectPatchInput entity with the given context and client set.

type ProjectQuery

type ProjectQuery struct {
	// contains filtered or unexported fields
}

ProjectQuery is the builder for querying Project entities.

func (*ProjectQuery) Aggregate

func (pq *ProjectQuery) Aggregate(fns ...AggregateFunc) *ProjectSelect

Aggregate returns a ProjectSelect configured with the given aggregations.

func (*ProjectQuery) All

func (pq *ProjectQuery) All(ctx context.Context) ([]*Project, error)

All executes the query and returns a list of Projects.

func (*ProjectQuery) AllX

func (pq *ProjectQuery) AllX(ctx context.Context) []*Project

AllX is like All, but panics if an error occurs.

func (*ProjectQuery) Clone

func (pq *ProjectQuery) Clone() *ProjectQuery

Clone returns a duplicate of the ProjectQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProjectQuery) Count

func (pq *ProjectQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProjectQuery) CountX

func (pq *ProjectQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProjectQuery) ExecContext

func (c *ProjectQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProjectQuery) Exist

func (pq *ProjectQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProjectQuery) ExistX

func (pq *ProjectQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProjectQuery) First

func (pq *ProjectQuery) First(ctx context.Context) (*Project, error)

First returns the first Project entity from the query. Returns a *NotFoundError when no Project was found.

func (*ProjectQuery) FirstID

func (pq *ProjectQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Project ID from the query. Returns a *NotFoundError when no Project ID was found.

func (*ProjectQuery) FirstIDX

func (pq *ProjectQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProjectQuery) FirstX

func (pq *ProjectQuery) FirstX(ctx context.Context) *Project

FirstX is like First, but panics if an error occurs.

func (*ProjectQuery) ForShare

func (pq *ProjectQuery) ForShare(opts ...sql.LockOption) *ProjectQuery

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 (*ProjectQuery) ForUpdate

func (pq *ProjectQuery) ForUpdate(opts ...sql.LockOption) *ProjectQuery

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 (*ProjectQuery) GroupBy

func (pq *ProjectQuery) GroupBy(field string, fields ...string) *ProjectGroupBy

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.Project.Query().
	GroupBy(project.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ProjectQuery) IDs

func (pq *ProjectQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Project IDs.

func (*ProjectQuery) IDsX

func (pq *ProjectQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*ProjectQuery) Limit

func (pq *ProjectQuery) Limit(limit int) *ProjectQuery

Limit the number of records to be returned by this query.

func (*ProjectQuery) Modify

func (pq *ProjectQuery) Modify(modifiers ...func(s *sql.Selector)) *ProjectSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ProjectQuery) Offset

func (pq *ProjectQuery) Offset(offset int) *ProjectQuery

Offset to start from.

func (*ProjectQuery) Only

func (pq *ProjectQuery) Only(ctx context.Context) (*Project, error)

Only returns a single Project entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Project entity is found. Returns a *NotFoundError when no Project entities are found.

func (*ProjectQuery) OnlyID

func (pq *ProjectQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only Project ID in the query. Returns a *NotSingularError when more than one Project ID is found. Returns a *NotFoundError when no entities are found.

func (*ProjectQuery) OnlyIDX

func (pq *ProjectQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProjectQuery) OnlyX

func (pq *ProjectQuery) OnlyX(ctx context.Context) *Project

OnlyX is like Only, but panics if an error occurs.

func (*ProjectQuery) Order

func (pq *ProjectQuery) Order(o ...project.OrderOption) *ProjectQuery

Order specifies how the records should be ordered.

func (*ProjectQuery) QueryCatalogs added in v0.4.0

func (pq *ProjectQuery) QueryCatalogs() *CatalogQuery

QueryCatalogs chains the current query on the "catalogs" edge.

func (*ProjectQuery) QueryConnectors

func (pq *ProjectQuery) QueryConnectors() *ConnectorQuery

QueryConnectors chains the current query on the "connectors" edge.

func (*ProjectQuery) QueryContext

func (c *ProjectQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProjectQuery) QueryEnvironments

func (pq *ProjectQuery) QueryEnvironments() *EnvironmentQuery

QueryEnvironments chains the current query on the "environments" edge.

func (*ProjectQuery) QueryResourceComponents added in v0.4.0

func (pq *ProjectQuery) QueryResourceComponents() *ResourceComponentQuery

QueryResourceComponents chains the current query on the "resource_components" edge.

func (*ProjectQuery) QueryResourceRuns added in v0.6.0

func (pq *ProjectQuery) QueryResourceRuns() *ResourceRunQuery

QueryResourceRuns chains the current query on the "resource_runs" edge.

func (*ProjectQuery) QueryResources added in v0.4.0

func (pq *ProjectQuery) QueryResources() *ResourceQuery

QueryResources chains the current query on the "resources" edge.

func (*ProjectQuery) QuerySubjectRoles

func (pq *ProjectQuery) QuerySubjectRoles() *SubjectRoleRelationshipQuery

QuerySubjectRoles chains the current query on the "subject_roles" edge.

func (*ProjectQuery) QueryTemplateVersions added in v0.4.0

func (pq *ProjectQuery) QueryTemplateVersions() *TemplateVersionQuery

QueryTemplateVersions chains the current query on the "template_versions" edge.

func (*ProjectQuery) QueryTemplates added in v0.4.0

func (pq *ProjectQuery) QueryTemplates() *TemplateQuery

QueryTemplates chains the current query on the "templates" edge.

func (*ProjectQuery) QueryVariables

func (pq *ProjectQuery) QueryVariables() *VariableQuery

QueryVariables chains the current query on the "variables" edge.

func (*ProjectQuery) QueryWorkflowExecutions added in v0.4.0

func (pq *ProjectQuery) QueryWorkflowExecutions() *WorkflowExecutionQuery

QueryWorkflowExecutions chains the current query on the "workflow_executions" edge.

func (*ProjectQuery) QueryWorkflowStageExecutions added in v0.4.0

func (pq *ProjectQuery) QueryWorkflowStageExecutions() *WorkflowStageExecutionQuery

QueryWorkflowStageExecutions chains the current query on the "workflow_stage_executions" edge.

func (*ProjectQuery) QueryWorkflowStages added in v0.4.0

func (pq *ProjectQuery) QueryWorkflowStages() *WorkflowStageQuery

QueryWorkflowStages chains the current query on the "workflow_stages" edge.

func (*ProjectQuery) QueryWorkflowStepExecutions added in v0.4.0

func (pq *ProjectQuery) QueryWorkflowStepExecutions() *WorkflowStepExecutionQuery

QueryWorkflowStepExecutions chains the current query on the "workflow_step_executions" edge.

func (*ProjectQuery) QueryWorkflowSteps added in v0.4.0

func (pq *ProjectQuery) QueryWorkflowSteps() *WorkflowStepQuery

QueryWorkflowSteps chains the current query on the "workflow_steps" edge.

func (*ProjectQuery) QueryWorkflows added in v0.4.0

func (pq *ProjectQuery) QueryWorkflows() *WorkflowQuery

QueryWorkflows chains the current query on the "workflows" edge.

func (*ProjectQuery) Select

func (pq *ProjectQuery) Select(fields ...string) *ProjectSelect

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.Project.Query().
	Select(project.FieldName).
	Scan(ctx, &v)

func (*ProjectQuery) Unique

func (pq *ProjectQuery) Unique(unique bool) *ProjectQuery

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 (*ProjectQuery) Where

func (pq *ProjectQuery) Where(ps ...predicate.Project) *ProjectQuery

Where adds a new predicate for the ProjectQuery builder.

func (*ProjectQuery) WhereP

func (pq *ProjectQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProjectQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ProjectQuery) WithCatalogs added in v0.4.0

func (pq *ProjectQuery) WithCatalogs(opts ...func(*CatalogQuery)) *ProjectQuery

WithCatalogs tells the query-builder to eager-load the nodes that are connected to the "catalogs" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithConnectors

func (pq *ProjectQuery) WithConnectors(opts ...func(*ConnectorQuery)) *ProjectQuery

WithConnectors tells the query-builder to eager-load the nodes that are connected to the "connectors" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithEnvironments

func (pq *ProjectQuery) WithEnvironments(opts ...func(*EnvironmentQuery)) *ProjectQuery

WithEnvironments tells the query-builder to eager-load the nodes that are connected to the "environments" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithResourceComponents added in v0.4.0

func (pq *ProjectQuery) WithResourceComponents(opts ...func(*ResourceComponentQuery)) *ProjectQuery

WithResourceComponents tells the query-builder to eager-load the nodes that are connected to the "resource_components" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithResourceRuns added in v0.6.0

func (pq *ProjectQuery) WithResourceRuns(opts ...func(*ResourceRunQuery)) *ProjectQuery

WithResourceRuns tells the query-builder to eager-load the nodes that are connected to the "resource_runs" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithResources added in v0.4.0

func (pq *ProjectQuery) WithResources(opts ...func(*ResourceQuery)) *ProjectQuery

WithResources tells the query-builder to eager-load the nodes that are connected to the "resources" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithSubjectRoles

func (pq *ProjectQuery) WithSubjectRoles(opts ...func(*SubjectRoleRelationshipQuery)) *ProjectQuery

WithSubjectRoles tells the query-builder to eager-load the nodes that are connected to the "subject_roles" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithTemplateVersions added in v0.4.0

func (pq *ProjectQuery) WithTemplateVersions(opts ...func(*TemplateVersionQuery)) *ProjectQuery

WithTemplateVersions tells the query-builder to eager-load the nodes that are connected to the "template_versions" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithTemplates added in v0.4.0

func (pq *ProjectQuery) WithTemplates(opts ...func(*TemplateQuery)) *ProjectQuery

WithTemplates tells the query-builder to eager-load the nodes that are connected to the "templates" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithVariables

func (pq *ProjectQuery) WithVariables(opts ...func(*VariableQuery)) *ProjectQuery

WithVariables tells the query-builder to eager-load the nodes that are connected to the "variables" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithWorkflowExecutions added in v0.4.0

func (pq *ProjectQuery) WithWorkflowExecutions(opts ...func(*WorkflowExecutionQuery)) *ProjectQuery

WithWorkflowExecutions tells the query-builder to eager-load the nodes that are connected to the "workflow_executions" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithWorkflowStageExecutions added in v0.4.0

func (pq *ProjectQuery) WithWorkflowStageExecutions(opts ...func(*WorkflowStageExecutionQuery)) *ProjectQuery

WithWorkflowStageExecutions tells the query-builder to eager-load the nodes that are connected to the "workflow_stage_executions" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithWorkflowStages added in v0.4.0

func (pq *ProjectQuery) WithWorkflowStages(opts ...func(*WorkflowStageQuery)) *ProjectQuery

WithWorkflowStages tells the query-builder to eager-load the nodes that are connected to the "workflow_stages" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithWorkflowStepExecutions added in v0.4.0

func (pq *ProjectQuery) WithWorkflowStepExecutions(opts ...func(*WorkflowStepExecutionQuery)) *ProjectQuery

WithWorkflowStepExecutions tells the query-builder to eager-load the nodes that are connected to the "workflow_step_executions" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithWorkflowSteps added in v0.4.0

func (pq *ProjectQuery) WithWorkflowSteps(opts ...func(*WorkflowStepQuery)) *ProjectQuery

WithWorkflowSteps tells the query-builder to eager-load the nodes that are connected to the "workflow_steps" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithWorkflows added in v0.4.0

func (pq *ProjectQuery) WithWorkflows(opts ...func(*WorkflowQuery)) *ProjectQuery

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 ProjectQueryInput

type ProjectQueryInput struct {

	// Refer holds the route path reference of the Project entity.
	Refer *object.Refer `path:"project,default=" query:"-" json:"-"`
	// ID of the Project entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Project entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

ProjectQueryInput holds the query input of the Project entity, please tags with `path:",inline"` if embedding.

func (*ProjectQueryInput) Model

func (pqi *ProjectQueryInput) Model() *Project

Model returns the Project entity for querying, after validating.

func (*ProjectQueryInput) SetGinContext

func (ic *ProjectQueryInput) SetGinContext(ctx *gin.Context)

func (*ProjectQueryInput) SetModelClient

func (ic *ProjectQueryInput) SetModelClient(cli *Client)

func (*ProjectQueryInput) Validate

func (pqi *ProjectQueryInput) Validate() error

Validate checks the ProjectQueryInput entity.

func (*ProjectQueryInput) ValidateWith

func (pqi *ProjectQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectQueryInput entity with the given context and client set.

type ProjectQueryInputs

type ProjectQueryInputs struct {
	// contains filtered or unexported fields
}

ProjectQueryInputs holds the query input of the Project entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ProjectQueryInputs) SetGinContext

func (ic *ProjectQueryInputs) SetGinContext(ctx *gin.Context)

func (*ProjectQueryInputs) SetModelClient

func (ic *ProjectQueryInputs) SetModelClient(cli *Client)

func (*ProjectQueryInputs) Validate

func (pqi *ProjectQueryInputs) Validate() error

Validate checks the ProjectQueryInputs entity.

func (*ProjectQueryInputs) ValidateWith

func (pqi *ProjectQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectQueryInputs entity with the given context and client set.

type ProjectSelect

type ProjectSelect struct {
	*ProjectQuery
	// contains filtered or unexported fields
}

ProjectSelect is the builder for selecting fields of Project entities.

func (*ProjectSelect) Aggregate

func (ps *ProjectSelect) Aggregate(fns ...AggregateFunc) *ProjectSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProjectSelect) Bool

func (s *ProjectSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) BoolX

func (s *ProjectSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProjectSelect) Bools

func (s *ProjectSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) BoolsX

func (s *ProjectSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ProjectSelect) ExecContext

func (c ProjectSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProjectSelect) Float64

func (s *ProjectSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) Float64X

func (s *ProjectSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProjectSelect) Float64s

func (s *ProjectSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) Float64sX

func (s *ProjectSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProjectSelect) Int

func (s *ProjectSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) IntX

func (s *ProjectSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProjectSelect) Ints

func (s *ProjectSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) IntsX

func (s *ProjectSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProjectSelect) Modify

func (ps *ProjectSelect) Modify(modifiers ...func(s *sql.Selector)) *ProjectSelect

Modify adds a query modifier for attaching custom logic to queries.

func (ProjectSelect) QueryContext

func (c ProjectSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProjectSelect) Scan

func (ps *ProjectSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProjectSelect) ScanX

func (s *ProjectSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProjectSelect) String

func (s *ProjectSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) StringX

func (s *ProjectSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProjectSelect) Strings

func (s *ProjectSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) StringsX

func (s *ProjectSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProjectUpdate

type ProjectUpdate struct {
	// contains filtered or unexported fields
}

ProjectUpdate is the builder for updating Project entities.

func (*ProjectUpdate) AddCatalogIDs added in v0.4.0

func (pu *ProjectUpdate) AddCatalogIDs(ids ...object.ID) *ProjectUpdate

AddCatalogIDs adds the "catalogs" edge to the Catalog entity by IDs.

func (*ProjectUpdate) AddCatalogs added in v0.4.0

func (pu *ProjectUpdate) AddCatalogs(c ...*Catalog) *ProjectUpdate

AddCatalogs adds the "catalogs" edges to the Catalog entity.

func (*ProjectUpdate) AddConnectorIDs

func (pu *ProjectUpdate) AddConnectorIDs(ids ...object.ID) *ProjectUpdate

AddConnectorIDs adds the "connectors" edge to the Connector entity by IDs.

func (*ProjectUpdate) AddConnectors

func (pu *ProjectUpdate) AddConnectors(c ...*Connector) *ProjectUpdate

AddConnectors adds the "connectors" edges to the Connector entity.

func (*ProjectUpdate) AddEnvironmentIDs

func (pu *ProjectUpdate) AddEnvironmentIDs(ids ...object.ID) *ProjectUpdate

AddEnvironmentIDs adds the "environments" edge to the Environment entity by IDs.

func (*ProjectUpdate) AddEnvironments

func (pu *ProjectUpdate) AddEnvironments(e ...*Environment) *ProjectUpdate

AddEnvironments adds the "environments" edges to the Environment entity.

func (*ProjectUpdate) AddResourceComponentIDs added in v0.4.0

func (pu *ProjectUpdate) AddResourceComponentIDs(ids ...object.ID) *ProjectUpdate

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by IDs.

func (*ProjectUpdate) AddResourceComponents added in v0.4.0

func (pu *ProjectUpdate) AddResourceComponents(r ...*ResourceComponent) *ProjectUpdate

AddResourceComponents adds the "resource_components" edges to the ResourceComponent entity.

func (*ProjectUpdate) AddResourceIDs added in v0.4.0

func (pu *ProjectUpdate) AddResourceIDs(ids ...object.ID) *ProjectUpdate

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*ProjectUpdate) AddResourceRunIDs added in v0.6.0

func (pu *ProjectUpdate) AddResourceRunIDs(ids ...object.ID) *ProjectUpdate

AddResourceRunIDs adds the "resource_runs" edge to the ResourceRun entity by IDs.

func (*ProjectUpdate) AddResourceRuns added in v0.6.0

func (pu *ProjectUpdate) AddResourceRuns(r ...*ResourceRun) *ProjectUpdate

AddResourceRuns adds the "resource_runs" edges to the ResourceRun entity.

func (*ProjectUpdate) AddResources added in v0.4.0

func (pu *ProjectUpdate) AddResources(r ...*Resource) *ProjectUpdate

AddResources adds the "resources" edges to the Resource entity.

func (*ProjectUpdate) AddSubjectRoleIDs

func (pu *ProjectUpdate) AddSubjectRoleIDs(ids ...object.ID) *ProjectUpdate

AddSubjectRoleIDs adds the "subject_roles" edge to the SubjectRoleRelationship entity by IDs.

func (*ProjectUpdate) AddSubjectRoles

func (pu *ProjectUpdate) AddSubjectRoles(s ...*SubjectRoleRelationship) *ProjectUpdate

AddSubjectRoles adds the "subject_roles" edges to the SubjectRoleRelationship entity.

func (*ProjectUpdate) AddTemplateIDs added in v0.4.0

func (pu *ProjectUpdate) AddTemplateIDs(ids ...object.ID) *ProjectUpdate

AddTemplateIDs adds the "templates" edge to the Template entity by IDs.

func (*ProjectUpdate) AddTemplateVersionIDs added in v0.4.0

func (pu *ProjectUpdate) AddTemplateVersionIDs(ids ...object.ID) *ProjectUpdate

AddTemplateVersionIDs adds the "template_versions" edge to the TemplateVersion entity by IDs.

func (*ProjectUpdate) AddTemplateVersions added in v0.4.0

func (pu *ProjectUpdate) AddTemplateVersions(t ...*TemplateVersion) *ProjectUpdate

AddTemplateVersions adds the "template_versions" edges to the TemplateVersion entity.

func (*ProjectUpdate) AddTemplates added in v0.4.0

func (pu *ProjectUpdate) AddTemplates(t ...*Template) *ProjectUpdate

AddTemplates adds the "templates" edges to the Template entity.

func (*ProjectUpdate) AddVariableIDs

func (pu *ProjectUpdate) AddVariableIDs(ids ...object.ID) *ProjectUpdate

AddVariableIDs adds the "variables" edge to the Variable entity by IDs.

func (*ProjectUpdate) AddVariables

func (pu *ProjectUpdate) AddVariables(v ...*Variable) *ProjectUpdate

AddVariables adds the "variables" edges to the Variable entity.

func (*ProjectUpdate) AddWorkflowExecutionIDs added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowExecutionIDs(ids ...object.ID) *ProjectUpdate

AddWorkflowExecutionIDs adds the "workflow_executions" edge to the WorkflowExecution entity by IDs.

func (*ProjectUpdate) AddWorkflowExecutions added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowExecutions(w ...*WorkflowExecution) *ProjectUpdate

AddWorkflowExecutions adds the "workflow_executions" edges to the WorkflowExecution entity.

func (*ProjectUpdate) AddWorkflowIDs added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowIDs(ids ...object.ID) *ProjectUpdate

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*ProjectUpdate) AddWorkflowStageExecutionIDs added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowStageExecutionIDs(ids ...object.ID) *ProjectUpdate

AddWorkflowStageExecutionIDs adds the "workflow_stage_executions" edge to the WorkflowStageExecution entity by IDs.

func (*ProjectUpdate) AddWorkflowStageExecutions added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowStageExecutions(w ...*WorkflowStageExecution) *ProjectUpdate

AddWorkflowStageExecutions adds the "workflow_stage_executions" edges to the WorkflowStageExecution entity.

func (*ProjectUpdate) AddWorkflowStageIDs added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowStageIDs(ids ...object.ID) *ProjectUpdate

AddWorkflowStageIDs adds the "workflow_stages" edge to the WorkflowStage entity by IDs.

func (*ProjectUpdate) AddWorkflowStages added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowStages(w ...*WorkflowStage) *ProjectUpdate

AddWorkflowStages adds the "workflow_stages" edges to the WorkflowStage entity.

func (*ProjectUpdate) AddWorkflowStepExecutionIDs added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowStepExecutionIDs(ids ...object.ID) *ProjectUpdate

AddWorkflowStepExecutionIDs adds the "workflow_step_executions" edge to the WorkflowStepExecution entity by IDs.

func (*ProjectUpdate) AddWorkflowStepExecutions added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowStepExecutions(w ...*WorkflowStepExecution) *ProjectUpdate

AddWorkflowStepExecutions adds the "workflow_step_executions" edges to the WorkflowStepExecution entity.

func (*ProjectUpdate) AddWorkflowStepIDs added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowStepIDs(ids ...object.ID) *ProjectUpdate

AddWorkflowStepIDs adds the "workflow_steps" edge to the WorkflowStep entity by IDs.

func (*ProjectUpdate) AddWorkflowSteps added in v0.4.0

func (pu *ProjectUpdate) AddWorkflowSteps(w ...*WorkflowStep) *ProjectUpdate

AddWorkflowSteps adds the "workflow_steps" edges to the WorkflowStep entity.

func (*ProjectUpdate) AddWorkflows added in v0.4.0

func (pu *ProjectUpdate) AddWorkflows(w ...*Workflow) *ProjectUpdate

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*ProjectUpdate) ClearAnnotations

func (pu *ProjectUpdate) ClearAnnotations() *ProjectUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*ProjectUpdate) ClearCatalogs added in v0.4.0

func (pu *ProjectUpdate) ClearCatalogs() *ProjectUpdate

ClearCatalogs clears all "catalogs" edges to the Catalog entity.

func (*ProjectUpdate) ClearConnectors

func (pu *ProjectUpdate) ClearConnectors() *ProjectUpdate

ClearConnectors clears all "connectors" edges to the Connector entity.

func (*ProjectUpdate) ClearDescription

func (pu *ProjectUpdate) ClearDescription() *ProjectUpdate

ClearDescription clears the value of the "description" field.

func (*ProjectUpdate) ClearEnvironments

func (pu *ProjectUpdate) ClearEnvironments() *ProjectUpdate

ClearEnvironments clears all "environments" edges to the Environment entity.

func (*ProjectUpdate) ClearLabels

func (pu *ProjectUpdate) ClearLabels() *ProjectUpdate

ClearLabels clears the value of the "labels" field.

func (*ProjectUpdate) ClearResourceComponents added in v0.4.0

func (pu *ProjectUpdate) ClearResourceComponents() *ProjectUpdate

ClearResourceComponents clears all "resource_components" edges to the ResourceComponent entity.

func (*ProjectUpdate) ClearResourceRuns added in v0.6.0

func (pu *ProjectUpdate) ClearResourceRuns() *ProjectUpdate

ClearResourceRuns clears all "resource_runs" edges to the ResourceRun entity.

func (*ProjectUpdate) ClearResources added in v0.4.0

func (pu *ProjectUpdate) ClearResources() *ProjectUpdate

ClearResources clears all "resources" edges to the Resource entity.

func (*ProjectUpdate) ClearSubjectRoles

func (pu *ProjectUpdate) ClearSubjectRoles() *ProjectUpdate

ClearSubjectRoles clears all "subject_roles" edges to the SubjectRoleRelationship entity.

func (*ProjectUpdate) ClearTemplateVersions added in v0.4.0

func (pu *ProjectUpdate) ClearTemplateVersions() *ProjectUpdate

ClearTemplateVersions clears all "template_versions" edges to the TemplateVersion entity.

func (*ProjectUpdate) ClearTemplates added in v0.4.0

func (pu *ProjectUpdate) ClearTemplates() *ProjectUpdate

ClearTemplates clears all "templates" edges to the Template entity.

func (*ProjectUpdate) ClearVariables

func (pu *ProjectUpdate) ClearVariables() *ProjectUpdate

ClearVariables clears all "variables" edges to the Variable entity.

func (*ProjectUpdate) ClearWorkflowExecutions added in v0.4.0

func (pu *ProjectUpdate) ClearWorkflowExecutions() *ProjectUpdate

ClearWorkflowExecutions clears all "workflow_executions" edges to the WorkflowExecution entity.

func (*ProjectUpdate) ClearWorkflowStageExecutions added in v0.4.0

func (pu *ProjectUpdate) ClearWorkflowStageExecutions() *ProjectUpdate

ClearWorkflowStageExecutions clears all "workflow_stage_executions" edges to the WorkflowStageExecution entity.

func (*ProjectUpdate) ClearWorkflowStages added in v0.4.0

func (pu *ProjectUpdate) ClearWorkflowStages() *ProjectUpdate

ClearWorkflowStages clears all "workflow_stages" edges to the WorkflowStage entity.

func (*ProjectUpdate) ClearWorkflowStepExecutions added in v0.4.0

func (pu *ProjectUpdate) ClearWorkflowStepExecutions() *ProjectUpdate

ClearWorkflowStepExecutions clears all "workflow_step_executions" edges to the WorkflowStepExecution entity.

func (*ProjectUpdate) ClearWorkflowSteps added in v0.4.0

func (pu *ProjectUpdate) ClearWorkflowSteps() *ProjectUpdate

ClearWorkflowSteps clears all "workflow_steps" edges to the WorkflowStep entity.

func (*ProjectUpdate) ClearWorkflows added in v0.4.0

func (pu *ProjectUpdate) ClearWorkflows() *ProjectUpdate

ClearWorkflows clears all "workflows" edges to the Workflow entity.

func (*ProjectUpdate) Exec

func (pu *ProjectUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectUpdate) ExecContext

func (c *ProjectUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProjectUpdate) ExecX

func (pu *ProjectUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectUpdate) Modify

func (pu *ProjectUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProjectUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ProjectUpdate) Mutation

func (pu *ProjectUpdate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdate) QueryContext

func (c *ProjectUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProjectUpdate) RemoveCatalogIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveCatalogIDs(ids ...object.ID) *ProjectUpdate

RemoveCatalogIDs removes the "catalogs" edge to Catalog entities by IDs.

func (*ProjectUpdate) RemoveCatalogs added in v0.4.0

func (pu *ProjectUpdate) RemoveCatalogs(c ...*Catalog) *ProjectUpdate

RemoveCatalogs removes "catalogs" edges to Catalog entities.

func (*ProjectUpdate) RemoveConnectorIDs

func (pu *ProjectUpdate) RemoveConnectorIDs(ids ...object.ID) *ProjectUpdate

RemoveConnectorIDs removes the "connectors" edge to Connector entities by IDs.

func (*ProjectUpdate) RemoveConnectors

func (pu *ProjectUpdate) RemoveConnectors(c ...*Connector) *ProjectUpdate

RemoveConnectors removes "connectors" edges to Connector entities.

func (*ProjectUpdate) RemoveEnvironmentIDs

func (pu *ProjectUpdate) RemoveEnvironmentIDs(ids ...object.ID) *ProjectUpdate

RemoveEnvironmentIDs removes the "environments" edge to Environment entities by IDs.

func (*ProjectUpdate) RemoveEnvironments

func (pu *ProjectUpdate) RemoveEnvironments(e ...*Environment) *ProjectUpdate

RemoveEnvironments removes "environments" edges to Environment entities.

func (*ProjectUpdate) RemoveResourceComponentIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveResourceComponentIDs(ids ...object.ID) *ProjectUpdate

RemoveResourceComponentIDs removes the "resource_components" edge to ResourceComponent entities by IDs.

func (*ProjectUpdate) RemoveResourceComponents added in v0.4.0

func (pu *ProjectUpdate) RemoveResourceComponents(r ...*ResourceComponent) *ProjectUpdate

RemoveResourceComponents removes "resource_components" edges to ResourceComponent entities.

func (*ProjectUpdate) RemoveResourceIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveResourceIDs(ids ...object.ID) *ProjectUpdate

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*ProjectUpdate) RemoveResourceRunIDs added in v0.6.0

func (pu *ProjectUpdate) RemoveResourceRunIDs(ids ...object.ID) *ProjectUpdate

RemoveResourceRunIDs removes the "resource_runs" edge to ResourceRun entities by IDs.

func (*ProjectUpdate) RemoveResourceRuns added in v0.6.0

func (pu *ProjectUpdate) RemoveResourceRuns(r ...*ResourceRun) *ProjectUpdate

RemoveResourceRuns removes "resource_runs" edges to ResourceRun entities.

func (*ProjectUpdate) RemoveResources added in v0.4.0

func (pu *ProjectUpdate) RemoveResources(r ...*Resource) *ProjectUpdate

RemoveResources removes "resources" edges to Resource entities.

func (*ProjectUpdate) RemoveSubjectRoleIDs

func (pu *ProjectUpdate) RemoveSubjectRoleIDs(ids ...object.ID) *ProjectUpdate

RemoveSubjectRoleIDs removes the "subject_roles" edge to SubjectRoleRelationship entities by IDs.

func (*ProjectUpdate) RemoveSubjectRoles

func (pu *ProjectUpdate) RemoveSubjectRoles(s ...*SubjectRoleRelationship) *ProjectUpdate

RemoveSubjectRoles removes "subject_roles" edges to SubjectRoleRelationship entities.

func (*ProjectUpdate) RemoveTemplateIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveTemplateIDs(ids ...object.ID) *ProjectUpdate

RemoveTemplateIDs removes the "templates" edge to Template entities by IDs.

func (*ProjectUpdate) RemoveTemplateVersionIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveTemplateVersionIDs(ids ...object.ID) *ProjectUpdate

RemoveTemplateVersionIDs removes the "template_versions" edge to TemplateVersion entities by IDs.

func (*ProjectUpdate) RemoveTemplateVersions added in v0.4.0

func (pu *ProjectUpdate) RemoveTemplateVersions(t ...*TemplateVersion) *ProjectUpdate

RemoveTemplateVersions removes "template_versions" edges to TemplateVersion entities.

func (*ProjectUpdate) RemoveTemplates added in v0.4.0

func (pu *ProjectUpdate) RemoveTemplates(t ...*Template) *ProjectUpdate

RemoveTemplates removes "templates" edges to Template entities.

func (*ProjectUpdate) RemoveVariableIDs

func (pu *ProjectUpdate) RemoveVariableIDs(ids ...object.ID) *ProjectUpdate

RemoveVariableIDs removes the "variables" edge to Variable entities by IDs.

func (*ProjectUpdate) RemoveVariables

func (pu *ProjectUpdate) RemoveVariables(v ...*Variable) *ProjectUpdate

RemoveVariables removes "variables" edges to Variable entities.

func (*ProjectUpdate) RemoveWorkflowExecutionIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowExecutionIDs(ids ...object.ID) *ProjectUpdate

RemoveWorkflowExecutionIDs removes the "workflow_executions" edge to WorkflowExecution entities by IDs.

func (*ProjectUpdate) RemoveWorkflowExecutions added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowExecutions(w ...*WorkflowExecution) *ProjectUpdate

RemoveWorkflowExecutions removes "workflow_executions" edges to WorkflowExecution entities.

func (*ProjectUpdate) RemoveWorkflowIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowIDs(ids ...object.ID) *ProjectUpdate

RemoveWorkflowIDs removes the "workflows" edge to Workflow entities by IDs.

func (*ProjectUpdate) RemoveWorkflowStageExecutionIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowStageExecutionIDs(ids ...object.ID) *ProjectUpdate

RemoveWorkflowStageExecutionIDs removes the "workflow_stage_executions" edge to WorkflowStageExecution entities by IDs.

func (*ProjectUpdate) RemoveWorkflowStageExecutions added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowStageExecutions(w ...*WorkflowStageExecution) *ProjectUpdate

RemoveWorkflowStageExecutions removes "workflow_stage_executions" edges to WorkflowStageExecution entities.

func (*ProjectUpdate) RemoveWorkflowStageIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowStageIDs(ids ...object.ID) *ProjectUpdate

RemoveWorkflowStageIDs removes the "workflow_stages" edge to WorkflowStage entities by IDs.

func (*ProjectUpdate) RemoveWorkflowStages added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowStages(w ...*WorkflowStage) *ProjectUpdate

RemoveWorkflowStages removes "workflow_stages" edges to WorkflowStage entities.

func (*ProjectUpdate) RemoveWorkflowStepExecutionIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowStepExecutionIDs(ids ...object.ID) *ProjectUpdate

RemoveWorkflowStepExecutionIDs removes the "workflow_step_executions" edge to WorkflowStepExecution entities by IDs.

func (*ProjectUpdate) RemoveWorkflowStepExecutions added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowStepExecutions(w ...*WorkflowStepExecution) *ProjectUpdate

RemoveWorkflowStepExecutions removes "workflow_step_executions" edges to WorkflowStepExecution entities.

func (*ProjectUpdate) RemoveWorkflowStepIDs added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowStepIDs(ids ...object.ID) *ProjectUpdate

RemoveWorkflowStepIDs removes the "workflow_steps" edge to WorkflowStep entities by IDs.

func (*ProjectUpdate) RemoveWorkflowSteps added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflowSteps(w ...*WorkflowStep) *ProjectUpdate

RemoveWorkflowSteps removes "workflow_steps" edges to WorkflowStep entities.

func (*ProjectUpdate) RemoveWorkflows added in v0.4.0

func (pu *ProjectUpdate) RemoveWorkflows(w ...*Workflow) *ProjectUpdate

RemoveWorkflows removes "workflows" edges to Workflow entities.

func (*ProjectUpdate) Save

func (pu *ProjectUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProjectUpdate) SaveX

func (pu *ProjectUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProjectUpdate) Set

func (pu *ProjectUpdate) Set(obj *Project) *ProjectUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ProjectUpdate) SetAnnotations

func (pu *ProjectUpdate) SetAnnotations(m map[string]string) *ProjectUpdate

SetAnnotations sets the "annotations" field.

func (*ProjectUpdate) SetDescription

func (pu *ProjectUpdate) SetDescription(s string) *ProjectUpdate

SetDescription sets the "description" field.

func (*ProjectUpdate) SetLabels

func (pu *ProjectUpdate) SetLabels(m map[string]string) *ProjectUpdate

SetLabels sets the "labels" field.

func (*ProjectUpdate) SetNillableDescription

func (pu *ProjectUpdate) SetNillableDescription(s *string) *ProjectUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ProjectUpdate) SetUpdateTime

func (pu *ProjectUpdate) SetUpdateTime(t time.Time) *ProjectUpdate

SetUpdateTime sets the "update_time" field.

func (*ProjectUpdate) Where

func (pu *ProjectUpdate) Where(ps ...predicate.Project) *ProjectUpdate

Where appends a list predicates to the ProjectUpdate builder.

type ProjectUpdateInput

type ProjectUpdateInput struct {
	ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
}

ProjectUpdateInput holds the modification input of the Project entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ProjectUpdateInput) Model

func (pui *ProjectUpdateInput) Model() *Project

Model returns the Project entity for modifying, after validating.

func (*ProjectUpdateInput) SetGinContext

func (ic *ProjectUpdateInput) SetGinContext(ctx *gin.Context)

func (*ProjectUpdateInput) SetModelClient

func (ic *ProjectUpdateInput) SetModelClient(cli *Client)

func (*ProjectUpdateInput) Validate

func (pui *ProjectUpdateInput) Validate() error

Validate checks the ProjectUpdateInput entity.

func (*ProjectUpdateInput) ValidateWith

func (pui *ProjectUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectUpdateInput entity with the given context and client set.

type ProjectUpdateInputs

type ProjectUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ProjectUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ProjectUpdateInputs holds the modification input of the Project entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ProjectUpdateInputs) IDs

func (pui *ProjectUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Project entities for modifying, after validating.

func (*ProjectUpdateInputs) Model

func (pui *ProjectUpdateInputs) Model() []*Project

Model returns the Project entities for modifying, after validating.

func (*ProjectUpdateInputs) SetGinContext

func (ic *ProjectUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ProjectUpdateInputs) SetModelClient

func (ic *ProjectUpdateInputs) SetModelClient(cli *Client)

func (*ProjectUpdateInputs) Validate

func (pui *ProjectUpdateInputs) Validate() error

Validate checks the ProjectUpdateInputs entity.

func (*ProjectUpdateInputs) ValidateWith

func (pui *ProjectUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectUpdateInputs entity with the given context and client set.

type ProjectUpdateInputsItem

type ProjectUpdateInputsItem struct {
	// ID of the Project entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Project entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
}

ProjectUpdateInputs holds the modification input item of the Project entities.

func (*ProjectUpdateInputsItem) ValidateWith

func (pui *ProjectUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ProjectUpdateInputsItem entity with the given context and client set.

type ProjectUpdateOne

type ProjectUpdateOne struct {
	// contains filtered or unexported fields
}

ProjectUpdateOne is the builder for updating a single Project entity.

func (*ProjectUpdateOne) AddCatalogIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddCatalogIDs(ids ...object.ID) *ProjectUpdateOne

AddCatalogIDs adds the "catalogs" edge to the Catalog entity by IDs.

func (*ProjectUpdateOne) AddCatalogs added in v0.4.0

func (puo *ProjectUpdateOne) AddCatalogs(c ...*Catalog) *ProjectUpdateOne

AddCatalogs adds the "catalogs" edges to the Catalog entity.

func (*ProjectUpdateOne) AddConnectorIDs

func (puo *ProjectUpdateOne) AddConnectorIDs(ids ...object.ID) *ProjectUpdateOne

AddConnectorIDs adds the "connectors" edge to the Connector entity by IDs.

func (*ProjectUpdateOne) AddConnectors

func (puo *ProjectUpdateOne) AddConnectors(c ...*Connector) *ProjectUpdateOne

AddConnectors adds the "connectors" edges to the Connector entity.

func (*ProjectUpdateOne) AddEnvironmentIDs

func (puo *ProjectUpdateOne) AddEnvironmentIDs(ids ...object.ID) *ProjectUpdateOne

AddEnvironmentIDs adds the "environments" edge to the Environment entity by IDs.

func (*ProjectUpdateOne) AddEnvironments

func (puo *ProjectUpdateOne) AddEnvironments(e ...*Environment) *ProjectUpdateOne

AddEnvironments adds the "environments" edges to the Environment entity.

func (*ProjectUpdateOne) AddResourceComponentIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddResourceComponentIDs(ids ...object.ID) *ProjectUpdateOne

AddResourceComponentIDs adds the "resource_components" edge to the ResourceComponent entity by IDs.

func (*ProjectUpdateOne) AddResourceComponents added in v0.4.0

func (puo *ProjectUpdateOne) AddResourceComponents(r ...*ResourceComponent) *ProjectUpdateOne

AddResourceComponents adds the "resource_components" edges to the ResourceComponent entity.

func (*ProjectUpdateOne) AddResourceIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddResourceIDs(ids ...object.ID) *ProjectUpdateOne

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*ProjectUpdateOne) AddResourceRunIDs added in v0.6.0

func (puo *ProjectUpdateOne) AddResourceRunIDs(ids ...object.ID) *ProjectUpdateOne

AddResourceRunIDs adds the "resource_runs" edge to the ResourceRun entity by IDs.

func (*ProjectUpdateOne) AddResourceRuns added in v0.6.0

func (puo *ProjectUpdateOne) AddResourceRuns(r ...*ResourceRun) *ProjectUpdateOne

AddResourceRuns adds the "resource_runs" edges to the ResourceRun entity.

func (*ProjectUpdateOne) AddResources added in v0.4.0

func (puo *ProjectUpdateOne) AddResources(r ...*Resource) *ProjectUpdateOne

AddResources adds the "resources" edges to the Resource entity.

func (*ProjectUpdateOne) AddSubjectRoleIDs

func (puo *ProjectUpdateOne) AddSubjectRoleIDs(ids ...object.ID) *ProjectUpdateOne

AddSubjectRoleIDs adds the "subject_roles" edge to the SubjectRoleRelationship entity by IDs.

func (*ProjectUpdateOne) AddSubjectRoles

func (puo *ProjectUpdateOne) AddSubjectRoles(s ...*SubjectRoleRelationship) *ProjectUpdateOne

AddSubjectRoles adds the "subject_roles" edges to the SubjectRoleRelationship entity.

func (*ProjectUpdateOne) AddTemplateIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddTemplateIDs(ids ...object.ID) *ProjectUpdateOne

AddTemplateIDs adds the "templates" edge to the Template entity by IDs.

func (*ProjectUpdateOne) AddTemplateVersionIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddTemplateVersionIDs(ids ...object.ID) *ProjectUpdateOne

AddTemplateVersionIDs adds the "template_versions" edge to the TemplateVersion entity by IDs.

func (*ProjectUpdateOne) AddTemplateVersions added in v0.4.0

func (puo *ProjectUpdateOne) AddTemplateVersions(t ...*TemplateVersion) *ProjectUpdateOne

AddTemplateVersions adds the "template_versions" edges to the TemplateVersion entity.

func (*ProjectUpdateOne) AddTemplates added in v0.4.0

func (puo *ProjectUpdateOne) AddTemplates(t ...*Template) *ProjectUpdateOne

AddTemplates adds the "templates" edges to the Template entity.

func (*ProjectUpdateOne) AddVariableIDs

func (puo *ProjectUpdateOne) AddVariableIDs(ids ...object.ID) *ProjectUpdateOne

AddVariableIDs adds the "variables" edge to the Variable entity by IDs.

func (*ProjectUpdateOne) AddVariables

func (puo *ProjectUpdateOne) AddVariables(v ...*Variable) *ProjectUpdateOne

AddVariables adds the "variables" edges to the Variable entity.

func (*ProjectUpdateOne) AddWorkflowExecutionIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowExecutionIDs(ids ...object.ID) *ProjectUpdateOne

AddWorkflowExecutionIDs adds the "workflow_executions" edge to the WorkflowExecution entity by IDs.

func (*ProjectUpdateOne) AddWorkflowExecutions added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowExecutions(w ...*WorkflowExecution) *ProjectUpdateOne

AddWorkflowExecutions adds the "workflow_executions" edges to the WorkflowExecution entity.

func (*ProjectUpdateOne) AddWorkflowIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowIDs(ids ...object.ID) *ProjectUpdateOne

AddWorkflowIDs adds the "workflows" edge to the Workflow entity by IDs.

func (*ProjectUpdateOne) AddWorkflowStageExecutionIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowStageExecutionIDs(ids ...object.ID) *ProjectUpdateOne

AddWorkflowStageExecutionIDs adds the "workflow_stage_executions" edge to the WorkflowStageExecution entity by IDs.

func (*ProjectUpdateOne) AddWorkflowStageExecutions added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowStageExecutions(w ...*WorkflowStageExecution) *ProjectUpdateOne

AddWorkflowStageExecutions adds the "workflow_stage_executions" edges to the WorkflowStageExecution entity.

func (*ProjectUpdateOne) AddWorkflowStageIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowStageIDs(ids ...object.ID) *ProjectUpdateOne

AddWorkflowStageIDs adds the "workflow_stages" edge to the WorkflowStage entity by IDs.

func (*ProjectUpdateOne) AddWorkflowStages added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowStages(w ...*WorkflowStage) *ProjectUpdateOne

AddWorkflowStages adds the "workflow_stages" edges to the WorkflowStage entity.

func (*ProjectUpdateOne) AddWorkflowStepExecutionIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowStepExecutionIDs(ids ...object.ID) *ProjectUpdateOne

AddWorkflowStepExecutionIDs adds the "workflow_step_executions" edge to the WorkflowStepExecution entity by IDs.

func (*ProjectUpdateOne) AddWorkflowStepExecutions added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowStepExecutions(w ...*WorkflowStepExecution) *ProjectUpdateOne

AddWorkflowStepExecutions adds the "workflow_step_executions" edges to the WorkflowStepExecution entity.

func (*ProjectUpdateOne) AddWorkflowStepIDs added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowStepIDs(ids ...object.ID) *ProjectUpdateOne

AddWorkflowStepIDs adds the "workflow_steps" edge to the WorkflowStep entity by IDs.

func (*ProjectUpdateOne) AddWorkflowSteps added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflowSteps(w ...*WorkflowStep) *ProjectUpdateOne

AddWorkflowSteps adds the "workflow_steps" edges to the WorkflowStep entity.

func (*ProjectUpdateOne) AddWorkflows added in v0.4.0

func (puo *ProjectUpdateOne) AddWorkflows(w ...*Workflow) *ProjectUpdateOne

AddWorkflows adds the "workflows" edges to the Workflow entity.

func (*ProjectUpdateOne) ClearAnnotations

func (puo *ProjectUpdateOne) ClearAnnotations() *ProjectUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*ProjectUpdateOne) ClearCatalogs added in v0.4.0

func (puo *ProjectUpdateOne) ClearCatalogs() *ProjectUpdateOne

ClearCatalogs clears all "catalogs" edges to the Catalog entity.

func (*ProjectUpdateOne) ClearConnectors

func (puo *ProjectUpdateOne) ClearConnectors() *ProjectUpdateOne

ClearConnectors clears all "connectors" edges to the Connector entity.

func (*ProjectUpdateOne) ClearDescription

func (puo *ProjectUpdateOne) ClearDescription() *ProjectUpdateOne

ClearDescription clears the value of the "description" field.

func (*ProjectUpdateOne) ClearEnvironments

func (puo *ProjectUpdateOne) ClearEnvironments() *ProjectUpdateOne

ClearEnvironments clears all "environments" edges to the Environment entity.

func (*ProjectUpdateOne) ClearLabels

func (puo *ProjectUpdateOne) ClearLabels() *ProjectUpdateOne

ClearLabels clears the value of the "labels" field.

func (*ProjectUpdateOne) ClearResourceComponents added in v0.4.0

func (puo *ProjectUpdateOne) ClearResourceComponents() *ProjectUpdateOne

ClearResourceComponents clears all "resource_components" edges to the ResourceComponent entity.

func (*ProjectUpdateOne) ClearResourceRuns added in v0.6.0

func (puo *ProjectUpdateOne) ClearResourceRuns() *ProjectUpdateOne

ClearResourceRuns clears all "resource_runs" edges to the ResourceRun entity.

func (*ProjectUpdateOne) ClearResources added in v0.4.0

func (puo *ProjectUpdateOne) ClearResources() *ProjectUpdateOne

ClearResources clears all "resources" edges to the Resource entity.

func (*ProjectUpdateOne) ClearSubjectRoles

func (puo *ProjectUpdateOne) ClearSubjectRoles() *ProjectUpdateOne

ClearSubjectRoles clears all "subject_roles" edges to the SubjectRoleRelationship entity.

func (*ProjectUpdateOne) ClearTemplateVersions added in v0.4.0

func (puo *ProjectUpdateOne) ClearTemplateVersions() *ProjectUpdateOne

ClearTemplateVersions clears all "template_versions" edges to the TemplateVersion entity.

func (*ProjectUpdateOne) ClearTemplates added in v0.4.0

func (puo *ProjectUpdateOne) ClearTemplates() *ProjectUpdateOne

ClearTemplates clears all "templates" edges to the Template entity.

func (*ProjectUpdateOne) ClearVariables

func (puo *ProjectUpdateOne) ClearVariables() *ProjectUpdateOne

ClearVariables clears all "variables" edges to the Variable entity.

func (*ProjectUpdateOne) ClearWorkflowExecutions added in v0.4.0

func (puo *ProjectUpdateOne) ClearWorkflowExecutions() *ProjectUpdateOne

ClearWorkflowExecutions clears all "workflow_executions" edges to the WorkflowExecution entity.

func (*ProjectUpdateOne) ClearWorkflowStageExecutions added in v0.4.0

func (puo *ProjectUpdateOne) ClearWorkflowStageExecutions() *ProjectUpdateOne

ClearWorkflowStageExecutions clears all "workflow_stage_executions" edges to the WorkflowStageExecution entity.

func (*ProjectUpdateOne) ClearWorkflowStages added in v0.4.0

func (puo *ProjectUpdateOne) ClearWorkflowStages() *ProjectUpdateOne

ClearWorkflowStages clears all "workflow_stages" edges to the WorkflowStage entity.

func (*ProjectUpdateOne) ClearWorkflowStepExecutions added in v0.4.0

func (puo *ProjectUpdateOne) ClearWorkflowStepExecutions() *ProjectUpdateOne

ClearWorkflowStepExecutions clears all "workflow_step_executions" edges to the WorkflowStepExecution entity.

func (*ProjectUpdateOne) ClearWorkflowSteps added in v0.4.0

func (puo *ProjectUpdateOne) ClearWorkflowSteps() *ProjectUpdateOne

ClearWorkflowSteps clears all "workflow_steps" edges to the WorkflowStep entity.

func (*ProjectUpdateOne) ClearWorkflows added in v0.4.0

func (puo *ProjectUpdateOne) ClearWorkflows() *ProjectUpdateOne

ClearWorkflows clears all "workflows" edges to the Workflow entity.

func (*ProjectUpdateOne) Exec

func (puo *ProjectUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProjectUpdateOne) ExecContext

func (c *ProjectUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProjectUpdateOne) ExecE

func (puo *ProjectUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Project) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*ProjectUpdateOne) ExecEX

func (puo *ProjectUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Project) error)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectUpdateOne) ExecX

func (puo *ProjectUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectUpdateOne) Modify

func (puo *ProjectUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProjectUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ProjectUpdateOne) Mutation

func (puo *ProjectUpdateOne) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdateOne) QueryContext

func (c *ProjectUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProjectUpdateOne) RemoveCatalogIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveCatalogIDs(ids ...object.ID) *ProjectUpdateOne

RemoveCatalogIDs removes the "catalogs" edge to Catalog entities by IDs.

func (*ProjectUpdateOne) RemoveCatalogs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveCatalogs(c ...*Catalog) *ProjectUpdateOne

RemoveCatalogs removes "catalogs" edges to Catalog entities.

func (*ProjectUpdateOne) RemoveConnectorIDs

func (puo *ProjectUpdateOne) RemoveConnectorIDs(ids ...object.ID) *ProjectUpdateOne

RemoveConnectorIDs removes the "connectors" edge to Connector entities by IDs.

func (*ProjectUpdateOne) RemoveConnectors

func (puo *ProjectUpdateOne) RemoveConnectors(c ...*Connector) *ProjectUpdateOne

RemoveConnectors removes "connectors" edges to Connector entities.

func (*ProjectUpdateOne) RemoveEnvironmentIDs

func (puo *ProjectUpdateOne) RemoveEnvironmentIDs(ids ...object.ID) *ProjectUpdateOne

RemoveEnvironmentIDs removes the "environments" edge to Environment entities by IDs.

func (*ProjectUpdateOne) RemoveEnvironments

func (puo *ProjectUpdateOne) RemoveEnvironments(e ...*Environment) *ProjectUpdateOne

RemoveEnvironments removes "environments" edges to Environment entities.

func (*ProjectUpdateOne) RemoveResourceComponentIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveResourceComponentIDs(ids ...object.ID) *ProjectUpdateOne

RemoveResourceComponentIDs removes the "resource_components" edge to ResourceComponent entities by IDs.

func (*ProjectUpdateOne) RemoveResourceComponents added in v0.4.0

func (puo *ProjectUpdateOne) RemoveResourceComponents(r ...*ResourceComponent) *ProjectUpdateOne

RemoveResourceComponents removes "resource_components" edges to ResourceComponent entities.

func (*ProjectUpdateOne) RemoveResourceIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveResourceIDs(ids ...object.ID) *ProjectUpdateOne

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*ProjectUpdateOne) RemoveResourceRunIDs added in v0.6.0

func (puo *ProjectUpdateOne) RemoveResourceRunIDs(ids ...object.ID) *ProjectUpdateOne

RemoveResourceRunIDs removes the "resource_runs" edge to ResourceRun entities by IDs.

func (*ProjectUpdateOne) RemoveResourceRuns added in v0.6.0

func (puo *ProjectUpdateOne) RemoveResourceRuns(r ...*ResourceRun) *ProjectUpdateOne

RemoveResourceRuns removes "resource_runs" edges to ResourceRun entities.

func (*ProjectUpdateOne) RemoveResources added in v0.4.0

func (puo *ProjectUpdateOne) RemoveResources(r ...*Resource) *ProjectUpdateOne

RemoveResources removes "resources" edges to Resource entities.

func (*ProjectUpdateOne) RemoveSubjectRoleIDs

func (puo *ProjectUpdateOne) RemoveSubjectRoleIDs(ids ...object.ID) *ProjectUpdateOne

RemoveSubjectRoleIDs removes the "subject_roles" edge to SubjectRoleRelationship entities by IDs.

func (*ProjectUpdateOne) RemoveSubjectRoles

func (puo *ProjectUpdateOne) RemoveSubjectRoles(s ...*SubjectRoleRelationship) *ProjectUpdateOne

RemoveSubjectRoles removes "subject_roles" edges to SubjectRoleRelationship entities.

func (*ProjectUpdateOne) RemoveTemplateIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveTemplateIDs(ids ...object.ID) *ProjectUpdateOne

RemoveTemplateIDs removes the "templates" edge to Template entities by IDs.

func (*ProjectUpdateOne) RemoveTemplateVersionIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveTemplateVersionIDs(ids ...object.ID) *ProjectUpdateOne

RemoveTemplateVersionIDs removes the "template_versions" edge to TemplateVersion entities by IDs.

func (*ProjectUpdateOne) RemoveTemplateVersions added in v0.4.0

func (puo *ProjectUpdateOne) RemoveTemplateVersions(t ...*TemplateVersion) *ProjectUpdateOne

RemoveTemplateVersions removes "template_versions" edges to TemplateVersion entities.

func (*ProjectUpdateOne) RemoveTemplates added in v0.4.0

func (puo *ProjectUpdateOne) RemoveTemplates(t ...*Template) *ProjectUpdateOne

RemoveTemplates removes "templates" edges to Template entities.

func (*ProjectUpdateOne) RemoveVariableIDs

func (puo *ProjectUpdateOne) RemoveVariableIDs(ids ...object.ID) *ProjectUpdateOne

RemoveVariableIDs removes the "variables" edge to Variable entities by IDs.

func (*ProjectUpdateOne) RemoveVariables

func (puo *ProjectUpdateOne) RemoveVariables(v ...*Variable) *ProjectUpdateOne

RemoveVariables removes "variables" edges to Variable entities.

func (*ProjectUpdateOne) RemoveWorkflowExecutionIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowExecutionIDs(ids ...object.ID) *ProjectUpdateOne

RemoveWorkflowExecutionIDs removes the "workflow_executions" edge to WorkflowExecution entities by IDs.

func (*ProjectUpdateOne) RemoveWorkflowExecutions added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowExecutions(w ...*WorkflowExecution) *ProjectUpdateOne

RemoveWorkflowExecutions removes "workflow_executions" edges to WorkflowExecution entities.

func (*ProjectUpdateOne) RemoveWorkflowIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowIDs(ids ...object.ID) *ProjectUpdateOne

RemoveWorkflowIDs removes the "workflows" edge to Workflow entities by IDs.

func (*ProjectUpdateOne) RemoveWorkflowStageExecutionIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowStageExecutionIDs(ids ...object.ID) *ProjectUpdateOne

RemoveWorkflowStageExecutionIDs removes the "workflow_stage_executions" edge to WorkflowStageExecution entities by IDs.

func (*ProjectUpdateOne) RemoveWorkflowStageExecutions added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowStageExecutions(w ...*WorkflowStageExecution) *ProjectUpdateOne

RemoveWorkflowStageExecutions removes "workflow_stage_executions" edges to WorkflowStageExecution entities.

func (*ProjectUpdateOne) RemoveWorkflowStageIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowStageIDs(ids ...object.ID) *ProjectUpdateOne

RemoveWorkflowStageIDs removes the "workflow_stages" edge to WorkflowStage entities by IDs.

func (*ProjectUpdateOne) RemoveWorkflowStages added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowStages(w ...*WorkflowStage) *ProjectUpdateOne

RemoveWorkflowStages removes "workflow_stages" edges to WorkflowStage entities.

func (*ProjectUpdateOne) RemoveWorkflowStepExecutionIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowStepExecutionIDs(ids ...object.ID) *ProjectUpdateOne

RemoveWorkflowStepExecutionIDs removes the "workflow_step_executions" edge to WorkflowStepExecution entities by IDs.

func (*ProjectUpdateOne) RemoveWorkflowStepExecutions added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowStepExecutions(w ...*WorkflowStepExecution) *ProjectUpdateOne

RemoveWorkflowStepExecutions removes "workflow_step_executions" edges to WorkflowStepExecution entities.

func (*ProjectUpdateOne) RemoveWorkflowStepIDs added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowStepIDs(ids ...object.ID) *ProjectUpdateOne

RemoveWorkflowStepIDs removes the "workflow_steps" edge to WorkflowStep entities by IDs.

func (*ProjectUpdateOne) RemoveWorkflowSteps added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflowSteps(w ...*WorkflowStep) *ProjectUpdateOne

RemoveWorkflowSteps removes "workflow_steps" edges to WorkflowStep entities.

func (*ProjectUpdateOne) RemoveWorkflows added in v0.4.0

func (puo *ProjectUpdateOne) RemoveWorkflows(w ...*Workflow) *ProjectUpdateOne

RemoveWorkflows removes "workflows" edges to Workflow entities.

func (*ProjectUpdateOne) Save

func (puo *ProjectUpdateOne) Save(ctx context.Context) (*Project, error)

Save executes the query and returns the updated Project entity.

func (*ProjectUpdateOne) SaveE

func (puo *ProjectUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Project) error) (*Project, error)

SaveE calls the given function after updated the Project entity, which is always good for cascading update operations.

func (*ProjectUpdateOne) SaveEX

func (puo *ProjectUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Project) error) *Project

SaveEX is like SaveE, but panics if an error occurs.

func (*ProjectUpdateOne) SaveX

func (puo *ProjectUpdateOne) SaveX(ctx context.Context) *Project

SaveX is like Save, but panics if an error occurs.

func (*ProjectUpdateOne) Select

func (puo *ProjectUpdateOne) Select(field string, fields ...string) *ProjectUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProjectUpdateOne) Set

func (puo *ProjectUpdateOne) Set(obj *Project) *ProjectUpdateOne

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*ProjectUpdateOne) SetAnnotations

func (puo *ProjectUpdateOne) SetAnnotations(m map[string]string) *ProjectUpdateOne

SetAnnotations sets the "annotations" field.

func (*ProjectUpdateOne) SetDescription

func (puo *ProjectUpdateOne) SetDescription(s string) *ProjectUpdateOne

SetDescription sets the "description" field.

func (*ProjectUpdateOne) SetLabels

func (puo *ProjectUpdateOne) SetLabels(m map[string]string) *ProjectUpdateOne

SetLabels sets the "labels" field.

func (*ProjectUpdateOne) SetNillableDescription

func (puo *ProjectUpdateOne) SetNillableDescription(s *string) *ProjectUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ProjectUpdateOne) SetUpdateTime

func (puo *ProjectUpdateOne) SetUpdateTime(t time.Time) *ProjectUpdateOne

SetUpdateTime sets the "update_time" field.

func (*ProjectUpdateOne) Where

Where appends a list predicates to the ProjectUpdate builder.

type ProjectUpsert

type ProjectUpsert struct {
	*sql.UpdateSet
}

ProjectUpsert is the "OnConflict" setter.

func (*ProjectUpsert) ClearAnnotations

func (u *ProjectUpsert) ClearAnnotations() *ProjectUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*ProjectUpsert) ClearDescription

func (u *ProjectUpsert) ClearDescription() *ProjectUpsert

ClearDescription clears the value of the "description" field.

func (*ProjectUpsert) ClearLabels

func (u *ProjectUpsert) ClearLabels() *ProjectUpsert

ClearLabels clears the value of the "labels" field.

func (*ProjectUpsert) SetAnnotations

func (u *ProjectUpsert) SetAnnotations(v map[string]string) *ProjectUpsert

SetAnnotations sets the "annotations" field.

func (*ProjectUpsert) SetDescription

func (u *ProjectUpsert) SetDescription(v string) *ProjectUpsert

SetDescription sets the "description" field.

func (*ProjectUpsert) SetLabels

func (u *ProjectUpsert) SetLabels(v map[string]string) *ProjectUpsert

SetLabels sets the "labels" field.

func (*ProjectUpsert) SetUpdateTime

func (u *ProjectUpsert) SetUpdateTime(v time.Time) *ProjectUpsert

SetUpdateTime sets the "update_time" field.

func (*ProjectUpsert) UpdateAnnotations

func (u *ProjectUpsert) UpdateAnnotations() *ProjectUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ProjectUpsert) UpdateDescription

func (u *ProjectUpsert) UpdateDescription() *ProjectUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ProjectUpsert) UpdateLabels

func (u *ProjectUpsert) UpdateLabels() *ProjectUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ProjectUpsert) UpdateUpdateTime

func (u *ProjectUpsert) UpdateUpdateTime() *ProjectUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ProjectUpsertBulk

type ProjectUpsertBulk struct {
	// contains filtered or unexported fields
}

ProjectUpsertBulk is the builder for "upsert"-ing a bulk of Project nodes.

func (*ProjectUpsertBulk) ClearAnnotations

func (u *ProjectUpsertBulk) ClearAnnotations() *ProjectUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*ProjectUpsertBulk) ClearDescription

func (u *ProjectUpsertBulk) ClearDescription() *ProjectUpsertBulk

ClearDescription clears the value of the "description" field.

func (*ProjectUpsertBulk) ClearLabels

func (u *ProjectUpsertBulk) ClearLabels() *ProjectUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*ProjectUpsertBulk) DoNothing

func (u *ProjectUpsertBulk) DoNothing() *ProjectUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProjectUpsertBulk) Exec

func (u *ProjectUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectUpsertBulk) ExecE

func (u *ProjectUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Project) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ProjectUpsertBulk) ExecEX

func (u *ProjectUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Project) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ProjectUpsertBulk) ExecX

func (u *ProjectUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectUpsertBulk) Ignore

func (u *ProjectUpsertBulk) Ignore() *ProjectUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ProjectUpsertBulk) SetAnnotations

func (u *ProjectUpsertBulk) SetAnnotations(v map[string]string) *ProjectUpsertBulk

SetAnnotations sets the "annotations" field.

func (*ProjectUpsertBulk) SetDescription

func (u *ProjectUpsertBulk) SetDescription(v string) *ProjectUpsertBulk

SetDescription sets the "description" field.

func (*ProjectUpsertBulk) SetLabels

func (u *ProjectUpsertBulk) SetLabels(v map[string]string) *ProjectUpsertBulk

SetLabels sets the "labels" field.

func (*ProjectUpsertBulk) SetUpdateTime

func (u *ProjectUpsertBulk) SetUpdateTime(v time.Time) *ProjectUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*ProjectUpsertBulk) Update

func (u *ProjectUpsertBulk) Update(set func(*ProjectUpsert)) *ProjectUpsertBulk

Update allows overriding fields `UPDATE` values. See the ProjectCreateBulk.OnConflict documentation for more info.

func (*ProjectUpsertBulk) UpdateAnnotations

func (u *ProjectUpsertBulk) UpdateAnnotations() *ProjectUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateDescription

func (u *ProjectUpsertBulk) UpdateDescription() *ProjectUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateLabels

func (u *ProjectUpsertBulk) UpdateLabels() *ProjectUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateNewValues

func (u *ProjectUpsertBulk) UpdateNewValues() *ProjectUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(project.FieldID)
		}),
	).
	Exec(ctx)

func (*ProjectUpsertBulk) UpdateUpdateTime

func (u *ProjectUpsertBulk) UpdateUpdateTime() *ProjectUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ProjectUpsertOne

type ProjectUpsertOne struct {
	// contains filtered or unexported fields
}

ProjectUpsertOne is the builder for "upsert"-ing

one Project node.

func (*ProjectUpsertOne) ClearAnnotations

func (u *ProjectUpsertOne) ClearAnnotations() *ProjectUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*ProjectUpsertOne) ClearDescription

func (u *ProjectUpsertOne) ClearDescription() *ProjectUpsertOne

ClearDescription clears the value of the "description" field.

func (*ProjectUpsertOne) ClearLabels

func (u *ProjectUpsertOne) ClearLabels() *ProjectUpsertOne

ClearLabels clears the value of the "labels" field.

func (*ProjectUpsertOne) DoNothing

func (u *ProjectUpsertOne) DoNothing() *ProjectUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProjectUpsertOne) Exec

func (u *ProjectUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectUpsertOne) ExecE

func (u *ProjectUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Project) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ProjectUpsertOne) ExecEX

func (u *ProjectUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Project) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ProjectUpsertOne) ExecX

func (u *ProjectUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectUpsertOne) ID

func (u *ProjectUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ProjectUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*ProjectUpsertOne) Ignore

func (u *ProjectUpsertOne) Ignore() *ProjectUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Project.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ProjectUpsertOne) SetAnnotations

func (u *ProjectUpsertOne) SetAnnotations(v map[string]string) *ProjectUpsertOne

SetAnnotations sets the "annotations" field.

func (*ProjectUpsertOne) SetDescription

func (u *ProjectUpsertOne) SetDescription(v string) *ProjectUpsertOne

SetDescription sets the "description" field.

func (*ProjectUpsertOne) SetLabels

func (u *ProjectUpsertOne) SetLabels(v map[string]string) *ProjectUpsertOne

SetLabels sets the "labels" field.

func (*ProjectUpsertOne) SetUpdateTime

func (u *ProjectUpsertOne) SetUpdateTime(v time.Time) *ProjectUpsertOne

SetUpdateTime sets the "update_time" field.

func (*ProjectUpsertOne) Update

func (u *ProjectUpsertOne) Update(set func(*ProjectUpsert)) *ProjectUpsertOne

Update allows overriding fields `UPDATE` values. See the ProjectCreate.OnConflict documentation for more info.

func (*ProjectUpsertOne) UpdateAnnotations

func (u *ProjectUpsertOne) UpdateAnnotations() *ProjectUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateDescription

func (u *ProjectUpsertOne) UpdateDescription() *ProjectUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateLabels

func (u *ProjectUpsertOne) UpdateLabels() *ProjectUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateNewValues

func (u *ProjectUpsertOne) UpdateNewValues() *ProjectUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(project.FieldID)
		}),
	).
	Exec(ctx)

func (*ProjectUpsertOne) UpdateUpdateTime

func (u *ProjectUpsertOne) UpdateUpdateTime() *ProjectUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Projects

type Projects []*Project

Projects is a parsable slice of Project.

func (Projects) View

func (_ps Projects) View() []*ProjectOutput

View returns the output of Project entities.

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 Resource added in v0.4.0

type Resource struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `json:"status,omitempty"`
	// ID of the project to belong.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the environment to which the resource deploys.
	EnvironmentID object.ID `json:"environment_id,omitempty"`
	// ID of the template version to which the resource belong.
	TemplateID *object.ID `json:"template_id,omitempty"`
	// Type of the resource referring to a resource definition type.
	Type string `json:"type,omitempty"`
	// ID of the resource definition to which the resource use.
	ResourceDefinitionID *object.ID `json:"resource_definition_id,omitempty"`
	// ID of the resource definition matching rule to which the resource use.
	ResourceDefinitionMatchingRuleID *object.ID `json:"resource_definition_matching_rule_id,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `json:"attributes"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `json:"computedAttributes"`
	// Endpoints of the resource.
	Endpoints types.ResourceEndpoints `json:"endpoints,omitempty,cli-table-column"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ResourceQuery when eager-loading is set.
	Edges ResourceEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

Resource is the model entity for the Resource schema.

func (*Resource) ExecContext added in v0.4.0

func (c *Resource) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Resource) QueryComponents added in v0.4.0

func (r *Resource) QueryComponents() *ResourceComponentQuery

QueryComponents queries the "components" edge of the Resource entity.

func (*Resource) QueryContext added in v0.4.0

func (c *Resource) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Resource) QueryDependencies added in v0.4.0

func (r *Resource) QueryDependencies() *ResourceRelationshipQuery

QueryDependencies queries the "dependencies" edge of the Resource entity.

func (*Resource) QueryEnvironment added in v0.4.0

func (r *Resource) QueryEnvironment() *EnvironmentQuery

QueryEnvironment queries the "environment" edge of the Resource entity.

func (*Resource) QueryProject added in v0.4.0

func (r *Resource) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Resource entity.

func (*Resource) QueryResourceDefinition added in v0.4.0

func (r *Resource) QueryResourceDefinition() *ResourceDefinitionQuery

QueryResourceDefinition queries the "resource_definition" edge of the Resource entity.

func (*Resource) QueryResourceDefinitionMatchingRule added in v0.5.0

func (r *Resource) QueryResourceDefinitionMatchingRule() *ResourceDefinitionMatchingRuleQuery

QueryResourceDefinitionMatchingRule queries the "resource_definition_matching_rule" edge of the Resource entity.

func (*Resource) QueryRuns added in v0.6.0

func (r *Resource) QueryRuns() *ResourceRunQuery

QueryRuns queries the "runs" edge of the Resource entity.

func (*Resource) QueryState added in v0.6.0

func (r *Resource) QueryState() *ResourceStateQuery

QueryState queries the "state" edge of the Resource entity.

func (*Resource) QueryTemplate added in v0.4.0

func (r *Resource) QueryTemplate() *TemplateVersionQuery

QueryTemplate queries the "template" edge of the Resource entity.

func (*Resource) String added in v0.4.0

func (r *Resource) String() string

String implements the fmt.Stringer.

func (*Resource) Unwrap added in v0.4.0

func (r *Resource) Unwrap() *Resource

Unwrap unwraps the Resource 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 (*Resource) Update added in v0.4.0

func (r *Resource) Update() *ResourceUpdateOne

Update returns a builder for updating this Resource. Note that you need to call Resource.Unwrap() before calling this method if this Resource was returned from a transaction, and the transaction was committed or rolled back.

func (*Resource) Value added in v0.4.0

func (r *Resource) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Resource. This includes values selected through modifiers, order, etc.

func (*Resource) View added in v0.4.0

func (_r *Resource) View() *ResourceOutput

View returns the output of Resource entity.

type ResourceClient added in v0.4.0

type ResourceClient struct {
	// contains filtered or unexported fields
}

ResourceClient is a client for the Resource schema.

func NewResourceClient added in v0.4.0

func NewResourceClient(c config) *ResourceClient

NewResourceClient returns a client for the Resource from the given config.

func (*ResourceClient) Create added in v0.4.0

func (c *ResourceClient) Create() *ResourceCreate

Create returns a builder for creating a Resource entity.

func (*ResourceClient) CreateBulk added in v0.4.0

func (c *ResourceClient) CreateBulk(builders ...*ResourceCreate) *ResourceCreateBulk

CreateBulk returns a builder for creating a bulk of Resource entities.

func (*ResourceClient) Delete added in v0.4.0

func (c *ResourceClient) Delete() *ResourceDelete

Delete returns a delete builder for Resource.

func (*ResourceClient) DeleteOne added in v0.4.0

func (c *ResourceClient) DeleteOne(r *Resource) *ResourceDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ResourceClient) DeleteOneID added in v0.4.0

func (c *ResourceClient) DeleteOneID(id object.ID) *ResourceDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ResourceClient) ExecContext added in v0.4.0

func (c *ResourceClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceClient) Get added in v0.4.0

func (c *ResourceClient) Get(ctx context.Context, id object.ID) (*Resource, error)

Get returns a Resource entity by its id.

func (*ResourceClient) GetX added in v0.4.0

func (c *ResourceClient) GetX(ctx context.Context, id object.ID) *Resource

GetX is like Get, but panics if an error occurs.

func (*ResourceClient) Hooks added in v0.4.0

func (c *ResourceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ResourceClient) Intercept added in v0.4.0

func (c *ResourceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `resource.Intercept(f(g(h())))`.

func (*ResourceClient) Interceptors added in v0.4.0

func (c *ResourceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ResourceClient) MapCreateBulk added in v0.5.0

func (c *ResourceClient) MapCreateBulk(slice any, setFunc func(*ResourceCreate, int)) *ResourceCreateBulk

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 (*ResourceClient) Query added in v0.4.0

func (c *ResourceClient) Query() *ResourceQuery

Query returns a query builder for Resource.

func (*ResourceClient) QueryComponents added in v0.4.0

func (c *ResourceClient) QueryComponents(r *Resource) *ResourceComponentQuery

QueryComponents queries the components edge of a Resource.

func (*ResourceClient) QueryContext added in v0.4.0

func (c *ResourceClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceClient) QueryDependencies added in v0.4.0

func (c *ResourceClient) QueryDependencies(r *Resource) *ResourceRelationshipQuery

QueryDependencies queries the dependencies edge of a Resource.

func (*ResourceClient) QueryEnvironment added in v0.4.0

func (c *ResourceClient) QueryEnvironment(r *Resource) *EnvironmentQuery

QueryEnvironment queries the environment edge of a Resource.

func (*ResourceClient) QueryProject added in v0.4.0

func (c *ResourceClient) QueryProject(r *Resource) *ProjectQuery

QueryProject queries the project edge of a Resource.

func (*ResourceClient) QueryResourceDefinition added in v0.4.0

func (c *ResourceClient) QueryResourceDefinition(r *Resource) *ResourceDefinitionQuery

QueryResourceDefinition queries the resource_definition edge of a Resource.

func (*ResourceClient) QueryResourceDefinitionMatchingRule added in v0.5.0

func (c *ResourceClient) QueryResourceDefinitionMatchingRule(r *Resource) *ResourceDefinitionMatchingRuleQuery

QueryResourceDefinitionMatchingRule queries the resource_definition_matching_rule edge of a Resource.

func (*ResourceClient) QueryRuns added in v0.6.0

func (c *ResourceClient) QueryRuns(r *Resource) *ResourceRunQuery

QueryRuns queries the runs edge of a Resource.

func (*ResourceClient) QueryState added in v0.6.0

func (c *ResourceClient) QueryState(r *Resource) *ResourceStateQuery

QueryState queries the state edge of a Resource.

func (*ResourceClient) QueryTemplate added in v0.4.0

func (c *ResourceClient) QueryTemplate(r *Resource) *TemplateVersionQuery

QueryTemplate queries the template edge of a Resource.

func (*ResourceClient) Update added in v0.4.0

func (c *ResourceClient) Update() *ResourceUpdate

Update returns an update builder for Resource.

func (*ResourceClient) UpdateOne added in v0.4.0

func (c *ResourceClient) UpdateOne(r *Resource) *ResourceUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ResourceClient) UpdateOneID added in v0.4.0

func (c *ResourceClient) UpdateOneID(id object.ID) *ResourceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ResourceClient) Use added in v0.4.0

func (c *ResourceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resource.Hooks(f(g(h())))`.

type ResourceClientGetter added in v0.4.0

type ResourceClientGetter interface {
	// Resources returns the client for interacting with the Resource builders.
	Resources() *ResourceClient
}

ResourceClientGetter is an interface that allows getting ResourceClient.

type ResourceComponent added in v0.4.0

type ResourceComponent struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `json:"status,omitempty"`
	// ID of the project to belong.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the environment to which the component belongs.
	EnvironmentID object.ID `json:"environment_id,omitempty"`
	// ID of the resource to which the component belongs.
	ResourceID object.ID `json:"resource_id,omitempty"`
	// ID of the connector to which the component deploys.
	ConnectorID object.ID `json:"connector_id,omitempty"`
	// ID of the parent component.
	CompositionID object.ID `json:"composition_id,omitempty"`
	// ID of the parent class of the component realization.
	ClassID object.ID `json:"class_id,omitempty"`
	// Mode that manages the generated component, it is the management way of the deployer to the component, which provides by deployer.
	Mode string `json:"mode,omitempty"`
	// Type of the generated component, it is the type of the resource which the deployer observes, which provides by deployer.
	Type string `json:"type,omitempty,cli-table-column"`
	// Name of the generated component, it is the real identifier of the component, which provides by deployer.
	Name string `json:"name,omitempty"`
	// Type of deployer.
	DeployerType string `json:"deployer_type,omitempty"`
	// Shape of the component, it can be class or instance shape.
	Shape string `json:"shape,omitempty"`
	// Index key to identify the component instance.
	IndexKey string `json:"index_key,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ResourceComponentQuery when eager-loading is set.
	Edges ResourceComponentEdges `json:"edges,omitempty"`

	// Keys of the component.
	// Keys does not store in the database.
	Keys *types.ResourceComponentOperationKeys `json:"keys,omitempty"`
	// contains filtered or unexported fields
}

ResourceComponent is the model entity for the ResourceComponent schema.

func (*ResourceComponent) ExecContext added in v0.4.0

func (c *ResourceComponent) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponent) QueryClass added in v0.4.0

func (rc *ResourceComponent) QueryClass() *ResourceComponentQuery

QueryClass queries the "class" edge of the ResourceComponent entity.

func (*ResourceComponent) QueryComponents added in v0.4.0

func (rc *ResourceComponent) QueryComponents() *ResourceComponentQuery

QueryComponents queries the "components" edge of the ResourceComponent entity.

func (*ResourceComponent) QueryComposition added in v0.4.0

func (rc *ResourceComponent) QueryComposition() *ResourceComponentQuery

QueryComposition queries the "composition" edge of the ResourceComponent entity.

func (*ResourceComponent) QueryConnector added in v0.4.0

func (rc *ResourceComponent) QueryConnector() *ConnectorQuery

QueryConnector queries the "connector" edge of the ResourceComponent entity.

func (*ResourceComponent) QueryContext added in v0.4.0

func (c *ResourceComponent) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponent) QueryDependencies added in v0.4.0

func (rc *ResourceComponent) QueryDependencies() *ResourceComponentRelationshipQuery

QueryDependencies queries the "dependencies" edge of the ResourceComponent entity.

func (*ResourceComponent) QueryEnvironment added in v0.4.0

func (rc *ResourceComponent) QueryEnvironment() *EnvironmentQuery

QueryEnvironment queries the "environment" edge of the ResourceComponent entity.

func (*ResourceComponent) QueryInstances added in v0.4.0

func (rc *ResourceComponent) QueryInstances() *ResourceComponentQuery

QueryInstances queries the "instances" edge of the ResourceComponent entity.

func (*ResourceComponent) QueryProject added in v0.4.0

func (rc *ResourceComponent) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the ResourceComponent entity.

func (*ResourceComponent) QueryResource added in v0.4.0

func (rc *ResourceComponent) QueryResource() *ResourceQuery

QueryResource queries the "resource" edge of the ResourceComponent entity.

func (*ResourceComponent) String added in v0.4.0

func (rc *ResourceComponent) String() string

String implements the fmt.Stringer.

func (*ResourceComponent) Unwrap added in v0.4.0

func (rc *ResourceComponent) Unwrap() *ResourceComponent

Unwrap unwraps the ResourceComponent 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 (*ResourceComponent) Update added in v0.4.0

Update returns a builder for updating this ResourceComponent. Note that you need to call ResourceComponent.Unwrap() before calling this method if this ResourceComponent was returned from a transaction, and the transaction was committed or rolled back.

func (*ResourceComponent) Value added in v0.4.0

func (rc *ResourceComponent) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ResourceComponent. This includes values selected through modifiers, order, etc.

func (*ResourceComponent) View added in v0.4.0

View returns the output of ResourceComponent entity.

type ResourceComponentClient added in v0.4.0

type ResourceComponentClient struct {
	// contains filtered or unexported fields
}

ResourceComponentClient is a client for the ResourceComponent schema.

func NewResourceComponentClient added in v0.4.0

func NewResourceComponentClient(c config) *ResourceComponentClient

NewResourceComponentClient returns a client for the ResourceComponent from the given config.

func (*ResourceComponentClient) Create added in v0.4.0

Create returns a builder for creating a ResourceComponent entity.

func (*ResourceComponentClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of ResourceComponent entities.

func (*ResourceComponentClient) Delete added in v0.4.0

Delete returns a delete builder for ResourceComponent.

func (*ResourceComponentClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*ResourceComponentClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ResourceComponentClient) ExecContext added in v0.4.0

func (c *ResourceComponentClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentClient) Get added in v0.4.0

Get returns a ResourceComponent entity by its id.

func (*ResourceComponentClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*ResourceComponentClient) Hooks added in v0.4.0

func (c *ResourceComponentClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ResourceComponentClient) Intercept added in v0.4.0

func (c *ResourceComponentClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `resourcecomponent.Intercept(f(g(h())))`.

func (*ResourceComponentClient) Interceptors added in v0.4.0

func (c *ResourceComponentClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ResourceComponentClient) MapCreateBulk added in v0.5.0

func (c *ResourceComponentClient) MapCreateBulk(slice any, setFunc func(*ResourceComponentCreate, int)) *ResourceComponentCreateBulk

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 (*ResourceComponentClient) Query added in v0.4.0

Query returns a query builder for ResourceComponent.

func (*ResourceComponentClient) QueryClass added in v0.4.0

QueryClass queries the class edge of a ResourceComponent.

func (*ResourceComponentClient) QueryComponents added in v0.4.0

QueryComponents queries the components edge of a ResourceComponent.

func (*ResourceComponentClient) QueryComposition added in v0.4.0

QueryComposition queries the composition edge of a ResourceComponent.

func (*ResourceComponentClient) QueryConnector added in v0.4.0

QueryConnector queries the connector edge of a ResourceComponent.

func (*ResourceComponentClient) QueryContext added in v0.4.0

func (c *ResourceComponentClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentClient) QueryDependencies added in v0.4.0

QueryDependencies queries the dependencies edge of a ResourceComponent.

func (*ResourceComponentClient) QueryEnvironment added in v0.4.0

QueryEnvironment queries the environment edge of a ResourceComponent.

func (*ResourceComponentClient) QueryInstances added in v0.4.0

QueryInstances queries the instances edge of a ResourceComponent.

func (*ResourceComponentClient) QueryProject added in v0.4.0

QueryProject queries the project edge of a ResourceComponent.

func (*ResourceComponentClient) QueryResource added in v0.4.0

QueryResource queries the resource edge of a ResourceComponent.

func (*ResourceComponentClient) Update added in v0.4.0

Update returns an update builder for ResourceComponent.

func (*ResourceComponentClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*ResourceComponentClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*ResourceComponentClient) Use added in v0.4.0

func (c *ResourceComponentClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resourcecomponent.Hooks(f(g(h())))`.

type ResourceComponentClientGetter added in v0.4.0

type ResourceComponentClientGetter interface {
	// ResourceComponents returns the client for interacting with the ResourceComponent builders.
	ResourceComponents() *ResourceComponentClient
}

ResourceComponentClientGetter is an interface that allows getting ResourceComponentClient.

type ResourceComponentCreate added in v0.4.0

type ResourceComponentCreate struct {
	// contains filtered or unexported fields
}

ResourceComponentCreate is the builder for creating a ResourceComponent entity.

func (*ResourceComponentCreate) AddComponentIDs added in v0.4.0

func (rcc *ResourceComponentCreate) AddComponentIDs(ids ...object.ID) *ResourceComponentCreate

AddComponentIDs adds the "components" edge to the ResourceComponent entity by IDs.

func (*ResourceComponentCreate) AddComponents added in v0.4.0

AddComponents adds the "components" edges to the ResourceComponent entity.

func (*ResourceComponentCreate) AddDependencies added in v0.4.0

AddDependencies adds the "dependencies" edges to the ResourceComponentRelationship entity.

func (*ResourceComponentCreate) AddDependencyIDs added in v0.4.0

func (rcc *ResourceComponentCreate) AddDependencyIDs(ids ...object.ID) *ResourceComponentCreate

AddDependencyIDs adds the "dependencies" edge to the ResourceComponentRelationship entity by IDs.

func (*ResourceComponentCreate) AddInstanceIDs added in v0.4.0

func (rcc *ResourceComponentCreate) AddInstanceIDs(ids ...object.ID) *ResourceComponentCreate

AddInstanceIDs adds the "instances" edge to the ResourceComponent entity by IDs.

func (*ResourceComponentCreate) AddInstances added in v0.4.0

AddInstances adds the "instances" edges to the ResourceComponent entity.

func (*ResourceComponentCreate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentCreate) ExecContext added in v0.4.0

func (c *ResourceComponentCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentCreate) ExecE added in v0.4.0

func (rcc *ResourceComponentCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceComponent) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceComponentCreate) ExecEX added in v0.4.0

func (rcc *ResourceComponentCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceComponent) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceComponentCreate) ExecX added in v0.4.0

func (rcc *ResourceComponentCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentCreate) Mutation added in v0.4.0

Mutation returns the ResourceComponentMutation object of the builder.

func (*ResourceComponentCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceComponent.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceComponentUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceComponentCreate) OnConflictColumns added in v0.4.0

func (rcc *ResourceComponentCreate) OnConflictColumns(columns ...string) *ResourceComponentUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceComponent.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceComponentCreate) QueryContext added in v0.4.0

func (c *ResourceComponentCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentCreate) Save added in v0.4.0

Save creates the ResourceComponent in the database.

func (*ResourceComponentCreate) SaveE added in v0.4.0

func (rcc *ResourceComponentCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceComponent) error) (*ResourceComponent, error)

SaveE calls the given function after created the ResourceComponent entity, which is always good for cascading create operations.

func (*ResourceComponentCreate) SaveEX added in v0.4.0

func (rcc *ResourceComponentCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceComponent) error) *ResourceComponent

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceComponentCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*ResourceComponentCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceComponentCreate) SetClass added in v0.4.0

SetClass sets the "class" edge to the ResourceComponent entity.

func (*ResourceComponentCreate) SetClassID added in v0.4.0

SetClassID sets the "class_id" field.

func (*ResourceComponentCreate) SetComposition added in v0.4.0

SetComposition sets the "composition" edge to the ResourceComponent entity.

func (*ResourceComponentCreate) SetCompositionID added in v0.4.0

func (rcc *ResourceComponentCreate) SetCompositionID(o object.ID) *ResourceComponentCreate

SetCompositionID sets the "composition_id" field.

func (*ResourceComponentCreate) SetConnector added in v0.4.0

SetConnector sets the "connector" edge to the Connector entity.

func (*ResourceComponentCreate) SetConnectorID added in v0.4.0

func (rcc *ResourceComponentCreate) SetConnectorID(o object.ID) *ResourceComponentCreate

SetConnectorID sets the "connector_id" field.

func (*ResourceComponentCreate) SetCreateTime added in v0.4.0

SetCreateTime sets the "create_time" field.

func (*ResourceComponentCreate) SetDeployerType added in v0.4.0

func (rcc *ResourceComponentCreate) SetDeployerType(s string) *ResourceComponentCreate

SetDeployerType sets the "deployer_type" field.

func (*ResourceComponentCreate) SetEnvironment added in v0.4.0

SetEnvironment sets the "environment" edge to the Environment entity.

func (*ResourceComponentCreate) SetEnvironmentID added in v0.4.0

func (rcc *ResourceComponentCreate) SetEnvironmentID(o object.ID) *ResourceComponentCreate

SetEnvironmentID sets the "environment_id" field.

func (*ResourceComponentCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*ResourceComponentCreate) SetIndexKey added in v0.6.0

SetIndexKey sets the "index_key" field.

func (*ResourceComponentCreate) SetMode added in v0.4.0

SetMode sets the "mode" field.

func (*ResourceComponentCreate) SetName added in v0.4.0

SetName sets the "name" field.

func (*ResourceComponentCreate) SetNillableClassID added in v0.4.0

func (rcc *ResourceComponentCreate) SetNillableClassID(o *object.ID) *ResourceComponentCreate

SetNillableClassID sets the "class_id" field if the given value is not nil.

func (*ResourceComponentCreate) SetNillableCompositionID added in v0.4.0

func (rcc *ResourceComponentCreate) SetNillableCompositionID(o *object.ID) *ResourceComponentCreate

SetNillableCompositionID sets the "composition_id" field if the given value is not nil.

func (*ResourceComponentCreate) SetNillableCreateTime added in v0.4.0

func (rcc *ResourceComponentCreate) SetNillableCreateTime(t *time.Time) *ResourceComponentCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ResourceComponentCreate) SetNillableIndexKey added in v0.6.0

func (rcc *ResourceComponentCreate) SetNillableIndexKey(s *string) *ResourceComponentCreate

SetNillableIndexKey sets the "index_key" field if the given value is not nil.

func (*ResourceComponentCreate) SetNillableStatus added in v0.4.0

func (rcc *ResourceComponentCreate) SetNillableStatus(s *status.Status) *ResourceComponentCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ResourceComponentCreate) SetNillableUpdateTime added in v0.4.0

func (rcc *ResourceComponentCreate) SetNillableUpdateTime(t *time.Time) *ResourceComponentCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*ResourceComponentCreate) SetProject added in v0.4.0

SetProject sets the "project" edge to the Project entity.

func (*ResourceComponentCreate) SetProjectID added in v0.4.0

SetProjectID sets the "project_id" field.

func (*ResourceComponentCreate) SetResource added in v0.4.0

SetResource sets the "resource" edge to the Resource entity.

func (*ResourceComponentCreate) SetResourceID added in v0.4.0

SetResourceID sets the "resource_id" field.

func (*ResourceComponentCreate) SetShape added in v0.4.0

SetShape sets the "shape" field.

func (*ResourceComponentCreate) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*ResourceComponentCreate) SetType added in v0.4.0

SetType sets the "type" field.

func (*ResourceComponentCreate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

type ResourceComponentCreateBulk added in v0.4.0

type ResourceComponentCreateBulk struct {
	// contains filtered or unexported fields
}

ResourceComponentCreateBulk is the builder for creating many ResourceComponent entities in bulk.

func (*ResourceComponentCreateBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentCreateBulk) ExecContext added in v0.4.0

func (c *ResourceComponentCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentCreateBulk) ExecE added in v0.4.0

func (rccb *ResourceComponentCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceComponent) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceComponentCreateBulk) ExecEX added in v0.4.0

func (rccb *ResourceComponentCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceComponent) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceComponentCreateBulk) ExecX added in v0.4.0

func (rccb *ResourceComponentCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceComponent.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceComponentUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceComponentCreateBulk) OnConflictColumns added in v0.4.0

func (rccb *ResourceComponentCreateBulk) OnConflictColumns(columns ...string) *ResourceComponentUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceComponent.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceComponentCreateBulk) QueryContext added in v0.4.0

func (c *ResourceComponentCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentCreateBulk) Save added in v0.4.0

Save creates the ResourceComponent entities in the database.

func (*ResourceComponentCreateBulk) SaveE added in v0.4.0

func (rccb *ResourceComponentCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceComponent) error) ([]*ResourceComponent, error)

SaveE calls the given function after created the ResourceComponent entities, which is always good for cascading create operations.

func (*ResourceComponentCreateBulk) SaveEX added in v0.4.0

func (rccb *ResourceComponentCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceComponent) error) []*ResourceComponent

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceComponentCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceComponentCreateBulk) Set added in v0.4.0

Set leverages the ResourceComponentCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ResourceComponentCreateInput added in v0.4.0

type ResourceComponentCreateInput struct {

	// Project indicates to create ResourceComponent entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to create ResourceComponent entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to create ResourceComponent entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Shape of the component, it can be class or instance shape.
	Shape string `path:"-" query:"-" json:"shape"`
	// Type of deployer.
	DeployerType string `path:"-" query:"-" json:"deployerType"`
	// Name of the generated component, it is the real identifier of the component, which provides by deployer.
	Name string `path:"-" query:"-" json:"name"`
	// Type of the generated component, it is the type of the resource which the deployer observes, which provides by deployer.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Mode that manages the generated component, it is the management way of the deployer to the component, which provides by deployer.
	Mode string `path:"-" query:"-" json:"mode"`

	// Components specifies full inserting the new ResourceComponent entities of the ResourceComponent entity.
	Components []*ResourceComponentCreateInput `uri:"-" query:"-" json:"components,omitempty"`
	// Instances specifies full inserting the new ResourceComponent entities of the ResourceComponent entity.
	Instances []*ResourceComponentCreateInput `uri:"-" query:"-" json:"instances,omitempty"`
	// Dependencies specifies full inserting the new ResourceComponentRelationship entities of the ResourceComponent entity.
	Dependencies []*ResourceComponentRelationshipCreateInput `uri:"-" query:"-" json:"dependencies,omitempty"`
	// contains filtered or unexported fields
}

ResourceComponentCreateInput holds the creation input of the ResourceComponent entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentCreateInput) Model added in v0.4.0

Model returns the ResourceComponent entity for creating, after validating.

func (*ResourceComponentCreateInput) SetGinContext added in v0.4.0

func (ic *ResourceComponentCreateInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentCreateInput) SetModelClient added in v0.4.0

func (ic *ResourceComponentCreateInput) SetModelClient(cli *Client)

func (*ResourceComponentCreateInput) Validate added in v0.4.0

func (rcci *ResourceComponentCreateInput) Validate() error

Validate checks the ResourceComponentCreateInput entity.

func (*ResourceComponentCreateInput) ValidateWith added in v0.4.0

func (rcci *ResourceComponentCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentCreateInput entity with the given context and client set.

type ResourceComponentCreateInputs added in v0.4.0

type ResourceComponentCreateInputs struct {

	// Project indicates to create ResourceComponent entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to create ResourceComponent entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to create ResourceComponent entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceComponentCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceComponentCreateInputs holds the creation input of the ResourceComponent entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentCreateInputs) Model added in v0.4.0

Model returns the ResourceComponent entities for creating, after validating.

func (*ResourceComponentCreateInputs) SetGinContext added in v0.4.0

func (ic *ResourceComponentCreateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceComponentCreateInputs) SetModelClient added in v0.4.0

func (ic *ResourceComponentCreateInputs) SetModelClient(cli *Client)

func (*ResourceComponentCreateInputs) Validate added in v0.4.0

func (rcci *ResourceComponentCreateInputs) Validate() error

Validate checks the ResourceComponentCreateInputs entity .

func (*ResourceComponentCreateInputs) ValidateWith added in v0.4.0

func (rcci *ResourceComponentCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentCreateInputs entity with the given context and client set.

type ResourceComponentCreateInputsItem added in v0.4.0

type ResourceComponentCreateInputsItem struct {
	// Shape of the component, it can be class or instance shape.
	Shape string `path:"-" query:"-" json:"shape"`
	// Type of deployer.
	DeployerType string `path:"-" query:"-" json:"deployerType"`
	// Name of the generated component, it is the real identifier of the component, which provides by deployer.
	Name string `path:"-" query:"-" json:"name"`
	// Type of the generated component, it is the type of the resource which the deployer observes, which provides by deployer.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Mode that manages the generated component, it is the management way of the deployer to the component, which provides by deployer.
	Mode string `path:"-" query:"-" json:"mode"`

	// Components specifies full inserting the new ResourceComponent entities.
	Components []*ResourceComponentCreateInput `uri:"-" query:"-" json:"components,omitempty"`
	// Instances specifies full inserting the new ResourceComponent entities.
	Instances []*ResourceComponentCreateInput `uri:"-" query:"-" json:"instances,omitempty"`
	// Dependencies specifies full inserting the new ResourceComponentRelationship entities.
	Dependencies []*ResourceComponentRelationshipCreateInput `uri:"-" query:"-" json:"dependencies,omitempty"`
}

ResourceComponentCreateInputs holds the creation input item of the ResourceComponent entities.

func (*ResourceComponentCreateInputsItem) ValidateWith added in v0.4.0

func (rcci *ResourceComponentCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentCreateInputsItem entity with the given context and client set.

type ResourceComponentDelete added in v0.4.0

type ResourceComponentDelete struct {
	// contains filtered or unexported fields
}

ResourceComponentDelete is the builder for deleting a ResourceComponent entity.

func (*ResourceComponentDelete) Exec added in v0.4.0

func (rcd *ResourceComponentDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ResourceComponentDelete) ExecContext added in v0.4.0

func (c *ResourceComponentDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentDelete) ExecX added in v0.4.0

func (rcd *ResourceComponentDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentDelete) QueryContext added in v0.4.0

func (c *ResourceComponentDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentDelete) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentDelete builder.

type ResourceComponentDeleteInput added in v0.4.0

type ResourceComponentDeleteInput struct {
	ResourceComponentQueryInput `path:",inline"`
}

ResourceComponentDeleteInput holds the deletion input of the ResourceComponent entity, please tags with `path:",inline"` if embedding.

func (*ResourceComponentDeleteInput) SetGinContext added in v0.4.0

func (ic *ResourceComponentDeleteInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentDeleteInput) SetModelClient added in v0.4.0

func (ic *ResourceComponentDeleteInput) SetModelClient(cli *Client)

type ResourceComponentDeleteInputs added in v0.4.0

type ResourceComponentDeleteInputs struct {

	// Project indicates to delete ResourceComponent entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to delete ResourceComponent entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to delete ResourceComponent entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceComponentDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceComponentDeleteInputs holds the deletion input of the ResourceComponent entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentDeleteInputs) IDs added in v0.4.0

func (rcdi *ResourceComponentDeleteInputs) IDs() []object.ID

IDs returns the ID list of the ResourceComponent entities for deleting, after validating.

func (*ResourceComponentDeleteInputs) Model added in v0.4.0

Model returns the ResourceComponent entities for deleting, after validating.

func (*ResourceComponentDeleteInputs) SetGinContext added in v0.4.0

func (ic *ResourceComponentDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ResourceComponentDeleteInputs) SetModelClient added in v0.4.0

func (ic *ResourceComponentDeleteInputs) SetModelClient(cli *Client)

func (*ResourceComponentDeleteInputs) Validate added in v0.4.0

func (rcdi *ResourceComponentDeleteInputs) Validate() error

Validate checks the ResourceComponentDeleteInputs entity.

func (*ResourceComponentDeleteInputs) ValidateWith added in v0.4.0

func (rcdi *ResourceComponentDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentDeleteInputs entity with the given context and client set.

type ResourceComponentDeleteInputsItem added in v0.4.0

type ResourceComponentDeleteInputsItem struct {
	// ID of the ResourceComponent entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

ResourceComponentDeleteInputs holds the deletion input item of the ResourceComponent entities.

type ResourceComponentDeleteOne added in v0.4.0

type ResourceComponentDeleteOne struct {
	// contains filtered or unexported fields
}

ResourceComponentDeleteOne is the builder for deleting a single ResourceComponent entity.

func (*ResourceComponentDeleteOne) Exec added in v0.4.0

Exec executes the deletion query.

func (*ResourceComponentDeleteOne) ExecX added in v0.4.0

func (rcdo *ResourceComponentDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentDeleteOne) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentDelete builder.

type ResourceComponentEdges added in v0.4.0

type ResourceComponentEdges struct {
	// Project to which the component belongs.
	Project *Project `json:"project,omitempty"`
	// Environment to which the component deploys.
	Environment *Environment `json:"environment,omitempty"`
	// Resource to which the component belongs.
	Resource *Resource `json:"resource,omitempty"`
	// Connector to which the component deploys.
	Connector *Connector `json:"connector,omitempty"`
	// Composition holds the value of the composition edge.
	Composition *ResourceComponent `json:"composition,omitempty"`
	// Components that makes up the resource component.
	Components []*ResourceComponent `json:"components,omitempty"`
	// Class holds the value of the class edge.
	Class *ResourceComponent `json:"class,omitempty"`
	// Instances that realizes the resource component.
	Instances []*ResourceComponent `json:"instances,omitempty"`
	// Dependencies holds the value of the dependencies edge.
	Dependencies []*ResourceComponentRelationship `json:"dependencies,omitempty"`
	// contains filtered or unexported fields
}

ResourceComponentEdges holds the relations/edges for other nodes in the graph.

func (ResourceComponentEdges) ClassOrErr added in v0.4.0

func (e ResourceComponentEdges) ClassOrErr() (*ResourceComponent, error)

ClassOrErr returns the Class value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceComponentEdges) ComponentsOrErr added in v0.4.0

func (e ResourceComponentEdges) ComponentsOrErr() ([]*ResourceComponent, error)

ComponentsOrErr returns the Components value or an error if the edge was not loaded in eager-loading.

func (ResourceComponentEdges) CompositionOrErr added in v0.4.0

func (e ResourceComponentEdges) CompositionOrErr() (*ResourceComponent, error)

CompositionOrErr returns the Composition value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceComponentEdges) ConnectorOrErr added in v0.4.0

func (e ResourceComponentEdges) ConnectorOrErr() (*Connector, error)

ConnectorOrErr returns the Connector value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceComponentEdges) DependenciesOrErr added in v0.4.0

func (e ResourceComponentEdges) DependenciesOrErr() ([]*ResourceComponentRelationship, error)

DependenciesOrErr returns the Dependencies value or an error if the edge was not loaded in eager-loading.

func (ResourceComponentEdges) EnvironmentOrErr added in v0.4.0

func (e ResourceComponentEdges) EnvironmentOrErr() (*Environment, error)

EnvironmentOrErr returns the Environment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceComponentEdges) InstancesOrErr added in v0.4.0

func (e ResourceComponentEdges) InstancesOrErr() ([]*ResourceComponent, error)

InstancesOrErr returns the Instances value or an error if the edge was not loaded in eager-loading.

func (ResourceComponentEdges) ProjectOrErr added in v0.4.0

func (e ResourceComponentEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceComponentEdges) ResourceOrErr added in v0.4.0

func (e ResourceComponentEdges) ResourceOrErr() (*Resource, error)

ResourceOrErr returns the Resource value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ResourceComponentGroupBy added in v0.4.0

type ResourceComponentGroupBy struct {
	// contains filtered or unexported fields
}

ResourceComponentGroupBy is the group-by builder for ResourceComponent entities.

func (*ResourceComponentGroupBy) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the group-by query.

func (*ResourceComponentGroupBy) Bool added in v0.4.0

func (s *ResourceComponentGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceComponentGroupBy) BoolX added in v0.4.0

func (s *ResourceComponentGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceComponentGroupBy) Bools added in v0.4.0

func (s *ResourceComponentGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceComponentGroupBy) BoolsX added in v0.4.0

func (s *ResourceComponentGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ResourceComponentGroupBy) Float64 added in v0.4.0

func (s *ResourceComponentGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceComponentGroupBy) Float64X added in v0.4.0

func (s *ResourceComponentGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceComponentGroupBy) Float64s added in v0.4.0

func (s *ResourceComponentGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceComponentGroupBy) Float64sX added in v0.4.0

func (s *ResourceComponentGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceComponentGroupBy) Int added in v0.4.0

func (s *ResourceComponentGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceComponentGroupBy) IntX added in v0.4.0

func (s *ResourceComponentGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceComponentGroupBy) Ints added in v0.4.0

func (s *ResourceComponentGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceComponentGroupBy) IntsX added in v0.4.0

func (s *ResourceComponentGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceComponentGroupBy) Scan added in v0.4.0

func (rcgb *ResourceComponentGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceComponentGroupBy) ScanX added in v0.4.0

func (s *ResourceComponentGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceComponentGroupBy) String added in v0.4.0

func (s *ResourceComponentGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceComponentGroupBy) StringX added in v0.4.0

func (s *ResourceComponentGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceComponentGroupBy) Strings added in v0.4.0

func (s *ResourceComponentGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceComponentGroupBy) StringsX added in v0.4.0

func (s *ResourceComponentGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceComponentMutation added in v0.4.0

type ResourceComponentMutation struct {
	// contains filtered or unexported fields
}

ResourceComponentMutation represents an operation that mutates the ResourceComponent nodes in the graph.

func (*ResourceComponentMutation) AddComponentIDs added in v0.4.0

func (m *ResourceComponentMutation) AddComponentIDs(ids ...object.ID)

AddComponentIDs adds the "components" edge to the ResourceComponent entity by ids.

func (*ResourceComponentMutation) AddDependencyIDs added in v0.4.0

func (m *ResourceComponentMutation) AddDependencyIDs(ids ...object.ID)

AddDependencyIDs adds the "dependencies" edge to the ResourceComponentRelationship entity by ids.

func (*ResourceComponentMutation) AddField added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) AddInstanceIDs added in v0.4.0

func (m *ResourceComponentMutation) AddInstanceIDs(ids ...object.ID)

AddInstanceIDs adds the "instances" edge to the ResourceComponent entity by ids.

func (*ResourceComponentMutation) AddedEdges added in v0.4.0

func (m *ResourceComponentMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ResourceComponentMutation) AddedField added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) AddedFields added in v0.4.0

func (m *ResourceComponentMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ResourceComponentMutation) AddedIDs added in v0.4.0

func (m *ResourceComponentMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ResourceComponentMutation) ClassCleared added in v0.4.0

func (m *ResourceComponentMutation) ClassCleared() bool

ClassCleared reports if the "class" edge to the ResourceComponent entity was cleared.

func (*ResourceComponentMutation) ClassID added in v0.4.0

func (m *ResourceComponentMutation) ClassID() (r object.ID, exists bool)

ClassID returns the value of the "class_id" field in the mutation.

func (*ResourceComponentMutation) ClassIDCleared added in v0.4.0

func (m *ResourceComponentMutation) ClassIDCleared() bool

ClassIDCleared returns if the "class_id" field was cleared in this mutation.

func (*ResourceComponentMutation) ClassIDs added in v0.4.0

func (m *ResourceComponentMutation) ClassIDs() (ids []object.ID)

ClassIDs returns the "class" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ClassID instead. It exists only for internal usage by the builders.

func (*ResourceComponentMutation) ClearClass added in v0.4.0

func (m *ResourceComponentMutation) ClearClass()

ClearClass clears the "class" edge to the ResourceComponent entity.

func (*ResourceComponentMutation) ClearClassID added in v0.4.0

func (m *ResourceComponentMutation) ClearClassID()

ClearClassID clears the value of the "class_id" field.

func (*ResourceComponentMutation) ClearComponents added in v0.4.0

func (m *ResourceComponentMutation) ClearComponents()

ClearComponents clears the "components" edge to the ResourceComponent entity.

func (*ResourceComponentMutation) ClearComposition added in v0.4.0

func (m *ResourceComponentMutation) ClearComposition()

ClearComposition clears the "composition" edge to the ResourceComponent entity.

func (*ResourceComponentMutation) ClearCompositionID added in v0.4.0

func (m *ResourceComponentMutation) ClearCompositionID()

ClearCompositionID clears the value of the "composition_id" field.

func (*ResourceComponentMutation) ClearConnector added in v0.4.0

func (m *ResourceComponentMutation) ClearConnector()

ClearConnector clears the "connector" edge to the Connector entity.

func (*ResourceComponentMutation) ClearDependencies added in v0.4.0

func (m *ResourceComponentMutation) ClearDependencies()

ClearDependencies clears the "dependencies" edge to the ResourceComponentRelationship entity.

func (*ResourceComponentMutation) ClearEdge added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) ClearEnvironment added in v0.4.0

func (m *ResourceComponentMutation) ClearEnvironment()

ClearEnvironment clears the "environment" edge to the Environment entity.

func (*ResourceComponentMutation) ClearField added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) ClearIndexKey added in v0.6.0

func (m *ResourceComponentMutation) ClearIndexKey()

ClearIndexKey clears the value of the "index_key" field.

func (*ResourceComponentMutation) ClearInstances added in v0.4.0

func (m *ResourceComponentMutation) ClearInstances()

ClearInstances clears the "instances" edge to the ResourceComponent entity.

func (*ResourceComponentMutation) ClearProject added in v0.4.0

func (m *ResourceComponentMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*ResourceComponentMutation) ClearResource added in v0.4.0

func (m *ResourceComponentMutation) ClearResource()

ClearResource clears the "resource" edge to the Resource entity.

func (*ResourceComponentMutation) ClearStatus added in v0.4.0

func (m *ResourceComponentMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*ResourceComponentMutation) ClearedEdges added in v0.4.0

func (m *ResourceComponentMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ResourceComponentMutation) ClearedFields added in v0.4.0

func (m *ResourceComponentMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ResourceComponentMutation) Client added in v0.4.0

func (m ResourceComponentMutation) 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 (*ResourceComponentMutation) ComponentsCleared added in v0.4.0

func (m *ResourceComponentMutation) ComponentsCleared() bool

ComponentsCleared reports if the "components" edge to the ResourceComponent entity was cleared.

func (*ResourceComponentMutation) ComponentsIDs added in v0.4.0

func (m *ResourceComponentMutation) ComponentsIDs() (ids []object.ID)

ComponentsIDs returns the "components" edge IDs in the mutation.

func (*ResourceComponentMutation) CompositionCleared added in v0.4.0

func (m *ResourceComponentMutation) CompositionCleared() bool

CompositionCleared reports if the "composition" edge to the ResourceComponent entity was cleared.

func (*ResourceComponentMutation) CompositionID added in v0.4.0

func (m *ResourceComponentMutation) CompositionID() (r object.ID, exists bool)

CompositionID returns the value of the "composition_id" field in the mutation.

func (*ResourceComponentMutation) CompositionIDCleared added in v0.4.0

func (m *ResourceComponentMutation) CompositionIDCleared() bool

CompositionIDCleared returns if the "composition_id" field was cleared in this mutation.

func (*ResourceComponentMutation) CompositionIDs added in v0.4.0

func (m *ResourceComponentMutation) CompositionIDs() (ids []object.ID)

CompositionIDs returns the "composition" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CompositionID instead. It exists only for internal usage by the builders.

func (*ResourceComponentMutation) ConnectorCleared added in v0.4.0

func (m *ResourceComponentMutation) ConnectorCleared() bool

ConnectorCleared reports if the "connector" edge to the Connector entity was cleared.

func (*ResourceComponentMutation) ConnectorID added in v0.4.0

func (m *ResourceComponentMutation) ConnectorID() (r object.ID, exists bool)

ConnectorID returns the value of the "connector_id" field in the mutation.

func (*ResourceComponentMutation) ConnectorIDs added in v0.4.0

func (m *ResourceComponentMutation) ConnectorIDs() (ids []object.ID)

ConnectorIDs returns the "connector" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ConnectorID instead. It exists only for internal usage by the builders.

func (*ResourceComponentMutation) CreateTime added in v0.4.0

func (m *ResourceComponentMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ResourceComponentMutation) DependenciesCleared added in v0.4.0

func (m *ResourceComponentMutation) DependenciesCleared() bool

DependenciesCleared reports if the "dependencies" edge to the ResourceComponentRelationship entity was cleared.

func (*ResourceComponentMutation) DependenciesIDs added in v0.4.0

func (m *ResourceComponentMutation) DependenciesIDs() (ids []object.ID)

DependenciesIDs returns the "dependencies" edge IDs in the mutation.

func (*ResourceComponentMutation) DeployerType added in v0.4.0

func (m *ResourceComponentMutation) DeployerType() (r string, exists bool)

DeployerType returns the value of the "deployer_type" field in the mutation.

func (*ResourceComponentMutation) EdgeCleared added in v0.4.0

func (m *ResourceComponentMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ResourceComponentMutation) EnvironmentCleared added in v0.4.0

func (m *ResourceComponentMutation) EnvironmentCleared() bool

EnvironmentCleared reports if the "environment" edge to the Environment entity was cleared.

func (*ResourceComponentMutation) EnvironmentID added in v0.4.0

func (m *ResourceComponentMutation) EnvironmentID() (r object.ID, exists bool)

EnvironmentID returns the value of the "environment_id" field in the mutation.

func (*ResourceComponentMutation) EnvironmentIDs added in v0.4.0

func (m *ResourceComponentMutation) EnvironmentIDs() (ids []object.ID)

EnvironmentIDs returns the "environment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EnvironmentID instead. It exists only for internal usage by the builders.

func (*ResourceComponentMutation) ExecContext added in v0.4.0

func (c *ResourceComponentMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentMutation) Field added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) FieldCleared added in v0.4.0

func (m *ResourceComponentMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ResourceComponentMutation) Fields added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) GetType added in v0.4.0

func (m *ResourceComponentMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ResourceComponentMutation) ID added in v0.4.0

func (m *ResourceComponentMutation) ID() (id object.ID, 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 (*ResourceComponentMutation) IDs added in v0.4.0

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 (*ResourceComponentMutation) IndexKey added in v0.6.0

func (m *ResourceComponentMutation) IndexKey() (r string, exists bool)

IndexKey returns the value of the "index_key" field in the mutation.

func (*ResourceComponentMutation) IndexKeyCleared added in v0.6.0

func (m *ResourceComponentMutation) IndexKeyCleared() bool

IndexKeyCleared returns if the "index_key" field was cleared in this mutation.

func (*ResourceComponentMutation) InstancesCleared added in v0.4.0

func (m *ResourceComponentMutation) InstancesCleared() bool

InstancesCleared reports if the "instances" edge to the ResourceComponent entity was cleared.

func (*ResourceComponentMutation) InstancesIDs added in v0.4.0

func (m *ResourceComponentMutation) InstancesIDs() (ids []object.ID)

InstancesIDs returns the "instances" edge IDs in the mutation.

func (*ResourceComponentMutation) Mode added in v0.4.0

func (m *ResourceComponentMutation) Mode() (r string, exists bool)

Mode returns the value of the "mode" field in the mutation.

func (*ResourceComponentMutation) Name added in v0.4.0

func (m *ResourceComponentMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ResourceComponentMutation) OldClassID added in v0.4.0

func (m *ResourceComponentMutation) OldClassID(ctx context.Context) (v object.ID, err error)

OldClassID returns the old "class_id" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldCompositionID added in v0.4.0

func (m *ResourceComponentMutation) OldCompositionID(ctx context.Context) (v object.ID, err error)

OldCompositionID returns the old "composition_id" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldConnectorID added in v0.4.0

func (m *ResourceComponentMutation) OldConnectorID(ctx context.Context) (v object.ID, err error)

OldConnectorID returns the old "connector_id" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldCreateTime added in v0.4.0

func (m *ResourceComponentMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldDeployerType added in v0.4.0

func (m *ResourceComponentMutation) OldDeployerType(ctx context.Context) (v string, err error)

OldDeployerType returns the old "deployer_type" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldEnvironmentID added in v0.4.0

func (m *ResourceComponentMutation) OldEnvironmentID(ctx context.Context) (v object.ID, err error)

OldEnvironmentID returns the old "environment_id" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldField added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) OldIndexKey added in v0.6.0

func (m *ResourceComponentMutation) OldIndexKey(ctx context.Context) (v string, err error)

OldIndexKey returns the old "index_key" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldMode added in v0.4.0

func (m *ResourceComponentMutation) OldMode(ctx context.Context) (v string, err error)

OldMode returns the old "mode" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldName added in v0.4.0

func (m *ResourceComponentMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldProjectID added in v0.4.0

func (m *ResourceComponentMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldResourceID added in v0.4.0

func (m *ResourceComponentMutation) OldResourceID(ctx context.Context) (v object.ID, err error)

OldResourceID returns the old "resource_id" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldShape added in v0.4.0

func (m *ResourceComponentMutation) OldShape(ctx context.Context) (v string, err error)

OldShape returns the old "shape" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldStatus added in v0.4.0

func (m *ResourceComponentMutation) OldStatus(ctx context.Context) (v status.Status, err error)

OldStatus returns the old "status" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldType added in v0.4.0

func (m *ResourceComponentMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) OldUpdateTime added in v0.4.0

func (m *ResourceComponentMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the ResourceComponent entity. If the ResourceComponent 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 (*ResourceComponentMutation) Op added in v0.4.0

func (m *ResourceComponentMutation) Op() Op

Op returns the operation name.

func (*ResourceComponentMutation) ProjectCleared added in v0.4.0

func (m *ResourceComponentMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*ResourceComponentMutation) ProjectID added in v0.4.0

func (m *ResourceComponentMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*ResourceComponentMutation) ProjectIDs added in v0.4.0

func (m *ResourceComponentMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*ResourceComponentMutation) QueryContext added in v0.4.0

func (c *ResourceComponentMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentMutation) RemoveComponentIDs added in v0.4.0

func (m *ResourceComponentMutation) RemoveComponentIDs(ids ...object.ID)

RemoveComponentIDs removes the "components" edge to the ResourceComponent entity by IDs.

func (*ResourceComponentMutation) RemoveDependencyIDs added in v0.4.0

func (m *ResourceComponentMutation) RemoveDependencyIDs(ids ...object.ID)

RemoveDependencyIDs removes the "dependencies" edge to the ResourceComponentRelationship entity by IDs.

func (*ResourceComponentMutation) RemoveInstanceIDs added in v0.4.0

func (m *ResourceComponentMutation) RemoveInstanceIDs(ids ...object.ID)

RemoveInstanceIDs removes the "instances" edge to the ResourceComponent entity by IDs.

func (*ResourceComponentMutation) RemovedComponentsIDs added in v0.4.0

func (m *ResourceComponentMutation) RemovedComponentsIDs() (ids []object.ID)

RemovedComponents returns the removed IDs of the "components" edge to the ResourceComponent entity.

func (*ResourceComponentMutation) RemovedDependenciesIDs added in v0.4.0

func (m *ResourceComponentMutation) RemovedDependenciesIDs() (ids []object.ID)

RemovedDependencies returns the removed IDs of the "dependencies" edge to the ResourceComponentRelationship entity.

func (*ResourceComponentMutation) RemovedEdges added in v0.4.0

func (m *ResourceComponentMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ResourceComponentMutation) RemovedIDs added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) RemovedInstancesIDs added in v0.4.0

func (m *ResourceComponentMutation) RemovedInstancesIDs() (ids []object.ID)

RemovedInstances returns the removed IDs of the "instances" edge to the ResourceComponent entity.

func (*ResourceComponentMutation) ResetClass added in v0.4.0

func (m *ResourceComponentMutation) ResetClass()

ResetClass resets all changes to the "class" edge.

func (*ResourceComponentMutation) ResetClassID added in v0.4.0

func (m *ResourceComponentMutation) ResetClassID()

ResetClassID resets all changes to the "class_id" field.

func (*ResourceComponentMutation) ResetComponents added in v0.4.0

func (m *ResourceComponentMutation) ResetComponents()

ResetComponents resets all changes to the "components" edge.

func (*ResourceComponentMutation) ResetComposition added in v0.4.0

func (m *ResourceComponentMutation) ResetComposition()

ResetComposition resets all changes to the "composition" edge.

func (*ResourceComponentMutation) ResetCompositionID added in v0.4.0

func (m *ResourceComponentMutation) ResetCompositionID()

ResetCompositionID resets all changes to the "composition_id" field.

func (*ResourceComponentMutation) ResetConnector added in v0.4.0

func (m *ResourceComponentMutation) ResetConnector()

ResetConnector resets all changes to the "connector" edge.

func (*ResourceComponentMutation) ResetConnectorID added in v0.4.0

func (m *ResourceComponentMutation) ResetConnectorID()

ResetConnectorID resets all changes to the "connector_id" field.

func (*ResourceComponentMutation) ResetCreateTime added in v0.4.0

func (m *ResourceComponentMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ResourceComponentMutation) ResetDependencies added in v0.4.0

func (m *ResourceComponentMutation) ResetDependencies()

ResetDependencies resets all changes to the "dependencies" edge.

func (*ResourceComponentMutation) ResetDeployerType added in v0.4.0

func (m *ResourceComponentMutation) ResetDeployerType()

ResetDeployerType resets all changes to the "deployer_type" field.

func (*ResourceComponentMutation) ResetEdge added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) ResetEnvironment added in v0.4.0

func (m *ResourceComponentMutation) ResetEnvironment()

ResetEnvironment resets all changes to the "environment" edge.

func (*ResourceComponentMutation) ResetEnvironmentID added in v0.4.0

func (m *ResourceComponentMutation) ResetEnvironmentID()

ResetEnvironmentID resets all changes to the "environment_id" field.

func (*ResourceComponentMutation) ResetField added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) ResetIndexKey added in v0.6.0

func (m *ResourceComponentMutation) ResetIndexKey()

ResetIndexKey resets all changes to the "index_key" field.

func (*ResourceComponentMutation) ResetInstances added in v0.4.0

func (m *ResourceComponentMutation) ResetInstances()

ResetInstances resets all changes to the "instances" edge.

func (*ResourceComponentMutation) ResetMode added in v0.4.0

func (m *ResourceComponentMutation) ResetMode()

ResetMode resets all changes to the "mode" field.

func (*ResourceComponentMutation) ResetName added in v0.4.0

func (m *ResourceComponentMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ResourceComponentMutation) ResetProject added in v0.4.0

func (m *ResourceComponentMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*ResourceComponentMutation) ResetProjectID added in v0.4.0

func (m *ResourceComponentMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*ResourceComponentMutation) ResetResource added in v0.4.0

func (m *ResourceComponentMutation) ResetResource()

ResetResource resets all changes to the "resource" edge.

func (*ResourceComponentMutation) ResetResourceID added in v0.4.0

func (m *ResourceComponentMutation) ResetResourceID()

ResetResourceID resets all changes to the "resource_id" field.

func (*ResourceComponentMutation) ResetShape added in v0.4.0

func (m *ResourceComponentMutation) ResetShape()

ResetShape resets all changes to the "shape" field.

func (*ResourceComponentMutation) ResetStatus added in v0.4.0

func (m *ResourceComponentMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ResourceComponentMutation) ResetType added in v0.4.0

func (m *ResourceComponentMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ResourceComponentMutation) ResetUpdateTime added in v0.4.0

func (m *ResourceComponentMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*ResourceComponentMutation) ResourceCleared added in v0.4.0

func (m *ResourceComponentMutation) ResourceCleared() bool

ResourceCleared reports if the "resource" edge to the Resource entity was cleared.

func (*ResourceComponentMutation) ResourceID added in v0.4.0

func (m *ResourceComponentMutation) ResourceID() (r object.ID, exists bool)

ResourceID returns the value of the "resource_id" field in the mutation.

func (*ResourceComponentMutation) ResourceIDs added in v0.4.0

func (m *ResourceComponentMutation) ResourceIDs() (ids []object.ID)

ResourceIDs returns the "resource" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ResourceID instead. It exists only for internal usage by the builders.

func (*ResourceComponentMutation) SetClassID added in v0.4.0

func (m *ResourceComponentMutation) SetClassID(o object.ID)

SetClassID sets the "class_id" field.

func (*ResourceComponentMutation) SetCompositionID added in v0.4.0

func (m *ResourceComponentMutation) SetCompositionID(o object.ID)

SetCompositionID sets the "composition_id" field.

func (*ResourceComponentMutation) SetConnectorID added in v0.4.0

func (m *ResourceComponentMutation) SetConnectorID(o object.ID)

SetConnectorID sets the "connector_id" field.

func (*ResourceComponentMutation) SetCreateTime added in v0.4.0

func (m *ResourceComponentMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ResourceComponentMutation) SetDeployerType added in v0.4.0

func (m *ResourceComponentMutation) SetDeployerType(s string)

SetDeployerType sets the "deployer_type" field.

func (*ResourceComponentMutation) SetEnvironmentID added in v0.4.0

func (m *ResourceComponentMutation) SetEnvironmentID(o object.ID)

SetEnvironmentID sets the "environment_id" field.

func (*ResourceComponentMutation) SetField added in v0.4.0

func (m *ResourceComponentMutation) 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 (*ResourceComponentMutation) SetID added in v0.4.0

func (m *ResourceComponentMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ResourceComponent entities.

func (*ResourceComponentMutation) SetIndexKey added in v0.6.0

func (m *ResourceComponentMutation) SetIndexKey(s string)

SetIndexKey sets the "index_key" field.

func (*ResourceComponentMutation) SetMode added in v0.4.0

func (m *ResourceComponentMutation) SetMode(s string)

SetMode sets the "mode" field.

func (*ResourceComponentMutation) SetName added in v0.4.0

func (m *ResourceComponentMutation) SetName(s string)

SetName sets the "name" field.

func (*ResourceComponentMutation) SetOp added in v0.4.0

func (m *ResourceComponentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ResourceComponentMutation) SetProjectID added in v0.4.0

func (m *ResourceComponentMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*ResourceComponentMutation) SetResourceID added in v0.4.0

func (m *ResourceComponentMutation) SetResourceID(o object.ID)

SetResourceID sets the "resource_id" field.

func (*ResourceComponentMutation) SetShape added in v0.4.0

func (m *ResourceComponentMutation) SetShape(s string)

SetShape sets the "shape" field.

func (*ResourceComponentMutation) SetStatus added in v0.4.0

func (m *ResourceComponentMutation) SetStatus(s status.Status)

SetStatus sets the "status" field.

func (*ResourceComponentMutation) SetType added in v0.4.0

func (m *ResourceComponentMutation) SetType(s string)

SetType sets the "type" field.

func (*ResourceComponentMutation) SetUpdateTime added in v0.4.0

func (m *ResourceComponentMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*ResourceComponentMutation) Shape added in v0.4.0

func (m *ResourceComponentMutation) Shape() (r string, exists bool)

Shape returns the value of the "shape" field in the mutation.

func (*ResourceComponentMutation) Status added in v0.4.0

func (m *ResourceComponentMutation) Status() (r status.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*ResourceComponentMutation) StatusCleared added in v0.4.0

func (m *ResourceComponentMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (ResourceComponentMutation) Tx added in v0.4.0

func (m ResourceComponentMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ResourceComponentMutation) Type added in v0.4.0

Type returns the node type of this mutation (ResourceComponent).

func (*ResourceComponentMutation) UpdateTime added in v0.4.0

func (m *ResourceComponentMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*ResourceComponentMutation) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentMutation builder.

func (*ResourceComponentMutation) WhereP added in v0.4.0

func (m *ResourceComponentMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceComponentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ResourceComponentOutput added in v0.4.0

type ResourceComponentOutput struct {
	ID           object.ID                             `json:"id,omitempty"`
	CreateTime   *time.Time                            `json:"createTime,omitempty"`
	UpdateTime   *time.Time                            `json:"updateTime,omitempty"`
	Status       status.Status                         `json:"status,omitempty"`
	Mode         string                                `json:"mode,omitempty"`
	Type         string                                `json:"type,cli-table-column,omitempty"`
	Name         string                                `json:"name,omitempty"`
	DeployerType string                                `json:"deployerType,omitempty"`
	Shape        string                                `json:"shape,omitempty"`
	Keys         *types.ResourceComponentOperationKeys `json:"keys,omitempty"`
	IndexKey     string                                `json:"indexKey,omitempty"`

	Project      *ProjectOutput                         `json:"project,omitempty"`
	Environment  *EnvironmentOutput                     `json:"environment,omitempty"`
	Resource     *ResourceOutput                        `json:"resource,omitempty"`
	Connector    *ConnectorOutput                       `json:"connector,omitempty"`
	Composition  *ResourceComponentOutput               `json:"composition,omitempty"`
	Components   []*ResourceComponentOutput             `json:"components,omitempty"`
	Class        *ResourceComponentOutput               `json:"class,omitempty"`
	Instances    []*ResourceComponentOutput             `json:"instances,omitempty"`
	Dependencies []*ResourceComponentRelationshipOutput `json:"dependencies,omitempty"`
}

ResourceComponentOutput holds the output of the ResourceComponent entity.

func ExposeResourceComponent added in v0.4.0

func ExposeResourceComponent(_rc *ResourceComponent) *ResourceComponentOutput

ExposeResourceComponent converts the ResourceComponent to ResourceComponentOutput.

func ExposeResourceComponents added in v0.4.0

func ExposeResourceComponents(_rcs []*ResourceComponent) []*ResourceComponentOutput

ExposeResourceComponents converts the ResourceComponent slice to ResourceComponentOutput pointer slice.

type ResourceComponentPatchInput added in v0.5.0

type ResourceComponentPatchInput struct {
	ResourceComponentQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `path:"-" query:"-" json:"status,omitempty"`
	// Mode that manages the generated component, it is the management way of the deployer to the component, which provides by deployer.
	Mode string `path:"-" query:"-" json:"mode,omitempty"`
	// Type of the generated component, it is the type of the resource which the deployer observes, which provides by deployer.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Name of the generated component, it is the real identifier of the component, which provides by deployer.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Type of deployer.
	DeployerType string `path:"-" query:"-" json:"deployerType,omitempty"`
	// Shape of the component, it can be class or instance shape.
	Shape string `path:"-" query:"-" json:"shape,omitempty"`
	// Keys of the component.
	Keys *types.ResourceComponentOperationKeys `path:"-" query:"-" json:"keys,omitempty"`
	// Index key to identify the component instance.
	IndexKey string `path:"-" query:"-" json:"indexKey,omitempty"`

	// Components indicates replacing the stale ResourceComponent entities.
	Components []*ResourceComponentCreateInput `uri:"-" query:"-" json:"components,omitempty"`
	// Instances indicates replacing the stale ResourceComponent entities.
	Instances []*ResourceComponentCreateInput `uri:"-" query:"-" json:"instances,omitempty"`
	// Dependencies indicates replacing the stale ResourceComponentRelationship entities.
	Dependencies []*ResourceComponentRelationshipCreateInput `uri:"-" query:"-" json:"dependencies,omitempty"`
	// contains filtered or unexported fields
}

ResourceComponentPatchInput holds the patch input of the ResourceComponent entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentPatchInput) Model added in v0.5.0

Model returns the ResourceComponent patched entity, after validating.

func (*ResourceComponentPatchInput) PatchModel added in v0.5.0

func (rcpi *ResourceComponentPatchInput) PatchModel() *ResourceComponent

PatchModel returns the ResourceComponent partition entity for patching.

func (*ResourceComponentPatchInput) SetGinContext added in v0.5.0

func (ic *ResourceComponentPatchInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentPatchInput) SetModelClient added in v0.5.0

func (ic *ResourceComponentPatchInput) SetModelClient(cli *Client)

func (*ResourceComponentPatchInput) Validate added in v0.5.0

func (rcpi *ResourceComponentPatchInput) Validate() error

Validate checks the ResourceComponentPatchInput entity.

func (*ResourceComponentPatchInput) ValidateWith added in v0.5.0

func (rcpi *ResourceComponentPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentPatchInput entity with the given context and client set.

type ResourceComponentQuery added in v0.4.0

type ResourceComponentQuery struct {
	// contains filtered or unexported fields
}

ResourceComponentQuery is the builder for querying ResourceComponent entities.

func (*ResourceComponentQuery) Aggregate added in v0.4.0

Aggregate returns a ResourceComponentSelect configured with the given aggregations.

func (*ResourceComponentQuery) All added in v0.4.0

All executes the query and returns a list of ResourceComponents.

func (*ResourceComponentQuery) AllX added in v0.4.0

AllX is like All, but panics if an error occurs.

func (*ResourceComponentQuery) Clone added in v0.4.0

Clone returns a duplicate of the ResourceComponentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ResourceComponentQuery) Count added in v0.4.0

func (rcq *ResourceComponentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ResourceComponentQuery) CountX added in v0.4.0

func (rcq *ResourceComponentQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ResourceComponentQuery) ExecContext added in v0.4.0

func (c *ResourceComponentQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentQuery) Exist added in v0.4.0

func (rcq *ResourceComponentQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ResourceComponentQuery) ExistX added in v0.4.0

func (rcq *ResourceComponentQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ResourceComponentQuery) First added in v0.4.0

First returns the first ResourceComponent entity from the query. Returns a *NotFoundError when no ResourceComponent was found.

func (*ResourceComponentQuery) FirstID added in v0.4.0

func (rcq *ResourceComponentQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first ResourceComponent ID from the query. Returns a *NotFoundError when no ResourceComponent ID was found.

func (*ResourceComponentQuery) FirstIDX added in v0.4.0

func (rcq *ResourceComponentQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ResourceComponentQuery) FirstX added in v0.4.0

FirstX is like First, but panics if an error occurs.

func (*ResourceComponentQuery) ForShare added in v0.4.0

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 (*ResourceComponentQuery) ForUpdate added in v0.4.0

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 (*ResourceComponentQuery) GroupBy added in v0.4.0

func (rcq *ResourceComponentQuery) GroupBy(field string, fields ...string) *ResourceComponentGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ResourceComponent.Query().
	GroupBy(resourcecomponent.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ResourceComponentQuery) IDs added in v0.4.0

func (rcq *ResourceComponentQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of ResourceComponent IDs.

func (*ResourceComponentQuery) IDsX added in v0.4.0

func (rcq *ResourceComponentQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*ResourceComponentQuery) Limit added in v0.4.0

Limit the number of records to be returned by this query.

func (*ResourceComponentQuery) Modify added in v0.4.0

func (rcq *ResourceComponentQuery) Modify(modifiers ...func(s *sql.Selector)) *ResourceComponentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ResourceComponentQuery) Offset added in v0.4.0

func (rcq *ResourceComponentQuery) Offset(offset int) *ResourceComponentQuery

Offset to start from.

func (*ResourceComponentQuery) Only added in v0.4.0

Only returns a single ResourceComponent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ResourceComponent entity is found. Returns a *NotFoundError when no ResourceComponent entities are found.

func (*ResourceComponentQuery) OnlyID added in v0.4.0

func (rcq *ResourceComponentQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only ResourceComponent ID in the query. Returns a *NotSingularError when more than one ResourceComponent ID is found. Returns a *NotFoundError when no entities are found.

func (*ResourceComponentQuery) OnlyIDX added in v0.4.0

func (rcq *ResourceComponentQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ResourceComponentQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*ResourceComponentQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*ResourceComponentQuery) QueryClass added in v0.4.0

QueryClass chains the current query on the "class" edge.

func (*ResourceComponentQuery) QueryComponents added in v0.4.0

func (rcq *ResourceComponentQuery) QueryComponents() *ResourceComponentQuery

QueryComponents chains the current query on the "components" edge.

func (*ResourceComponentQuery) QueryComposition added in v0.4.0

func (rcq *ResourceComponentQuery) QueryComposition() *ResourceComponentQuery

QueryComposition chains the current query on the "composition" edge.

func (*ResourceComponentQuery) QueryConnector added in v0.4.0

func (rcq *ResourceComponentQuery) QueryConnector() *ConnectorQuery

QueryConnector chains the current query on the "connector" edge.

func (*ResourceComponentQuery) QueryContext added in v0.4.0

func (c *ResourceComponentQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentQuery) QueryDependencies added in v0.4.0

QueryDependencies chains the current query on the "dependencies" edge.

func (*ResourceComponentQuery) QueryEnvironment added in v0.4.0

func (rcq *ResourceComponentQuery) QueryEnvironment() *EnvironmentQuery

QueryEnvironment chains the current query on the "environment" edge.

func (*ResourceComponentQuery) QueryInstances added in v0.4.0

func (rcq *ResourceComponentQuery) QueryInstances() *ResourceComponentQuery

QueryInstances chains the current query on the "instances" edge.

func (*ResourceComponentQuery) QueryProject added in v0.4.0

func (rcq *ResourceComponentQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*ResourceComponentQuery) QueryResource added in v0.4.0

func (rcq *ResourceComponentQuery) QueryResource() *ResourceQuery

QueryResource chains the current query on the "resource" edge.

func (*ResourceComponentQuery) Select added in v0.4.0

func (rcq *ResourceComponentQuery) Select(fields ...string) *ResourceComponentSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.ResourceComponent.Query().
	Select(resourcecomponent.FieldCreateTime).
	Scan(ctx, &v)

func (*ResourceComponentQuery) Unique added in v0.4.0

func (rcq *ResourceComponentQuery) Unique(unique bool) *ResourceComponentQuery

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 (*ResourceComponentQuery) Where added in v0.4.0

Where adds a new predicate for the ResourceComponentQuery builder.

func (*ResourceComponentQuery) WhereP added in v0.4.0

func (rcq *ResourceComponentQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceComponentQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ResourceComponentQuery) WithClass added in v0.4.0

WithClass tells the query-builder to eager-load the nodes that are connected to the "class" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceComponentQuery) WithComponents added in v0.4.0

func (rcq *ResourceComponentQuery) WithComponents(opts ...func(*ResourceComponentQuery)) *ResourceComponentQuery

WithComponents tells the query-builder to eager-load the nodes that are connected to the "components" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceComponentQuery) WithComposition added in v0.4.0

func (rcq *ResourceComponentQuery) WithComposition(opts ...func(*ResourceComponentQuery)) *ResourceComponentQuery

WithComposition tells the query-builder to eager-load the nodes that are connected to the "composition" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceComponentQuery) WithConnector added in v0.4.0

func (rcq *ResourceComponentQuery) WithConnector(opts ...func(*ConnectorQuery)) *ResourceComponentQuery

WithConnector tells the query-builder to eager-load the nodes that are connected to the "connector" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceComponentQuery) WithDependencies added in v0.4.0

WithDependencies tells the query-builder to eager-load the nodes that are connected to the "dependencies" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceComponentQuery) WithEnvironment added in v0.4.0

func (rcq *ResourceComponentQuery) WithEnvironment(opts ...func(*EnvironmentQuery)) *ResourceComponentQuery

WithEnvironment tells the query-builder to eager-load the nodes that are connected to the "environment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceComponentQuery) WithInstances added in v0.4.0

func (rcq *ResourceComponentQuery) WithInstances(opts ...func(*ResourceComponentQuery)) *ResourceComponentQuery

WithInstances tells the query-builder to eager-load the nodes that are connected to the "instances" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceComponentQuery) WithProject added in v0.4.0

func (rcq *ResourceComponentQuery) WithProject(opts ...func(*ProjectQuery)) *ResourceComponentQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceComponentQuery) WithResource added in v0.4.0

func (rcq *ResourceComponentQuery) WithResource(opts ...func(*ResourceQuery)) *ResourceComponentQuery

WithResource tells the query-builder to eager-load the nodes that are connected to the "resource" edge. The optional arguments are used to configure the query builder of the edge.

type ResourceComponentQueryInput added in v0.4.0

type ResourceComponentQueryInput struct {

	// Project indicates to query ResourceComponent entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project"`
	// Environment indicates to query ResourceComponent entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"environment"`
	// Resource indicates to query ResourceComponent entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"resource"`

	// Refer holds the route path reference of the ResourceComponent entity.
	Refer *object.Refer `path:"resourcecomponent,default=" query:"-" json:"-"`
	// ID of the ResourceComponent entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

ResourceComponentQueryInput holds the query input of the ResourceComponent entity, please tags with `path:",inline"` if embedding.

func (*ResourceComponentQueryInput) Model added in v0.4.0

Model returns the ResourceComponent entity for querying, after validating.

func (*ResourceComponentQueryInput) SetGinContext added in v0.4.0

func (ic *ResourceComponentQueryInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentQueryInput) SetModelClient added in v0.4.0

func (ic *ResourceComponentQueryInput) SetModelClient(cli *Client)

func (*ResourceComponentQueryInput) Validate added in v0.4.0

func (rcqi *ResourceComponentQueryInput) Validate() error

Validate checks the ResourceComponentQueryInput entity.

func (*ResourceComponentQueryInput) ValidateWith added in v0.4.0

func (rcqi *ResourceComponentQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentQueryInput entity with the given context and client set.

type ResourceComponentQueryInputs added in v0.4.0

type ResourceComponentQueryInputs struct {

	// Project indicates to query ResourceComponent entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to query ResourceComponent entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to query ResourceComponent entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

ResourceComponentQueryInputs holds the query input of the ResourceComponent entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ResourceComponentQueryInputs) SetGinContext added in v0.4.0

func (ic *ResourceComponentQueryInputs) SetGinContext(ctx *gin.Context)

func (*ResourceComponentQueryInputs) SetModelClient added in v0.4.0

func (ic *ResourceComponentQueryInputs) SetModelClient(cli *Client)

func (*ResourceComponentQueryInputs) Validate added in v0.4.0

func (rcqi *ResourceComponentQueryInputs) Validate() error

Validate checks the ResourceComponentQueryInputs entity.

func (*ResourceComponentQueryInputs) ValidateWith added in v0.4.0

func (rcqi *ResourceComponentQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentQueryInputs entity with the given context and client set.

type ResourceComponentRelationship added in v0.4.0

type ResourceComponentRelationship struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// ID of the resource component.
	ResourceComponentID object.ID `json:"resource_component_id,omitempty"`
	// ID of the resource that resource depends on.
	DependencyID object.ID `json:"dependency_id,omitempty"`
	// Type of the relationship.
	Type string `json:"type,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ResourceComponentRelationshipQuery when eager-loading is set.
	Edges ResourceComponentRelationshipEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

ResourceComponentRelationship is the model entity for the ResourceComponentRelationship schema.

func (*ResourceComponentRelationship) ExecContext added in v0.4.0

func (c *ResourceComponentRelationship) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationship) QueryContext added in v0.4.0

func (c *ResourceComponentRelationship) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationship) QueryDependency added in v0.4.0

func (rcr *ResourceComponentRelationship) QueryDependency() *ResourceComponentQuery

QueryDependency queries the "dependency" edge of the ResourceComponentRelationship entity.

func (*ResourceComponentRelationship) QueryResourceComponent added in v0.4.0

func (rcr *ResourceComponentRelationship) QueryResourceComponent() *ResourceComponentQuery

QueryResourceComponent queries the "resource_component" edge of the ResourceComponentRelationship entity.

func (*ResourceComponentRelationship) String added in v0.4.0

func (rcr *ResourceComponentRelationship) String() string

String implements the fmt.Stringer.

func (*ResourceComponentRelationship) Unwrap added in v0.4.0

Unwrap unwraps the ResourceComponentRelationship 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 (*ResourceComponentRelationship) Update added in v0.4.0

Update returns a builder for updating this ResourceComponentRelationship. Note that you need to call ResourceComponentRelationship.Unwrap() before calling this method if this ResourceComponentRelationship was returned from a transaction, and the transaction was committed or rolled back.

func (*ResourceComponentRelationship) Value added in v0.4.0

func (rcr *ResourceComponentRelationship) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ResourceComponentRelationship. This includes values selected through modifiers, order, etc.

func (*ResourceComponentRelationship) View added in v0.4.0

View returns the output of ResourceComponentRelationship entity.

type ResourceComponentRelationshipClient added in v0.4.0

type ResourceComponentRelationshipClient struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipClient is a client for the ResourceComponentRelationship schema.

func NewResourceComponentRelationshipClient added in v0.4.0

func NewResourceComponentRelationshipClient(c config) *ResourceComponentRelationshipClient

NewResourceComponentRelationshipClient returns a client for the ResourceComponentRelationship from the given config.

func (*ResourceComponentRelationshipClient) Create added in v0.4.0

Create returns a builder for creating a ResourceComponentRelationship entity.

func (*ResourceComponentRelationshipClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of ResourceComponentRelationship entities.

func (*ResourceComponentRelationshipClient) Delete added in v0.4.0

Delete returns a delete builder for ResourceComponentRelationship.

func (*ResourceComponentRelationshipClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*ResourceComponentRelationshipClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ResourceComponentRelationshipClient) ExecContext added in v0.4.0

func (c *ResourceComponentRelationshipClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationshipClient) Get added in v0.4.0

Get returns a ResourceComponentRelationship entity by its id.

func (*ResourceComponentRelationshipClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*ResourceComponentRelationshipClient) Hooks added in v0.4.0

Hooks returns the client hooks.

func (*ResourceComponentRelationshipClient) Intercept added in v0.4.0

func (c *ResourceComponentRelationshipClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `resourcecomponentrelationship.Intercept(f(g(h())))`.

func (*ResourceComponentRelationshipClient) Interceptors added in v0.4.0

Interceptors returns the client interceptors.

func (*ResourceComponentRelationshipClient) MapCreateBulk added in v0.5.0

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 (*ResourceComponentRelationshipClient) Query added in v0.4.0

Query returns a query builder for ResourceComponentRelationship.

func (*ResourceComponentRelationshipClient) QueryContext added in v0.4.0

func (c *ResourceComponentRelationshipClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationshipClient) QueryDependency added in v0.4.0

QueryDependency queries the dependency edge of a ResourceComponentRelationship.

func (*ResourceComponentRelationshipClient) QueryResourceComponent added in v0.4.0

QueryResourceComponent queries the resource_component edge of a ResourceComponentRelationship.

func (*ResourceComponentRelationshipClient) Update added in v0.4.0

Update returns an update builder for ResourceComponentRelationship.

func (*ResourceComponentRelationshipClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*ResourceComponentRelationshipClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*ResourceComponentRelationshipClient) Use added in v0.4.0

func (c *ResourceComponentRelationshipClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resourcecomponentrelationship.Hooks(f(g(h())))`.

type ResourceComponentRelationshipClientGetter added in v0.4.0

type ResourceComponentRelationshipClientGetter interface {
	// ResourceComponentRelationships returns the client for interacting with the ResourceComponentRelationship builders.
	ResourceComponentRelationships() *ResourceComponentRelationshipClient
}

ResourceComponentRelationshipClientGetter is an interface that allows getting ResourceComponentRelationshipClient.

type ResourceComponentRelationshipCreate added in v0.4.0

type ResourceComponentRelationshipCreate struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipCreate is the builder for creating a ResourceComponentRelationship entity.

func (*ResourceComponentRelationshipCreate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentRelationshipCreate) ExecContext added in v0.4.0

func (c *ResourceComponentRelationshipCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationshipCreate) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceComponentRelationshipCreate) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceComponentRelationshipCreate) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentRelationshipCreate) Mutation added in v0.4.0

Mutation returns the ResourceComponentRelationshipMutation object of the builder.

func (*ResourceComponentRelationshipCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceComponentRelationship.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceComponentRelationshipUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceComponentRelationshipCreate) OnConflictColumns added in v0.4.0

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceComponentRelationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceComponentRelationshipCreate) QueryContext added in v0.4.0

func (c *ResourceComponentRelationshipCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationshipCreate) Save added in v0.4.0

Save creates the ResourceComponentRelationship in the database.

func (*ResourceComponentRelationshipCreate) SaveE added in v0.4.0

SaveE calls the given function after created the ResourceComponentRelationship entity, which is always good for cascading create operations.

func (*ResourceComponentRelationshipCreate) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceComponentRelationshipCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*ResourceComponentRelationshipCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceComponentRelationshipCreate) SetCreateTime added in v0.4.0

SetCreateTime sets the "create_time" field.

func (*ResourceComponentRelationshipCreate) SetDependency added in v0.4.0

SetDependency sets the "dependency" edge to the ResourceComponent entity.

func (*ResourceComponentRelationshipCreate) SetDependencyID added in v0.4.0

SetDependencyID sets the "dependency_id" field.

func (*ResourceComponentRelationshipCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*ResourceComponentRelationshipCreate) SetNillableCreateTime added in v0.4.0

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ResourceComponentRelationshipCreate) SetResourceComponent added in v0.4.0

SetResourceComponent sets the "resource_component" edge to the ResourceComponent entity.

func (*ResourceComponentRelationshipCreate) SetResourceComponentID added in v0.4.0

SetResourceComponentID sets the "resource_component_id" field.

func (*ResourceComponentRelationshipCreate) SetType added in v0.4.0

SetType sets the "type" field.

type ResourceComponentRelationshipCreateBulk added in v0.4.0

type ResourceComponentRelationshipCreateBulk struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipCreateBulk is the builder for creating many ResourceComponentRelationship entities in bulk.

func (*ResourceComponentRelationshipCreateBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentRelationshipCreateBulk) ExecContext added in v0.4.0

func (c *ResourceComponentRelationshipCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationshipCreateBulk) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceComponentRelationshipCreateBulk) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceComponentRelationshipCreateBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentRelationshipCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceComponentRelationship.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceComponentRelationshipUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceComponentRelationshipCreateBulk) OnConflictColumns added in v0.4.0

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceComponentRelationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceComponentRelationshipCreateBulk) QueryContext added in v0.4.0

func (c *ResourceComponentRelationshipCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationshipCreateBulk) Save added in v0.4.0

Save creates the ResourceComponentRelationship entities in the database.

func (*ResourceComponentRelationshipCreateBulk) SaveE added in v0.4.0

SaveE calls the given function after created the ResourceComponentRelationship entities, which is always good for cascading create operations.

func (*ResourceComponentRelationshipCreateBulk) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceComponentRelationshipCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceComponentRelationshipCreateBulk) Set added in v0.4.0

Set leverages the ResourceComponentRelationshipCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ResourceComponentRelationshipCreateInput added in v0.4.0

type ResourceComponentRelationshipCreateInput struct {

	// Type of the relationship.
	Type string `path:"-" query:"-" json:"type"`

	// Dependency specifies full inserting the new ResourceComponent entity of the ResourceComponentRelationship entity.
	Dependency *ResourceComponentQueryInput `uri:"-" query:"-" json:"dependency"`
	// contains filtered or unexported fields
}

ResourceComponentRelationshipCreateInput holds the creation input of the ResourceComponentRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentRelationshipCreateInput) Model added in v0.4.0

Model returns the ResourceComponentRelationship entity for creating, after validating.

func (*ResourceComponentRelationshipCreateInput) SetGinContext added in v0.4.0

func (ic *ResourceComponentRelationshipCreateInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentRelationshipCreateInput) SetModelClient added in v0.4.0

func (ic *ResourceComponentRelationshipCreateInput) SetModelClient(cli *Client)

func (*ResourceComponentRelationshipCreateInput) Validate added in v0.4.0

Validate checks the ResourceComponentRelationshipCreateInput entity.

func (*ResourceComponentRelationshipCreateInput) ValidateWith added in v0.4.0

func (rcrci *ResourceComponentRelationshipCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipCreateInput entity with the given context and client set.

type ResourceComponentRelationshipCreateInputs added in v0.4.0

type ResourceComponentRelationshipCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceComponentRelationshipCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceComponentRelationshipCreateInputs holds the creation input of the ResourceComponentRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentRelationshipCreateInputs) Model added in v0.4.0

Model returns the ResourceComponentRelationship entities for creating, after validating.

func (*ResourceComponentRelationshipCreateInputs) SetGinContext added in v0.4.0

func (ic *ResourceComponentRelationshipCreateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceComponentRelationshipCreateInputs) SetModelClient added in v0.4.0

func (ic *ResourceComponentRelationshipCreateInputs) SetModelClient(cli *Client)

func (*ResourceComponentRelationshipCreateInputs) Validate added in v0.4.0

Validate checks the ResourceComponentRelationshipCreateInputs entity .

func (*ResourceComponentRelationshipCreateInputs) ValidateWith added in v0.4.0

func (rcrci *ResourceComponentRelationshipCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipCreateInputs entity with the given context and client set.

type ResourceComponentRelationshipCreateInputsItem added in v0.4.0

type ResourceComponentRelationshipCreateInputsItem struct {
	// Type of the relationship.
	Type string `path:"-" query:"-" json:"type"`

	// Dependency specifies full inserting the new ResourceComponent entity.
	Dependency *ResourceComponentQueryInput `uri:"-" query:"-" json:"dependency"`
}

ResourceComponentRelationshipCreateInputs holds the creation input item of the ResourceComponentRelationship entities.

func (*ResourceComponentRelationshipCreateInputsItem) ValidateWith added in v0.4.0

func (rcrci *ResourceComponentRelationshipCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipCreateInputsItem entity with the given context and client set.

type ResourceComponentRelationshipDelete added in v0.4.0

type ResourceComponentRelationshipDelete struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipDelete is the builder for deleting a ResourceComponentRelationship entity.

func (*ResourceComponentRelationshipDelete) Exec added in v0.4.0

Exec executes the deletion query and returns how many vertices were deleted.

func (*ResourceComponentRelationshipDelete) ExecContext added in v0.4.0

func (c *ResourceComponentRelationshipDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationshipDelete) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentRelationshipDelete) QueryContext added in v0.4.0

func (c *ResourceComponentRelationshipDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationshipDelete) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentRelationshipDelete builder.

type ResourceComponentRelationshipDeleteInput added in v0.4.0

type ResourceComponentRelationshipDeleteInput struct {
	ResourceComponentRelationshipQueryInput `path:",inline"`
}

ResourceComponentRelationshipDeleteInput holds the deletion input of the ResourceComponentRelationship entity, please tags with `path:",inline"` if embedding.

func (*ResourceComponentRelationshipDeleteInput) SetGinContext added in v0.4.0

func (ic *ResourceComponentRelationshipDeleteInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentRelationshipDeleteInput) SetModelClient added in v0.4.0

func (ic *ResourceComponentRelationshipDeleteInput) SetModelClient(cli *Client)

type ResourceComponentRelationshipDeleteInputs added in v0.4.0

type ResourceComponentRelationshipDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceComponentRelationshipDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceComponentRelationshipDeleteInputs holds the deletion input of the ResourceComponentRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentRelationshipDeleteInputs) IDs added in v0.4.0

IDs returns the ID list of the ResourceComponentRelationship entities for deleting, after validating.

func (*ResourceComponentRelationshipDeleteInputs) Model added in v0.4.0

Model returns the ResourceComponentRelationship entities for deleting, after validating.

func (*ResourceComponentRelationshipDeleteInputs) SetGinContext added in v0.4.0

func (ic *ResourceComponentRelationshipDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ResourceComponentRelationshipDeleteInputs) SetModelClient added in v0.4.0

func (ic *ResourceComponentRelationshipDeleteInputs) SetModelClient(cli *Client)

func (*ResourceComponentRelationshipDeleteInputs) Validate added in v0.4.0

Validate checks the ResourceComponentRelationshipDeleteInputs entity.

func (*ResourceComponentRelationshipDeleteInputs) ValidateWith added in v0.4.0

func (rcrdi *ResourceComponentRelationshipDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipDeleteInputs entity with the given context and client set.

type ResourceComponentRelationshipDeleteInputsItem added in v0.4.0

type ResourceComponentRelationshipDeleteInputsItem struct {
	// ID of the ResourceComponentRelationship entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Type of the ResourceComponentRelationship entity, a part of the unique index.
	Type string `path:"-" query:"-" json:"type,omitempty"`
}

ResourceComponentRelationshipDeleteInputs holds the deletion input item of the ResourceComponentRelationship entities.

type ResourceComponentRelationshipDeleteOne added in v0.4.0

type ResourceComponentRelationshipDeleteOne struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipDeleteOne is the builder for deleting a single ResourceComponentRelationship entity.

func (*ResourceComponentRelationshipDeleteOne) Exec added in v0.4.0

Exec executes the deletion query.

func (*ResourceComponentRelationshipDeleteOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentRelationshipDeleteOne) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentRelationshipDelete builder.

type ResourceComponentRelationshipEdges added in v0.4.0

type ResourceComponentRelationshipEdges struct {
	// ResourceComponent to which it currently belongs.
	ResourceComponent *ResourceComponent `json:"resource_component,omitempty"`
	// ResourceComponent to which the dependency belongs.
	Dependency *ResourceComponent `json:"dependency,omitempty"`
	// contains filtered or unexported fields
}

ResourceComponentRelationshipEdges holds the relations/edges for other nodes in the graph.

func (ResourceComponentRelationshipEdges) DependencyOrErr added in v0.4.0

DependencyOrErr returns the Dependency value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceComponentRelationshipEdges) ResourceComponentOrErr added in v0.4.0

func (e ResourceComponentRelationshipEdges) ResourceComponentOrErr() (*ResourceComponent, error)

ResourceComponentOrErr returns the ResourceComponent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ResourceComponentRelationshipGroupBy added in v0.4.0

type ResourceComponentRelationshipGroupBy struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipGroupBy is the group-by builder for ResourceComponentRelationship entities.

func (*ResourceComponentRelationshipGroupBy) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the group-by query.

func (*ResourceComponentRelationshipGroupBy) Bool added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipGroupBy) BoolX added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceComponentRelationshipGroupBy) Bools added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipGroupBy) BoolsX added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ResourceComponentRelationshipGroupBy) Float64 added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipGroupBy) Float64X added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceComponentRelationshipGroupBy) Float64s added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipGroupBy) Float64sX added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceComponentRelationshipGroupBy) Int added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipGroupBy) IntX added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceComponentRelationshipGroupBy) Ints added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipGroupBy) IntsX added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceComponentRelationshipGroupBy) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*ResourceComponentRelationshipGroupBy) ScanX added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceComponentRelationshipGroupBy) String added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipGroupBy) StringX added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceComponentRelationshipGroupBy) Strings added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipGroupBy) StringsX added in v0.4.0

func (s *ResourceComponentRelationshipGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceComponentRelationshipMutation added in v0.4.0

type ResourceComponentRelationshipMutation struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipMutation represents an operation that mutates the ResourceComponentRelationship nodes in the graph.

func (*ResourceComponentRelationshipMutation) AddField added in v0.4.0

func (m *ResourceComponentRelationshipMutation) 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 (*ResourceComponentRelationshipMutation) AddedEdges added in v0.4.0

AddedEdges returns all edge names that were set/added in this mutation.

func (*ResourceComponentRelationshipMutation) AddedField added in v0.4.0

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 (*ResourceComponentRelationshipMutation) AddedFields added in v0.4.0

func (m *ResourceComponentRelationshipMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ResourceComponentRelationshipMutation) AddedIDs added in v0.4.0

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ResourceComponentRelationshipMutation) ClearDependency added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ClearDependency()

ClearDependency clears the "dependency" edge to the ResourceComponent entity.

func (*ResourceComponentRelationshipMutation) ClearEdge added in v0.4.0

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 (*ResourceComponentRelationshipMutation) ClearField added in v0.4.0

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 (*ResourceComponentRelationshipMutation) ClearResourceComponent added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ClearResourceComponent()

ClearResourceComponent clears the "resource_component" edge to the ResourceComponent entity.

func (*ResourceComponentRelationshipMutation) ClearedEdges added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ResourceComponentRelationshipMutation) ClearedFields added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ResourceComponentRelationshipMutation) Client added in v0.4.0

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 (*ResourceComponentRelationshipMutation) CreateTime added in v0.4.0

func (m *ResourceComponentRelationshipMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ResourceComponentRelationshipMutation) DependencyCleared added in v0.4.0

func (m *ResourceComponentRelationshipMutation) DependencyCleared() bool

DependencyCleared reports if the "dependency" edge to the ResourceComponent entity was cleared.

func (*ResourceComponentRelationshipMutation) DependencyID added in v0.4.0

func (m *ResourceComponentRelationshipMutation) DependencyID() (r object.ID, exists bool)

DependencyID returns the value of the "dependency_id" field in the mutation.

func (*ResourceComponentRelationshipMutation) DependencyIDs added in v0.4.0

func (m *ResourceComponentRelationshipMutation) DependencyIDs() (ids []object.ID)

DependencyIDs returns the "dependency" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DependencyID instead. It exists only for internal usage by the builders.

func (*ResourceComponentRelationshipMutation) EdgeCleared added in v0.4.0

func (m *ResourceComponentRelationshipMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ResourceComponentRelationshipMutation) ExecContext added in v0.4.0

func (c *ResourceComponentRelationshipMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationshipMutation) Field added in v0.4.0

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 (*ResourceComponentRelationshipMutation) FieldCleared added in v0.4.0

func (m *ResourceComponentRelationshipMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ResourceComponentRelationshipMutation) Fields added in v0.4.0

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 (*ResourceComponentRelationshipMutation) GetType added in v0.4.0

func (m *ResourceComponentRelationshipMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ResourceComponentRelationshipMutation) ID added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ID() (id object.ID, 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 (*ResourceComponentRelationshipMutation) IDs added in v0.4.0

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 (*ResourceComponentRelationshipMutation) OldCreateTime added in v0.4.0

func (m *ResourceComponentRelationshipMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ResourceComponentRelationship entity. If the ResourceComponentRelationship 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 (*ResourceComponentRelationshipMutation) OldDependencyID added in v0.4.0

func (m *ResourceComponentRelationshipMutation) OldDependencyID(ctx context.Context) (v object.ID, err error)

OldDependencyID returns the old "dependency_id" field's value of the ResourceComponentRelationship entity. If the ResourceComponentRelationship 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 (*ResourceComponentRelationshipMutation) OldField added in v0.4.0

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 (*ResourceComponentRelationshipMutation) OldResourceComponentID added in v0.4.0

func (m *ResourceComponentRelationshipMutation) OldResourceComponentID(ctx context.Context) (v object.ID, err error)

OldResourceComponentID returns the old "resource_component_id" field's value of the ResourceComponentRelationship entity. If the ResourceComponentRelationship 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 (*ResourceComponentRelationshipMutation) OldType added in v0.4.0

OldType returns the old "type" field's value of the ResourceComponentRelationship entity. If the ResourceComponentRelationship 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 (*ResourceComponentRelationshipMutation) Op added in v0.4.0

Op returns the operation name.

func (*ResourceComponentRelationshipMutation) QueryContext added in v0.4.0

func (c *ResourceComponentRelationshipMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationshipMutation) RemovedEdges added in v0.4.0

func (m *ResourceComponentRelationshipMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ResourceComponentRelationshipMutation) RemovedIDs added in v0.4.0

func (m *ResourceComponentRelationshipMutation) 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 (*ResourceComponentRelationshipMutation) ResetCreateTime added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ResourceComponentRelationshipMutation) ResetDependency added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ResetDependency()

ResetDependency resets all changes to the "dependency" edge.

func (*ResourceComponentRelationshipMutation) ResetDependencyID added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ResetDependencyID()

ResetDependencyID resets all changes to the "dependency_id" field.

func (*ResourceComponentRelationshipMutation) ResetEdge added in v0.4.0

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 (*ResourceComponentRelationshipMutation) ResetField added in v0.4.0

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 (*ResourceComponentRelationshipMutation) ResetResourceComponent added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ResetResourceComponent()

ResetResourceComponent resets all changes to the "resource_component" edge.

func (*ResourceComponentRelationshipMutation) ResetResourceComponentID added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ResetResourceComponentID()

ResetResourceComponentID resets all changes to the "resource_component_id" field.

func (*ResourceComponentRelationshipMutation) ResetType added in v0.4.0

ResetType resets all changes to the "type" field.

func (*ResourceComponentRelationshipMutation) ResourceComponentCleared added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ResourceComponentCleared() bool

ResourceComponentCleared reports if the "resource_component" edge to the ResourceComponent entity was cleared.

func (*ResourceComponentRelationshipMutation) ResourceComponentID added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ResourceComponentID() (r object.ID, exists bool)

ResourceComponentID returns the value of the "resource_component_id" field in the mutation.

func (*ResourceComponentRelationshipMutation) ResourceComponentIDs added in v0.4.0

func (m *ResourceComponentRelationshipMutation) ResourceComponentIDs() (ids []object.ID)

ResourceComponentIDs returns the "resource_component" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ResourceComponentID instead. It exists only for internal usage by the builders.

func (*ResourceComponentRelationshipMutation) SetCreateTime added in v0.4.0

func (m *ResourceComponentRelationshipMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ResourceComponentRelationshipMutation) SetDependencyID added in v0.4.0

func (m *ResourceComponentRelationshipMutation) SetDependencyID(o object.ID)

SetDependencyID sets the "dependency_id" field.

func (*ResourceComponentRelationshipMutation) SetField added in v0.4.0

func (m *ResourceComponentRelationshipMutation) 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 (*ResourceComponentRelationshipMutation) SetID added in v0.4.0

SetID sets the value of the id field. Note that this operation is only accepted on creation of ResourceComponentRelationship entities.

func (*ResourceComponentRelationshipMutation) SetOp added in v0.4.0

SetOp allows setting the mutation operation.

func (*ResourceComponentRelationshipMutation) SetResourceComponentID added in v0.4.0

func (m *ResourceComponentRelationshipMutation) SetResourceComponentID(o object.ID)

SetResourceComponentID sets the "resource_component_id" field.

func (*ResourceComponentRelationshipMutation) SetType added in v0.4.0

SetType sets the "type" field.

func (ResourceComponentRelationshipMutation) Tx added in v0.4.0

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ResourceComponentRelationshipMutation) Type added in v0.4.0

Type returns the node type of this mutation (ResourceComponentRelationship).

func (*ResourceComponentRelationshipMutation) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentRelationshipMutation builder.

func (*ResourceComponentRelationshipMutation) WhereP added in v0.4.0

func (m *ResourceComponentRelationshipMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceComponentRelationshipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ResourceComponentRelationshipOutput added in v0.4.0

type ResourceComponentRelationshipOutput struct {
	ID         object.ID  `json:"id,omitempty"`
	CreateTime *time.Time `json:"createTime,omitempty"`
	Type       string     `json:"type,omitempty"`

	Dependency *ResourceComponentOutput `json:"dependency,omitempty"`
}

ResourceComponentRelationshipOutput holds the output of the ResourceComponentRelationship entity.

func ExposeResourceComponentRelationship added in v0.4.0

func ExposeResourceComponentRelationship(_rcr *ResourceComponentRelationship) *ResourceComponentRelationshipOutput

ExposeResourceComponentRelationship converts the ResourceComponentRelationship to ResourceComponentRelationshipOutput.

func ExposeResourceComponentRelationships added in v0.4.0

func ExposeResourceComponentRelationships(_rcrs []*ResourceComponentRelationship) []*ResourceComponentRelationshipOutput

ExposeResourceComponentRelationships converts the ResourceComponentRelationship slice to ResourceComponentRelationshipOutput pointer slice.

type ResourceComponentRelationshipPatchInput added in v0.5.0

type ResourceComponentRelationshipPatchInput struct {
	ResourceComponentRelationshipQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// Type of the relationship.
	Type string `path:"-" query:"-" json:"type,omitempty"`

	// Dependency indicates replacing the stale ResourceComponent entity.
	Dependency *ResourceComponentQueryInput `uri:"-" query:"-" json:"dependency"`
	// contains filtered or unexported fields
}

ResourceComponentRelationshipPatchInput holds the patch input of the ResourceComponentRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentRelationshipPatchInput) Model added in v0.5.0

Model returns the ResourceComponentRelationship patched entity, after validating.

func (*ResourceComponentRelationshipPatchInput) PatchModel added in v0.5.0

PatchModel returns the ResourceComponentRelationship partition entity for patching.

func (*ResourceComponentRelationshipPatchInput) SetGinContext added in v0.5.0

func (ic *ResourceComponentRelationshipPatchInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentRelationshipPatchInput) SetModelClient added in v0.5.0

func (ic *ResourceComponentRelationshipPatchInput) SetModelClient(cli *Client)

func (*ResourceComponentRelationshipPatchInput) Validate added in v0.5.0

Validate checks the ResourceComponentRelationshipPatchInput entity.

func (*ResourceComponentRelationshipPatchInput) ValidateWith added in v0.5.0

func (rcrpi *ResourceComponentRelationshipPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipPatchInput entity with the given context and client set.

type ResourceComponentRelationshipQuery added in v0.4.0

type ResourceComponentRelationshipQuery struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipQuery is the builder for querying ResourceComponentRelationship entities.

func (*ResourceComponentRelationshipQuery) Aggregate added in v0.4.0

Aggregate returns a ResourceComponentRelationshipSelect configured with the given aggregations.

func (*ResourceComponentRelationshipQuery) All added in v0.4.0

All executes the query and returns a list of ResourceComponentRelationships.

func (*ResourceComponentRelationshipQuery) AllX added in v0.4.0

AllX is like All, but panics if an error occurs.

func (*ResourceComponentRelationshipQuery) Clone added in v0.4.0

Clone returns a duplicate of the ResourceComponentRelationshipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ResourceComponentRelationshipQuery) Count added in v0.4.0

Count returns the count of the given query.

func (*ResourceComponentRelationshipQuery) CountX added in v0.4.0

CountX is like Count, but panics if an error occurs.

func (*ResourceComponentRelationshipQuery) ExecContext added in v0.4.0

func (c *ResourceComponentRelationshipQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationshipQuery) Exist added in v0.4.0

Exist returns true if the query has elements in the graph.

func (*ResourceComponentRelationshipQuery) ExistX added in v0.4.0

ExistX is like Exist, but panics if an error occurs.

func (*ResourceComponentRelationshipQuery) First added in v0.4.0

First returns the first ResourceComponentRelationship entity from the query. Returns a *NotFoundError when no ResourceComponentRelationship was found.

func (*ResourceComponentRelationshipQuery) FirstID added in v0.4.0

func (rcrq *ResourceComponentRelationshipQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first ResourceComponentRelationship ID from the query. Returns a *NotFoundError when no ResourceComponentRelationship ID was found.

func (*ResourceComponentRelationshipQuery) FirstIDX added in v0.4.0

FirstIDX is like FirstID, but panics if an error occurs.

func (*ResourceComponentRelationshipQuery) FirstX added in v0.4.0

FirstX is like First, but panics if an error occurs.

func (*ResourceComponentRelationshipQuery) ForShare added in v0.4.0

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 (*ResourceComponentRelationshipQuery) ForUpdate added in v0.4.0

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 (*ResourceComponentRelationshipQuery) GroupBy added in v0.4.0

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ResourceComponentRelationship.Query().
	GroupBy(resourcecomponentrelationship.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ResourceComponentRelationshipQuery) IDs added in v0.4.0

func (rcrq *ResourceComponentRelationshipQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of ResourceComponentRelationship IDs.

func (*ResourceComponentRelationshipQuery) IDsX added in v0.4.0

IDsX is like IDs, but panics if an error occurs.

func (*ResourceComponentRelationshipQuery) Limit added in v0.4.0

Limit the number of records to be returned by this query.

func (*ResourceComponentRelationshipQuery) Modify added in v0.4.0

Modify adds a query modifier for attaching custom logic to queries.

func (*ResourceComponentRelationshipQuery) Offset added in v0.4.0

Offset to start from.

func (*ResourceComponentRelationshipQuery) Only added in v0.4.0

Only returns a single ResourceComponentRelationship entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ResourceComponentRelationship entity is found. Returns a *NotFoundError when no ResourceComponentRelationship entities are found.

func (*ResourceComponentRelationshipQuery) OnlyID added in v0.4.0

func (rcrq *ResourceComponentRelationshipQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only ResourceComponentRelationship ID in the query. Returns a *NotSingularError when more than one ResourceComponentRelationship ID is found. Returns a *NotFoundError when no entities are found.

func (*ResourceComponentRelationshipQuery) OnlyIDX added in v0.4.0

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ResourceComponentRelationshipQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*ResourceComponentRelationshipQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*ResourceComponentRelationshipQuery) QueryContext added in v0.4.0

func (c *ResourceComponentRelationshipQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationshipQuery) QueryDependency added in v0.4.0

QueryDependency chains the current query on the "dependency" edge.

func (*ResourceComponentRelationshipQuery) QueryResourceComponent added in v0.4.0

func (rcrq *ResourceComponentRelationshipQuery) QueryResourceComponent() *ResourceComponentQuery

QueryResourceComponent chains the current query on the "resource_component" edge.

func (*ResourceComponentRelationshipQuery) Select added in v0.4.0

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.ResourceComponentRelationship.Query().
	Select(resourcecomponentrelationship.FieldCreateTime).
	Scan(ctx, &v)

func (*ResourceComponentRelationshipQuery) Unique added in v0.4.0

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 (*ResourceComponentRelationshipQuery) Where added in v0.4.0

Where adds a new predicate for the ResourceComponentRelationshipQuery builder.

func (*ResourceComponentRelationshipQuery) WhereP added in v0.4.0

func (rcrq *ResourceComponentRelationshipQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceComponentRelationshipQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ResourceComponentRelationshipQuery) WithDependency added in v0.4.0

WithDependency tells the query-builder to eager-load the nodes that are connected to the "dependency" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceComponentRelationshipQuery) WithResourceComponent added in v0.4.0

WithResourceComponent tells the query-builder to eager-load the nodes that are connected to the "resource_component" edge. The optional arguments are used to configure the query builder of the edge.

type ResourceComponentRelationshipQueryInput added in v0.4.0

type ResourceComponentRelationshipQueryInput struct {

	// Refer holds the route path reference of the ResourceComponentRelationship entity.
	Refer *object.Refer `path:"resourcecomponentrelationship,default=" query:"-" json:"-"`
	// ID of the ResourceComponentRelationship entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Type of the ResourceComponentRelationship entity, a part of the unique index.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// contains filtered or unexported fields
}

ResourceComponentRelationshipQueryInput holds the query input of the ResourceComponentRelationship entity, please tags with `path:",inline"` if embedding.

func (*ResourceComponentRelationshipQueryInput) Model added in v0.4.0

Model returns the ResourceComponentRelationship entity for querying, after validating.

func (*ResourceComponentRelationshipQueryInput) SetGinContext added in v0.4.0

func (ic *ResourceComponentRelationshipQueryInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentRelationshipQueryInput) SetModelClient added in v0.4.0

func (ic *ResourceComponentRelationshipQueryInput) SetModelClient(cli *Client)

func (*ResourceComponentRelationshipQueryInput) Validate added in v0.4.0

Validate checks the ResourceComponentRelationshipQueryInput entity.

func (*ResourceComponentRelationshipQueryInput) ValidateWith added in v0.4.0

func (rcrqi *ResourceComponentRelationshipQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipQueryInput entity with the given context and client set.

type ResourceComponentRelationshipQueryInputs added in v0.4.0

type ResourceComponentRelationshipQueryInputs struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipQueryInputs holds the query input of the ResourceComponentRelationship entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ResourceComponentRelationshipQueryInputs) SetGinContext added in v0.4.0

func (ic *ResourceComponentRelationshipQueryInputs) SetGinContext(ctx *gin.Context)

func (*ResourceComponentRelationshipQueryInputs) SetModelClient added in v0.4.0

func (ic *ResourceComponentRelationshipQueryInputs) SetModelClient(cli *Client)

func (*ResourceComponentRelationshipQueryInputs) Validate added in v0.4.0

Validate checks the ResourceComponentRelationshipQueryInputs entity.

func (*ResourceComponentRelationshipQueryInputs) ValidateWith added in v0.4.0

func (rcrqi *ResourceComponentRelationshipQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipQueryInputs entity with the given context and client set.

type ResourceComponentRelationshipSelect added in v0.4.0

type ResourceComponentRelationshipSelect struct {
	*ResourceComponentRelationshipQuery
	// contains filtered or unexported fields
}

ResourceComponentRelationshipSelect is the builder for selecting fields of ResourceComponentRelationship entities.

func (*ResourceComponentRelationshipSelect) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the selector query.

func (*ResourceComponentRelationshipSelect) Bool added in v0.4.0

func (s *ResourceComponentRelationshipSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipSelect) BoolX added in v0.4.0

func (s *ResourceComponentRelationshipSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceComponentRelationshipSelect) Bools added in v0.4.0

func (s *ResourceComponentRelationshipSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipSelect) BoolsX added in v0.4.0

func (s *ResourceComponentRelationshipSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ResourceComponentRelationshipSelect) ExecContext added in v0.4.0

func (c ResourceComponentRelationshipSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationshipSelect) Float64 added in v0.4.0

func (s *ResourceComponentRelationshipSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipSelect) Float64X added in v0.4.0

func (s *ResourceComponentRelationshipSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceComponentRelationshipSelect) Float64s added in v0.4.0

func (s *ResourceComponentRelationshipSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipSelect) Float64sX added in v0.4.0

func (s *ResourceComponentRelationshipSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceComponentRelationshipSelect) Int added in v0.4.0

func (s *ResourceComponentRelationshipSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipSelect) IntX added in v0.4.0

func (s *ResourceComponentRelationshipSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceComponentRelationshipSelect) Ints added in v0.4.0

func (s *ResourceComponentRelationshipSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipSelect) IntsX added in v0.4.0

func (s *ResourceComponentRelationshipSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceComponentRelationshipSelect) Modify added in v0.4.0

Modify adds a query modifier for attaching custom logic to queries.

func (ResourceComponentRelationshipSelect) QueryContext added in v0.4.0

func (c ResourceComponentRelationshipSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationshipSelect) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*ResourceComponentRelationshipSelect) ScanX added in v0.4.0

func (s *ResourceComponentRelationshipSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceComponentRelationshipSelect) String added in v0.4.0

func (s *ResourceComponentRelationshipSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipSelect) StringX added in v0.4.0

func (s *ResourceComponentRelationshipSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceComponentRelationshipSelect) Strings added in v0.4.0

func (s *ResourceComponentRelationshipSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceComponentRelationshipSelect) StringsX added in v0.4.0

func (s *ResourceComponentRelationshipSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceComponentRelationshipUpdate added in v0.4.0

type ResourceComponentRelationshipUpdate struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipUpdate is the builder for updating ResourceComponentRelationship entities.

func (*ResourceComponentRelationshipUpdate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentRelationshipUpdate) ExecContext added in v0.4.0

func (c *ResourceComponentRelationshipUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationshipUpdate) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentRelationshipUpdate) Modify added in v0.4.0

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceComponentRelationshipUpdate) Mutation added in v0.4.0

Mutation returns the ResourceComponentRelationshipMutation object of the builder.

func (*ResourceComponentRelationshipUpdate) QueryContext added in v0.4.0

func (c *ResourceComponentRelationshipUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationshipUpdate) Save added in v0.4.0

Save executes the query and returns the number of nodes affected by the update operation.

func (*ResourceComponentRelationshipUpdate) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceComponentRelationshipUpdate) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentRelationshipUpdate builder.

type ResourceComponentRelationshipUpdateInput added in v0.4.0

type ResourceComponentRelationshipUpdateInput struct {
	ResourceComponentRelationshipQueryInput `path:",inline" query:"-" json:"-"`

	// Dependency indicates replacing the stale ResourceComponent entity.
	Dependency *ResourceComponentQueryInput `uri:"-" query:"-" json:"dependency"`
}

ResourceComponentRelationshipUpdateInput holds the modification input of the ResourceComponentRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentRelationshipUpdateInput) Model added in v0.4.0

Model returns the ResourceComponentRelationship entity for modifying, after validating.

func (*ResourceComponentRelationshipUpdateInput) SetGinContext added in v0.4.0

func (ic *ResourceComponentRelationshipUpdateInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentRelationshipUpdateInput) SetModelClient added in v0.4.0

func (ic *ResourceComponentRelationshipUpdateInput) SetModelClient(cli *Client)

func (*ResourceComponentRelationshipUpdateInput) Validate added in v0.4.0

Validate checks the ResourceComponentRelationshipUpdateInput entity.

func (*ResourceComponentRelationshipUpdateInput) ValidateWith added in v0.4.0

func (rcrui *ResourceComponentRelationshipUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipUpdateInput entity with the given context and client set.

type ResourceComponentRelationshipUpdateInputs added in v0.4.0

type ResourceComponentRelationshipUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceComponentRelationshipUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceComponentRelationshipUpdateInputs holds the modification input of the ResourceComponentRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentRelationshipUpdateInputs) IDs added in v0.4.0

IDs returns the ID list of the ResourceComponentRelationship entities for modifying, after validating.

func (*ResourceComponentRelationshipUpdateInputs) Model added in v0.4.0

Model returns the ResourceComponentRelationship entities for modifying, after validating.

func (*ResourceComponentRelationshipUpdateInputs) SetGinContext added in v0.4.0

func (ic *ResourceComponentRelationshipUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceComponentRelationshipUpdateInputs) SetModelClient added in v0.4.0

func (ic *ResourceComponentRelationshipUpdateInputs) SetModelClient(cli *Client)

func (*ResourceComponentRelationshipUpdateInputs) Validate added in v0.4.0

Validate checks the ResourceComponentRelationshipUpdateInputs entity.

func (*ResourceComponentRelationshipUpdateInputs) ValidateWith added in v0.4.0

func (rcrui *ResourceComponentRelationshipUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipUpdateInputs entity with the given context and client set.

type ResourceComponentRelationshipUpdateInputsItem added in v0.4.0

type ResourceComponentRelationshipUpdateInputsItem struct {
	// ID of the ResourceComponentRelationship entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Type of the ResourceComponentRelationship entity, a part of the unique index.
	Type string `path:"-" query:"-" json:"type,omitempty"`

	// Dependency indicates replacing the stale ResourceComponent entity.
	Dependency *ResourceComponentQueryInput `uri:"-" query:"-" json:"dependency"`
}

ResourceComponentRelationshipUpdateInputs holds the modification input item of the ResourceComponentRelationship entities.

func (*ResourceComponentRelationshipUpdateInputsItem) ValidateWith added in v0.4.0

func (rcrui *ResourceComponentRelationshipUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentRelationshipUpdateInputsItem entity with the given context and client set.

type ResourceComponentRelationshipUpdateOne added in v0.4.0

type ResourceComponentRelationshipUpdateOne struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipUpdateOne is the builder for updating a single ResourceComponentRelationship entity.

func (*ResourceComponentRelationshipUpdateOne) Exec added in v0.4.0

Exec executes the query on the entity.

func (*ResourceComponentRelationshipUpdateOne) ExecContext added in v0.4.0

func (c *ResourceComponentRelationshipUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentRelationshipUpdateOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentRelationshipUpdateOne) Modify added in v0.4.0

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceComponentRelationshipUpdateOne) Mutation added in v0.4.0

Mutation returns the ResourceComponentRelationshipMutation object of the builder.

func (*ResourceComponentRelationshipUpdateOne) QueryContext added in v0.4.0

func (c *ResourceComponentRelationshipUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentRelationshipUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated ResourceComponentRelationship entity.

func (*ResourceComponentRelationshipUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceComponentRelationshipUpdateOne) Select added in v0.4.0

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ResourceComponentRelationshipUpdateOne) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentRelationshipUpdate builder.

type ResourceComponentRelationshipUpsert added in v0.4.0

type ResourceComponentRelationshipUpsert struct {
	*sql.UpdateSet
}

ResourceComponentRelationshipUpsert is the "OnConflict" setter.

type ResourceComponentRelationshipUpsertBulk added in v0.4.0

type ResourceComponentRelationshipUpsertBulk struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipUpsertBulk is the builder for "upsert"-ing a bulk of ResourceComponentRelationship nodes.

func (*ResourceComponentRelationshipUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceComponentRelationshipUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentRelationshipUpsertBulk) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceComponentRelationshipUpsertBulk) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceComponentRelationshipUpsertBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentRelationshipUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceComponentRelationship.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ResourceComponentRelationshipUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceComponentRelationshipCreateBulk.OnConflict documentation for more info.

func (*ResourceComponentRelationshipUpsertBulk) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ResourceComponentRelationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcecomponentrelationship.FieldID)
		}),
	).
	Exec(ctx)

type ResourceComponentRelationshipUpsertOne added in v0.4.0

type ResourceComponentRelationshipUpsertOne struct {
	// contains filtered or unexported fields
}

ResourceComponentRelationshipUpsertOne is the builder for "upsert"-ing

one ResourceComponentRelationship node.

func (*ResourceComponentRelationshipUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceComponentRelationshipUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentRelationshipUpsertOne) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceComponentRelationshipUpsertOne) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceComponentRelationshipUpsertOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentRelationshipUpsertOne) ID added in v0.4.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ResourceComponentRelationshipUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*ResourceComponentRelationshipUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceComponentRelationship.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ResourceComponentRelationshipUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceComponentRelationshipCreate.OnConflict documentation for more info.

func (*ResourceComponentRelationshipUpsertOne) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ResourceComponentRelationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcecomponentrelationship.FieldID)
		}),
	).
	Exec(ctx)

type ResourceComponentRelationships added in v0.4.0

type ResourceComponentRelationships []*ResourceComponentRelationship

ResourceComponentRelationships is a parsable slice of ResourceComponentRelationship.

func (ResourceComponentRelationships) View added in v0.4.0

View returns the output of ResourceComponentRelationship entities.

type ResourceComponentSelect added in v0.4.0

type ResourceComponentSelect struct {
	*ResourceComponentQuery
	// contains filtered or unexported fields
}

ResourceComponentSelect is the builder for selecting fields of ResourceComponent entities.

func (*ResourceComponentSelect) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the selector query.

func (*ResourceComponentSelect) Bool added in v0.4.0

func (s *ResourceComponentSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceComponentSelect) BoolX added in v0.4.0

func (s *ResourceComponentSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceComponentSelect) Bools added in v0.4.0

func (s *ResourceComponentSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceComponentSelect) BoolsX added in v0.4.0

func (s *ResourceComponentSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ResourceComponentSelect) ExecContext added in v0.4.0

func (c ResourceComponentSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentSelect) Float64 added in v0.4.0

func (s *ResourceComponentSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceComponentSelect) Float64X added in v0.4.0

func (s *ResourceComponentSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceComponentSelect) Float64s added in v0.4.0

func (s *ResourceComponentSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceComponentSelect) Float64sX added in v0.4.0

func (s *ResourceComponentSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceComponentSelect) Int added in v0.4.0

func (s *ResourceComponentSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceComponentSelect) IntX added in v0.4.0

func (s *ResourceComponentSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceComponentSelect) Ints added in v0.4.0

func (s *ResourceComponentSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceComponentSelect) IntsX added in v0.4.0

func (s *ResourceComponentSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceComponentSelect) Modify added in v0.4.0

func (rcs *ResourceComponentSelect) Modify(modifiers ...func(s *sql.Selector)) *ResourceComponentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (ResourceComponentSelect) QueryContext added in v0.4.0

func (c ResourceComponentSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentSelect) Scan added in v0.4.0

func (rcs *ResourceComponentSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceComponentSelect) ScanX added in v0.4.0

func (s *ResourceComponentSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceComponentSelect) String added in v0.4.0

func (s *ResourceComponentSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceComponentSelect) StringX added in v0.4.0

func (s *ResourceComponentSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceComponentSelect) Strings added in v0.4.0

func (s *ResourceComponentSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceComponentSelect) StringsX added in v0.4.0

func (s *ResourceComponentSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceComponentUpdate added in v0.4.0

type ResourceComponentUpdate struct {
	// contains filtered or unexported fields
}

ResourceComponentUpdate is the builder for updating ResourceComponent entities.

func (*ResourceComponentUpdate) AddComponentIDs added in v0.4.0

func (rcu *ResourceComponentUpdate) AddComponentIDs(ids ...object.ID) *ResourceComponentUpdate

AddComponentIDs adds the "components" edge to the ResourceComponent entity by IDs.

func (*ResourceComponentUpdate) AddComponents added in v0.4.0

AddComponents adds the "components" edges to the ResourceComponent entity.

func (*ResourceComponentUpdate) AddDependencies added in v0.4.0

AddDependencies adds the "dependencies" edges to the ResourceComponentRelationship entity.

func (*ResourceComponentUpdate) AddDependencyIDs added in v0.4.0

func (rcu *ResourceComponentUpdate) AddDependencyIDs(ids ...object.ID) *ResourceComponentUpdate

AddDependencyIDs adds the "dependencies" edge to the ResourceComponentRelationship entity by IDs.

func (*ResourceComponentUpdate) AddInstanceIDs added in v0.4.0

func (rcu *ResourceComponentUpdate) AddInstanceIDs(ids ...object.ID) *ResourceComponentUpdate

AddInstanceIDs adds the "instances" edge to the ResourceComponent entity by IDs.

func (*ResourceComponentUpdate) AddInstances added in v0.4.0

AddInstances adds the "instances" edges to the ResourceComponent entity.

func (*ResourceComponentUpdate) ClearComponents added in v0.4.0

func (rcu *ResourceComponentUpdate) ClearComponents() *ResourceComponentUpdate

ClearComponents clears all "components" edges to the ResourceComponent entity.

func (*ResourceComponentUpdate) ClearDependencies added in v0.4.0

func (rcu *ResourceComponentUpdate) ClearDependencies() *ResourceComponentUpdate

ClearDependencies clears all "dependencies" edges to the ResourceComponentRelationship entity.

func (*ResourceComponentUpdate) ClearInstances added in v0.4.0

func (rcu *ResourceComponentUpdate) ClearInstances() *ResourceComponentUpdate

ClearInstances clears all "instances" edges to the ResourceComponent entity.

func (*ResourceComponentUpdate) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*ResourceComponentUpdate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentUpdate) ExecContext added in v0.4.0

func (c *ResourceComponentUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentUpdate) ExecX added in v0.4.0

func (rcu *ResourceComponentUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentUpdate) Modify added in v0.4.0

func (rcu *ResourceComponentUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceComponentUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceComponentUpdate) Mutation added in v0.4.0

Mutation returns the ResourceComponentMutation object of the builder.

func (*ResourceComponentUpdate) QueryContext added in v0.4.0

func (c *ResourceComponentUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentUpdate) RemoveComponentIDs added in v0.4.0

func (rcu *ResourceComponentUpdate) RemoveComponentIDs(ids ...object.ID) *ResourceComponentUpdate

RemoveComponentIDs removes the "components" edge to ResourceComponent entities by IDs.

func (*ResourceComponentUpdate) RemoveComponents added in v0.4.0

RemoveComponents removes "components" edges to ResourceComponent entities.

func (*ResourceComponentUpdate) RemoveDependencies added in v0.4.0

RemoveDependencies removes "dependencies" edges to ResourceComponentRelationship entities.

func (*ResourceComponentUpdate) RemoveDependencyIDs added in v0.4.0

func (rcu *ResourceComponentUpdate) RemoveDependencyIDs(ids ...object.ID) *ResourceComponentUpdate

RemoveDependencyIDs removes the "dependencies" edge to ResourceComponentRelationship entities by IDs.

func (*ResourceComponentUpdate) RemoveInstanceIDs added in v0.4.0

func (rcu *ResourceComponentUpdate) RemoveInstanceIDs(ids ...object.ID) *ResourceComponentUpdate

RemoveInstanceIDs removes the "instances" edge to ResourceComponent entities by IDs.

func (*ResourceComponentUpdate) RemoveInstances added in v0.4.0

RemoveInstances removes "instances" edges to ResourceComponent entities.

func (*ResourceComponentUpdate) Save added in v0.4.0

func (rcu *ResourceComponentUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ResourceComponentUpdate) SaveX added in v0.4.0

func (rcu *ResourceComponentUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ResourceComponentUpdate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceComponentUpdate) SetNillableStatus added in v0.4.0

func (rcu *ResourceComponentUpdate) SetNillableStatus(s *status.Status) *ResourceComponentUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ResourceComponentUpdate) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*ResourceComponentUpdate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceComponentUpdate) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentUpdate builder.

type ResourceComponentUpdateInput added in v0.4.0

type ResourceComponentUpdateInput struct {
	ResourceComponentQueryInput `path:",inline" query:"-" json:"-"`

	// Components indicates replacing the stale ResourceComponent entities.
	Components []*ResourceComponentCreateInput `uri:"-" query:"-" json:"components,omitempty"`
	// Instances indicates replacing the stale ResourceComponent entities.
	Instances []*ResourceComponentCreateInput `uri:"-" query:"-" json:"instances,omitempty"`
	// Dependencies indicates replacing the stale ResourceComponentRelationship entities.
	Dependencies []*ResourceComponentRelationshipCreateInput `uri:"-" query:"-" json:"dependencies,omitempty"`
}

ResourceComponentUpdateInput holds the modification input of the ResourceComponent entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentUpdateInput) Model added in v0.4.0

Model returns the ResourceComponent entity for modifying, after validating.

func (*ResourceComponentUpdateInput) SetGinContext added in v0.4.0

func (ic *ResourceComponentUpdateInput) SetGinContext(ctx *gin.Context)

func (*ResourceComponentUpdateInput) SetModelClient added in v0.4.0

func (ic *ResourceComponentUpdateInput) SetModelClient(cli *Client)

func (*ResourceComponentUpdateInput) Validate added in v0.4.0

func (rcui *ResourceComponentUpdateInput) Validate() error

Validate checks the ResourceComponentUpdateInput entity.

func (*ResourceComponentUpdateInput) ValidateWith added in v0.4.0

func (rcui *ResourceComponentUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentUpdateInput entity with the given context and client set.

type ResourceComponentUpdateInputs added in v0.4.0

type ResourceComponentUpdateInputs struct {

	// Project indicates to update ResourceComponent entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to update ResourceComponent entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to update ResourceComponent entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceComponentUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceComponentUpdateInputs holds the modification input of the ResourceComponent entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceComponentUpdateInputs) IDs added in v0.4.0

func (rcui *ResourceComponentUpdateInputs) IDs() []object.ID

IDs returns the ID list of the ResourceComponent entities for modifying, after validating.

func (*ResourceComponentUpdateInputs) Model added in v0.4.0

Model returns the ResourceComponent entities for modifying, after validating.

func (*ResourceComponentUpdateInputs) SetGinContext added in v0.4.0

func (ic *ResourceComponentUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceComponentUpdateInputs) SetModelClient added in v0.4.0

func (ic *ResourceComponentUpdateInputs) SetModelClient(cli *Client)

func (*ResourceComponentUpdateInputs) Validate added in v0.4.0

func (rcui *ResourceComponentUpdateInputs) Validate() error

Validate checks the ResourceComponentUpdateInputs entity.

func (*ResourceComponentUpdateInputs) ValidateWith added in v0.4.0

func (rcui *ResourceComponentUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentUpdateInputs entity with the given context and client set.

type ResourceComponentUpdateInputsItem added in v0.4.0

type ResourceComponentUpdateInputsItem struct {
	// ID of the ResourceComponent entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Components indicates replacing the stale ResourceComponent entities.
	Components []*ResourceComponentCreateInput `uri:"-" query:"-" json:"components,omitempty"`
	// Instances indicates replacing the stale ResourceComponent entities.
	Instances []*ResourceComponentCreateInput `uri:"-" query:"-" json:"instances,omitempty"`
	// Dependencies indicates replacing the stale ResourceComponentRelationship entities.
	Dependencies []*ResourceComponentRelationshipCreateInput `uri:"-" query:"-" json:"dependencies,omitempty"`
}

ResourceComponentUpdateInputs holds the modification input item of the ResourceComponent entities.

func (*ResourceComponentUpdateInputsItem) ValidateWith added in v0.4.0

func (rcui *ResourceComponentUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceComponentUpdateInputsItem entity with the given context and client set.

type ResourceComponentUpdateOne added in v0.4.0

type ResourceComponentUpdateOne struct {
	// contains filtered or unexported fields
}

ResourceComponentUpdateOne is the builder for updating a single ResourceComponent entity.

func (*ResourceComponentUpdateOne) AddComponentIDs added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) AddComponentIDs(ids ...object.ID) *ResourceComponentUpdateOne

AddComponentIDs adds the "components" edge to the ResourceComponent entity by IDs.

func (*ResourceComponentUpdateOne) AddComponents added in v0.4.0

AddComponents adds the "components" edges to the ResourceComponent entity.

func (*ResourceComponentUpdateOne) AddDependencies added in v0.4.0

AddDependencies adds the "dependencies" edges to the ResourceComponentRelationship entity.

func (*ResourceComponentUpdateOne) AddDependencyIDs added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) AddDependencyIDs(ids ...object.ID) *ResourceComponentUpdateOne

AddDependencyIDs adds the "dependencies" edge to the ResourceComponentRelationship entity by IDs.

func (*ResourceComponentUpdateOne) AddInstanceIDs added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) AddInstanceIDs(ids ...object.ID) *ResourceComponentUpdateOne

AddInstanceIDs adds the "instances" edge to the ResourceComponent entity by IDs.

func (*ResourceComponentUpdateOne) AddInstances added in v0.4.0

AddInstances adds the "instances" edges to the ResourceComponent entity.

func (*ResourceComponentUpdateOne) ClearComponents added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) ClearComponents() *ResourceComponentUpdateOne

ClearComponents clears all "components" edges to the ResourceComponent entity.

func (*ResourceComponentUpdateOne) ClearDependencies added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) ClearDependencies() *ResourceComponentUpdateOne

ClearDependencies clears all "dependencies" edges to the ResourceComponentRelationship entity.

func (*ResourceComponentUpdateOne) ClearInstances added in v0.4.0

ClearInstances clears all "instances" edges to the ResourceComponent entity.

func (*ResourceComponentUpdateOne) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*ResourceComponentUpdateOne) Exec added in v0.4.0

Exec executes the query on the entity.

func (*ResourceComponentUpdateOne) ExecContext added in v0.4.0

func (c *ResourceComponentUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceComponentUpdateOne) ExecE added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceComponent) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*ResourceComponentUpdateOne) ExecEX added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceComponent) error)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentUpdateOne) ExecX added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentUpdateOne) Modify added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceComponentUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceComponentUpdateOne) Mutation added in v0.4.0

Mutation returns the ResourceComponentMutation object of the builder.

func (*ResourceComponentUpdateOne) QueryContext added in v0.4.0

func (c *ResourceComponentUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceComponentUpdateOne) RemoveComponentIDs added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) RemoveComponentIDs(ids ...object.ID) *ResourceComponentUpdateOne

RemoveComponentIDs removes the "components" edge to ResourceComponent entities by IDs.

func (*ResourceComponentUpdateOne) RemoveComponents added in v0.4.0

RemoveComponents removes "components" edges to ResourceComponent entities.

func (*ResourceComponentUpdateOne) RemoveDependencies added in v0.4.0

RemoveDependencies removes "dependencies" edges to ResourceComponentRelationship entities.

func (*ResourceComponentUpdateOne) RemoveDependencyIDs added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) RemoveDependencyIDs(ids ...object.ID) *ResourceComponentUpdateOne

RemoveDependencyIDs removes the "dependencies" edge to ResourceComponentRelationship entities by IDs.

func (*ResourceComponentUpdateOne) RemoveInstanceIDs added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) RemoveInstanceIDs(ids ...object.ID) *ResourceComponentUpdateOne

RemoveInstanceIDs removes the "instances" edge to ResourceComponent entities by IDs.

func (*ResourceComponentUpdateOne) RemoveInstances added in v0.4.0

RemoveInstances removes "instances" edges to ResourceComponent entities.

func (*ResourceComponentUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated ResourceComponent entity.

func (*ResourceComponentUpdateOne) SaveE added in v0.4.0

SaveE calls the given function after updated the ResourceComponent entity, which is always good for cascading update operations.

func (*ResourceComponentUpdateOne) SaveEX added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceComponent) error) *ResourceComponent

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceComponentUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceComponentUpdateOne) Select added in v0.4.0

func (rcuo *ResourceComponentUpdateOne) Select(field string, fields ...string) *ResourceComponentUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ResourceComponentUpdateOne) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*ResourceComponentUpdateOne) SetNillableStatus added in v0.4.0

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ResourceComponentUpdateOne) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*ResourceComponentUpdateOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceComponentUpdateOne) Where added in v0.4.0

Where appends a list predicates to the ResourceComponentUpdate builder.

type ResourceComponentUpsert added in v0.4.0

type ResourceComponentUpsert struct {
	*sql.UpdateSet
}

ResourceComponentUpsert is the "OnConflict" setter.

func (*ResourceComponentUpsert) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*ResourceComponentUpsert) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*ResourceComponentUpsert) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceComponentUpsert) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ResourceComponentUpsert) UpdateUpdateTime added in v0.4.0

func (u *ResourceComponentUpsert) UpdateUpdateTime() *ResourceComponentUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ResourceComponentUpsertBulk added in v0.4.0

type ResourceComponentUpsertBulk struct {
	// contains filtered or unexported fields
}

ResourceComponentUpsertBulk is the builder for "upsert"-ing a bulk of ResourceComponent nodes.

func (*ResourceComponentUpsertBulk) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*ResourceComponentUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceComponentUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentUpsertBulk) ExecE added in v0.4.0

func (u *ResourceComponentUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceComponent) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceComponentUpsertBulk) ExecEX added in v0.4.0

func (u *ResourceComponentUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceComponent) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceComponentUpsertBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceComponent.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ResourceComponentUpsertBulk) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*ResourceComponentUpsertBulk) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceComponentUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceComponentCreateBulk.OnConflict documentation for more info.

func (*ResourceComponentUpsertBulk) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ResourceComponent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcecomponent.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceComponentUpsertBulk) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ResourceComponentUpsertBulk) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ResourceComponentUpsertOne added in v0.4.0

type ResourceComponentUpsertOne struct {
	// contains filtered or unexported fields
}

ResourceComponentUpsertOne is the builder for "upsert"-ing

one ResourceComponent node.

func (*ResourceComponentUpsertOne) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*ResourceComponentUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceComponentUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*ResourceComponentUpsertOne) ExecE added in v0.4.0

func (u *ResourceComponentUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceComponent) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceComponentUpsertOne) ExecEX added in v0.4.0

func (u *ResourceComponentUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceComponent) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceComponentUpsertOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceComponentUpsertOne) ID added in v0.4.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ResourceComponentUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*ResourceComponentUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceComponent.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ResourceComponentUpsertOne) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*ResourceComponentUpsertOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceComponentUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceComponentCreate.OnConflict documentation for more info.

func (*ResourceComponentUpsertOne) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ResourceComponent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcecomponent.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceComponentUpsertOne) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ResourceComponentUpsertOne) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ResourceComponents added in v0.4.0

type ResourceComponents []*ResourceComponent

ResourceComponents is a parsable slice of ResourceComponent.

func (ResourceComponents) View added in v0.4.0

View returns the output of ResourceComponent entities.

type ResourceCreate added in v0.4.0

type ResourceCreate struct {
	// contains filtered or unexported fields
}

ResourceCreate is the builder for creating a Resource entity.

func (*ResourceCreate) AddComponentIDs added in v0.4.0

func (rc *ResourceCreate) AddComponentIDs(ids ...object.ID) *ResourceCreate

AddComponentIDs adds the "components" edge to the ResourceComponent entity by IDs.

func (*ResourceCreate) AddComponents added in v0.4.0

func (rc *ResourceCreate) AddComponents(r ...*ResourceComponent) *ResourceCreate

AddComponents adds the "components" edges to the ResourceComponent entity.

func (*ResourceCreate) AddDependencies added in v0.4.0

func (rc *ResourceCreate) AddDependencies(r ...*ResourceRelationship) *ResourceCreate

AddDependencies adds the "dependencies" edges to the ResourceRelationship entity.

func (*ResourceCreate) AddDependencyIDs added in v0.4.0

func (rc *ResourceCreate) AddDependencyIDs(ids ...object.ID) *ResourceCreate

AddDependencyIDs adds the "dependencies" edge to the ResourceRelationship entity by IDs.

func (*ResourceCreate) AddRunIDs added in v0.6.0

func (rc *ResourceCreate) AddRunIDs(ids ...object.ID) *ResourceCreate

AddRunIDs adds the "runs" edge to the ResourceRun entity by IDs.

func (*ResourceCreate) AddRuns added in v0.6.0

func (rc *ResourceCreate) AddRuns(r ...*ResourceRun) *ResourceCreate

AddRuns adds the "runs" edges to the ResourceRun entity.

func (*ResourceCreate) Exec added in v0.4.0

func (rc *ResourceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceCreate) ExecContext added in v0.4.0

func (c *ResourceCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceCreate) ExecE added in v0.4.0

func (rc *ResourceCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Resource) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceCreate) ExecEX added in v0.4.0

func (rc *ResourceCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Resource) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceCreate) ExecX added in v0.4.0

func (rc *ResourceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceCreate) Mutation added in v0.4.0

func (rc *ResourceCreate) Mutation() *ResourceMutation

Mutation returns the ResourceMutation object of the builder.

func (*ResourceCreate) OnConflict added in v0.4.0

func (rc *ResourceCreate) OnConflict(opts ...sql.ConflictOption) *ResourceUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Resource.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*ResourceCreate) OnConflictColumns added in v0.4.0

func (rc *ResourceCreate) OnConflictColumns(columns ...string) *ResourceUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Resource.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceCreate) QueryContext added in v0.4.0

func (c *ResourceCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceCreate) Save added in v0.4.0

func (rc *ResourceCreate) Save(ctx context.Context) (*Resource, error)

Save creates the Resource in the database.

func (*ResourceCreate) SaveE added in v0.4.0

func (rc *ResourceCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Resource) error) (*Resource, error)

SaveE calls the given function after created the Resource entity, which is always good for cascading create operations.

func (*ResourceCreate) SaveEX added in v0.4.0

func (rc *ResourceCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Resource) error) *Resource

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceCreate) SaveX added in v0.4.0

func (rc *ResourceCreate) SaveX(ctx context.Context) *Resource

SaveX calls Save and panics if Save returns an error.

func (*ResourceCreate) Set added in v0.4.0

func (rc *ResourceCreate) Set(obj *Resource) *ResourceCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceCreate) SetAnnotations added in v0.4.0

func (rc *ResourceCreate) SetAnnotations(m map[string]string) *ResourceCreate

SetAnnotations sets the "annotations" field.

func (*ResourceCreate) SetAttributes added in v0.4.0

func (rc *ResourceCreate) SetAttributes(pr property.Values) *ResourceCreate

SetAttributes sets the "attributes" field.

func (*ResourceCreate) SetComputedAttributes added in v0.5.0

func (rc *ResourceCreate) SetComputedAttributes(pr property.Values) *ResourceCreate

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceCreate) SetCreateTime added in v0.4.0

func (rc *ResourceCreate) SetCreateTime(t time.Time) *ResourceCreate

SetCreateTime sets the "create_time" field.

func (*ResourceCreate) SetDescription added in v0.4.0

func (rc *ResourceCreate) SetDescription(s string) *ResourceCreate

SetDescription sets the "description" field.

func (*ResourceCreate) SetEndpoints added in v0.5.0

func (rc *ResourceCreate) SetEndpoints(te types.ResourceEndpoints) *ResourceCreate

SetEndpoints sets the "endpoints" field.

func (*ResourceCreate) SetEnvironment added in v0.4.0

func (rc *ResourceCreate) SetEnvironment(e *Environment) *ResourceCreate

SetEnvironment sets the "environment" edge to the Environment entity.

func (*ResourceCreate) SetEnvironmentID added in v0.4.0

func (rc *ResourceCreate) SetEnvironmentID(o object.ID) *ResourceCreate

SetEnvironmentID sets the "environment_id" field.

func (*ResourceCreate) SetID added in v0.4.0

func (rc *ResourceCreate) SetID(o object.ID) *ResourceCreate

SetID sets the "id" field.

func (*ResourceCreate) SetLabels added in v0.4.0

func (rc *ResourceCreate) SetLabels(m map[string]string) *ResourceCreate

SetLabels sets the "labels" field.

func (*ResourceCreate) SetName added in v0.4.0

func (rc *ResourceCreate) SetName(s string) *ResourceCreate

SetName sets the "name" field.

func (*ResourceCreate) SetNillableCreateTime added in v0.4.0

func (rc *ResourceCreate) SetNillableCreateTime(t *time.Time) *ResourceCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ResourceCreate) SetNillableDescription added in v0.4.0

func (rc *ResourceCreate) SetNillableDescription(s *string) *ResourceCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ResourceCreate) SetNillableResourceDefinitionID added in v0.4.0

func (rc *ResourceCreate) SetNillableResourceDefinitionID(o *object.ID) *ResourceCreate

SetNillableResourceDefinitionID sets the "resource_definition_id" field if the given value is not nil.

func (*ResourceCreate) SetNillableResourceDefinitionMatchingRuleID added in v0.5.0

func (rc *ResourceCreate) SetNillableResourceDefinitionMatchingRuleID(o *object.ID) *ResourceCreate

SetNillableResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field if the given value is not nil.

func (*ResourceCreate) SetNillableStateID added in v0.6.0

func (rc *ResourceCreate) SetNillableStateID(id *object.ID) *ResourceCreate

SetNillableStateID sets the "state" edge to the ResourceState entity by ID if the given value is not nil.

func (*ResourceCreate) SetNillableStatus added in v0.4.0

func (rc *ResourceCreate) SetNillableStatus(s *status.Status) *ResourceCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ResourceCreate) SetNillableTemplateID added in v0.4.0

func (rc *ResourceCreate) SetNillableTemplateID(o *object.ID) *ResourceCreate

SetNillableTemplateID sets the "template_id" field if the given value is not nil.

func (*ResourceCreate) SetNillableType added in v0.4.0

func (rc *ResourceCreate) SetNillableType(s *string) *ResourceCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*ResourceCreate) SetNillableUpdateTime added in v0.4.0

func (rc *ResourceCreate) SetNillableUpdateTime(t *time.Time) *ResourceCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*ResourceCreate) SetProject added in v0.4.0

func (rc *ResourceCreate) SetProject(p *Project) *ResourceCreate

SetProject sets the "project" edge to the Project entity.

func (*ResourceCreate) SetProjectID added in v0.4.0

func (rc *ResourceCreate) SetProjectID(o object.ID) *ResourceCreate

SetProjectID sets the "project_id" field.

func (*ResourceCreate) SetResourceDefinition added in v0.4.0

func (rc *ResourceCreate) SetResourceDefinition(r *ResourceDefinition) *ResourceCreate

SetResourceDefinition sets the "resource_definition" edge to the ResourceDefinition entity.

func (*ResourceCreate) SetResourceDefinitionID added in v0.4.0

func (rc *ResourceCreate) SetResourceDefinitionID(o object.ID) *ResourceCreate

SetResourceDefinitionID sets the "resource_definition_id" field.

func (*ResourceCreate) SetResourceDefinitionMatchingRule added in v0.5.0

func (rc *ResourceCreate) SetResourceDefinitionMatchingRule(r *ResourceDefinitionMatchingRule) *ResourceCreate

SetResourceDefinitionMatchingRule sets the "resource_definition_matching_rule" edge to the ResourceDefinitionMatchingRule entity.

func (*ResourceCreate) SetResourceDefinitionMatchingRuleID added in v0.5.0

func (rc *ResourceCreate) SetResourceDefinitionMatchingRuleID(o object.ID) *ResourceCreate

SetResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field.

func (*ResourceCreate) SetState added in v0.6.0

func (rc *ResourceCreate) SetState(r *ResourceState) *ResourceCreate

SetState sets the "state" edge to the ResourceState entity.

func (*ResourceCreate) SetStateID added in v0.6.0

func (rc *ResourceCreate) SetStateID(id object.ID) *ResourceCreate

SetStateID sets the "state" edge to the ResourceState entity by ID.

func (*ResourceCreate) SetStatus added in v0.4.0

func (rc *ResourceCreate) SetStatus(s status.Status) *ResourceCreate

SetStatus sets the "status" field.

func (*ResourceCreate) SetTemplate added in v0.4.0

func (rc *ResourceCreate) SetTemplate(t *TemplateVersion) *ResourceCreate

SetTemplate sets the "template" edge to the TemplateVersion entity.

func (*ResourceCreate) SetTemplateID added in v0.4.0

func (rc *ResourceCreate) SetTemplateID(o object.ID) *ResourceCreate

SetTemplateID sets the "template_id" field.

func (*ResourceCreate) SetType added in v0.4.0

func (rc *ResourceCreate) SetType(s string) *ResourceCreate

SetType sets the "type" field.

func (*ResourceCreate) SetUpdateTime added in v0.4.0

func (rc *ResourceCreate) SetUpdateTime(t time.Time) *ResourceCreate

SetUpdateTime sets the "update_time" field.

type ResourceCreateBulk added in v0.4.0

type ResourceCreateBulk struct {
	// contains filtered or unexported fields
}

ResourceCreateBulk is the builder for creating many Resource entities in bulk.

func (*ResourceCreateBulk) Exec added in v0.4.0

func (rcb *ResourceCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceCreateBulk) ExecContext added in v0.4.0

func (c *ResourceCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceCreateBulk) ExecE added in v0.4.0

func (rcb *ResourceCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Resource) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceCreateBulk) ExecEX added in v0.4.0

func (rcb *ResourceCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Resource) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceCreateBulk) ExecX added in v0.4.0

func (rcb *ResourceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceCreateBulk) OnConflict added in v0.4.0

func (rcb *ResourceCreateBulk) OnConflict(opts ...sql.ConflictOption) *ResourceUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Resource.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*ResourceCreateBulk) OnConflictColumns added in v0.4.0

func (rcb *ResourceCreateBulk) OnConflictColumns(columns ...string) *ResourceUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Resource.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceCreateBulk) QueryContext added in v0.4.0

func (c *ResourceCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceCreateBulk) Save added in v0.4.0

func (rcb *ResourceCreateBulk) Save(ctx context.Context) ([]*Resource, error)

Save creates the Resource entities in the database.

func (*ResourceCreateBulk) SaveE added in v0.4.0

func (rcb *ResourceCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Resource) error) ([]*Resource, error)

SaveE calls the given function after created the Resource entities, which is always good for cascading create operations.

func (*ResourceCreateBulk) SaveEX added in v0.4.0

func (rcb *ResourceCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Resource) error) []*Resource

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceCreateBulk) SaveX added in v0.4.0

func (rcb *ResourceCreateBulk) SaveX(ctx context.Context) []*Resource

SaveX is like Save, but panics if an error occurs.

func (*ResourceCreateBulk) Set added in v0.4.0

func (rcb *ResourceCreateBulk) Set(objs ...*Resource) *ResourceCreateBulk

Set leverages the ResourceCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ResourceCreateInput added in v0.4.0

type ResourceCreateInput struct {

	// Project indicates to create Resource entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to create Resource entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Type of the resource referring to a resource definition type.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes"`
	// Endpoints of the resource.
	Endpoints types.ResourceEndpoints `path:"-" query:"-" json:"endpoints,cli-table-column,omitempty"`

	// Template specifies full inserting the new TemplateVersion entity of the Resource entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template,omitempty"`
	// ResourceDefinition specifies full inserting the new ResourceDefinition entity of the Resource entity.
	ResourceDefinition *ResourceDefinitionQueryInput `uri:"-" query:"-" json:"-"`
	// ResourceDefinitionMatchingRule specifies full inserting the new ResourceDefinitionMatchingRule entity of the Resource entity.
	ResourceDefinitionMatchingRule *ResourceDefinitionMatchingRuleQueryInput `uri:"-" query:"-" json:"resourceDefinitionMatchingRule,omitempty"`
	// contains filtered or unexported fields
}

ResourceCreateInput holds the creation input of the Resource entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceCreateInput) Model added in v0.4.0

func (rci *ResourceCreateInput) Model() *Resource

Model returns the Resource entity for creating, after validating.

func (*ResourceCreateInput) SetGinContext added in v0.4.0

func (ic *ResourceCreateInput) SetGinContext(ctx *gin.Context)

func (*ResourceCreateInput) SetModelClient added in v0.4.0

func (ic *ResourceCreateInput) SetModelClient(cli *Client)

func (*ResourceCreateInput) Validate added in v0.4.0

func (rci *ResourceCreateInput) Validate() error

Validate checks the ResourceCreateInput entity.

func (*ResourceCreateInput) ValidateWith added in v0.4.0

func (rci *ResourceCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceCreateInput entity with the given context and client set.

type ResourceCreateInputs added in v0.4.0

type ResourceCreateInputs struct {

	// Project indicates to create Resource entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to create Resource entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceCreateInputs holds the creation input of the Resource entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceCreateInputs) Model added in v0.4.0

func (rci *ResourceCreateInputs) Model() []*Resource

Model returns the Resource entities for creating, after validating.

func (*ResourceCreateInputs) SetGinContext added in v0.4.0

func (ic *ResourceCreateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceCreateInputs) SetModelClient added in v0.4.0

func (ic *ResourceCreateInputs) SetModelClient(cli *Client)

func (*ResourceCreateInputs) Validate added in v0.4.0

func (rci *ResourceCreateInputs) Validate() error

Validate checks the ResourceCreateInputs entity .

func (*ResourceCreateInputs) ValidateWith added in v0.4.0

func (rci *ResourceCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceCreateInputs entity with the given context and client set.

type ResourceCreateInputsItem added in v0.4.0

type ResourceCreateInputsItem struct {
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Type of the resource referring to a resource definition type.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes"`
	// Endpoints of the resource.
	Endpoints types.ResourceEndpoints `path:"-" query:"-" json:"endpoints,cli-table-column,omitempty"`

	// Template specifies full inserting the new TemplateVersion entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template,omitempty"`
	// ResourceDefinition specifies full inserting the new ResourceDefinition entity.
	ResourceDefinition *ResourceDefinitionQueryInput `uri:"-" query:"-" json:"-"`
	// ResourceDefinitionMatchingRule specifies full inserting the new ResourceDefinitionMatchingRule entity.
	ResourceDefinitionMatchingRule *ResourceDefinitionMatchingRuleQueryInput `uri:"-" query:"-" json:"resourceDefinitionMatchingRule,omitempty"`
}

ResourceCreateInputs holds the creation input item of the Resource entities.

func (*ResourceCreateInputsItem) ValidateWith added in v0.4.0

func (rci *ResourceCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceCreateInputsItem entity with the given context and client set.

type ResourceDefinition added in v0.4.0

type ResourceDefinition struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Type of the resources generated from the resource definition.
	Type string `json:"type,omitempty,cli-table-column"`
	// Generated schema of the resource definition.
	Schema types.Schema `json:"schema,omitempty"`
	// UI schema of the resource definition.
	UISchema *types.UISchema `json:"ui_schema,omitempty"`
	// Indicate whether the resource definition is builtin, decided when creating.
	Builtin bool `json:"builtin,omitempty,cli-table-column"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ResourceDefinitionQuery when eager-loading is set.
	Edges ResourceDefinitionEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

ResourceDefinition is the model entity for the ResourceDefinition schema.

func (*ResourceDefinition) ExecContext added in v0.4.0

func (c *ResourceDefinition) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinition) QueryContext added in v0.4.0

func (c *ResourceDefinition) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinition) QueryMatchingRules added in v0.4.0

func (rd *ResourceDefinition) QueryMatchingRules() *ResourceDefinitionMatchingRuleQuery

QueryMatchingRules queries the "matching_rules" edge of the ResourceDefinition entity.

func (*ResourceDefinition) QueryResources added in v0.4.0

func (rd *ResourceDefinition) QueryResources() *ResourceQuery

QueryResources queries the "resources" edge of the ResourceDefinition entity.

func (*ResourceDefinition) String added in v0.4.0

func (rd *ResourceDefinition) String() string

String implements the fmt.Stringer.

func (*ResourceDefinition) Unwrap added in v0.4.0

func (rd *ResourceDefinition) Unwrap() *ResourceDefinition

Unwrap unwraps the ResourceDefinition 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 (*ResourceDefinition) Update added in v0.4.0

Update returns a builder for updating this ResourceDefinition. Note that you need to call ResourceDefinition.Unwrap() before calling this method if this ResourceDefinition was returned from a transaction, and the transaction was committed or rolled back.

func (*ResourceDefinition) Value added in v0.4.0

func (rd *ResourceDefinition) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ResourceDefinition. This includes values selected through modifiers, order, etc.

func (*ResourceDefinition) View added in v0.4.0

View returns the output of ResourceDefinition entity.

type ResourceDefinitionClient added in v0.4.0

type ResourceDefinitionClient struct {
	// contains filtered or unexported fields
}

ResourceDefinitionClient is a client for the ResourceDefinition schema.

func NewResourceDefinitionClient added in v0.4.0

func NewResourceDefinitionClient(c config) *ResourceDefinitionClient

NewResourceDefinitionClient returns a client for the ResourceDefinition from the given config.

func (*ResourceDefinitionClient) Create added in v0.4.0

Create returns a builder for creating a ResourceDefinition entity.

func (*ResourceDefinitionClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of ResourceDefinition entities.

func (*ResourceDefinitionClient) Delete added in v0.4.0

Delete returns a delete builder for ResourceDefinition.

func (*ResourceDefinitionClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*ResourceDefinitionClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ResourceDefinitionClient) ExecContext added in v0.4.0

func (c *ResourceDefinitionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionClient) Get added in v0.4.0

Get returns a ResourceDefinition entity by its id.

func (*ResourceDefinitionClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*ResourceDefinitionClient) Hooks added in v0.4.0

func (c *ResourceDefinitionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ResourceDefinitionClient) Intercept added in v0.4.0

func (c *ResourceDefinitionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `resourcedefinition.Intercept(f(g(h())))`.

func (*ResourceDefinitionClient) Interceptors added in v0.4.0

func (c *ResourceDefinitionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ResourceDefinitionClient) MapCreateBulk added in v0.5.0

func (c *ResourceDefinitionClient) MapCreateBulk(slice any, setFunc func(*ResourceDefinitionCreate, int)) *ResourceDefinitionCreateBulk

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 (*ResourceDefinitionClient) Query added in v0.4.0

Query returns a query builder for ResourceDefinition.

func (*ResourceDefinitionClient) QueryContext added in v0.4.0

func (c *ResourceDefinitionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionClient) QueryMatchingRules added in v0.4.0

QueryMatchingRules queries the matching_rules edge of a ResourceDefinition.

func (*ResourceDefinitionClient) QueryResources added in v0.4.0

QueryResources queries the resources edge of a ResourceDefinition.

func (*ResourceDefinitionClient) Update added in v0.4.0

Update returns an update builder for ResourceDefinition.

func (*ResourceDefinitionClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*ResourceDefinitionClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*ResourceDefinitionClient) Use added in v0.4.0

func (c *ResourceDefinitionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resourcedefinition.Hooks(f(g(h())))`.

type ResourceDefinitionClientGetter added in v0.4.0

type ResourceDefinitionClientGetter interface {
	// ResourceDefinitions returns the client for interacting with the ResourceDefinition builders.
	ResourceDefinitions() *ResourceDefinitionClient
}

ResourceDefinitionClientGetter is an interface that allows getting ResourceDefinitionClient.

type ResourceDefinitionCreate added in v0.4.0

type ResourceDefinitionCreate struct {
	// contains filtered or unexported fields
}

ResourceDefinitionCreate is the builder for creating a ResourceDefinition entity.

func (*ResourceDefinitionCreate) AddMatchingRuleIDs added in v0.4.0

func (rdc *ResourceDefinitionCreate) AddMatchingRuleIDs(ids ...object.ID) *ResourceDefinitionCreate

AddMatchingRuleIDs adds the "matching_rules" edge to the ResourceDefinitionMatchingRule entity by IDs.

func (*ResourceDefinitionCreate) AddMatchingRules added in v0.4.0

AddMatchingRules adds the "matching_rules" edges to the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionCreate) AddResourceIDs added in v0.4.0

func (rdc *ResourceDefinitionCreate) AddResourceIDs(ids ...object.ID) *ResourceDefinitionCreate

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*ResourceDefinitionCreate) AddResources added in v0.4.0

AddResources adds the "resources" edges to the Resource entity.

func (*ResourceDefinitionCreate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionCreate) ExecContext added in v0.4.0

func (c *ResourceDefinitionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionCreate) ExecE added in v0.4.0

func (rdc *ResourceDefinitionCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceDefinition) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceDefinitionCreate) ExecEX added in v0.4.0

func (rdc *ResourceDefinitionCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceDefinition) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceDefinitionCreate) ExecX added in v0.4.0

func (rdc *ResourceDefinitionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionCreate) Mutation added in v0.4.0

Mutation returns the ResourceDefinitionMutation object of the builder.

func (*ResourceDefinitionCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceDefinition.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceDefinitionUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*ResourceDefinitionCreate) OnConflictColumns added in v0.4.0

func (rdc *ResourceDefinitionCreate) OnConflictColumns(columns ...string) *ResourceDefinitionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceDefinition.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceDefinitionCreate) QueryContext added in v0.4.0

func (c *ResourceDefinitionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionCreate) Save added in v0.4.0

Save creates the ResourceDefinition in the database.

func (*ResourceDefinitionCreate) SaveE added in v0.4.0

SaveE calls the given function after created the ResourceDefinition entity, which is always good for cascading create operations.

func (*ResourceDefinitionCreate) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceDefinitionCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*ResourceDefinitionCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceDefinitionCreate) SetAnnotations added in v0.4.0

func (rdc *ResourceDefinitionCreate) SetAnnotations(m map[string]string) *ResourceDefinitionCreate

SetAnnotations sets the "annotations" field.

func (*ResourceDefinitionCreate) SetBuiltin added in v0.5.0

SetBuiltin sets the "builtin" field.

func (*ResourceDefinitionCreate) SetCreateTime added in v0.4.0

SetCreateTime sets the "create_time" field.

func (*ResourceDefinitionCreate) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*ResourceDefinitionCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*ResourceDefinitionCreate) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*ResourceDefinitionCreate) SetName added in v0.4.0

SetName sets the "name" field.

func (*ResourceDefinitionCreate) SetNillableBuiltin added in v0.5.0

func (rdc *ResourceDefinitionCreate) SetNillableBuiltin(b *bool) *ResourceDefinitionCreate

SetNillableBuiltin sets the "builtin" field if the given value is not nil.

func (*ResourceDefinitionCreate) SetNillableCreateTime added in v0.4.0

func (rdc *ResourceDefinitionCreate) SetNillableCreateTime(t *time.Time) *ResourceDefinitionCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ResourceDefinitionCreate) SetNillableDescription added in v0.4.0

func (rdc *ResourceDefinitionCreate) SetNillableDescription(s *string) *ResourceDefinitionCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ResourceDefinitionCreate) SetNillableSchema added in v0.4.0

func (rdc *ResourceDefinitionCreate) SetNillableSchema(t *types.Schema) *ResourceDefinitionCreate

SetNillableSchema sets the "schema" field if the given value is not nil.

func (*ResourceDefinitionCreate) SetNillableUpdateTime added in v0.4.0

func (rdc *ResourceDefinitionCreate) SetNillableUpdateTime(t *time.Time) *ResourceDefinitionCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*ResourceDefinitionCreate) SetSchema added in v0.4.0

SetSchema sets the "schema" field.

func (*ResourceDefinitionCreate) SetType added in v0.4.0

SetType sets the "type" field.

func (*ResourceDefinitionCreate) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*ResourceDefinitionCreate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

type ResourceDefinitionCreateBulk added in v0.4.0

type ResourceDefinitionCreateBulk struct {
	// contains filtered or unexported fields
}

ResourceDefinitionCreateBulk is the builder for creating many ResourceDefinition entities in bulk.

func (*ResourceDefinitionCreateBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionCreateBulk) ExecContext added in v0.4.0

func (c *ResourceDefinitionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionCreateBulk) ExecE added in v0.4.0

func (rdcb *ResourceDefinitionCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceDefinition) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceDefinitionCreateBulk) ExecEX added in v0.4.0

func (rdcb *ResourceDefinitionCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceDefinition) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceDefinitionCreateBulk) ExecX added in v0.4.0

func (rdcb *ResourceDefinitionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceDefinition.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceDefinitionUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*ResourceDefinitionCreateBulk) OnConflictColumns added in v0.4.0

func (rdcb *ResourceDefinitionCreateBulk) OnConflictColumns(columns ...string) *ResourceDefinitionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceDefinition.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceDefinitionCreateBulk) QueryContext added in v0.4.0

func (c *ResourceDefinitionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionCreateBulk) Save added in v0.4.0

Save creates the ResourceDefinition entities in the database.

func (*ResourceDefinitionCreateBulk) SaveE added in v0.4.0

SaveE calls the given function after created the ResourceDefinition entities, which is always good for cascading create operations.

func (*ResourceDefinitionCreateBulk) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceDefinitionCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceDefinitionCreateBulk) Set added in v0.4.0

Set leverages the ResourceDefinitionCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ResourceDefinitionCreateInput added in v0.4.0

type ResourceDefinitionCreateInput struct {

	// Type of the resources generated from the resource definition.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// UI schema of the resource definition.
	UISchema *types.UISchema `path:"-" query:"-" json:"uiSchema,omitempty"`

	// MatchingRules specifies full inserting the new ResourceDefinitionMatchingRule entities of the ResourceDefinition entity.
	MatchingRules []*ResourceDefinitionMatchingRuleCreateInput `uri:"-" query:"-" json:"matchingRules,omitempty"`
	// contains filtered or unexported fields
}

ResourceDefinitionCreateInput holds the creation input of the ResourceDefinition entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionCreateInput) Model added in v0.4.0

Model returns the ResourceDefinition entity for creating, after validating.

func (*ResourceDefinitionCreateInput) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionCreateInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionCreateInput) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionCreateInput) SetModelClient(cli *Client)

func (*ResourceDefinitionCreateInput) Validate added in v0.4.0

func (rdci *ResourceDefinitionCreateInput) Validate() error

Validate checks the ResourceDefinitionCreateInput entity.

func (*ResourceDefinitionCreateInput) ValidateWith added in v0.4.0

func (rdci *ResourceDefinitionCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionCreateInput entity with the given context and client set.

type ResourceDefinitionCreateInputs added in v0.4.0

type ResourceDefinitionCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceDefinitionCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceDefinitionCreateInputs holds the creation input of the ResourceDefinition entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionCreateInputs) Model added in v0.4.0

Model returns the ResourceDefinition entities for creating, after validating.

func (*ResourceDefinitionCreateInputs) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionCreateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionCreateInputs) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionCreateInputs) SetModelClient(cli *Client)

func (*ResourceDefinitionCreateInputs) Validate added in v0.4.0

func (rdci *ResourceDefinitionCreateInputs) Validate() error

Validate checks the ResourceDefinitionCreateInputs entity .

func (*ResourceDefinitionCreateInputs) ValidateWith added in v0.4.0

func (rdci *ResourceDefinitionCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionCreateInputs entity with the given context and client set.

type ResourceDefinitionCreateInputsItem added in v0.4.0

type ResourceDefinitionCreateInputsItem struct {
	// Type of the resources generated from the resource definition.
	Type string `path:"-" query:"-" json:"type,cli-table-column"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// UI schema of the resource definition.
	UISchema *types.UISchema `path:"-" query:"-" json:"uiSchema,omitempty"`

	// MatchingRules specifies full inserting the new ResourceDefinitionMatchingRule entities.
	MatchingRules []*ResourceDefinitionMatchingRuleCreateInput `uri:"-" query:"-" json:"matchingRules,omitempty"`
}

ResourceDefinitionCreateInputs holds the creation input item of the ResourceDefinition entities.

func (*ResourceDefinitionCreateInputsItem) ValidateWith added in v0.4.0

func (rdci *ResourceDefinitionCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionCreateInputsItem entity with the given context and client set.

type ResourceDefinitionDelete added in v0.4.0

type ResourceDefinitionDelete struct {
	// contains filtered or unexported fields
}

ResourceDefinitionDelete is the builder for deleting a ResourceDefinition entity.

func (*ResourceDefinitionDelete) Exec added in v0.4.0

func (rdd *ResourceDefinitionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ResourceDefinitionDelete) ExecContext added in v0.4.0

func (c *ResourceDefinitionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionDelete) ExecX added in v0.4.0

func (rdd *ResourceDefinitionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionDelete) QueryContext added in v0.4.0

func (c *ResourceDefinitionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionDelete) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionDelete builder.

type ResourceDefinitionDeleteInput added in v0.4.0

type ResourceDefinitionDeleteInput struct {
	ResourceDefinitionQueryInput `path:",inline"`
}

ResourceDefinitionDeleteInput holds the deletion input of the ResourceDefinition entity, please tags with `path:",inline"` if embedding.

func (*ResourceDefinitionDeleteInput) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionDeleteInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionDeleteInput) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionDeleteInput) SetModelClient(cli *Client)

type ResourceDefinitionDeleteInputs added in v0.4.0

type ResourceDefinitionDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceDefinitionDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceDefinitionDeleteInputs holds the deletion input of the ResourceDefinition entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionDeleteInputs) IDs added in v0.4.0

IDs returns the ID list of the ResourceDefinition entities for deleting, after validating.

func (*ResourceDefinitionDeleteInputs) Model added in v0.4.0

Model returns the ResourceDefinition entities for deleting, after validating.

func (*ResourceDefinitionDeleteInputs) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionDeleteInputs) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionDeleteInputs) SetModelClient(cli *Client)

func (*ResourceDefinitionDeleteInputs) Validate added in v0.4.0

func (rddi *ResourceDefinitionDeleteInputs) Validate() error

Validate checks the ResourceDefinitionDeleteInputs entity.

func (*ResourceDefinitionDeleteInputs) ValidateWith added in v0.4.0

func (rddi *ResourceDefinitionDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionDeleteInputs entity with the given context and client set.

type ResourceDefinitionDeleteInputsItem added in v0.4.0

type ResourceDefinitionDeleteInputsItem struct {
	// ID of the ResourceDefinition entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the ResourceDefinition entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

ResourceDefinitionDeleteInputs holds the deletion input item of the ResourceDefinition entities.

type ResourceDefinitionDeleteOne added in v0.4.0

type ResourceDefinitionDeleteOne struct {
	// contains filtered or unexported fields
}

ResourceDefinitionDeleteOne is the builder for deleting a single ResourceDefinition entity.

func (*ResourceDefinitionDeleteOne) Exec added in v0.4.0

Exec executes the deletion query.

func (*ResourceDefinitionDeleteOne) ExecX added in v0.4.0

func (rddo *ResourceDefinitionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionDeleteOne) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionDelete builder.

type ResourceDefinitionEdges added in v0.4.0

type ResourceDefinitionEdges struct {
	// MatchingRules holds the value of the matching_rules edge.
	MatchingRules []*ResourceDefinitionMatchingRule `json:"matching_rules,omitempty"`
	// Resources that use the definition.
	Resources []*Resource `json:"resources,omitempty"`
	// contains filtered or unexported fields
}

ResourceDefinitionEdges holds the relations/edges for other nodes in the graph.

func (ResourceDefinitionEdges) MatchingRulesOrErr added in v0.4.0

func (e ResourceDefinitionEdges) MatchingRulesOrErr() ([]*ResourceDefinitionMatchingRule, error)

MatchingRulesOrErr returns the MatchingRules value or an error if the edge was not loaded in eager-loading.

func (ResourceDefinitionEdges) ResourcesOrErr added in v0.4.0

func (e ResourceDefinitionEdges) ResourcesOrErr() ([]*Resource, error)

ResourcesOrErr returns the Resources value or an error if the edge was not loaded in eager-loading.

type ResourceDefinitionGroupBy added in v0.4.0

type ResourceDefinitionGroupBy struct {
	// contains filtered or unexported fields
}

ResourceDefinitionGroupBy is the group-by builder for ResourceDefinition entities.

func (*ResourceDefinitionGroupBy) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the group-by query.

func (*ResourceDefinitionGroupBy) Bool added in v0.4.0

func (s *ResourceDefinitionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionGroupBy) BoolX added in v0.4.0

func (s *ResourceDefinitionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceDefinitionGroupBy) Bools added in v0.4.0

func (s *ResourceDefinitionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionGroupBy) BoolsX added in v0.4.0

func (s *ResourceDefinitionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ResourceDefinitionGroupBy) Float64 added in v0.4.0

func (s *ResourceDefinitionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionGroupBy) Float64X added in v0.4.0

func (s *ResourceDefinitionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceDefinitionGroupBy) Float64s added in v0.4.0

func (s *ResourceDefinitionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionGroupBy) Float64sX added in v0.4.0

func (s *ResourceDefinitionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceDefinitionGroupBy) Int added in v0.4.0

func (s *ResourceDefinitionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionGroupBy) IntX added in v0.4.0

func (s *ResourceDefinitionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceDefinitionGroupBy) Ints added in v0.4.0

func (s *ResourceDefinitionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionGroupBy) IntsX added in v0.4.0

func (s *ResourceDefinitionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceDefinitionGroupBy) Scan added in v0.4.0

func (rdgb *ResourceDefinitionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceDefinitionGroupBy) ScanX added in v0.4.0

func (s *ResourceDefinitionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceDefinitionGroupBy) String added in v0.4.0

func (s *ResourceDefinitionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionGroupBy) StringX added in v0.4.0

func (s *ResourceDefinitionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceDefinitionGroupBy) Strings added in v0.4.0

func (s *ResourceDefinitionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionGroupBy) StringsX added in v0.4.0

func (s *ResourceDefinitionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceDefinitionMatchingRule added in v0.4.0

type ResourceDefinitionMatchingRule struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// ID of the resource definition to which the relationship connects.
	ResourceDefinitionID object.ID `json:"resource_definition_id,omitempty"`
	// ID of the template version to which the relationship connects.
	TemplateID object.ID `json:"template_id,omitempty"`
	// Name of the matching rule.
	Name string `json:"name,omitempty"`
	// Resource selector.
	Selector types.Selector `json:"selector,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `json:"attributes,omitempty"`
	// Order of the matching rule.
	Order int `json:"order,omitempty"`
	// Default value generated from resource definition's schema, ui schema and attributes
	SchemaDefaultValue []byte `json:"schema_default_value,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ResourceDefinitionMatchingRuleQuery when eager-loading is set.
	Edges ResourceDefinitionMatchingRuleEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRule is the model entity for the ResourceDefinitionMatchingRule schema.

func (*ResourceDefinitionMatchingRule) ExecContext added in v0.4.0

func (c *ResourceDefinitionMatchingRule) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRule) QueryContext added in v0.4.0

func (c *ResourceDefinitionMatchingRule) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRule) QueryResourceDefinition added in v0.4.0

func (rdmr *ResourceDefinitionMatchingRule) QueryResourceDefinition() *ResourceDefinitionQuery

QueryResourceDefinition queries the "resource_definition" edge of the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMatchingRule) QueryResources added in v0.5.0

func (rdmr *ResourceDefinitionMatchingRule) QueryResources() *ResourceQuery

QueryResources queries the "resources" edge of the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMatchingRule) QueryTemplate added in v0.4.0

QueryTemplate queries the "template" edge of the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMatchingRule) String added in v0.4.0

func (rdmr *ResourceDefinitionMatchingRule) String() string

String implements the fmt.Stringer.

func (*ResourceDefinitionMatchingRule) Unwrap added in v0.4.0

Unwrap unwraps the ResourceDefinitionMatchingRule 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 (*ResourceDefinitionMatchingRule) Update added in v0.4.0

Update returns a builder for updating this ResourceDefinitionMatchingRule. Note that you need to call ResourceDefinitionMatchingRule.Unwrap() before calling this method if this ResourceDefinitionMatchingRule was returned from a transaction, and the transaction was committed or rolled back.

func (*ResourceDefinitionMatchingRule) Value added in v0.4.0

func (rdmr *ResourceDefinitionMatchingRule) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ResourceDefinitionMatchingRule. This includes values selected through modifiers, order, etc.

func (*ResourceDefinitionMatchingRule) View added in v0.4.0

View returns the output of ResourceDefinitionMatchingRule entity.

type ResourceDefinitionMatchingRuleClient added in v0.4.0

type ResourceDefinitionMatchingRuleClient struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleClient is a client for the ResourceDefinitionMatchingRule schema.

func NewResourceDefinitionMatchingRuleClient added in v0.4.0

func NewResourceDefinitionMatchingRuleClient(c config) *ResourceDefinitionMatchingRuleClient

NewResourceDefinitionMatchingRuleClient returns a client for the ResourceDefinitionMatchingRule from the given config.

func (*ResourceDefinitionMatchingRuleClient) Create added in v0.4.0

Create returns a builder for creating a ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMatchingRuleClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionMatchingRuleClient) Delete added in v0.4.0

Delete returns a delete builder for ResourceDefinitionMatchingRule.

func (*ResourceDefinitionMatchingRuleClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*ResourceDefinitionMatchingRuleClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ResourceDefinitionMatchingRuleClient) ExecContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRuleClient) Get added in v0.4.0

Get returns a ResourceDefinitionMatchingRule entity by its id.

func (*ResourceDefinitionMatchingRuleClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleClient) Hooks added in v0.4.0

Hooks returns the client hooks.

func (*ResourceDefinitionMatchingRuleClient) Intercept added in v0.4.0

func (c *ResourceDefinitionMatchingRuleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `resourcedefinitionmatchingrule.Intercept(f(g(h())))`.

func (*ResourceDefinitionMatchingRuleClient) Interceptors added in v0.4.0

Interceptors returns the client interceptors.

func (*ResourceDefinitionMatchingRuleClient) MapCreateBulk added in v0.5.0

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 (*ResourceDefinitionMatchingRuleClient) Query added in v0.4.0

Query returns a query builder for ResourceDefinitionMatchingRule.

func (*ResourceDefinitionMatchingRuleClient) QueryContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRuleClient) QueryResourceDefinition added in v0.4.0

QueryResourceDefinition queries the resource_definition edge of a ResourceDefinitionMatchingRule.

func (*ResourceDefinitionMatchingRuleClient) QueryResources added in v0.5.0

QueryResources queries the resources edge of a ResourceDefinitionMatchingRule.

func (*ResourceDefinitionMatchingRuleClient) QueryTemplate added in v0.4.0

QueryTemplate queries the template edge of a ResourceDefinitionMatchingRule.

func (*ResourceDefinitionMatchingRuleClient) Update added in v0.4.0

Update returns an update builder for ResourceDefinitionMatchingRule.

func (*ResourceDefinitionMatchingRuleClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*ResourceDefinitionMatchingRuleClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*ResourceDefinitionMatchingRuleClient) Use added in v0.4.0

func (c *ResourceDefinitionMatchingRuleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resourcedefinitionmatchingrule.Hooks(f(g(h())))`.

type ResourceDefinitionMatchingRuleClientGetter added in v0.4.0

type ResourceDefinitionMatchingRuleClientGetter interface {
	// ResourceDefinitionMatchingRules returns the client for interacting with the ResourceDefinitionMatchingRule builders.
	ResourceDefinitionMatchingRules() *ResourceDefinitionMatchingRuleClient
}

ResourceDefinitionMatchingRuleClientGetter is an interface that allows getting ResourceDefinitionMatchingRuleClient.

type ResourceDefinitionMatchingRuleCreate added in v0.4.0

type ResourceDefinitionMatchingRuleCreate struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleCreate is the builder for creating a ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMatchingRuleCreate) AddResourceIDs added in v0.5.0

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*ResourceDefinitionMatchingRuleCreate) AddResources added in v0.5.0

AddResources adds the "resources" edges to the Resource entity.

func (*ResourceDefinitionMatchingRuleCreate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionMatchingRuleCreate) ExecContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRuleCreate) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceDefinitionMatchingRuleCreate) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleCreate) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleCreate) Mutation added in v0.4.0

Mutation returns the ResourceDefinitionMatchingRuleMutation object of the builder.

func (*ResourceDefinitionMatchingRuleCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceDefinitionMatchingRule.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceDefinitionMatchingRuleUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceDefinitionMatchingRuleCreate) OnConflictColumns added in v0.4.0

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceDefinitionMatchingRule.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceDefinitionMatchingRuleCreate) QueryContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRuleCreate) Save added in v0.4.0

Save creates the ResourceDefinitionMatchingRule in the database.

func (*ResourceDefinitionMatchingRuleCreate) SaveE added in v0.4.0

SaveE calls the given function after created the ResourceDefinitionMatchingRule entity, which is always good for cascading create operations.

func (*ResourceDefinitionMatchingRuleCreate) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*ResourceDefinitionMatchingRuleCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceDefinitionMatchingRuleCreate) SetAttributes added in v0.4.0

SetAttributes sets the "attributes" field.

func (*ResourceDefinitionMatchingRuleCreate) SetCreateTime added in v0.4.0

SetCreateTime sets the "create_time" field.

func (*ResourceDefinitionMatchingRuleCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*ResourceDefinitionMatchingRuleCreate) SetName added in v0.4.0

SetName sets the "name" field.

func (*ResourceDefinitionMatchingRuleCreate) SetNillableCreateTime added in v0.4.0

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ResourceDefinitionMatchingRuleCreate) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*ResourceDefinitionMatchingRuleCreate) SetResourceDefinition added in v0.4.0

SetResourceDefinition sets the "resource_definition" edge to the ResourceDefinition entity.

func (*ResourceDefinitionMatchingRuleCreate) SetResourceDefinitionID added in v0.4.0

SetResourceDefinitionID sets the "resource_definition_id" field.

func (*ResourceDefinitionMatchingRuleCreate) SetSchemaDefaultValue added in v0.5.0

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleCreate) SetSelector added in v0.4.0

SetSelector sets the "selector" field.

func (*ResourceDefinitionMatchingRuleCreate) SetTemplate added in v0.4.0

SetTemplate sets the "template" edge to the TemplateVersion entity.

func (*ResourceDefinitionMatchingRuleCreate) SetTemplateID added in v0.4.0

SetTemplateID sets the "template_id" field.

type ResourceDefinitionMatchingRuleCreateBulk added in v0.4.0

type ResourceDefinitionMatchingRuleCreateBulk struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleCreateBulk is the builder for creating many ResourceDefinitionMatchingRule entities in bulk.

func (*ResourceDefinitionMatchingRuleCreateBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionMatchingRuleCreateBulk) ExecContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRuleCreateBulk) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceDefinitionMatchingRuleCreateBulk) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleCreateBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceDefinitionMatchingRule.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceDefinitionMatchingRuleUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceDefinitionMatchingRuleCreateBulk) OnConflictColumns added in v0.4.0

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceDefinitionMatchingRule.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceDefinitionMatchingRuleCreateBulk) QueryContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRuleCreateBulk) Save added in v0.4.0

Save creates the ResourceDefinitionMatchingRule entities in the database.

func (*ResourceDefinitionMatchingRuleCreateBulk) SaveE added in v0.4.0

SaveE calls the given function after created the ResourceDefinitionMatchingRule entities, which is always good for cascading create operations.

func (*ResourceDefinitionMatchingRuleCreateBulk) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleCreateBulk) Set added in v0.4.0

Set leverages the ResourceDefinitionMatchingRuleCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ResourceDefinitionMatchingRuleCreateInput added in v0.4.0

type ResourceDefinitionMatchingRuleCreateInput struct {

	// Resource selector.
	Selector types.Selector `path:"-" query:"-" json:"selector"`
	// Name of the matching rule.
	Name string `path:"-" query:"-" json:"name"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`

	// Template specifies full inserting the new TemplateVersion entity of the ResourceDefinitionMatchingRule entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template"`
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleCreateInput holds the creation input of the ResourceDefinitionMatchingRule entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionMatchingRuleCreateInput) Model added in v0.4.0

Model returns the ResourceDefinitionMatchingRule entity for creating, after validating.

func (*ResourceDefinitionMatchingRuleCreateInput) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleCreateInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionMatchingRuleCreateInput) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleCreateInput) SetModelClient(cli *Client)

func (*ResourceDefinitionMatchingRuleCreateInput) Validate added in v0.4.0

Validate checks the ResourceDefinitionMatchingRuleCreateInput entity.

func (*ResourceDefinitionMatchingRuleCreateInput) ValidateWith added in v0.4.0

func (rdmrci *ResourceDefinitionMatchingRuleCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRuleCreateInput entity with the given context and client set.

type ResourceDefinitionMatchingRuleCreateInputs added in v0.4.0

type ResourceDefinitionMatchingRuleCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceDefinitionMatchingRuleCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleCreateInputs holds the creation input of the ResourceDefinitionMatchingRule entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionMatchingRuleCreateInputs) Model added in v0.4.0

Model returns the ResourceDefinitionMatchingRule entities for creating, after validating.

func (*ResourceDefinitionMatchingRuleCreateInputs) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleCreateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionMatchingRuleCreateInputs) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleCreateInputs) SetModelClient(cli *Client)

func (*ResourceDefinitionMatchingRuleCreateInputs) Validate added in v0.4.0

Validate checks the ResourceDefinitionMatchingRuleCreateInputs entity .

func (*ResourceDefinitionMatchingRuleCreateInputs) ValidateWith added in v0.4.0

func (rdmrci *ResourceDefinitionMatchingRuleCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRuleCreateInputs entity with the given context and client set.

type ResourceDefinitionMatchingRuleCreateInputsItem added in v0.4.0

type ResourceDefinitionMatchingRuleCreateInputsItem struct {
	// Resource selector.
	Selector types.Selector `path:"-" query:"-" json:"selector"`
	// Name of the matching rule.
	Name string `path:"-" query:"-" json:"name"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`

	// Template specifies full inserting the new TemplateVersion entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template"`
}

ResourceDefinitionMatchingRuleCreateInputs holds the creation input item of the ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionMatchingRuleCreateInputsItem) ValidateWith added in v0.4.0

func (rdmrci *ResourceDefinitionMatchingRuleCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRuleCreateInputsItem entity with the given context and client set.

type ResourceDefinitionMatchingRuleDelete added in v0.4.0

type ResourceDefinitionMatchingRuleDelete struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleDelete is the builder for deleting a ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMatchingRuleDelete) Exec added in v0.4.0

Exec executes the deletion query and returns how many vertices were deleted.

func (*ResourceDefinitionMatchingRuleDelete) ExecContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRuleDelete) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleDelete) QueryContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRuleDelete) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionMatchingRuleDelete builder.

type ResourceDefinitionMatchingRuleDeleteInput added in v0.4.0

type ResourceDefinitionMatchingRuleDeleteInput struct {
	ResourceDefinitionMatchingRuleQueryInput `path:",inline"`
}

ResourceDefinitionMatchingRuleDeleteInput holds the deletion input of the ResourceDefinitionMatchingRule entity, please tags with `path:",inline"` if embedding.

func (*ResourceDefinitionMatchingRuleDeleteInput) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleDeleteInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionMatchingRuleDeleteInput) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleDeleteInput) SetModelClient(cli *Client)

type ResourceDefinitionMatchingRuleDeleteInputs added in v0.4.0

type ResourceDefinitionMatchingRuleDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceDefinitionMatchingRuleDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleDeleteInputs holds the deletion input of the ResourceDefinitionMatchingRule entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionMatchingRuleDeleteInputs) IDs added in v0.4.0

IDs returns the ID list of the ResourceDefinitionMatchingRule entities for deleting, after validating.

func (*ResourceDefinitionMatchingRuleDeleteInputs) Model added in v0.4.0

Model returns the ResourceDefinitionMatchingRule entities for deleting, after validating.

func (*ResourceDefinitionMatchingRuleDeleteInputs) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionMatchingRuleDeleteInputs) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleDeleteInputs) SetModelClient(cli *Client)

func (*ResourceDefinitionMatchingRuleDeleteInputs) Validate added in v0.4.0

Validate checks the ResourceDefinitionMatchingRuleDeleteInputs entity.

func (*ResourceDefinitionMatchingRuleDeleteInputs) ValidateWith added in v0.4.0

func (rdmrdi *ResourceDefinitionMatchingRuleDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRuleDeleteInputs entity with the given context and client set.

type ResourceDefinitionMatchingRuleDeleteInputsItem added in v0.4.0

type ResourceDefinitionMatchingRuleDeleteInputsItem struct {
	// ID of the ResourceDefinitionMatchingRule entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the ResourceDefinitionMatchingRule entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

ResourceDefinitionMatchingRuleDeleteInputs holds the deletion input item of the ResourceDefinitionMatchingRule entities.

type ResourceDefinitionMatchingRuleDeleteOne added in v0.4.0

type ResourceDefinitionMatchingRuleDeleteOne struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleDeleteOne is the builder for deleting a single ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMatchingRuleDeleteOne) Exec added in v0.4.0

Exec executes the deletion query.

func (*ResourceDefinitionMatchingRuleDeleteOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleDeleteOne) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionMatchingRuleDelete builder.

type ResourceDefinitionMatchingRuleEdges added in v0.4.0

type ResourceDefinitionMatchingRuleEdges struct {
	// Resource definition that connect to the relationship.
	ResourceDefinition *ResourceDefinition `json:"resource_definition,omitempty"`
	// Template version that connect to the relationship.
	Template *TemplateVersion `json:"template,omitempty"`
	// Resources that match the rule.
	Resources []*Resource `json:"resources,omitempty"`
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleEdges holds the relations/edges for other nodes in the graph.

func (ResourceDefinitionMatchingRuleEdges) ResourceDefinitionOrErr added in v0.4.0

func (e ResourceDefinitionMatchingRuleEdges) ResourceDefinitionOrErr() (*ResourceDefinition, error)

ResourceDefinitionOrErr returns the ResourceDefinition value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceDefinitionMatchingRuleEdges) ResourcesOrErr added in v0.5.0

func (e ResourceDefinitionMatchingRuleEdges) ResourcesOrErr() ([]*Resource, error)

ResourcesOrErr returns the Resources value or an error if the edge was not loaded in eager-loading.

func (ResourceDefinitionMatchingRuleEdges) TemplateOrErr added in v0.4.0

TemplateOrErr returns the Template value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ResourceDefinitionMatchingRuleGroupBy added in v0.4.0

type ResourceDefinitionMatchingRuleGroupBy struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleGroupBy is the group-by builder for ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionMatchingRuleGroupBy) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the group-by query.

func (*ResourceDefinitionMatchingRuleGroupBy) Bool added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleGroupBy) BoolX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleGroupBy) Bools added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleGroupBy) BoolsX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleGroupBy) Float64 added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleGroupBy) Float64X added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleGroupBy) Float64s added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleGroupBy) Float64sX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleGroupBy) Int added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleGroupBy) IntX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleGroupBy) Ints added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleGroupBy) IntsX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleGroupBy) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*ResourceDefinitionMatchingRuleGroupBy) ScanX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleGroupBy) String added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleGroupBy) StringX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleGroupBy) Strings added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleGroupBy) StringsX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceDefinitionMatchingRuleMutation added in v0.4.0

type ResourceDefinitionMatchingRuleMutation struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleMutation represents an operation that mutates the ResourceDefinitionMatchingRule nodes in the graph.

func (*ResourceDefinitionMatchingRuleMutation) AddField added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) 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 (*ResourceDefinitionMatchingRuleMutation) AddOrder added in v0.4.0

AddOrder adds i to the "order" field.

func (*ResourceDefinitionMatchingRuleMutation) AddResourceIDs added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) AddResourceIDs(ids ...object.ID)

AddResourceIDs adds the "resources" edge to the Resource entity by ids.

func (*ResourceDefinitionMatchingRuleMutation) AddedEdges added in v0.4.0

AddedEdges returns all edge names that were set/added in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) AddedField added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) AddedFields added in v0.4.0

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ResourceDefinitionMatchingRuleMutation) AddedIDs added in v0.4.0

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) AddedOrder added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) AddedOrder() (r int, exists bool)

AddedOrder returns the value that was added to the "order" field in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) Attributes added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) Attributes() (r property.Values, exists bool)

Attributes returns the value of the "attributes" field in the mutation.

func (*ResourceDefinitionMatchingRuleMutation) AttributesCleared added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) AttributesCleared() bool

AttributesCleared returns if the "attributes" field was cleared in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) ClearAttributes added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ClearAttributes()

ClearAttributes clears the value of the "attributes" field.

func (*ResourceDefinitionMatchingRuleMutation) ClearEdge added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) ClearField added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) ClearResourceDefinition added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ClearResourceDefinition()

ClearResourceDefinition clears the "resource_definition" edge to the ResourceDefinition entity.

func (*ResourceDefinitionMatchingRuleMutation) ClearResources added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) ClearResources()

ClearResources clears the "resources" edge to the Resource entity.

func (*ResourceDefinitionMatchingRuleMutation) ClearSchemaDefaultValue added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) ClearSchemaDefaultValue()

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleMutation) ClearTemplate added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ClearTemplate()

ClearTemplate clears the "template" edge to the TemplateVersion entity.

func (*ResourceDefinitionMatchingRuleMutation) ClearedEdges added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) ClearedFields added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ResourceDefinitionMatchingRuleMutation) Client added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) CreateTime added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ResourceDefinitionMatchingRuleMutation) EdgeCleared added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) ExecContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRuleMutation) Field added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) FieldCleared added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) Fields added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) ID added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) IDs added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) Name added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ResourceDefinitionMatchingRuleMutation) OldAttributes added in v0.4.0

OldAttributes returns the old "attributes" field's value of the ResourceDefinitionMatchingRule entity. If the ResourceDefinitionMatchingRule 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 (*ResourceDefinitionMatchingRuleMutation) OldCreateTime added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ResourceDefinitionMatchingRule entity. If the ResourceDefinitionMatchingRule 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 (*ResourceDefinitionMatchingRuleMutation) OldField added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) OldName added in v0.4.0

OldName returns the old "name" field's value of the ResourceDefinitionMatchingRule entity. If the ResourceDefinitionMatchingRule 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 (*ResourceDefinitionMatchingRuleMutation) OldOrder added in v0.4.0

OldOrder returns the old "order" field's value of the ResourceDefinitionMatchingRule entity. If the ResourceDefinitionMatchingRule 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 (*ResourceDefinitionMatchingRuleMutation) OldResourceDefinitionID added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) OldResourceDefinitionID(ctx context.Context) (v object.ID, err error)

OldResourceDefinitionID returns the old "resource_definition_id" field's value of the ResourceDefinitionMatchingRule entity. If the ResourceDefinitionMatchingRule 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 (*ResourceDefinitionMatchingRuleMutation) OldSchemaDefaultValue added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) OldSchemaDefaultValue(ctx context.Context) (v []byte, err error)

OldSchemaDefaultValue returns the old "schema_default_value" field's value of the ResourceDefinitionMatchingRule entity. If the ResourceDefinitionMatchingRule 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 (*ResourceDefinitionMatchingRuleMutation) OldSelector added in v0.4.0

OldSelector returns the old "selector" field's value of the ResourceDefinitionMatchingRule entity. If the ResourceDefinitionMatchingRule 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 (*ResourceDefinitionMatchingRuleMutation) OldTemplateID added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) OldTemplateID(ctx context.Context) (v object.ID, err error)

OldTemplateID returns the old "template_id" field's value of the ResourceDefinitionMatchingRule entity. If the ResourceDefinitionMatchingRule 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 (*ResourceDefinitionMatchingRuleMutation) Op added in v0.4.0

Op returns the operation name.

func (*ResourceDefinitionMatchingRuleMutation) Order added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) Order() (r int, exists bool)

Order returns the value of the "order" field in the mutation.

func (*ResourceDefinitionMatchingRuleMutation) QueryContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRuleMutation) RemoveResourceIDs added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) RemoveResourceIDs(ids ...object.ID)

RemoveResourceIDs removes the "resources" edge to the Resource entity by IDs.

func (*ResourceDefinitionMatchingRuleMutation) RemovedEdges added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) RemovedIDs added in v0.4.0

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) RemovedResourcesIDs added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) RemovedResourcesIDs() (ids []object.ID)

RemovedResources returns the removed IDs of the "resources" edge to the Resource entity.

func (*ResourceDefinitionMatchingRuleMutation) ResetAttributes added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResetAttributes()

ResetAttributes resets all changes to the "attributes" field.

func (*ResourceDefinitionMatchingRuleMutation) ResetCreateTime added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ResourceDefinitionMatchingRuleMutation) ResetEdge added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) ResetField added in v0.4.0

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 (*ResourceDefinitionMatchingRuleMutation) ResetName added in v0.4.0

ResetName resets all changes to the "name" field.

func (*ResourceDefinitionMatchingRuleMutation) ResetOrder added in v0.4.0

ResetOrder resets all changes to the "order" field.

func (*ResourceDefinitionMatchingRuleMutation) ResetResourceDefinition added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResetResourceDefinition()

ResetResourceDefinition resets all changes to the "resource_definition" edge.

func (*ResourceDefinitionMatchingRuleMutation) ResetResourceDefinitionID added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResetResourceDefinitionID()

ResetResourceDefinitionID resets all changes to the "resource_definition_id" field.

func (*ResourceDefinitionMatchingRuleMutation) ResetResources added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) ResetResources()

ResetResources resets all changes to the "resources" edge.

func (*ResourceDefinitionMatchingRuleMutation) ResetSchemaDefaultValue added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) ResetSchemaDefaultValue()

ResetSchemaDefaultValue resets all changes to the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleMutation) ResetSelector added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResetSelector()

ResetSelector resets all changes to the "selector" field.

func (*ResourceDefinitionMatchingRuleMutation) ResetTemplate added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResetTemplate()

ResetTemplate resets all changes to the "template" edge.

func (*ResourceDefinitionMatchingRuleMutation) ResetTemplateID added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResetTemplateID()

ResetTemplateID resets all changes to the "template_id" field.

func (*ResourceDefinitionMatchingRuleMutation) ResourceDefinitionCleared added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResourceDefinitionCleared() bool

ResourceDefinitionCleared reports if the "resource_definition" edge to the ResourceDefinition entity was cleared.

func (*ResourceDefinitionMatchingRuleMutation) ResourceDefinitionID added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResourceDefinitionID() (r object.ID, exists bool)

ResourceDefinitionID returns the value of the "resource_definition_id" field in the mutation.

func (*ResourceDefinitionMatchingRuleMutation) ResourceDefinitionIDs added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) ResourceDefinitionIDs() (ids []object.ID)

ResourceDefinitionIDs returns the "resource_definition" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ResourceDefinitionID instead. It exists only for internal usage by the builders.

func (*ResourceDefinitionMatchingRuleMutation) ResourcesCleared added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) ResourcesCleared() bool

ResourcesCleared reports if the "resources" edge to the Resource entity was cleared.

func (*ResourceDefinitionMatchingRuleMutation) ResourcesIDs added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) ResourcesIDs() (ids []object.ID)

ResourcesIDs returns the "resources" edge IDs in the mutation.

func (*ResourceDefinitionMatchingRuleMutation) SchemaDefaultValue added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) SchemaDefaultValue() (r []byte, exists bool)

SchemaDefaultValue returns the value of the "schema_default_value" field in the mutation.

func (*ResourceDefinitionMatchingRuleMutation) SchemaDefaultValueCleared added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) SchemaDefaultValueCleared() bool

SchemaDefaultValueCleared returns if the "schema_default_value" field was cleared in this mutation.

func (*ResourceDefinitionMatchingRuleMutation) Selector added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) Selector() (r types.Selector, exists bool)

Selector returns the value of the "selector" field in the mutation.

func (*ResourceDefinitionMatchingRuleMutation) SetAttributes added in v0.4.0

SetAttributes sets the "attributes" field.

func (*ResourceDefinitionMatchingRuleMutation) SetCreateTime added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ResourceDefinitionMatchingRuleMutation) SetField added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) 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 (*ResourceDefinitionMatchingRuleMutation) SetID added in v0.4.0

SetID sets the value of the id field. Note that this operation is only accepted on creation of ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionMatchingRuleMutation) SetName added in v0.4.0

SetName sets the "name" field.

func (*ResourceDefinitionMatchingRuleMutation) SetOp added in v0.4.0

SetOp allows setting the mutation operation.

func (*ResourceDefinitionMatchingRuleMutation) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*ResourceDefinitionMatchingRuleMutation) SetResourceDefinitionID added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) SetResourceDefinitionID(o object.ID)

SetResourceDefinitionID sets the "resource_definition_id" field.

func (*ResourceDefinitionMatchingRuleMutation) SetSchemaDefaultValue added in v0.5.0

func (m *ResourceDefinitionMatchingRuleMutation) SetSchemaDefaultValue(b []byte)

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleMutation) SetSelector added in v0.4.0

SetSelector sets the "selector" field.

func (*ResourceDefinitionMatchingRuleMutation) SetTemplateID added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) SetTemplateID(o object.ID)

SetTemplateID sets the "template_id" field.

func (*ResourceDefinitionMatchingRuleMutation) TemplateCleared added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) TemplateCleared() bool

TemplateCleared reports if the "template" edge to the TemplateVersion entity was cleared.

func (*ResourceDefinitionMatchingRuleMutation) TemplateID added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) TemplateID() (r object.ID, exists bool)

TemplateID returns the value of the "template_id" field in the mutation.

func (*ResourceDefinitionMatchingRuleMutation) TemplateIDs added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) TemplateIDs() (ids []object.ID)

TemplateIDs returns the "template" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TemplateID instead. It exists only for internal usage by the builders.

func (ResourceDefinitionMatchingRuleMutation) Tx added in v0.4.0

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ResourceDefinitionMatchingRuleMutation) Type added in v0.4.0

Type returns the node type of this mutation (ResourceDefinitionMatchingRule).

func (*ResourceDefinitionMatchingRuleMutation) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionMatchingRuleMutation builder.

func (*ResourceDefinitionMatchingRuleMutation) WhereP added in v0.4.0

func (m *ResourceDefinitionMatchingRuleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceDefinitionMatchingRuleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ResourceDefinitionMatchingRuleOutput added in v0.4.0

type ResourceDefinitionMatchingRuleOutput struct {
	ID         object.ID       `json:"id,omitempty"`
	CreateTime *time.Time      `json:"createTime,omitempty"`
	Name       string          `json:"name,omitempty"`
	Selector   types.Selector  `json:"selector,omitempty"`
	Attributes property.Values `json:"attributes,omitempty"`

	Template *TemplateVersionOutput `json:"template,omitempty"`
}

ResourceDefinitionMatchingRuleOutput holds the output of the ResourceDefinitionMatchingRule entity.

func ExposeResourceDefinitionMatchingRule added in v0.4.0

func ExposeResourceDefinitionMatchingRule(_rdmr *ResourceDefinitionMatchingRule) *ResourceDefinitionMatchingRuleOutput

ExposeResourceDefinitionMatchingRule converts the ResourceDefinitionMatchingRule to ResourceDefinitionMatchingRuleOutput.

func ExposeResourceDefinitionMatchingRules added in v0.4.0

func ExposeResourceDefinitionMatchingRules(_rdmrs []*ResourceDefinitionMatchingRule) []*ResourceDefinitionMatchingRuleOutput

ExposeResourceDefinitionMatchingRules converts the ResourceDefinitionMatchingRule slice to ResourceDefinitionMatchingRuleOutput pointer slice.

type ResourceDefinitionMatchingRulePatchInput added in v0.5.0

type ResourceDefinitionMatchingRulePatchInput struct {
	ResourceDefinitionMatchingRuleQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// Name of the matching rule.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Resource selector.
	Selector types.Selector `path:"-" query:"-" json:"selector,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`
	// Order of the matching rule.
	Order int `path:"-" query:"-" json:"order,omitempty"`
	// Default value generated from resource definition's schema, ui schema and attributes
	SchemaDefaultValue []byte `path:"-" query:"-" json:"schemaDefaultValue,omitempty"`

	// Template indicates replacing the stale TemplateVersion entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template"`
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRulePatchInput holds the patch input of the ResourceDefinitionMatchingRule entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionMatchingRulePatchInput) Model added in v0.5.0

Model returns the ResourceDefinitionMatchingRule patched entity, after validating.

func (*ResourceDefinitionMatchingRulePatchInput) PatchModel added in v0.5.0

PatchModel returns the ResourceDefinitionMatchingRule partition entity for patching.

func (*ResourceDefinitionMatchingRulePatchInput) SetGinContext added in v0.5.0

func (ic *ResourceDefinitionMatchingRulePatchInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionMatchingRulePatchInput) SetModelClient added in v0.5.0

func (ic *ResourceDefinitionMatchingRulePatchInput) SetModelClient(cli *Client)

func (*ResourceDefinitionMatchingRulePatchInput) Validate added in v0.5.0

Validate checks the ResourceDefinitionMatchingRulePatchInput entity.

func (*ResourceDefinitionMatchingRulePatchInput) ValidateWith added in v0.5.0

func (rdmrpi *ResourceDefinitionMatchingRulePatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRulePatchInput entity with the given context and client set.

type ResourceDefinitionMatchingRuleQuery added in v0.4.0

type ResourceDefinitionMatchingRuleQuery struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleQuery is the builder for querying ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionMatchingRuleQuery) Aggregate added in v0.4.0

Aggregate returns a ResourceDefinitionMatchingRuleSelect configured with the given aggregations.

func (*ResourceDefinitionMatchingRuleQuery) All added in v0.4.0

All executes the query and returns a list of ResourceDefinitionMatchingRules.

func (*ResourceDefinitionMatchingRuleQuery) AllX added in v0.4.0

AllX is like All, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleQuery) Clone added in v0.4.0

Clone returns a duplicate of the ResourceDefinitionMatchingRuleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ResourceDefinitionMatchingRuleQuery) Count added in v0.4.0

Count returns the count of the given query.

func (*ResourceDefinitionMatchingRuleQuery) CountX added in v0.4.0

CountX is like Count, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleQuery) ExecContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRuleQuery) Exist added in v0.4.0

Exist returns true if the query has elements in the graph.

func (*ResourceDefinitionMatchingRuleQuery) ExistX added in v0.4.0

ExistX is like Exist, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleQuery) First added in v0.4.0

First returns the first ResourceDefinitionMatchingRule entity from the query. Returns a *NotFoundError when no ResourceDefinitionMatchingRule was found.

func (*ResourceDefinitionMatchingRuleQuery) FirstID added in v0.4.0

func (rdmrq *ResourceDefinitionMatchingRuleQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first ResourceDefinitionMatchingRule ID from the query. Returns a *NotFoundError when no ResourceDefinitionMatchingRule ID was found.

func (*ResourceDefinitionMatchingRuleQuery) FirstIDX added in v0.4.0

FirstIDX is like FirstID, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleQuery) FirstX added in v0.4.0

FirstX is like First, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleQuery) ForShare added in v0.4.0

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 (*ResourceDefinitionMatchingRuleQuery) ForUpdate added in v0.4.0

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 (*ResourceDefinitionMatchingRuleQuery) GroupBy added in v0.4.0

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ResourceDefinitionMatchingRule.Query().
	GroupBy(resourcedefinitionmatchingrule.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ResourceDefinitionMatchingRuleQuery) IDs added in v0.4.0

func (rdmrq *ResourceDefinitionMatchingRuleQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of ResourceDefinitionMatchingRule IDs.

func (*ResourceDefinitionMatchingRuleQuery) IDsX added in v0.4.0

IDsX is like IDs, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleQuery) Limit added in v0.4.0

Limit the number of records to be returned by this query.

func (*ResourceDefinitionMatchingRuleQuery) Modify added in v0.4.0

Modify adds a query modifier for attaching custom logic to queries.

func (*ResourceDefinitionMatchingRuleQuery) Offset added in v0.4.0

Offset to start from.

func (*ResourceDefinitionMatchingRuleQuery) Only added in v0.4.0

Only returns a single ResourceDefinitionMatchingRule entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ResourceDefinitionMatchingRule entity is found. Returns a *NotFoundError when no ResourceDefinitionMatchingRule entities are found.

func (*ResourceDefinitionMatchingRuleQuery) OnlyID added in v0.4.0

func (rdmrq *ResourceDefinitionMatchingRuleQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only ResourceDefinitionMatchingRule ID in the query. Returns a *NotSingularError when more than one ResourceDefinitionMatchingRule ID is found. Returns a *NotFoundError when no entities are found.

func (*ResourceDefinitionMatchingRuleQuery) OnlyIDX added in v0.4.0

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*ResourceDefinitionMatchingRuleQuery) QueryContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRuleQuery) QueryResourceDefinition added in v0.4.0

func (rdmrq *ResourceDefinitionMatchingRuleQuery) QueryResourceDefinition() *ResourceDefinitionQuery

QueryResourceDefinition chains the current query on the "resource_definition" edge.

func (*ResourceDefinitionMatchingRuleQuery) QueryResources added in v0.5.0

func (rdmrq *ResourceDefinitionMatchingRuleQuery) QueryResources() *ResourceQuery

QueryResources chains the current query on the "resources" edge.

func (*ResourceDefinitionMatchingRuleQuery) QueryTemplate added in v0.4.0

QueryTemplate chains the current query on the "template" edge.

func (*ResourceDefinitionMatchingRuleQuery) Select added in v0.4.0

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.ResourceDefinitionMatchingRule.Query().
	Select(resourcedefinitionmatchingrule.FieldCreateTime).
	Scan(ctx, &v)

func (*ResourceDefinitionMatchingRuleQuery) Unique added in v0.4.0

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 (*ResourceDefinitionMatchingRuleQuery) Where added in v0.4.0

Where adds a new predicate for the ResourceDefinitionMatchingRuleQuery builder.

func (*ResourceDefinitionMatchingRuleQuery) WhereP added in v0.4.0

func (rdmrq *ResourceDefinitionMatchingRuleQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceDefinitionMatchingRuleQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ResourceDefinitionMatchingRuleQuery) WithResourceDefinition added in v0.4.0

WithResourceDefinition tells the query-builder to eager-load the nodes that are connected to the "resource_definition" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceDefinitionMatchingRuleQuery) WithResources added in v0.5.0

WithResources tells the query-builder to eager-load the nodes that are connected to the "resources" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceDefinitionMatchingRuleQuery) WithTemplate added in v0.4.0

WithTemplate tells the query-builder to eager-load the nodes that are connected to the "template" edge. The optional arguments are used to configure the query builder of the edge.

type ResourceDefinitionMatchingRuleQueryInput added in v0.4.0

type ResourceDefinitionMatchingRuleQueryInput struct {

	// Refer holds the route path reference of the ResourceDefinitionMatchingRule entity.
	Refer *object.Refer `path:"resourcedefinitionmatchingrule,default=" query:"-" json:"-"`
	// ID of the ResourceDefinitionMatchingRule entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the ResourceDefinitionMatchingRule entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleQueryInput holds the query input of the ResourceDefinitionMatchingRule entity, please tags with `path:",inline"` if embedding.

func (*ResourceDefinitionMatchingRuleQueryInput) Model added in v0.4.0

Model returns the ResourceDefinitionMatchingRule entity for querying, after validating.

func (*ResourceDefinitionMatchingRuleQueryInput) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleQueryInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionMatchingRuleQueryInput) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleQueryInput) SetModelClient(cli *Client)

func (*ResourceDefinitionMatchingRuleQueryInput) Validate added in v0.4.0

Validate checks the ResourceDefinitionMatchingRuleQueryInput entity.

func (*ResourceDefinitionMatchingRuleQueryInput) ValidateWith added in v0.4.0

func (rdmrqi *ResourceDefinitionMatchingRuleQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRuleQueryInput entity with the given context and client set.

type ResourceDefinitionMatchingRuleQueryInputs added in v0.4.0

type ResourceDefinitionMatchingRuleQueryInputs struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleQueryInputs holds the query input of the ResourceDefinitionMatchingRule entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ResourceDefinitionMatchingRuleQueryInputs) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleQueryInputs) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionMatchingRuleQueryInputs) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleQueryInputs) SetModelClient(cli *Client)

func (*ResourceDefinitionMatchingRuleQueryInputs) Validate added in v0.4.0

Validate checks the ResourceDefinitionMatchingRuleQueryInputs entity.

func (*ResourceDefinitionMatchingRuleQueryInputs) ValidateWith added in v0.4.0

func (rdmrqi *ResourceDefinitionMatchingRuleQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRuleQueryInputs entity with the given context and client set.

type ResourceDefinitionMatchingRuleSelect added in v0.4.0

type ResourceDefinitionMatchingRuleSelect struct {
	*ResourceDefinitionMatchingRuleQuery
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleSelect is the builder for selecting fields of ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionMatchingRuleSelect) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the selector query.

func (*ResourceDefinitionMatchingRuleSelect) Bool added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleSelect) BoolX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleSelect) Bools added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleSelect) BoolsX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ResourceDefinitionMatchingRuleSelect) ExecContext added in v0.4.0

func (c ResourceDefinitionMatchingRuleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRuleSelect) Float64 added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleSelect) Float64X added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleSelect) Float64s added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleSelect) Float64sX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleSelect) Int added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleSelect) IntX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleSelect) Ints added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleSelect) IntsX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleSelect) Modify added in v0.4.0

Modify adds a query modifier for attaching custom logic to queries.

func (ResourceDefinitionMatchingRuleSelect) QueryContext added in v0.4.0

func (c ResourceDefinitionMatchingRuleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRuleSelect) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*ResourceDefinitionMatchingRuleSelect) ScanX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleSelect) String added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleSelect) StringX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleSelect) Strings added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionMatchingRuleSelect) StringsX added in v0.4.0

func (s *ResourceDefinitionMatchingRuleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceDefinitionMatchingRuleUpdate added in v0.4.0

type ResourceDefinitionMatchingRuleUpdate struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleUpdate is the builder for updating ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionMatchingRuleUpdate) AddOrder added in v0.4.0

AddOrder adds i to the "order" field.

func (*ResourceDefinitionMatchingRuleUpdate) AddResourceIDs added in v0.5.0

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*ResourceDefinitionMatchingRuleUpdate) AddResources added in v0.5.0

AddResources adds the "resources" edges to the Resource entity.

func (*ResourceDefinitionMatchingRuleUpdate) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpdate) ClearResources added in v0.5.0

ClearResources clears all "resources" edges to the Resource entity.

func (*ResourceDefinitionMatchingRuleUpdate) ClearSchemaDefaultValue added in v0.5.0

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpdate) ClearTemplate added in v0.4.0

ClearTemplate clears the "template" edge to the TemplateVersion entity.

func (*ResourceDefinitionMatchingRuleUpdate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionMatchingRuleUpdate) ExecContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRuleUpdate) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpdate) Modify added in v0.4.0

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceDefinitionMatchingRuleUpdate) Mutation added in v0.4.0

Mutation returns the ResourceDefinitionMatchingRuleMutation object of the builder.

func (*ResourceDefinitionMatchingRuleUpdate) QueryContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRuleUpdate) RemoveResourceIDs added in v0.5.0

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*ResourceDefinitionMatchingRuleUpdate) RemoveResources added in v0.5.0

RemoveResources removes "resources" edges to Resource entities.

func (*ResourceDefinitionMatchingRuleUpdate) Save added in v0.4.0

Save executes the query and returns the number of nodes affected by the update operation.

func (*ResourceDefinitionMatchingRuleUpdate) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpdate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceDefinitionMatchingRuleUpdate) SetAttributes added in v0.4.0

SetAttributes sets the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpdate) SetNillableOrder added in v0.5.0

SetNillableOrder sets the "order" field if the given value is not nil.

func (*ResourceDefinitionMatchingRuleUpdate) SetNillableSelector added in v0.5.0

SetNillableSelector sets the "selector" field if the given value is not nil.

func (*ResourceDefinitionMatchingRuleUpdate) SetNillableTemplateID added in v0.5.0

SetNillableTemplateID sets the "template_id" field if the given value is not nil.

func (*ResourceDefinitionMatchingRuleUpdate) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*ResourceDefinitionMatchingRuleUpdate) SetSchemaDefaultValue added in v0.5.0

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpdate) SetSelector added in v0.4.0

SetSelector sets the "selector" field.

func (*ResourceDefinitionMatchingRuleUpdate) SetTemplate added in v0.4.0

SetTemplate sets the "template" edge to the TemplateVersion entity.

func (*ResourceDefinitionMatchingRuleUpdate) SetTemplateID added in v0.4.0

SetTemplateID sets the "template_id" field.

func (*ResourceDefinitionMatchingRuleUpdate) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionMatchingRuleUpdate builder.

type ResourceDefinitionMatchingRuleUpdateInput added in v0.4.0

type ResourceDefinitionMatchingRuleUpdateInput struct {
	ResourceDefinitionMatchingRuleQueryInput `path:",inline" query:"-" json:"-"`

	// Name of the matching rule.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Resource selector.
	Selector types.Selector `path:"-" query:"-" json:"selector,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`

	// Template indicates replacing the stale TemplateVersion entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template"`
}

ResourceDefinitionMatchingRuleUpdateInput holds the modification input of the ResourceDefinitionMatchingRule entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionMatchingRuleUpdateInput) Model added in v0.4.0

Model returns the ResourceDefinitionMatchingRule entity for modifying, after validating.

func (*ResourceDefinitionMatchingRuleUpdateInput) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleUpdateInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionMatchingRuleUpdateInput) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleUpdateInput) SetModelClient(cli *Client)

func (*ResourceDefinitionMatchingRuleUpdateInput) Validate added in v0.4.0

Validate checks the ResourceDefinitionMatchingRuleUpdateInput entity.

func (*ResourceDefinitionMatchingRuleUpdateInput) ValidateWith added in v0.4.0

func (rdmrui *ResourceDefinitionMatchingRuleUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRuleUpdateInput entity with the given context and client set.

type ResourceDefinitionMatchingRuleUpdateInputs added in v0.4.0

type ResourceDefinitionMatchingRuleUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceDefinitionMatchingRuleUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleUpdateInputs holds the modification input of the ResourceDefinitionMatchingRule entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionMatchingRuleUpdateInputs) IDs added in v0.4.0

IDs returns the ID list of the ResourceDefinitionMatchingRule entities for modifying, after validating.

func (*ResourceDefinitionMatchingRuleUpdateInputs) Model added in v0.4.0

Model returns the ResourceDefinitionMatchingRule entities for modifying, after validating.

func (*ResourceDefinitionMatchingRuleUpdateInputs) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionMatchingRuleUpdateInputs) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionMatchingRuleUpdateInputs) SetModelClient(cli *Client)

func (*ResourceDefinitionMatchingRuleUpdateInputs) Validate added in v0.4.0

Validate checks the ResourceDefinitionMatchingRuleUpdateInputs entity.

func (*ResourceDefinitionMatchingRuleUpdateInputs) ValidateWith added in v0.4.0

func (rdmrui *ResourceDefinitionMatchingRuleUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRuleUpdateInputs entity with the given context and client set.

type ResourceDefinitionMatchingRuleUpdateInputsItem added in v0.4.0

type ResourceDefinitionMatchingRuleUpdateInputsItem struct {
	// ID of the ResourceDefinitionMatchingRule entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the ResourceDefinitionMatchingRule entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Resource selector.
	Selector types.Selector `path:"-" query:"-" json:"selector"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`

	// Template indicates replacing the stale TemplateVersion entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template"`
}

ResourceDefinitionMatchingRuleUpdateInputs holds the modification input item of the ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionMatchingRuleUpdateInputsItem) ValidateWith added in v0.4.0

func (rdmrui *ResourceDefinitionMatchingRuleUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionMatchingRuleUpdateInputsItem entity with the given context and client set.

type ResourceDefinitionMatchingRuleUpdateOne added in v0.4.0

type ResourceDefinitionMatchingRuleUpdateOne struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleUpdateOne is the builder for updating a single ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMatchingRuleUpdateOne) AddOrder added in v0.4.0

AddOrder adds i to the "order" field.

func (*ResourceDefinitionMatchingRuleUpdateOne) AddResourceIDs added in v0.5.0

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*ResourceDefinitionMatchingRuleUpdateOne) AddResources added in v0.5.0

AddResources adds the "resources" edges to the Resource entity.

func (*ResourceDefinitionMatchingRuleUpdateOne) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpdateOne) ClearResources added in v0.5.0

ClearResources clears all "resources" edges to the Resource entity.

func (*ResourceDefinitionMatchingRuleUpdateOne) ClearSchemaDefaultValue added in v0.5.0

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpdateOne) ClearTemplate added in v0.4.0

ClearTemplate clears the "template" edge to the TemplateVersion entity.

func (*ResourceDefinitionMatchingRuleUpdateOne) Exec added in v0.4.0

Exec executes the query on the entity.

func (*ResourceDefinitionMatchingRuleUpdateOne) ExecContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMatchingRuleUpdateOne) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*ResourceDefinitionMatchingRuleUpdateOne) ExecEX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpdateOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpdateOne) Modify added in v0.4.0

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceDefinitionMatchingRuleUpdateOne) Mutation added in v0.4.0

Mutation returns the ResourceDefinitionMatchingRuleMutation object of the builder.

func (*ResourceDefinitionMatchingRuleUpdateOne) QueryContext added in v0.4.0

func (c *ResourceDefinitionMatchingRuleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMatchingRuleUpdateOne) RemoveResourceIDs added in v0.5.0

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*ResourceDefinitionMatchingRuleUpdateOne) RemoveResources added in v0.5.0

RemoveResources removes "resources" edges to Resource entities.

func (*ResourceDefinitionMatchingRuleUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMatchingRuleUpdateOne) SaveE added in v0.4.0

SaveE calls the given function after updated the ResourceDefinitionMatchingRule entity, which is always good for cascading update operations.

func (*ResourceDefinitionMatchingRuleUpdateOne) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpdateOne) Select added in v0.4.0

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ResourceDefinitionMatchingRuleUpdateOne) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*ResourceDefinitionMatchingRuleUpdateOne) SetAttributes added in v0.4.0

SetAttributes sets the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpdateOne) SetNillableOrder added in v0.5.0

SetNillableOrder sets the "order" field if the given value is not nil.

func (*ResourceDefinitionMatchingRuleUpdateOne) SetNillableSelector added in v0.5.0

SetNillableSelector sets the "selector" field if the given value is not nil.

func (*ResourceDefinitionMatchingRuleUpdateOne) SetNillableTemplateID added in v0.5.0

SetNillableTemplateID sets the "template_id" field if the given value is not nil.

func (*ResourceDefinitionMatchingRuleUpdateOne) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*ResourceDefinitionMatchingRuleUpdateOne) SetSchemaDefaultValue added in v0.5.0

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpdateOne) SetSelector added in v0.4.0

SetSelector sets the "selector" field.

func (*ResourceDefinitionMatchingRuleUpdateOne) SetTemplate added in v0.4.0

SetTemplate sets the "template" edge to the TemplateVersion entity.

func (*ResourceDefinitionMatchingRuleUpdateOne) SetTemplateID added in v0.4.0

SetTemplateID sets the "template_id" field.

func (*ResourceDefinitionMatchingRuleUpdateOne) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionMatchingRuleUpdate builder.

type ResourceDefinitionMatchingRuleUpsert added in v0.4.0

type ResourceDefinitionMatchingRuleUpsert struct {
	*sql.UpdateSet
}

ResourceDefinitionMatchingRuleUpsert is the "OnConflict" setter.

func (*ResourceDefinitionMatchingRuleUpsert) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*ResourceDefinitionMatchingRuleUpsert) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpsert) ClearSchemaDefaultValue added in v0.5.0

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpsert) SetAttributes added in v0.4.0

SetAttributes sets the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpsert) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*ResourceDefinitionMatchingRuleUpsert) SetSchemaDefaultValue added in v0.5.0

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpsert) SetSelector added in v0.4.0

SetSelector sets the "selector" field.

func (*ResourceDefinitionMatchingRuleUpsert) SetTemplateID added in v0.4.0

SetTemplateID sets the "template_id" field.

func (*ResourceDefinitionMatchingRuleUpsert) UpdateAttributes added in v0.4.0

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsert) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsert) UpdateSchemaDefaultValue added in v0.5.0

UpdateSchemaDefaultValue sets the "schema_default_value" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsert) UpdateSelector added in v0.4.0

UpdateSelector sets the "selector" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsert) UpdateTemplateID added in v0.4.0

UpdateTemplateID sets the "template_id" field to the value that was provided on create.

type ResourceDefinitionMatchingRuleUpsertBulk added in v0.4.0

type ResourceDefinitionMatchingRuleUpsertBulk struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleUpsertBulk is the builder for "upsert"-ing a bulk of ResourceDefinitionMatchingRule nodes.

func (*ResourceDefinitionMatchingRuleUpsertBulk) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*ResourceDefinitionMatchingRuleUpsertBulk) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpsertBulk) ClearSchemaDefaultValue added in v0.5.0

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceDefinitionMatchingRuleUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionMatchingRuleUpsertBulk) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceDefinitionMatchingRuleUpsertBulk) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpsertBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceDefinitionMatchingRule.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ResourceDefinitionMatchingRuleUpsertBulk) SetAttributes added in v0.4.0

SetAttributes sets the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpsertBulk) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*ResourceDefinitionMatchingRuleUpsertBulk) SetSchemaDefaultValue added in v0.5.0

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpsertBulk) SetSelector added in v0.4.0

SetSelector sets the "selector" field.

func (*ResourceDefinitionMatchingRuleUpsertBulk) SetTemplateID added in v0.4.0

SetTemplateID sets the "template_id" field.

func (*ResourceDefinitionMatchingRuleUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceDefinitionMatchingRuleCreateBulk.OnConflict documentation for more info.

func (*ResourceDefinitionMatchingRuleUpsertBulk) UpdateAttributes added in v0.4.0

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsertBulk) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ResourceDefinitionMatchingRule.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcedefinitionmatchingrule.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceDefinitionMatchingRuleUpsertBulk) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsertBulk) UpdateSchemaDefaultValue added in v0.5.0

UpdateSchemaDefaultValue sets the "schema_default_value" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsertBulk) UpdateSelector added in v0.4.0

UpdateSelector sets the "selector" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsertBulk) UpdateTemplateID added in v0.4.0

UpdateTemplateID sets the "template_id" field to the value that was provided on create.

type ResourceDefinitionMatchingRuleUpsertOne added in v0.4.0

type ResourceDefinitionMatchingRuleUpsertOne struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMatchingRuleUpsertOne is the builder for "upsert"-ing

one ResourceDefinitionMatchingRule node.

func (*ResourceDefinitionMatchingRuleUpsertOne) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*ResourceDefinitionMatchingRuleUpsertOne) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpsertOne) ClearSchemaDefaultValue added in v0.5.0

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceDefinitionMatchingRuleUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionMatchingRuleUpsertOne) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceDefinitionMatchingRuleUpsertOne) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpsertOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpsertOne) ID added in v0.4.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ResourceDefinitionMatchingRuleUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*ResourceDefinitionMatchingRuleUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceDefinitionMatchingRule.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ResourceDefinitionMatchingRuleUpsertOne) SetAttributes added in v0.4.0

SetAttributes sets the "attributes" field.

func (*ResourceDefinitionMatchingRuleUpsertOne) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*ResourceDefinitionMatchingRuleUpsertOne) SetSchemaDefaultValue added in v0.5.0

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*ResourceDefinitionMatchingRuleUpsertOne) SetSelector added in v0.4.0

SetSelector sets the "selector" field.

func (*ResourceDefinitionMatchingRuleUpsertOne) SetTemplateID added in v0.4.0

SetTemplateID sets the "template_id" field.

func (*ResourceDefinitionMatchingRuleUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceDefinitionMatchingRuleCreate.OnConflict documentation for more info.

func (*ResourceDefinitionMatchingRuleUpsertOne) UpdateAttributes added in v0.4.0

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsertOne) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ResourceDefinitionMatchingRule.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcedefinitionmatchingrule.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceDefinitionMatchingRuleUpsertOne) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsertOne) UpdateSchemaDefaultValue added in v0.5.0

UpdateSchemaDefaultValue sets the "schema_default_value" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsertOne) UpdateSelector added in v0.4.0

UpdateSelector sets the "selector" field to the value that was provided on create.

func (*ResourceDefinitionMatchingRuleUpsertOne) UpdateTemplateID added in v0.4.0

UpdateTemplateID sets the "template_id" field to the value that was provided on create.

type ResourceDefinitionMatchingRules added in v0.4.0

type ResourceDefinitionMatchingRules []*ResourceDefinitionMatchingRule

ResourceDefinitionMatchingRules is a parsable slice of ResourceDefinitionMatchingRule.

func (ResourceDefinitionMatchingRules) View added in v0.4.0

View returns the output of ResourceDefinitionMatchingRule entities.

type ResourceDefinitionMutation added in v0.4.0

type ResourceDefinitionMutation struct {
	// contains filtered or unexported fields
}

ResourceDefinitionMutation represents an operation that mutates the ResourceDefinition nodes in the graph.

func (*ResourceDefinitionMutation) AddField added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) AddMatchingRuleIDs added in v0.4.0

func (m *ResourceDefinitionMutation) AddMatchingRuleIDs(ids ...object.ID)

AddMatchingRuleIDs adds the "matching_rules" edge to the ResourceDefinitionMatchingRule entity by ids.

func (*ResourceDefinitionMutation) AddResourceIDs added in v0.4.0

func (m *ResourceDefinitionMutation) AddResourceIDs(ids ...object.ID)

AddResourceIDs adds the "resources" edge to the Resource entity by ids.

func (*ResourceDefinitionMutation) AddedEdges added in v0.4.0

func (m *ResourceDefinitionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ResourceDefinitionMutation) AddedField added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) AddedFields added in v0.4.0

func (m *ResourceDefinitionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ResourceDefinitionMutation) AddedIDs added in v0.4.0

func (m *ResourceDefinitionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ResourceDefinitionMutation) Annotations added in v0.4.0

func (m *ResourceDefinitionMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*ResourceDefinitionMutation) AnnotationsCleared added in v0.4.0

func (m *ResourceDefinitionMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*ResourceDefinitionMutation) Builtin added in v0.5.0

func (m *ResourceDefinitionMutation) Builtin() (r bool, exists bool)

Builtin returns the value of the "builtin" field in the mutation.

func (*ResourceDefinitionMutation) ClearAnnotations added in v0.4.0

func (m *ResourceDefinitionMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceDefinitionMutation) ClearDescription added in v0.4.0

func (m *ResourceDefinitionMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*ResourceDefinitionMutation) ClearEdge added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) ClearField added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) ClearLabels added in v0.4.0

func (m *ResourceDefinitionMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*ResourceDefinitionMutation) ClearMatchingRules added in v0.4.0

func (m *ResourceDefinitionMutation) ClearMatchingRules()

ClearMatchingRules clears the "matching_rules" edge to the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMutation) ClearResources added in v0.4.0

func (m *ResourceDefinitionMutation) ClearResources()

ClearResources clears the "resources" edge to the Resource entity.

func (*ResourceDefinitionMutation) ClearUISchema added in v0.6.0

func (m *ResourceDefinitionMutation) ClearUISchema()

ClearUISchema clears the value of the "ui_schema" field.

func (*ResourceDefinitionMutation) ClearedEdges added in v0.4.0

func (m *ResourceDefinitionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ResourceDefinitionMutation) ClearedFields added in v0.4.0

func (m *ResourceDefinitionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ResourceDefinitionMutation) Client added in v0.4.0

func (m ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) CreateTime added in v0.4.0

func (m *ResourceDefinitionMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ResourceDefinitionMutation) Description added in v0.4.0

func (m *ResourceDefinitionMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*ResourceDefinitionMutation) DescriptionCleared added in v0.4.0

func (m *ResourceDefinitionMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*ResourceDefinitionMutation) EdgeCleared added in v0.4.0

func (m *ResourceDefinitionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ResourceDefinitionMutation) ExecContext added in v0.4.0

func (c *ResourceDefinitionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionMutation) Field added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) FieldCleared added in v0.4.0

func (m *ResourceDefinitionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ResourceDefinitionMutation) Fields added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) GetType added in v0.4.0

func (m *ResourceDefinitionMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ResourceDefinitionMutation) ID added in v0.4.0

func (m *ResourceDefinitionMutation) ID() (id object.ID, 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 (*ResourceDefinitionMutation) IDs added in v0.4.0

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 (*ResourceDefinitionMutation) Labels added in v0.4.0

func (m *ResourceDefinitionMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*ResourceDefinitionMutation) LabelsCleared added in v0.4.0

func (m *ResourceDefinitionMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*ResourceDefinitionMutation) MatchingRulesCleared added in v0.4.0

func (m *ResourceDefinitionMutation) MatchingRulesCleared() bool

MatchingRulesCleared reports if the "matching_rules" edge to the ResourceDefinitionMatchingRule entity was cleared.

func (*ResourceDefinitionMutation) MatchingRulesIDs added in v0.4.0

func (m *ResourceDefinitionMutation) MatchingRulesIDs() (ids []object.ID)

MatchingRulesIDs returns the "matching_rules" edge IDs in the mutation.

func (*ResourceDefinitionMutation) Name added in v0.4.0

func (m *ResourceDefinitionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ResourceDefinitionMutation) OldAnnotations added in v0.4.0

func (m *ResourceDefinitionMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) OldBuiltin added in v0.5.0

func (m *ResourceDefinitionMutation) OldBuiltin(ctx context.Context) (v bool, err error)

OldBuiltin returns the old "builtin" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) OldCreateTime added in v0.4.0

func (m *ResourceDefinitionMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) OldDescription added in v0.4.0

func (m *ResourceDefinitionMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) OldField added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) OldLabels added in v0.4.0

func (m *ResourceDefinitionMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) OldName added in v0.4.0

func (m *ResourceDefinitionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) OldSchema added in v0.4.0

func (m *ResourceDefinitionMutation) OldSchema(ctx context.Context) (v types.Schema, err error)

OldSchema returns the old "schema" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) OldType added in v0.4.0

func (m *ResourceDefinitionMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) OldUISchema added in v0.6.0

func (m *ResourceDefinitionMutation) OldUISchema(ctx context.Context) (v *types.UISchema, err error)

OldUISchema returns the old "ui_schema" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) OldUpdateTime added in v0.4.0

func (m *ResourceDefinitionMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the ResourceDefinition entity. If the ResourceDefinition 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 (*ResourceDefinitionMutation) Op added in v0.4.0

Op returns the operation name.

func (*ResourceDefinitionMutation) QueryContext added in v0.4.0

func (c *ResourceDefinitionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionMutation) RemoveMatchingRuleIDs added in v0.4.0

func (m *ResourceDefinitionMutation) RemoveMatchingRuleIDs(ids ...object.ID)

RemoveMatchingRuleIDs removes the "matching_rules" edge to the ResourceDefinitionMatchingRule entity by IDs.

func (*ResourceDefinitionMutation) RemoveResourceIDs added in v0.4.0

func (m *ResourceDefinitionMutation) RemoveResourceIDs(ids ...object.ID)

RemoveResourceIDs removes the "resources" edge to the Resource entity by IDs.

func (*ResourceDefinitionMutation) RemovedEdges added in v0.4.0

func (m *ResourceDefinitionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ResourceDefinitionMutation) RemovedIDs added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) RemovedMatchingRulesIDs added in v0.4.0

func (m *ResourceDefinitionMutation) RemovedMatchingRulesIDs() (ids []object.ID)

RemovedMatchingRules returns the removed IDs of the "matching_rules" edge to the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionMutation) RemovedResourcesIDs added in v0.4.0

func (m *ResourceDefinitionMutation) RemovedResourcesIDs() (ids []object.ID)

RemovedResources returns the removed IDs of the "resources" edge to the Resource entity.

func (*ResourceDefinitionMutation) ResetAnnotations added in v0.4.0

func (m *ResourceDefinitionMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*ResourceDefinitionMutation) ResetBuiltin added in v0.5.0

func (m *ResourceDefinitionMutation) ResetBuiltin()

ResetBuiltin resets all changes to the "builtin" field.

func (*ResourceDefinitionMutation) ResetCreateTime added in v0.4.0

func (m *ResourceDefinitionMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ResourceDefinitionMutation) ResetDescription added in v0.4.0

func (m *ResourceDefinitionMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ResourceDefinitionMutation) ResetEdge added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) ResetField added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) ResetLabels added in v0.4.0

func (m *ResourceDefinitionMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*ResourceDefinitionMutation) ResetMatchingRules added in v0.4.0

func (m *ResourceDefinitionMutation) ResetMatchingRules()

ResetMatchingRules resets all changes to the "matching_rules" edge.

func (*ResourceDefinitionMutation) ResetName added in v0.4.0

func (m *ResourceDefinitionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ResourceDefinitionMutation) ResetResources added in v0.4.0

func (m *ResourceDefinitionMutation) ResetResources()

ResetResources resets all changes to the "resources" edge.

func (*ResourceDefinitionMutation) ResetSchema added in v0.4.0

func (m *ResourceDefinitionMutation) ResetSchema()

ResetSchema resets all changes to the "schema" field.

func (*ResourceDefinitionMutation) ResetType added in v0.4.0

func (m *ResourceDefinitionMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ResourceDefinitionMutation) ResetUISchema added in v0.6.0

func (m *ResourceDefinitionMutation) ResetUISchema()

ResetUISchema resets all changes to the "ui_schema" field.

func (*ResourceDefinitionMutation) ResetUpdateTime added in v0.4.0

func (m *ResourceDefinitionMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*ResourceDefinitionMutation) ResourcesCleared added in v0.4.0

func (m *ResourceDefinitionMutation) ResourcesCleared() bool

ResourcesCleared reports if the "resources" edge to the Resource entity was cleared.

func (*ResourceDefinitionMutation) ResourcesIDs added in v0.4.0

func (m *ResourceDefinitionMutation) ResourcesIDs() (ids []object.ID)

ResourcesIDs returns the "resources" edge IDs in the mutation.

func (*ResourceDefinitionMutation) Schema added in v0.4.0

func (m *ResourceDefinitionMutation) Schema() (r types.Schema, exists bool)

Schema returns the value of the "schema" field in the mutation.

func (*ResourceDefinitionMutation) SetAnnotations added in v0.4.0

func (m *ResourceDefinitionMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*ResourceDefinitionMutation) SetBuiltin added in v0.5.0

func (m *ResourceDefinitionMutation) SetBuiltin(b bool)

SetBuiltin sets the "builtin" field.

func (*ResourceDefinitionMutation) SetCreateTime added in v0.4.0

func (m *ResourceDefinitionMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ResourceDefinitionMutation) SetDescription added in v0.4.0

func (m *ResourceDefinitionMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ResourceDefinitionMutation) SetField added in v0.4.0

func (m *ResourceDefinitionMutation) 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 (*ResourceDefinitionMutation) SetID added in v0.4.0

func (m *ResourceDefinitionMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ResourceDefinition entities.

func (*ResourceDefinitionMutation) SetLabels added in v0.4.0

func (m *ResourceDefinitionMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*ResourceDefinitionMutation) SetName added in v0.4.0

func (m *ResourceDefinitionMutation) SetName(s string)

SetName sets the "name" field.

func (*ResourceDefinitionMutation) SetOp added in v0.4.0

func (m *ResourceDefinitionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ResourceDefinitionMutation) SetSchema added in v0.4.0

func (m *ResourceDefinitionMutation) SetSchema(t types.Schema)

SetSchema sets the "schema" field.

func (*ResourceDefinitionMutation) SetType added in v0.4.0

func (m *ResourceDefinitionMutation) SetType(s string)

SetType sets the "type" field.

func (*ResourceDefinitionMutation) SetUISchema added in v0.6.0

func (m *ResourceDefinitionMutation) SetUISchema(ts *types.UISchema)

SetUISchema sets the "ui_schema" field.

func (*ResourceDefinitionMutation) SetUpdateTime added in v0.4.0

func (m *ResourceDefinitionMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (ResourceDefinitionMutation) Tx added in v0.4.0

func (m ResourceDefinitionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ResourceDefinitionMutation) Type added in v0.4.0

Type returns the node type of this mutation (ResourceDefinition).

func (*ResourceDefinitionMutation) UISchema added in v0.6.0

func (m *ResourceDefinitionMutation) UISchema() (r *types.UISchema, exists bool)

UISchema returns the value of the "ui_schema" field in the mutation.

func (*ResourceDefinitionMutation) UISchemaCleared added in v0.6.0

func (m *ResourceDefinitionMutation) UISchemaCleared() bool

UISchemaCleared returns if the "ui_schema" field was cleared in this mutation.

func (*ResourceDefinitionMutation) UpdateTime added in v0.4.0

func (m *ResourceDefinitionMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*ResourceDefinitionMutation) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionMutation builder.

func (*ResourceDefinitionMutation) WhereP added in v0.4.0

func (m *ResourceDefinitionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceDefinitionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ResourceDefinitionOutput added in v0.4.0

type ResourceDefinitionOutput struct {
	ID          object.ID         `json:"id,omitempty"`
	Name        string            `json:"name,omitempty"`
	Description string            `json:"description,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	CreateTime  *time.Time        `json:"createTime,omitempty"`
	UpdateTime  *time.Time        `json:"updateTime,omitempty"`
	Type        string            `json:"type,cli-table-column,omitempty"`
	Schema      types.Schema      `json:"schema,omitempty"`
	UISchema    *types.UISchema   `json:"uiSchema,omitempty"`
	Builtin     bool              `json:"builtin,cli-table-column,omitempty"`

	MatchingRules []*ResourceDefinitionMatchingRuleOutput `json:"matchingRules,omitempty"`
}

ResourceDefinitionOutput holds the output of the ResourceDefinition entity.

func ExposeResourceDefinition added in v0.4.0

func ExposeResourceDefinition(_rd *ResourceDefinition) *ResourceDefinitionOutput

ExposeResourceDefinition converts the ResourceDefinition to ResourceDefinitionOutput.

func ExposeResourceDefinitions added in v0.4.0

func ExposeResourceDefinitions(_rds []*ResourceDefinition) []*ResourceDefinitionOutput

ExposeResourceDefinitions converts the ResourceDefinition slice to ResourceDefinitionOutput pointer slice.

type ResourceDefinitionPatchInput added in v0.5.0

type ResourceDefinitionPatchInput struct {
	ResourceDefinitionQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Type of the resources generated from the resource definition.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Generated schema of the resource definition.
	Schema types.Schema `path:"-" query:"-" json:"schema,omitempty"`
	// UI schema of the resource definition.
	UISchema *types.UISchema `path:"-" query:"-" json:"uiSchema,omitempty"`
	// Indicate whether the resource definition is builtin, decided when creating.
	Builtin bool `path:"-" query:"-" json:"builtin,omitempty"`

	// MatchingRules indicates replacing the stale ResourceDefinitionMatchingRule entities.
	MatchingRules []*ResourceDefinitionMatchingRuleCreateInput `uri:"-" query:"-" json:"matchingRules,omitempty"`
	// contains filtered or unexported fields
}

ResourceDefinitionPatchInput holds the patch input of the ResourceDefinition entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionPatchInput) Model added in v0.5.0

Model returns the ResourceDefinition patched entity, after validating.

func (*ResourceDefinitionPatchInput) PatchModel added in v0.5.0

PatchModel returns the ResourceDefinition partition entity for patching.

func (*ResourceDefinitionPatchInput) SetGinContext added in v0.5.0

func (ic *ResourceDefinitionPatchInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionPatchInput) SetModelClient added in v0.5.0

func (ic *ResourceDefinitionPatchInput) SetModelClient(cli *Client)

func (*ResourceDefinitionPatchInput) Validate added in v0.5.0

func (rdpi *ResourceDefinitionPatchInput) Validate() error

Validate checks the ResourceDefinitionPatchInput entity.

func (*ResourceDefinitionPatchInput) ValidateWith added in v0.5.0

func (rdpi *ResourceDefinitionPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionPatchInput entity with the given context and client set.

type ResourceDefinitionQuery added in v0.4.0

type ResourceDefinitionQuery struct {
	// contains filtered or unexported fields
}

ResourceDefinitionQuery is the builder for querying ResourceDefinition entities.

func (*ResourceDefinitionQuery) Aggregate added in v0.4.0

Aggregate returns a ResourceDefinitionSelect configured with the given aggregations.

func (*ResourceDefinitionQuery) All added in v0.4.0

All executes the query and returns a list of ResourceDefinitions.

func (*ResourceDefinitionQuery) AllX added in v0.4.0

AllX is like All, but panics if an error occurs.

func (*ResourceDefinitionQuery) Clone added in v0.4.0

Clone returns a duplicate of the ResourceDefinitionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ResourceDefinitionQuery) Count added in v0.4.0

func (rdq *ResourceDefinitionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ResourceDefinitionQuery) CountX added in v0.4.0

func (rdq *ResourceDefinitionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ResourceDefinitionQuery) ExecContext added in v0.4.0

func (c *ResourceDefinitionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionQuery) Exist added in v0.4.0

func (rdq *ResourceDefinitionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ResourceDefinitionQuery) ExistX added in v0.4.0

func (rdq *ResourceDefinitionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ResourceDefinitionQuery) First added in v0.4.0

First returns the first ResourceDefinition entity from the query. Returns a *NotFoundError when no ResourceDefinition was found.

func (*ResourceDefinitionQuery) FirstID added in v0.4.0

func (rdq *ResourceDefinitionQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first ResourceDefinition ID from the query. Returns a *NotFoundError when no ResourceDefinition ID was found.

func (*ResourceDefinitionQuery) FirstIDX added in v0.4.0

func (rdq *ResourceDefinitionQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ResourceDefinitionQuery) FirstX added in v0.4.0

FirstX is like First, but panics if an error occurs.

func (*ResourceDefinitionQuery) ForShare added in v0.4.0

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 (*ResourceDefinitionQuery) ForUpdate added in v0.4.0

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 (*ResourceDefinitionQuery) GroupBy added in v0.4.0

func (rdq *ResourceDefinitionQuery) GroupBy(field string, fields ...string) *ResourceDefinitionGroupBy

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.ResourceDefinition.Query().
	GroupBy(resourcedefinition.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ResourceDefinitionQuery) IDs added in v0.4.0

func (rdq *ResourceDefinitionQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of ResourceDefinition IDs.

func (*ResourceDefinitionQuery) IDsX added in v0.4.0

func (rdq *ResourceDefinitionQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*ResourceDefinitionQuery) Limit added in v0.4.0

Limit the number of records to be returned by this query.

func (*ResourceDefinitionQuery) Modify added in v0.4.0

func (rdq *ResourceDefinitionQuery) Modify(modifiers ...func(s *sql.Selector)) *ResourceDefinitionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ResourceDefinitionQuery) Offset added in v0.4.0

Offset to start from.

func (*ResourceDefinitionQuery) Only added in v0.4.0

Only returns a single ResourceDefinition entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ResourceDefinition entity is found. Returns a *NotFoundError when no ResourceDefinition entities are found.

func (*ResourceDefinitionQuery) OnlyID added in v0.4.0

func (rdq *ResourceDefinitionQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only ResourceDefinition ID in the query. Returns a *NotSingularError when more than one ResourceDefinition ID is found. Returns a *NotFoundError when no entities are found.

func (*ResourceDefinitionQuery) OnlyIDX added in v0.4.0

func (rdq *ResourceDefinitionQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ResourceDefinitionQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*ResourceDefinitionQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*ResourceDefinitionQuery) QueryContext added in v0.4.0

func (c *ResourceDefinitionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionQuery) QueryMatchingRules added in v0.4.0

QueryMatchingRules chains the current query on the "matching_rules" edge.

func (*ResourceDefinitionQuery) QueryResources added in v0.4.0

func (rdq *ResourceDefinitionQuery) QueryResources() *ResourceQuery

QueryResources chains the current query on the "resources" edge.

func (*ResourceDefinitionQuery) Select added in v0.4.0

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.ResourceDefinition.Query().
	Select(resourcedefinition.FieldName).
	Scan(ctx, &v)

func (*ResourceDefinitionQuery) Unique added in v0.4.0

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 (*ResourceDefinitionQuery) Where added in v0.4.0

Where adds a new predicate for the ResourceDefinitionQuery builder.

func (*ResourceDefinitionQuery) WhereP added in v0.4.0

func (rdq *ResourceDefinitionQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceDefinitionQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ResourceDefinitionQuery) WithMatchingRules added in v0.4.0

WithMatchingRules tells the query-builder to eager-load the nodes that are connected to the "matching_rules" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceDefinitionQuery) WithResources added in v0.4.0

func (rdq *ResourceDefinitionQuery) WithResources(opts ...func(*ResourceQuery)) *ResourceDefinitionQuery

WithResources tells the query-builder to eager-load the nodes that are connected to the "resources" edge. The optional arguments are used to configure the query builder of the edge.

type ResourceDefinitionQueryInput added in v0.4.0

type ResourceDefinitionQueryInput struct {

	// Refer holds the route path reference of the ResourceDefinition entity.
	Refer *object.Refer `path:"resourcedefinition,default=" query:"-" json:"-"`
	// ID of the ResourceDefinition entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the ResourceDefinition entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

ResourceDefinitionQueryInput holds the query input of the ResourceDefinition entity, please tags with `path:",inline"` if embedding.

func (*ResourceDefinitionQueryInput) Model added in v0.4.0

Model returns the ResourceDefinition entity for querying, after validating.

func (*ResourceDefinitionQueryInput) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionQueryInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionQueryInput) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionQueryInput) SetModelClient(cli *Client)

func (*ResourceDefinitionQueryInput) Validate added in v0.4.0

func (rdqi *ResourceDefinitionQueryInput) Validate() error

Validate checks the ResourceDefinitionQueryInput entity.

func (*ResourceDefinitionQueryInput) ValidateWith added in v0.4.0

func (rdqi *ResourceDefinitionQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionQueryInput entity with the given context and client set.

type ResourceDefinitionQueryInputs added in v0.4.0

type ResourceDefinitionQueryInputs struct {
	// contains filtered or unexported fields
}

ResourceDefinitionQueryInputs holds the query input of the ResourceDefinition entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ResourceDefinitionQueryInputs) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionQueryInputs) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionQueryInputs) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionQueryInputs) SetModelClient(cli *Client)

func (*ResourceDefinitionQueryInputs) Validate added in v0.4.0

func (rdqi *ResourceDefinitionQueryInputs) Validate() error

Validate checks the ResourceDefinitionQueryInputs entity.

func (*ResourceDefinitionQueryInputs) ValidateWith added in v0.4.0

func (rdqi *ResourceDefinitionQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionQueryInputs entity with the given context and client set.

type ResourceDefinitionSelect added in v0.4.0

type ResourceDefinitionSelect struct {
	*ResourceDefinitionQuery
	// contains filtered or unexported fields
}

ResourceDefinitionSelect is the builder for selecting fields of ResourceDefinition entities.

func (*ResourceDefinitionSelect) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the selector query.

func (*ResourceDefinitionSelect) Bool added in v0.4.0

func (s *ResourceDefinitionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionSelect) BoolX added in v0.4.0

func (s *ResourceDefinitionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceDefinitionSelect) Bools added in v0.4.0

func (s *ResourceDefinitionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionSelect) BoolsX added in v0.4.0

func (s *ResourceDefinitionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ResourceDefinitionSelect) ExecContext added in v0.4.0

func (c ResourceDefinitionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionSelect) Float64 added in v0.4.0

func (s *ResourceDefinitionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionSelect) Float64X added in v0.4.0

func (s *ResourceDefinitionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceDefinitionSelect) Float64s added in v0.4.0

func (s *ResourceDefinitionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionSelect) Float64sX added in v0.4.0

func (s *ResourceDefinitionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceDefinitionSelect) Int added in v0.4.0

func (s *ResourceDefinitionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionSelect) IntX added in v0.4.0

func (s *ResourceDefinitionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceDefinitionSelect) Ints added in v0.4.0

func (s *ResourceDefinitionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionSelect) IntsX added in v0.4.0

func (s *ResourceDefinitionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceDefinitionSelect) Modify added in v0.4.0

func (rds *ResourceDefinitionSelect) Modify(modifiers ...func(s *sql.Selector)) *ResourceDefinitionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (ResourceDefinitionSelect) QueryContext added in v0.4.0

func (c ResourceDefinitionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionSelect) Scan added in v0.4.0

func (rds *ResourceDefinitionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceDefinitionSelect) ScanX added in v0.4.0

func (s *ResourceDefinitionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceDefinitionSelect) String added in v0.4.0

func (s *ResourceDefinitionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionSelect) StringX added in v0.4.0

func (s *ResourceDefinitionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceDefinitionSelect) Strings added in v0.4.0

func (s *ResourceDefinitionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceDefinitionSelect) StringsX added in v0.4.0

func (s *ResourceDefinitionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceDefinitionUpdate added in v0.4.0

type ResourceDefinitionUpdate struct {
	// contains filtered or unexported fields
}

ResourceDefinitionUpdate is the builder for updating ResourceDefinition entities.

func (*ResourceDefinitionUpdate) AddMatchingRuleIDs added in v0.4.0

func (rdu *ResourceDefinitionUpdate) AddMatchingRuleIDs(ids ...object.ID) *ResourceDefinitionUpdate

AddMatchingRuleIDs adds the "matching_rules" edge to the ResourceDefinitionMatchingRule entity by IDs.

func (*ResourceDefinitionUpdate) AddMatchingRules added in v0.4.0

AddMatchingRules adds the "matching_rules" edges to the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionUpdate) AddResourceIDs added in v0.4.0

func (rdu *ResourceDefinitionUpdate) AddResourceIDs(ids ...object.ID) *ResourceDefinitionUpdate

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*ResourceDefinitionUpdate) AddResources added in v0.4.0

AddResources adds the "resources" edges to the Resource entity.

func (*ResourceDefinitionUpdate) ClearAnnotations added in v0.4.0

func (rdu *ResourceDefinitionUpdate) ClearAnnotations() *ResourceDefinitionUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceDefinitionUpdate) ClearDescription added in v0.4.0

func (rdu *ResourceDefinitionUpdate) ClearDescription() *ResourceDefinitionUpdate

ClearDescription clears the value of the "description" field.

func (*ResourceDefinitionUpdate) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*ResourceDefinitionUpdate) ClearMatchingRules added in v0.4.0

func (rdu *ResourceDefinitionUpdate) ClearMatchingRules() *ResourceDefinitionUpdate

ClearMatchingRules clears all "matching_rules" edges to the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionUpdate) ClearResources added in v0.4.0

func (rdu *ResourceDefinitionUpdate) ClearResources() *ResourceDefinitionUpdate

ClearResources clears all "resources" edges to the Resource entity.

func (*ResourceDefinitionUpdate) ClearUISchema added in v0.6.0

func (rdu *ResourceDefinitionUpdate) ClearUISchema() *ResourceDefinitionUpdate

ClearUISchema clears the value of the "ui_schema" field.

func (*ResourceDefinitionUpdate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionUpdate) ExecContext added in v0.4.0

func (c *ResourceDefinitionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionUpdate) ExecX added in v0.4.0

func (rdu *ResourceDefinitionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionUpdate) Modify added in v0.4.0

func (rdu *ResourceDefinitionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceDefinitionUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceDefinitionUpdate) Mutation added in v0.4.0

Mutation returns the ResourceDefinitionMutation object of the builder.

func (*ResourceDefinitionUpdate) QueryContext added in v0.4.0

func (c *ResourceDefinitionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionUpdate) RemoveMatchingRuleIDs added in v0.4.0

func (rdu *ResourceDefinitionUpdate) RemoveMatchingRuleIDs(ids ...object.ID) *ResourceDefinitionUpdate

RemoveMatchingRuleIDs removes the "matching_rules" edge to ResourceDefinitionMatchingRule entities by IDs.

func (*ResourceDefinitionUpdate) RemoveMatchingRules added in v0.4.0

RemoveMatchingRules removes "matching_rules" edges to ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionUpdate) RemoveResourceIDs added in v0.4.0

func (rdu *ResourceDefinitionUpdate) RemoveResourceIDs(ids ...object.ID) *ResourceDefinitionUpdate

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*ResourceDefinitionUpdate) RemoveResources added in v0.4.0

func (rdu *ResourceDefinitionUpdate) RemoveResources(r ...*Resource) *ResourceDefinitionUpdate

RemoveResources removes "resources" edges to Resource entities.

func (*ResourceDefinitionUpdate) Save added in v0.4.0

func (rdu *ResourceDefinitionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ResourceDefinitionUpdate) SaveX added in v0.4.0

func (rdu *ResourceDefinitionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ResourceDefinitionUpdate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceDefinitionUpdate) SetAnnotations added in v0.4.0

func (rdu *ResourceDefinitionUpdate) SetAnnotations(m map[string]string) *ResourceDefinitionUpdate

SetAnnotations sets the "annotations" field.

func (*ResourceDefinitionUpdate) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*ResourceDefinitionUpdate) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*ResourceDefinitionUpdate) SetNillableDescription added in v0.4.0

func (rdu *ResourceDefinitionUpdate) SetNillableDescription(s *string) *ResourceDefinitionUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ResourceDefinitionUpdate) SetNillableSchema added in v0.4.0

func (rdu *ResourceDefinitionUpdate) SetNillableSchema(t *types.Schema) *ResourceDefinitionUpdate

SetNillableSchema sets the "schema" field if the given value is not nil.

func (*ResourceDefinitionUpdate) SetSchema added in v0.4.0

SetSchema sets the "schema" field.

func (*ResourceDefinitionUpdate) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*ResourceDefinitionUpdate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceDefinitionUpdate) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionUpdate builder.

type ResourceDefinitionUpdateInput added in v0.4.0

type ResourceDefinitionUpdateInput struct {
	ResourceDefinitionQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// UI schema of the resource definition.
	UISchema *types.UISchema `path:"-" query:"-" json:"uiSchema,omitempty"`

	// MatchingRules indicates replacing the stale ResourceDefinitionMatchingRule entities.
	MatchingRules []*ResourceDefinitionMatchingRuleCreateInput `uri:"-" query:"-" json:"matchingRules,omitempty"`
}

ResourceDefinitionUpdateInput holds the modification input of the ResourceDefinition entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionUpdateInput) Model added in v0.4.0

Model returns the ResourceDefinition entity for modifying, after validating.

func (*ResourceDefinitionUpdateInput) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionUpdateInput) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionUpdateInput) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionUpdateInput) SetModelClient(cli *Client)

func (*ResourceDefinitionUpdateInput) Validate added in v0.4.0

func (rdui *ResourceDefinitionUpdateInput) Validate() error

Validate checks the ResourceDefinitionUpdateInput entity.

func (*ResourceDefinitionUpdateInput) ValidateWith added in v0.4.0

func (rdui *ResourceDefinitionUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionUpdateInput entity with the given context and client set.

type ResourceDefinitionUpdateInputs added in v0.4.0

type ResourceDefinitionUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceDefinitionUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceDefinitionUpdateInputs holds the modification input of the ResourceDefinition entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDefinitionUpdateInputs) IDs added in v0.4.0

IDs returns the ID list of the ResourceDefinition entities for modifying, after validating.

func (*ResourceDefinitionUpdateInputs) Model added in v0.4.0

Model returns the ResourceDefinition entities for modifying, after validating.

func (*ResourceDefinitionUpdateInputs) SetGinContext added in v0.4.0

func (ic *ResourceDefinitionUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceDefinitionUpdateInputs) SetModelClient added in v0.4.0

func (ic *ResourceDefinitionUpdateInputs) SetModelClient(cli *Client)

func (*ResourceDefinitionUpdateInputs) Validate added in v0.4.0

func (rdui *ResourceDefinitionUpdateInputs) Validate() error

Validate checks the ResourceDefinitionUpdateInputs entity.

func (*ResourceDefinitionUpdateInputs) ValidateWith added in v0.4.0

func (rdui *ResourceDefinitionUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionUpdateInputs entity with the given context and client set.

type ResourceDefinitionUpdateInputsItem added in v0.4.0

type ResourceDefinitionUpdateInputsItem struct {
	// ID of the ResourceDefinition entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the ResourceDefinition entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// UI schema of the resource definition.
	UISchema *types.UISchema `path:"-" query:"-" json:"uiSchema,omitempty"`

	// MatchingRules indicates replacing the stale ResourceDefinitionMatchingRule entities.
	MatchingRules []*ResourceDefinitionMatchingRuleCreateInput `uri:"-" query:"-" json:"matchingRules,omitempty"`
}

ResourceDefinitionUpdateInputs holds the modification input item of the ResourceDefinition entities.

func (*ResourceDefinitionUpdateInputsItem) ValidateWith added in v0.4.0

func (rdui *ResourceDefinitionUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDefinitionUpdateInputsItem entity with the given context and client set.

type ResourceDefinitionUpdateOne added in v0.4.0

type ResourceDefinitionUpdateOne struct {
	// contains filtered or unexported fields
}

ResourceDefinitionUpdateOne is the builder for updating a single ResourceDefinition entity.

func (*ResourceDefinitionUpdateOne) AddMatchingRuleIDs added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) AddMatchingRuleIDs(ids ...object.ID) *ResourceDefinitionUpdateOne

AddMatchingRuleIDs adds the "matching_rules" edge to the ResourceDefinitionMatchingRule entity by IDs.

func (*ResourceDefinitionUpdateOne) AddMatchingRules added in v0.4.0

AddMatchingRules adds the "matching_rules" edges to the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionUpdateOne) AddResourceIDs added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) AddResourceIDs(ids ...object.ID) *ResourceDefinitionUpdateOne

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*ResourceDefinitionUpdateOne) AddResources added in v0.4.0

AddResources adds the "resources" edges to the Resource entity.

func (*ResourceDefinitionUpdateOne) ClearAnnotations added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) ClearAnnotations() *ResourceDefinitionUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceDefinitionUpdateOne) ClearDescription added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) ClearDescription() *ResourceDefinitionUpdateOne

ClearDescription clears the value of the "description" field.

func (*ResourceDefinitionUpdateOne) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*ResourceDefinitionUpdateOne) ClearMatchingRules added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) ClearMatchingRules() *ResourceDefinitionUpdateOne

ClearMatchingRules clears all "matching_rules" edges to the ResourceDefinitionMatchingRule entity.

func (*ResourceDefinitionUpdateOne) ClearResources added in v0.4.0

ClearResources clears all "resources" edges to the Resource entity.

func (*ResourceDefinitionUpdateOne) ClearUISchema added in v0.6.0

ClearUISchema clears the value of the "ui_schema" field.

func (*ResourceDefinitionUpdateOne) Exec added in v0.4.0

Exec executes the query on the entity.

func (*ResourceDefinitionUpdateOne) ExecContext added in v0.4.0

func (c *ResourceDefinitionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDefinitionUpdateOne) ExecE added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceDefinition) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*ResourceDefinitionUpdateOne) ExecEX added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceDefinition) error)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionUpdateOne) ExecX added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionUpdateOne) Modify added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceDefinitionUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceDefinitionUpdateOne) Mutation added in v0.4.0

Mutation returns the ResourceDefinitionMutation object of the builder.

func (*ResourceDefinitionUpdateOne) QueryContext added in v0.4.0

func (c *ResourceDefinitionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDefinitionUpdateOne) RemoveMatchingRuleIDs added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) RemoveMatchingRuleIDs(ids ...object.ID) *ResourceDefinitionUpdateOne

RemoveMatchingRuleIDs removes the "matching_rules" edge to ResourceDefinitionMatchingRule entities by IDs.

func (*ResourceDefinitionUpdateOne) RemoveMatchingRules added in v0.4.0

RemoveMatchingRules removes "matching_rules" edges to ResourceDefinitionMatchingRule entities.

func (*ResourceDefinitionUpdateOne) RemoveResourceIDs added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) RemoveResourceIDs(ids ...object.ID) *ResourceDefinitionUpdateOne

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*ResourceDefinitionUpdateOne) RemoveResources added in v0.4.0

RemoveResources removes "resources" edges to Resource entities.

func (*ResourceDefinitionUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated ResourceDefinition entity.

func (*ResourceDefinitionUpdateOne) SaveE added in v0.4.0

SaveE calls the given function after updated the ResourceDefinition entity, which is always good for cascading update operations.

func (*ResourceDefinitionUpdateOne) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceDefinitionUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceDefinitionUpdateOne) Select added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) Select(field string, fields ...string) *ResourceDefinitionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ResourceDefinitionUpdateOne) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*ResourceDefinitionUpdateOne) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*ResourceDefinitionUpdateOne) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*ResourceDefinitionUpdateOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*ResourceDefinitionUpdateOne) SetNillableDescription added in v0.4.0

func (rduo *ResourceDefinitionUpdateOne) SetNillableDescription(s *string) *ResourceDefinitionUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ResourceDefinitionUpdateOne) SetNillableSchema added in v0.4.0

SetNillableSchema sets the "schema" field if the given value is not nil.

func (*ResourceDefinitionUpdateOne) SetSchema added in v0.4.0

SetSchema sets the "schema" field.

func (*ResourceDefinitionUpdateOne) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*ResourceDefinitionUpdateOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceDefinitionUpdateOne) Where added in v0.4.0

Where appends a list predicates to the ResourceDefinitionUpdate builder.

type ResourceDefinitionUpsert added in v0.4.0

type ResourceDefinitionUpsert struct {
	*sql.UpdateSet
}

ResourceDefinitionUpsert is the "OnConflict" setter.

func (*ResourceDefinitionUpsert) ClearAnnotations added in v0.4.0

func (u *ResourceDefinitionUpsert) ClearAnnotations() *ResourceDefinitionUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceDefinitionUpsert) ClearDescription added in v0.4.0

func (u *ResourceDefinitionUpsert) ClearDescription() *ResourceDefinitionUpsert

ClearDescription clears the value of the "description" field.

func (*ResourceDefinitionUpsert) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*ResourceDefinitionUpsert) ClearUISchema added in v0.6.0

ClearUISchema clears the value of the "ui_schema" field.

func (*ResourceDefinitionUpsert) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*ResourceDefinitionUpsert) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*ResourceDefinitionUpsert) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*ResourceDefinitionUpsert) SetSchema added in v0.4.0

SetSchema sets the "schema" field.

func (*ResourceDefinitionUpsert) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*ResourceDefinitionUpsert) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceDefinitionUpsert) UpdateAnnotations added in v0.4.0

func (u *ResourceDefinitionUpsert) UpdateAnnotations() *ResourceDefinitionUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ResourceDefinitionUpsert) UpdateDescription added in v0.4.0

func (u *ResourceDefinitionUpsert) UpdateDescription() *ResourceDefinitionUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ResourceDefinitionUpsert) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ResourceDefinitionUpsert) UpdateSchema added in v0.4.0

UpdateSchema sets the "schema" field to the value that was provided on create.

func (*ResourceDefinitionUpsert) UpdateUISchema added in v0.6.0

UpdateUISchema sets the "ui_schema" field to the value that was provided on create.

func (*ResourceDefinitionUpsert) UpdateUpdateTime added in v0.4.0

func (u *ResourceDefinitionUpsert) UpdateUpdateTime() *ResourceDefinitionUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ResourceDefinitionUpsertBulk added in v0.4.0

type ResourceDefinitionUpsertBulk struct {
	// contains filtered or unexported fields
}

ResourceDefinitionUpsertBulk is the builder for "upsert"-ing a bulk of ResourceDefinition nodes.

func (*ResourceDefinitionUpsertBulk) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceDefinitionUpsertBulk) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*ResourceDefinitionUpsertBulk) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*ResourceDefinitionUpsertBulk) ClearUISchema added in v0.6.0

ClearUISchema clears the value of the "ui_schema" field.

func (*ResourceDefinitionUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceDefinitionUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionUpsertBulk) ExecE added in v0.4.0

func (u *ResourceDefinitionUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceDefinition) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceDefinitionUpsertBulk) ExecEX added in v0.4.0

func (u *ResourceDefinitionUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceDefinition) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceDefinitionUpsertBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceDefinition.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ResourceDefinitionUpsertBulk) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*ResourceDefinitionUpsertBulk) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*ResourceDefinitionUpsertBulk) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*ResourceDefinitionUpsertBulk) SetSchema added in v0.4.0

SetSchema sets the "schema" field.

func (*ResourceDefinitionUpsertBulk) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*ResourceDefinitionUpsertBulk) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceDefinitionUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceDefinitionCreateBulk.OnConflict documentation for more info.

func (*ResourceDefinitionUpsertBulk) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ResourceDefinitionUpsertBulk) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ResourceDefinitionUpsertBulk) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ResourceDefinitionUpsertBulk) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ResourceDefinition.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcedefinition.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceDefinitionUpsertBulk) UpdateSchema added in v0.4.0

UpdateSchema sets the "schema" field to the value that was provided on create.

func (*ResourceDefinitionUpsertBulk) UpdateUISchema added in v0.6.0

UpdateUISchema sets the "ui_schema" field to the value that was provided on create.

func (*ResourceDefinitionUpsertBulk) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ResourceDefinitionUpsertOne added in v0.4.0

type ResourceDefinitionUpsertOne struct {
	// contains filtered or unexported fields
}

ResourceDefinitionUpsertOne is the builder for "upsert"-ing

one ResourceDefinition node.

func (*ResourceDefinitionUpsertOne) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceDefinitionUpsertOne) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*ResourceDefinitionUpsertOne) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*ResourceDefinitionUpsertOne) ClearUISchema added in v0.6.0

ClearUISchema clears the value of the "ui_schema" field.

func (*ResourceDefinitionUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceDefinitionUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*ResourceDefinitionUpsertOne) ExecE added in v0.4.0

func (u *ResourceDefinitionUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceDefinition) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceDefinitionUpsertOne) ExecEX added in v0.4.0

func (u *ResourceDefinitionUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceDefinition) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceDefinitionUpsertOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDefinitionUpsertOne) ID added in v0.4.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ResourceDefinitionUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*ResourceDefinitionUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceDefinition.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ResourceDefinitionUpsertOne) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*ResourceDefinitionUpsertOne) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*ResourceDefinitionUpsertOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*ResourceDefinitionUpsertOne) SetSchema added in v0.4.0

SetSchema sets the "schema" field.

func (*ResourceDefinitionUpsertOne) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*ResourceDefinitionUpsertOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*ResourceDefinitionUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceDefinitionCreate.OnConflict documentation for more info.

func (*ResourceDefinitionUpsertOne) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ResourceDefinitionUpsertOne) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ResourceDefinitionUpsertOne) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ResourceDefinitionUpsertOne) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ResourceDefinition.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcedefinition.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceDefinitionUpsertOne) UpdateSchema added in v0.4.0

UpdateSchema sets the "schema" field to the value that was provided on create.

func (*ResourceDefinitionUpsertOne) UpdateUISchema added in v0.6.0

UpdateUISchema sets the "ui_schema" field to the value that was provided on create.

func (*ResourceDefinitionUpsertOne) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ResourceDefinitions added in v0.4.0

type ResourceDefinitions []*ResourceDefinition

ResourceDefinitions is a parsable slice of ResourceDefinition.

func (ResourceDefinitions) View added in v0.4.0

View returns the output of ResourceDefinition entities.

type ResourceDelete added in v0.4.0

type ResourceDelete struct {
	// contains filtered or unexported fields
}

ResourceDelete is the builder for deleting a Resource entity.

func (*ResourceDelete) Exec added in v0.4.0

func (rd *ResourceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ResourceDelete) ExecContext added in v0.4.0

func (c *ResourceDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceDelete) ExecX added in v0.4.0

func (rd *ResourceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDelete) QueryContext added in v0.4.0

func (c *ResourceDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceDelete) Where added in v0.4.0

func (rd *ResourceDelete) Where(ps ...predicate.Resource) *ResourceDelete

Where appends a list predicates to the ResourceDelete builder.

type ResourceDeleteInput added in v0.4.0

type ResourceDeleteInput struct {
	ResourceQueryInput `path:",inline"`
}

ResourceDeleteInput holds the deletion input of the Resource entity, please tags with `path:",inline"` if embedding.

func (*ResourceDeleteInput) SetGinContext added in v0.4.0

func (ic *ResourceDeleteInput) SetGinContext(ctx *gin.Context)

func (*ResourceDeleteInput) SetModelClient added in v0.4.0

func (ic *ResourceDeleteInput) SetModelClient(cli *Client)

type ResourceDeleteInputs added in v0.4.0

type ResourceDeleteInputs struct {

	// Project indicates to delete Resource entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to delete Resource entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceDeleteInputs holds the deletion input of the Resource entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceDeleteInputs) IDs added in v0.4.0

func (rdi *ResourceDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Resource entities for deleting, after validating.

func (*ResourceDeleteInputs) Model added in v0.4.0

func (rdi *ResourceDeleteInputs) Model() []*Resource

Model returns the Resource entities for deleting, after validating.

func (*ResourceDeleteInputs) SetGinContext added in v0.4.0

func (ic *ResourceDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ResourceDeleteInputs) SetModelClient added in v0.4.0

func (ic *ResourceDeleteInputs) SetModelClient(cli *Client)

func (*ResourceDeleteInputs) Validate added in v0.4.0

func (rdi *ResourceDeleteInputs) Validate() error

Validate checks the ResourceDeleteInputs entity.

func (*ResourceDeleteInputs) ValidateWith added in v0.4.0

func (rdi *ResourceDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceDeleteInputs entity with the given context and client set.

type ResourceDeleteInputsItem added in v0.4.0

type ResourceDeleteInputsItem struct {
	// ID of the Resource entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Resource entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

ResourceDeleteInputs holds the deletion input item of the Resource entities.

type ResourceDeleteOne added in v0.4.0

type ResourceDeleteOne struct {
	// contains filtered or unexported fields
}

ResourceDeleteOne is the builder for deleting a single Resource entity.

func (*ResourceDeleteOne) Exec added in v0.4.0

func (rdo *ResourceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ResourceDeleteOne) ExecX added in v0.4.0

func (rdo *ResourceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceDeleteOne) Where added in v0.4.0

Where appends a list predicates to the ResourceDelete builder.

type ResourceEdges added in v0.4.0

type ResourceEdges struct {
	// Project to which the resource belongs.
	Project *Project `json:"project,omitempty"`
	// Environment to which the resource belongs.
	Environment *Environment `json:"environment,omitempty"`
	// Template to which the resource belongs.
	Template *TemplateVersion `json:"template,omitempty"`
	// Definition of the resource.
	ResourceDefinition *ResourceDefinition `json:"-"`
	// Resource definition matching rule which the resource matches.
	ResourceDefinitionMatchingRule *ResourceDefinitionMatchingRule `json:"resource_definition_matching_rule,omitempty"`
	// Runs that belong to the resource.
	Runs []*ResourceRun `json:"runs,omitempty"`
	// Components that belong to the resource.
	Components []*ResourceComponent `json:"components,omitempty"`
	// Dependencies holds the value of the dependencies edge.
	Dependencies []*ResourceRelationship `json:"dependencies,omitempty"`
	// State of the resource.
	State *ResourceState `json:"state,omitempty"`
	// contains filtered or unexported fields
}

ResourceEdges holds the relations/edges for other nodes in the graph.

func (ResourceEdges) ComponentsOrErr added in v0.4.0

func (e ResourceEdges) ComponentsOrErr() ([]*ResourceComponent, error)

ComponentsOrErr returns the Components value or an error if the edge was not loaded in eager-loading.

func (ResourceEdges) DependenciesOrErr added in v0.4.0

func (e ResourceEdges) DependenciesOrErr() ([]*ResourceRelationship, error)

DependenciesOrErr returns the Dependencies value or an error if the edge was not loaded in eager-loading.

func (ResourceEdges) EnvironmentOrErr added in v0.4.0

func (e ResourceEdges) EnvironmentOrErr() (*Environment, error)

EnvironmentOrErr returns the Environment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceEdges) ProjectOrErr added in v0.4.0

func (e ResourceEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceEdges) ResourceDefinitionMatchingRuleOrErr added in v0.5.0

func (e ResourceEdges) ResourceDefinitionMatchingRuleOrErr() (*ResourceDefinitionMatchingRule, error)

ResourceDefinitionMatchingRuleOrErr returns the ResourceDefinitionMatchingRule value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceEdges) ResourceDefinitionOrErr added in v0.4.0

func (e ResourceEdges) ResourceDefinitionOrErr() (*ResourceDefinition, error)

ResourceDefinitionOrErr returns the ResourceDefinition value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceEdges) RunsOrErr added in v0.6.0

func (e ResourceEdges) RunsOrErr() ([]*ResourceRun, error)

RunsOrErr returns the Runs value or an error if the edge was not loaded in eager-loading.

func (ResourceEdges) StateOrErr added in v0.6.0

func (e ResourceEdges) StateOrErr() (*ResourceState, error)

StateOrErr returns the State value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceEdges) TemplateOrErr added in v0.4.0

func (e ResourceEdges) TemplateOrErr() (*TemplateVersion, error)

TemplateOrErr returns the Template value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ResourceGroupBy added in v0.4.0

type ResourceGroupBy struct {
	// contains filtered or unexported fields
}

ResourceGroupBy is the group-by builder for Resource entities.

func (*ResourceGroupBy) Aggregate added in v0.4.0

func (rgb *ResourceGroupBy) Aggregate(fns ...AggregateFunc) *ResourceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ResourceGroupBy) Bool added in v0.4.0

func (s *ResourceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceGroupBy) BoolX added in v0.4.0

func (s *ResourceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceGroupBy) Bools added in v0.4.0

func (s *ResourceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceGroupBy) BoolsX added in v0.4.0

func (s *ResourceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ResourceGroupBy) Float64 added in v0.4.0

func (s *ResourceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceGroupBy) Float64X added in v0.4.0

func (s *ResourceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceGroupBy) Float64s added in v0.4.0

func (s *ResourceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceGroupBy) Float64sX added in v0.4.0

func (s *ResourceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceGroupBy) Int added in v0.4.0

func (s *ResourceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceGroupBy) IntX added in v0.4.0

func (s *ResourceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceGroupBy) Ints added in v0.4.0

func (s *ResourceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceGroupBy) IntsX added in v0.4.0

func (s *ResourceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceGroupBy) Scan added in v0.4.0

func (rgb *ResourceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceGroupBy) ScanX added in v0.4.0

func (s *ResourceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceGroupBy) String added in v0.4.0

func (s *ResourceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceGroupBy) StringX added in v0.4.0

func (s *ResourceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceGroupBy) Strings added in v0.4.0

func (s *ResourceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceGroupBy) StringsX added in v0.4.0

func (s *ResourceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceMutation added in v0.4.0

type ResourceMutation struct {
	// contains filtered or unexported fields
}

ResourceMutation represents an operation that mutates the Resource nodes in the graph.

func (*ResourceMutation) AddComponentIDs added in v0.4.0

func (m *ResourceMutation) AddComponentIDs(ids ...object.ID)

AddComponentIDs adds the "components" edge to the ResourceComponent entity by ids.

func (*ResourceMutation) AddDependencyIDs added in v0.4.0

func (m *ResourceMutation) AddDependencyIDs(ids ...object.ID)

AddDependencyIDs adds the "dependencies" edge to the ResourceRelationship entity by ids.

func (*ResourceMutation) AddField added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) AddRunIDs added in v0.6.0

func (m *ResourceMutation) AddRunIDs(ids ...object.ID)

AddRunIDs adds the "runs" edge to the ResourceRun entity by ids.

func (*ResourceMutation) AddedEdges added in v0.4.0

func (m *ResourceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ResourceMutation) AddedField added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) AddedFields added in v0.4.0

func (m *ResourceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ResourceMutation) AddedIDs added in v0.4.0

func (m *ResourceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ResourceMutation) Annotations added in v0.4.0

func (m *ResourceMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*ResourceMutation) AnnotationsCleared added in v0.4.0

func (m *ResourceMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*ResourceMutation) AppendEndpoints added in v0.5.0

func (m *ResourceMutation) AppendEndpoints(te types.ResourceEndpoints)

AppendEndpoints adds te to the "endpoints" field.

func (*ResourceMutation) AppendedEndpoints added in v0.5.0

func (m *ResourceMutation) AppendedEndpoints() (types.ResourceEndpoints, bool)

AppendedEndpoints returns the list of values that were appended to the "endpoints" field in this mutation.

func (*ResourceMutation) Attributes added in v0.4.0

func (m *ResourceMutation) Attributes() (r property.Values, exists bool)

Attributes returns the value of the "attributes" field in the mutation.

func (*ResourceMutation) AttributesCleared added in v0.4.0

func (m *ResourceMutation) AttributesCleared() bool

AttributesCleared returns if the "attributes" field was cleared in this mutation.

func (*ResourceMutation) ClearAnnotations added in v0.4.0

func (m *ResourceMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceMutation) ClearAttributes added in v0.4.0

func (m *ResourceMutation) ClearAttributes()

ClearAttributes clears the value of the "attributes" field.

func (*ResourceMutation) ClearComponents added in v0.4.0

func (m *ResourceMutation) ClearComponents()

ClearComponents clears the "components" edge to the ResourceComponent entity.

func (*ResourceMutation) ClearComputedAttributes added in v0.5.0

func (m *ResourceMutation) ClearComputedAttributes()

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceMutation) ClearDependencies added in v0.4.0

func (m *ResourceMutation) ClearDependencies()

ClearDependencies clears the "dependencies" edge to the ResourceRelationship entity.

func (*ResourceMutation) ClearDescription added in v0.4.0

func (m *ResourceMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*ResourceMutation) ClearEdge added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) ClearEndpoints added in v0.5.0

func (m *ResourceMutation) ClearEndpoints()

ClearEndpoints clears the value of the "endpoints" field.

func (*ResourceMutation) ClearEnvironment added in v0.4.0

func (m *ResourceMutation) ClearEnvironment()

ClearEnvironment clears the "environment" edge to the Environment entity.

func (*ResourceMutation) ClearField added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) ClearLabels added in v0.4.0

func (m *ResourceMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*ResourceMutation) ClearProject added in v0.4.0

func (m *ResourceMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*ResourceMutation) ClearResourceDefinition added in v0.4.0

func (m *ResourceMutation) ClearResourceDefinition()

ClearResourceDefinition clears the "resource_definition" edge to the ResourceDefinition entity.

func (*ResourceMutation) ClearResourceDefinitionID added in v0.4.0

func (m *ResourceMutation) ClearResourceDefinitionID()

ClearResourceDefinitionID clears the value of the "resource_definition_id" field.

func (*ResourceMutation) ClearResourceDefinitionMatchingRule added in v0.5.0

func (m *ResourceMutation) ClearResourceDefinitionMatchingRule()

ClearResourceDefinitionMatchingRule clears the "resource_definition_matching_rule" edge to the ResourceDefinitionMatchingRule entity.

func (*ResourceMutation) ClearResourceDefinitionMatchingRuleID added in v0.5.0

func (m *ResourceMutation) ClearResourceDefinitionMatchingRuleID()

ClearResourceDefinitionMatchingRuleID clears the value of the "resource_definition_matching_rule_id" field.

func (*ResourceMutation) ClearRuns added in v0.6.0

func (m *ResourceMutation) ClearRuns()

ClearRuns clears the "runs" edge to the ResourceRun entity.

func (*ResourceMutation) ClearState added in v0.6.0

func (m *ResourceMutation) ClearState()

ClearState clears the "state" edge to the ResourceState entity.

func (*ResourceMutation) ClearStatus added in v0.4.0

func (m *ResourceMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*ResourceMutation) ClearTemplate added in v0.4.0

func (m *ResourceMutation) ClearTemplate()

ClearTemplate clears the "template" edge to the TemplateVersion entity.

func (*ResourceMutation) ClearTemplateID added in v0.4.0

func (m *ResourceMutation) ClearTemplateID()

ClearTemplateID clears the value of the "template_id" field.

func (*ResourceMutation) ClearType added in v0.4.0

func (m *ResourceMutation) ClearType()

ClearType clears the value of the "type" field.

func (*ResourceMutation) ClearedEdges added in v0.4.0

func (m *ResourceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ResourceMutation) ClearedFields added in v0.4.0

func (m *ResourceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ResourceMutation) Client added in v0.4.0

func (m ResourceMutation) 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 (*ResourceMutation) ComponentsCleared added in v0.4.0

func (m *ResourceMutation) ComponentsCleared() bool

ComponentsCleared reports if the "components" edge to the ResourceComponent entity was cleared.

func (*ResourceMutation) ComponentsIDs added in v0.4.0

func (m *ResourceMutation) ComponentsIDs() (ids []object.ID)

ComponentsIDs returns the "components" edge IDs in the mutation.

func (*ResourceMutation) ComputedAttributes added in v0.5.0

func (m *ResourceMutation) ComputedAttributes() (r property.Values, exists bool)

ComputedAttributes returns the value of the "computed_attributes" field in the mutation.

func (*ResourceMutation) ComputedAttributesCleared added in v0.5.0

func (m *ResourceMutation) ComputedAttributesCleared() bool

ComputedAttributesCleared returns if the "computed_attributes" field was cleared in this mutation.

func (*ResourceMutation) CreateTime added in v0.4.0

func (m *ResourceMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ResourceMutation) DependenciesCleared added in v0.4.0

func (m *ResourceMutation) DependenciesCleared() bool

DependenciesCleared reports if the "dependencies" edge to the ResourceRelationship entity was cleared.

func (*ResourceMutation) DependenciesIDs added in v0.4.0

func (m *ResourceMutation) DependenciesIDs() (ids []object.ID)

DependenciesIDs returns the "dependencies" edge IDs in the mutation.

func (*ResourceMutation) Description added in v0.4.0

func (m *ResourceMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*ResourceMutation) DescriptionCleared added in v0.4.0

func (m *ResourceMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*ResourceMutation) EdgeCleared added in v0.4.0

func (m *ResourceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ResourceMutation) Endpoints added in v0.5.0

func (m *ResourceMutation) Endpoints() (r types.ResourceEndpoints, exists bool)

Endpoints returns the value of the "endpoints" field in the mutation.

func (*ResourceMutation) EndpointsCleared added in v0.5.0

func (m *ResourceMutation) EndpointsCleared() bool

EndpointsCleared returns if the "endpoints" field was cleared in this mutation.

func (*ResourceMutation) EnvironmentCleared added in v0.4.0

func (m *ResourceMutation) EnvironmentCleared() bool

EnvironmentCleared reports if the "environment" edge to the Environment entity was cleared.

func (*ResourceMutation) EnvironmentID added in v0.4.0

func (m *ResourceMutation) EnvironmentID() (r object.ID, exists bool)

EnvironmentID returns the value of the "environment_id" field in the mutation.

func (*ResourceMutation) EnvironmentIDs added in v0.4.0

func (m *ResourceMutation) EnvironmentIDs() (ids []object.ID)

EnvironmentIDs returns the "environment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EnvironmentID instead. It exists only for internal usage by the builders.

func (*ResourceMutation) ExecContext added in v0.4.0

func (c *ResourceMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceMutation) Field added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) FieldCleared added in v0.4.0

func (m *ResourceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ResourceMutation) Fields added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) GetType added in v0.4.0

func (m *ResourceMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ResourceMutation) ID added in v0.4.0

func (m *ResourceMutation) ID() (id object.ID, 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 (*ResourceMutation) IDs added in v0.4.0

func (m *ResourceMutation) IDs(ctx context.Context) ([]object.ID, 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 (*ResourceMutation) Labels added in v0.4.0

func (m *ResourceMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*ResourceMutation) LabelsCleared added in v0.4.0

func (m *ResourceMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*ResourceMutation) Name added in v0.4.0

func (m *ResourceMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ResourceMutation) OldAnnotations added in v0.4.0

func (m *ResourceMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldAttributes added in v0.4.0

func (m *ResourceMutation) OldAttributes(ctx context.Context) (v property.Values, err error)

OldAttributes returns the old "attributes" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldComputedAttributes added in v0.5.0

func (m *ResourceMutation) OldComputedAttributes(ctx context.Context) (v property.Values, err error)

OldComputedAttributes returns the old "computed_attributes" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldCreateTime added in v0.4.0

func (m *ResourceMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldDescription added in v0.4.0

func (m *ResourceMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldEndpoints added in v0.5.0

func (m *ResourceMutation) OldEndpoints(ctx context.Context) (v types.ResourceEndpoints, err error)

OldEndpoints returns the old "endpoints" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldEnvironmentID added in v0.4.0

func (m *ResourceMutation) OldEnvironmentID(ctx context.Context) (v object.ID, err error)

OldEnvironmentID returns the old "environment_id" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldField added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) OldLabels added in v0.4.0

func (m *ResourceMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldName added in v0.4.0

func (m *ResourceMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldProjectID added in v0.4.0

func (m *ResourceMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldResourceDefinitionID added in v0.4.0

func (m *ResourceMutation) OldResourceDefinitionID(ctx context.Context) (v *object.ID, err error)

OldResourceDefinitionID returns the old "resource_definition_id" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldResourceDefinitionMatchingRuleID added in v0.5.0

func (m *ResourceMutation) OldResourceDefinitionMatchingRuleID(ctx context.Context) (v *object.ID, err error)

OldResourceDefinitionMatchingRuleID returns the old "resource_definition_matching_rule_id" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldStatus added in v0.4.0

func (m *ResourceMutation) OldStatus(ctx context.Context) (v status.Status, err error)

OldStatus returns the old "status" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldTemplateID added in v0.4.0

func (m *ResourceMutation) OldTemplateID(ctx context.Context) (v *object.ID, err error)

OldTemplateID returns the old "template_id" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldType added in v0.4.0

func (m *ResourceMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) OldUpdateTime added in v0.4.0

func (m *ResourceMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Resource entity. If the Resource 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 (*ResourceMutation) Op added in v0.4.0

func (m *ResourceMutation) Op() Op

Op returns the operation name.

func (*ResourceMutation) ProjectCleared added in v0.4.0

func (m *ResourceMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*ResourceMutation) ProjectID added in v0.4.0

func (m *ResourceMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*ResourceMutation) ProjectIDs added in v0.4.0

func (m *ResourceMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*ResourceMutation) QueryContext added in v0.4.0

func (c *ResourceMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceMutation) RemoveComponentIDs added in v0.4.0

func (m *ResourceMutation) RemoveComponentIDs(ids ...object.ID)

RemoveComponentIDs removes the "components" edge to the ResourceComponent entity by IDs.

func (*ResourceMutation) RemoveDependencyIDs added in v0.4.0

func (m *ResourceMutation) RemoveDependencyIDs(ids ...object.ID)

RemoveDependencyIDs removes the "dependencies" edge to the ResourceRelationship entity by IDs.

func (*ResourceMutation) RemoveRunIDs added in v0.6.0

func (m *ResourceMutation) RemoveRunIDs(ids ...object.ID)

RemoveRunIDs removes the "runs" edge to the ResourceRun entity by IDs.

func (*ResourceMutation) RemovedComponentsIDs added in v0.4.0

func (m *ResourceMutation) RemovedComponentsIDs() (ids []object.ID)

RemovedComponents returns the removed IDs of the "components" edge to the ResourceComponent entity.

func (*ResourceMutation) RemovedDependenciesIDs added in v0.4.0

func (m *ResourceMutation) RemovedDependenciesIDs() (ids []object.ID)

RemovedDependencies returns the removed IDs of the "dependencies" edge to the ResourceRelationship entity.

func (*ResourceMutation) RemovedEdges added in v0.4.0

func (m *ResourceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ResourceMutation) RemovedIDs added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) RemovedRunsIDs added in v0.6.0

func (m *ResourceMutation) RemovedRunsIDs() (ids []object.ID)

RemovedRuns returns the removed IDs of the "runs" edge to the ResourceRun entity.

func (*ResourceMutation) ResetAnnotations added in v0.4.0

func (m *ResourceMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*ResourceMutation) ResetAttributes added in v0.4.0

func (m *ResourceMutation) ResetAttributes()

ResetAttributes resets all changes to the "attributes" field.

func (*ResourceMutation) ResetComponents added in v0.4.0

func (m *ResourceMutation) ResetComponents()

ResetComponents resets all changes to the "components" edge.

func (*ResourceMutation) ResetComputedAttributes added in v0.5.0

func (m *ResourceMutation) ResetComputedAttributes()

ResetComputedAttributes resets all changes to the "computed_attributes" field.

func (*ResourceMutation) ResetCreateTime added in v0.4.0

func (m *ResourceMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ResourceMutation) ResetDependencies added in v0.4.0

func (m *ResourceMutation) ResetDependencies()

ResetDependencies resets all changes to the "dependencies" edge.

func (*ResourceMutation) ResetDescription added in v0.4.0

func (m *ResourceMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ResourceMutation) ResetEdge added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) ResetEndpoints added in v0.5.0

func (m *ResourceMutation) ResetEndpoints()

ResetEndpoints resets all changes to the "endpoints" field.

func (*ResourceMutation) ResetEnvironment added in v0.4.0

func (m *ResourceMutation) ResetEnvironment()

ResetEnvironment resets all changes to the "environment" edge.

func (*ResourceMutation) ResetEnvironmentID added in v0.4.0

func (m *ResourceMutation) ResetEnvironmentID()

ResetEnvironmentID resets all changes to the "environment_id" field.

func (*ResourceMutation) ResetField added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) ResetLabels added in v0.4.0

func (m *ResourceMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*ResourceMutation) ResetName added in v0.4.0

func (m *ResourceMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ResourceMutation) ResetProject added in v0.4.0

func (m *ResourceMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*ResourceMutation) ResetProjectID added in v0.4.0

func (m *ResourceMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*ResourceMutation) ResetResourceDefinition added in v0.4.0

func (m *ResourceMutation) ResetResourceDefinition()

ResetResourceDefinition resets all changes to the "resource_definition" edge.

func (*ResourceMutation) ResetResourceDefinitionID added in v0.4.0

func (m *ResourceMutation) ResetResourceDefinitionID()

ResetResourceDefinitionID resets all changes to the "resource_definition_id" field.

func (*ResourceMutation) ResetResourceDefinitionMatchingRule added in v0.5.0

func (m *ResourceMutation) ResetResourceDefinitionMatchingRule()

ResetResourceDefinitionMatchingRule resets all changes to the "resource_definition_matching_rule" edge.

func (*ResourceMutation) ResetResourceDefinitionMatchingRuleID added in v0.5.0

func (m *ResourceMutation) ResetResourceDefinitionMatchingRuleID()

ResetResourceDefinitionMatchingRuleID resets all changes to the "resource_definition_matching_rule_id" field.

func (*ResourceMutation) ResetRuns added in v0.6.0

func (m *ResourceMutation) ResetRuns()

ResetRuns resets all changes to the "runs" edge.

func (*ResourceMutation) ResetState added in v0.6.0

func (m *ResourceMutation) ResetState()

ResetState resets all changes to the "state" edge.

func (*ResourceMutation) ResetStatus added in v0.4.0

func (m *ResourceMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ResourceMutation) ResetTemplate added in v0.4.0

func (m *ResourceMutation) ResetTemplate()

ResetTemplate resets all changes to the "template" edge.

func (*ResourceMutation) ResetTemplateID added in v0.4.0

func (m *ResourceMutation) ResetTemplateID()

ResetTemplateID resets all changes to the "template_id" field.

func (*ResourceMutation) ResetType added in v0.4.0

func (m *ResourceMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ResourceMutation) ResetUpdateTime added in v0.4.0

func (m *ResourceMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*ResourceMutation) ResourceDefinitionCleared added in v0.4.0

func (m *ResourceMutation) ResourceDefinitionCleared() bool

ResourceDefinitionCleared reports if the "resource_definition" edge to the ResourceDefinition entity was cleared.

func (*ResourceMutation) ResourceDefinitionID added in v0.4.0

func (m *ResourceMutation) ResourceDefinitionID() (r object.ID, exists bool)

ResourceDefinitionID returns the value of the "resource_definition_id" field in the mutation.

func (*ResourceMutation) ResourceDefinitionIDCleared added in v0.4.0

func (m *ResourceMutation) ResourceDefinitionIDCleared() bool

ResourceDefinitionIDCleared returns if the "resource_definition_id" field was cleared in this mutation.

func (*ResourceMutation) ResourceDefinitionIDs added in v0.4.0

func (m *ResourceMutation) ResourceDefinitionIDs() (ids []object.ID)

ResourceDefinitionIDs returns the "resource_definition" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ResourceDefinitionID instead. It exists only for internal usage by the builders.

func (*ResourceMutation) ResourceDefinitionMatchingRuleCleared added in v0.5.0

func (m *ResourceMutation) ResourceDefinitionMatchingRuleCleared() bool

ResourceDefinitionMatchingRuleCleared reports if the "resource_definition_matching_rule" edge to the ResourceDefinitionMatchingRule entity was cleared.

func (*ResourceMutation) ResourceDefinitionMatchingRuleID added in v0.5.0

func (m *ResourceMutation) ResourceDefinitionMatchingRuleID() (r object.ID, exists bool)

ResourceDefinitionMatchingRuleID returns the value of the "resource_definition_matching_rule_id" field in the mutation.

func (*ResourceMutation) ResourceDefinitionMatchingRuleIDCleared added in v0.5.0

func (m *ResourceMutation) ResourceDefinitionMatchingRuleIDCleared() bool

ResourceDefinitionMatchingRuleIDCleared returns if the "resource_definition_matching_rule_id" field was cleared in this mutation.

func (*ResourceMutation) ResourceDefinitionMatchingRuleIDs added in v0.5.0

func (m *ResourceMutation) ResourceDefinitionMatchingRuleIDs() (ids []object.ID)

ResourceDefinitionMatchingRuleIDs returns the "resource_definition_matching_rule" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ResourceDefinitionMatchingRuleID instead. It exists only for internal usage by the builders.

func (*ResourceMutation) RunsCleared added in v0.6.0

func (m *ResourceMutation) RunsCleared() bool

RunsCleared reports if the "runs" edge to the ResourceRun entity was cleared.

func (*ResourceMutation) RunsIDs added in v0.6.0

func (m *ResourceMutation) RunsIDs() (ids []object.ID)

RunsIDs returns the "runs" edge IDs in the mutation.

func (*ResourceMutation) SetAnnotations added in v0.4.0

func (m *ResourceMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*ResourceMutation) SetAttributes added in v0.4.0

func (m *ResourceMutation) SetAttributes(pr property.Values)

SetAttributes sets the "attributes" field.

func (*ResourceMutation) SetComputedAttributes added in v0.5.0

func (m *ResourceMutation) SetComputedAttributes(pr property.Values)

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceMutation) SetCreateTime added in v0.4.0

func (m *ResourceMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ResourceMutation) SetDescription added in v0.4.0

func (m *ResourceMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ResourceMutation) SetEndpoints added in v0.5.0

func (m *ResourceMutation) SetEndpoints(te types.ResourceEndpoints)

SetEndpoints sets the "endpoints" field.

func (*ResourceMutation) SetEnvironmentID added in v0.4.0

func (m *ResourceMutation) SetEnvironmentID(o object.ID)

SetEnvironmentID sets the "environment_id" field.

func (*ResourceMutation) SetField added in v0.4.0

func (m *ResourceMutation) 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 (*ResourceMutation) SetID added in v0.4.0

func (m *ResourceMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Resource entities.

func (*ResourceMutation) SetLabels added in v0.4.0

func (m *ResourceMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*ResourceMutation) SetName added in v0.4.0

func (m *ResourceMutation) SetName(s string)

SetName sets the "name" field.

func (*ResourceMutation) SetOp added in v0.4.0

func (m *ResourceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ResourceMutation) SetProjectID added in v0.4.0

func (m *ResourceMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*ResourceMutation) SetResourceDefinitionID added in v0.4.0

func (m *ResourceMutation) SetResourceDefinitionID(o object.ID)

SetResourceDefinitionID sets the "resource_definition_id" field.

func (*ResourceMutation) SetResourceDefinitionMatchingRuleID added in v0.5.0

func (m *ResourceMutation) SetResourceDefinitionMatchingRuleID(o object.ID)

SetResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field.

func (*ResourceMutation) SetStateID added in v0.6.0

func (m *ResourceMutation) SetStateID(id object.ID)

SetStateID sets the "state" edge to the ResourceState entity by id.

func (*ResourceMutation) SetStatus added in v0.4.0

func (m *ResourceMutation) SetStatus(s status.Status)

SetStatus sets the "status" field.

func (*ResourceMutation) SetTemplateID added in v0.4.0

func (m *ResourceMutation) SetTemplateID(o object.ID)

SetTemplateID sets the "template_id" field.

func (*ResourceMutation) SetType added in v0.4.0

func (m *ResourceMutation) SetType(s string)

SetType sets the "type" field.

func (*ResourceMutation) SetUpdateTime added in v0.4.0

func (m *ResourceMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*ResourceMutation) StateCleared added in v0.6.0

func (m *ResourceMutation) StateCleared() bool

StateCleared reports if the "state" edge to the ResourceState entity was cleared.

func (*ResourceMutation) StateID added in v0.6.0

func (m *ResourceMutation) StateID() (id object.ID, exists bool)

StateID returns the "state" edge ID in the mutation.

func (*ResourceMutation) StateIDs added in v0.6.0

func (m *ResourceMutation) StateIDs() (ids []object.ID)

StateIDs returns the "state" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StateID instead. It exists only for internal usage by the builders.

func (*ResourceMutation) Status added in v0.4.0

func (m *ResourceMutation) Status() (r status.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*ResourceMutation) StatusCleared added in v0.4.0

func (m *ResourceMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*ResourceMutation) TemplateCleared added in v0.4.0

func (m *ResourceMutation) TemplateCleared() bool

TemplateCleared reports if the "template" edge to the TemplateVersion entity was cleared.

func (*ResourceMutation) TemplateID added in v0.4.0

func (m *ResourceMutation) TemplateID() (r object.ID, exists bool)

TemplateID returns the value of the "template_id" field in the mutation.

func (*ResourceMutation) TemplateIDCleared added in v0.4.0

func (m *ResourceMutation) TemplateIDCleared() bool

TemplateIDCleared returns if the "template_id" field was cleared in this mutation.

func (*ResourceMutation) TemplateIDs added in v0.4.0

func (m *ResourceMutation) TemplateIDs() (ids []object.ID)

TemplateIDs returns the "template" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TemplateID instead. It exists only for internal usage by the builders.

func (ResourceMutation) Tx added in v0.4.0

func (m ResourceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ResourceMutation) Type added in v0.4.0

func (m *ResourceMutation) Type() string

Type returns the node type of this mutation (Resource).

func (*ResourceMutation) TypeCleared added in v0.4.0

func (m *ResourceMutation) TypeCleared() bool

TypeCleared returns if the "type" field was cleared in this mutation.

func (*ResourceMutation) UpdateTime added in v0.4.0

func (m *ResourceMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*ResourceMutation) Where added in v0.4.0

func (m *ResourceMutation) Where(ps ...predicate.Resource)

Where appends a list predicates to the ResourceMutation builder.

func (*ResourceMutation) WhereP added in v0.4.0

func (m *ResourceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ResourceOutput added in v0.4.0

type ResourceOutput struct {
	ID                 object.ID               `json:"id,omitempty"`
	Name               string                  `json:"name,omitempty"`
	Description        string                  `json:"description,omitempty"`
	Labels             map[string]string       `json:"labels,omitempty"`
	CreateTime         *time.Time              `json:"createTime,omitempty"`
	UpdateTime         *time.Time              `json:"updateTime,omitempty"`
	Status             status.Status           `json:"status,omitempty"`
	Type               string                  `json:"type,omitempty"`
	Attributes         property.Values         `json:"attributes"`
	ComputedAttributes property.Values         `json:"computedAttributes"`
	Endpoints          types.ResourceEndpoints `json:"endpoints,cli-table-column,omitempty"`

	Project                        *ProjectOutput                        `json:"project,omitempty"`
	Environment                    *EnvironmentOutput                    `json:"environment,omitempty"`
	Template                       *TemplateVersionOutput                `json:"template,omitempty"`
	ResourceDefinitionMatchingRule *ResourceDefinitionMatchingRuleOutput `json:"resourceDefinitionMatchingRule,omitempty"`
	Runs                           []*ResourceRunOutput                  `json:"runs,omitempty"`
}

ResourceOutput holds the output of the Resource entity.

func ExposeResource added in v0.4.0

func ExposeResource(_r *Resource) *ResourceOutput

ExposeResource converts the Resource to ResourceOutput.

func ExposeResources added in v0.4.0

func ExposeResources(_rs []*Resource) []*ResourceOutput

ExposeResources converts the Resource slice to ResourceOutput pointer slice.

type ResourcePatchInput added in v0.5.0

type ResourcePatchInput struct {
	ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `path:"-" query:"-" json:"status,omitempty"`
	// Type of the resource referring to a resource definition type.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes,omitempty"`
	// Endpoints of the resource.
	Endpoints types.ResourceEndpoints `path:"-" query:"-" json:"endpoints,omitempty"`

	// Template indicates replacing the stale TemplateVersion entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template,omitempty"`
	// ResourceDefinition indicates replacing the stale ResourceDefinition entity.
	ResourceDefinition *ResourceDefinitionQueryInput `uri:"-" query:"-" json:"-"`
	// ResourceDefinitionMatchingRule indicates replacing the stale ResourceDefinitionMatchingRule entity.
	ResourceDefinitionMatchingRule *ResourceDefinitionMatchingRuleQueryInput `uri:"-" query:"-" json:"resourceDefinitionMatchingRule,omitempty"`
	// contains filtered or unexported fields
}

ResourcePatchInput holds the patch input of the Resource entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourcePatchInput) Model added in v0.5.0

func (rpi *ResourcePatchInput) Model() *Resource

Model returns the Resource patched entity, after validating.

func (*ResourcePatchInput) PatchModel added in v0.5.0

func (rpi *ResourcePatchInput) PatchModel() *Resource

PatchModel returns the Resource partition entity for patching.

func (*ResourcePatchInput) SetGinContext added in v0.5.0

func (ic *ResourcePatchInput) SetGinContext(ctx *gin.Context)

func (*ResourcePatchInput) SetModelClient added in v0.5.0

func (ic *ResourcePatchInput) SetModelClient(cli *Client)

func (*ResourcePatchInput) Validate added in v0.5.0

func (rpi *ResourcePatchInput) Validate() error

Validate checks the ResourcePatchInput entity.

func (*ResourcePatchInput) ValidateWith added in v0.5.0

func (rpi *ResourcePatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourcePatchInput entity with the given context and client set.

type ResourceQuery added in v0.4.0

type ResourceQuery struct {
	// contains filtered or unexported fields
}

ResourceQuery is the builder for querying Resource entities.

func (*ResourceQuery) Aggregate added in v0.4.0

func (rq *ResourceQuery) Aggregate(fns ...AggregateFunc) *ResourceSelect

Aggregate returns a ResourceSelect configured with the given aggregations.

func (*ResourceQuery) All added in v0.4.0

func (rq *ResourceQuery) All(ctx context.Context) ([]*Resource, error)

All executes the query and returns a list of Resources.

func (*ResourceQuery) AllX added in v0.4.0

func (rq *ResourceQuery) AllX(ctx context.Context) []*Resource

AllX is like All, but panics if an error occurs.

func (*ResourceQuery) Clone added in v0.4.0

func (rq *ResourceQuery) Clone() *ResourceQuery

Clone returns a duplicate of the ResourceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ResourceQuery) Count added in v0.4.0

func (rq *ResourceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ResourceQuery) CountX added in v0.4.0

func (rq *ResourceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ResourceQuery) ExecContext added in v0.4.0

func (c *ResourceQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceQuery) Exist added in v0.4.0

func (rq *ResourceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ResourceQuery) ExistX added in v0.4.0

func (rq *ResourceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ResourceQuery) First added in v0.4.0

func (rq *ResourceQuery) First(ctx context.Context) (*Resource, error)

First returns the first Resource entity from the query. Returns a *NotFoundError when no Resource was found.

func (*ResourceQuery) FirstID added in v0.4.0

func (rq *ResourceQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Resource ID from the query. Returns a *NotFoundError when no Resource ID was found.

func (*ResourceQuery) FirstIDX added in v0.4.0

func (rq *ResourceQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ResourceQuery) FirstX added in v0.4.0

func (rq *ResourceQuery) FirstX(ctx context.Context) *Resource

FirstX is like First, but panics if an error occurs.

func (*ResourceQuery) ForShare added in v0.4.0

func (rq *ResourceQuery) ForShare(opts ...sql.LockOption) *ResourceQuery

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 (*ResourceQuery) ForUpdate added in v0.4.0

func (rq *ResourceQuery) ForUpdate(opts ...sql.LockOption) *ResourceQuery

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 (*ResourceQuery) GroupBy added in v0.4.0

func (rq *ResourceQuery) GroupBy(field string, fields ...string) *ResourceGroupBy

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.Resource.Query().
	GroupBy(resource.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ResourceQuery) IDs added in v0.4.0

func (rq *ResourceQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Resource IDs.

func (*ResourceQuery) IDsX added in v0.4.0

func (rq *ResourceQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*ResourceQuery) Limit added in v0.4.0

func (rq *ResourceQuery) Limit(limit int) *ResourceQuery

Limit the number of records to be returned by this query.

func (*ResourceQuery) Modify added in v0.4.0

func (rq *ResourceQuery) Modify(modifiers ...func(s *sql.Selector)) *ResourceSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ResourceQuery) Offset added in v0.4.0

func (rq *ResourceQuery) Offset(offset int) *ResourceQuery

Offset to start from.

func (*ResourceQuery) Only added in v0.4.0

func (rq *ResourceQuery) Only(ctx context.Context) (*Resource, error)

Only returns a single Resource entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Resource entity is found. Returns a *NotFoundError when no Resource entities are found.

func (*ResourceQuery) OnlyID added in v0.4.0

func (rq *ResourceQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only Resource ID in the query. Returns a *NotSingularError when more than one Resource ID is found. Returns a *NotFoundError when no entities are found.

func (*ResourceQuery) OnlyIDX added in v0.4.0

func (rq *ResourceQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ResourceQuery) OnlyX added in v0.4.0

func (rq *ResourceQuery) OnlyX(ctx context.Context) *Resource

OnlyX is like Only, but panics if an error occurs.

func (*ResourceQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*ResourceQuery) QueryComponents added in v0.4.0

func (rq *ResourceQuery) QueryComponents() *ResourceComponentQuery

QueryComponents chains the current query on the "components" edge.

func (*ResourceQuery) QueryContext added in v0.4.0

func (c *ResourceQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceQuery) QueryDependencies added in v0.4.0

func (rq *ResourceQuery) QueryDependencies() *ResourceRelationshipQuery

QueryDependencies chains the current query on the "dependencies" edge.

func (*ResourceQuery) QueryEnvironment added in v0.4.0

func (rq *ResourceQuery) QueryEnvironment() *EnvironmentQuery

QueryEnvironment chains the current query on the "environment" edge.

func (*ResourceQuery) QueryProject added in v0.4.0

func (rq *ResourceQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*ResourceQuery) QueryResourceDefinition added in v0.4.0

func (rq *ResourceQuery) QueryResourceDefinition() *ResourceDefinitionQuery

QueryResourceDefinition chains the current query on the "resource_definition" edge.

func (*ResourceQuery) QueryResourceDefinitionMatchingRule added in v0.5.0

func (rq *ResourceQuery) QueryResourceDefinitionMatchingRule() *ResourceDefinitionMatchingRuleQuery

QueryResourceDefinitionMatchingRule chains the current query on the "resource_definition_matching_rule" edge.

func (*ResourceQuery) QueryRuns added in v0.6.0

func (rq *ResourceQuery) QueryRuns() *ResourceRunQuery

QueryRuns chains the current query on the "runs" edge.

func (*ResourceQuery) QueryState added in v0.6.0

func (rq *ResourceQuery) QueryState() *ResourceStateQuery

QueryState chains the current query on the "state" edge.

func (*ResourceQuery) QueryTemplate added in v0.4.0

func (rq *ResourceQuery) QueryTemplate() *TemplateVersionQuery

QueryTemplate chains the current query on the "template" edge.

func (*ResourceQuery) Select added in v0.4.0

func (rq *ResourceQuery) Select(fields ...string) *ResourceSelect

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.Resource.Query().
	Select(resource.FieldName).
	Scan(ctx, &v)

func (*ResourceQuery) Unique added in v0.4.0

func (rq *ResourceQuery) Unique(unique bool) *ResourceQuery

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 (*ResourceQuery) Where added in v0.4.0

func (rq *ResourceQuery) Where(ps ...predicate.Resource) *ResourceQuery

Where adds a new predicate for the ResourceQuery builder.

func (*ResourceQuery) WhereP added in v0.4.0

func (rq *ResourceQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ResourceQuery) WithComponents added in v0.4.0

func (rq *ResourceQuery) WithComponents(opts ...func(*ResourceComponentQuery)) *ResourceQuery

WithComponents tells the query-builder to eager-load the nodes that are connected to the "components" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceQuery) WithDependencies added in v0.4.0

func (rq *ResourceQuery) WithDependencies(opts ...func(*ResourceRelationshipQuery)) *ResourceQuery

WithDependencies tells the query-builder to eager-load the nodes that are connected to the "dependencies" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceQuery) WithEnvironment added in v0.4.0

func (rq *ResourceQuery) WithEnvironment(opts ...func(*EnvironmentQuery)) *ResourceQuery

WithEnvironment tells the query-builder to eager-load the nodes that are connected to the "environment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceQuery) WithProject added in v0.4.0

func (rq *ResourceQuery) WithProject(opts ...func(*ProjectQuery)) *ResourceQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceQuery) WithResourceDefinition added in v0.4.0

func (rq *ResourceQuery) WithResourceDefinition(opts ...func(*ResourceDefinitionQuery)) *ResourceQuery

WithResourceDefinition tells the query-builder to eager-load the nodes that are connected to the "resource_definition" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceQuery) WithResourceDefinitionMatchingRule added in v0.5.0

func (rq *ResourceQuery) WithResourceDefinitionMatchingRule(opts ...func(*ResourceDefinitionMatchingRuleQuery)) *ResourceQuery

WithResourceDefinitionMatchingRule tells the query-builder to eager-load the nodes that are connected to the "resource_definition_matching_rule" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceQuery) WithRuns added in v0.6.0

func (rq *ResourceQuery) WithRuns(opts ...func(*ResourceRunQuery)) *ResourceQuery

WithRuns tells the query-builder to eager-load the nodes that are connected to the "runs" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceQuery) WithState added in v0.6.0

func (rq *ResourceQuery) WithState(opts ...func(*ResourceStateQuery)) *ResourceQuery

WithState tells the query-builder to eager-load the nodes that are connected to the "state" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceQuery) WithTemplate added in v0.4.0

func (rq *ResourceQuery) WithTemplate(opts ...func(*TemplateVersionQuery)) *ResourceQuery

WithTemplate tells the query-builder to eager-load the nodes that are connected to the "template" edge. The optional arguments are used to configure the query builder of the edge.

type ResourceQueryInput added in v0.4.0

type ResourceQueryInput struct {

	// Project indicates to query Resource entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project"`
	// Environment indicates to query Resource entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"environment"`

	// Refer holds the route path reference of the Resource entity.
	Refer *object.Refer `path:"resource,default=" query:"-" json:"-"`
	// ID of the Resource entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Resource entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

ResourceQueryInput holds the query input of the Resource entity, please tags with `path:",inline"` if embedding.

func (*ResourceQueryInput) Model added in v0.4.0

func (rqi *ResourceQueryInput) Model() *Resource

Model returns the Resource entity for querying, after validating.

func (*ResourceQueryInput) SetGinContext added in v0.4.0

func (ic *ResourceQueryInput) SetGinContext(ctx *gin.Context)

func (*ResourceQueryInput) SetModelClient added in v0.4.0

func (ic *ResourceQueryInput) SetModelClient(cli *Client)

func (*ResourceQueryInput) Validate added in v0.4.0

func (rqi *ResourceQueryInput) Validate() error

Validate checks the ResourceQueryInput entity.

func (*ResourceQueryInput) ValidateWith added in v0.4.0

func (rqi *ResourceQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceQueryInput entity with the given context and client set.

type ResourceQueryInputs added in v0.4.0

type ResourceQueryInputs struct {

	// Project indicates to query Resource entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to query Resource entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Type of the resource referring to a resource definition type.
	Type string `path:"-" query:"type,omitempty" json:"-"`
	// contains filtered or unexported fields
}

ResourceQueryInputs holds the query input of the Resource entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ResourceQueryInputs) SetGinContext added in v0.4.0

func (ic *ResourceQueryInputs) SetGinContext(ctx *gin.Context)

func (*ResourceQueryInputs) SetModelClient added in v0.4.0

func (ic *ResourceQueryInputs) SetModelClient(cli *Client)

func (*ResourceQueryInputs) Validate added in v0.4.0

func (rqi *ResourceQueryInputs) Validate() error

Validate checks the ResourceQueryInputs entity.

func (*ResourceQueryInputs) ValidateWith added in v0.4.0

func (rqi *ResourceQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceQueryInputs entity with the given context and client set.

type ResourceRelationship added in v0.4.0

type ResourceRelationship struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// ID of the resource that deploys after the dependency finished.
	ResourceID object.ID `json:"resource_id,omitempty"`
	// ID of the resource that deploys before the resource begins.
	DependencyID object.ID `json:"dependency_id,omitempty"`
	// ID list of the resource includes all dependencies and the resource itself.
	Path []object.ID `json:"path,omitempty"`
	// Type of the relationship.
	Type string `json:"type,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ResourceRelationshipQuery when eager-loading is set.
	Edges ResourceRelationshipEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

ResourceRelationship is the model entity for the ResourceRelationship schema.

func (*ResourceRelationship) ExecContext added in v0.4.0

func (c *ResourceRelationship) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationship) QueryContext added in v0.4.0

func (c *ResourceRelationship) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationship) QueryDependency added in v0.4.0

func (rr *ResourceRelationship) QueryDependency() *ResourceQuery

QueryDependency queries the "dependency" edge of the ResourceRelationship entity.

func (*ResourceRelationship) QueryResource added in v0.4.0

func (rr *ResourceRelationship) QueryResource() *ResourceQuery

QueryResource queries the "resource" edge of the ResourceRelationship entity.

func (*ResourceRelationship) String added in v0.4.0

func (rr *ResourceRelationship) String() string

String implements the fmt.Stringer.

func (*ResourceRelationship) Unwrap added in v0.4.0

Unwrap unwraps the ResourceRelationship 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 (*ResourceRelationship) Update added in v0.4.0

Update returns a builder for updating this ResourceRelationship. Note that you need to call ResourceRelationship.Unwrap() before calling this method if this ResourceRelationship was returned from a transaction, and the transaction was committed or rolled back.

func (*ResourceRelationship) Value added in v0.4.0

func (rr *ResourceRelationship) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ResourceRelationship. This includes values selected through modifiers, order, etc.

func (*ResourceRelationship) View added in v0.4.0

View returns the output of ResourceRelationship entity.

type ResourceRelationshipClient added in v0.4.0

type ResourceRelationshipClient struct {
	// contains filtered or unexported fields
}

ResourceRelationshipClient is a client for the ResourceRelationship schema.

func NewResourceRelationshipClient added in v0.4.0

func NewResourceRelationshipClient(c config) *ResourceRelationshipClient

NewResourceRelationshipClient returns a client for the ResourceRelationship from the given config.

func (*ResourceRelationshipClient) Create added in v0.4.0

Create returns a builder for creating a ResourceRelationship entity.

func (*ResourceRelationshipClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of ResourceRelationship entities.

func (*ResourceRelationshipClient) Delete added in v0.4.0

Delete returns a delete builder for ResourceRelationship.

func (*ResourceRelationshipClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*ResourceRelationshipClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ResourceRelationshipClient) ExecContext added in v0.4.0

func (c *ResourceRelationshipClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationshipClient) Get added in v0.4.0

Get returns a ResourceRelationship entity by its id.

func (*ResourceRelationshipClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*ResourceRelationshipClient) Hooks added in v0.4.0

func (c *ResourceRelationshipClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ResourceRelationshipClient) Intercept added in v0.4.0

func (c *ResourceRelationshipClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `resourcerelationship.Intercept(f(g(h())))`.

func (*ResourceRelationshipClient) Interceptors added in v0.4.0

func (c *ResourceRelationshipClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ResourceRelationshipClient) MapCreateBulk added in v0.5.0

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 (*ResourceRelationshipClient) Query added in v0.4.0

Query returns a query builder for ResourceRelationship.

func (*ResourceRelationshipClient) QueryContext added in v0.4.0

func (c *ResourceRelationshipClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationshipClient) QueryDependency added in v0.4.0

QueryDependency queries the dependency edge of a ResourceRelationship.

func (*ResourceRelationshipClient) QueryResource added in v0.4.0

QueryResource queries the resource edge of a ResourceRelationship.

func (*ResourceRelationshipClient) Update added in v0.4.0

Update returns an update builder for ResourceRelationship.

func (*ResourceRelationshipClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*ResourceRelationshipClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*ResourceRelationshipClient) Use added in v0.4.0

func (c *ResourceRelationshipClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resourcerelationship.Hooks(f(g(h())))`.

type ResourceRelationshipClientGetter added in v0.4.0

type ResourceRelationshipClientGetter interface {
	// ResourceRelationships returns the client for interacting with the ResourceRelationship builders.
	ResourceRelationships() *ResourceRelationshipClient
}

ResourceRelationshipClientGetter is an interface that allows getting ResourceRelationshipClient.

type ResourceRelationshipCreate added in v0.4.0

type ResourceRelationshipCreate struct {
	// contains filtered or unexported fields
}

ResourceRelationshipCreate is the builder for creating a ResourceRelationship entity.

func (*ResourceRelationshipCreate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceRelationshipCreate) ExecContext added in v0.4.0

func (c *ResourceRelationshipCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationshipCreate) ExecE added in v0.4.0

func (rrc *ResourceRelationshipCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRelationship) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceRelationshipCreate) ExecEX added in v0.4.0

func (rrc *ResourceRelationshipCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRelationship) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceRelationshipCreate) ExecX added in v0.4.0

func (rrc *ResourceRelationshipCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRelationshipCreate) Mutation added in v0.4.0

Mutation returns the ResourceRelationshipMutation object of the builder.

func (*ResourceRelationshipCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceRelationship.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceRelationshipUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceRelationshipCreate) OnConflictColumns added in v0.4.0

func (rrc *ResourceRelationshipCreate) OnConflictColumns(columns ...string) *ResourceRelationshipUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceRelationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceRelationshipCreate) QueryContext added in v0.4.0

func (c *ResourceRelationshipCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationshipCreate) Save added in v0.4.0

Save creates the ResourceRelationship in the database.

func (*ResourceRelationshipCreate) SaveE added in v0.4.0

SaveE calls the given function after created the ResourceRelationship entity, which is always good for cascading create operations.

func (*ResourceRelationshipCreate) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceRelationshipCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*ResourceRelationshipCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceRelationshipCreate) SetCreateTime added in v0.4.0

SetCreateTime sets the "create_time" field.

func (*ResourceRelationshipCreate) SetDependency added in v0.4.0

SetDependency sets the "dependency" edge to the Resource entity.

func (*ResourceRelationshipCreate) SetDependencyID added in v0.4.0

SetDependencyID sets the "dependency_id" field.

func (*ResourceRelationshipCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*ResourceRelationshipCreate) SetNillableCreateTime added in v0.4.0

func (rrc *ResourceRelationshipCreate) SetNillableCreateTime(t *time.Time) *ResourceRelationshipCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ResourceRelationshipCreate) SetPath added in v0.4.0

SetPath sets the "path" field.

func (*ResourceRelationshipCreate) SetResource added in v0.4.0

SetResource sets the "resource" edge to the Resource entity.

func (*ResourceRelationshipCreate) SetResourceID added in v0.4.0

SetResourceID sets the "resource_id" field.

func (*ResourceRelationshipCreate) SetType added in v0.4.0

SetType sets the "type" field.

type ResourceRelationshipCreateBulk added in v0.4.0

type ResourceRelationshipCreateBulk struct {
	// contains filtered or unexported fields
}

ResourceRelationshipCreateBulk is the builder for creating many ResourceRelationship entities in bulk.

func (*ResourceRelationshipCreateBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceRelationshipCreateBulk) ExecContext added in v0.4.0

func (c *ResourceRelationshipCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationshipCreateBulk) ExecE added in v0.4.0

func (rrcb *ResourceRelationshipCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRelationship) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceRelationshipCreateBulk) ExecEX added in v0.4.0

func (rrcb *ResourceRelationshipCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRelationship) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceRelationshipCreateBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRelationshipCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceRelationship.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceRelationshipUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceRelationshipCreateBulk) OnConflictColumns added in v0.4.0

func (rrcb *ResourceRelationshipCreateBulk) OnConflictColumns(columns ...string) *ResourceRelationshipUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceRelationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceRelationshipCreateBulk) QueryContext added in v0.4.0

func (c *ResourceRelationshipCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationshipCreateBulk) Save added in v0.4.0

Save creates the ResourceRelationship entities in the database.

func (*ResourceRelationshipCreateBulk) SaveE added in v0.4.0

SaveE calls the given function after created the ResourceRelationship entities, which is always good for cascading create operations.

func (*ResourceRelationshipCreateBulk) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceRelationshipCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceRelationshipCreateBulk) Set added in v0.4.0

Set leverages the ResourceRelationshipCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ResourceRelationshipCreateInput added in v0.4.0

type ResourceRelationshipCreateInput struct {

	// Dependency specifies full inserting the new Resource entity of the ResourceRelationship entity.
	Dependency *ResourceQueryInput `uri:"-" query:"-" json:"dependency"`
	// contains filtered or unexported fields
}

ResourceRelationshipCreateInput holds the creation input of the ResourceRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRelationshipCreateInput) Model added in v0.4.0

Model returns the ResourceRelationship entity for creating, after validating.

func (*ResourceRelationshipCreateInput) SetGinContext added in v0.4.0

func (ic *ResourceRelationshipCreateInput) SetGinContext(ctx *gin.Context)

func (*ResourceRelationshipCreateInput) SetModelClient added in v0.4.0

func (ic *ResourceRelationshipCreateInput) SetModelClient(cli *Client)

func (*ResourceRelationshipCreateInput) Validate added in v0.4.0

func (rrci *ResourceRelationshipCreateInput) Validate() error

Validate checks the ResourceRelationshipCreateInput entity.

func (*ResourceRelationshipCreateInput) ValidateWith added in v0.4.0

func (rrci *ResourceRelationshipCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipCreateInput entity with the given context and client set.

type ResourceRelationshipCreateInputs added in v0.4.0

type ResourceRelationshipCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceRelationshipCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceRelationshipCreateInputs holds the creation input of the ResourceRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRelationshipCreateInputs) Model added in v0.4.0

Model returns the ResourceRelationship entities for creating, after validating.

func (*ResourceRelationshipCreateInputs) SetGinContext added in v0.4.0

func (ic *ResourceRelationshipCreateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceRelationshipCreateInputs) SetModelClient added in v0.4.0

func (ic *ResourceRelationshipCreateInputs) SetModelClient(cli *Client)

func (*ResourceRelationshipCreateInputs) Validate added in v0.4.0

func (rrci *ResourceRelationshipCreateInputs) Validate() error

Validate checks the ResourceRelationshipCreateInputs entity .

func (*ResourceRelationshipCreateInputs) ValidateWith added in v0.4.0

func (rrci *ResourceRelationshipCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipCreateInputs entity with the given context and client set.

type ResourceRelationshipCreateInputsItem added in v0.4.0

type ResourceRelationshipCreateInputsItem struct {

	// Dependency specifies full inserting the new Resource entity.
	Dependency *ResourceQueryInput `uri:"-" query:"-" json:"dependency"`
}

ResourceRelationshipCreateInputs holds the creation input item of the ResourceRelationship entities.

func (*ResourceRelationshipCreateInputsItem) ValidateWith added in v0.4.0

func (rrci *ResourceRelationshipCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipCreateInputsItem entity with the given context and client set.

type ResourceRelationshipDelete added in v0.4.0

type ResourceRelationshipDelete struct {
	// contains filtered or unexported fields
}

ResourceRelationshipDelete is the builder for deleting a ResourceRelationship entity.

func (*ResourceRelationshipDelete) Exec added in v0.4.0

Exec executes the deletion query and returns how many vertices were deleted.

func (*ResourceRelationshipDelete) ExecContext added in v0.4.0

func (c *ResourceRelationshipDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationshipDelete) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRelationshipDelete) QueryContext added in v0.4.0

func (c *ResourceRelationshipDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationshipDelete) Where added in v0.4.0

Where appends a list predicates to the ResourceRelationshipDelete builder.

type ResourceRelationshipDeleteInput added in v0.4.0

type ResourceRelationshipDeleteInput struct {
	ResourceRelationshipQueryInput `path:",inline"`
}

ResourceRelationshipDeleteInput holds the deletion input of the ResourceRelationship entity, please tags with `path:",inline"` if embedding.

func (*ResourceRelationshipDeleteInput) SetGinContext added in v0.4.0

func (ic *ResourceRelationshipDeleteInput) SetGinContext(ctx *gin.Context)

func (*ResourceRelationshipDeleteInput) SetModelClient added in v0.4.0

func (ic *ResourceRelationshipDeleteInput) SetModelClient(cli *Client)

type ResourceRelationshipDeleteInputs added in v0.4.0

type ResourceRelationshipDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceRelationshipDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceRelationshipDeleteInputs holds the deletion input of the ResourceRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRelationshipDeleteInputs) IDs added in v0.4.0

IDs returns the ID list of the ResourceRelationship entities for deleting, after validating.

func (*ResourceRelationshipDeleteInputs) Model added in v0.4.0

Model returns the ResourceRelationship entities for deleting, after validating.

func (*ResourceRelationshipDeleteInputs) SetGinContext added in v0.4.0

func (ic *ResourceRelationshipDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ResourceRelationshipDeleteInputs) SetModelClient added in v0.4.0

func (ic *ResourceRelationshipDeleteInputs) SetModelClient(cli *Client)

func (*ResourceRelationshipDeleteInputs) Validate added in v0.4.0

func (rrdi *ResourceRelationshipDeleteInputs) Validate() error

Validate checks the ResourceRelationshipDeleteInputs entity.

func (*ResourceRelationshipDeleteInputs) ValidateWith added in v0.4.0

func (rrdi *ResourceRelationshipDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipDeleteInputs entity with the given context and client set.

type ResourceRelationshipDeleteInputsItem added in v0.4.0

type ResourceRelationshipDeleteInputsItem struct {
	// ID of the ResourceRelationship entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

ResourceRelationshipDeleteInputs holds the deletion input item of the ResourceRelationship entities.

type ResourceRelationshipDeleteOne added in v0.4.0

type ResourceRelationshipDeleteOne struct {
	// contains filtered or unexported fields
}

ResourceRelationshipDeleteOne is the builder for deleting a single ResourceRelationship entity.

func (*ResourceRelationshipDeleteOne) Exec added in v0.4.0

Exec executes the deletion query.

func (*ResourceRelationshipDeleteOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRelationshipDeleteOne) Where added in v0.4.0

Where appends a list predicates to the ResourceRelationshipDelete builder.

type ResourceRelationshipEdges added in v0.4.0

type ResourceRelationshipEdges struct {
	// Resource to which it currently belongs.
	Resource *Resource `json:"resource,omitempty"`
	// Resource to which the dependency belongs.
	Dependency *Resource `json:"dependency,omitempty"`
	// contains filtered or unexported fields
}

ResourceRelationshipEdges holds the relations/edges for other nodes in the graph.

func (ResourceRelationshipEdges) DependencyOrErr added in v0.4.0

func (e ResourceRelationshipEdges) DependencyOrErr() (*Resource, error)

DependencyOrErr returns the Dependency value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceRelationshipEdges) ResourceOrErr added in v0.4.0

func (e ResourceRelationshipEdges) ResourceOrErr() (*Resource, error)

ResourceOrErr returns the Resource value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ResourceRelationshipGroupBy added in v0.4.0

type ResourceRelationshipGroupBy struct {
	// contains filtered or unexported fields
}

ResourceRelationshipGroupBy is the group-by builder for ResourceRelationship entities.

func (*ResourceRelationshipGroupBy) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the group-by query.

func (*ResourceRelationshipGroupBy) Bool added in v0.4.0

func (s *ResourceRelationshipGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipGroupBy) BoolX added in v0.4.0

func (s *ResourceRelationshipGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceRelationshipGroupBy) Bools added in v0.4.0

func (s *ResourceRelationshipGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipGroupBy) BoolsX added in v0.4.0

func (s *ResourceRelationshipGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ResourceRelationshipGroupBy) Float64 added in v0.4.0

func (s *ResourceRelationshipGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipGroupBy) Float64X added in v0.4.0

func (s *ResourceRelationshipGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceRelationshipGroupBy) Float64s added in v0.4.0

func (s *ResourceRelationshipGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipGroupBy) Float64sX added in v0.4.0

func (s *ResourceRelationshipGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceRelationshipGroupBy) Int added in v0.4.0

func (s *ResourceRelationshipGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipGroupBy) IntX added in v0.4.0

func (s *ResourceRelationshipGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceRelationshipGroupBy) Ints added in v0.4.0

func (s *ResourceRelationshipGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipGroupBy) IntsX added in v0.4.0

func (s *ResourceRelationshipGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceRelationshipGroupBy) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*ResourceRelationshipGroupBy) ScanX added in v0.4.0

func (s *ResourceRelationshipGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceRelationshipGroupBy) String added in v0.4.0

func (s *ResourceRelationshipGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipGroupBy) StringX added in v0.4.0

func (s *ResourceRelationshipGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceRelationshipGroupBy) Strings added in v0.4.0

func (s *ResourceRelationshipGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipGroupBy) StringsX added in v0.4.0

func (s *ResourceRelationshipGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceRelationshipMutation added in v0.4.0

type ResourceRelationshipMutation struct {
	// contains filtered or unexported fields
}

ResourceRelationshipMutation represents an operation that mutates the ResourceRelationship nodes in the graph.

func (*ResourceRelationshipMutation) AddField added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) AddedEdges added in v0.4.0

func (m *ResourceRelationshipMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ResourceRelationshipMutation) AddedField added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) AddedFields added in v0.4.0

func (m *ResourceRelationshipMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ResourceRelationshipMutation) AddedIDs added in v0.4.0

func (m *ResourceRelationshipMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ResourceRelationshipMutation) AppendPath added in v0.4.0

func (m *ResourceRelationshipMutation) AppendPath(o []object.ID)

AppendPath adds o to the "path" field.

func (*ResourceRelationshipMutation) AppendedPath added in v0.4.0

func (m *ResourceRelationshipMutation) AppendedPath() ([]object.ID, bool)

AppendedPath returns the list of values that were appended to the "path" field in this mutation.

func (*ResourceRelationshipMutation) ClearDependency added in v0.4.0

func (m *ResourceRelationshipMutation) ClearDependency()

ClearDependency clears the "dependency" edge to the Resource entity.

func (*ResourceRelationshipMutation) ClearEdge added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) ClearField added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) ClearResource added in v0.4.0

func (m *ResourceRelationshipMutation) ClearResource()

ClearResource clears the "resource" edge to the Resource entity.

func (*ResourceRelationshipMutation) ClearedEdges added in v0.4.0

func (m *ResourceRelationshipMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ResourceRelationshipMutation) ClearedFields added in v0.4.0

func (m *ResourceRelationshipMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ResourceRelationshipMutation) Client added in v0.4.0

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 (*ResourceRelationshipMutation) CreateTime added in v0.4.0

func (m *ResourceRelationshipMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ResourceRelationshipMutation) DependencyCleared added in v0.4.0

func (m *ResourceRelationshipMutation) DependencyCleared() bool

DependencyCleared reports if the "dependency" edge to the Resource entity was cleared.

func (*ResourceRelationshipMutation) DependencyID added in v0.4.0

func (m *ResourceRelationshipMutation) DependencyID() (r object.ID, exists bool)

DependencyID returns the value of the "dependency_id" field in the mutation.

func (*ResourceRelationshipMutation) DependencyIDs added in v0.4.0

func (m *ResourceRelationshipMutation) DependencyIDs() (ids []object.ID)

DependencyIDs returns the "dependency" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DependencyID instead. It exists only for internal usage by the builders.

func (*ResourceRelationshipMutation) EdgeCleared added in v0.4.0

func (m *ResourceRelationshipMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ResourceRelationshipMutation) ExecContext added in v0.4.0

func (c *ResourceRelationshipMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationshipMutation) Field added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) FieldCleared added in v0.4.0

func (m *ResourceRelationshipMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ResourceRelationshipMutation) Fields added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) GetType added in v0.4.0

func (m *ResourceRelationshipMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ResourceRelationshipMutation) ID added in v0.4.0

func (m *ResourceRelationshipMutation) ID() (id object.ID, 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 (*ResourceRelationshipMutation) IDs added in v0.4.0

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 (*ResourceRelationshipMutation) OldCreateTime added in v0.4.0

func (m *ResourceRelationshipMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ResourceRelationship entity. If the ResourceRelationship 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 (*ResourceRelationshipMutation) OldDependencyID added in v0.4.0

func (m *ResourceRelationshipMutation) OldDependencyID(ctx context.Context) (v object.ID, err error)

OldDependencyID returns the old "dependency_id" field's value of the ResourceRelationship entity. If the ResourceRelationship 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 (*ResourceRelationshipMutation) OldField added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) OldPath added in v0.4.0

func (m *ResourceRelationshipMutation) OldPath(ctx context.Context) (v []object.ID, err error)

OldPath returns the old "path" field's value of the ResourceRelationship entity. If the ResourceRelationship 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 (*ResourceRelationshipMutation) OldResourceID added in v0.4.0

func (m *ResourceRelationshipMutation) OldResourceID(ctx context.Context) (v object.ID, err error)

OldResourceID returns the old "resource_id" field's value of the ResourceRelationship entity. If the ResourceRelationship 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 (*ResourceRelationshipMutation) OldType added in v0.4.0

func (m *ResourceRelationshipMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the ResourceRelationship entity. If the ResourceRelationship 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 (*ResourceRelationshipMutation) Op added in v0.4.0

Op returns the operation name.

func (*ResourceRelationshipMutation) Path added in v0.4.0

func (m *ResourceRelationshipMutation) Path() (r []object.ID, exists bool)

Path returns the value of the "path" field in the mutation.

func (*ResourceRelationshipMutation) QueryContext added in v0.4.0

func (c *ResourceRelationshipMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationshipMutation) RemovedEdges added in v0.4.0

func (m *ResourceRelationshipMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ResourceRelationshipMutation) RemovedIDs added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) ResetCreateTime added in v0.4.0

func (m *ResourceRelationshipMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ResourceRelationshipMutation) ResetDependency added in v0.4.0

func (m *ResourceRelationshipMutation) ResetDependency()

ResetDependency resets all changes to the "dependency" edge.

func (*ResourceRelationshipMutation) ResetDependencyID added in v0.4.0

func (m *ResourceRelationshipMutation) ResetDependencyID()

ResetDependencyID resets all changes to the "dependency_id" field.

func (*ResourceRelationshipMutation) ResetEdge added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) ResetField added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) ResetPath added in v0.4.0

func (m *ResourceRelationshipMutation) ResetPath()

ResetPath resets all changes to the "path" field.

func (*ResourceRelationshipMutation) ResetResource added in v0.4.0

func (m *ResourceRelationshipMutation) ResetResource()

ResetResource resets all changes to the "resource" edge.

func (*ResourceRelationshipMutation) ResetResourceID added in v0.4.0

func (m *ResourceRelationshipMutation) ResetResourceID()

ResetResourceID resets all changes to the "resource_id" field.

func (*ResourceRelationshipMutation) ResetType added in v0.4.0

func (m *ResourceRelationshipMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ResourceRelationshipMutation) ResourceCleared added in v0.4.0

func (m *ResourceRelationshipMutation) ResourceCleared() bool

ResourceCleared reports if the "resource" edge to the Resource entity was cleared.

func (*ResourceRelationshipMutation) ResourceID added in v0.4.0

func (m *ResourceRelationshipMutation) ResourceID() (r object.ID, exists bool)

ResourceID returns the value of the "resource_id" field in the mutation.

func (*ResourceRelationshipMutation) ResourceIDs added in v0.4.0

func (m *ResourceRelationshipMutation) ResourceIDs() (ids []object.ID)

ResourceIDs returns the "resource" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ResourceID instead. It exists only for internal usage by the builders.

func (*ResourceRelationshipMutation) SetCreateTime added in v0.4.0

func (m *ResourceRelationshipMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ResourceRelationshipMutation) SetDependencyID added in v0.4.0

func (m *ResourceRelationshipMutation) SetDependencyID(o object.ID)

SetDependencyID sets the "dependency_id" field.

func (*ResourceRelationshipMutation) SetField added in v0.4.0

func (m *ResourceRelationshipMutation) 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 (*ResourceRelationshipMutation) SetID added in v0.4.0

func (m *ResourceRelationshipMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ResourceRelationship entities.

func (*ResourceRelationshipMutation) SetOp added in v0.4.0

func (m *ResourceRelationshipMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ResourceRelationshipMutation) SetPath added in v0.4.0

func (m *ResourceRelationshipMutation) SetPath(o []object.ID)

SetPath sets the "path" field.

func (*ResourceRelationshipMutation) SetResourceID added in v0.4.0

func (m *ResourceRelationshipMutation) SetResourceID(o object.ID)

SetResourceID sets the "resource_id" field.

func (*ResourceRelationshipMutation) SetType added in v0.4.0

func (m *ResourceRelationshipMutation) SetType(s string)

SetType sets the "type" field.

func (ResourceRelationshipMutation) Tx added in v0.4.0

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ResourceRelationshipMutation) Type added in v0.4.0

Type returns the node type of this mutation (ResourceRelationship).

func (*ResourceRelationshipMutation) Where added in v0.4.0

Where appends a list predicates to the ResourceRelationshipMutation builder.

func (*ResourceRelationshipMutation) WhereP added in v0.4.0

func (m *ResourceRelationshipMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceRelationshipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ResourceRelationshipOutput added in v0.4.0

type ResourceRelationshipOutput struct {
	ID         object.ID   `json:"id,omitempty"`
	CreateTime *time.Time  `json:"createTime,omitempty"`
	Path       []object.ID `json:"path,omitempty"`
	Type       string      `json:"type,omitempty"`

	Dependency *ResourceOutput `json:"dependency,omitempty"`
}

ResourceRelationshipOutput holds the output of the ResourceRelationship entity.

func ExposeResourceRelationship added in v0.4.0

func ExposeResourceRelationship(_rr *ResourceRelationship) *ResourceRelationshipOutput

ExposeResourceRelationship converts the ResourceRelationship to ResourceRelationshipOutput.

func ExposeResourceRelationships added in v0.4.0

func ExposeResourceRelationships(_rrs []*ResourceRelationship) []*ResourceRelationshipOutput

ExposeResourceRelationships converts the ResourceRelationship slice to ResourceRelationshipOutput pointer slice.

type ResourceRelationshipPatchInput added in v0.5.0

type ResourceRelationshipPatchInput struct {
	ResourceRelationshipQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// ID list of the resource includes all dependencies and the resource itself.
	Path []object.ID `path:"-" query:"-" json:"path,omitempty"`
	// Type of the relationship.
	Type string `path:"-" query:"-" json:"type,omitempty"`

	// Dependency indicates replacing the stale Resource entity.
	Dependency *ResourceQueryInput `uri:"-" query:"-" json:"dependency"`
	// contains filtered or unexported fields
}

ResourceRelationshipPatchInput holds the patch input of the ResourceRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRelationshipPatchInput) Model added in v0.5.0

Model returns the ResourceRelationship patched entity, after validating.

func (*ResourceRelationshipPatchInput) PatchModel added in v0.5.0

PatchModel returns the ResourceRelationship partition entity for patching.

func (*ResourceRelationshipPatchInput) SetGinContext added in v0.5.0

func (ic *ResourceRelationshipPatchInput) SetGinContext(ctx *gin.Context)

func (*ResourceRelationshipPatchInput) SetModelClient added in v0.5.0

func (ic *ResourceRelationshipPatchInput) SetModelClient(cli *Client)

func (*ResourceRelationshipPatchInput) Validate added in v0.5.0

func (rrpi *ResourceRelationshipPatchInput) Validate() error

Validate checks the ResourceRelationshipPatchInput entity.

func (*ResourceRelationshipPatchInput) ValidateWith added in v0.5.0

func (rrpi *ResourceRelationshipPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipPatchInput entity with the given context and client set.

type ResourceRelationshipQuery added in v0.4.0

type ResourceRelationshipQuery struct {
	// contains filtered or unexported fields
}

ResourceRelationshipQuery is the builder for querying ResourceRelationship entities.

func (*ResourceRelationshipQuery) Aggregate added in v0.4.0

Aggregate returns a ResourceRelationshipSelect configured with the given aggregations.

func (*ResourceRelationshipQuery) All added in v0.4.0

All executes the query and returns a list of ResourceRelationships.

func (*ResourceRelationshipQuery) AllX added in v0.4.0

AllX is like All, but panics if an error occurs.

func (*ResourceRelationshipQuery) Clone added in v0.4.0

Clone returns a duplicate of the ResourceRelationshipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ResourceRelationshipQuery) Count added in v0.4.0

func (rrq *ResourceRelationshipQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ResourceRelationshipQuery) CountX added in v0.4.0

func (rrq *ResourceRelationshipQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ResourceRelationshipQuery) ExecContext added in v0.4.0

func (c *ResourceRelationshipQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationshipQuery) Exist added in v0.4.0

func (rrq *ResourceRelationshipQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ResourceRelationshipQuery) ExistX added in v0.4.0

func (rrq *ResourceRelationshipQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ResourceRelationshipQuery) First added in v0.4.0

First returns the first ResourceRelationship entity from the query. Returns a *NotFoundError when no ResourceRelationship was found.

func (*ResourceRelationshipQuery) FirstID added in v0.4.0

func (rrq *ResourceRelationshipQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first ResourceRelationship ID from the query. Returns a *NotFoundError when no ResourceRelationship ID was found.

func (*ResourceRelationshipQuery) FirstIDX added in v0.4.0

func (rrq *ResourceRelationshipQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ResourceRelationshipQuery) FirstX added in v0.4.0

FirstX is like First, but panics if an error occurs.

func (*ResourceRelationshipQuery) ForShare added in v0.4.0

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 (*ResourceRelationshipQuery) ForUpdate added in v0.4.0

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 (*ResourceRelationshipQuery) GroupBy added in v0.4.0

func (rrq *ResourceRelationshipQuery) GroupBy(field string, fields ...string) *ResourceRelationshipGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ResourceRelationship.Query().
	GroupBy(resourcerelationship.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ResourceRelationshipQuery) IDs added in v0.4.0

func (rrq *ResourceRelationshipQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of ResourceRelationship IDs.

func (*ResourceRelationshipQuery) IDsX added in v0.4.0

IDsX is like IDs, but panics if an error occurs.

func (*ResourceRelationshipQuery) Limit added in v0.4.0

Limit the number of records to be returned by this query.

func (*ResourceRelationshipQuery) Modify added in v0.4.0

func (rrq *ResourceRelationshipQuery) Modify(modifiers ...func(s *sql.Selector)) *ResourceRelationshipSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ResourceRelationshipQuery) Offset added in v0.4.0

Offset to start from.

func (*ResourceRelationshipQuery) Only added in v0.4.0

Only returns a single ResourceRelationship entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ResourceRelationship entity is found. Returns a *NotFoundError when no ResourceRelationship entities are found.

func (*ResourceRelationshipQuery) OnlyID added in v0.4.0

func (rrq *ResourceRelationshipQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only ResourceRelationship ID in the query. Returns a *NotSingularError when more than one ResourceRelationship ID is found. Returns a *NotFoundError when no entities are found.

func (*ResourceRelationshipQuery) OnlyIDX added in v0.4.0

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ResourceRelationshipQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*ResourceRelationshipQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*ResourceRelationshipQuery) QueryContext added in v0.4.0

func (c *ResourceRelationshipQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationshipQuery) QueryDependency added in v0.4.0

func (rrq *ResourceRelationshipQuery) QueryDependency() *ResourceQuery

QueryDependency chains the current query on the "dependency" edge.

func (*ResourceRelationshipQuery) QueryResource added in v0.4.0

func (rrq *ResourceRelationshipQuery) QueryResource() *ResourceQuery

QueryResource chains the current query on the "resource" edge.

func (*ResourceRelationshipQuery) Select added in v0.4.0

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.ResourceRelationship.Query().
	Select(resourcerelationship.FieldCreateTime).
	Scan(ctx, &v)

func (*ResourceRelationshipQuery) Unique added in v0.4.0

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 (*ResourceRelationshipQuery) Where added in v0.4.0

Where adds a new predicate for the ResourceRelationshipQuery builder.

func (*ResourceRelationshipQuery) WhereP added in v0.4.0

func (rrq *ResourceRelationshipQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceRelationshipQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ResourceRelationshipQuery) WithDependency added in v0.4.0

func (rrq *ResourceRelationshipQuery) WithDependency(opts ...func(*ResourceQuery)) *ResourceRelationshipQuery

WithDependency tells the query-builder to eager-load the nodes that are connected to the "dependency" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceRelationshipQuery) WithResource added in v0.4.0

func (rrq *ResourceRelationshipQuery) WithResource(opts ...func(*ResourceQuery)) *ResourceRelationshipQuery

WithResource tells the query-builder to eager-load the nodes that are connected to the "resource" edge. The optional arguments are used to configure the query builder of the edge.

type ResourceRelationshipQueryInput added in v0.4.0

type ResourceRelationshipQueryInput struct {

	// Refer holds the route path reference of the ResourceRelationship entity.
	Refer *object.Refer `path:"resourcerelationship,default=" query:"-" json:"-"`
	// ID of the ResourceRelationship entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

ResourceRelationshipQueryInput holds the query input of the ResourceRelationship entity, please tags with `path:",inline"` if embedding.

func (*ResourceRelationshipQueryInput) Model added in v0.4.0

Model returns the ResourceRelationship entity for querying, after validating.

func (*ResourceRelationshipQueryInput) SetGinContext added in v0.4.0

func (ic *ResourceRelationshipQueryInput) SetGinContext(ctx *gin.Context)

func (*ResourceRelationshipQueryInput) SetModelClient added in v0.4.0

func (ic *ResourceRelationshipQueryInput) SetModelClient(cli *Client)

func (*ResourceRelationshipQueryInput) Validate added in v0.4.0

func (rrqi *ResourceRelationshipQueryInput) Validate() error

Validate checks the ResourceRelationshipQueryInput entity.

func (*ResourceRelationshipQueryInput) ValidateWith added in v0.4.0

func (rrqi *ResourceRelationshipQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipQueryInput entity with the given context and client set.

type ResourceRelationshipQueryInputs added in v0.4.0

type ResourceRelationshipQueryInputs struct {
	// contains filtered or unexported fields
}

ResourceRelationshipQueryInputs holds the query input of the ResourceRelationship entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ResourceRelationshipQueryInputs) SetGinContext added in v0.4.0

func (ic *ResourceRelationshipQueryInputs) SetGinContext(ctx *gin.Context)

func (*ResourceRelationshipQueryInputs) SetModelClient added in v0.4.0

func (ic *ResourceRelationshipQueryInputs) SetModelClient(cli *Client)

func (*ResourceRelationshipQueryInputs) Validate added in v0.4.0

func (rrqi *ResourceRelationshipQueryInputs) Validate() error

Validate checks the ResourceRelationshipQueryInputs entity.

func (*ResourceRelationshipQueryInputs) ValidateWith added in v0.4.0

func (rrqi *ResourceRelationshipQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipQueryInputs entity with the given context and client set.

type ResourceRelationshipSelect added in v0.4.0

type ResourceRelationshipSelect struct {
	*ResourceRelationshipQuery
	// contains filtered or unexported fields
}

ResourceRelationshipSelect is the builder for selecting fields of ResourceRelationship entities.

func (*ResourceRelationshipSelect) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the selector query.

func (*ResourceRelationshipSelect) Bool added in v0.4.0

func (s *ResourceRelationshipSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipSelect) BoolX added in v0.4.0

func (s *ResourceRelationshipSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceRelationshipSelect) Bools added in v0.4.0

func (s *ResourceRelationshipSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipSelect) BoolsX added in v0.4.0

func (s *ResourceRelationshipSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ResourceRelationshipSelect) ExecContext added in v0.4.0

func (c ResourceRelationshipSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationshipSelect) Float64 added in v0.4.0

func (s *ResourceRelationshipSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipSelect) Float64X added in v0.4.0

func (s *ResourceRelationshipSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceRelationshipSelect) Float64s added in v0.4.0

func (s *ResourceRelationshipSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipSelect) Float64sX added in v0.4.0

func (s *ResourceRelationshipSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceRelationshipSelect) Int added in v0.4.0

func (s *ResourceRelationshipSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipSelect) IntX added in v0.4.0

func (s *ResourceRelationshipSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceRelationshipSelect) Ints added in v0.4.0

func (s *ResourceRelationshipSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipSelect) IntsX added in v0.4.0

func (s *ResourceRelationshipSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceRelationshipSelect) Modify added in v0.4.0

func (rrs *ResourceRelationshipSelect) Modify(modifiers ...func(s *sql.Selector)) *ResourceRelationshipSelect

Modify adds a query modifier for attaching custom logic to queries.

func (ResourceRelationshipSelect) QueryContext added in v0.4.0

func (c ResourceRelationshipSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationshipSelect) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*ResourceRelationshipSelect) ScanX added in v0.4.0

func (s *ResourceRelationshipSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceRelationshipSelect) String added in v0.4.0

func (s *ResourceRelationshipSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipSelect) StringX added in v0.4.0

func (s *ResourceRelationshipSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceRelationshipSelect) Strings added in v0.4.0

func (s *ResourceRelationshipSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceRelationshipSelect) StringsX added in v0.4.0

func (s *ResourceRelationshipSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceRelationshipUpdate added in v0.4.0

type ResourceRelationshipUpdate struct {
	// contains filtered or unexported fields
}

ResourceRelationshipUpdate is the builder for updating ResourceRelationship entities.

func (*ResourceRelationshipUpdate) Exec added in v0.4.0

Exec executes the query.

func (*ResourceRelationshipUpdate) ExecContext added in v0.4.0

func (c *ResourceRelationshipUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationshipUpdate) ExecX added in v0.4.0

func (rru *ResourceRelationshipUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRelationshipUpdate) Modify added in v0.4.0

func (rru *ResourceRelationshipUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceRelationshipUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceRelationshipUpdate) Mutation added in v0.4.0

Mutation returns the ResourceRelationshipMutation object of the builder.

func (*ResourceRelationshipUpdate) QueryContext added in v0.4.0

func (c *ResourceRelationshipUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationshipUpdate) Save added in v0.4.0

Save executes the query and returns the number of nodes affected by the update operation.

func (*ResourceRelationshipUpdate) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceRelationshipUpdate) Where added in v0.4.0

Where appends a list predicates to the ResourceRelationshipUpdate builder.

type ResourceRelationshipUpdateInput added in v0.4.0

type ResourceRelationshipUpdateInput struct {
	ResourceRelationshipQueryInput `path:",inline" query:"-" json:"-"`

	// Dependency indicates replacing the stale Resource entity.
	Dependency *ResourceQueryInput `uri:"-" query:"-" json:"dependency"`
}

ResourceRelationshipUpdateInput holds the modification input of the ResourceRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRelationshipUpdateInput) Model added in v0.4.0

Model returns the ResourceRelationship entity for modifying, after validating.

func (*ResourceRelationshipUpdateInput) SetGinContext added in v0.4.0

func (ic *ResourceRelationshipUpdateInput) SetGinContext(ctx *gin.Context)

func (*ResourceRelationshipUpdateInput) SetModelClient added in v0.4.0

func (ic *ResourceRelationshipUpdateInput) SetModelClient(cli *Client)

func (*ResourceRelationshipUpdateInput) Validate added in v0.4.0

func (rrui *ResourceRelationshipUpdateInput) Validate() error

Validate checks the ResourceRelationshipUpdateInput entity.

func (*ResourceRelationshipUpdateInput) ValidateWith added in v0.4.0

func (rrui *ResourceRelationshipUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipUpdateInput entity with the given context and client set.

type ResourceRelationshipUpdateInputs added in v0.4.0

type ResourceRelationshipUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceRelationshipUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceRelationshipUpdateInputs holds the modification input of the ResourceRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRelationshipUpdateInputs) IDs added in v0.4.0

IDs returns the ID list of the ResourceRelationship entities for modifying, after validating.

func (*ResourceRelationshipUpdateInputs) Model added in v0.4.0

Model returns the ResourceRelationship entities for modifying, after validating.

func (*ResourceRelationshipUpdateInputs) SetGinContext added in v0.4.0

func (ic *ResourceRelationshipUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceRelationshipUpdateInputs) SetModelClient added in v0.4.0

func (ic *ResourceRelationshipUpdateInputs) SetModelClient(cli *Client)

func (*ResourceRelationshipUpdateInputs) Validate added in v0.4.0

func (rrui *ResourceRelationshipUpdateInputs) Validate() error

Validate checks the ResourceRelationshipUpdateInputs entity.

func (*ResourceRelationshipUpdateInputs) ValidateWith added in v0.4.0

func (rrui *ResourceRelationshipUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipUpdateInputs entity with the given context and client set.

type ResourceRelationshipUpdateInputsItem added in v0.4.0

type ResourceRelationshipUpdateInputsItem struct {
	// ID of the ResourceRelationship entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Dependency indicates replacing the stale Resource entity.
	Dependency *ResourceQueryInput `uri:"-" query:"-" json:"dependency"`
}

ResourceRelationshipUpdateInputs holds the modification input item of the ResourceRelationship entities.

func (*ResourceRelationshipUpdateInputsItem) ValidateWith added in v0.4.0

func (rrui *ResourceRelationshipUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRelationshipUpdateInputsItem entity with the given context and client set.

type ResourceRelationshipUpdateOne added in v0.4.0

type ResourceRelationshipUpdateOne struct {
	// contains filtered or unexported fields
}

ResourceRelationshipUpdateOne is the builder for updating a single ResourceRelationship entity.

func (*ResourceRelationshipUpdateOne) Exec added in v0.4.0

Exec executes the query on the entity.

func (*ResourceRelationshipUpdateOne) ExecContext added in v0.4.0

func (c *ResourceRelationshipUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRelationshipUpdateOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRelationshipUpdateOne) Modify added in v0.4.0

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceRelationshipUpdateOne) Mutation added in v0.4.0

Mutation returns the ResourceRelationshipMutation object of the builder.

func (*ResourceRelationshipUpdateOne) QueryContext added in v0.4.0

func (c *ResourceRelationshipUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRelationshipUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated ResourceRelationship entity.

func (*ResourceRelationshipUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceRelationshipUpdateOne) Select added in v0.4.0

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ResourceRelationshipUpdateOne) Where added in v0.4.0

Where appends a list predicates to the ResourceRelationshipUpdate builder.

type ResourceRelationshipUpsert added in v0.4.0

type ResourceRelationshipUpsert struct {
	*sql.UpdateSet
}

ResourceRelationshipUpsert is the "OnConflict" setter.

type ResourceRelationshipUpsertBulk added in v0.4.0

type ResourceRelationshipUpsertBulk struct {
	// contains filtered or unexported fields
}

ResourceRelationshipUpsertBulk is the builder for "upsert"-ing a bulk of ResourceRelationship nodes.

func (*ResourceRelationshipUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceRelationshipUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*ResourceRelationshipUpsertBulk) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceRelationshipUpsertBulk) ExecEX added in v0.4.0

func (u *ResourceRelationshipUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRelationship) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceRelationshipUpsertBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRelationshipUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceRelationship.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ResourceRelationshipUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceRelationshipCreateBulk.OnConflict documentation for more info.

func (*ResourceRelationshipUpsertBulk) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ResourceRelationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcerelationship.FieldID)
		}),
	).
	Exec(ctx)

type ResourceRelationshipUpsertOne added in v0.4.0

type ResourceRelationshipUpsertOne struct {
	// contains filtered or unexported fields
}

ResourceRelationshipUpsertOne is the builder for "upsert"-ing

one ResourceRelationship node.

func (*ResourceRelationshipUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceRelationshipUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*ResourceRelationshipUpsertOne) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceRelationshipUpsertOne) ExecEX added in v0.4.0

func (u *ResourceRelationshipUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRelationship) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceRelationshipUpsertOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRelationshipUpsertOne) ID added in v0.4.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ResourceRelationshipUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*ResourceRelationshipUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceRelationship.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ResourceRelationshipUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the ResourceRelationshipCreate.OnConflict documentation for more info.

func (*ResourceRelationshipUpsertOne) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ResourceRelationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcerelationship.FieldID)
		}),
	).
	Exec(ctx)

type ResourceRelationships added in v0.4.0

type ResourceRelationships []*ResourceRelationship

ResourceRelationships is a parsable slice of ResourceRelationship.

func (ResourceRelationships) View added in v0.4.0

View returns the output of ResourceRelationship entities.

type ResourceRun added in v0.6.0

type ResourceRun struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `json:"status,omitempty"`
	// ID of the project to belong.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the environment to which the run belongs.
	EnvironmentID object.ID `json:"environment_id,omitempty"`
	// ID of the resource to which the run belongs.
	ResourceID object.ID `json:"resource_id,omitempty"`
	// Name of the template.
	TemplateName string `json:"template_name,omitempty"`
	// Version of the template.
	TemplateVersion string `json:"template_version,omitempty"`
	// ID of the template.
	TemplateID object.ID `json:"template_id,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `json:"attributes,omitempty"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `json:"computed_attributes,omitempty"`
	// Variables of the run.
	Variables crypto.Map[string, string] `json:"variables,omitempty"`
	// Input configs of the run.
	InputConfigs map[string][]uint8 `json:"-"`
	// Type of deployer.
	DeployerType string `json:"deployer_type,omitempty"`
	// Duration in seconds of the run deploying.
	Duration int `json:"duration,omitempty"`
	// Previous provider requirement of the run.
	PreviousRequiredProviders []types.ProviderRequirement `json:"previous_required_providers,omitempty"`
	// Record of the run plan.
	PlanRecord string `json:"plan_record,omitempty"`
	// Record of the run.
	Record string `json:"record,omitempty"`
	// Change comment of the run.
	ChangeComment string `json:"change_comment,omitempty"`
	// User who created the run.
	CreatedBy string `json:"created_by,omitempty"`
	// Type of the run.
	Type string `json:"type,omitempty"`
	// If the run is preview.
	Preview bool `json:"preview,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Changes of the resource components.
	ComponentChanges []*types.ResourceComponentChange `json:"component_changes,omitempty"`
	// Change summary of the resource.
	ComponentChangeSummary types.ResourceComponentChangeSummary `json:"component_change_summary,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ResourceRunQuery when eager-loading is set.
	Edges ResourceRunEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

ResourceRun is the model entity for the ResourceRun schema.

func (*ResourceRun) ExecContext added in v0.6.0

func (c *ResourceRun) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRun) QueryContext added in v0.6.0

func (c *ResourceRun) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRun) QueryEnvironment added in v0.6.0

func (rr *ResourceRun) QueryEnvironment() *EnvironmentQuery

QueryEnvironment queries the "environment" edge of the ResourceRun entity.

func (*ResourceRun) QueryProject added in v0.6.0

func (rr *ResourceRun) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the ResourceRun entity.

func (*ResourceRun) QueryResource added in v0.6.0

func (rr *ResourceRun) QueryResource() *ResourceQuery

QueryResource queries the "resource" edge of the ResourceRun entity.

func (*ResourceRun) String added in v0.6.0

func (rr *ResourceRun) String() string

String implements the fmt.Stringer.

func (*ResourceRun) Unwrap added in v0.6.0

func (rr *ResourceRun) Unwrap() *ResourceRun

Unwrap unwraps the ResourceRun 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 (*ResourceRun) Update added in v0.6.0

func (rr *ResourceRun) Update() *ResourceRunUpdateOne

Update returns a builder for updating this ResourceRun. Note that you need to call ResourceRun.Unwrap() before calling this method if this ResourceRun was returned from a transaction, and the transaction was committed or rolled back.

func (*ResourceRun) Value added in v0.6.0

func (rr *ResourceRun) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ResourceRun. This includes values selected through modifiers, order, etc.

func (*ResourceRun) View added in v0.6.0

func (_rr *ResourceRun) View() *ResourceRunOutput

View returns the output of ResourceRun entity.

type ResourceRunClient added in v0.6.0

type ResourceRunClient struct {
	// contains filtered or unexported fields
}

ResourceRunClient is a client for the ResourceRun schema.

func NewResourceRunClient added in v0.6.0

func NewResourceRunClient(c config) *ResourceRunClient

NewResourceRunClient returns a client for the ResourceRun from the given config.

func (*ResourceRunClient) Create added in v0.6.0

func (c *ResourceRunClient) Create() *ResourceRunCreate

Create returns a builder for creating a ResourceRun entity.

func (*ResourceRunClient) CreateBulk added in v0.6.0

func (c *ResourceRunClient) CreateBulk(builders ...*ResourceRunCreate) *ResourceRunCreateBulk

CreateBulk returns a builder for creating a bulk of ResourceRun entities.

func (*ResourceRunClient) Delete added in v0.6.0

func (c *ResourceRunClient) Delete() *ResourceRunDelete

Delete returns a delete builder for ResourceRun.

func (*ResourceRunClient) DeleteOne added in v0.6.0

DeleteOne returns a builder for deleting the given entity.

func (*ResourceRunClient) DeleteOneID added in v0.6.0

func (c *ResourceRunClient) DeleteOneID(id object.ID) *ResourceRunDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ResourceRunClient) ExecContext added in v0.6.0

func (c *ResourceRunClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRunClient) Get added in v0.6.0

Get returns a ResourceRun entity by its id.

func (*ResourceRunClient) GetX added in v0.6.0

GetX is like Get, but panics if an error occurs.

func (*ResourceRunClient) Hooks added in v0.6.0

func (c *ResourceRunClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ResourceRunClient) Intercept added in v0.6.0

func (c *ResourceRunClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `resourcerun.Intercept(f(g(h())))`.

func (*ResourceRunClient) Interceptors added in v0.6.0

func (c *ResourceRunClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ResourceRunClient) MapCreateBulk added in v0.6.0

func (c *ResourceRunClient) MapCreateBulk(slice any, setFunc func(*ResourceRunCreate, int)) *ResourceRunCreateBulk

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 (*ResourceRunClient) Query added in v0.6.0

func (c *ResourceRunClient) Query() *ResourceRunQuery

Query returns a query builder for ResourceRun.

func (*ResourceRunClient) QueryContext added in v0.6.0

func (c *ResourceRunClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRunClient) QueryEnvironment added in v0.6.0

func (c *ResourceRunClient) QueryEnvironment(rr *ResourceRun) *EnvironmentQuery

QueryEnvironment queries the environment edge of a ResourceRun.

func (*ResourceRunClient) QueryProject added in v0.6.0

func (c *ResourceRunClient) QueryProject(rr *ResourceRun) *ProjectQuery

QueryProject queries the project edge of a ResourceRun.

func (*ResourceRunClient) QueryResource added in v0.6.0

func (c *ResourceRunClient) QueryResource(rr *ResourceRun) *ResourceQuery

QueryResource queries the resource edge of a ResourceRun.

func (*ResourceRunClient) Update added in v0.6.0

func (c *ResourceRunClient) Update() *ResourceRunUpdate

Update returns an update builder for ResourceRun.

func (*ResourceRunClient) UpdateOne added in v0.6.0

UpdateOne returns an update builder for the given entity.

func (*ResourceRunClient) UpdateOneID added in v0.6.0

func (c *ResourceRunClient) UpdateOneID(id object.ID) *ResourceRunUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ResourceRunClient) Use added in v0.6.0

func (c *ResourceRunClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resourcerun.Hooks(f(g(h())))`.

type ResourceRunClientGetter added in v0.6.0

type ResourceRunClientGetter interface {
	// ResourceRuns returns the client for interacting with the ResourceRun builders.
	ResourceRuns() *ResourceRunClient
}

ResourceRunClientGetter is an interface that allows getting ResourceRunClient.

type ResourceRunCreate added in v0.6.0

type ResourceRunCreate struct {
	// contains filtered or unexported fields
}

ResourceRunCreate is the builder for creating a ResourceRun entity.

func (*ResourceRunCreate) Exec added in v0.6.0

func (rrc *ResourceRunCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceRunCreate) ExecContext added in v0.6.0

func (c *ResourceRunCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRunCreate) ExecE added in v0.6.0

func (rrc *ResourceRunCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRun) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceRunCreate) ExecEX added in v0.6.0

func (rrc *ResourceRunCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRun) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceRunCreate) ExecX added in v0.6.0

func (rrc *ResourceRunCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRunCreate) Mutation added in v0.6.0

func (rrc *ResourceRunCreate) Mutation() *ResourceRunMutation

Mutation returns the ResourceRunMutation object of the builder.

func (*ResourceRunCreate) OnConflict added in v0.6.0

func (rrc *ResourceRunCreate) OnConflict(opts ...sql.ConflictOption) *ResourceRunUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceRun.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceRunUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceRunCreate) OnConflictColumns added in v0.6.0

func (rrc *ResourceRunCreate) OnConflictColumns(columns ...string) *ResourceRunUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceRun.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceRunCreate) QueryContext added in v0.6.0

func (c *ResourceRunCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRunCreate) Save added in v0.6.0

func (rrc *ResourceRunCreate) Save(ctx context.Context) (*ResourceRun, error)

Save creates the ResourceRun in the database.

func (*ResourceRunCreate) SaveE added in v0.6.0

func (rrc *ResourceRunCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRun) error) (*ResourceRun, error)

SaveE calls the given function after created the ResourceRun entity, which is always good for cascading create operations.

func (*ResourceRunCreate) SaveEX added in v0.6.0

func (rrc *ResourceRunCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRun) error) *ResourceRun

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceRunCreate) SaveX added in v0.6.0

func (rrc *ResourceRunCreate) SaveX(ctx context.Context) *ResourceRun

SaveX calls Save and panics if Save returns an error.

func (*ResourceRunCreate) Set added in v0.6.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceRunCreate) SetAnnotations added in v0.6.0

func (rrc *ResourceRunCreate) SetAnnotations(m map[string]string) *ResourceRunCreate

SetAnnotations sets the "annotations" field.

func (*ResourceRunCreate) SetAttributes added in v0.6.0

func (rrc *ResourceRunCreate) SetAttributes(pr property.Values) *ResourceRunCreate

SetAttributes sets the "attributes" field.

func (*ResourceRunCreate) SetChangeComment added in v0.6.0

func (rrc *ResourceRunCreate) SetChangeComment(s string) *ResourceRunCreate

SetChangeComment sets the "change_comment" field.

func (*ResourceRunCreate) SetComponentChangeSummary added in v0.6.0

func (rrc *ResourceRunCreate) SetComponentChangeSummary(tccs types.ResourceComponentChangeSummary) *ResourceRunCreate

SetComponentChangeSummary sets the "component_change_summary" field.

func (*ResourceRunCreate) SetComponentChanges added in v0.6.0

func (rrc *ResourceRunCreate) SetComponentChanges(tcc []*types.ResourceComponentChange) *ResourceRunCreate

SetComponentChanges sets the "component_changes" field.

func (*ResourceRunCreate) SetComputedAttributes added in v0.6.0

func (rrc *ResourceRunCreate) SetComputedAttributes(pr property.Values) *ResourceRunCreate

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceRunCreate) SetCreateTime added in v0.6.0

func (rrc *ResourceRunCreate) SetCreateTime(t time.Time) *ResourceRunCreate

SetCreateTime sets the "create_time" field.

func (*ResourceRunCreate) SetCreatedBy added in v0.6.0

func (rrc *ResourceRunCreate) SetCreatedBy(s string) *ResourceRunCreate

SetCreatedBy sets the "created_by" field.

func (*ResourceRunCreate) SetDeployerType added in v0.6.0

func (rrc *ResourceRunCreate) SetDeployerType(s string) *ResourceRunCreate

SetDeployerType sets the "deployer_type" field.

func (*ResourceRunCreate) SetDuration added in v0.6.0

func (rrc *ResourceRunCreate) SetDuration(i int) *ResourceRunCreate

SetDuration sets the "duration" field.

func (*ResourceRunCreate) SetEnvironment added in v0.6.0

func (rrc *ResourceRunCreate) SetEnvironment(e *Environment) *ResourceRunCreate

SetEnvironment sets the "environment" edge to the Environment entity.

func (*ResourceRunCreate) SetEnvironmentID added in v0.6.0

func (rrc *ResourceRunCreate) SetEnvironmentID(o object.ID) *ResourceRunCreate

SetEnvironmentID sets the "environment_id" field.

func (*ResourceRunCreate) SetID added in v0.6.0

SetID sets the "id" field.

func (*ResourceRunCreate) SetInputConfigs added in v0.6.0

func (rrc *ResourceRunCreate) SetInputConfigs(m map[string][]uint8) *ResourceRunCreate

SetInputConfigs sets the "input_configs" field.

func (*ResourceRunCreate) SetLabels added in v0.6.0

func (rrc *ResourceRunCreate) SetLabels(m map[string]string) *ResourceRunCreate

SetLabels sets the "labels" field.

func (*ResourceRunCreate) SetNillableChangeComment added in v0.6.0

func (rrc *ResourceRunCreate) SetNillableChangeComment(s *string) *ResourceRunCreate

SetNillableChangeComment sets the "change_comment" field if the given value is not nil.

func (*ResourceRunCreate) SetNillableComponentChangeSummary added in v0.6.0

func (rrc *ResourceRunCreate) SetNillableComponentChangeSummary(tccs *types.ResourceComponentChangeSummary) *ResourceRunCreate

SetNillableComponentChangeSummary sets the "component_change_summary" field if the given value is not nil.

func (*ResourceRunCreate) SetNillableCreateTime added in v0.6.0

func (rrc *ResourceRunCreate) SetNillableCreateTime(t *time.Time) *ResourceRunCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ResourceRunCreate) SetNillableDeployerType added in v0.6.0

func (rrc *ResourceRunCreate) SetNillableDeployerType(s *string) *ResourceRunCreate

SetNillableDeployerType sets the "deployer_type" field if the given value is not nil.

func (*ResourceRunCreate) SetNillableDuration added in v0.6.0

func (rrc *ResourceRunCreate) SetNillableDuration(i *int) *ResourceRunCreate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*ResourceRunCreate) SetNillablePlanRecord added in v0.6.0

func (rrc *ResourceRunCreate) SetNillablePlanRecord(s *string) *ResourceRunCreate

SetNillablePlanRecord sets the "plan_record" field if the given value is not nil.

func (*ResourceRunCreate) SetNillablePreview added in v0.6.0

func (rrc *ResourceRunCreate) SetNillablePreview(b *bool) *ResourceRunCreate

SetNillablePreview sets the "preview" field if the given value is not nil.

func (*ResourceRunCreate) SetNillableRecord added in v0.6.0

func (rrc *ResourceRunCreate) SetNillableRecord(s *string) *ResourceRunCreate

SetNillableRecord sets the "record" field if the given value is not nil.

func (*ResourceRunCreate) SetNillableStatus added in v0.6.0

func (rrc *ResourceRunCreate) SetNillableStatus(s *status.Status) *ResourceRunCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ResourceRunCreate) SetPlanRecord added in v0.6.0

func (rrc *ResourceRunCreate) SetPlanRecord(s string) *ResourceRunCreate

SetPlanRecord sets the "plan_record" field.

func (*ResourceRunCreate) SetPreview added in v0.6.0

func (rrc *ResourceRunCreate) SetPreview(b bool) *ResourceRunCreate

SetPreview sets the "preview" field.

func (*ResourceRunCreate) SetPreviousRequiredProviders added in v0.6.0

func (rrc *ResourceRunCreate) SetPreviousRequiredProviders(tr []types.ProviderRequirement) *ResourceRunCreate

SetPreviousRequiredProviders sets the "previous_required_providers" field.

func (*ResourceRunCreate) SetProject added in v0.6.0

func (rrc *ResourceRunCreate) SetProject(p *Project) *ResourceRunCreate

SetProject sets the "project" edge to the Project entity.

func (*ResourceRunCreate) SetProjectID added in v0.6.0

func (rrc *ResourceRunCreate) SetProjectID(o object.ID) *ResourceRunCreate

SetProjectID sets the "project_id" field.

func (*ResourceRunCreate) SetRecord added in v0.6.0

func (rrc *ResourceRunCreate) SetRecord(s string) *ResourceRunCreate

SetRecord sets the "record" field.

func (*ResourceRunCreate) SetResource added in v0.6.0

func (rrc *ResourceRunCreate) SetResource(r *Resource) *ResourceRunCreate

SetResource sets the "resource" edge to the Resource entity.

func (*ResourceRunCreate) SetResourceID added in v0.6.0

func (rrc *ResourceRunCreate) SetResourceID(o object.ID) *ResourceRunCreate

SetResourceID sets the "resource_id" field.

func (*ResourceRunCreate) SetStatus added in v0.6.0

func (rrc *ResourceRunCreate) SetStatus(s status.Status) *ResourceRunCreate

SetStatus sets the "status" field.

func (*ResourceRunCreate) SetTemplateID added in v0.6.0

func (rrc *ResourceRunCreate) SetTemplateID(o object.ID) *ResourceRunCreate

SetTemplateID sets the "template_id" field.

func (*ResourceRunCreate) SetTemplateName added in v0.6.0

func (rrc *ResourceRunCreate) SetTemplateName(s string) *ResourceRunCreate

SetTemplateName sets the "template_name" field.

func (*ResourceRunCreate) SetTemplateVersion added in v0.6.0

func (rrc *ResourceRunCreate) SetTemplateVersion(s string) *ResourceRunCreate

SetTemplateVersion sets the "template_version" field.

func (*ResourceRunCreate) SetType added in v0.6.0

func (rrc *ResourceRunCreate) SetType(s string) *ResourceRunCreate

SetType sets the "type" field.

func (*ResourceRunCreate) SetVariables added in v0.6.0

func (rrc *ResourceRunCreate) SetVariables(c crypto.Map[string, string]) *ResourceRunCreate

SetVariables sets the "variables" field.

type ResourceRunCreateBulk added in v0.6.0

type ResourceRunCreateBulk struct {
	// contains filtered or unexported fields
}

ResourceRunCreateBulk is the builder for creating many ResourceRun entities in bulk.

func (*ResourceRunCreateBulk) Exec added in v0.6.0

func (rrcb *ResourceRunCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceRunCreateBulk) ExecContext added in v0.6.0

func (c *ResourceRunCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRunCreateBulk) ExecE added in v0.6.0

func (rrcb *ResourceRunCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRun) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceRunCreateBulk) ExecEX added in v0.6.0

func (rrcb *ResourceRunCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRun) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceRunCreateBulk) ExecX added in v0.6.0

func (rrcb *ResourceRunCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRunCreateBulk) OnConflict added in v0.6.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceRun.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceRunUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*ResourceRunCreateBulk) OnConflictColumns added in v0.6.0

func (rrcb *ResourceRunCreateBulk) OnConflictColumns(columns ...string) *ResourceRunUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceRun.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceRunCreateBulk) QueryContext added in v0.6.0

func (c *ResourceRunCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRunCreateBulk) Save added in v0.6.0

func (rrcb *ResourceRunCreateBulk) Save(ctx context.Context) ([]*ResourceRun, error)

Save creates the ResourceRun entities in the database.

func (*ResourceRunCreateBulk) SaveE added in v0.6.0

func (rrcb *ResourceRunCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRun) error) ([]*ResourceRun, error)

SaveE calls the given function after created the ResourceRun entities, which is always good for cascading create operations.

func (*ResourceRunCreateBulk) SaveEX added in v0.6.0

func (rrcb *ResourceRunCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceRun) error) []*ResourceRun

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceRunCreateBulk) SaveX added in v0.6.0

func (rrcb *ResourceRunCreateBulk) SaveX(ctx context.Context) []*ResourceRun

SaveX is like Save, but panics if an error occurs.

func (*ResourceRunCreateBulk) Set added in v0.6.0

Set leverages the ResourceRunCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ResourceRunCreateInput added in v0.6.0

type ResourceRunCreateInput struct {

	// Project indicates to create ResourceRun entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to create ResourceRun entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to create ResourceRun entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Input configs of the run.
	InputConfigs map[string][]uint8 `path:"-" query:"-" json:"inputConfigs"`
	// ID of the template.
	TemplateID object.ID `path:"-" query:"-" json:"templateID"`
	// Version of the template.
	TemplateVersion string `path:"-" query:"-" json:"templateVersion"`
	// Name of the template.
	TemplateName string `path:"-" query:"-" json:"templateName"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes,omitempty"`
	// Variables of the run.
	Variables crypto.Map[string, string] `path:"-" query:"-" json:"variables,omitempty"`
	// Type of deployer.
	DeployerType string `path:"-" query:"-" json:"deployerType,omitempty"`
	// Duration in seconds of the run deploying.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Previous provider requirement of the run.
	PreviousRequiredProviders []types.ProviderRequirement `path:"-" query:"-" json:"previousRequiredProviders,omitempty"`
	// Record of the run plan.
	PlanRecord string `path:"-" query:"-" json:"planRecord,omitempty"`
	// Record of the run.
	Record string `path:"-" query:"-" json:"record,omitempty"`
	// Change comment of the run.
	ChangeComment string `path:"-" query:"-" json:"changeComment,omitempty"`
	// If the run is preview.
	Preview bool `path:"-" query:"-" json:"preview,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Changes of the resource components.
	ComponentChanges []*types.ResourceComponentChange `path:"-" query:"-" json:"componentChanges,omitempty"`
	// Change summary of the resource.
	ComponentChangeSummary types.ResourceComponentChangeSummary `path:"-" query:"-" json:"componentChangeSummary,omitempty"`
	// contains filtered or unexported fields
}

ResourceRunCreateInput holds the creation input of the ResourceRun entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRunCreateInput) Model added in v0.6.0

func (rrci *ResourceRunCreateInput) Model() *ResourceRun

Model returns the ResourceRun entity for creating, after validating.

func (*ResourceRunCreateInput) SetGinContext added in v0.6.0

func (ic *ResourceRunCreateInput) SetGinContext(ctx *gin.Context)

func (*ResourceRunCreateInput) SetModelClient added in v0.6.0

func (ic *ResourceRunCreateInput) SetModelClient(cli *Client)

func (*ResourceRunCreateInput) Validate added in v0.6.0

func (rrci *ResourceRunCreateInput) Validate() error

Validate checks the ResourceRunCreateInput entity.

func (*ResourceRunCreateInput) ValidateWith added in v0.6.0

func (rrci *ResourceRunCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunCreateInput entity with the given context and client set.

type ResourceRunCreateInputs added in v0.6.0

type ResourceRunCreateInputs struct {

	// Project indicates to create ResourceRun entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to create ResourceRun entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to create ResourceRun entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceRunCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceRunCreateInputs holds the creation input of the ResourceRun entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRunCreateInputs) Model added in v0.6.0

func (rrci *ResourceRunCreateInputs) Model() []*ResourceRun

Model returns the ResourceRun entities for creating, after validating.

func (*ResourceRunCreateInputs) SetGinContext added in v0.6.0

func (ic *ResourceRunCreateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceRunCreateInputs) SetModelClient added in v0.6.0

func (ic *ResourceRunCreateInputs) SetModelClient(cli *Client)

func (*ResourceRunCreateInputs) Validate added in v0.6.0

func (rrci *ResourceRunCreateInputs) Validate() error

Validate checks the ResourceRunCreateInputs entity .

func (*ResourceRunCreateInputs) ValidateWith added in v0.6.0

func (rrci *ResourceRunCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunCreateInputs entity with the given context and client set.

type ResourceRunCreateInputsItem added in v0.6.0

type ResourceRunCreateInputsItem struct {
	// Input configs of the run.
	InputConfigs map[string][]uint8 `path:"-" query:"-" json:"inputConfigs"`
	// ID of the template.
	TemplateID object.ID `path:"-" query:"-" json:"templateID"`
	// Version of the template.
	TemplateVersion string `path:"-" query:"-" json:"templateVersion"`
	// Name of the template.
	TemplateName string `path:"-" query:"-" json:"templateName"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes,omitempty"`
	// Variables of the run.
	Variables crypto.Map[string, string] `path:"-" query:"-" json:"variables,omitempty"`
	// Type of deployer.
	DeployerType string `path:"-" query:"-" json:"deployerType,omitempty"`
	// Duration in seconds of the run deploying.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Previous provider requirement of the run.
	PreviousRequiredProviders []types.ProviderRequirement `path:"-" query:"-" json:"previousRequiredProviders,omitempty"`
	// Record of the run plan.
	PlanRecord string `path:"-" query:"-" json:"planRecord,omitempty"`
	// Record of the run.
	Record string `path:"-" query:"-" json:"record,omitempty"`
	// Change comment of the run.
	ChangeComment string `path:"-" query:"-" json:"changeComment,omitempty"`
	// If the run is preview.
	Preview bool `path:"-" query:"-" json:"preview,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Changes of the resource components.
	ComponentChanges []*types.ResourceComponentChange `path:"-" query:"-" json:"componentChanges,omitempty"`
	// Change summary of the resource.
	ComponentChangeSummary types.ResourceComponentChangeSummary `path:"-" query:"-" json:"componentChangeSummary,omitempty"`
}

ResourceRunCreateInputs holds the creation input item of the ResourceRun entities.

func (*ResourceRunCreateInputsItem) ValidateWith added in v0.6.0

func (rrci *ResourceRunCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunCreateInputsItem entity with the given context and client set.

type ResourceRunDelete added in v0.6.0

type ResourceRunDelete struct {
	// contains filtered or unexported fields
}

ResourceRunDelete is the builder for deleting a ResourceRun entity.

func (*ResourceRunDelete) Exec added in v0.6.0

func (rrd *ResourceRunDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ResourceRunDelete) ExecContext added in v0.6.0

func (c *ResourceRunDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRunDelete) ExecX added in v0.6.0

func (rrd *ResourceRunDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRunDelete) QueryContext added in v0.6.0

func (c *ResourceRunDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRunDelete) Where added in v0.6.0

Where appends a list predicates to the ResourceRunDelete builder.

type ResourceRunDeleteInput added in v0.6.0

type ResourceRunDeleteInput struct {
	ResourceRunQueryInput `path:",inline"`
}

ResourceRunDeleteInput holds the deletion input of the ResourceRun entity, please tags with `path:",inline"` if embedding.

func (*ResourceRunDeleteInput) SetGinContext added in v0.6.0

func (ic *ResourceRunDeleteInput) SetGinContext(ctx *gin.Context)

func (*ResourceRunDeleteInput) SetModelClient added in v0.6.0

func (ic *ResourceRunDeleteInput) SetModelClient(cli *Client)

type ResourceRunDeleteInputs added in v0.6.0

type ResourceRunDeleteInputs struct {

	// Project indicates to delete ResourceRun entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to delete ResourceRun entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to delete ResourceRun entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceRunDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceRunDeleteInputs holds the deletion input of the ResourceRun entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRunDeleteInputs) IDs added in v0.6.0

func (rrdi *ResourceRunDeleteInputs) IDs() []object.ID

IDs returns the ID list of the ResourceRun entities for deleting, after validating.

func (*ResourceRunDeleteInputs) Model added in v0.6.0

func (rrdi *ResourceRunDeleteInputs) Model() []*ResourceRun

Model returns the ResourceRun entities for deleting, after validating.

func (*ResourceRunDeleteInputs) SetGinContext added in v0.6.0

func (ic *ResourceRunDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ResourceRunDeleteInputs) SetModelClient added in v0.6.0

func (ic *ResourceRunDeleteInputs) SetModelClient(cli *Client)

func (*ResourceRunDeleteInputs) Validate added in v0.6.0

func (rrdi *ResourceRunDeleteInputs) Validate() error

Validate checks the ResourceRunDeleteInputs entity.

func (*ResourceRunDeleteInputs) ValidateWith added in v0.6.0

func (rrdi *ResourceRunDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunDeleteInputs entity with the given context and client set.

type ResourceRunDeleteInputsItem added in v0.6.0

type ResourceRunDeleteInputsItem struct {
	// ID of the ResourceRun entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

ResourceRunDeleteInputs holds the deletion input item of the ResourceRun entities.

type ResourceRunDeleteOne added in v0.6.0

type ResourceRunDeleteOne struct {
	// contains filtered or unexported fields
}

ResourceRunDeleteOne is the builder for deleting a single ResourceRun entity.

func (*ResourceRunDeleteOne) Exec added in v0.6.0

func (rrdo *ResourceRunDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ResourceRunDeleteOne) ExecX added in v0.6.0

func (rrdo *ResourceRunDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRunDeleteOne) Where added in v0.6.0

Where appends a list predicates to the ResourceRunDelete builder.

type ResourceRunEdges added in v0.6.0

type ResourceRunEdges struct {
	// Project to which the run belongs.
	Project *Project `json:"project,omitempty"`
	// Environment to which the run deploys.
	Environment *Environment `json:"environment,omitempty"`
	// Resource to which the run belongs.
	Resource *Resource `json:"resource,omitempty"`
	// contains filtered or unexported fields
}

ResourceRunEdges holds the relations/edges for other nodes in the graph.

func (ResourceRunEdges) EnvironmentOrErr added in v0.6.0

func (e ResourceRunEdges) EnvironmentOrErr() (*Environment, error)

EnvironmentOrErr returns the Environment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceRunEdges) ProjectOrErr added in v0.6.0

func (e ResourceRunEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ResourceRunEdges) ResourceOrErr added in v0.6.0

func (e ResourceRunEdges) ResourceOrErr() (*Resource, error)

ResourceOrErr returns the Resource value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ResourceRunGroupBy added in v0.6.0

type ResourceRunGroupBy struct {
	// contains filtered or unexported fields
}

ResourceRunGroupBy is the group-by builder for ResourceRun entities.

func (*ResourceRunGroupBy) Aggregate added in v0.6.0

func (rrgb *ResourceRunGroupBy) Aggregate(fns ...AggregateFunc) *ResourceRunGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ResourceRunGroupBy) Bool added in v0.6.0

func (s *ResourceRunGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceRunGroupBy) BoolX added in v0.6.0

func (s *ResourceRunGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceRunGroupBy) Bools added in v0.6.0

func (s *ResourceRunGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceRunGroupBy) BoolsX added in v0.6.0

func (s *ResourceRunGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ResourceRunGroupBy) Float64 added in v0.6.0

func (s *ResourceRunGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceRunGroupBy) Float64X added in v0.6.0

func (s *ResourceRunGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceRunGroupBy) Float64s added in v0.6.0

func (s *ResourceRunGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceRunGroupBy) Float64sX added in v0.6.0

func (s *ResourceRunGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceRunGroupBy) Int added in v0.6.0

func (s *ResourceRunGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceRunGroupBy) IntX added in v0.6.0

func (s *ResourceRunGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceRunGroupBy) Ints added in v0.6.0

func (s *ResourceRunGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceRunGroupBy) IntsX added in v0.6.0

func (s *ResourceRunGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceRunGroupBy) Scan added in v0.6.0

func (rrgb *ResourceRunGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceRunGroupBy) ScanX added in v0.6.0

func (s *ResourceRunGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceRunGroupBy) String added in v0.6.0

func (s *ResourceRunGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceRunGroupBy) StringX added in v0.6.0

func (s *ResourceRunGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceRunGroupBy) Strings added in v0.6.0

func (s *ResourceRunGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceRunGroupBy) StringsX added in v0.6.0

func (s *ResourceRunGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceRunMutation added in v0.6.0

type ResourceRunMutation struct {
	// contains filtered or unexported fields
}

ResourceRunMutation represents an operation that mutates the ResourceRun nodes in the graph.

func (*ResourceRunMutation) AddDuration added in v0.6.0

func (m *ResourceRunMutation) AddDuration(i int)

AddDuration adds i to the "duration" field.

func (*ResourceRunMutation) AddField added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) AddedDuration added in v0.6.0

func (m *ResourceRunMutation) AddedDuration() (r int, exists bool)

AddedDuration returns the value that was added to the "duration" field in this mutation.

func (*ResourceRunMutation) AddedEdges added in v0.6.0

func (m *ResourceRunMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ResourceRunMutation) AddedField added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) AddedFields added in v0.6.0

func (m *ResourceRunMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ResourceRunMutation) AddedIDs added in v0.6.0

func (m *ResourceRunMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ResourceRunMutation) Annotations added in v0.6.0

func (m *ResourceRunMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*ResourceRunMutation) AnnotationsCleared added in v0.6.0

func (m *ResourceRunMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*ResourceRunMutation) AppendComponentChanges added in v0.6.0

func (m *ResourceRunMutation) AppendComponentChanges(tcc []*types.ResourceComponentChange)

AppendComponentChanges adds tcc to the "component_changes" field.

func (*ResourceRunMutation) AppendPreviousRequiredProviders added in v0.6.0

func (m *ResourceRunMutation) AppendPreviousRequiredProviders(tr []types.ProviderRequirement)

AppendPreviousRequiredProviders adds tr to the "previous_required_providers" field.

func (*ResourceRunMutation) AppendedComponentChanges added in v0.6.0

func (m *ResourceRunMutation) AppendedComponentChanges() ([]*types.ResourceComponentChange, bool)

AppendedComponentChanges returns the list of values that were appended to the "component_changes" field in this mutation.

func (*ResourceRunMutation) AppendedPreviousRequiredProviders added in v0.6.0

func (m *ResourceRunMutation) AppendedPreviousRequiredProviders() ([]types.ProviderRequirement, bool)

AppendedPreviousRequiredProviders returns the list of values that were appended to the "previous_required_providers" field in this mutation.

func (*ResourceRunMutation) Attributes added in v0.6.0

func (m *ResourceRunMutation) Attributes() (r property.Values, exists bool)

Attributes returns the value of the "attributes" field in the mutation.

func (*ResourceRunMutation) AttributesCleared added in v0.6.0

func (m *ResourceRunMutation) AttributesCleared() bool

AttributesCleared returns if the "attributes" field was cleared in this mutation.

func (*ResourceRunMutation) ChangeComment added in v0.6.0

func (m *ResourceRunMutation) ChangeComment() (r string, exists bool)

ChangeComment returns the value of the "change_comment" field in the mutation.

func (*ResourceRunMutation) ChangeCommentCleared added in v0.6.0

func (m *ResourceRunMutation) ChangeCommentCleared() bool

ChangeCommentCleared returns if the "change_comment" field was cleared in this mutation.

func (*ResourceRunMutation) ClearAnnotations added in v0.6.0

func (m *ResourceRunMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceRunMutation) ClearAttributes added in v0.6.0

func (m *ResourceRunMutation) ClearAttributes()

ClearAttributes clears the value of the "attributes" field.

func (*ResourceRunMutation) ClearChangeComment added in v0.6.0

func (m *ResourceRunMutation) ClearChangeComment()

ClearChangeComment clears the value of the "change_comment" field.

func (*ResourceRunMutation) ClearComponentChangeSummary added in v0.6.0

func (m *ResourceRunMutation) ClearComponentChangeSummary()

ClearComponentChangeSummary clears the value of the "component_change_summary" field.

func (*ResourceRunMutation) ClearComponentChanges added in v0.6.0

func (m *ResourceRunMutation) ClearComponentChanges()

ClearComponentChanges clears the value of the "component_changes" field.

func (*ResourceRunMutation) ClearComputedAttributes added in v0.6.0

func (m *ResourceRunMutation) ClearComputedAttributes()

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceRunMutation) ClearEdge added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) ClearEnvironment added in v0.6.0

func (m *ResourceRunMutation) ClearEnvironment()

ClearEnvironment clears the "environment" edge to the Environment entity.

func (*ResourceRunMutation) ClearField added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) ClearLabels added in v0.6.0

func (m *ResourceRunMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*ResourceRunMutation) ClearPlanRecord added in v0.6.0

func (m *ResourceRunMutation) ClearPlanRecord()

ClearPlanRecord clears the value of the "plan_record" field.

func (*ResourceRunMutation) ClearProject added in v0.6.0

func (m *ResourceRunMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*ResourceRunMutation) ClearRecord added in v0.6.0

func (m *ResourceRunMutation) ClearRecord()

ClearRecord clears the value of the "record" field.

func (*ResourceRunMutation) ClearResource added in v0.6.0

func (m *ResourceRunMutation) ClearResource()

ClearResource clears the "resource" edge to the Resource entity.

func (*ResourceRunMutation) ClearStatus added in v0.6.0

func (m *ResourceRunMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*ResourceRunMutation) ClearedEdges added in v0.6.0

func (m *ResourceRunMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ResourceRunMutation) ClearedFields added in v0.6.0

func (m *ResourceRunMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ResourceRunMutation) Client added in v0.6.0

func (m ResourceRunMutation) 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 (*ResourceRunMutation) ComponentChangeSummary added in v0.6.0

func (m *ResourceRunMutation) ComponentChangeSummary() (r types.ResourceComponentChangeSummary, exists bool)

ComponentChangeSummary returns the value of the "component_change_summary" field in the mutation.

func (*ResourceRunMutation) ComponentChangeSummaryCleared added in v0.6.0

func (m *ResourceRunMutation) ComponentChangeSummaryCleared() bool

ComponentChangeSummaryCleared returns if the "component_change_summary" field was cleared in this mutation.

func (*ResourceRunMutation) ComponentChanges added in v0.6.0

func (m *ResourceRunMutation) ComponentChanges() (r []*types.ResourceComponentChange, exists bool)

ComponentChanges returns the value of the "component_changes" field in the mutation.

func (*ResourceRunMutation) ComponentChangesCleared added in v0.6.0

func (m *ResourceRunMutation) ComponentChangesCleared() bool

ComponentChangesCleared returns if the "component_changes" field was cleared in this mutation.

func (*ResourceRunMutation) ComputedAttributes added in v0.6.0

func (m *ResourceRunMutation) ComputedAttributes() (r property.Values, exists bool)

ComputedAttributes returns the value of the "computed_attributes" field in the mutation.

func (*ResourceRunMutation) ComputedAttributesCleared added in v0.6.0

func (m *ResourceRunMutation) ComputedAttributesCleared() bool

ComputedAttributesCleared returns if the "computed_attributes" field was cleared in this mutation.

func (*ResourceRunMutation) CreateTime added in v0.6.0

func (m *ResourceRunMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ResourceRunMutation) CreatedBy added in v0.6.0

func (m *ResourceRunMutation) CreatedBy() (r string, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*ResourceRunMutation) DeployerType added in v0.6.0

func (m *ResourceRunMutation) DeployerType() (r string, exists bool)

DeployerType returns the value of the "deployer_type" field in the mutation.

func (*ResourceRunMutation) Duration added in v0.6.0

func (m *ResourceRunMutation) Duration() (r int, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*ResourceRunMutation) EdgeCleared added in v0.6.0

func (m *ResourceRunMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ResourceRunMutation) EnvironmentCleared added in v0.6.0

func (m *ResourceRunMutation) EnvironmentCleared() bool

EnvironmentCleared reports if the "environment" edge to the Environment entity was cleared.

func (*ResourceRunMutation) EnvironmentID added in v0.6.0

func (m *ResourceRunMutation) EnvironmentID() (r object.ID, exists bool)

EnvironmentID returns the value of the "environment_id" field in the mutation.

func (*ResourceRunMutation) EnvironmentIDs added in v0.6.0

func (m *ResourceRunMutation) EnvironmentIDs() (ids []object.ID)

EnvironmentIDs returns the "environment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EnvironmentID instead. It exists only for internal usage by the builders.

func (*ResourceRunMutation) ExecContext added in v0.6.0

func (c *ResourceRunMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRunMutation) Field added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) FieldCleared added in v0.6.0

func (m *ResourceRunMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ResourceRunMutation) Fields added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) GetType added in v0.6.0

func (m *ResourceRunMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ResourceRunMutation) ID added in v0.6.0

func (m *ResourceRunMutation) ID() (id object.ID, 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 (*ResourceRunMutation) IDs added in v0.6.0

func (m *ResourceRunMutation) IDs(ctx context.Context) ([]object.ID, 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 (*ResourceRunMutation) InputConfigs added in v0.6.0

func (m *ResourceRunMutation) InputConfigs() (r map[string][]uint8, exists bool)

InputConfigs returns the value of the "input_configs" field in the mutation.

func (*ResourceRunMutation) Labels added in v0.6.0

func (m *ResourceRunMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*ResourceRunMutation) LabelsCleared added in v0.6.0

func (m *ResourceRunMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*ResourceRunMutation) OldAnnotations added in v0.6.0

func (m *ResourceRunMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldAttributes added in v0.6.0

func (m *ResourceRunMutation) OldAttributes(ctx context.Context) (v property.Values, err error)

OldAttributes returns the old "attributes" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldChangeComment added in v0.6.0

func (m *ResourceRunMutation) OldChangeComment(ctx context.Context) (v string, err error)

OldChangeComment returns the old "change_comment" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldComponentChangeSummary added in v0.6.0

func (m *ResourceRunMutation) OldComponentChangeSummary(ctx context.Context) (v types.ResourceComponentChangeSummary, err error)

OldComponentChangeSummary returns the old "component_change_summary" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldComponentChanges added in v0.6.0

func (m *ResourceRunMutation) OldComponentChanges(ctx context.Context) (v []*types.ResourceComponentChange, err error)

OldComponentChanges returns the old "component_changes" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldComputedAttributes added in v0.6.0

func (m *ResourceRunMutation) OldComputedAttributes(ctx context.Context) (v property.Values, err error)

OldComputedAttributes returns the old "computed_attributes" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldCreateTime added in v0.6.0

func (m *ResourceRunMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldCreatedBy added in v0.6.0

func (m *ResourceRunMutation) OldCreatedBy(ctx context.Context) (v string, err error)

OldCreatedBy returns the old "created_by" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldDeployerType added in v0.6.0

func (m *ResourceRunMutation) OldDeployerType(ctx context.Context) (v string, err error)

OldDeployerType returns the old "deployer_type" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldDuration added in v0.6.0

func (m *ResourceRunMutation) OldDuration(ctx context.Context) (v int, err error)

OldDuration returns the old "duration" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldEnvironmentID added in v0.6.0

func (m *ResourceRunMutation) OldEnvironmentID(ctx context.Context) (v object.ID, err error)

OldEnvironmentID returns the old "environment_id" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldField added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) OldInputConfigs added in v0.6.0

func (m *ResourceRunMutation) OldInputConfigs(ctx context.Context) (v map[string][]uint8, err error)

OldInputConfigs returns the old "input_configs" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldLabels added in v0.6.0

func (m *ResourceRunMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldPlanRecord added in v0.6.0

func (m *ResourceRunMutation) OldPlanRecord(ctx context.Context) (v string, err error)

OldPlanRecord returns the old "plan_record" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldPreview added in v0.6.0

func (m *ResourceRunMutation) OldPreview(ctx context.Context) (v bool, err error)

OldPreview returns the old "preview" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldPreviousRequiredProviders added in v0.6.0

func (m *ResourceRunMutation) OldPreviousRequiredProviders(ctx context.Context) (v []types.ProviderRequirement, err error)

OldPreviousRequiredProviders returns the old "previous_required_providers" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldProjectID added in v0.6.0

func (m *ResourceRunMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldRecord added in v0.6.0

func (m *ResourceRunMutation) OldRecord(ctx context.Context) (v string, err error)

OldRecord returns the old "record" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldResourceID added in v0.6.0

func (m *ResourceRunMutation) OldResourceID(ctx context.Context) (v object.ID, err error)

OldResourceID returns the old "resource_id" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldStatus added in v0.6.0

func (m *ResourceRunMutation) OldStatus(ctx context.Context) (v status.Status, err error)

OldStatus returns the old "status" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldTemplateID added in v0.6.0

func (m *ResourceRunMutation) OldTemplateID(ctx context.Context) (v object.ID, err error)

OldTemplateID returns the old "template_id" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldTemplateName added in v0.6.0

func (m *ResourceRunMutation) OldTemplateName(ctx context.Context) (v string, err error)

OldTemplateName returns the old "template_name" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldTemplateVersion added in v0.6.0

func (m *ResourceRunMutation) OldTemplateVersion(ctx context.Context) (v string, err error)

OldTemplateVersion returns the old "template_version" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldType added in v0.6.0

func (m *ResourceRunMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) OldVariables added in v0.6.0

func (m *ResourceRunMutation) OldVariables(ctx context.Context) (v crypto.Map[string, string], err error)

OldVariables returns the old "variables" field's value of the ResourceRun entity. If the ResourceRun 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 (*ResourceRunMutation) Op added in v0.6.0

func (m *ResourceRunMutation) Op() Op

Op returns the operation name.

func (*ResourceRunMutation) PlanRecord added in v0.6.0

func (m *ResourceRunMutation) PlanRecord() (r string, exists bool)

PlanRecord returns the value of the "plan_record" field in the mutation.

func (*ResourceRunMutation) PlanRecordCleared added in v0.6.0

func (m *ResourceRunMutation) PlanRecordCleared() bool

PlanRecordCleared returns if the "plan_record" field was cleared in this mutation.

func (*ResourceRunMutation) Preview added in v0.6.0

func (m *ResourceRunMutation) Preview() (r bool, exists bool)

Preview returns the value of the "preview" field in the mutation.

func (*ResourceRunMutation) PreviousRequiredProviders added in v0.6.0

func (m *ResourceRunMutation) PreviousRequiredProviders() (r []types.ProviderRequirement, exists bool)

PreviousRequiredProviders returns the value of the "previous_required_providers" field in the mutation.

func (*ResourceRunMutation) ProjectCleared added in v0.6.0

func (m *ResourceRunMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*ResourceRunMutation) ProjectID added in v0.6.0

func (m *ResourceRunMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*ResourceRunMutation) ProjectIDs added in v0.6.0

func (m *ResourceRunMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*ResourceRunMutation) QueryContext added in v0.6.0

func (c *ResourceRunMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRunMutation) Record added in v0.6.0

func (m *ResourceRunMutation) Record() (r string, exists bool)

Record returns the value of the "record" field in the mutation.

func (*ResourceRunMutation) RecordCleared added in v0.6.0

func (m *ResourceRunMutation) RecordCleared() bool

RecordCleared returns if the "record" field was cleared in this mutation.

func (*ResourceRunMutation) RemovedEdges added in v0.6.0

func (m *ResourceRunMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ResourceRunMutation) RemovedIDs added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) ResetAnnotations added in v0.6.0

func (m *ResourceRunMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*ResourceRunMutation) ResetAttributes added in v0.6.0

func (m *ResourceRunMutation) ResetAttributes()

ResetAttributes resets all changes to the "attributes" field.

func (*ResourceRunMutation) ResetChangeComment added in v0.6.0

func (m *ResourceRunMutation) ResetChangeComment()

ResetChangeComment resets all changes to the "change_comment" field.

func (*ResourceRunMutation) ResetComponentChangeSummary added in v0.6.0

func (m *ResourceRunMutation) ResetComponentChangeSummary()

ResetComponentChangeSummary resets all changes to the "component_change_summary" field.

func (*ResourceRunMutation) ResetComponentChanges added in v0.6.0

func (m *ResourceRunMutation) ResetComponentChanges()

ResetComponentChanges resets all changes to the "component_changes" field.

func (*ResourceRunMutation) ResetComputedAttributes added in v0.6.0

func (m *ResourceRunMutation) ResetComputedAttributes()

ResetComputedAttributes resets all changes to the "computed_attributes" field.

func (*ResourceRunMutation) ResetCreateTime added in v0.6.0

func (m *ResourceRunMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ResourceRunMutation) ResetCreatedBy added in v0.6.0

func (m *ResourceRunMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*ResourceRunMutation) ResetDeployerType added in v0.6.0

func (m *ResourceRunMutation) ResetDeployerType()

ResetDeployerType resets all changes to the "deployer_type" field.

func (*ResourceRunMutation) ResetDuration added in v0.6.0

func (m *ResourceRunMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*ResourceRunMutation) ResetEdge added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) ResetEnvironment added in v0.6.0

func (m *ResourceRunMutation) ResetEnvironment()

ResetEnvironment resets all changes to the "environment" edge.

func (*ResourceRunMutation) ResetEnvironmentID added in v0.6.0

func (m *ResourceRunMutation) ResetEnvironmentID()

ResetEnvironmentID resets all changes to the "environment_id" field.

func (*ResourceRunMutation) ResetField added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) ResetInputConfigs added in v0.6.0

func (m *ResourceRunMutation) ResetInputConfigs()

ResetInputConfigs resets all changes to the "input_configs" field.

func (*ResourceRunMutation) ResetLabels added in v0.6.0

func (m *ResourceRunMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*ResourceRunMutation) ResetPlanRecord added in v0.6.0

func (m *ResourceRunMutation) ResetPlanRecord()

ResetPlanRecord resets all changes to the "plan_record" field.

func (*ResourceRunMutation) ResetPreview added in v0.6.0

func (m *ResourceRunMutation) ResetPreview()

ResetPreview resets all changes to the "preview" field.

func (*ResourceRunMutation) ResetPreviousRequiredProviders added in v0.6.0

func (m *ResourceRunMutation) ResetPreviousRequiredProviders()

ResetPreviousRequiredProviders resets all changes to the "previous_required_providers" field.

func (*ResourceRunMutation) ResetProject added in v0.6.0

func (m *ResourceRunMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*ResourceRunMutation) ResetProjectID added in v0.6.0

func (m *ResourceRunMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*ResourceRunMutation) ResetRecord added in v0.6.0

func (m *ResourceRunMutation) ResetRecord()

ResetRecord resets all changes to the "record" field.

func (*ResourceRunMutation) ResetResource added in v0.6.0

func (m *ResourceRunMutation) ResetResource()

ResetResource resets all changes to the "resource" edge.

func (*ResourceRunMutation) ResetResourceID added in v0.6.0

func (m *ResourceRunMutation) ResetResourceID()

ResetResourceID resets all changes to the "resource_id" field.

func (*ResourceRunMutation) ResetStatus added in v0.6.0

func (m *ResourceRunMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ResourceRunMutation) ResetTemplateID added in v0.6.0

func (m *ResourceRunMutation) ResetTemplateID()

ResetTemplateID resets all changes to the "template_id" field.

func (*ResourceRunMutation) ResetTemplateName added in v0.6.0

func (m *ResourceRunMutation) ResetTemplateName()

ResetTemplateName resets all changes to the "template_name" field.

func (*ResourceRunMutation) ResetTemplateVersion added in v0.6.0

func (m *ResourceRunMutation) ResetTemplateVersion()

ResetTemplateVersion resets all changes to the "template_version" field.

func (*ResourceRunMutation) ResetType added in v0.6.0

func (m *ResourceRunMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ResourceRunMutation) ResetVariables added in v0.6.0

func (m *ResourceRunMutation) ResetVariables()

ResetVariables resets all changes to the "variables" field.

func (*ResourceRunMutation) ResourceCleared added in v0.6.0

func (m *ResourceRunMutation) ResourceCleared() bool

ResourceCleared reports if the "resource" edge to the Resource entity was cleared.

func (*ResourceRunMutation) ResourceID added in v0.6.0

func (m *ResourceRunMutation) ResourceID() (r object.ID, exists bool)

ResourceID returns the value of the "resource_id" field in the mutation.

func (*ResourceRunMutation) ResourceIDs added in v0.6.0

func (m *ResourceRunMutation) ResourceIDs() (ids []object.ID)

ResourceIDs returns the "resource" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ResourceID instead. It exists only for internal usage by the builders.

func (*ResourceRunMutation) SetAnnotations added in v0.6.0

func (m *ResourceRunMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*ResourceRunMutation) SetAttributes added in v0.6.0

func (m *ResourceRunMutation) SetAttributes(pr property.Values)

SetAttributes sets the "attributes" field.

func (*ResourceRunMutation) SetChangeComment added in v0.6.0

func (m *ResourceRunMutation) SetChangeComment(s string)

SetChangeComment sets the "change_comment" field.

func (*ResourceRunMutation) SetComponentChangeSummary added in v0.6.0

func (m *ResourceRunMutation) SetComponentChangeSummary(tccs types.ResourceComponentChangeSummary)

SetComponentChangeSummary sets the "component_change_summary" field.

func (*ResourceRunMutation) SetComponentChanges added in v0.6.0

func (m *ResourceRunMutation) SetComponentChanges(tcc []*types.ResourceComponentChange)

SetComponentChanges sets the "component_changes" field.

func (*ResourceRunMutation) SetComputedAttributes added in v0.6.0

func (m *ResourceRunMutation) SetComputedAttributes(pr property.Values)

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceRunMutation) SetCreateTime added in v0.6.0

func (m *ResourceRunMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ResourceRunMutation) SetCreatedBy added in v0.6.0

func (m *ResourceRunMutation) SetCreatedBy(s string)

SetCreatedBy sets the "created_by" field.

func (*ResourceRunMutation) SetDeployerType added in v0.6.0

func (m *ResourceRunMutation) SetDeployerType(s string)

SetDeployerType sets the "deployer_type" field.

func (*ResourceRunMutation) SetDuration added in v0.6.0

func (m *ResourceRunMutation) SetDuration(i int)

SetDuration sets the "duration" field.

func (*ResourceRunMutation) SetEnvironmentID added in v0.6.0

func (m *ResourceRunMutation) SetEnvironmentID(o object.ID)

SetEnvironmentID sets the "environment_id" field.

func (*ResourceRunMutation) SetField added in v0.6.0

func (m *ResourceRunMutation) 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 (*ResourceRunMutation) SetID added in v0.6.0

func (m *ResourceRunMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ResourceRun entities.

func (*ResourceRunMutation) SetInputConfigs added in v0.6.0

func (m *ResourceRunMutation) SetInputConfigs(value map[string][]uint8)

SetInputConfigs sets the "input_configs" field.

func (*ResourceRunMutation) SetLabels added in v0.6.0

func (m *ResourceRunMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*ResourceRunMutation) SetOp added in v0.6.0

func (m *ResourceRunMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ResourceRunMutation) SetPlanRecord added in v0.6.0

func (m *ResourceRunMutation) SetPlanRecord(s string)

SetPlanRecord sets the "plan_record" field.

func (*ResourceRunMutation) SetPreview added in v0.6.0

func (m *ResourceRunMutation) SetPreview(b bool)

SetPreview sets the "preview" field.

func (*ResourceRunMutation) SetPreviousRequiredProviders added in v0.6.0

func (m *ResourceRunMutation) SetPreviousRequiredProviders(tr []types.ProviderRequirement)

SetPreviousRequiredProviders sets the "previous_required_providers" field.

func (*ResourceRunMutation) SetProjectID added in v0.6.0

func (m *ResourceRunMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*ResourceRunMutation) SetRecord added in v0.6.0

func (m *ResourceRunMutation) SetRecord(s string)

SetRecord sets the "record" field.

func (*ResourceRunMutation) SetResourceID added in v0.6.0

func (m *ResourceRunMutation) SetResourceID(o object.ID)

SetResourceID sets the "resource_id" field.

func (*ResourceRunMutation) SetStatus added in v0.6.0

func (m *ResourceRunMutation) SetStatus(s status.Status)

SetStatus sets the "status" field.

func (*ResourceRunMutation) SetTemplateID added in v0.6.0

func (m *ResourceRunMutation) SetTemplateID(o object.ID)

SetTemplateID sets the "template_id" field.

func (*ResourceRunMutation) SetTemplateName added in v0.6.0

func (m *ResourceRunMutation) SetTemplateName(s string)

SetTemplateName sets the "template_name" field.

func (*ResourceRunMutation) SetTemplateVersion added in v0.6.0

func (m *ResourceRunMutation) SetTemplateVersion(s string)

SetTemplateVersion sets the "template_version" field.

func (*ResourceRunMutation) SetType added in v0.6.0

func (m *ResourceRunMutation) SetType(s string)

SetType sets the "type" field.

func (*ResourceRunMutation) SetVariables added in v0.6.0

func (m *ResourceRunMutation) SetVariables(c crypto.Map[string, string])

SetVariables sets the "variables" field.

func (*ResourceRunMutation) Status added in v0.6.0

func (m *ResourceRunMutation) Status() (r status.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*ResourceRunMutation) StatusCleared added in v0.6.0

func (m *ResourceRunMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*ResourceRunMutation) TemplateID added in v0.6.0

func (m *ResourceRunMutation) TemplateID() (r object.ID, exists bool)

TemplateID returns the value of the "template_id" field in the mutation.

func (*ResourceRunMutation) TemplateName added in v0.6.0

func (m *ResourceRunMutation) TemplateName() (r string, exists bool)

TemplateName returns the value of the "template_name" field in the mutation.

func (*ResourceRunMutation) TemplateVersion added in v0.6.0

func (m *ResourceRunMutation) TemplateVersion() (r string, exists bool)

TemplateVersion returns the value of the "template_version" field in the mutation.

func (ResourceRunMutation) Tx added in v0.6.0

func (m ResourceRunMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ResourceRunMutation) Type added in v0.6.0

func (m *ResourceRunMutation) Type() string

Type returns the node type of this mutation (ResourceRun).

func (*ResourceRunMutation) Variables added in v0.6.0

func (m *ResourceRunMutation) Variables() (r crypto.Map[string, string], exists bool)

Variables returns the value of the "variables" field in the mutation.

func (*ResourceRunMutation) Where added in v0.6.0

func (m *ResourceRunMutation) Where(ps ...predicate.ResourceRun)

Where appends a list predicates to the ResourceRunMutation builder.

func (*ResourceRunMutation) WhereP added in v0.6.0

func (m *ResourceRunMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceRunMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ResourceRunOutput added in v0.6.0

type ResourceRunOutput struct {
	ID                        object.ID                            `json:"id,omitempty"`
	CreateTime                *time.Time                           `json:"createTime,omitempty"`
	Status                    status.Status                        `json:"status,omitempty"`
	TemplateName              string                               `json:"templateName,omitempty"`
	TemplateVersion           string                               `json:"templateVersion,omitempty"`
	TemplateID                object.ID                            `json:"templateID,omitempty"`
	Attributes                property.Values                      `json:"attributes,omitempty"`
	ComputedAttributes        property.Values                      `json:"computedAttributes,omitempty"`
	Variables                 crypto.Map[string, string]           `json:"variables,omitempty"`
	DeployerType              string                               `json:"deployerType,omitempty"`
	Duration                  int                                  `json:"duration,omitempty"`
	PreviousRequiredProviders []types.ProviderRequirement          `json:"previousRequiredProviders,omitempty"`
	PlanRecord                string                               `json:"planRecord,omitempty"`
	Record                    string                               `json:"record,omitempty"`
	ChangeComment             string                               `json:"changeComment,omitempty"`
	CreatedBy                 string                               `json:"createdBy,omitempty"`
	Type                      string                               `json:"type,omitempty"`
	Preview                   bool                                 `json:"preview,omitempty"`
	Labels                    map[string]string                    `json:"labels,omitempty"`
	ComponentChanges          []*types.ResourceComponentChange     `json:"componentChanges,omitempty"`
	ComponentChangeSummary    types.ResourceComponentChangeSummary `json:"componentChangeSummary,omitempty"`

	Project     *ProjectOutput     `json:"project,omitempty"`
	Environment *EnvironmentOutput `json:"environment,omitempty"`
	Resource    *ResourceOutput    `json:"resource,omitempty"`
}

ResourceRunOutput holds the output of the ResourceRun entity.

func ExposeResourceRun added in v0.6.0

func ExposeResourceRun(_rr *ResourceRun) *ResourceRunOutput

ExposeResourceRun converts the ResourceRun to ResourceRunOutput.

func ExposeResourceRuns added in v0.6.0

func ExposeResourceRuns(_rrs []*ResourceRun) []*ResourceRunOutput

ExposeResourceRuns converts the ResourceRun slice to ResourceRunOutput pointer slice.

type ResourceRunPatchInput added in v0.6.0

type ResourceRunPatchInput struct {
	ResourceRunQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `path:"-" query:"-" json:"status,omitempty"`
	// Name of the template.
	TemplateName string `path:"-" query:"-" json:"templateName,omitempty"`
	// Version of the template.
	TemplateVersion string `path:"-" query:"-" json:"templateVersion,omitempty"`
	// ID of the template.
	TemplateID object.ID `path:"-" query:"-" json:"templateID,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes,omitempty"`
	// Variables of the run.
	Variables crypto.Map[string, string] `path:"-" query:"-" json:"variables,omitempty"`
	// Input configs of the run.
	InputConfigs map[string][]uint8 `path:"-" query:"-" json:"inputConfigs,omitempty"`
	// Type of deployer.
	DeployerType string `path:"-" query:"-" json:"deployerType,omitempty"`
	// Duration in seconds of the run deploying.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Previous provider requirement of the run.
	PreviousRequiredProviders []types.ProviderRequirement `path:"-" query:"-" json:"previousRequiredProviders,omitempty"`
	// Record of the run plan.
	PlanRecord string `path:"-" query:"-" json:"planRecord,omitempty"`
	// Record of the run.
	Record string `path:"-" query:"-" json:"record,omitempty"`
	// Change comment of the run.
	ChangeComment string `path:"-" query:"-" json:"changeComment,omitempty"`
	// User who created the run.
	CreatedBy string `path:"-" query:"-" json:"createdBy,omitempty"`
	// Type of the run.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// If the run is preview.
	Preview bool `path:"-" query:"-" json:"preview,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Changes of the resource components.
	ComponentChanges []*types.ResourceComponentChange `path:"-" query:"-" json:"componentChanges,omitempty"`
	// Change summary of the resource.
	ComponentChangeSummary types.ResourceComponentChangeSummary `path:"-" query:"-" json:"componentChangeSummary,omitempty"`
	// contains filtered or unexported fields
}

ResourceRunPatchInput holds the patch input of the ResourceRun entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRunPatchInput) Model added in v0.6.0

func (rrpi *ResourceRunPatchInput) Model() *ResourceRun

Model returns the ResourceRun patched entity, after validating.

func (*ResourceRunPatchInput) PatchModel added in v0.6.0

func (rrpi *ResourceRunPatchInput) PatchModel() *ResourceRun

PatchModel returns the ResourceRun partition entity for patching.

func (*ResourceRunPatchInput) SetGinContext added in v0.6.0

func (ic *ResourceRunPatchInput) SetGinContext(ctx *gin.Context)

func (*ResourceRunPatchInput) SetModelClient added in v0.6.0

func (ic *ResourceRunPatchInput) SetModelClient(cli *Client)

func (*ResourceRunPatchInput) Validate added in v0.6.0

func (rrpi *ResourceRunPatchInput) Validate() error

Validate checks the ResourceRunPatchInput entity.

func (*ResourceRunPatchInput) ValidateWith added in v0.6.0

func (rrpi *ResourceRunPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunPatchInput entity with the given context and client set.

type ResourceRunQuery added in v0.6.0

type ResourceRunQuery struct {
	// contains filtered or unexported fields
}

ResourceRunQuery is the builder for querying ResourceRun entities.

func (*ResourceRunQuery) Aggregate added in v0.6.0

func (rrq *ResourceRunQuery) Aggregate(fns ...AggregateFunc) *ResourceRunSelect

Aggregate returns a ResourceRunSelect configured with the given aggregations.

func (*ResourceRunQuery) All added in v0.6.0

func (rrq *ResourceRunQuery) All(ctx context.Context) ([]*ResourceRun, error)

All executes the query and returns a list of ResourceRuns.

func (*ResourceRunQuery) AllX added in v0.6.0

func (rrq *ResourceRunQuery) AllX(ctx context.Context) []*ResourceRun

AllX is like All, but panics if an error occurs.

func (*ResourceRunQuery) Clone added in v0.6.0

func (rrq *ResourceRunQuery) Clone() *ResourceRunQuery

Clone returns a duplicate of the ResourceRunQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ResourceRunQuery) Count added in v0.6.0

func (rrq *ResourceRunQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ResourceRunQuery) CountX added in v0.6.0

func (rrq *ResourceRunQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ResourceRunQuery) ExecContext added in v0.6.0

func (c *ResourceRunQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRunQuery) Exist added in v0.6.0

func (rrq *ResourceRunQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ResourceRunQuery) ExistX added in v0.6.0

func (rrq *ResourceRunQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ResourceRunQuery) First added in v0.6.0

func (rrq *ResourceRunQuery) First(ctx context.Context) (*ResourceRun, error)

First returns the first ResourceRun entity from the query. Returns a *NotFoundError when no ResourceRun was found.

func (*ResourceRunQuery) FirstID added in v0.6.0

func (rrq *ResourceRunQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first ResourceRun ID from the query. Returns a *NotFoundError when no ResourceRun ID was found.

func (*ResourceRunQuery) FirstIDX added in v0.6.0

func (rrq *ResourceRunQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ResourceRunQuery) FirstX added in v0.6.0

func (rrq *ResourceRunQuery) FirstX(ctx context.Context) *ResourceRun

FirstX is like First, but panics if an error occurs.

func (*ResourceRunQuery) ForShare added in v0.6.0

func (rrq *ResourceRunQuery) ForShare(opts ...sql.LockOption) *ResourceRunQuery

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 (*ResourceRunQuery) ForUpdate added in v0.6.0

func (rrq *ResourceRunQuery) ForUpdate(opts ...sql.LockOption) *ResourceRunQuery

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 (*ResourceRunQuery) GroupBy added in v0.6.0

func (rrq *ResourceRunQuery) GroupBy(field string, fields ...string) *ResourceRunGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ResourceRun.Query().
	GroupBy(resourcerun.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ResourceRunQuery) IDs added in v0.6.0

func (rrq *ResourceRunQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of ResourceRun IDs.

func (*ResourceRunQuery) IDsX added in v0.6.0

func (rrq *ResourceRunQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*ResourceRunQuery) Limit added in v0.6.0

func (rrq *ResourceRunQuery) Limit(limit int) *ResourceRunQuery

Limit the number of records to be returned by this query.

func (*ResourceRunQuery) Modify added in v0.6.0

func (rrq *ResourceRunQuery) Modify(modifiers ...func(s *sql.Selector)) *ResourceRunSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ResourceRunQuery) Offset added in v0.6.0

func (rrq *ResourceRunQuery) Offset(offset int) *ResourceRunQuery

Offset to start from.

func (*ResourceRunQuery) Only added in v0.6.0

func (rrq *ResourceRunQuery) Only(ctx context.Context) (*ResourceRun, error)

Only returns a single ResourceRun entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ResourceRun entity is found. Returns a *NotFoundError when no ResourceRun entities are found.

func (*ResourceRunQuery) OnlyID added in v0.6.0

func (rrq *ResourceRunQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only ResourceRun ID in the query. Returns a *NotSingularError when more than one ResourceRun ID is found. Returns a *NotFoundError when no entities are found.

func (*ResourceRunQuery) OnlyIDX added in v0.6.0

func (rrq *ResourceRunQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ResourceRunQuery) OnlyX added in v0.6.0

func (rrq *ResourceRunQuery) OnlyX(ctx context.Context) *ResourceRun

OnlyX is like Only, but panics if an error occurs.

func (*ResourceRunQuery) Order added in v0.6.0

Order specifies how the records should be ordered.

func (*ResourceRunQuery) QueryContext added in v0.6.0

func (c *ResourceRunQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRunQuery) QueryEnvironment added in v0.6.0

func (rrq *ResourceRunQuery) QueryEnvironment() *EnvironmentQuery

QueryEnvironment chains the current query on the "environment" edge.

func (*ResourceRunQuery) QueryProject added in v0.6.0

func (rrq *ResourceRunQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*ResourceRunQuery) QueryResource added in v0.6.0

func (rrq *ResourceRunQuery) QueryResource() *ResourceQuery

QueryResource chains the current query on the "resource" edge.

func (*ResourceRunQuery) Select added in v0.6.0

func (rrq *ResourceRunQuery) Select(fields ...string) *ResourceRunSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.ResourceRun.Query().
	Select(resourcerun.FieldCreateTime).
	Scan(ctx, &v)

func (*ResourceRunQuery) Unique added in v0.6.0

func (rrq *ResourceRunQuery) Unique(unique bool) *ResourceRunQuery

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 (*ResourceRunQuery) Where added in v0.6.0

Where adds a new predicate for the ResourceRunQuery builder.

func (*ResourceRunQuery) WhereP added in v0.6.0

func (rrq *ResourceRunQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceRunQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ResourceRunQuery) WithEnvironment added in v0.6.0

func (rrq *ResourceRunQuery) WithEnvironment(opts ...func(*EnvironmentQuery)) *ResourceRunQuery

WithEnvironment tells the query-builder to eager-load the nodes that are connected to the "environment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceRunQuery) WithProject added in v0.6.0

func (rrq *ResourceRunQuery) WithProject(opts ...func(*ProjectQuery)) *ResourceRunQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*ResourceRunQuery) WithResource added in v0.6.0

func (rrq *ResourceRunQuery) WithResource(opts ...func(*ResourceQuery)) *ResourceRunQuery

WithResource tells the query-builder to eager-load the nodes that are connected to the "resource" edge. The optional arguments are used to configure the query builder of the edge.

type ResourceRunQueryInput added in v0.6.0

type ResourceRunQueryInput struct {

	// Project indicates to query ResourceRun entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project"`
	// Environment indicates to query ResourceRun entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"environment"`
	// Resource indicates to query ResourceRun entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"resource"`

	// Refer holds the route path reference of the ResourceRun entity.
	Refer *object.Refer `path:"resourcerun,default=" query:"-" json:"-"`
	// ID of the ResourceRun entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

ResourceRunQueryInput holds the query input of the ResourceRun entity, please tags with `path:",inline"` if embedding.

func (*ResourceRunQueryInput) Model added in v0.6.0

func (rrqi *ResourceRunQueryInput) Model() *ResourceRun

Model returns the ResourceRun entity for querying, after validating.

func (*ResourceRunQueryInput) SetGinContext added in v0.6.0

func (ic *ResourceRunQueryInput) SetGinContext(ctx *gin.Context)

func (*ResourceRunQueryInput) SetModelClient added in v0.6.0

func (ic *ResourceRunQueryInput) SetModelClient(cli *Client)

func (*ResourceRunQueryInput) Validate added in v0.6.0

func (rrqi *ResourceRunQueryInput) Validate() error

Validate checks the ResourceRunQueryInput entity.

func (*ResourceRunQueryInput) ValidateWith added in v0.6.0

func (rrqi *ResourceRunQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunQueryInput entity with the given context and client set.

type ResourceRunQueryInputs added in v0.6.0

type ResourceRunQueryInputs struct {

	// Project indicates to query ResourceRun entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to query ResourceRun entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to query ResourceRun entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

ResourceRunQueryInputs holds the query input of the ResourceRun entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ResourceRunQueryInputs) SetGinContext added in v0.6.0

func (ic *ResourceRunQueryInputs) SetGinContext(ctx *gin.Context)

func (*ResourceRunQueryInputs) SetModelClient added in v0.6.0

func (ic *ResourceRunQueryInputs) SetModelClient(cli *Client)

func (*ResourceRunQueryInputs) Validate added in v0.6.0

func (rrqi *ResourceRunQueryInputs) Validate() error

Validate checks the ResourceRunQueryInputs entity.

func (*ResourceRunQueryInputs) ValidateWith added in v0.6.0

func (rrqi *ResourceRunQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunQueryInputs entity with the given context and client set.

type ResourceRunSelect added in v0.6.0

type ResourceRunSelect struct {
	*ResourceRunQuery
	// contains filtered or unexported fields
}

ResourceRunSelect is the builder for selecting fields of ResourceRun entities.

func (*ResourceRunSelect) Aggregate added in v0.6.0

func (rrs *ResourceRunSelect) Aggregate(fns ...AggregateFunc) *ResourceRunSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ResourceRunSelect) Bool added in v0.6.0

func (s *ResourceRunSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceRunSelect) BoolX added in v0.6.0

func (s *ResourceRunSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceRunSelect) Bools added in v0.6.0

func (s *ResourceRunSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceRunSelect) BoolsX added in v0.6.0

func (s *ResourceRunSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ResourceRunSelect) ExecContext added in v0.6.0

func (c ResourceRunSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRunSelect) Float64 added in v0.6.0

func (s *ResourceRunSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceRunSelect) Float64X added in v0.6.0

func (s *ResourceRunSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceRunSelect) Float64s added in v0.6.0

func (s *ResourceRunSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceRunSelect) Float64sX added in v0.6.0

func (s *ResourceRunSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceRunSelect) Int added in v0.6.0

func (s *ResourceRunSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceRunSelect) IntX added in v0.6.0

func (s *ResourceRunSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceRunSelect) Ints added in v0.6.0

func (s *ResourceRunSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceRunSelect) IntsX added in v0.6.0

func (s *ResourceRunSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceRunSelect) Modify added in v0.6.0

func (rrs *ResourceRunSelect) Modify(modifiers ...func(s *sql.Selector)) *ResourceRunSelect

Modify adds a query modifier for attaching custom logic to queries.

func (ResourceRunSelect) QueryContext added in v0.6.0

func (c ResourceRunSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRunSelect) Scan added in v0.6.0

func (rrs *ResourceRunSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceRunSelect) ScanX added in v0.6.0

func (s *ResourceRunSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceRunSelect) String added in v0.6.0

func (s *ResourceRunSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceRunSelect) StringX added in v0.6.0

func (s *ResourceRunSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceRunSelect) Strings added in v0.6.0

func (s *ResourceRunSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceRunSelect) StringsX added in v0.6.0

func (s *ResourceRunSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceRunUpdate added in v0.6.0

type ResourceRunUpdate struct {
	// contains filtered or unexported fields
}

ResourceRunUpdate is the builder for updating ResourceRun entities.

func (*ResourceRunUpdate) AddDuration added in v0.6.0

func (rru *ResourceRunUpdate) AddDuration(i int) *ResourceRunUpdate

AddDuration adds i to the "duration" field.

func (*ResourceRunUpdate) AppendComponentChanges added in v0.6.0

func (rru *ResourceRunUpdate) AppendComponentChanges(tcc []*types.ResourceComponentChange) *ResourceRunUpdate

AppendComponentChanges appends tcc to the "component_changes" field.

func (*ResourceRunUpdate) AppendPreviousRequiredProviders added in v0.6.0

func (rru *ResourceRunUpdate) AppendPreviousRequiredProviders(tr []types.ProviderRequirement) *ResourceRunUpdate

AppendPreviousRequiredProviders appends tr to the "previous_required_providers" field.

func (*ResourceRunUpdate) ClearAnnotations added in v0.6.0

func (rru *ResourceRunUpdate) ClearAnnotations() *ResourceRunUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceRunUpdate) ClearAttributes added in v0.6.0

func (rru *ResourceRunUpdate) ClearAttributes() *ResourceRunUpdate

ClearAttributes clears the value of the "attributes" field.

func (*ResourceRunUpdate) ClearChangeComment added in v0.6.0

func (rru *ResourceRunUpdate) ClearChangeComment() *ResourceRunUpdate

ClearChangeComment clears the value of the "change_comment" field.

func (*ResourceRunUpdate) ClearComponentChangeSummary added in v0.6.0

func (rru *ResourceRunUpdate) ClearComponentChangeSummary() *ResourceRunUpdate

ClearComponentChangeSummary clears the value of the "component_change_summary" field.

func (*ResourceRunUpdate) ClearComponentChanges added in v0.6.0

func (rru *ResourceRunUpdate) ClearComponentChanges() *ResourceRunUpdate

ClearComponentChanges clears the value of the "component_changes" field.

func (*ResourceRunUpdate) ClearComputedAttributes added in v0.6.0

func (rru *ResourceRunUpdate) ClearComputedAttributes() *ResourceRunUpdate

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceRunUpdate) ClearLabels added in v0.6.0

func (rru *ResourceRunUpdate) ClearLabels() *ResourceRunUpdate

ClearLabels clears the value of the "labels" field.

func (*ResourceRunUpdate) ClearPlanRecord added in v0.6.0

func (rru *ResourceRunUpdate) ClearPlanRecord() *ResourceRunUpdate

ClearPlanRecord clears the value of the "plan_record" field.

func (*ResourceRunUpdate) ClearRecord added in v0.6.0

func (rru *ResourceRunUpdate) ClearRecord() *ResourceRunUpdate

ClearRecord clears the value of the "record" field.

func (*ResourceRunUpdate) ClearStatus added in v0.6.0

func (rru *ResourceRunUpdate) ClearStatus() *ResourceRunUpdate

ClearStatus clears the value of the "status" field.

func (*ResourceRunUpdate) Exec added in v0.6.0

func (rru *ResourceRunUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceRunUpdate) ExecContext added in v0.6.0

func (c *ResourceRunUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRunUpdate) ExecX added in v0.6.0

func (rru *ResourceRunUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRunUpdate) Modify added in v0.6.0

func (rru *ResourceRunUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceRunUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceRunUpdate) Mutation added in v0.6.0

func (rru *ResourceRunUpdate) Mutation() *ResourceRunMutation

Mutation returns the ResourceRunMutation object of the builder.

func (*ResourceRunUpdate) QueryContext added in v0.6.0

func (c *ResourceRunUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRunUpdate) Save added in v0.6.0

func (rru *ResourceRunUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ResourceRunUpdate) SaveX added in v0.6.0

func (rru *ResourceRunUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ResourceRunUpdate) Set added in v0.6.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceRunUpdate) SetAnnotations added in v0.6.0

func (rru *ResourceRunUpdate) SetAnnotations(m map[string]string) *ResourceRunUpdate

SetAnnotations sets the "annotations" field.

func (*ResourceRunUpdate) SetAttributes added in v0.6.0

func (rru *ResourceRunUpdate) SetAttributes(pr property.Values) *ResourceRunUpdate

SetAttributes sets the "attributes" field.

func (*ResourceRunUpdate) SetChangeComment added in v0.6.0

func (rru *ResourceRunUpdate) SetChangeComment(s string) *ResourceRunUpdate

SetChangeComment sets the "change_comment" field.

func (*ResourceRunUpdate) SetComponentChangeSummary added in v0.6.0

func (rru *ResourceRunUpdate) SetComponentChangeSummary(tccs types.ResourceComponentChangeSummary) *ResourceRunUpdate

SetComponentChangeSummary sets the "component_change_summary" field.

func (*ResourceRunUpdate) SetComponentChanges added in v0.6.0

func (rru *ResourceRunUpdate) SetComponentChanges(tcc []*types.ResourceComponentChange) *ResourceRunUpdate

SetComponentChanges sets the "component_changes" field.

func (*ResourceRunUpdate) SetComputedAttributes added in v0.6.0

func (rru *ResourceRunUpdate) SetComputedAttributes(pr property.Values) *ResourceRunUpdate

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceRunUpdate) SetCreatedBy added in v0.6.0

func (rru *ResourceRunUpdate) SetCreatedBy(s string) *ResourceRunUpdate

SetCreatedBy sets the "created_by" field.

func (*ResourceRunUpdate) SetDeployerType added in v0.6.0

func (rru *ResourceRunUpdate) SetDeployerType(s string) *ResourceRunUpdate

SetDeployerType sets the "deployer_type" field.

func (*ResourceRunUpdate) SetDuration added in v0.6.0

func (rru *ResourceRunUpdate) SetDuration(i int) *ResourceRunUpdate

SetDuration sets the "duration" field.

func (*ResourceRunUpdate) SetInputConfigs added in v0.6.0

func (rru *ResourceRunUpdate) SetInputConfigs(m map[string][]uint8) *ResourceRunUpdate

SetInputConfigs sets the "input_configs" field.

func (*ResourceRunUpdate) SetLabels added in v0.6.0

func (rru *ResourceRunUpdate) SetLabels(m map[string]string) *ResourceRunUpdate

SetLabels sets the "labels" field.

func (*ResourceRunUpdate) SetNillableChangeComment added in v0.6.0

func (rru *ResourceRunUpdate) SetNillableChangeComment(s *string) *ResourceRunUpdate

SetNillableChangeComment sets the "change_comment" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillableComponentChangeSummary added in v0.6.0

func (rru *ResourceRunUpdate) SetNillableComponentChangeSummary(tccs *types.ResourceComponentChangeSummary) *ResourceRunUpdate

SetNillableComponentChangeSummary sets the "component_change_summary" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillableCreatedBy added in v0.6.0

func (rru *ResourceRunUpdate) SetNillableCreatedBy(s *string) *ResourceRunUpdate

SetNillableCreatedBy sets the "created_by" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillableDeployerType added in v0.6.0

func (rru *ResourceRunUpdate) SetNillableDeployerType(s *string) *ResourceRunUpdate

SetNillableDeployerType sets the "deployer_type" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillableDuration added in v0.6.0

func (rru *ResourceRunUpdate) SetNillableDuration(i *int) *ResourceRunUpdate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillablePlanRecord added in v0.6.0

func (rru *ResourceRunUpdate) SetNillablePlanRecord(s *string) *ResourceRunUpdate

SetNillablePlanRecord sets the "plan_record" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillablePreview added in v0.6.0

func (rru *ResourceRunUpdate) SetNillablePreview(b *bool) *ResourceRunUpdate

SetNillablePreview sets the "preview" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillableRecord added in v0.6.0

func (rru *ResourceRunUpdate) SetNillableRecord(s *string) *ResourceRunUpdate

SetNillableRecord sets the "record" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillableStatus added in v0.6.0

func (rru *ResourceRunUpdate) SetNillableStatus(s *status.Status) *ResourceRunUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillableTemplateVersion added in v0.6.0

func (rru *ResourceRunUpdate) SetNillableTemplateVersion(s *string) *ResourceRunUpdate

SetNillableTemplateVersion sets the "template_version" field if the given value is not nil.

func (*ResourceRunUpdate) SetNillableType added in v0.6.0

func (rru *ResourceRunUpdate) SetNillableType(s *string) *ResourceRunUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*ResourceRunUpdate) SetPlanRecord added in v0.6.0

func (rru *ResourceRunUpdate) SetPlanRecord(s string) *ResourceRunUpdate

SetPlanRecord sets the "plan_record" field.

func (*ResourceRunUpdate) SetPreview added in v0.6.0

func (rru *ResourceRunUpdate) SetPreview(b bool) *ResourceRunUpdate

SetPreview sets the "preview" field.

func (*ResourceRunUpdate) SetPreviousRequiredProviders added in v0.6.0

func (rru *ResourceRunUpdate) SetPreviousRequiredProviders(tr []types.ProviderRequirement) *ResourceRunUpdate

SetPreviousRequiredProviders sets the "previous_required_providers" field.

func (*ResourceRunUpdate) SetRecord added in v0.6.0

func (rru *ResourceRunUpdate) SetRecord(s string) *ResourceRunUpdate

SetRecord sets the "record" field.

func (*ResourceRunUpdate) SetStatus added in v0.6.0

func (rru *ResourceRunUpdate) SetStatus(s status.Status) *ResourceRunUpdate

SetStatus sets the "status" field.

func (*ResourceRunUpdate) SetTemplateVersion added in v0.6.0

func (rru *ResourceRunUpdate) SetTemplateVersion(s string) *ResourceRunUpdate

SetTemplateVersion sets the "template_version" field.

func (*ResourceRunUpdate) SetType added in v0.6.0

func (rru *ResourceRunUpdate) SetType(s string) *ResourceRunUpdate

SetType sets the "type" field.

func (*ResourceRunUpdate) SetVariables added in v0.6.0

func (rru *ResourceRunUpdate) SetVariables(c crypto.Map[string, string]) *ResourceRunUpdate

SetVariables sets the "variables" field.

func (*ResourceRunUpdate) Where added in v0.6.0

Where appends a list predicates to the ResourceRunUpdate builder.

type ResourceRunUpdateInput added in v0.6.0

type ResourceRunUpdateInput struct {
	ResourceRunQueryInput `path:",inline" query:"-" json:"-"`

	// Version of the template.
	TemplateVersion string `path:"-" query:"-" json:"templateVersion,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes,omitempty"`
	// Variables of the run.
	Variables crypto.Map[string, string] `path:"-" query:"-" json:"variables,omitempty"`
	// Input configs of the run.
	InputConfigs map[string][]uint8 `path:"-" query:"-" json:"inputConfigs,omitempty"`
	// Type of deployer.
	DeployerType string `path:"-" query:"-" json:"deployerType,omitempty"`
	// Duration in seconds of the run deploying.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Previous provider requirement of the run.
	PreviousRequiredProviders []types.ProviderRequirement `path:"-" query:"-" json:"previousRequiredProviders,omitempty"`
	// Record of the run plan.
	PlanRecord string `path:"-" query:"-" json:"planRecord,omitempty"`
	// Record of the run.
	Record string `path:"-" query:"-" json:"record,omitempty"`
	// Change comment of the run.
	ChangeComment string `path:"-" query:"-" json:"changeComment,omitempty"`
	// If the run is preview.
	Preview bool `path:"-" query:"-" json:"preview,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Changes of the resource components.
	ComponentChanges []*types.ResourceComponentChange `path:"-" query:"-" json:"componentChanges,omitempty"`
	// Change summary of the resource.
	ComponentChangeSummary types.ResourceComponentChangeSummary `path:"-" query:"-" json:"componentChangeSummary,omitempty"`
}

ResourceRunUpdateInput holds the modification input of the ResourceRun entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRunUpdateInput) Model added in v0.6.0

func (rrui *ResourceRunUpdateInput) Model() *ResourceRun

Model returns the ResourceRun entity for modifying, after validating.

func (*ResourceRunUpdateInput) SetGinContext added in v0.6.0

func (ic *ResourceRunUpdateInput) SetGinContext(ctx *gin.Context)

func (*ResourceRunUpdateInput) SetModelClient added in v0.6.0

func (ic *ResourceRunUpdateInput) SetModelClient(cli *Client)

func (*ResourceRunUpdateInput) Validate added in v0.6.0

func (rrui *ResourceRunUpdateInput) Validate() error

Validate checks the ResourceRunUpdateInput entity.

func (*ResourceRunUpdateInput) ValidateWith added in v0.6.0

func (rrui *ResourceRunUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunUpdateInput entity with the given context and client set.

type ResourceRunUpdateInputs added in v0.6.0

type ResourceRunUpdateInputs struct {

	// Project indicates to update ResourceRun entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to update ResourceRun entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// Resource indicates to update ResourceRun entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceRunUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceRunUpdateInputs holds the modification input of the ResourceRun entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceRunUpdateInputs) IDs added in v0.6.0

func (rrui *ResourceRunUpdateInputs) IDs() []object.ID

IDs returns the ID list of the ResourceRun entities for modifying, after validating.

func (*ResourceRunUpdateInputs) Model added in v0.6.0

func (rrui *ResourceRunUpdateInputs) Model() []*ResourceRun

Model returns the ResourceRun entities for modifying, after validating.

func (*ResourceRunUpdateInputs) SetGinContext added in v0.6.0

func (ic *ResourceRunUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceRunUpdateInputs) SetModelClient added in v0.6.0

func (ic *ResourceRunUpdateInputs) SetModelClient(cli *Client)

func (*ResourceRunUpdateInputs) Validate added in v0.6.0

func (rrui *ResourceRunUpdateInputs) Validate() error

Validate checks the ResourceRunUpdateInputs entity.

func (*ResourceRunUpdateInputs) ValidateWith added in v0.6.0

func (rrui *ResourceRunUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunUpdateInputs entity with the given context and client set.

type ResourceRunUpdateInputsItem added in v0.6.0

type ResourceRunUpdateInputsItem struct {
	// ID of the ResourceRun entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Version of the template.
	TemplateVersion string `path:"-" query:"-" json:"templateVersion"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes,omitempty"`
	// Variables of the run.
	Variables crypto.Map[string, string] `path:"-" query:"-" json:"variables"`
	// Input configs of the run.
	InputConfigs map[string][]uint8 `path:"-" query:"-" json:"inputConfigs"`
	// Type of deployer.
	DeployerType string `path:"-" query:"-" json:"deployerType"`
	// Duration in seconds of the run deploying.
	Duration int `path:"-" query:"-" json:"duration"`
	// Previous provider requirement of the run.
	PreviousRequiredProviders []types.ProviderRequirement `path:"-" query:"-" json:"previousRequiredProviders"`
	// Record of the run plan.
	PlanRecord string `path:"-" query:"-" json:"planRecord,omitempty"`
	// Record of the run.
	Record string `path:"-" query:"-" json:"record,omitempty"`
	// Change comment of the run.
	ChangeComment string `path:"-" query:"-" json:"changeComment,omitempty"`
	// If the run is preview.
	Preview bool `path:"-" query:"-" json:"preview"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Changes of the resource components.
	ComponentChanges []*types.ResourceComponentChange `path:"-" query:"-" json:"componentChanges,omitempty"`
	// Change summary of the resource.
	ComponentChangeSummary types.ResourceComponentChangeSummary `path:"-" query:"-" json:"componentChangeSummary,omitempty"`
}

ResourceRunUpdateInputs holds the modification input item of the ResourceRun entities.

func (*ResourceRunUpdateInputsItem) ValidateWith added in v0.6.0

func (rrui *ResourceRunUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceRunUpdateInputsItem entity with the given context and client set.

type ResourceRunUpdateOne added in v0.6.0

type ResourceRunUpdateOne struct {
	// contains filtered or unexported fields
}

ResourceRunUpdateOne is the builder for updating a single ResourceRun entity.

func (*ResourceRunUpdateOne) AddDuration added in v0.6.0

func (rruo *ResourceRunUpdateOne) AddDuration(i int) *ResourceRunUpdateOne

AddDuration adds i to the "duration" field.

func (*ResourceRunUpdateOne) AppendComponentChanges added in v0.6.0

func (rruo *ResourceRunUpdateOne) AppendComponentChanges(tcc []*types.ResourceComponentChange) *ResourceRunUpdateOne

AppendComponentChanges appends tcc to the "component_changes" field.

func (*ResourceRunUpdateOne) AppendPreviousRequiredProviders added in v0.6.0

func (rruo *ResourceRunUpdateOne) AppendPreviousRequiredProviders(tr []types.ProviderRequirement) *ResourceRunUpdateOne

AppendPreviousRequiredProviders appends tr to the "previous_required_providers" field.

func (*ResourceRunUpdateOne) ClearAnnotations added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearAnnotations() *ResourceRunUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceRunUpdateOne) ClearAttributes added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearAttributes() *ResourceRunUpdateOne

ClearAttributes clears the value of the "attributes" field.

func (*ResourceRunUpdateOne) ClearChangeComment added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearChangeComment() *ResourceRunUpdateOne

ClearChangeComment clears the value of the "change_comment" field.

func (*ResourceRunUpdateOne) ClearComponentChangeSummary added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearComponentChangeSummary() *ResourceRunUpdateOne

ClearComponentChangeSummary clears the value of the "component_change_summary" field.

func (*ResourceRunUpdateOne) ClearComponentChanges added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearComponentChanges() *ResourceRunUpdateOne

ClearComponentChanges clears the value of the "component_changes" field.

func (*ResourceRunUpdateOne) ClearComputedAttributes added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearComputedAttributes() *ResourceRunUpdateOne

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceRunUpdateOne) ClearLabels added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearLabels() *ResourceRunUpdateOne

ClearLabels clears the value of the "labels" field.

func (*ResourceRunUpdateOne) ClearPlanRecord added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearPlanRecord() *ResourceRunUpdateOne

ClearPlanRecord clears the value of the "plan_record" field.

func (*ResourceRunUpdateOne) ClearRecord added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearRecord() *ResourceRunUpdateOne

ClearRecord clears the value of the "record" field.

func (*ResourceRunUpdateOne) ClearStatus added in v0.6.0

func (rruo *ResourceRunUpdateOne) ClearStatus() *ResourceRunUpdateOne

ClearStatus clears the value of the "status" field.

func (*ResourceRunUpdateOne) Exec added in v0.6.0

func (rruo *ResourceRunUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ResourceRunUpdateOne) ExecContext added in v0.6.0

func (c *ResourceRunUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceRunUpdateOne) ExecE added in v0.6.0

func (rruo *ResourceRunUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRun) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*ResourceRunUpdateOne) ExecEX added in v0.6.0

func (rruo *ResourceRunUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRun) error)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRunUpdateOne) ExecX added in v0.6.0

func (rruo *ResourceRunUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRunUpdateOne) Modify added in v0.6.0

func (rruo *ResourceRunUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceRunUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceRunUpdateOne) Mutation added in v0.6.0

func (rruo *ResourceRunUpdateOne) Mutation() *ResourceRunMutation

Mutation returns the ResourceRunMutation object of the builder.

func (*ResourceRunUpdateOne) QueryContext added in v0.6.0

func (c *ResourceRunUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceRunUpdateOne) Save added in v0.6.0

Save executes the query and returns the updated ResourceRun entity.

func (*ResourceRunUpdateOne) SaveE added in v0.6.0

func (rruo *ResourceRunUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRun) error) (*ResourceRun, error)

SaveE calls the given function after updated the ResourceRun entity, which is always good for cascading update operations.

func (*ResourceRunUpdateOne) SaveEX added in v0.6.0

func (rruo *ResourceRunUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRun) error) *ResourceRun

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceRunUpdateOne) SaveX added in v0.6.0

func (rruo *ResourceRunUpdateOne) SaveX(ctx context.Context) *ResourceRun

SaveX is like Save, but panics if an error occurs.

func (*ResourceRunUpdateOne) Select added in v0.6.0

func (rruo *ResourceRunUpdateOne) Select(field string, fields ...string) *ResourceRunUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ResourceRunUpdateOne) Set added in v0.6.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*ResourceRunUpdateOne) SetAnnotations added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetAnnotations(m map[string]string) *ResourceRunUpdateOne

SetAnnotations sets the "annotations" field.

func (*ResourceRunUpdateOne) SetAttributes added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetAttributes(pr property.Values) *ResourceRunUpdateOne

SetAttributes sets the "attributes" field.

func (*ResourceRunUpdateOne) SetChangeComment added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetChangeComment(s string) *ResourceRunUpdateOne

SetChangeComment sets the "change_comment" field.

func (*ResourceRunUpdateOne) SetComponentChangeSummary added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetComponentChangeSummary(tccs types.ResourceComponentChangeSummary) *ResourceRunUpdateOne

SetComponentChangeSummary sets the "component_change_summary" field.

func (*ResourceRunUpdateOne) SetComponentChanges added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetComponentChanges(tcc []*types.ResourceComponentChange) *ResourceRunUpdateOne

SetComponentChanges sets the "component_changes" field.

func (*ResourceRunUpdateOne) SetComputedAttributes added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetComputedAttributes(pr property.Values) *ResourceRunUpdateOne

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceRunUpdateOne) SetCreatedBy added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetCreatedBy(s string) *ResourceRunUpdateOne

SetCreatedBy sets the "created_by" field.

func (*ResourceRunUpdateOne) SetDeployerType added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetDeployerType(s string) *ResourceRunUpdateOne

SetDeployerType sets the "deployer_type" field.

func (*ResourceRunUpdateOne) SetDuration added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetDuration(i int) *ResourceRunUpdateOne

SetDuration sets the "duration" field.

func (*ResourceRunUpdateOne) SetInputConfigs added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetInputConfigs(m map[string][]uint8) *ResourceRunUpdateOne

SetInputConfigs sets the "input_configs" field.

func (*ResourceRunUpdateOne) SetLabels added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetLabels(m map[string]string) *ResourceRunUpdateOne

SetLabels sets the "labels" field.

func (*ResourceRunUpdateOne) SetNillableChangeComment added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillableChangeComment(s *string) *ResourceRunUpdateOne

SetNillableChangeComment sets the "change_comment" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillableComponentChangeSummary added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillableComponentChangeSummary(tccs *types.ResourceComponentChangeSummary) *ResourceRunUpdateOne

SetNillableComponentChangeSummary sets the "component_change_summary" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillableCreatedBy added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillableCreatedBy(s *string) *ResourceRunUpdateOne

SetNillableCreatedBy sets the "created_by" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillableDeployerType added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillableDeployerType(s *string) *ResourceRunUpdateOne

SetNillableDeployerType sets the "deployer_type" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillableDuration added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillableDuration(i *int) *ResourceRunUpdateOne

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillablePlanRecord added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillablePlanRecord(s *string) *ResourceRunUpdateOne

SetNillablePlanRecord sets the "plan_record" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillablePreview added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillablePreview(b *bool) *ResourceRunUpdateOne

SetNillablePreview sets the "preview" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillableRecord added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillableRecord(s *string) *ResourceRunUpdateOne

SetNillableRecord sets the "record" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillableStatus added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillableStatus(s *status.Status) *ResourceRunUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillableTemplateVersion added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillableTemplateVersion(s *string) *ResourceRunUpdateOne

SetNillableTemplateVersion sets the "template_version" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetNillableType added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetNillableType(s *string) *ResourceRunUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*ResourceRunUpdateOne) SetPlanRecord added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetPlanRecord(s string) *ResourceRunUpdateOne

SetPlanRecord sets the "plan_record" field.

func (*ResourceRunUpdateOne) SetPreview added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetPreview(b bool) *ResourceRunUpdateOne

SetPreview sets the "preview" field.

func (*ResourceRunUpdateOne) SetPreviousRequiredProviders added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetPreviousRequiredProviders(tr []types.ProviderRequirement) *ResourceRunUpdateOne

SetPreviousRequiredProviders sets the "previous_required_providers" field.

func (*ResourceRunUpdateOne) SetRecord added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetRecord(s string) *ResourceRunUpdateOne

SetRecord sets the "record" field.

func (*ResourceRunUpdateOne) SetStatus added in v0.6.0

SetStatus sets the "status" field.

func (*ResourceRunUpdateOne) SetTemplateVersion added in v0.6.0

func (rruo *ResourceRunUpdateOne) SetTemplateVersion(s string) *ResourceRunUpdateOne

SetTemplateVersion sets the "template_version" field.

func (*ResourceRunUpdateOne) SetType added in v0.6.0

SetType sets the "type" field.

func (*ResourceRunUpdateOne) SetVariables added in v0.6.0

SetVariables sets the "variables" field.

func (*ResourceRunUpdateOne) Where added in v0.6.0

Where appends a list predicates to the ResourceRunUpdate builder.

type ResourceRunUpsert added in v0.6.0

type ResourceRunUpsert struct {
	*sql.UpdateSet
}

ResourceRunUpsert is the "OnConflict" setter.

func (*ResourceRunUpsert) AddDuration added in v0.6.0

func (u *ResourceRunUpsert) AddDuration(v int) *ResourceRunUpsert

AddDuration adds v to the "duration" field.

func (*ResourceRunUpsert) ClearAnnotations added in v0.6.0

func (u *ResourceRunUpsert) ClearAnnotations() *ResourceRunUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceRunUpsert) ClearAttributes added in v0.6.0

func (u *ResourceRunUpsert) ClearAttributes() *ResourceRunUpsert

ClearAttributes clears the value of the "attributes" field.

func (*ResourceRunUpsert) ClearChangeComment added in v0.6.0

func (u *ResourceRunUpsert) ClearChangeComment() *ResourceRunUpsert

ClearChangeComment clears the value of the "change_comment" field.

func (*ResourceRunUpsert) ClearComponentChangeSummary added in v0.6.0

func (u *ResourceRunUpsert) ClearComponentChangeSummary() *ResourceRunUpsert

ClearComponentChangeSummary clears the value of the "component_change_summary" field.

func (*ResourceRunUpsert) ClearComponentChanges added in v0.6.0

func (u *ResourceRunUpsert) ClearComponentChanges() *ResourceRunUpsert

ClearComponentChanges clears the value of the "component_changes" field.

func (*ResourceRunUpsert) ClearComputedAttributes added in v0.6.0

func (u *ResourceRunUpsert) ClearComputedAttributes() *ResourceRunUpsert

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceRunUpsert) ClearLabels added in v0.6.0

func (u *ResourceRunUpsert) ClearLabels() *ResourceRunUpsert

ClearLabels clears the value of the "labels" field.

func (*ResourceRunUpsert) ClearPlanRecord added in v0.6.0

func (u *ResourceRunUpsert) ClearPlanRecord() *ResourceRunUpsert

ClearPlanRecord clears the value of the "plan_record" field.

func (*ResourceRunUpsert) ClearRecord added in v0.6.0

func (u *ResourceRunUpsert) ClearRecord() *ResourceRunUpsert

ClearRecord clears the value of the "record" field.

func (*ResourceRunUpsert) ClearStatus added in v0.6.0

func (u *ResourceRunUpsert) ClearStatus() *ResourceRunUpsert

ClearStatus clears the value of the "status" field.

func (*ResourceRunUpsert) SetAnnotations added in v0.6.0

func (u *ResourceRunUpsert) SetAnnotations(v map[string]string) *ResourceRunUpsert

SetAnnotations sets the "annotations" field.

func (*ResourceRunUpsert) SetAttributes added in v0.6.0

func (u *ResourceRunUpsert) SetAttributes(v property.Values) *ResourceRunUpsert

SetAttributes sets the "attributes" field.

func (*ResourceRunUpsert) SetChangeComment added in v0.6.0

func (u *ResourceRunUpsert) SetChangeComment(v string) *ResourceRunUpsert

SetChangeComment sets the "change_comment" field.

func (*ResourceRunUpsert) SetComponentChangeSummary added in v0.6.0

SetComponentChangeSummary sets the "component_change_summary" field.

func (*ResourceRunUpsert) SetComponentChanges added in v0.6.0

func (u *ResourceRunUpsert) SetComponentChanges(v []*types.ResourceComponentChange) *ResourceRunUpsert

SetComponentChanges sets the "component_changes" field.

func (*ResourceRunUpsert) SetComputedAttributes added in v0.6.0

func (u *ResourceRunUpsert) SetComputedAttributes(v property.Values) *ResourceRunUpsert

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceRunUpsert) SetCreatedBy added in v0.6.0

func (u *ResourceRunUpsert) SetCreatedBy(v string) *ResourceRunUpsert

SetCreatedBy sets the "created_by" field.

func (*ResourceRunUpsert) SetDeployerType added in v0.6.0

func (u *ResourceRunUpsert) SetDeployerType(v string) *ResourceRunUpsert

SetDeployerType sets the "deployer_type" field.

func (*ResourceRunUpsert) SetDuration added in v0.6.0

func (u *ResourceRunUpsert) SetDuration(v int) *ResourceRunUpsert

SetDuration sets the "duration" field.

func (*ResourceRunUpsert) SetInputConfigs added in v0.6.0

func (u *ResourceRunUpsert) SetInputConfigs(v map[string][]uint8) *ResourceRunUpsert

SetInputConfigs sets the "input_configs" field.

func (*ResourceRunUpsert) SetLabels added in v0.6.0

func (u *ResourceRunUpsert) SetLabels(v map[string]string) *ResourceRunUpsert

SetLabels sets the "labels" field.

func (*ResourceRunUpsert) SetPlanRecord added in v0.6.0

func (u *ResourceRunUpsert) SetPlanRecord(v string) *ResourceRunUpsert

SetPlanRecord sets the "plan_record" field.

func (*ResourceRunUpsert) SetPreview added in v0.6.0

func (u *ResourceRunUpsert) SetPreview(v bool) *ResourceRunUpsert

SetPreview sets the "preview" field.

func (*ResourceRunUpsert) SetPreviousRequiredProviders added in v0.6.0

func (u *ResourceRunUpsert) SetPreviousRequiredProviders(v []types.ProviderRequirement) *ResourceRunUpsert

SetPreviousRequiredProviders sets the "previous_required_providers" field.

func (*ResourceRunUpsert) SetRecord added in v0.6.0

func (u *ResourceRunUpsert) SetRecord(v string) *ResourceRunUpsert

SetRecord sets the "record" field.

func (*ResourceRunUpsert) SetStatus added in v0.6.0

SetStatus sets the "status" field.

func (*ResourceRunUpsert) SetTemplateVersion added in v0.6.0

func (u *ResourceRunUpsert) SetTemplateVersion(v string) *ResourceRunUpsert

SetTemplateVersion sets the "template_version" field.

func (*ResourceRunUpsert) SetType added in v0.6.0

SetType sets the "type" field.

func (*ResourceRunUpsert) SetVariables added in v0.6.0

SetVariables sets the "variables" field.

func (*ResourceRunUpsert) UpdateAnnotations added in v0.6.0

func (u *ResourceRunUpsert) UpdateAnnotations() *ResourceRunUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateAttributes added in v0.6.0

func (u *ResourceRunUpsert) UpdateAttributes() *ResourceRunUpsert

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateChangeComment added in v0.6.0

func (u *ResourceRunUpsert) UpdateChangeComment() *ResourceRunUpsert

UpdateChangeComment sets the "change_comment" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateComponentChangeSummary added in v0.6.0

func (u *ResourceRunUpsert) UpdateComponentChangeSummary() *ResourceRunUpsert

UpdateComponentChangeSummary sets the "component_change_summary" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateComponentChanges added in v0.6.0

func (u *ResourceRunUpsert) UpdateComponentChanges() *ResourceRunUpsert

UpdateComponentChanges sets the "component_changes" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateComputedAttributes added in v0.6.0

func (u *ResourceRunUpsert) UpdateComputedAttributes() *ResourceRunUpsert

UpdateComputedAttributes sets the "computed_attributes" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateCreatedBy added in v0.6.0

func (u *ResourceRunUpsert) UpdateCreatedBy() *ResourceRunUpsert

UpdateCreatedBy sets the "created_by" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateDeployerType added in v0.6.0

func (u *ResourceRunUpsert) UpdateDeployerType() *ResourceRunUpsert

UpdateDeployerType sets the "deployer_type" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateDuration added in v0.6.0

func (u *ResourceRunUpsert) UpdateDuration() *ResourceRunUpsert

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateInputConfigs added in v0.6.0

func (u *ResourceRunUpsert) UpdateInputConfigs() *ResourceRunUpsert

UpdateInputConfigs sets the "input_configs" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateLabels added in v0.6.0

func (u *ResourceRunUpsert) UpdateLabels() *ResourceRunUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdatePlanRecord added in v0.6.0

func (u *ResourceRunUpsert) UpdatePlanRecord() *ResourceRunUpsert

UpdatePlanRecord sets the "plan_record" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdatePreview added in v0.6.0

func (u *ResourceRunUpsert) UpdatePreview() *ResourceRunUpsert

UpdatePreview sets the "preview" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdatePreviousRequiredProviders added in v0.6.0

func (u *ResourceRunUpsert) UpdatePreviousRequiredProviders() *ResourceRunUpsert

UpdatePreviousRequiredProviders sets the "previous_required_providers" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateRecord added in v0.6.0

func (u *ResourceRunUpsert) UpdateRecord() *ResourceRunUpsert

UpdateRecord sets the "record" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateStatus added in v0.6.0

func (u *ResourceRunUpsert) UpdateStatus() *ResourceRunUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateTemplateVersion added in v0.6.0

func (u *ResourceRunUpsert) UpdateTemplateVersion() *ResourceRunUpsert

UpdateTemplateVersion sets the "template_version" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateType added in v0.6.0

func (u *ResourceRunUpsert) UpdateType() *ResourceRunUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*ResourceRunUpsert) UpdateVariables added in v0.6.0

func (u *ResourceRunUpsert) UpdateVariables() *ResourceRunUpsert

UpdateVariables sets the "variables" field to the value that was provided on create.

type ResourceRunUpsertBulk added in v0.6.0

type ResourceRunUpsertBulk struct {
	// contains filtered or unexported fields
}

ResourceRunUpsertBulk is the builder for "upsert"-ing a bulk of ResourceRun nodes.

func (*ResourceRunUpsertBulk) AddDuration added in v0.6.0

func (u *ResourceRunUpsertBulk) AddDuration(v int) *ResourceRunUpsertBulk

AddDuration adds v to the "duration" field.

func (*ResourceRunUpsertBulk) ClearAnnotations added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearAnnotations() *ResourceRunUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceRunUpsertBulk) ClearAttributes added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearAttributes() *ResourceRunUpsertBulk

ClearAttributes clears the value of the "attributes" field.

func (*ResourceRunUpsertBulk) ClearChangeComment added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearChangeComment() *ResourceRunUpsertBulk

ClearChangeComment clears the value of the "change_comment" field.

func (*ResourceRunUpsertBulk) ClearComponentChangeSummary added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearComponentChangeSummary() *ResourceRunUpsertBulk

ClearComponentChangeSummary clears the value of the "component_change_summary" field.

func (*ResourceRunUpsertBulk) ClearComponentChanges added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearComponentChanges() *ResourceRunUpsertBulk

ClearComponentChanges clears the value of the "component_changes" field.

func (*ResourceRunUpsertBulk) ClearComputedAttributes added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearComputedAttributes() *ResourceRunUpsertBulk

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceRunUpsertBulk) ClearLabels added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearLabels() *ResourceRunUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*ResourceRunUpsertBulk) ClearPlanRecord added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearPlanRecord() *ResourceRunUpsertBulk

ClearPlanRecord clears the value of the "plan_record" field.

func (*ResourceRunUpsertBulk) ClearRecord added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearRecord() *ResourceRunUpsertBulk

ClearRecord clears the value of the "record" field.

func (*ResourceRunUpsertBulk) ClearStatus added in v0.6.0

func (u *ResourceRunUpsertBulk) ClearStatus() *ResourceRunUpsertBulk

ClearStatus clears the value of the "status" field.

func (*ResourceRunUpsertBulk) DoNothing added in v0.6.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceRunUpsertBulk) Exec added in v0.6.0

Exec executes the query.

func (*ResourceRunUpsertBulk) ExecE added in v0.6.0

func (u *ResourceRunUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRun) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceRunUpsertBulk) ExecEX added in v0.6.0

func (u *ResourceRunUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRun) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceRunUpsertBulk) ExecX added in v0.6.0

func (u *ResourceRunUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRunUpsertBulk) Ignore added in v0.6.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceRun.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ResourceRunUpsertBulk) SetAnnotations added in v0.6.0

func (u *ResourceRunUpsertBulk) SetAnnotations(v map[string]string) *ResourceRunUpsertBulk

SetAnnotations sets the "annotations" field.

func (*ResourceRunUpsertBulk) SetAttributes added in v0.6.0

SetAttributes sets the "attributes" field.

func (*ResourceRunUpsertBulk) SetChangeComment added in v0.6.0

func (u *ResourceRunUpsertBulk) SetChangeComment(v string) *ResourceRunUpsertBulk

SetChangeComment sets the "change_comment" field.

func (*ResourceRunUpsertBulk) SetComponentChangeSummary added in v0.6.0

SetComponentChangeSummary sets the "component_change_summary" field.

func (*ResourceRunUpsertBulk) SetComponentChanges added in v0.6.0

SetComponentChanges sets the "component_changes" field.

func (*ResourceRunUpsertBulk) SetComputedAttributes added in v0.6.0

func (u *ResourceRunUpsertBulk) SetComputedAttributes(v property.Values) *ResourceRunUpsertBulk

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceRunUpsertBulk) SetCreatedBy added in v0.6.0

SetCreatedBy sets the "created_by" field.

func (*ResourceRunUpsertBulk) SetDeployerType added in v0.6.0

func (u *ResourceRunUpsertBulk) SetDeployerType(v string) *ResourceRunUpsertBulk

SetDeployerType sets the "deployer_type" field.

func (*ResourceRunUpsertBulk) SetDuration added in v0.6.0

func (u *ResourceRunUpsertBulk) SetDuration(v int) *ResourceRunUpsertBulk

SetDuration sets the "duration" field.

func (*ResourceRunUpsertBulk) SetInputConfigs added in v0.6.0

func (u *ResourceRunUpsertBulk) SetInputConfigs(v map[string][]uint8) *ResourceRunUpsertBulk

SetInputConfigs sets the "input_configs" field.

func (*ResourceRunUpsertBulk) SetLabels added in v0.6.0

SetLabels sets the "labels" field.

func (*ResourceRunUpsertBulk) SetPlanRecord added in v0.6.0

func (u *ResourceRunUpsertBulk) SetPlanRecord(v string) *ResourceRunUpsertBulk

SetPlanRecord sets the "plan_record" field.

func (*ResourceRunUpsertBulk) SetPreview added in v0.6.0

SetPreview sets the "preview" field.

func (*ResourceRunUpsertBulk) SetPreviousRequiredProviders added in v0.6.0

func (u *ResourceRunUpsertBulk) SetPreviousRequiredProviders(v []types.ProviderRequirement) *ResourceRunUpsertBulk

SetPreviousRequiredProviders sets the "previous_required_providers" field.

func (*ResourceRunUpsertBulk) SetRecord added in v0.6.0

SetRecord sets the "record" field.

func (*ResourceRunUpsertBulk) SetStatus added in v0.6.0

SetStatus sets the "status" field.

func (*ResourceRunUpsertBulk) SetTemplateVersion added in v0.6.0

func (u *ResourceRunUpsertBulk) SetTemplateVersion(v string) *ResourceRunUpsertBulk

SetTemplateVersion sets the "template_version" field.

func (*ResourceRunUpsertBulk) SetType added in v0.6.0

SetType sets the "type" field.

func (*ResourceRunUpsertBulk) SetVariables added in v0.6.0

SetVariables sets the "variables" field.

func (*ResourceRunUpsertBulk) Update added in v0.6.0

Update allows overriding fields `UPDATE` values. See the ResourceRunCreateBulk.OnConflict documentation for more info.

func (*ResourceRunUpsertBulk) UpdateAnnotations added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateAnnotations() *ResourceRunUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateAttributes added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateAttributes() *ResourceRunUpsertBulk

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateChangeComment added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateChangeComment() *ResourceRunUpsertBulk

UpdateChangeComment sets the "change_comment" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateComponentChangeSummary added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateComponentChangeSummary() *ResourceRunUpsertBulk

UpdateComponentChangeSummary sets the "component_change_summary" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateComponentChanges added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateComponentChanges() *ResourceRunUpsertBulk

UpdateComponentChanges sets the "component_changes" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateComputedAttributes added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateComputedAttributes() *ResourceRunUpsertBulk

UpdateComputedAttributes sets the "computed_attributes" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateCreatedBy added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateCreatedBy() *ResourceRunUpsertBulk

UpdateCreatedBy sets the "created_by" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateDeployerType added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateDeployerType() *ResourceRunUpsertBulk

UpdateDeployerType sets the "deployer_type" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateDuration added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateDuration() *ResourceRunUpsertBulk

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateInputConfigs added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateInputConfigs() *ResourceRunUpsertBulk

UpdateInputConfigs sets the "input_configs" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateLabels added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateLabels() *ResourceRunUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateNewValues added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateNewValues() *ResourceRunUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ResourceRun.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcerun.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceRunUpsertBulk) UpdatePlanRecord added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdatePlanRecord() *ResourceRunUpsertBulk

UpdatePlanRecord sets the "plan_record" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdatePreview added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdatePreview() *ResourceRunUpsertBulk

UpdatePreview sets the "preview" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdatePreviousRequiredProviders added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdatePreviousRequiredProviders() *ResourceRunUpsertBulk

UpdatePreviousRequiredProviders sets the "previous_required_providers" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateRecord added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateRecord() *ResourceRunUpsertBulk

UpdateRecord sets the "record" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateStatus added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateStatus() *ResourceRunUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateTemplateVersion added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateTemplateVersion() *ResourceRunUpsertBulk

UpdateTemplateVersion sets the "template_version" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateType added in v0.6.0

UpdateType sets the "type" field to the value that was provided on create.

func (*ResourceRunUpsertBulk) UpdateVariables added in v0.6.0

func (u *ResourceRunUpsertBulk) UpdateVariables() *ResourceRunUpsertBulk

UpdateVariables sets the "variables" field to the value that was provided on create.

type ResourceRunUpsertOne added in v0.6.0

type ResourceRunUpsertOne struct {
	// contains filtered or unexported fields
}

ResourceRunUpsertOne is the builder for "upsert"-ing

one ResourceRun node.

func (*ResourceRunUpsertOne) AddDuration added in v0.6.0

func (u *ResourceRunUpsertOne) AddDuration(v int) *ResourceRunUpsertOne

AddDuration adds v to the "duration" field.

func (*ResourceRunUpsertOne) ClearAnnotations added in v0.6.0

func (u *ResourceRunUpsertOne) ClearAnnotations() *ResourceRunUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceRunUpsertOne) ClearAttributes added in v0.6.0

func (u *ResourceRunUpsertOne) ClearAttributes() *ResourceRunUpsertOne

ClearAttributes clears the value of the "attributes" field.

func (*ResourceRunUpsertOne) ClearChangeComment added in v0.6.0

func (u *ResourceRunUpsertOne) ClearChangeComment() *ResourceRunUpsertOne

ClearChangeComment clears the value of the "change_comment" field.

func (*ResourceRunUpsertOne) ClearComponentChangeSummary added in v0.6.0

func (u *ResourceRunUpsertOne) ClearComponentChangeSummary() *ResourceRunUpsertOne

ClearComponentChangeSummary clears the value of the "component_change_summary" field.

func (*ResourceRunUpsertOne) ClearComponentChanges added in v0.6.0

func (u *ResourceRunUpsertOne) ClearComponentChanges() *ResourceRunUpsertOne

ClearComponentChanges clears the value of the "component_changes" field.

func (*ResourceRunUpsertOne) ClearComputedAttributes added in v0.6.0

func (u *ResourceRunUpsertOne) ClearComputedAttributes() *ResourceRunUpsertOne

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceRunUpsertOne) ClearLabels added in v0.6.0

func (u *ResourceRunUpsertOne) ClearLabels() *ResourceRunUpsertOne

ClearLabels clears the value of the "labels" field.

func (*ResourceRunUpsertOne) ClearPlanRecord added in v0.6.0

func (u *ResourceRunUpsertOne) ClearPlanRecord() *ResourceRunUpsertOne

ClearPlanRecord clears the value of the "plan_record" field.

func (*ResourceRunUpsertOne) ClearRecord added in v0.6.0

func (u *ResourceRunUpsertOne) ClearRecord() *ResourceRunUpsertOne

ClearRecord clears the value of the "record" field.

func (*ResourceRunUpsertOne) ClearStatus added in v0.6.0

func (u *ResourceRunUpsertOne) ClearStatus() *ResourceRunUpsertOne

ClearStatus clears the value of the "status" field.

func (*ResourceRunUpsertOne) DoNothing added in v0.6.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceRunUpsertOne) Exec added in v0.6.0

Exec executes the query.

func (*ResourceRunUpsertOne) ExecE added in v0.6.0

func (u *ResourceRunUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRun) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceRunUpsertOne) ExecEX added in v0.6.0

func (u *ResourceRunUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceRun) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceRunUpsertOne) ExecX added in v0.6.0

func (u *ResourceRunUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceRunUpsertOne) ID added in v0.6.0

func (u *ResourceRunUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ResourceRunUpsertOne) IDX added in v0.6.0

IDX is like ID, but panics if an error occurs.

func (*ResourceRunUpsertOne) Ignore added in v0.6.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceRun.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ResourceRunUpsertOne) SetAnnotations added in v0.6.0

func (u *ResourceRunUpsertOne) SetAnnotations(v map[string]string) *ResourceRunUpsertOne

SetAnnotations sets the "annotations" field.

func (*ResourceRunUpsertOne) SetAttributes added in v0.6.0

SetAttributes sets the "attributes" field.

func (*ResourceRunUpsertOne) SetChangeComment added in v0.6.0

func (u *ResourceRunUpsertOne) SetChangeComment(v string) *ResourceRunUpsertOne

SetChangeComment sets the "change_comment" field.

func (*ResourceRunUpsertOne) SetComponentChangeSummary added in v0.6.0

SetComponentChangeSummary sets the "component_change_summary" field.

func (*ResourceRunUpsertOne) SetComponentChanges added in v0.6.0

SetComponentChanges sets the "component_changes" field.

func (*ResourceRunUpsertOne) SetComputedAttributes added in v0.6.0

func (u *ResourceRunUpsertOne) SetComputedAttributes(v property.Values) *ResourceRunUpsertOne

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceRunUpsertOne) SetCreatedBy added in v0.6.0

func (u *ResourceRunUpsertOne) SetCreatedBy(v string) *ResourceRunUpsertOne

SetCreatedBy sets the "created_by" field.

func (*ResourceRunUpsertOne) SetDeployerType added in v0.6.0

func (u *ResourceRunUpsertOne) SetDeployerType(v string) *ResourceRunUpsertOne

SetDeployerType sets the "deployer_type" field.

func (*ResourceRunUpsertOne) SetDuration added in v0.6.0

func (u *ResourceRunUpsertOne) SetDuration(v int) *ResourceRunUpsertOne

SetDuration sets the "duration" field.

func (*ResourceRunUpsertOne) SetInputConfigs added in v0.6.0

func (u *ResourceRunUpsertOne) SetInputConfigs(v map[string][]uint8) *ResourceRunUpsertOne

SetInputConfigs sets the "input_configs" field.

func (*ResourceRunUpsertOne) SetLabels added in v0.6.0

SetLabels sets the "labels" field.

func (*ResourceRunUpsertOne) SetPlanRecord added in v0.6.0

func (u *ResourceRunUpsertOne) SetPlanRecord(v string) *ResourceRunUpsertOne

SetPlanRecord sets the "plan_record" field.

func (*ResourceRunUpsertOne) SetPreview added in v0.6.0

SetPreview sets the "preview" field.

func (*ResourceRunUpsertOne) SetPreviousRequiredProviders added in v0.6.0

func (u *ResourceRunUpsertOne) SetPreviousRequiredProviders(v []types.ProviderRequirement) *ResourceRunUpsertOne

SetPreviousRequiredProviders sets the "previous_required_providers" field.

func (*ResourceRunUpsertOne) SetRecord added in v0.6.0

SetRecord sets the "record" field.

func (*ResourceRunUpsertOne) SetStatus added in v0.6.0

SetStatus sets the "status" field.

func (*ResourceRunUpsertOne) SetTemplateVersion added in v0.6.0

func (u *ResourceRunUpsertOne) SetTemplateVersion(v string) *ResourceRunUpsertOne

SetTemplateVersion sets the "template_version" field.

func (*ResourceRunUpsertOne) SetType added in v0.6.0

SetType sets the "type" field.

func (*ResourceRunUpsertOne) SetVariables added in v0.6.0

SetVariables sets the "variables" field.

func (*ResourceRunUpsertOne) Update added in v0.6.0

Update allows overriding fields `UPDATE` values. See the ResourceRunCreate.OnConflict documentation for more info.

func (*ResourceRunUpsertOne) UpdateAnnotations added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateAnnotations() *ResourceRunUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateAttributes added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateAttributes() *ResourceRunUpsertOne

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateChangeComment added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateChangeComment() *ResourceRunUpsertOne

UpdateChangeComment sets the "change_comment" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateComponentChangeSummary added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateComponentChangeSummary() *ResourceRunUpsertOne

UpdateComponentChangeSummary sets the "component_change_summary" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateComponentChanges added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateComponentChanges() *ResourceRunUpsertOne

UpdateComponentChanges sets the "component_changes" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateComputedAttributes added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateComputedAttributes() *ResourceRunUpsertOne

UpdateComputedAttributes sets the "computed_attributes" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateCreatedBy added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateCreatedBy() *ResourceRunUpsertOne

UpdateCreatedBy sets the "created_by" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateDeployerType added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateDeployerType() *ResourceRunUpsertOne

UpdateDeployerType sets the "deployer_type" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateDuration added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateDuration() *ResourceRunUpsertOne

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateInputConfigs added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateInputConfigs() *ResourceRunUpsertOne

UpdateInputConfigs sets the "input_configs" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateLabels added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateLabels() *ResourceRunUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateNewValues added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateNewValues() *ResourceRunUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ResourceRun.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcerun.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceRunUpsertOne) UpdatePlanRecord added in v0.6.0

func (u *ResourceRunUpsertOne) UpdatePlanRecord() *ResourceRunUpsertOne

UpdatePlanRecord sets the "plan_record" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdatePreview added in v0.6.0

func (u *ResourceRunUpsertOne) UpdatePreview() *ResourceRunUpsertOne

UpdatePreview sets the "preview" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdatePreviousRequiredProviders added in v0.6.0

func (u *ResourceRunUpsertOne) UpdatePreviousRequiredProviders() *ResourceRunUpsertOne

UpdatePreviousRequiredProviders sets the "previous_required_providers" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateRecord added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateRecord() *ResourceRunUpsertOne

UpdateRecord sets the "record" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateStatus added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateStatus() *ResourceRunUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateTemplateVersion added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateTemplateVersion() *ResourceRunUpsertOne

UpdateTemplateVersion sets the "template_version" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateType added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateType() *ResourceRunUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*ResourceRunUpsertOne) UpdateVariables added in v0.6.0

func (u *ResourceRunUpsertOne) UpdateVariables() *ResourceRunUpsertOne

UpdateVariables sets the "variables" field to the value that was provided on create.

type ResourceRuns added in v0.6.0

type ResourceRuns []*ResourceRun

ResourceRuns is a parsable slice of ResourceRun.

func (ResourceRuns) View added in v0.6.0

func (_rrs ResourceRuns) View() []*ResourceRunOutput

View returns the output of ResourceRun entities.

type ResourceSelect added in v0.4.0

type ResourceSelect struct {
	*ResourceQuery
	// contains filtered or unexported fields
}

ResourceSelect is the builder for selecting fields of Resource entities.

func (*ResourceSelect) Aggregate added in v0.4.0

func (rs *ResourceSelect) Aggregate(fns ...AggregateFunc) *ResourceSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ResourceSelect) Bool added in v0.4.0

func (s *ResourceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceSelect) BoolX added in v0.4.0

func (s *ResourceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceSelect) Bools added in v0.4.0

func (s *ResourceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceSelect) BoolsX added in v0.4.0

func (s *ResourceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ResourceSelect) ExecContext added in v0.4.0

func (c ResourceSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceSelect) Float64 added in v0.4.0

func (s *ResourceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceSelect) Float64X added in v0.4.0

func (s *ResourceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceSelect) Float64s added in v0.4.0

func (s *ResourceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceSelect) Float64sX added in v0.4.0

func (s *ResourceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceSelect) Int added in v0.4.0

func (s *ResourceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceSelect) IntX added in v0.4.0

func (s *ResourceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceSelect) Ints added in v0.4.0

func (s *ResourceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceSelect) IntsX added in v0.4.0

func (s *ResourceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceSelect) Modify added in v0.4.0

func (rs *ResourceSelect) Modify(modifiers ...func(s *sql.Selector)) *ResourceSelect

Modify adds a query modifier for attaching custom logic to queries.

func (ResourceSelect) QueryContext added in v0.4.0

func (c ResourceSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceSelect) Scan added in v0.4.0

func (rs *ResourceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceSelect) ScanX added in v0.4.0

func (s *ResourceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceSelect) String added in v0.4.0

func (s *ResourceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceSelect) StringX added in v0.4.0

func (s *ResourceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceSelect) Strings added in v0.4.0

func (s *ResourceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceSelect) StringsX added in v0.4.0

func (s *ResourceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceState added in v0.6.0

type ResourceState struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// State data of the resource.
	Data string `json:"data,omitempty"`
	// ID of the resource to which the state belongs.
	ResourceID object.ID `json:"resource_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ResourceStateQuery when eager-loading is set.
	Edges ResourceStateEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

ResourceState is the model entity for the ResourceState schema.

func (*ResourceState) ExecContext added in v0.6.0

func (c *ResourceState) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceState) QueryContext added in v0.6.0

func (c *ResourceState) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceState) QueryResource added in v0.6.0

func (rs *ResourceState) QueryResource() *ResourceQuery

QueryResource queries the "resource" edge of the ResourceState entity.

func (*ResourceState) String added in v0.6.0

func (rs *ResourceState) String() string

String implements the fmt.Stringer.

func (*ResourceState) Unwrap added in v0.6.0

func (rs *ResourceState) Unwrap() *ResourceState

Unwrap unwraps the ResourceState 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 (*ResourceState) Update added in v0.6.0

func (rs *ResourceState) Update() *ResourceStateUpdateOne

Update returns a builder for updating this ResourceState. Note that you need to call ResourceState.Unwrap() before calling this method if this ResourceState was returned from a transaction, and the transaction was committed or rolled back.

func (*ResourceState) Value added in v0.6.0

func (rs *ResourceState) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ResourceState. This includes values selected through modifiers, order, etc.

func (*ResourceState) View added in v0.6.0

func (_rs *ResourceState) View() *ResourceStateOutput

View returns the output of ResourceState entity.

type ResourceStateClient added in v0.6.0

type ResourceStateClient struct {
	// contains filtered or unexported fields
}

ResourceStateClient is a client for the ResourceState schema.

func NewResourceStateClient added in v0.6.0

func NewResourceStateClient(c config) *ResourceStateClient

NewResourceStateClient returns a client for the ResourceState from the given config.

func (*ResourceStateClient) Create added in v0.6.0

Create returns a builder for creating a ResourceState entity.

func (*ResourceStateClient) CreateBulk added in v0.6.0

CreateBulk returns a builder for creating a bulk of ResourceState entities.

func (*ResourceStateClient) Delete added in v0.6.0

Delete returns a delete builder for ResourceState.

func (*ResourceStateClient) DeleteOne added in v0.6.0

DeleteOne returns a builder for deleting the given entity.

func (*ResourceStateClient) DeleteOneID added in v0.6.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ResourceStateClient) ExecContext added in v0.6.0

func (c *ResourceStateClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceStateClient) Get added in v0.6.0

Get returns a ResourceState entity by its id.

func (*ResourceStateClient) GetX added in v0.6.0

GetX is like Get, but panics if an error occurs.

func (*ResourceStateClient) Hooks added in v0.6.0

func (c *ResourceStateClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ResourceStateClient) Intercept added in v0.6.0

func (c *ResourceStateClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `resourcestate.Intercept(f(g(h())))`.

func (*ResourceStateClient) Interceptors added in v0.6.0

func (c *ResourceStateClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ResourceStateClient) MapCreateBulk added in v0.6.0

func (c *ResourceStateClient) MapCreateBulk(slice any, setFunc func(*ResourceStateCreate, int)) *ResourceStateCreateBulk

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 (*ResourceStateClient) Query added in v0.6.0

Query returns a query builder for ResourceState.

func (*ResourceStateClient) QueryContext added in v0.6.0

func (c *ResourceStateClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceStateClient) QueryResource added in v0.6.0

func (c *ResourceStateClient) QueryResource(rs *ResourceState) *ResourceQuery

QueryResource queries the resource edge of a ResourceState.

func (*ResourceStateClient) Update added in v0.6.0

Update returns an update builder for ResourceState.

func (*ResourceStateClient) UpdateOne added in v0.6.0

UpdateOne returns an update builder for the given entity.

func (*ResourceStateClient) UpdateOneID added in v0.6.0

UpdateOneID returns an update builder for the given id.

func (*ResourceStateClient) Use added in v0.6.0

func (c *ResourceStateClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resourcestate.Hooks(f(g(h())))`.

type ResourceStateClientGetter added in v0.6.0

type ResourceStateClientGetter interface {
	// ResourceStates returns the client for interacting with the ResourceState builders.
	ResourceStates() *ResourceStateClient
}

ResourceStateClientGetter is an interface that allows getting ResourceStateClient.

type ResourceStateCreate added in v0.6.0

type ResourceStateCreate struct {
	// contains filtered or unexported fields
}

ResourceStateCreate is the builder for creating a ResourceState entity.

func (*ResourceStateCreate) Exec added in v0.6.0

func (rsc *ResourceStateCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceStateCreate) ExecContext added in v0.6.0

func (c *ResourceStateCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceStateCreate) ExecE added in v0.6.0

func (rsc *ResourceStateCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceState) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceStateCreate) ExecEX added in v0.6.0

func (rsc *ResourceStateCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceState) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceStateCreate) ExecX added in v0.6.0

func (rsc *ResourceStateCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceStateCreate) Mutation added in v0.6.0

func (rsc *ResourceStateCreate) Mutation() *ResourceStateMutation

Mutation returns the ResourceStateMutation object of the builder.

func (*ResourceStateCreate) OnConflict added in v0.6.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceState.Create().
	SetData(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceStateUpsert) {
		SetData(v+v).
	}).
	Exec(ctx)

func (*ResourceStateCreate) OnConflictColumns added in v0.6.0

func (rsc *ResourceStateCreate) OnConflictColumns(columns ...string) *ResourceStateUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceState.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceStateCreate) QueryContext added in v0.6.0

func (c *ResourceStateCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceStateCreate) Save added in v0.6.0

Save creates the ResourceState in the database.

func (*ResourceStateCreate) SaveE added in v0.6.0

func (rsc *ResourceStateCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceState) error) (*ResourceState, error)

SaveE calls the given function after created the ResourceState entity, which is always good for cascading create operations.

func (*ResourceStateCreate) SaveEX added in v0.6.0

func (rsc *ResourceStateCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceState) error) *ResourceState

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceStateCreate) SaveX added in v0.6.0

SaveX calls Save and panics if Save returns an error.

func (*ResourceStateCreate) Set added in v0.6.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceStateCreate) SetData added in v0.6.0

SetData sets the "data" field.

func (*ResourceStateCreate) SetID added in v0.6.0

SetID sets the "id" field.

func (*ResourceStateCreate) SetNillableData added in v0.6.0

func (rsc *ResourceStateCreate) SetNillableData(s *string) *ResourceStateCreate

SetNillableData sets the "data" field if the given value is not nil.

func (*ResourceStateCreate) SetResource added in v0.6.0

func (rsc *ResourceStateCreate) SetResource(r *Resource) *ResourceStateCreate

SetResource sets the "resource" edge to the Resource entity.

func (*ResourceStateCreate) SetResourceID added in v0.6.0

func (rsc *ResourceStateCreate) SetResourceID(o object.ID) *ResourceStateCreate

SetResourceID sets the "resource_id" field.

type ResourceStateCreateBulk added in v0.6.0

type ResourceStateCreateBulk struct {
	// contains filtered or unexported fields
}

ResourceStateCreateBulk is the builder for creating many ResourceState entities in bulk.

func (*ResourceStateCreateBulk) Exec added in v0.6.0

func (rscb *ResourceStateCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceStateCreateBulk) ExecContext added in v0.6.0

func (c *ResourceStateCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceStateCreateBulk) ExecE added in v0.6.0

func (rscb *ResourceStateCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceState) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceStateCreateBulk) ExecEX added in v0.6.0

func (rscb *ResourceStateCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceState) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceStateCreateBulk) ExecX added in v0.6.0

func (rscb *ResourceStateCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceStateCreateBulk) OnConflict added in v0.6.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ResourceState.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ResourceStateUpsert) {
		SetData(v+v).
	}).
	Exec(ctx)

func (*ResourceStateCreateBulk) OnConflictColumns added in v0.6.0

func (rscb *ResourceStateCreateBulk) OnConflictColumns(columns ...string) *ResourceStateUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ResourceState.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ResourceStateCreateBulk) QueryContext added in v0.6.0

func (c *ResourceStateCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceStateCreateBulk) Save added in v0.6.0

Save creates the ResourceState entities in the database.

func (*ResourceStateCreateBulk) SaveE added in v0.6.0

func (rscb *ResourceStateCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceState) error) ([]*ResourceState, error)

SaveE calls the given function after created the ResourceState entities, which is always good for cascading create operations.

func (*ResourceStateCreateBulk) SaveEX added in v0.6.0

func (rscb *ResourceStateCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *ResourceState) error) []*ResourceState

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceStateCreateBulk) SaveX added in v0.6.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceStateCreateBulk) Set added in v0.6.0

Set leverages the ResourceStateCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type ResourceStateCreateInput added in v0.6.0

type ResourceStateCreateInput struct {

	// Resource indicates to create ResourceState entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

ResourceStateCreateInput holds the creation input of the ResourceState entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceStateCreateInput) Model added in v0.6.0

func (rsci *ResourceStateCreateInput) Model() *ResourceState

Model returns the ResourceState entity for creating, after validating.

func (*ResourceStateCreateInput) SetGinContext added in v0.6.0

func (ic *ResourceStateCreateInput) SetGinContext(ctx *gin.Context)

func (*ResourceStateCreateInput) SetModelClient added in v0.6.0

func (ic *ResourceStateCreateInput) SetModelClient(cli *Client)

func (*ResourceStateCreateInput) Validate added in v0.6.0

func (rsci *ResourceStateCreateInput) Validate() error

Validate checks the ResourceStateCreateInput entity.

func (*ResourceStateCreateInput) ValidateWith added in v0.6.0

func (rsci *ResourceStateCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStateCreateInput entity with the given context and client set.

type ResourceStateCreateInputs added in v0.6.0

type ResourceStateCreateInputs struct {

	// Resource indicates to create ResourceState entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceStateCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceStateCreateInputs holds the creation input of the ResourceState entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceStateCreateInputs) Model added in v0.6.0

func (rsci *ResourceStateCreateInputs) Model() []*ResourceState

Model returns the ResourceState entities for creating, after validating.

func (*ResourceStateCreateInputs) SetGinContext added in v0.6.0

func (ic *ResourceStateCreateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceStateCreateInputs) SetModelClient added in v0.6.0

func (ic *ResourceStateCreateInputs) SetModelClient(cli *Client)

func (*ResourceStateCreateInputs) Validate added in v0.6.0

func (rsci *ResourceStateCreateInputs) Validate() error

Validate checks the ResourceStateCreateInputs entity .

func (*ResourceStateCreateInputs) ValidateWith added in v0.6.0

func (rsci *ResourceStateCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStateCreateInputs entity with the given context and client set.

type ResourceStateCreateInputsItem added in v0.6.0

type ResourceStateCreateInputsItem struct {
}

ResourceStateCreateInputs holds the creation input item of the ResourceState entities.

func (*ResourceStateCreateInputsItem) ValidateWith added in v0.6.0

func (rsci *ResourceStateCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStateCreateInputsItem entity with the given context and client set.

type ResourceStateDelete added in v0.6.0

type ResourceStateDelete struct {
	// contains filtered or unexported fields
}

ResourceStateDelete is the builder for deleting a ResourceState entity.

func (*ResourceStateDelete) Exec added in v0.6.0

func (rsd *ResourceStateDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ResourceStateDelete) ExecContext added in v0.6.0

func (c *ResourceStateDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceStateDelete) ExecX added in v0.6.0

func (rsd *ResourceStateDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ResourceStateDelete) QueryContext added in v0.6.0

func (c *ResourceStateDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceStateDelete) Where added in v0.6.0

Where appends a list predicates to the ResourceStateDelete builder.

type ResourceStateDeleteInput added in v0.6.0

type ResourceStateDeleteInput struct {
	ResourceStateQueryInput `path:",inline"`
}

ResourceStateDeleteInput holds the deletion input of the ResourceState entity, please tags with `path:",inline"` if embedding.

func (*ResourceStateDeleteInput) SetGinContext added in v0.6.0

func (ic *ResourceStateDeleteInput) SetGinContext(ctx *gin.Context)

func (*ResourceStateDeleteInput) SetModelClient added in v0.6.0

func (ic *ResourceStateDeleteInput) SetModelClient(cli *Client)

type ResourceStateDeleteInputs added in v0.6.0

type ResourceStateDeleteInputs struct {

	// Resource indicates to delete ResourceState entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceStateDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceStateDeleteInputs holds the deletion input of the ResourceState entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceStateDeleteInputs) IDs added in v0.6.0

func (rsdi *ResourceStateDeleteInputs) IDs() []object.ID

IDs returns the ID list of the ResourceState entities for deleting, after validating.

func (*ResourceStateDeleteInputs) Model added in v0.6.0

func (rsdi *ResourceStateDeleteInputs) Model() []*ResourceState

Model returns the ResourceState entities for deleting, after validating.

func (*ResourceStateDeleteInputs) SetGinContext added in v0.6.0

func (ic *ResourceStateDeleteInputs) SetGinContext(ctx *gin.Context)

func (*ResourceStateDeleteInputs) SetModelClient added in v0.6.0

func (ic *ResourceStateDeleteInputs) SetModelClient(cli *Client)

func (*ResourceStateDeleteInputs) Validate added in v0.6.0

func (rsdi *ResourceStateDeleteInputs) Validate() error

Validate checks the ResourceStateDeleteInputs entity.

func (*ResourceStateDeleteInputs) ValidateWith added in v0.6.0

func (rsdi *ResourceStateDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStateDeleteInputs entity with the given context and client set.

type ResourceStateDeleteInputsItem added in v0.6.0

type ResourceStateDeleteInputsItem struct {
	// ID of the ResourceState entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

ResourceStateDeleteInputs holds the deletion input item of the ResourceState entities.

type ResourceStateDeleteOne added in v0.6.0

type ResourceStateDeleteOne struct {
	// contains filtered or unexported fields
}

ResourceStateDeleteOne is the builder for deleting a single ResourceState entity.

func (*ResourceStateDeleteOne) Exec added in v0.6.0

func (rsdo *ResourceStateDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ResourceStateDeleteOne) ExecX added in v0.6.0

func (rsdo *ResourceStateDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceStateDeleteOne) Where added in v0.6.0

Where appends a list predicates to the ResourceStateDelete builder.

type ResourceStateEdges added in v0.6.0

type ResourceStateEdges struct {
	// Resource to which the state belongs.
	Resource *Resource `json:"resource,omitempty"`
	// contains filtered or unexported fields
}

ResourceStateEdges holds the relations/edges for other nodes in the graph.

func (ResourceStateEdges) ResourceOrErr added in v0.6.0

func (e ResourceStateEdges) ResourceOrErr() (*Resource, error)

ResourceOrErr returns the Resource value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ResourceStateGroupBy added in v0.6.0

type ResourceStateGroupBy struct {
	// contains filtered or unexported fields
}

ResourceStateGroupBy is the group-by builder for ResourceState entities.

func (*ResourceStateGroupBy) Aggregate added in v0.6.0

func (rsgb *ResourceStateGroupBy) Aggregate(fns ...AggregateFunc) *ResourceStateGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ResourceStateGroupBy) Bool added in v0.6.0

func (s *ResourceStateGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceStateGroupBy) BoolX added in v0.6.0

func (s *ResourceStateGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceStateGroupBy) Bools added in v0.6.0

func (s *ResourceStateGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceStateGroupBy) BoolsX added in v0.6.0

func (s *ResourceStateGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ResourceStateGroupBy) Float64 added in v0.6.0

func (s *ResourceStateGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceStateGroupBy) Float64X added in v0.6.0

func (s *ResourceStateGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceStateGroupBy) Float64s added in v0.6.0

func (s *ResourceStateGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceStateGroupBy) Float64sX added in v0.6.0

func (s *ResourceStateGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceStateGroupBy) Int added in v0.6.0

func (s *ResourceStateGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceStateGroupBy) IntX added in v0.6.0

func (s *ResourceStateGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceStateGroupBy) Ints added in v0.6.0

func (s *ResourceStateGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceStateGroupBy) IntsX added in v0.6.0

func (s *ResourceStateGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceStateGroupBy) Scan added in v0.6.0

func (rsgb *ResourceStateGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceStateGroupBy) ScanX added in v0.6.0

func (s *ResourceStateGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceStateGroupBy) String added in v0.6.0

func (s *ResourceStateGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceStateGroupBy) StringX added in v0.6.0

func (s *ResourceStateGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceStateGroupBy) Strings added in v0.6.0

func (s *ResourceStateGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceStateGroupBy) StringsX added in v0.6.0

func (s *ResourceStateGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceStateMutation added in v0.6.0

type ResourceStateMutation struct {
	// contains filtered or unexported fields
}

ResourceStateMutation represents an operation that mutates the ResourceState nodes in the graph.

func (*ResourceStateMutation) AddField added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) AddedEdges added in v0.6.0

func (m *ResourceStateMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ResourceStateMutation) AddedField added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) AddedFields added in v0.6.0

func (m *ResourceStateMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ResourceStateMutation) AddedIDs added in v0.6.0

func (m *ResourceStateMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ResourceStateMutation) ClearEdge added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) ClearField added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) ClearResource added in v0.6.0

func (m *ResourceStateMutation) ClearResource()

ClearResource clears the "resource" edge to the Resource entity.

func (*ResourceStateMutation) ClearedEdges added in v0.6.0

func (m *ResourceStateMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ResourceStateMutation) ClearedFields added in v0.6.0

func (m *ResourceStateMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ResourceStateMutation) Client added in v0.6.0

func (m ResourceStateMutation) 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 (*ResourceStateMutation) Data added in v0.6.0

func (m *ResourceStateMutation) Data() (r string, exists bool)

Data returns the value of the "data" field in the mutation.

func (*ResourceStateMutation) EdgeCleared added in v0.6.0

func (m *ResourceStateMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ResourceStateMutation) ExecContext added in v0.6.0

func (c *ResourceStateMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceStateMutation) Field added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) FieldCleared added in v0.6.0

func (m *ResourceStateMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ResourceStateMutation) Fields added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) ID added in v0.6.0

func (m *ResourceStateMutation) ID() (id object.ID, 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 (*ResourceStateMutation) IDs added in v0.6.0

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 (*ResourceStateMutation) OldData added in v0.6.0

func (m *ResourceStateMutation) OldData(ctx context.Context) (v string, err error)

OldData returns the old "data" field's value of the ResourceState entity. If the ResourceState 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 (*ResourceStateMutation) OldField added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) OldResourceID added in v0.6.0

func (m *ResourceStateMutation) OldResourceID(ctx context.Context) (v object.ID, err error)

OldResourceID returns the old "resource_id" field's value of the ResourceState entity. If the ResourceState 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 (*ResourceStateMutation) Op added in v0.6.0

func (m *ResourceStateMutation) Op() Op

Op returns the operation name.

func (*ResourceStateMutation) QueryContext added in v0.6.0

func (c *ResourceStateMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceStateMutation) RemovedEdges added in v0.6.0

func (m *ResourceStateMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ResourceStateMutation) RemovedIDs added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) ResetData added in v0.6.0

func (m *ResourceStateMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*ResourceStateMutation) ResetEdge added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) ResetField added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) ResetResource added in v0.6.0

func (m *ResourceStateMutation) ResetResource()

ResetResource resets all changes to the "resource" edge.

func (*ResourceStateMutation) ResetResourceID added in v0.6.0

func (m *ResourceStateMutation) ResetResourceID()

ResetResourceID resets all changes to the "resource_id" field.

func (*ResourceStateMutation) ResourceCleared added in v0.6.0

func (m *ResourceStateMutation) ResourceCleared() bool

ResourceCleared reports if the "resource" edge to the Resource entity was cleared.

func (*ResourceStateMutation) ResourceID added in v0.6.0

func (m *ResourceStateMutation) ResourceID() (r object.ID, exists bool)

ResourceID returns the value of the "resource_id" field in the mutation.

func (*ResourceStateMutation) ResourceIDs added in v0.6.0

func (m *ResourceStateMutation) ResourceIDs() (ids []object.ID)

ResourceIDs returns the "resource" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ResourceID instead. It exists only for internal usage by the builders.

func (*ResourceStateMutation) SetData added in v0.6.0

func (m *ResourceStateMutation) SetData(s string)

SetData sets the "data" field.

func (*ResourceStateMutation) SetField added in v0.6.0

func (m *ResourceStateMutation) 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 (*ResourceStateMutation) SetID added in v0.6.0

func (m *ResourceStateMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ResourceState entities.

func (*ResourceStateMutation) SetOp added in v0.6.0

func (m *ResourceStateMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ResourceStateMutation) SetResourceID added in v0.6.0

func (m *ResourceStateMutation) SetResourceID(o object.ID)

SetResourceID sets the "resource_id" field.

func (ResourceStateMutation) Tx added in v0.6.0

func (m ResourceStateMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ResourceStateMutation) Type added in v0.6.0

func (m *ResourceStateMutation) Type() string

Type returns the node type of this mutation (ResourceState).

func (*ResourceStateMutation) Where added in v0.6.0

Where appends a list predicates to the ResourceStateMutation builder.

func (*ResourceStateMutation) WhereP added in v0.6.0

func (m *ResourceStateMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceStateMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ResourceStateOutput added in v0.6.0

type ResourceStateOutput struct {
	ID object.ID `json:"id,omitempty"`

	Resource *ResourceOutput `json:"resource,omitempty"`
}

ResourceStateOutput holds the output of the ResourceState entity.

func ExposeResourceState added in v0.6.0

func ExposeResourceState(_rs *ResourceState) *ResourceStateOutput

ExposeResourceState converts the ResourceState to ResourceStateOutput.

func ExposeResourceStates added in v0.6.0

func ExposeResourceStates(_rss []*ResourceState) []*ResourceStateOutput

ExposeResourceStates converts the ResourceState slice to ResourceStateOutput pointer slice.

type ResourceStatePatchInput added in v0.6.0

type ResourceStatePatchInput struct {
	ResourceStateQueryInput `path:",inline" query:"-" json:"-"`

	// State data of the resource.
	Data string `path:"-" query:"-" json:"data,omitempty"`
	// contains filtered or unexported fields
}

ResourceStatePatchInput holds the patch input of the ResourceState entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceStatePatchInput) Model added in v0.6.0

func (rspi *ResourceStatePatchInput) Model() *ResourceState

Model returns the ResourceState patched entity, after validating.

func (*ResourceStatePatchInput) PatchModel added in v0.6.0

func (rspi *ResourceStatePatchInput) PatchModel() *ResourceState

PatchModel returns the ResourceState partition entity for patching.

func (*ResourceStatePatchInput) SetGinContext added in v0.6.0

func (ic *ResourceStatePatchInput) SetGinContext(ctx *gin.Context)

func (*ResourceStatePatchInput) SetModelClient added in v0.6.0

func (ic *ResourceStatePatchInput) SetModelClient(cli *Client)

func (*ResourceStatePatchInput) Validate added in v0.6.0

func (rspi *ResourceStatePatchInput) Validate() error

Validate checks the ResourceStatePatchInput entity.

func (*ResourceStatePatchInput) ValidateWith added in v0.6.0

func (rspi *ResourceStatePatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStatePatchInput entity with the given context and client set.

type ResourceStateQuery added in v0.6.0

type ResourceStateQuery struct {
	// contains filtered or unexported fields
}

ResourceStateQuery is the builder for querying ResourceState entities.

func (*ResourceStateQuery) Aggregate added in v0.6.0

func (rsq *ResourceStateQuery) Aggregate(fns ...AggregateFunc) *ResourceStateSelect

Aggregate returns a ResourceStateSelect configured with the given aggregations.

func (*ResourceStateQuery) All added in v0.6.0

All executes the query and returns a list of ResourceStates.

func (*ResourceStateQuery) AllX added in v0.6.0

func (rsq *ResourceStateQuery) AllX(ctx context.Context) []*ResourceState

AllX is like All, but panics if an error occurs.

func (*ResourceStateQuery) Clone added in v0.6.0

func (rsq *ResourceStateQuery) Clone() *ResourceStateQuery

Clone returns a duplicate of the ResourceStateQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ResourceStateQuery) Count added in v0.6.0

func (rsq *ResourceStateQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ResourceStateQuery) CountX added in v0.6.0

func (rsq *ResourceStateQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ResourceStateQuery) ExecContext added in v0.6.0

func (c *ResourceStateQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceStateQuery) Exist added in v0.6.0

func (rsq *ResourceStateQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ResourceStateQuery) ExistX added in v0.6.0

func (rsq *ResourceStateQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ResourceStateQuery) First added in v0.6.0

First returns the first ResourceState entity from the query. Returns a *NotFoundError when no ResourceState was found.

func (*ResourceStateQuery) FirstID added in v0.6.0

func (rsq *ResourceStateQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first ResourceState ID from the query. Returns a *NotFoundError when no ResourceState ID was found.

func (*ResourceStateQuery) FirstIDX added in v0.6.0

func (rsq *ResourceStateQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ResourceStateQuery) FirstX added in v0.6.0

func (rsq *ResourceStateQuery) FirstX(ctx context.Context) *ResourceState

FirstX is like First, but panics if an error occurs.

func (*ResourceStateQuery) ForShare added in v0.6.0

func (rsq *ResourceStateQuery) ForShare(opts ...sql.LockOption) *ResourceStateQuery

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 (*ResourceStateQuery) ForUpdate added in v0.6.0

func (rsq *ResourceStateQuery) ForUpdate(opts ...sql.LockOption) *ResourceStateQuery

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 (*ResourceStateQuery) GroupBy added in v0.6.0

func (rsq *ResourceStateQuery) GroupBy(field string, fields ...string) *ResourceStateGroupBy

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 {
	Data string `json:"data,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ResourceState.Query().
	GroupBy(resourcestate.FieldData).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ResourceStateQuery) IDs added in v0.6.0

func (rsq *ResourceStateQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of ResourceState IDs.

func (*ResourceStateQuery) IDsX added in v0.6.0

func (rsq *ResourceStateQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*ResourceStateQuery) Limit added in v0.6.0

func (rsq *ResourceStateQuery) Limit(limit int) *ResourceStateQuery

Limit the number of records to be returned by this query.

func (*ResourceStateQuery) Modify added in v0.6.0

func (rsq *ResourceStateQuery) Modify(modifiers ...func(s *sql.Selector)) *ResourceStateSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ResourceStateQuery) Offset added in v0.6.0

func (rsq *ResourceStateQuery) Offset(offset int) *ResourceStateQuery

Offset to start from.

func (*ResourceStateQuery) Only added in v0.6.0

Only returns a single ResourceState entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ResourceState entity is found. Returns a *NotFoundError when no ResourceState entities are found.

func (*ResourceStateQuery) OnlyID added in v0.6.0

func (rsq *ResourceStateQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only ResourceState ID in the query. Returns a *NotSingularError when more than one ResourceState ID is found. Returns a *NotFoundError when no entities are found.

func (*ResourceStateQuery) OnlyIDX added in v0.6.0

func (rsq *ResourceStateQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ResourceStateQuery) OnlyX added in v0.6.0

OnlyX is like Only, but panics if an error occurs.

func (*ResourceStateQuery) Order added in v0.6.0

Order specifies how the records should be ordered.

func (*ResourceStateQuery) QueryContext added in v0.6.0

func (c *ResourceStateQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceStateQuery) QueryResource added in v0.6.0

func (rsq *ResourceStateQuery) QueryResource() *ResourceQuery

QueryResource chains the current query on the "resource" edge.

func (*ResourceStateQuery) Select added in v0.6.0

func (rsq *ResourceStateQuery) Select(fields ...string) *ResourceStateSelect

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 {
	Data string `json:"data,omitempty"`
}

client.ResourceState.Query().
	Select(resourcestate.FieldData).
	Scan(ctx, &v)

func (*ResourceStateQuery) Unique added in v0.6.0

func (rsq *ResourceStateQuery) Unique(unique bool) *ResourceStateQuery

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 (*ResourceStateQuery) Where added in v0.6.0

Where adds a new predicate for the ResourceStateQuery builder.

func (*ResourceStateQuery) WhereP added in v0.6.0

func (rsq *ResourceStateQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ResourceStateQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*ResourceStateQuery) WithResource added in v0.6.0

func (rsq *ResourceStateQuery) WithResource(opts ...func(*ResourceQuery)) *ResourceStateQuery

WithResource tells the query-builder to eager-load the nodes that are connected to the "resource" edge. The optional arguments are used to configure the query builder of the edge.

type ResourceStateQueryInput added in v0.6.0

type ResourceStateQueryInput struct {

	// Resource indicates to query ResourceState entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"resource"`

	// Refer holds the route path reference of the ResourceState entity.
	Refer *object.Refer `path:"resourcestate,default=" query:"-" json:"-"`
	// ID of the ResourceState entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

ResourceStateQueryInput holds the query input of the ResourceState entity, please tags with `path:",inline"` if embedding.

func (*ResourceStateQueryInput) Model added in v0.6.0

func (rsqi *ResourceStateQueryInput) Model() *ResourceState

Model returns the ResourceState entity for querying, after validating.

func (*ResourceStateQueryInput) SetGinContext added in v0.6.0

func (ic *ResourceStateQueryInput) SetGinContext(ctx *gin.Context)

func (*ResourceStateQueryInput) SetModelClient added in v0.6.0

func (ic *ResourceStateQueryInput) SetModelClient(cli *Client)

func (*ResourceStateQueryInput) Validate added in v0.6.0

func (rsqi *ResourceStateQueryInput) Validate() error

Validate checks the ResourceStateQueryInput entity.

func (*ResourceStateQueryInput) ValidateWith added in v0.6.0

func (rsqi *ResourceStateQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStateQueryInput entity with the given context and client set.

type ResourceStateQueryInputs added in v0.6.0

type ResourceStateQueryInputs struct {

	// Resource indicates to query ResourceState entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

ResourceStateQueryInputs holds the query input of the ResourceState entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*ResourceStateQueryInputs) SetGinContext added in v0.6.0

func (ic *ResourceStateQueryInputs) SetGinContext(ctx *gin.Context)

func (*ResourceStateQueryInputs) SetModelClient added in v0.6.0

func (ic *ResourceStateQueryInputs) SetModelClient(cli *Client)

func (*ResourceStateQueryInputs) Validate added in v0.6.0

func (rsqi *ResourceStateQueryInputs) Validate() error

Validate checks the ResourceStateQueryInputs entity.

func (*ResourceStateQueryInputs) ValidateWith added in v0.6.0

func (rsqi *ResourceStateQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStateQueryInputs entity with the given context and client set.

type ResourceStateSelect added in v0.6.0

type ResourceStateSelect struct {
	*ResourceStateQuery
	// contains filtered or unexported fields
}

ResourceStateSelect is the builder for selecting fields of ResourceState entities.

func (*ResourceStateSelect) Aggregate added in v0.6.0

func (rss *ResourceStateSelect) Aggregate(fns ...AggregateFunc) *ResourceStateSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ResourceStateSelect) Bool added in v0.6.0

func (s *ResourceStateSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ResourceStateSelect) BoolX added in v0.6.0

func (s *ResourceStateSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ResourceStateSelect) Bools added in v0.6.0

func (s *ResourceStateSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ResourceStateSelect) BoolsX added in v0.6.0

func (s *ResourceStateSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ResourceStateSelect) ExecContext added in v0.6.0

func (c ResourceStateSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceStateSelect) Float64 added in v0.6.0

func (s *ResourceStateSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ResourceStateSelect) Float64X added in v0.6.0

func (s *ResourceStateSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ResourceStateSelect) Float64s added in v0.6.0

func (s *ResourceStateSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ResourceStateSelect) Float64sX added in v0.6.0

func (s *ResourceStateSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ResourceStateSelect) Int added in v0.6.0

func (s *ResourceStateSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ResourceStateSelect) IntX added in v0.6.0

func (s *ResourceStateSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ResourceStateSelect) Ints added in v0.6.0

func (s *ResourceStateSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ResourceStateSelect) IntsX added in v0.6.0

func (s *ResourceStateSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ResourceStateSelect) Modify added in v0.6.0

func (rss *ResourceStateSelect) Modify(modifiers ...func(s *sql.Selector)) *ResourceStateSelect

Modify adds a query modifier for attaching custom logic to queries.

func (ResourceStateSelect) QueryContext added in v0.6.0

func (c ResourceStateSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceStateSelect) Scan added in v0.6.0

func (rss *ResourceStateSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ResourceStateSelect) ScanX added in v0.6.0

func (s *ResourceStateSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ResourceStateSelect) String added in v0.6.0

func (s *ResourceStateSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ResourceStateSelect) StringX added in v0.6.0

func (s *ResourceStateSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ResourceStateSelect) Strings added in v0.6.0

func (s *ResourceStateSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ResourceStateSelect) StringsX added in v0.6.0

func (s *ResourceStateSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ResourceStateUpdate added in v0.6.0

type ResourceStateUpdate struct {
	// contains filtered or unexported fields
}

ResourceStateUpdate is the builder for updating ResourceState entities.

func (*ResourceStateUpdate) Exec added in v0.6.0

func (rsu *ResourceStateUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceStateUpdate) ExecContext added in v0.6.0

func (c *ResourceStateUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceStateUpdate) ExecX added in v0.6.0

func (rsu *ResourceStateUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceStateUpdate) Modify added in v0.6.0

func (rsu *ResourceStateUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceStateUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceStateUpdate) Mutation added in v0.6.0

func (rsu *ResourceStateUpdate) Mutation() *ResourceStateMutation

Mutation returns the ResourceStateMutation object of the builder.

func (*ResourceStateUpdate) QueryContext added in v0.6.0

func (c *ResourceStateUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceStateUpdate) Save added in v0.6.0

func (rsu *ResourceStateUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ResourceStateUpdate) SaveX added in v0.6.0

func (rsu *ResourceStateUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ResourceStateUpdate) Set added in v0.6.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceStateUpdate) SetData added in v0.6.0

SetData sets the "data" field.

func (*ResourceStateUpdate) SetNillableData added in v0.6.0

func (rsu *ResourceStateUpdate) SetNillableData(s *string) *ResourceStateUpdate

SetNillableData sets the "data" field if the given value is not nil.

func (*ResourceStateUpdate) Where added in v0.6.0

Where appends a list predicates to the ResourceStateUpdate builder.

type ResourceStateUpdateInput added in v0.6.0

type ResourceStateUpdateInput struct {
	ResourceStateQueryInput `path:",inline" query:"-" json:"-"`
}

ResourceStateUpdateInput holds the modification input of the ResourceState entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceStateUpdateInput) Model added in v0.6.0

func (rsui *ResourceStateUpdateInput) Model() *ResourceState

Model returns the ResourceState entity for modifying, after validating.

func (*ResourceStateUpdateInput) SetGinContext added in v0.6.0

func (ic *ResourceStateUpdateInput) SetGinContext(ctx *gin.Context)

func (*ResourceStateUpdateInput) SetModelClient added in v0.6.0

func (ic *ResourceStateUpdateInput) SetModelClient(cli *Client)

func (*ResourceStateUpdateInput) Validate added in v0.6.0

func (rsui *ResourceStateUpdateInput) Validate() error

Validate checks the ResourceStateUpdateInput entity.

func (*ResourceStateUpdateInput) ValidateWith added in v0.6.0

func (rsui *ResourceStateUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStateUpdateInput entity with the given context and client set.

type ResourceStateUpdateInputs added in v0.6.0

type ResourceStateUpdateInputs struct {

	// Resource indicates to update ResourceState entity MUST under the Resource route.
	Resource *ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceStateUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceStateUpdateInputs holds the modification input of the ResourceState entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceStateUpdateInputs) IDs added in v0.6.0

func (rsui *ResourceStateUpdateInputs) IDs() []object.ID

IDs returns the ID list of the ResourceState entities for modifying, after validating.

func (*ResourceStateUpdateInputs) Model added in v0.6.0

func (rsui *ResourceStateUpdateInputs) Model() []*ResourceState

Model returns the ResourceState entities for modifying, after validating.

func (*ResourceStateUpdateInputs) SetGinContext added in v0.6.0

func (ic *ResourceStateUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceStateUpdateInputs) SetModelClient added in v0.6.0

func (ic *ResourceStateUpdateInputs) SetModelClient(cli *Client)

func (*ResourceStateUpdateInputs) Validate added in v0.6.0

func (rsui *ResourceStateUpdateInputs) Validate() error

Validate checks the ResourceStateUpdateInputs entity.

func (*ResourceStateUpdateInputs) ValidateWith added in v0.6.0

func (rsui *ResourceStateUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStateUpdateInputs entity with the given context and client set.

type ResourceStateUpdateInputsItem added in v0.6.0

type ResourceStateUpdateInputsItem struct {
	// ID of the ResourceState entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

ResourceStateUpdateInputs holds the modification input item of the ResourceState entities.

func (*ResourceStateUpdateInputsItem) ValidateWith added in v0.6.0

func (rsui *ResourceStateUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceStateUpdateInputsItem entity with the given context and client set.

type ResourceStateUpdateOne added in v0.6.0

type ResourceStateUpdateOne struct {
	// contains filtered or unexported fields
}

ResourceStateUpdateOne is the builder for updating a single ResourceState entity.

func (*ResourceStateUpdateOne) Exec added in v0.6.0

func (rsuo *ResourceStateUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ResourceStateUpdateOne) ExecContext added in v0.6.0

func (c *ResourceStateUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceStateUpdateOne) ExecE added in v0.6.0

func (rsuo *ResourceStateUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceState) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*ResourceStateUpdateOne) ExecEX added in v0.6.0

func (rsuo *ResourceStateUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceState) error)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceStateUpdateOne) ExecX added in v0.6.0

func (rsuo *ResourceStateUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceStateUpdateOne) Modify added in v0.6.0

func (rsuo *ResourceStateUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceStateUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceStateUpdateOne) Mutation added in v0.6.0

Mutation returns the ResourceStateMutation object of the builder.

func (*ResourceStateUpdateOne) QueryContext added in v0.6.0

func (c *ResourceStateUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceStateUpdateOne) Save added in v0.6.0

Save executes the query and returns the updated ResourceState entity.

func (*ResourceStateUpdateOne) SaveE added in v0.6.0

func (rsuo *ResourceStateUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceState) error) (*ResourceState, error)

SaveE calls the given function after updated the ResourceState entity, which is always good for cascading update operations.

func (*ResourceStateUpdateOne) SaveEX added in v0.6.0

func (rsuo *ResourceStateUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceState) error) *ResourceState

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceStateUpdateOne) SaveX added in v0.6.0

SaveX is like Save, but panics if an error occurs.

func (*ResourceStateUpdateOne) Select added in v0.6.0

func (rsuo *ResourceStateUpdateOne) Select(field string, fields ...string) *ResourceStateUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ResourceStateUpdateOne) Set added in v0.6.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*ResourceStateUpdateOne) SetData added in v0.6.0

SetData sets the "data" field.

func (*ResourceStateUpdateOne) SetNillableData added in v0.6.0

func (rsuo *ResourceStateUpdateOne) SetNillableData(s *string) *ResourceStateUpdateOne

SetNillableData sets the "data" field if the given value is not nil.

func (*ResourceStateUpdateOne) Where added in v0.6.0

Where appends a list predicates to the ResourceStateUpdate builder.

type ResourceStateUpsert added in v0.6.0

type ResourceStateUpsert struct {
	*sql.UpdateSet
}

ResourceStateUpsert is the "OnConflict" setter.

func (*ResourceStateUpsert) SetData added in v0.6.0

SetData sets the "data" field.

func (*ResourceStateUpsert) UpdateData added in v0.6.0

func (u *ResourceStateUpsert) UpdateData() *ResourceStateUpsert

UpdateData sets the "data" field to the value that was provided on create.

type ResourceStateUpsertBulk added in v0.6.0

type ResourceStateUpsertBulk struct {
	// contains filtered or unexported fields
}

ResourceStateUpsertBulk is the builder for "upsert"-ing a bulk of ResourceState nodes.

func (*ResourceStateUpsertBulk) DoNothing added in v0.6.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceStateUpsertBulk) Exec added in v0.6.0

Exec executes the query.

func (*ResourceStateUpsertBulk) ExecE added in v0.6.0

func (u *ResourceStateUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceState) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceStateUpsertBulk) ExecEX added in v0.6.0

func (u *ResourceStateUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceState) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceStateUpsertBulk) ExecX added in v0.6.0

func (u *ResourceStateUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceStateUpsertBulk) Ignore added in v0.6.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceState.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ResourceStateUpsertBulk) SetData added in v0.6.0

SetData sets the "data" field.

func (*ResourceStateUpsertBulk) Update added in v0.6.0

Update allows overriding fields `UPDATE` values. See the ResourceStateCreateBulk.OnConflict documentation for more info.

func (*ResourceStateUpsertBulk) UpdateData added in v0.6.0

UpdateData sets the "data" field to the value that was provided on create.

func (*ResourceStateUpsertBulk) UpdateNewValues added in v0.6.0

func (u *ResourceStateUpsertBulk) UpdateNewValues() *ResourceStateUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ResourceState.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcestate.FieldID)
		}),
	).
	Exec(ctx)

type ResourceStateUpsertOne added in v0.6.0

type ResourceStateUpsertOne struct {
	// contains filtered or unexported fields
}

ResourceStateUpsertOne is the builder for "upsert"-ing

one ResourceState node.

func (*ResourceStateUpsertOne) DoNothing added in v0.6.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceStateUpsertOne) Exec added in v0.6.0

Exec executes the query.

func (*ResourceStateUpsertOne) ExecE added in v0.6.0

func (u *ResourceStateUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceState) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceStateUpsertOne) ExecEX added in v0.6.0

func (u *ResourceStateUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *ResourceState) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceStateUpsertOne) ExecX added in v0.6.0

func (u *ResourceStateUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceStateUpsertOne) ID added in v0.6.0

func (u *ResourceStateUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ResourceStateUpsertOne) IDX added in v0.6.0

IDX is like ID, but panics if an error occurs.

func (*ResourceStateUpsertOne) Ignore added in v0.6.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ResourceState.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ResourceStateUpsertOne) SetData added in v0.6.0

SetData sets the "data" field.

func (*ResourceStateUpsertOne) Update added in v0.6.0

Update allows overriding fields `UPDATE` values. See the ResourceStateCreate.OnConflict documentation for more info.

func (*ResourceStateUpsertOne) UpdateData added in v0.6.0

UpdateData sets the "data" field to the value that was provided on create.

func (*ResourceStateUpsertOne) UpdateNewValues added in v0.6.0

func (u *ResourceStateUpsertOne) UpdateNewValues() *ResourceStateUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ResourceState.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resourcestate.FieldID)
		}),
	).
	Exec(ctx)

type ResourceStates added in v0.6.0

type ResourceStates []*ResourceState

ResourceStates is a parsable slice of ResourceState.

func (ResourceStates) View added in v0.6.0

func (_rss ResourceStates) View() []*ResourceStateOutput

View returns the output of ResourceState entities.

type ResourceUpdate added in v0.4.0

type ResourceUpdate struct {
	// contains filtered or unexported fields
}

ResourceUpdate is the builder for updating Resource entities.

func (*ResourceUpdate) AddComponentIDs added in v0.4.0

func (ru *ResourceUpdate) AddComponentIDs(ids ...object.ID) *ResourceUpdate

AddComponentIDs adds the "components" edge to the ResourceComponent entity by IDs.

func (*ResourceUpdate) AddComponents added in v0.4.0

func (ru *ResourceUpdate) AddComponents(r ...*ResourceComponent) *ResourceUpdate

AddComponents adds the "components" edges to the ResourceComponent entity.

func (*ResourceUpdate) AddDependencies added in v0.4.0

func (ru *ResourceUpdate) AddDependencies(r ...*ResourceRelationship) *ResourceUpdate

AddDependencies adds the "dependencies" edges to the ResourceRelationship entity.

func (*ResourceUpdate) AddDependencyIDs added in v0.4.0

func (ru *ResourceUpdate) AddDependencyIDs(ids ...object.ID) *ResourceUpdate

AddDependencyIDs adds the "dependencies" edge to the ResourceRelationship entity by IDs.

func (*ResourceUpdate) AddRunIDs added in v0.6.0

func (ru *ResourceUpdate) AddRunIDs(ids ...object.ID) *ResourceUpdate

AddRunIDs adds the "runs" edge to the ResourceRun entity by IDs.

func (*ResourceUpdate) AddRuns added in v0.6.0

func (ru *ResourceUpdate) AddRuns(r ...*ResourceRun) *ResourceUpdate

AddRuns adds the "runs" edges to the ResourceRun entity.

func (*ResourceUpdate) AppendEndpoints added in v0.5.0

func (ru *ResourceUpdate) AppendEndpoints(te types.ResourceEndpoints) *ResourceUpdate

AppendEndpoints appends te to the "endpoints" field.

func (*ResourceUpdate) ClearAnnotations added in v0.4.0

func (ru *ResourceUpdate) ClearAnnotations() *ResourceUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceUpdate) ClearAttributes added in v0.4.0

func (ru *ResourceUpdate) ClearAttributes() *ResourceUpdate

ClearAttributes clears the value of the "attributes" field.

func (*ResourceUpdate) ClearComponents added in v0.4.0

func (ru *ResourceUpdate) ClearComponents() *ResourceUpdate

ClearComponents clears all "components" edges to the ResourceComponent entity.

func (*ResourceUpdate) ClearComputedAttributes added in v0.5.0

func (ru *ResourceUpdate) ClearComputedAttributes() *ResourceUpdate

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceUpdate) ClearDependencies added in v0.4.0

func (ru *ResourceUpdate) ClearDependencies() *ResourceUpdate

ClearDependencies clears all "dependencies" edges to the ResourceRelationship entity.

func (*ResourceUpdate) ClearDescription added in v0.4.0

func (ru *ResourceUpdate) ClearDescription() *ResourceUpdate

ClearDescription clears the value of the "description" field.

func (*ResourceUpdate) ClearEndpoints added in v0.5.0

func (ru *ResourceUpdate) ClearEndpoints() *ResourceUpdate

ClearEndpoints clears the value of the "endpoints" field.

func (*ResourceUpdate) ClearLabels added in v0.4.0

func (ru *ResourceUpdate) ClearLabels() *ResourceUpdate

ClearLabels clears the value of the "labels" field.

func (*ResourceUpdate) ClearResourceDefinition added in v0.5.0

func (ru *ResourceUpdate) ClearResourceDefinition() *ResourceUpdate

ClearResourceDefinition clears the "resource_definition" edge to the ResourceDefinition entity.

func (*ResourceUpdate) ClearResourceDefinitionID added in v0.5.0

func (ru *ResourceUpdate) ClearResourceDefinitionID() *ResourceUpdate

ClearResourceDefinitionID clears the value of the "resource_definition_id" field.

func (*ResourceUpdate) ClearResourceDefinitionMatchingRule added in v0.5.0

func (ru *ResourceUpdate) ClearResourceDefinitionMatchingRule() *ResourceUpdate

ClearResourceDefinitionMatchingRule clears the "resource_definition_matching_rule" edge to the ResourceDefinitionMatchingRule entity.

func (*ResourceUpdate) ClearResourceDefinitionMatchingRuleID added in v0.5.0

func (ru *ResourceUpdate) ClearResourceDefinitionMatchingRuleID() *ResourceUpdate

ClearResourceDefinitionMatchingRuleID clears the value of the "resource_definition_matching_rule_id" field.

func (*ResourceUpdate) ClearRuns added in v0.6.0

func (ru *ResourceUpdate) ClearRuns() *ResourceUpdate

ClearRuns clears all "runs" edges to the ResourceRun entity.

func (*ResourceUpdate) ClearState added in v0.6.0

func (ru *ResourceUpdate) ClearState() *ResourceUpdate

ClearState clears the "state" edge to the ResourceState entity.

func (*ResourceUpdate) ClearStatus added in v0.4.0

func (ru *ResourceUpdate) ClearStatus() *ResourceUpdate

ClearStatus clears the value of the "status" field.

func (*ResourceUpdate) ClearTemplate added in v0.4.0

func (ru *ResourceUpdate) ClearTemplate() *ResourceUpdate

ClearTemplate clears the "template" edge to the TemplateVersion entity.

func (*ResourceUpdate) ClearTemplateID added in v0.4.0

func (ru *ResourceUpdate) ClearTemplateID() *ResourceUpdate

ClearTemplateID clears the value of the "template_id" field.

func (*ResourceUpdate) Exec added in v0.4.0

func (ru *ResourceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceUpdate) ExecContext added in v0.4.0

func (c *ResourceUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceUpdate) ExecX added in v0.4.0

func (ru *ResourceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceUpdate) Modify added in v0.4.0

func (ru *ResourceUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceUpdate) Mutation added in v0.4.0

func (ru *ResourceUpdate) Mutation() *ResourceMutation

Mutation returns the ResourceMutation object of the builder.

func (*ResourceUpdate) QueryContext added in v0.4.0

func (c *ResourceUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceUpdate) RemoveComponentIDs added in v0.4.0

func (ru *ResourceUpdate) RemoveComponentIDs(ids ...object.ID) *ResourceUpdate

RemoveComponentIDs removes the "components" edge to ResourceComponent entities by IDs.

func (*ResourceUpdate) RemoveComponents added in v0.4.0

func (ru *ResourceUpdate) RemoveComponents(r ...*ResourceComponent) *ResourceUpdate

RemoveComponents removes "components" edges to ResourceComponent entities.

func (*ResourceUpdate) RemoveDependencies added in v0.4.0

func (ru *ResourceUpdate) RemoveDependencies(r ...*ResourceRelationship) *ResourceUpdate

RemoveDependencies removes "dependencies" edges to ResourceRelationship entities.

func (*ResourceUpdate) RemoveDependencyIDs added in v0.4.0

func (ru *ResourceUpdate) RemoveDependencyIDs(ids ...object.ID) *ResourceUpdate

RemoveDependencyIDs removes the "dependencies" edge to ResourceRelationship entities by IDs.

func (*ResourceUpdate) RemoveRunIDs added in v0.6.0

func (ru *ResourceUpdate) RemoveRunIDs(ids ...object.ID) *ResourceUpdate

RemoveRunIDs removes the "runs" edge to ResourceRun entities by IDs.

func (*ResourceUpdate) RemoveRuns added in v0.6.0

func (ru *ResourceUpdate) RemoveRuns(r ...*ResourceRun) *ResourceUpdate

RemoveRuns removes "runs" edges to ResourceRun entities.

func (*ResourceUpdate) Save added in v0.4.0

func (ru *ResourceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ResourceUpdate) SaveX added in v0.4.0

func (ru *ResourceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ResourceUpdate) Set added in v0.4.0

func (ru *ResourceUpdate) Set(obj *Resource) *ResourceUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*ResourceUpdate) SetAnnotations added in v0.4.0

func (ru *ResourceUpdate) SetAnnotations(m map[string]string) *ResourceUpdate

SetAnnotations sets the "annotations" field.

func (*ResourceUpdate) SetAttributes added in v0.4.0

func (ru *ResourceUpdate) SetAttributes(pr property.Values) *ResourceUpdate

SetAttributes sets the "attributes" field.

func (*ResourceUpdate) SetComputedAttributes added in v0.5.0

func (ru *ResourceUpdate) SetComputedAttributes(pr property.Values) *ResourceUpdate

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceUpdate) SetDescription added in v0.4.0

func (ru *ResourceUpdate) SetDescription(s string) *ResourceUpdate

SetDescription sets the "description" field.

func (*ResourceUpdate) SetEndpoints added in v0.5.0

func (ru *ResourceUpdate) SetEndpoints(te types.ResourceEndpoints) *ResourceUpdate

SetEndpoints sets the "endpoints" field.

func (*ResourceUpdate) SetLabels added in v0.4.0

func (ru *ResourceUpdate) SetLabels(m map[string]string) *ResourceUpdate

SetLabels sets the "labels" field.

func (*ResourceUpdate) SetNillableDescription added in v0.4.0

func (ru *ResourceUpdate) SetNillableDescription(s *string) *ResourceUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ResourceUpdate) SetNillableResourceDefinitionID added in v0.5.0

func (ru *ResourceUpdate) SetNillableResourceDefinitionID(o *object.ID) *ResourceUpdate

SetNillableResourceDefinitionID sets the "resource_definition_id" field if the given value is not nil.

func (*ResourceUpdate) SetNillableResourceDefinitionMatchingRuleID added in v0.5.0

func (ru *ResourceUpdate) SetNillableResourceDefinitionMatchingRuleID(o *object.ID) *ResourceUpdate

SetNillableResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field if the given value is not nil.

func (*ResourceUpdate) SetNillableStateID added in v0.6.0

func (ru *ResourceUpdate) SetNillableStateID(id *object.ID) *ResourceUpdate

SetNillableStateID sets the "state" edge to the ResourceState entity by ID if the given value is not nil.

func (*ResourceUpdate) SetNillableStatus added in v0.4.0

func (ru *ResourceUpdate) SetNillableStatus(s *status.Status) *ResourceUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ResourceUpdate) SetNillableTemplateID added in v0.4.0

func (ru *ResourceUpdate) SetNillableTemplateID(o *object.ID) *ResourceUpdate

SetNillableTemplateID sets the "template_id" field if the given value is not nil.

func (*ResourceUpdate) SetResourceDefinition added in v0.5.0

func (ru *ResourceUpdate) SetResourceDefinition(r *ResourceDefinition) *ResourceUpdate

SetResourceDefinition sets the "resource_definition" edge to the ResourceDefinition entity.

func (*ResourceUpdate) SetResourceDefinitionID added in v0.5.0

func (ru *ResourceUpdate) SetResourceDefinitionID(o object.ID) *ResourceUpdate

SetResourceDefinitionID sets the "resource_definition_id" field.

func (*ResourceUpdate) SetResourceDefinitionMatchingRule added in v0.5.0

func (ru *ResourceUpdate) SetResourceDefinitionMatchingRule(r *ResourceDefinitionMatchingRule) *ResourceUpdate

SetResourceDefinitionMatchingRule sets the "resource_definition_matching_rule" edge to the ResourceDefinitionMatchingRule entity.

func (*ResourceUpdate) SetResourceDefinitionMatchingRuleID added in v0.5.0

func (ru *ResourceUpdate) SetResourceDefinitionMatchingRuleID(o object.ID) *ResourceUpdate

SetResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field.

func (*ResourceUpdate) SetState added in v0.6.0

func (ru *ResourceUpdate) SetState(r *ResourceState) *ResourceUpdate

SetState sets the "state" edge to the ResourceState entity.

func (*ResourceUpdate) SetStateID added in v0.6.0

func (ru *ResourceUpdate) SetStateID(id object.ID) *ResourceUpdate

SetStateID sets the "state" edge to the ResourceState entity by ID.

func (*ResourceUpdate) SetStatus added in v0.4.0

func (ru *ResourceUpdate) SetStatus(s status.Status) *ResourceUpdate

SetStatus sets the "status" field.

func (*ResourceUpdate) SetTemplate added in v0.4.0

func (ru *ResourceUpdate) SetTemplate(t *TemplateVersion) *ResourceUpdate

SetTemplate sets the "template" edge to the TemplateVersion entity.

func (*ResourceUpdate) SetTemplateID added in v0.4.0

func (ru *ResourceUpdate) SetTemplateID(o object.ID) *ResourceUpdate

SetTemplateID sets the "template_id" field.

func (*ResourceUpdate) SetUpdateTime added in v0.4.0

func (ru *ResourceUpdate) SetUpdateTime(t time.Time) *ResourceUpdate

SetUpdateTime sets the "update_time" field.

func (*ResourceUpdate) Where added in v0.4.0

func (ru *ResourceUpdate) Where(ps ...predicate.Resource) *ResourceUpdate

Where appends a list predicates to the ResourceUpdate builder.

type ResourceUpdateInput added in v0.4.0

type ResourceUpdateInput struct {
	ResourceQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Type of the resource referring to a resource definition type.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes,omitempty"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes,omitempty"`
	// Endpoints of the resource.
	Endpoints types.ResourceEndpoints `path:"-" query:"-" json:"endpoints,omitempty"`

	// Template indicates replacing the stale TemplateVersion entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template,omitempty"`
	// ResourceDefinition indicates replacing the stale ResourceDefinition entity.
	ResourceDefinition *ResourceDefinitionQueryInput `uri:"-" query:"-" json:"-"`
	// ResourceDefinitionMatchingRule indicates replacing the stale ResourceDefinitionMatchingRule entity.
	ResourceDefinitionMatchingRule *ResourceDefinitionMatchingRuleQueryInput `uri:"-" query:"-" json:"resourceDefinitionMatchingRule,omitempty"`
}

ResourceUpdateInput holds the modification input of the Resource entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceUpdateInput) Model added in v0.4.0

func (rui *ResourceUpdateInput) Model() *Resource

Model returns the Resource entity for modifying, after validating.

func (*ResourceUpdateInput) SetGinContext added in v0.4.0

func (ic *ResourceUpdateInput) SetGinContext(ctx *gin.Context)

func (*ResourceUpdateInput) SetModelClient added in v0.4.0

func (ic *ResourceUpdateInput) SetModelClient(cli *Client)

func (*ResourceUpdateInput) Validate added in v0.4.0

func (rui *ResourceUpdateInput) Validate() error

Validate checks the ResourceUpdateInput entity.

func (*ResourceUpdateInput) ValidateWith added in v0.4.0

func (rui *ResourceUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceUpdateInput entity with the given context and client set.

type ResourceUpdateInputs added in v0.4.0

type ResourceUpdateInputs struct {

	// Project indicates to update Resource entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to update Resource entity MUST under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*ResourceUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

ResourceUpdateInputs holds the modification input of the Resource entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*ResourceUpdateInputs) IDs added in v0.4.0

func (rui *ResourceUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Resource entities for modifying, after validating.

func (*ResourceUpdateInputs) Model added in v0.4.0

func (rui *ResourceUpdateInputs) Model() []*Resource

Model returns the Resource entities for modifying, after validating.

func (*ResourceUpdateInputs) SetGinContext added in v0.4.0

func (ic *ResourceUpdateInputs) SetGinContext(ctx *gin.Context)

func (*ResourceUpdateInputs) SetModelClient added in v0.4.0

func (ic *ResourceUpdateInputs) SetModelClient(cli *Client)

func (*ResourceUpdateInputs) Validate added in v0.4.0

func (rui *ResourceUpdateInputs) Validate() error

Validate checks the ResourceUpdateInputs entity.

func (*ResourceUpdateInputs) ValidateWith added in v0.4.0

func (rui *ResourceUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceUpdateInputs entity with the given context and client set.

type ResourceUpdateInputsItem added in v0.4.0

type ResourceUpdateInputsItem struct {
	// ID of the Resource entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Resource entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Type of the resource referring to a resource definition type.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Attributes to configure the template.
	Attributes property.Values `path:"-" query:"-" json:"attributes"`
	// Computed attributes generated from attributes and schemas.
	ComputedAttributes property.Values `path:"-" query:"-" json:"computedAttributes"`
	// Endpoints of the resource.
	Endpoints types.ResourceEndpoints `path:"-" query:"-" json:"endpoints,cli-table-column,omitempty"`

	// Template indicates replacing the stale TemplateVersion entity.
	Template *TemplateVersionQueryInput `uri:"-" query:"-" json:"template,omitempty"`
	// ResourceDefinition indicates replacing the stale ResourceDefinition entity.
	ResourceDefinition *ResourceDefinitionQueryInput `uri:"-" query:"-" json:"-"`
	// ResourceDefinitionMatchingRule indicates replacing the stale ResourceDefinitionMatchingRule entity.
	ResourceDefinitionMatchingRule *ResourceDefinitionMatchingRuleQueryInput `uri:"-" query:"-" json:"resourceDefinitionMatchingRule,omitempty"`
}

ResourceUpdateInputs holds the modification input item of the Resource entities.

func (*ResourceUpdateInputsItem) ValidateWith added in v0.4.0

func (rui *ResourceUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the ResourceUpdateInputsItem entity with the given context and client set.

type ResourceUpdateOne added in v0.4.0

type ResourceUpdateOne struct {
	// contains filtered or unexported fields
}

ResourceUpdateOne is the builder for updating a single Resource entity.

func (*ResourceUpdateOne) AddComponentIDs added in v0.4.0

func (ruo *ResourceUpdateOne) AddComponentIDs(ids ...object.ID) *ResourceUpdateOne

AddComponentIDs adds the "components" edge to the ResourceComponent entity by IDs.

func (*ResourceUpdateOne) AddComponents added in v0.4.0

func (ruo *ResourceUpdateOne) AddComponents(r ...*ResourceComponent) *ResourceUpdateOne

AddComponents adds the "components" edges to the ResourceComponent entity.

func (*ResourceUpdateOne) AddDependencies added in v0.4.0

func (ruo *ResourceUpdateOne) AddDependencies(r ...*ResourceRelationship) *ResourceUpdateOne

AddDependencies adds the "dependencies" edges to the ResourceRelationship entity.

func (*ResourceUpdateOne) AddDependencyIDs added in v0.4.0

func (ruo *ResourceUpdateOne) AddDependencyIDs(ids ...object.ID) *ResourceUpdateOne

AddDependencyIDs adds the "dependencies" edge to the ResourceRelationship entity by IDs.

func (*ResourceUpdateOne) AddRunIDs added in v0.6.0

func (ruo *ResourceUpdateOne) AddRunIDs(ids ...object.ID) *ResourceUpdateOne

AddRunIDs adds the "runs" edge to the ResourceRun entity by IDs.

func (*ResourceUpdateOne) AddRuns added in v0.6.0

func (ruo *ResourceUpdateOne) AddRuns(r ...*ResourceRun) *ResourceUpdateOne

AddRuns adds the "runs" edges to the ResourceRun entity.

func (*ResourceUpdateOne) AppendEndpoints added in v0.5.0

func (ruo *ResourceUpdateOne) AppendEndpoints(te types.ResourceEndpoints) *ResourceUpdateOne

AppendEndpoints appends te to the "endpoints" field.

func (*ResourceUpdateOne) ClearAnnotations added in v0.4.0

func (ruo *ResourceUpdateOne) ClearAnnotations() *ResourceUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceUpdateOne) ClearAttributes added in v0.4.0

func (ruo *ResourceUpdateOne) ClearAttributes() *ResourceUpdateOne

ClearAttributes clears the value of the "attributes" field.

func (*ResourceUpdateOne) ClearComponents added in v0.4.0

func (ruo *ResourceUpdateOne) ClearComponents() *ResourceUpdateOne

ClearComponents clears all "components" edges to the ResourceComponent entity.

func (*ResourceUpdateOne) ClearComputedAttributes added in v0.5.0

func (ruo *ResourceUpdateOne) ClearComputedAttributes() *ResourceUpdateOne

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceUpdateOne) ClearDependencies added in v0.4.0

func (ruo *ResourceUpdateOne) ClearDependencies() *ResourceUpdateOne

ClearDependencies clears all "dependencies" edges to the ResourceRelationship entity.

func (*ResourceUpdateOne) ClearDescription added in v0.4.0

func (ruo *ResourceUpdateOne) ClearDescription() *ResourceUpdateOne

ClearDescription clears the value of the "description" field.

func (*ResourceUpdateOne) ClearEndpoints added in v0.5.0

func (ruo *ResourceUpdateOne) ClearEndpoints() *ResourceUpdateOne

ClearEndpoints clears the value of the "endpoints" field.

func (*ResourceUpdateOne) ClearLabels added in v0.4.0

func (ruo *ResourceUpdateOne) ClearLabels() *ResourceUpdateOne

ClearLabels clears the value of the "labels" field.

func (*ResourceUpdateOne) ClearResourceDefinition added in v0.5.0

func (ruo *ResourceUpdateOne) ClearResourceDefinition() *ResourceUpdateOne

ClearResourceDefinition clears the "resource_definition" edge to the ResourceDefinition entity.

func (*ResourceUpdateOne) ClearResourceDefinitionID added in v0.5.0

func (ruo *ResourceUpdateOne) ClearResourceDefinitionID() *ResourceUpdateOne

ClearResourceDefinitionID clears the value of the "resource_definition_id" field.

func (*ResourceUpdateOne) ClearResourceDefinitionMatchingRule added in v0.5.0

func (ruo *ResourceUpdateOne) ClearResourceDefinitionMatchingRule() *ResourceUpdateOne

ClearResourceDefinitionMatchingRule clears the "resource_definition_matching_rule" edge to the ResourceDefinitionMatchingRule entity.

func (*ResourceUpdateOne) ClearResourceDefinitionMatchingRuleID added in v0.5.0

func (ruo *ResourceUpdateOne) ClearResourceDefinitionMatchingRuleID() *ResourceUpdateOne

ClearResourceDefinitionMatchingRuleID clears the value of the "resource_definition_matching_rule_id" field.

func (*ResourceUpdateOne) ClearRuns added in v0.6.0

func (ruo *ResourceUpdateOne) ClearRuns() *ResourceUpdateOne

ClearRuns clears all "runs" edges to the ResourceRun entity.

func (*ResourceUpdateOne) ClearState added in v0.6.0

func (ruo *ResourceUpdateOne) ClearState() *ResourceUpdateOne

ClearState clears the "state" edge to the ResourceState entity.

func (*ResourceUpdateOne) ClearStatus added in v0.4.0

func (ruo *ResourceUpdateOne) ClearStatus() *ResourceUpdateOne

ClearStatus clears the value of the "status" field.

func (*ResourceUpdateOne) ClearTemplate added in v0.4.0

func (ruo *ResourceUpdateOne) ClearTemplate() *ResourceUpdateOne

ClearTemplate clears the "template" edge to the TemplateVersion entity.

func (*ResourceUpdateOne) ClearTemplateID added in v0.4.0

func (ruo *ResourceUpdateOne) ClearTemplateID() *ResourceUpdateOne

ClearTemplateID clears the value of the "template_id" field.

func (*ResourceUpdateOne) Exec added in v0.4.0

func (ruo *ResourceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ResourceUpdateOne) ExecContext added in v0.4.0

func (c *ResourceUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ResourceUpdateOne) ExecE added in v0.4.0

func (ruo *ResourceUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Resource) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*ResourceUpdateOne) ExecEX added in v0.4.0

func (ruo *ResourceUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Resource) error)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceUpdateOne) ExecX added in v0.4.0

func (ruo *ResourceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceUpdateOne) Modify added in v0.4.0

func (ruo *ResourceUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ResourceUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ResourceUpdateOne) Mutation added in v0.4.0

func (ruo *ResourceUpdateOne) Mutation() *ResourceMutation

Mutation returns the ResourceMutation object of the builder.

func (*ResourceUpdateOne) QueryContext added in v0.4.0

func (c *ResourceUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ResourceUpdateOne) RemoveComponentIDs added in v0.4.0

func (ruo *ResourceUpdateOne) RemoveComponentIDs(ids ...object.ID) *ResourceUpdateOne

RemoveComponentIDs removes the "components" edge to ResourceComponent entities by IDs.

func (*ResourceUpdateOne) RemoveComponents added in v0.4.0

func (ruo *ResourceUpdateOne) RemoveComponents(r ...*ResourceComponent) *ResourceUpdateOne

RemoveComponents removes "components" edges to ResourceComponent entities.

func (*ResourceUpdateOne) RemoveDependencies added in v0.4.0

func (ruo *ResourceUpdateOne) RemoveDependencies(r ...*ResourceRelationship) *ResourceUpdateOne

RemoveDependencies removes "dependencies" edges to ResourceRelationship entities.

func (*ResourceUpdateOne) RemoveDependencyIDs added in v0.4.0

func (ruo *ResourceUpdateOne) RemoveDependencyIDs(ids ...object.ID) *ResourceUpdateOne

RemoveDependencyIDs removes the "dependencies" edge to ResourceRelationship entities by IDs.

func (*ResourceUpdateOne) RemoveRunIDs added in v0.6.0

func (ruo *ResourceUpdateOne) RemoveRunIDs(ids ...object.ID) *ResourceUpdateOne

RemoveRunIDs removes the "runs" edge to ResourceRun entities by IDs.

func (*ResourceUpdateOne) RemoveRuns added in v0.6.0

func (ruo *ResourceUpdateOne) RemoveRuns(r ...*ResourceRun) *ResourceUpdateOne

RemoveRuns removes "runs" edges to ResourceRun entities.

func (*ResourceUpdateOne) Save added in v0.4.0

func (ruo *ResourceUpdateOne) Save(ctx context.Context) (*Resource, error)

Save executes the query and returns the updated Resource entity.

func (*ResourceUpdateOne) SaveE added in v0.4.0

func (ruo *ResourceUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Resource) error) (*Resource, error)

SaveE calls the given function after updated the Resource entity, which is always good for cascading update operations.

func (*ResourceUpdateOne) SaveEX added in v0.4.0

func (ruo *ResourceUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Resource) error) *Resource

SaveEX is like SaveE, but panics if an error occurs.

func (*ResourceUpdateOne) SaveX added in v0.4.0

func (ruo *ResourceUpdateOne) SaveX(ctx context.Context) *Resource

SaveX is like Save, but panics if an error occurs.

func (*ResourceUpdateOne) Select added in v0.4.0

func (ruo *ResourceUpdateOne) Select(field string, fields ...string) *ResourceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ResourceUpdateOne) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*ResourceUpdateOne) SetAnnotations added in v0.4.0

func (ruo *ResourceUpdateOne) SetAnnotations(m map[string]string) *ResourceUpdateOne

SetAnnotations sets the "annotations" field.

func (*ResourceUpdateOne) SetAttributes added in v0.4.0

func (ruo *ResourceUpdateOne) SetAttributes(pr property.Values) *ResourceUpdateOne

SetAttributes sets the "attributes" field.

func (*ResourceUpdateOne) SetComputedAttributes added in v0.5.0

func (ruo *ResourceUpdateOne) SetComputedAttributes(pr property.Values) *ResourceUpdateOne

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceUpdateOne) SetDescription added in v0.4.0

func (ruo *ResourceUpdateOne) SetDescription(s string) *ResourceUpdateOne

SetDescription sets the "description" field.

func (*ResourceUpdateOne) SetEndpoints added in v0.5.0

SetEndpoints sets the "endpoints" field.

func (*ResourceUpdateOne) SetLabels added in v0.4.0

func (ruo *ResourceUpdateOne) SetLabels(m map[string]string) *ResourceUpdateOne

SetLabels sets the "labels" field.

func (*ResourceUpdateOne) SetNillableDescription added in v0.4.0

func (ruo *ResourceUpdateOne) SetNillableDescription(s *string) *ResourceUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ResourceUpdateOne) SetNillableResourceDefinitionID added in v0.5.0

func (ruo *ResourceUpdateOne) SetNillableResourceDefinitionID(o *object.ID) *ResourceUpdateOne

SetNillableResourceDefinitionID sets the "resource_definition_id" field if the given value is not nil.

func (*ResourceUpdateOne) SetNillableResourceDefinitionMatchingRuleID added in v0.5.0

func (ruo *ResourceUpdateOne) SetNillableResourceDefinitionMatchingRuleID(o *object.ID) *ResourceUpdateOne

SetNillableResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field if the given value is not nil.

func (*ResourceUpdateOne) SetNillableStateID added in v0.6.0

func (ruo *ResourceUpdateOne) SetNillableStateID(id *object.ID) *ResourceUpdateOne

SetNillableStateID sets the "state" edge to the ResourceState entity by ID if the given value is not nil.

func (*ResourceUpdateOne) SetNillableStatus added in v0.4.0

func (ruo *ResourceUpdateOne) SetNillableStatus(s *status.Status) *ResourceUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ResourceUpdateOne) SetNillableTemplateID added in v0.4.0

func (ruo *ResourceUpdateOne) SetNillableTemplateID(o *object.ID) *ResourceUpdateOne

SetNillableTemplateID sets the "template_id" field if the given value is not nil.

func (*ResourceUpdateOne) SetResourceDefinition added in v0.5.0

func (ruo *ResourceUpdateOne) SetResourceDefinition(r *ResourceDefinition) *ResourceUpdateOne

SetResourceDefinition sets the "resource_definition" edge to the ResourceDefinition entity.

func (*ResourceUpdateOne) SetResourceDefinitionID added in v0.5.0

func (ruo *ResourceUpdateOne) SetResourceDefinitionID(o object.ID) *ResourceUpdateOne

SetResourceDefinitionID sets the "resource_definition_id" field.

func (*ResourceUpdateOne) SetResourceDefinitionMatchingRule added in v0.5.0

func (ruo *ResourceUpdateOne) SetResourceDefinitionMatchingRule(r *ResourceDefinitionMatchingRule) *ResourceUpdateOne

SetResourceDefinitionMatchingRule sets the "resource_definition_matching_rule" edge to the ResourceDefinitionMatchingRule entity.

func (*ResourceUpdateOne) SetResourceDefinitionMatchingRuleID added in v0.5.0

func (ruo *ResourceUpdateOne) SetResourceDefinitionMatchingRuleID(o object.ID) *ResourceUpdateOne

SetResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field.

func (*ResourceUpdateOne) SetState added in v0.6.0

SetState sets the "state" edge to the ResourceState entity.

func (*ResourceUpdateOne) SetStateID added in v0.6.0

func (ruo *ResourceUpdateOne) SetStateID(id object.ID) *ResourceUpdateOne

SetStateID sets the "state" edge to the ResourceState entity by ID.

func (*ResourceUpdateOne) SetStatus added in v0.4.0

func (ruo *ResourceUpdateOne) SetStatus(s status.Status) *ResourceUpdateOne

SetStatus sets the "status" field.

func (*ResourceUpdateOne) SetTemplate added in v0.4.0

func (ruo *ResourceUpdateOne) SetTemplate(t *TemplateVersion) *ResourceUpdateOne

SetTemplate sets the "template" edge to the TemplateVersion entity.

func (*ResourceUpdateOne) SetTemplateID added in v0.4.0

func (ruo *ResourceUpdateOne) SetTemplateID(o object.ID) *ResourceUpdateOne

SetTemplateID sets the "template_id" field.

func (*ResourceUpdateOne) SetUpdateTime added in v0.4.0

func (ruo *ResourceUpdateOne) SetUpdateTime(t time.Time) *ResourceUpdateOne

SetUpdateTime sets the "update_time" field.

func (*ResourceUpdateOne) Where added in v0.4.0

Where appends a list predicates to the ResourceUpdate builder.

type ResourceUpsert added in v0.4.0

type ResourceUpsert struct {
	*sql.UpdateSet
}

ResourceUpsert is the "OnConflict" setter.

func (*ResourceUpsert) ClearAnnotations added in v0.4.0

func (u *ResourceUpsert) ClearAnnotations() *ResourceUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceUpsert) ClearAttributes added in v0.4.0

func (u *ResourceUpsert) ClearAttributes() *ResourceUpsert

ClearAttributes clears the value of the "attributes" field.

func (*ResourceUpsert) ClearComputedAttributes added in v0.5.0

func (u *ResourceUpsert) ClearComputedAttributes() *ResourceUpsert

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceUpsert) ClearDescription added in v0.4.0

func (u *ResourceUpsert) ClearDescription() *ResourceUpsert

ClearDescription clears the value of the "description" field.

func (*ResourceUpsert) ClearEndpoints added in v0.5.0

func (u *ResourceUpsert) ClearEndpoints() *ResourceUpsert

ClearEndpoints clears the value of the "endpoints" field.

func (*ResourceUpsert) ClearLabels added in v0.4.0

func (u *ResourceUpsert) ClearLabels() *ResourceUpsert

ClearLabels clears the value of the "labels" field.

func (*ResourceUpsert) ClearResourceDefinitionID added in v0.5.0

func (u *ResourceUpsert) ClearResourceDefinitionID() *ResourceUpsert

ClearResourceDefinitionID clears the value of the "resource_definition_id" field.

func (*ResourceUpsert) ClearResourceDefinitionMatchingRuleID added in v0.5.0

func (u *ResourceUpsert) ClearResourceDefinitionMatchingRuleID() *ResourceUpsert

ClearResourceDefinitionMatchingRuleID clears the value of the "resource_definition_matching_rule_id" field.

func (*ResourceUpsert) ClearStatus added in v0.4.0

func (u *ResourceUpsert) ClearStatus() *ResourceUpsert

ClearStatus clears the value of the "status" field.

func (*ResourceUpsert) ClearTemplateID added in v0.4.0

func (u *ResourceUpsert) ClearTemplateID() *ResourceUpsert

ClearTemplateID clears the value of the "template_id" field.

func (*ResourceUpsert) SetAnnotations added in v0.4.0

func (u *ResourceUpsert) SetAnnotations(v map[string]string) *ResourceUpsert

SetAnnotations sets the "annotations" field.

func (*ResourceUpsert) SetAttributes added in v0.4.0

func (u *ResourceUpsert) SetAttributes(v property.Values) *ResourceUpsert

SetAttributes sets the "attributes" field.

func (*ResourceUpsert) SetComputedAttributes added in v0.5.0

func (u *ResourceUpsert) SetComputedAttributes(v property.Values) *ResourceUpsert

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceUpsert) SetDescription added in v0.4.0

func (u *ResourceUpsert) SetDescription(v string) *ResourceUpsert

SetDescription sets the "description" field.

func (*ResourceUpsert) SetEndpoints added in v0.5.0

SetEndpoints sets the "endpoints" field.

func (*ResourceUpsert) SetLabels added in v0.4.0

func (u *ResourceUpsert) SetLabels(v map[string]string) *ResourceUpsert

SetLabels sets the "labels" field.

func (*ResourceUpsert) SetResourceDefinitionID added in v0.5.0

func (u *ResourceUpsert) SetResourceDefinitionID(v object.ID) *ResourceUpsert

SetResourceDefinitionID sets the "resource_definition_id" field.

func (*ResourceUpsert) SetResourceDefinitionMatchingRuleID added in v0.5.0

func (u *ResourceUpsert) SetResourceDefinitionMatchingRuleID(v object.ID) *ResourceUpsert

SetResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field.

func (*ResourceUpsert) SetStatus added in v0.4.0

func (u *ResourceUpsert) SetStatus(v status.Status) *ResourceUpsert

SetStatus sets the "status" field.

func (*ResourceUpsert) SetTemplateID added in v0.4.0

func (u *ResourceUpsert) SetTemplateID(v object.ID) *ResourceUpsert

SetTemplateID sets the "template_id" field.

func (*ResourceUpsert) SetUpdateTime added in v0.4.0

func (u *ResourceUpsert) SetUpdateTime(v time.Time) *ResourceUpsert

SetUpdateTime sets the "update_time" field.

func (*ResourceUpsert) UpdateAnnotations added in v0.4.0

func (u *ResourceUpsert) UpdateAnnotations() *ResourceUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ResourceUpsert) UpdateAttributes added in v0.4.0

func (u *ResourceUpsert) UpdateAttributes() *ResourceUpsert

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*ResourceUpsert) UpdateComputedAttributes added in v0.5.0

func (u *ResourceUpsert) UpdateComputedAttributes() *ResourceUpsert

UpdateComputedAttributes sets the "computed_attributes" field to the value that was provided on create.

func (*ResourceUpsert) UpdateDescription added in v0.4.0

func (u *ResourceUpsert) UpdateDescription() *ResourceUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ResourceUpsert) UpdateEndpoints added in v0.5.0

func (u *ResourceUpsert) UpdateEndpoints() *ResourceUpsert

UpdateEndpoints sets the "endpoints" field to the value that was provided on create.

func (*ResourceUpsert) UpdateLabels added in v0.4.0

func (u *ResourceUpsert) UpdateLabels() *ResourceUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ResourceUpsert) UpdateResourceDefinitionID added in v0.5.0

func (u *ResourceUpsert) UpdateResourceDefinitionID() *ResourceUpsert

UpdateResourceDefinitionID sets the "resource_definition_id" field to the value that was provided on create.

func (*ResourceUpsert) UpdateResourceDefinitionMatchingRuleID added in v0.5.0

func (u *ResourceUpsert) UpdateResourceDefinitionMatchingRuleID() *ResourceUpsert

UpdateResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field to the value that was provided on create.

func (*ResourceUpsert) UpdateStatus added in v0.4.0

func (u *ResourceUpsert) UpdateStatus() *ResourceUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ResourceUpsert) UpdateTemplateID added in v0.4.0

func (u *ResourceUpsert) UpdateTemplateID() *ResourceUpsert

UpdateTemplateID sets the "template_id" field to the value that was provided on create.

func (*ResourceUpsert) UpdateUpdateTime added in v0.4.0

func (u *ResourceUpsert) UpdateUpdateTime() *ResourceUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ResourceUpsertBulk added in v0.4.0

type ResourceUpsertBulk struct {
	// contains filtered or unexported fields
}

ResourceUpsertBulk is the builder for "upsert"-ing a bulk of Resource nodes.

func (*ResourceUpsertBulk) ClearAnnotations added in v0.4.0

func (u *ResourceUpsertBulk) ClearAnnotations() *ResourceUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceUpsertBulk) ClearAttributes added in v0.4.0

func (u *ResourceUpsertBulk) ClearAttributes() *ResourceUpsertBulk

ClearAttributes clears the value of the "attributes" field.

func (*ResourceUpsertBulk) ClearComputedAttributes added in v0.5.0

func (u *ResourceUpsertBulk) ClearComputedAttributes() *ResourceUpsertBulk

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceUpsertBulk) ClearDescription added in v0.4.0

func (u *ResourceUpsertBulk) ClearDescription() *ResourceUpsertBulk

ClearDescription clears the value of the "description" field.

func (*ResourceUpsertBulk) ClearEndpoints added in v0.5.0

func (u *ResourceUpsertBulk) ClearEndpoints() *ResourceUpsertBulk

ClearEndpoints clears the value of the "endpoints" field.

func (*ResourceUpsertBulk) ClearLabels added in v0.4.0

func (u *ResourceUpsertBulk) ClearLabels() *ResourceUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*ResourceUpsertBulk) ClearResourceDefinitionID added in v0.5.0

func (u *ResourceUpsertBulk) ClearResourceDefinitionID() *ResourceUpsertBulk

ClearResourceDefinitionID clears the value of the "resource_definition_id" field.

func (*ResourceUpsertBulk) ClearResourceDefinitionMatchingRuleID added in v0.5.0

func (u *ResourceUpsertBulk) ClearResourceDefinitionMatchingRuleID() *ResourceUpsertBulk

ClearResourceDefinitionMatchingRuleID clears the value of the "resource_definition_matching_rule_id" field.

func (*ResourceUpsertBulk) ClearStatus added in v0.4.0

func (u *ResourceUpsertBulk) ClearStatus() *ResourceUpsertBulk

ClearStatus clears the value of the "status" field.

func (*ResourceUpsertBulk) ClearTemplateID added in v0.4.0

func (u *ResourceUpsertBulk) ClearTemplateID() *ResourceUpsertBulk

ClearTemplateID clears the value of the "template_id" field.

func (*ResourceUpsertBulk) DoNothing added in v0.4.0

func (u *ResourceUpsertBulk) DoNothing() *ResourceUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceUpsertBulk) Exec added in v0.4.0

func (u *ResourceUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceUpsertBulk) ExecE added in v0.4.0

func (u *ResourceUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Resource) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceUpsertBulk) ExecEX added in v0.4.0

func (u *ResourceUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Resource) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceUpsertBulk) ExecX added in v0.4.0

func (u *ResourceUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Resource.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ResourceUpsertBulk) SetAnnotations added in v0.4.0

func (u *ResourceUpsertBulk) SetAnnotations(v map[string]string) *ResourceUpsertBulk

SetAnnotations sets the "annotations" field.

func (*ResourceUpsertBulk) SetAttributes added in v0.4.0

SetAttributes sets the "attributes" field.

func (*ResourceUpsertBulk) SetComputedAttributes added in v0.5.0

func (u *ResourceUpsertBulk) SetComputedAttributes(v property.Values) *ResourceUpsertBulk

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceUpsertBulk) SetDescription added in v0.4.0

func (u *ResourceUpsertBulk) SetDescription(v string) *ResourceUpsertBulk

SetDescription sets the "description" field.

func (*ResourceUpsertBulk) SetEndpoints added in v0.5.0

SetEndpoints sets the "endpoints" field.

func (*ResourceUpsertBulk) SetLabels added in v0.4.0

func (u *ResourceUpsertBulk) SetLabels(v map[string]string) *ResourceUpsertBulk

SetLabels sets the "labels" field.

func (*ResourceUpsertBulk) SetResourceDefinitionID added in v0.5.0

func (u *ResourceUpsertBulk) SetResourceDefinitionID(v object.ID) *ResourceUpsertBulk

SetResourceDefinitionID sets the "resource_definition_id" field.

func (*ResourceUpsertBulk) SetResourceDefinitionMatchingRuleID added in v0.5.0

func (u *ResourceUpsertBulk) SetResourceDefinitionMatchingRuleID(v object.ID) *ResourceUpsertBulk

SetResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field.

func (*ResourceUpsertBulk) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*ResourceUpsertBulk) SetTemplateID added in v0.4.0

func (u *ResourceUpsertBulk) SetTemplateID(v object.ID) *ResourceUpsertBulk

SetTemplateID sets the "template_id" field.

func (*ResourceUpsertBulk) SetUpdateTime added in v0.4.0

func (u *ResourceUpsertBulk) SetUpdateTime(v time.Time) *ResourceUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*ResourceUpsertBulk) Update added in v0.4.0

func (u *ResourceUpsertBulk) Update(set func(*ResourceUpsert)) *ResourceUpsertBulk

Update allows overriding fields `UPDATE` values. See the ResourceCreateBulk.OnConflict documentation for more info.

func (*ResourceUpsertBulk) UpdateAnnotations added in v0.4.0

func (u *ResourceUpsertBulk) UpdateAnnotations() *ResourceUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateAttributes added in v0.4.0

func (u *ResourceUpsertBulk) UpdateAttributes() *ResourceUpsertBulk

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateComputedAttributes added in v0.5.0

func (u *ResourceUpsertBulk) UpdateComputedAttributes() *ResourceUpsertBulk

UpdateComputedAttributes sets the "computed_attributes" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateDescription added in v0.4.0

func (u *ResourceUpsertBulk) UpdateDescription() *ResourceUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateEndpoints added in v0.5.0

func (u *ResourceUpsertBulk) UpdateEndpoints() *ResourceUpsertBulk

UpdateEndpoints sets the "endpoints" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateLabels added in v0.4.0

func (u *ResourceUpsertBulk) UpdateLabels() *ResourceUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateNewValues added in v0.4.0

func (u *ResourceUpsertBulk) UpdateNewValues() *ResourceUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Resource.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resource.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceUpsertBulk) UpdateResourceDefinitionID added in v0.5.0

func (u *ResourceUpsertBulk) UpdateResourceDefinitionID() *ResourceUpsertBulk

UpdateResourceDefinitionID sets the "resource_definition_id" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateResourceDefinitionMatchingRuleID added in v0.5.0

func (u *ResourceUpsertBulk) UpdateResourceDefinitionMatchingRuleID() *ResourceUpsertBulk

UpdateResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateStatus added in v0.4.0

func (u *ResourceUpsertBulk) UpdateStatus() *ResourceUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateTemplateID added in v0.4.0

func (u *ResourceUpsertBulk) UpdateTemplateID() *ResourceUpsertBulk

UpdateTemplateID sets the "template_id" field to the value that was provided on create.

func (*ResourceUpsertBulk) UpdateUpdateTime added in v0.4.0

func (u *ResourceUpsertBulk) UpdateUpdateTime() *ResourceUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type ResourceUpsertOne added in v0.4.0

type ResourceUpsertOne struct {
	// contains filtered or unexported fields
}

ResourceUpsertOne is the builder for "upsert"-ing

one Resource node.

func (*ResourceUpsertOne) ClearAnnotations added in v0.4.0

func (u *ResourceUpsertOne) ClearAnnotations() *ResourceUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*ResourceUpsertOne) ClearAttributes added in v0.4.0

func (u *ResourceUpsertOne) ClearAttributes() *ResourceUpsertOne

ClearAttributes clears the value of the "attributes" field.

func (*ResourceUpsertOne) ClearComputedAttributes added in v0.5.0

func (u *ResourceUpsertOne) ClearComputedAttributes() *ResourceUpsertOne

ClearComputedAttributes clears the value of the "computed_attributes" field.

func (*ResourceUpsertOne) ClearDescription added in v0.4.0

func (u *ResourceUpsertOne) ClearDescription() *ResourceUpsertOne

ClearDescription clears the value of the "description" field.

func (*ResourceUpsertOne) ClearEndpoints added in v0.5.0

func (u *ResourceUpsertOne) ClearEndpoints() *ResourceUpsertOne

ClearEndpoints clears the value of the "endpoints" field.

func (*ResourceUpsertOne) ClearLabels added in v0.4.0

func (u *ResourceUpsertOne) ClearLabels() *ResourceUpsertOne

ClearLabels clears the value of the "labels" field.

func (*ResourceUpsertOne) ClearResourceDefinitionID added in v0.5.0

func (u *ResourceUpsertOne) ClearResourceDefinitionID() *ResourceUpsertOne

ClearResourceDefinitionID clears the value of the "resource_definition_id" field.

func (*ResourceUpsertOne) ClearResourceDefinitionMatchingRuleID added in v0.5.0

func (u *ResourceUpsertOne) ClearResourceDefinitionMatchingRuleID() *ResourceUpsertOne

ClearResourceDefinitionMatchingRuleID clears the value of the "resource_definition_matching_rule_id" field.

func (*ResourceUpsertOne) ClearStatus added in v0.4.0

func (u *ResourceUpsertOne) ClearStatus() *ResourceUpsertOne

ClearStatus clears the value of the "status" field.

func (*ResourceUpsertOne) ClearTemplateID added in v0.4.0

func (u *ResourceUpsertOne) ClearTemplateID() *ResourceUpsertOne

ClearTemplateID clears the value of the "template_id" field.

func (*ResourceUpsertOne) DoNothing added in v0.4.0

func (u *ResourceUpsertOne) DoNothing() *ResourceUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ResourceUpsertOne) Exec added in v0.4.0

func (u *ResourceUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ResourceUpsertOne) ExecE added in v0.4.0

func (u *ResourceUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Resource) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*ResourceUpsertOne) ExecEX added in v0.4.0

func (u *ResourceUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Resource) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*ResourceUpsertOne) ExecX added in v0.4.0

func (u *ResourceUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ResourceUpsertOne) ID added in v0.4.0

func (u *ResourceUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ResourceUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*ResourceUpsertOne) Ignore added in v0.4.0

func (u *ResourceUpsertOne) Ignore() *ResourceUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Resource.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ResourceUpsertOne) SetAnnotations added in v0.4.0

func (u *ResourceUpsertOne) SetAnnotations(v map[string]string) *ResourceUpsertOne

SetAnnotations sets the "annotations" field.

func (*ResourceUpsertOne) SetAttributes added in v0.4.0

func (u *ResourceUpsertOne) SetAttributes(v property.Values) *ResourceUpsertOne

SetAttributes sets the "attributes" field.

func (*ResourceUpsertOne) SetComputedAttributes added in v0.5.0

func (u *ResourceUpsertOne) SetComputedAttributes(v property.Values) *ResourceUpsertOne

SetComputedAttributes sets the "computed_attributes" field.

func (*ResourceUpsertOne) SetDescription added in v0.4.0

func (u *ResourceUpsertOne) SetDescription(v string) *ResourceUpsertOne

SetDescription sets the "description" field.

func (*ResourceUpsertOne) SetEndpoints added in v0.5.0

SetEndpoints sets the "endpoints" field.

func (*ResourceUpsertOne) SetLabels added in v0.4.0

func (u *ResourceUpsertOne) SetLabels(v map[string]string) *ResourceUpsertOne

SetLabels sets the "labels" field.

func (*ResourceUpsertOne) SetResourceDefinitionID added in v0.5.0

func (u *ResourceUpsertOne) SetResourceDefinitionID(v object.ID) *ResourceUpsertOne

SetResourceDefinitionID sets the "resource_definition_id" field.

func (*ResourceUpsertOne) SetResourceDefinitionMatchingRuleID added in v0.5.0

func (u *ResourceUpsertOne) SetResourceDefinitionMatchingRuleID(v object.ID) *ResourceUpsertOne

SetResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field.

func (*ResourceUpsertOne) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*ResourceUpsertOne) SetTemplateID added in v0.4.0

func (u *ResourceUpsertOne) SetTemplateID(v object.ID) *ResourceUpsertOne

SetTemplateID sets the "template_id" field.

func (*ResourceUpsertOne) SetUpdateTime added in v0.4.0

func (u *ResourceUpsertOne) SetUpdateTime(v time.Time) *ResourceUpsertOne

SetUpdateTime sets the "update_time" field.

func (*ResourceUpsertOne) Update added in v0.4.0

func (u *ResourceUpsertOne) Update(set func(*ResourceUpsert)) *ResourceUpsertOne

Update allows overriding fields `UPDATE` values. See the ResourceCreate.OnConflict documentation for more info.

func (*ResourceUpsertOne) UpdateAnnotations added in v0.4.0

func (u *ResourceUpsertOne) UpdateAnnotations() *ResourceUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateAttributes added in v0.4.0

func (u *ResourceUpsertOne) UpdateAttributes() *ResourceUpsertOne

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateComputedAttributes added in v0.5.0

func (u *ResourceUpsertOne) UpdateComputedAttributes() *ResourceUpsertOne

UpdateComputedAttributes sets the "computed_attributes" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateDescription added in v0.4.0

func (u *ResourceUpsertOne) UpdateDescription() *ResourceUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateEndpoints added in v0.5.0

func (u *ResourceUpsertOne) UpdateEndpoints() *ResourceUpsertOne

UpdateEndpoints sets the "endpoints" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateLabels added in v0.4.0

func (u *ResourceUpsertOne) UpdateLabels() *ResourceUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateNewValues added in v0.4.0

func (u *ResourceUpsertOne) UpdateNewValues() *ResourceUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Resource.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(resource.FieldID)
		}),
	).
	Exec(ctx)

func (*ResourceUpsertOne) UpdateResourceDefinitionID added in v0.5.0

func (u *ResourceUpsertOne) UpdateResourceDefinitionID() *ResourceUpsertOne

UpdateResourceDefinitionID sets the "resource_definition_id" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateResourceDefinitionMatchingRuleID added in v0.5.0

func (u *ResourceUpsertOne) UpdateResourceDefinitionMatchingRuleID() *ResourceUpsertOne

UpdateResourceDefinitionMatchingRuleID sets the "resource_definition_matching_rule_id" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateStatus added in v0.4.0

func (u *ResourceUpsertOne) UpdateStatus() *ResourceUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateTemplateID added in v0.4.0

func (u *ResourceUpsertOne) UpdateTemplateID() *ResourceUpsertOne

UpdateTemplateID sets the "template_id" field to the value that was provided on create.

func (*ResourceUpsertOne) UpdateUpdateTime added in v0.4.0

func (u *ResourceUpsertOne) UpdateUpdateTime() *ResourceUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Resources added in v0.4.0

type Resources []*Resource

Resources is a parsable slice of Resource.

func (Resources) View added in v0.4.0

func (_rs Resources) View() []*ResourceOutput

View returns the output of Resource entities.

type Role

type Role struct {

	// ID of the ent.
	// It is also the name of the role.
	ID string `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// The kind of the role.
	Kind string `json:"kind,omitempty,cli-table-column"`
	// The detail of the role.
	Description string `json:"description,omitempty"`
	// The policy list of the role.
	Policies types.RolePolicies `json:"policies,omitempty"`
	// The environment type list of the role to apply, only for system kind role.
	ApplicableEnvironmentTypes []string `json:"applicable_environment_types,omitempty"`
	// Indicate whether the role is session level, decide when creating.
	Session bool `json:"session,omitempty"`
	// Indicate whether the role is builtin, decide when creating.
	Builtin bool `json:"builtin,omitempty,cli-table-column"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RoleQuery when eager-loading is set.
	Edges RoleEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

Role is the model entity for the Role schema.

func (*Role) ExecContext

func (c *Role) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Role) QueryContext

func (c *Role) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Role) QuerySubjects

func (r *Role) QuerySubjects() *SubjectRoleRelationshipQuery

QuerySubjects queries the "subjects" edge of the Role entity.

func (*Role) String

func (r *Role) String() string

String implements the fmt.Stringer.

func (*Role) Unwrap

func (r *Role) Unwrap() *Role

Unwrap unwraps the Role 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 (*Role) Update

func (r *Role) Update() *RoleUpdateOne

Update returns a builder for updating this Role. Note that you need to call Role.Unwrap() before calling this method if this Role was returned from a transaction, and the transaction was committed or rolled back.

func (*Role) Value

func (r *Role) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Role. This includes values selected through modifiers, order, etc.

func (*Role) View

func (_r *Role) View() *RoleOutput

View returns the output of Role entity.

type RoleClient

type RoleClient struct {
	// contains filtered or unexported fields
}

RoleClient is a client for the Role schema.

func NewRoleClient

func NewRoleClient(c config) *RoleClient

NewRoleClient returns a client for the Role from the given config.

func (*RoleClient) Create

func (c *RoleClient) Create() *RoleCreate

Create returns a builder for creating a Role entity.

func (*RoleClient) CreateBulk

func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk

CreateBulk returns a builder for creating a bulk of Role entities.

func (*RoleClient) Delete

func (c *RoleClient) Delete() *RoleDelete

Delete returns a delete builder for Role.

func (*RoleClient) DeleteOne

func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RoleClient) DeleteOneID

func (c *RoleClient) DeleteOneID(id string) *RoleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RoleClient) ExecContext

func (c *RoleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleClient) Get

func (c *RoleClient) Get(ctx context.Context, id string) (*Role, error)

Get returns a Role entity by its id.

func (*RoleClient) GetX

func (c *RoleClient) GetX(ctx context.Context, id string) *Role

GetX is like Get, but panics if an error occurs.

func (*RoleClient) Hooks

func (c *RoleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RoleClient) Intercept

func (c *RoleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `role.Intercept(f(g(h())))`.

func (*RoleClient) Interceptors

func (c *RoleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RoleClient) MapCreateBulk added in v0.5.0

func (c *RoleClient) MapCreateBulk(slice any, setFunc func(*RoleCreate, int)) *RoleCreateBulk

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 (*RoleClient) Query

func (c *RoleClient) Query() *RoleQuery

Query returns a query builder for Role.

func (*RoleClient) QueryContext

func (c *RoleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleClient) QuerySubjects

func (c *RoleClient) QuerySubjects(r *Role) *SubjectRoleRelationshipQuery

QuerySubjects queries the subjects edge of a Role.

func (*RoleClient) Update

func (c *RoleClient) Update() *RoleUpdate

Update returns an update builder for Role.

func (*RoleClient) UpdateOne

func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RoleClient) UpdateOneID

func (c *RoleClient) UpdateOneID(id string) *RoleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RoleClient) Use

func (c *RoleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `role.Hooks(f(g(h())))`.

type RoleClientGetter

type RoleClientGetter interface {
	// Roles returns the client for interacting with the Role builders.
	Roles() *RoleClient
}

RoleClientGetter is an interface that allows getting RoleClient.

type RoleCreate

type RoleCreate struct {
	// contains filtered or unexported fields
}

RoleCreate is the builder for creating a Role entity.

func (*RoleCreate) AddSubjectIDs

func (rc *RoleCreate) AddSubjectIDs(ids ...object.ID) *RoleCreate

AddSubjectIDs adds the "subjects" edge to the SubjectRoleRelationship entity by IDs.

func (*RoleCreate) AddSubjects

func (rc *RoleCreate) AddSubjects(s ...*SubjectRoleRelationship) *RoleCreate

AddSubjects adds the "subjects" edges to the SubjectRoleRelationship entity.

func (*RoleCreate) Exec

func (rc *RoleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleCreate) ExecContext

func (c *RoleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleCreate) ExecE

func (rc *RoleCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Role) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*RoleCreate) ExecEX

func (rc *RoleCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Role) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*RoleCreate) ExecX

func (rc *RoleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleCreate) Mutation

func (rc *RoleCreate) Mutation() *RoleMutation

Mutation returns the RoleMutation object of the builder.

func (*RoleCreate) OnConflict

func (rc *RoleCreate) OnConflict(opts ...sql.ConflictOption) *RoleUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Role.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RoleUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*RoleCreate) OnConflictColumns

func (rc *RoleCreate) OnConflictColumns(columns ...string) *RoleUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RoleCreate) QueryContext

func (c *RoleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleCreate) Save

func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)

Save creates the Role in the database.

func (*RoleCreate) SaveE

func (rc *RoleCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Role) error) (*Role, error)

SaveE calls the given function after created the Role entity, which is always good for cascading create operations.

func (*RoleCreate) SaveEX

func (rc *RoleCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Role) error) *Role

SaveEX is like SaveE, but panics if an error occurs.

func (*RoleCreate) SaveX

func (rc *RoleCreate) SaveX(ctx context.Context) *Role

SaveX calls Save and panics if Save returns an error.

func (*RoleCreate) Set

func (rc *RoleCreate) Set(obj *Role) *RoleCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*RoleCreate) SetApplicableEnvironmentTypes added in v0.4.0

func (rc *RoleCreate) SetApplicableEnvironmentTypes(s []string) *RoleCreate

SetApplicableEnvironmentTypes sets the "applicable_environment_types" field.

func (*RoleCreate) SetBuiltin

func (rc *RoleCreate) SetBuiltin(b bool) *RoleCreate

SetBuiltin sets the "builtin" field.

func (*RoleCreate) SetCreateTime

func (rc *RoleCreate) SetCreateTime(t time.Time) *RoleCreate

SetCreateTime sets the "create_time" field.

func (*RoleCreate) SetDescription

func (rc *RoleCreate) SetDescription(s string) *RoleCreate

SetDescription sets the "description" field.

func (*RoleCreate) SetID

func (rc *RoleCreate) SetID(s string) *RoleCreate

SetID sets the "id" field.

func (*RoleCreate) SetKind

func (rc *RoleCreate) SetKind(s string) *RoleCreate

SetKind sets the "kind" field.

func (*RoleCreate) SetNillableBuiltin

func (rc *RoleCreate) SetNillableBuiltin(b *bool) *RoleCreate

SetNillableBuiltin sets the "builtin" field if the given value is not nil.

func (*RoleCreate) SetNillableCreateTime

func (rc *RoleCreate) SetNillableCreateTime(t *time.Time) *RoleCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*RoleCreate) SetNillableDescription

func (rc *RoleCreate) SetNillableDescription(s *string) *RoleCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RoleCreate) SetNillableKind

func (rc *RoleCreate) SetNillableKind(s *string) *RoleCreate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*RoleCreate) SetNillableSession

func (rc *RoleCreate) SetNillableSession(b *bool) *RoleCreate

SetNillableSession sets the "session" field if the given value is not nil.

func (*RoleCreate) SetNillableUpdateTime

func (rc *RoleCreate) SetNillableUpdateTime(t *time.Time) *RoleCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*RoleCreate) SetPolicies

func (rc *RoleCreate) SetPolicies(tp types.RolePolicies) *RoleCreate

SetPolicies sets the "policies" field.

func (*RoleCreate) SetSession

func (rc *RoleCreate) SetSession(b bool) *RoleCreate

SetSession sets the "session" field.

func (*RoleCreate) SetUpdateTime

func (rc *RoleCreate) SetUpdateTime(t time.Time) *RoleCreate

SetUpdateTime sets the "update_time" field.

type RoleCreateBulk

type RoleCreateBulk struct {
	// contains filtered or unexported fields
}

RoleCreateBulk is the builder for creating many Role entities in bulk.

func (*RoleCreateBulk) Exec

func (rcb *RoleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleCreateBulk) ExecContext

func (c *RoleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleCreateBulk) ExecE

func (rcb *RoleCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Role) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*RoleCreateBulk) ExecEX

func (rcb *RoleCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Role) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*RoleCreateBulk) ExecX

func (rcb *RoleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleCreateBulk) OnConflict

func (rcb *RoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Role.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RoleUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*RoleCreateBulk) OnConflictColumns

func (rcb *RoleCreateBulk) OnConflictColumns(columns ...string) *RoleUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RoleCreateBulk) QueryContext

func (c *RoleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleCreateBulk) Save

func (rcb *RoleCreateBulk) Save(ctx context.Context) ([]*Role, error)

Save creates the Role entities in the database.

func (*RoleCreateBulk) SaveE

func (rcb *RoleCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Role) error) ([]*Role, error)

SaveE calls the given function after created the Role entities, which is always good for cascading create operations.

func (*RoleCreateBulk) SaveEX

func (rcb *RoleCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Role) error) []*Role

SaveEX is like SaveE, but panics if an error occurs.

func (*RoleCreateBulk) SaveX

func (rcb *RoleCreateBulk) SaveX(ctx context.Context) []*Role

SaveX is like Save, but panics if an error occurs.

func (*RoleCreateBulk) Set

func (rcb *RoleCreateBulk) Set(objs ...*Role) *RoleCreateBulk

Set leverages the RoleCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type RoleCreateInput

type RoleCreateInput struct {

	// The kind of the role.
	Kind string `path:"-" query:"-" json:"kind,cli-table-column,omitempty"`
	// The detail of the role.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// The policy list of the role.
	Policies types.RolePolicies `path:"-" query:"-" json:"policies,omitempty"`
	// The environment type list of the role to apply, only for system kind role.
	ApplicableEnvironmentTypes []string `path:"-" query:"-" json:"applicableEnvironmentTypes,omitempty"`
	// contains filtered or unexported fields
}

RoleCreateInput holds the creation input of the Role entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*RoleCreateInput) Model

func (rci *RoleCreateInput) Model() *Role

Model returns the Role entity for creating, after validating.

func (*RoleCreateInput) SetGinContext

func (ic *RoleCreateInput) SetGinContext(ctx *gin.Context)

func (*RoleCreateInput) SetModelClient

func (ic *RoleCreateInput) SetModelClient(cli *Client)

func (*RoleCreateInput) Validate

func (rci *RoleCreateInput) Validate() error

Validate checks the RoleCreateInput entity.

func (*RoleCreateInput) ValidateWith

func (rci *RoleCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RoleCreateInput entity with the given context and client set.

type RoleCreateInputs

type RoleCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*RoleCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

RoleCreateInputs holds the creation input of the Role entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*RoleCreateInputs) Model

func (rci *RoleCreateInputs) Model() []*Role

Model returns the Role entities for creating, after validating.

func (*RoleCreateInputs) SetGinContext

func (ic *RoleCreateInputs) SetGinContext(ctx *gin.Context)

func (*RoleCreateInputs) SetModelClient

func (ic *RoleCreateInputs) SetModelClient(cli *Client)

func (*RoleCreateInputs) Validate

func (rci *RoleCreateInputs) Validate() error

Validate checks the RoleCreateInputs entity .

func (*RoleCreateInputs) ValidateWith

func (rci *RoleCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RoleCreateInputs entity with the given context and client set.

type RoleCreateInputsItem

type RoleCreateInputsItem struct {
	// The kind of the role.
	Kind string `path:"-" query:"-" json:"kind,cli-table-column,omitempty"`
	// The detail of the role.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// The policy list of the role.
	Policies types.RolePolicies `path:"-" query:"-" json:"policies,omitempty"`
	// The environment type list of the role to apply, only for system kind role.
	ApplicableEnvironmentTypes []string `path:"-" query:"-" json:"applicableEnvironmentTypes,omitempty"`
}

RoleCreateInputs holds the creation input item of the Role entities.

func (*RoleCreateInputsItem) ValidateWith

func (rci *RoleCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RoleCreateInputsItem entity with the given context and client set.

type RoleDelete

type RoleDelete struct {
	// contains filtered or unexported fields
}

RoleDelete is the builder for deleting a Role entity.

func (*RoleDelete) Exec

func (rd *RoleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RoleDelete) ExecContext

func (c *RoleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleDelete) ExecX

func (rd *RoleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RoleDelete) QueryContext

func (c *RoleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleDelete) Where

func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete

Where appends a list predicates to the RoleDelete builder.

type RoleDeleteInput

type RoleDeleteInput struct {
	RoleQueryInput `path:",inline"`
}

RoleDeleteInput holds the deletion input of the Role entity, please tags with `path:",inline"` if embedding.

func (*RoleDeleteInput) SetGinContext

func (ic *RoleDeleteInput) SetGinContext(ctx *gin.Context)

func (*RoleDeleteInput) SetModelClient

func (ic *RoleDeleteInput) SetModelClient(cli *Client)

type RoleDeleteInputs

type RoleDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*RoleDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

RoleDeleteInputs holds the deletion input of the Role entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*RoleDeleteInputs) IDs

func (rdi *RoleDeleteInputs) IDs() []string

IDs returns the ID list of the Role entities for deleting, after validating.

func (*RoleDeleteInputs) Model

func (rdi *RoleDeleteInputs) Model() []*Role

Model returns the Role entities for deleting, after validating.

func (*RoleDeleteInputs) SetGinContext

func (ic *RoleDeleteInputs) SetGinContext(ctx *gin.Context)

func (*RoleDeleteInputs) SetModelClient

func (ic *RoleDeleteInputs) SetModelClient(cli *Client)

func (*RoleDeleteInputs) Validate

func (rdi *RoleDeleteInputs) Validate() error

Validate checks the RoleDeleteInputs entity.

func (*RoleDeleteInputs) ValidateWith

func (rdi *RoleDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RoleDeleteInputs entity with the given context and client set.

type RoleDeleteInputsItem

type RoleDeleteInputsItem struct {
	// ID of the Role entity.
	ID string `path:"-" query:"-" json:"id"`
}

RoleDeleteInputs holds the deletion input item of the Role entities.

type RoleDeleteOne

type RoleDeleteOne struct {
	// contains filtered or unexported fields
}

RoleDeleteOne is the builder for deleting a single Role entity.

func (*RoleDeleteOne) Exec

func (rdo *RoleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RoleDeleteOne) ExecX

func (rdo *RoleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleDeleteOne) Where

func (rdo *RoleDeleteOne) Where(ps ...predicate.Role) *RoleDeleteOne

Where appends a list predicates to the RoleDelete builder.

type RoleEdges

type RoleEdges struct {
	// Subjects holds the value of the subjects edge.
	Subjects []*SubjectRoleRelationship `json:"subjects,omitempty"`
	// contains filtered or unexported fields
}

RoleEdges holds the relations/edges for other nodes in the graph.

func (RoleEdges) SubjectsOrErr

func (e RoleEdges) SubjectsOrErr() ([]*SubjectRoleRelationship, error)

SubjectsOrErr returns the Subjects value or an error if the edge was not loaded in eager-loading.

type RoleGroupBy

type RoleGroupBy struct {
	// contains filtered or unexported fields
}

RoleGroupBy is the group-by builder for Role entities.

func (*RoleGroupBy) Aggregate

func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RoleGroupBy) Bool

func (s *RoleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) BoolX

func (s *RoleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RoleGroupBy) Bools

func (s *RoleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) BoolsX

func (s *RoleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RoleGroupBy) Float64

func (s *RoleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) Float64X

func (s *RoleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RoleGroupBy) Float64s

func (s *RoleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) Float64sX

func (s *RoleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RoleGroupBy) Int

func (s *RoleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) IntX

func (s *RoleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RoleGroupBy) Ints

func (s *RoleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) IntsX

func (s *RoleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RoleGroupBy) Scan

func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RoleGroupBy) ScanX

func (s *RoleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RoleGroupBy) String

func (s *RoleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) StringX

func (s *RoleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RoleGroupBy) Strings

func (s *RoleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) StringsX

func (s *RoleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RoleMutation

type RoleMutation struct {
	// contains filtered or unexported fields
}

RoleMutation represents an operation that mutates the Role nodes in the graph.

func (*RoleMutation) AddField

func (m *RoleMutation) 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 (*RoleMutation) AddSubjectIDs

func (m *RoleMutation) AddSubjectIDs(ids ...object.ID)

AddSubjectIDs adds the "subjects" edge to the SubjectRoleRelationship entity by ids.

func (*RoleMutation) AddedEdges

func (m *RoleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RoleMutation) AddedField

func (m *RoleMutation) 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 (*RoleMutation) AddedFields

func (m *RoleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RoleMutation) AddedIDs

func (m *RoleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RoleMutation) AppendApplicableEnvironmentTypes added in v0.4.0

func (m *RoleMutation) AppendApplicableEnvironmentTypes(s []string)

AppendApplicableEnvironmentTypes adds s to the "applicable_environment_types" field.

func (*RoleMutation) AppendPolicies

func (m *RoleMutation) AppendPolicies(tp types.RolePolicies)

AppendPolicies adds tp to the "policies" field.

func (*RoleMutation) AppendedApplicableEnvironmentTypes added in v0.4.0

func (m *RoleMutation) AppendedApplicableEnvironmentTypes() ([]string, bool)

AppendedApplicableEnvironmentTypes returns the list of values that were appended to the "applicable_environment_types" field in this mutation.

func (*RoleMutation) AppendedPolicies

func (m *RoleMutation) AppendedPolicies() (types.RolePolicies, bool)

AppendedPolicies returns the list of values that were appended to the "policies" field in this mutation.

func (*RoleMutation) ApplicableEnvironmentTypes added in v0.4.0

func (m *RoleMutation) ApplicableEnvironmentTypes() (r []string, exists bool)

ApplicableEnvironmentTypes returns the value of the "applicable_environment_types" field in the mutation.

func (*RoleMutation) ApplicableEnvironmentTypesCleared added in v0.4.0

func (m *RoleMutation) ApplicableEnvironmentTypesCleared() bool

ApplicableEnvironmentTypesCleared returns if the "applicable_environment_types" field was cleared in this mutation.

func (*RoleMutation) Builtin

func (m *RoleMutation) Builtin() (r bool, exists bool)

Builtin returns the value of the "builtin" field in the mutation.

func (*RoleMutation) ClearApplicableEnvironmentTypes added in v0.4.0

func (m *RoleMutation) ClearApplicableEnvironmentTypes()

ClearApplicableEnvironmentTypes clears the value of the "applicable_environment_types" field.

func (*RoleMutation) ClearDescription

func (m *RoleMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*RoleMutation) ClearEdge

func (m *RoleMutation) 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 (*RoleMutation) ClearField

func (m *RoleMutation) 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 (*RoleMutation) ClearSubjects

func (m *RoleMutation) ClearSubjects()

ClearSubjects clears the "subjects" edge to the SubjectRoleRelationship entity.

func (*RoleMutation) ClearedEdges

func (m *RoleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RoleMutation) ClearedFields

func (m *RoleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RoleMutation) Client

func (m RoleMutation) 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 (*RoleMutation) CreateTime

func (m *RoleMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*RoleMutation) Description

func (m *RoleMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*RoleMutation) DescriptionCleared

func (m *RoleMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*RoleMutation) EdgeCleared

func (m *RoleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RoleMutation) ExecContext

func (c *RoleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleMutation) Field

func (m *RoleMutation) 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 (*RoleMutation) FieldCleared

func (m *RoleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RoleMutation) Fields

func (m *RoleMutation) 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 (*RoleMutation) ID

func (m *RoleMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RoleMutation) IDs

func (m *RoleMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*RoleMutation) Kind

func (m *RoleMutation) Kind() (r string, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*RoleMutation) OldApplicableEnvironmentTypes added in v0.4.0

func (m *RoleMutation) OldApplicableEnvironmentTypes(ctx context.Context) (v []string, err error)

OldApplicableEnvironmentTypes returns the old "applicable_environment_types" field's value of the Role entity. If the Role 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 (*RoleMutation) OldBuiltin

func (m *RoleMutation) OldBuiltin(ctx context.Context) (v bool, err error)

OldBuiltin returns the old "builtin" field's value of the Role entity. If the Role 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 (*RoleMutation) OldCreateTime

func (m *RoleMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Role entity. If the Role 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 (*RoleMutation) OldDescription

func (m *RoleMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Role entity. If the Role 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 (*RoleMutation) OldField

func (m *RoleMutation) 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 (*RoleMutation) OldKind

func (m *RoleMutation) OldKind(ctx context.Context) (v string, err error)

OldKind returns the old "kind" field's value of the Role entity. If the Role 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 (*RoleMutation) OldPolicies

func (m *RoleMutation) OldPolicies(ctx context.Context) (v types.RolePolicies, err error)

OldPolicies returns the old "policies" field's value of the Role entity. If the Role 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 (*RoleMutation) OldSession

func (m *RoleMutation) OldSession(ctx context.Context) (v bool, err error)

OldSession returns the old "session" field's value of the Role entity. If the Role 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 (*RoleMutation) OldUpdateTime

func (m *RoleMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Role entity. If the Role 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 (*RoleMutation) Op

func (m *RoleMutation) Op() Op

Op returns the operation name.

func (*RoleMutation) Policies

func (m *RoleMutation) Policies() (r types.RolePolicies, exists bool)

Policies returns the value of the "policies" field in the mutation.

func (*RoleMutation) QueryContext

func (c *RoleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleMutation) RemoveSubjectIDs

func (m *RoleMutation) RemoveSubjectIDs(ids ...object.ID)

RemoveSubjectIDs removes the "subjects" edge to the SubjectRoleRelationship entity by IDs.

func (*RoleMutation) RemovedEdges

func (m *RoleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RoleMutation) RemovedIDs

func (m *RoleMutation) 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 (*RoleMutation) RemovedSubjectsIDs

func (m *RoleMutation) RemovedSubjectsIDs() (ids []object.ID)

RemovedSubjects returns the removed IDs of the "subjects" edge to the SubjectRoleRelationship entity.

func (*RoleMutation) ResetApplicableEnvironmentTypes added in v0.4.0

func (m *RoleMutation) ResetApplicableEnvironmentTypes()

ResetApplicableEnvironmentTypes resets all changes to the "applicable_environment_types" field.

func (*RoleMutation) ResetBuiltin

func (m *RoleMutation) ResetBuiltin()

ResetBuiltin resets all changes to the "builtin" field.

func (*RoleMutation) ResetCreateTime

func (m *RoleMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*RoleMutation) ResetDescription

func (m *RoleMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*RoleMutation) ResetEdge

func (m *RoleMutation) 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 (*RoleMutation) ResetField

func (m *RoleMutation) 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 (*RoleMutation) ResetKind

func (m *RoleMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*RoleMutation) ResetPolicies

func (m *RoleMutation) ResetPolicies()

ResetPolicies resets all changes to the "policies" field.

func (*RoleMutation) ResetSession

func (m *RoleMutation) ResetSession()

ResetSession resets all changes to the "session" field.

func (*RoleMutation) ResetSubjects

func (m *RoleMutation) ResetSubjects()

ResetSubjects resets all changes to the "subjects" edge.

func (*RoleMutation) ResetUpdateTime

func (m *RoleMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*RoleMutation) Session

func (m *RoleMutation) Session() (r bool, exists bool)

Session returns the value of the "session" field in the mutation.

func (*RoleMutation) SetApplicableEnvironmentTypes added in v0.4.0

func (m *RoleMutation) SetApplicableEnvironmentTypes(s []string)

SetApplicableEnvironmentTypes sets the "applicable_environment_types" field.

func (*RoleMutation) SetBuiltin

func (m *RoleMutation) SetBuiltin(b bool)

SetBuiltin sets the "builtin" field.

func (*RoleMutation) SetCreateTime

func (m *RoleMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*RoleMutation) SetDescription

func (m *RoleMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*RoleMutation) SetField

func (m *RoleMutation) 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 (*RoleMutation) SetID

func (m *RoleMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Role entities.

func (*RoleMutation) SetKind

func (m *RoleMutation) SetKind(s string)

SetKind sets the "kind" field.

func (*RoleMutation) SetOp

func (m *RoleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RoleMutation) SetPolicies

func (m *RoleMutation) SetPolicies(tp types.RolePolicies)

SetPolicies sets the "policies" field.

func (*RoleMutation) SetSession

func (m *RoleMutation) SetSession(b bool)

SetSession sets the "session" field.

func (*RoleMutation) SetUpdateTime

func (m *RoleMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*RoleMutation) SubjectsCleared

func (m *RoleMutation) SubjectsCleared() bool

SubjectsCleared reports if the "subjects" edge to the SubjectRoleRelationship entity was cleared.

func (*RoleMutation) SubjectsIDs

func (m *RoleMutation) SubjectsIDs() (ids []object.ID)

SubjectsIDs returns the "subjects" edge IDs in the mutation.

func (RoleMutation) Tx

func (m RoleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RoleMutation) Type

func (m *RoleMutation) Type() string

Type returns the node type of this mutation (Role).

func (*RoleMutation) UpdateTime

func (m *RoleMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*RoleMutation) Where

func (m *RoleMutation) Where(ps ...predicate.Role)

Where appends a list predicates to the RoleMutation builder.

func (*RoleMutation) WhereP

func (m *RoleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RoleOutput

type RoleOutput struct {
	ID                         string             `json:"id,omitempty"`
	CreateTime                 *time.Time         `json:"createTime,omitempty"`
	UpdateTime                 *time.Time         `json:"updateTime,omitempty"`
	Kind                       string             `json:"kind,cli-table-column,omitempty"`
	Description                string             `json:"description,omitempty"`
	Policies                   types.RolePolicies `json:"policies,omitempty"`
	ApplicableEnvironmentTypes []string           `json:"applicableEnvironmentTypes,omitempty"`
	Builtin                    bool               `json:"builtin,cli-table-column,omitempty"`
}

RoleOutput holds the output of the Role entity.

func ExposeRole

func ExposeRole(_r *Role) *RoleOutput

ExposeRole converts the Role to RoleOutput.

func ExposeRoles

func ExposeRoles(_rs []*Role) []*RoleOutput

ExposeRoles converts the Role slice to RoleOutput pointer slice.

type RolePatchInput added in v0.5.0

type RolePatchInput struct {
	RoleQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// The kind of the role.
	Kind string `path:"-" query:"-" json:"kind,omitempty"`
	// The detail of the role.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// The policy list of the role.
	Policies types.RolePolicies `path:"-" query:"-" json:"policies,omitempty"`
	// The environment type list of the role to apply, only for system kind role.
	ApplicableEnvironmentTypes []string `path:"-" query:"-" json:"applicableEnvironmentTypes,omitempty"`
	// Indicate whether the role is session level, decide when creating.
	Session bool `path:"-" query:"-" json:"session,omitempty"`
	// Indicate whether the role is builtin, decide when creating.
	Builtin bool `path:"-" query:"-" json:"builtin,omitempty"`
	// contains filtered or unexported fields
}

RolePatchInput holds the patch input of the Role entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*RolePatchInput) Model added in v0.5.0

func (rpi *RolePatchInput) Model() *Role

Model returns the Role patched entity, after validating.

func (*RolePatchInput) PatchModel added in v0.5.0

func (rpi *RolePatchInput) PatchModel() *Role

PatchModel returns the Role partition entity for patching.

func (*RolePatchInput) SetGinContext added in v0.5.0

func (ic *RolePatchInput) SetGinContext(ctx *gin.Context)

func (*RolePatchInput) SetModelClient added in v0.5.0

func (ic *RolePatchInput) SetModelClient(cli *Client)

func (*RolePatchInput) Validate added in v0.5.0

func (rpi *RolePatchInput) Validate() error

Validate checks the RolePatchInput entity.

func (*RolePatchInput) ValidateWith added in v0.5.0

func (rpi *RolePatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RolePatchInput entity with the given context and client set.

type RoleQuery

type RoleQuery struct {
	// contains filtered or unexported fields
}

RoleQuery is the builder for querying Role entities.

func (*RoleQuery) Aggregate

func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect

Aggregate returns a RoleSelect configured with the given aggregations.

func (*RoleQuery) All

func (rq *RoleQuery) All(ctx context.Context) ([]*Role, error)

All executes the query and returns a list of Roles.

func (*RoleQuery) AllX

func (rq *RoleQuery) AllX(ctx context.Context) []*Role

AllX is like All, but panics if an error occurs.

func (*RoleQuery) Clone

func (rq *RoleQuery) Clone() *RoleQuery

Clone returns a duplicate of the RoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RoleQuery) Count

func (rq *RoleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RoleQuery) CountX

func (rq *RoleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RoleQuery) ExecContext

func (c *RoleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleQuery) Exist

func (rq *RoleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RoleQuery) ExistX

func (rq *RoleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RoleQuery) First

func (rq *RoleQuery) First(ctx context.Context) (*Role, error)

First returns the first Role entity from the query. Returns a *NotFoundError when no Role was found.

func (*RoleQuery) FirstID

func (rq *RoleQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Role ID from the query. Returns a *NotFoundError when no Role ID was found.

func (*RoleQuery) FirstIDX

func (rq *RoleQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*RoleQuery) FirstX

func (rq *RoleQuery) FirstX(ctx context.Context) *Role

FirstX is like First, but panics if an error occurs.

func (*RoleQuery) ForShare

func (rq *RoleQuery) ForShare(opts ...sql.LockOption) *RoleQuery

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 (*RoleQuery) ForUpdate

func (rq *RoleQuery) ForUpdate(opts ...sql.LockOption) *RoleQuery

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 (*RoleQuery) GroupBy

func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Role.Query().
	GroupBy(role.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*RoleQuery) IDs

func (rq *RoleQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Role IDs.

func (*RoleQuery) IDsX

func (rq *RoleQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*RoleQuery) Limit

func (rq *RoleQuery) Limit(limit int) *RoleQuery

Limit the number of records to be returned by this query.

func (*RoleQuery) Modify

func (rq *RoleQuery) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*RoleQuery) Offset

func (rq *RoleQuery) Offset(offset int) *RoleQuery

Offset to start from.

func (*RoleQuery) Only

func (rq *RoleQuery) Only(ctx context.Context) (*Role, error)

Only returns a single Role entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Role entity is found. Returns a *NotFoundError when no Role entities are found.

func (*RoleQuery) OnlyID

func (rq *RoleQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Role ID in the query. Returns a *NotSingularError when more than one Role ID is found. Returns a *NotFoundError when no entities are found.

func (*RoleQuery) OnlyIDX

func (rq *RoleQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RoleQuery) OnlyX

func (rq *RoleQuery) OnlyX(ctx context.Context) *Role

OnlyX is like Only, but panics if an error occurs.

func (*RoleQuery) Order

func (rq *RoleQuery) Order(o ...role.OrderOption) *RoleQuery

Order specifies how the records should be ordered.

func (*RoleQuery) QueryContext

func (c *RoleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleQuery) QuerySubjects

func (rq *RoleQuery) QuerySubjects() *SubjectRoleRelationshipQuery

QuerySubjects chains the current query on the "subjects" edge.

func (*RoleQuery) Select

func (rq *RoleQuery) Select(fields ...string) *RoleSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Role.Query().
	Select(role.FieldCreateTime).
	Scan(ctx, &v)

func (*RoleQuery) Unique

func (rq *RoleQuery) Unique(unique bool) *RoleQuery

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 (*RoleQuery) Where

func (rq *RoleQuery) Where(ps ...predicate.Role) *RoleQuery

Where adds a new predicate for the RoleQuery builder.

func (*RoleQuery) WhereP

func (rq *RoleQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RoleQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*RoleQuery) WithSubjects

func (rq *RoleQuery) WithSubjects(opts ...func(*SubjectRoleRelationshipQuery)) *RoleQuery

WithSubjects tells the query-builder to eager-load the nodes that are connected to the "subjects" edge. The optional arguments are used to configure the query builder of the edge.

type RoleQueryInput

type RoleQueryInput struct {

	// Refer holds the route path reference of the Role entity.
	Refer *object.Refer `path:"role,default=" query:"-" json:"-"`
	// ID of the Role entity.
	ID string `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

RoleQueryInput holds the query input of the Role entity, please tags with `path:",inline"` if embedding.

func (*RoleQueryInput) Model

func (rqi *RoleQueryInput) Model() *Role

Model returns the Role entity for querying, after validating.

func (*RoleQueryInput) SetGinContext

func (ic *RoleQueryInput) SetGinContext(ctx *gin.Context)

func (*RoleQueryInput) SetModelClient

func (ic *RoleQueryInput) SetModelClient(cli *Client)

func (*RoleQueryInput) Validate

func (rqi *RoleQueryInput) Validate() error

Validate checks the RoleQueryInput entity.

func (*RoleQueryInput) ValidateWith

func (rqi *RoleQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RoleQueryInput entity with the given context and client set.

type RoleQueryInputs

type RoleQueryInputs struct {
	// contains filtered or unexported fields
}

RoleQueryInputs holds the query input of the Role entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*RoleQueryInputs) SetGinContext

func (ic *RoleQueryInputs) SetGinContext(ctx *gin.Context)

func (*RoleQueryInputs) SetModelClient

func (ic *RoleQueryInputs) SetModelClient(cli *Client)

func (*RoleQueryInputs) Validate

func (rqi *RoleQueryInputs) Validate() error

Validate checks the RoleQueryInputs entity.

func (*RoleQueryInputs) ValidateWith

func (rqi *RoleQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RoleQueryInputs entity with the given context and client set.

type RoleSelect

type RoleSelect struct {
	*RoleQuery
	// contains filtered or unexported fields
}

RoleSelect is the builder for selecting fields of Role entities.

func (*RoleSelect) Aggregate

func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RoleSelect) Bool

func (s *RoleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RoleSelect) BoolX

func (s *RoleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RoleSelect) Bools

func (s *RoleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RoleSelect) BoolsX

func (s *RoleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (RoleSelect) ExecContext

func (c RoleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleSelect) Float64

func (s *RoleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RoleSelect) Float64X

func (s *RoleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RoleSelect) Float64s

func (s *RoleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RoleSelect) Float64sX

func (s *RoleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RoleSelect) Int

func (s *RoleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RoleSelect) IntX

func (s *RoleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RoleSelect) Ints

func (s *RoleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RoleSelect) IntsX

func (s *RoleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RoleSelect) Modify

func (rs *RoleSelect) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect

Modify adds a query modifier for attaching custom logic to queries.

func (RoleSelect) QueryContext

func (c RoleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleSelect) Scan

func (rs *RoleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RoleSelect) ScanX

func (s *RoleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RoleSelect) String

func (s *RoleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RoleSelect) StringX

func (s *RoleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RoleSelect) Strings

func (s *RoleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RoleSelect) StringsX

func (s *RoleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RoleUpdate

type RoleUpdate struct {
	// contains filtered or unexported fields
}

RoleUpdate is the builder for updating Role entities.

func (*RoleUpdate) AddSubjectIDs

func (ru *RoleUpdate) AddSubjectIDs(ids ...object.ID) *RoleUpdate

AddSubjectIDs adds the "subjects" edge to the SubjectRoleRelationship entity by IDs.

func (*RoleUpdate) AddSubjects

func (ru *RoleUpdate) AddSubjects(s ...*SubjectRoleRelationship) *RoleUpdate

AddSubjects adds the "subjects" edges to the SubjectRoleRelationship entity.

func (*RoleUpdate) AppendApplicableEnvironmentTypes added in v0.4.0

func (ru *RoleUpdate) AppendApplicableEnvironmentTypes(s []string) *RoleUpdate

AppendApplicableEnvironmentTypes appends s to the "applicable_environment_types" field.

func (*RoleUpdate) AppendPolicies

func (ru *RoleUpdate) AppendPolicies(tp types.RolePolicies) *RoleUpdate

AppendPolicies appends tp to the "policies" field.

func (*RoleUpdate) ClearApplicableEnvironmentTypes added in v0.4.0

func (ru *RoleUpdate) ClearApplicableEnvironmentTypes() *RoleUpdate

ClearApplicableEnvironmentTypes clears the value of the "applicable_environment_types" field.

func (*RoleUpdate) ClearDescription

func (ru *RoleUpdate) ClearDescription() *RoleUpdate

ClearDescription clears the value of the "description" field.

func (*RoleUpdate) ClearSubjects

func (ru *RoleUpdate) ClearSubjects() *RoleUpdate

ClearSubjects clears all "subjects" edges to the SubjectRoleRelationship entity.

func (*RoleUpdate) Exec

func (ru *RoleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleUpdate) ExecContext

func (c *RoleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleUpdate) ExecX

func (ru *RoleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleUpdate) Modify

func (ru *RoleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*RoleUpdate) Mutation

func (ru *RoleUpdate) Mutation() *RoleMutation

Mutation returns the RoleMutation object of the builder.

func (*RoleUpdate) QueryContext

func (c *RoleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleUpdate) RemoveSubjectIDs

func (ru *RoleUpdate) RemoveSubjectIDs(ids ...object.ID) *RoleUpdate

RemoveSubjectIDs removes the "subjects" edge to SubjectRoleRelationship entities by IDs.

func (*RoleUpdate) RemoveSubjects

func (ru *RoleUpdate) RemoveSubjects(s ...*SubjectRoleRelationship) *RoleUpdate

RemoveSubjects removes "subjects" edges to SubjectRoleRelationship entities.

func (*RoleUpdate) Save

func (ru *RoleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RoleUpdate) SaveX

func (ru *RoleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RoleUpdate) Set

func (ru *RoleUpdate) Set(obj *Role) *RoleUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*RoleUpdate) SetApplicableEnvironmentTypes added in v0.4.0

func (ru *RoleUpdate) SetApplicableEnvironmentTypes(s []string) *RoleUpdate

SetApplicableEnvironmentTypes sets the "applicable_environment_types" field.

func (*RoleUpdate) SetDescription

func (ru *RoleUpdate) SetDescription(s string) *RoleUpdate

SetDescription sets the "description" field.

func (*RoleUpdate) SetNillableDescription

func (ru *RoleUpdate) SetNillableDescription(s *string) *RoleUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RoleUpdate) SetPolicies

func (ru *RoleUpdate) SetPolicies(tp types.RolePolicies) *RoleUpdate

SetPolicies sets the "policies" field.

func (*RoleUpdate) SetUpdateTime

func (ru *RoleUpdate) SetUpdateTime(t time.Time) *RoleUpdate

SetUpdateTime sets the "update_time" field.

func (*RoleUpdate) Where

func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate

Where appends a list predicates to the RoleUpdate builder.

type RoleUpdateInput

type RoleUpdateInput struct {
	RoleQueryInput `path:",inline" query:"-" json:"-"`

	// The detail of the role.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// The policy list of the role.
	Policies types.RolePolicies `path:"-" query:"-" json:"policies,omitempty"`
	// The environment type list of the role to apply, only for system kind role.
	ApplicableEnvironmentTypes []string `path:"-" query:"-" json:"applicableEnvironmentTypes,omitempty"`
}

RoleUpdateInput holds the modification input of the Role entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*RoleUpdateInput) Model

func (rui *RoleUpdateInput) Model() *Role

Model returns the Role entity for modifying, after validating.

func (*RoleUpdateInput) SetGinContext

func (ic *RoleUpdateInput) SetGinContext(ctx *gin.Context)

func (*RoleUpdateInput) SetModelClient

func (ic *RoleUpdateInput) SetModelClient(cli *Client)

func (*RoleUpdateInput) Validate

func (rui *RoleUpdateInput) Validate() error

Validate checks the RoleUpdateInput entity.

func (*RoleUpdateInput) ValidateWith

func (rui *RoleUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RoleUpdateInput entity with the given context and client set.

type RoleUpdateInputs

type RoleUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*RoleUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

RoleUpdateInputs holds the modification input of the Role entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*RoleUpdateInputs) IDs

func (rui *RoleUpdateInputs) IDs() []string

IDs returns the ID list of the Role entities for modifying, after validating.

func (*RoleUpdateInputs) Model

func (rui *RoleUpdateInputs) Model() []*Role

Model returns the Role entities for modifying, after validating.

func (*RoleUpdateInputs) SetGinContext

func (ic *RoleUpdateInputs) SetGinContext(ctx *gin.Context)

func (*RoleUpdateInputs) SetModelClient

func (ic *RoleUpdateInputs) SetModelClient(cli *Client)

func (*RoleUpdateInputs) Validate

func (rui *RoleUpdateInputs) Validate() error

Validate checks the RoleUpdateInputs entity.

func (*RoleUpdateInputs) ValidateWith

func (rui *RoleUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RoleUpdateInputs entity with the given context and client set.

type RoleUpdateInputsItem

type RoleUpdateInputsItem struct {
	// ID of the Role entity.
	ID string `path:"-" query:"-" json:"id"`

	// The detail of the role.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// The policy list of the role.
	Policies types.RolePolicies `path:"-" query:"-" json:"policies"`
	// The environment type list of the role to apply, only for system kind role.
	ApplicableEnvironmentTypes []string `path:"-" query:"-" json:"applicableEnvironmentTypes,omitempty"`
}

RoleUpdateInputs holds the modification input item of the Role entities.

func (*RoleUpdateInputsItem) ValidateWith

func (rui *RoleUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the RoleUpdateInputsItem entity with the given context and client set.

type RoleUpdateOne

type RoleUpdateOne struct {
	// contains filtered or unexported fields
}

RoleUpdateOne is the builder for updating a single Role entity.

func (*RoleUpdateOne) AddSubjectIDs

func (ruo *RoleUpdateOne) AddSubjectIDs(ids ...object.ID) *RoleUpdateOne

AddSubjectIDs adds the "subjects" edge to the SubjectRoleRelationship entity by IDs.

func (*RoleUpdateOne) AddSubjects

func (ruo *RoleUpdateOne) AddSubjects(s ...*SubjectRoleRelationship) *RoleUpdateOne

AddSubjects adds the "subjects" edges to the SubjectRoleRelationship entity.

func (*RoleUpdateOne) AppendApplicableEnvironmentTypes added in v0.4.0

func (ruo *RoleUpdateOne) AppendApplicableEnvironmentTypes(s []string) *RoleUpdateOne

AppendApplicableEnvironmentTypes appends s to the "applicable_environment_types" field.

func (*RoleUpdateOne) AppendPolicies

func (ruo *RoleUpdateOne) AppendPolicies(tp types.RolePolicies) *RoleUpdateOne

AppendPolicies appends tp to the "policies" field.

func (*RoleUpdateOne) ClearApplicableEnvironmentTypes added in v0.4.0

func (ruo *RoleUpdateOne) ClearApplicableEnvironmentTypes() *RoleUpdateOne

ClearApplicableEnvironmentTypes clears the value of the "applicable_environment_types" field.

func (*RoleUpdateOne) ClearDescription

func (ruo *RoleUpdateOne) ClearDescription() *RoleUpdateOne

ClearDescription clears the value of the "description" field.

func (*RoleUpdateOne) ClearSubjects

func (ruo *RoleUpdateOne) ClearSubjects() *RoleUpdateOne

ClearSubjects clears all "subjects" edges to the SubjectRoleRelationship entity.

func (*RoleUpdateOne) Exec

func (ruo *RoleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RoleUpdateOne) ExecContext

func (c *RoleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleUpdateOne) ExecE

func (ruo *RoleUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Role) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*RoleUpdateOne) ExecEX

func (ruo *RoleUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Role) error)

ExecX is like Exec, but panics if an error occurs.

func (*RoleUpdateOne) ExecX

func (ruo *RoleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleUpdateOne) Modify

func (ruo *RoleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*RoleUpdateOne) Mutation

func (ruo *RoleUpdateOne) Mutation() *RoleMutation

Mutation returns the RoleMutation object of the builder.

func (*RoleUpdateOne) QueryContext

func (c *RoleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleUpdateOne) RemoveSubjectIDs

func (ruo *RoleUpdateOne) RemoveSubjectIDs(ids ...object.ID) *RoleUpdateOne

RemoveSubjectIDs removes the "subjects" edge to SubjectRoleRelationship entities by IDs.

func (*RoleUpdateOne) RemoveSubjects

func (ruo *RoleUpdateOne) RemoveSubjects(s ...*SubjectRoleRelationship) *RoleUpdateOne

RemoveSubjects removes "subjects" edges to SubjectRoleRelationship entities.

func (*RoleUpdateOne) Save

func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)

Save executes the query and returns the updated Role entity.

func (*RoleUpdateOne) SaveE

func (ruo *RoleUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Role) error) (*Role, error)

SaveE calls the given function after updated the Role entity, which is always good for cascading update operations.

func (*RoleUpdateOne) SaveEX

func (ruo *RoleUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Role) error) *Role

SaveEX is like SaveE, but panics if an error occurs.

func (*RoleUpdateOne) SaveX

func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role

SaveX is like Save, but panics if an error occurs.

func (*RoleUpdateOne) Select

func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RoleUpdateOne) Set

func (ruo *RoleUpdateOne) Set(obj *Role) *RoleUpdateOne

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*RoleUpdateOne) SetApplicableEnvironmentTypes added in v0.4.0

func (ruo *RoleUpdateOne) SetApplicableEnvironmentTypes(s []string) *RoleUpdateOne

SetApplicableEnvironmentTypes sets the "applicable_environment_types" field.

func (*RoleUpdateOne) SetDescription

func (ruo *RoleUpdateOne) SetDescription(s string) *RoleUpdateOne

SetDescription sets the "description" field.

func (*RoleUpdateOne) SetNillableDescription

func (ruo *RoleUpdateOne) SetNillableDescription(s *string) *RoleUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RoleUpdateOne) SetPolicies

func (ruo *RoleUpdateOne) SetPolicies(tp types.RolePolicies) *RoleUpdateOne

SetPolicies sets the "policies" field.

func (*RoleUpdateOne) SetUpdateTime

func (ruo *RoleUpdateOne) SetUpdateTime(t time.Time) *RoleUpdateOne

SetUpdateTime sets the "update_time" field.

func (*RoleUpdateOne) Where

func (ruo *RoleUpdateOne) Where(ps ...predicate.Role) *RoleUpdateOne

Where appends a list predicates to the RoleUpdate builder.

type RoleUpsert

type RoleUpsert struct {
	*sql.UpdateSet
}

RoleUpsert is the "OnConflict" setter.

func (*RoleUpsert) ClearApplicableEnvironmentTypes added in v0.4.0

func (u *RoleUpsert) ClearApplicableEnvironmentTypes() *RoleUpsert

ClearApplicableEnvironmentTypes clears the value of the "applicable_environment_types" field.

func (*RoleUpsert) ClearDescription

func (u *RoleUpsert) ClearDescription() *RoleUpsert

ClearDescription clears the value of the "description" field.

func (*RoleUpsert) SetApplicableEnvironmentTypes added in v0.4.0

func (u *RoleUpsert) SetApplicableEnvironmentTypes(v []string) *RoleUpsert

SetApplicableEnvironmentTypes sets the "applicable_environment_types" field.

func (*RoleUpsert) SetDescription

func (u *RoleUpsert) SetDescription(v string) *RoleUpsert

SetDescription sets the "description" field.

func (*RoleUpsert) SetPolicies

func (u *RoleUpsert) SetPolicies(v types.RolePolicies) *RoleUpsert

SetPolicies sets the "policies" field.

func (*RoleUpsert) SetUpdateTime

func (u *RoleUpsert) SetUpdateTime(v time.Time) *RoleUpsert

SetUpdateTime sets the "update_time" field.

func (*RoleUpsert) UpdateApplicableEnvironmentTypes added in v0.4.0

func (u *RoleUpsert) UpdateApplicableEnvironmentTypes() *RoleUpsert

UpdateApplicableEnvironmentTypes sets the "applicable_environment_types" field to the value that was provided on create.

func (*RoleUpsert) UpdateDescription

func (u *RoleUpsert) UpdateDescription() *RoleUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RoleUpsert) UpdatePolicies

func (u *RoleUpsert) UpdatePolicies() *RoleUpsert

UpdatePolicies sets the "policies" field to the value that was provided on create.

func (*RoleUpsert) UpdateUpdateTime

func (u *RoleUpsert) UpdateUpdateTime() *RoleUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type RoleUpsertBulk

type RoleUpsertBulk struct {
	// contains filtered or unexported fields
}

RoleUpsertBulk is the builder for "upsert"-ing a bulk of Role nodes.

func (*RoleUpsertBulk) ClearApplicableEnvironmentTypes added in v0.4.0

func (u *RoleUpsertBulk) ClearApplicableEnvironmentTypes() *RoleUpsertBulk

ClearApplicableEnvironmentTypes clears the value of the "applicable_environment_types" field.

func (*RoleUpsertBulk) ClearDescription

func (u *RoleUpsertBulk) ClearDescription() *RoleUpsertBulk

ClearDescription clears the value of the "description" field.

func (*RoleUpsertBulk) DoNothing

func (u *RoleUpsertBulk) DoNothing() *RoleUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RoleUpsertBulk) Exec

func (u *RoleUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleUpsertBulk) ExecE

func (u *RoleUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Role) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*RoleUpsertBulk) ExecEX

func (u *RoleUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Role) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*RoleUpsertBulk) ExecX

func (u *RoleUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleUpsertBulk) Ignore

func (u *RoleUpsertBulk) Ignore() *RoleUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*RoleUpsertBulk) SetApplicableEnvironmentTypes added in v0.4.0

func (u *RoleUpsertBulk) SetApplicableEnvironmentTypes(v []string) *RoleUpsertBulk

SetApplicableEnvironmentTypes sets the "applicable_environment_types" field.

func (*RoleUpsertBulk) SetDescription

func (u *RoleUpsertBulk) SetDescription(v string) *RoleUpsertBulk

SetDescription sets the "description" field.

func (*RoleUpsertBulk) SetPolicies

func (u *RoleUpsertBulk) SetPolicies(v types.RolePolicies) *RoleUpsertBulk

SetPolicies sets the "policies" field.

func (*RoleUpsertBulk) SetUpdateTime

func (u *RoleUpsertBulk) SetUpdateTime(v time.Time) *RoleUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*RoleUpsertBulk) Update

func (u *RoleUpsertBulk) Update(set func(*RoleUpsert)) *RoleUpsertBulk

Update allows overriding fields `UPDATE` values. See the RoleCreateBulk.OnConflict documentation for more info.

func (*RoleUpsertBulk) UpdateApplicableEnvironmentTypes added in v0.4.0

func (u *RoleUpsertBulk) UpdateApplicableEnvironmentTypes() *RoleUpsertBulk

UpdateApplicableEnvironmentTypes sets the "applicable_environment_types" field to the value that was provided on create.

func (*RoleUpsertBulk) UpdateDescription

func (u *RoleUpsertBulk) UpdateDescription() *RoleUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RoleUpsertBulk) UpdateNewValues

func (u *RoleUpsertBulk) UpdateNewValues() *RoleUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(role.FieldID)
		}),
	).
	Exec(ctx)

func (*RoleUpsertBulk) UpdatePolicies

func (u *RoleUpsertBulk) UpdatePolicies() *RoleUpsertBulk

UpdatePolicies sets the "policies" field to the value that was provided on create.

func (*RoleUpsertBulk) UpdateUpdateTime

func (u *RoleUpsertBulk) UpdateUpdateTime() *RoleUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type RoleUpsertOne

type RoleUpsertOne struct {
	// contains filtered or unexported fields
}

RoleUpsertOne is the builder for "upsert"-ing

one Role node.

func (*RoleUpsertOne) ClearApplicableEnvironmentTypes added in v0.4.0

func (u *RoleUpsertOne) ClearApplicableEnvironmentTypes() *RoleUpsertOne

ClearApplicableEnvironmentTypes clears the value of the "applicable_environment_types" field.

func (*RoleUpsertOne) ClearDescription

func (u *RoleUpsertOne) ClearDescription() *RoleUpsertOne

ClearDescription clears the value of the "description" field.

func (*RoleUpsertOne) DoNothing

func (u *RoleUpsertOne) DoNothing() *RoleUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RoleUpsertOne) Exec

func (u *RoleUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleUpsertOne) ExecE

func (u *RoleUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Role) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*RoleUpsertOne) ExecEX

func (u *RoleUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Role) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*RoleUpsertOne) ExecX

func (u *RoleUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleUpsertOne) ID

func (u *RoleUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RoleUpsertOne) IDX

func (u *RoleUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*RoleUpsertOne) Ignore

func (u *RoleUpsertOne) Ignore() *RoleUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Role.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RoleUpsertOne) SetApplicableEnvironmentTypes added in v0.4.0

func (u *RoleUpsertOne) SetApplicableEnvironmentTypes(v []string) *RoleUpsertOne

SetApplicableEnvironmentTypes sets the "applicable_environment_types" field.

func (*RoleUpsertOne) SetDescription

func (u *RoleUpsertOne) SetDescription(v string) *RoleUpsertOne

SetDescription sets the "description" field.

func (*RoleUpsertOne) SetPolicies

func (u *RoleUpsertOne) SetPolicies(v types.RolePolicies) *RoleUpsertOne

SetPolicies sets the "policies" field.

func (*RoleUpsertOne) SetUpdateTime

func (u *RoleUpsertOne) SetUpdateTime(v time.Time) *RoleUpsertOne

SetUpdateTime sets the "update_time" field.

func (*RoleUpsertOne) Update

func (u *RoleUpsertOne) Update(set func(*RoleUpsert)) *RoleUpsertOne

Update allows overriding fields `UPDATE` values. See the RoleCreate.OnConflict documentation for more info.

func (*RoleUpsertOne) UpdateApplicableEnvironmentTypes added in v0.4.0

func (u *RoleUpsertOne) UpdateApplicableEnvironmentTypes() *RoleUpsertOne

UpdateApplicableEnvironmentTypes sets the "applicable_environment_types" field to the value that was provided on create.

func (*RoleUpsertOne) UpdateDescription

func (u *RoleUpsertOne) UpdateDescription() *RoleUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RoleUpsertOne) UpdateNewValues

func (u *RoleUpsertOne) UpdateNewValues() *RoleUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(role.FieldID)
		}),
	).
	Exec(ctx)

func (*RoleUpsertOne) UpdatePolicies

func (u *RoleUpsertOne) UpdatePolicies() *RoleUpsertOne

UpdatePolicies sets the "policies" field to the value that was provided on create.

func (*RoleUpsertOne) UpdateUpdateTime

func (u *RoleUpsertOne) UpdateUpdateTime() *RoleUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Roles

type Roles []*Role

Roles is a parsable slice of Role.

func (Roles) View

func (_rs Roles) View() []*RoleOutput

View returns the output of Role entities.

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 SchemaConfig

type SchemaConfig = internal.SchemaConfig

SchemaConfig represents alternative schema names for all tables that can be passed at runtime.

type Setting

type Setting struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// The name of system setting.
	Name string `json:"name,omitempty"`
	// The value of system setting, store in string.
	Value crypto.String `json:"value,omitempty,cli-table-column"`
	// Indicate the system setting should be hidden or not, default is visible.
	Hidden *bool `json:"hidden,omitempty"`
	// Indicate the system setting should be edited or not, default is readonly.
	Editable *bool `json:"editable,omitempty"`
	// Indicate the system setting should be sanitized or not before exposing, default is not.
	Sensitive *bool `json:"sensitive,omitempty"`
	// Indicate the system setting should be exposed or not, default is exposed.
	Private *bool `json:"private,omitempty"`

	// Configured indicates the setting whether to be configured.
	// Configured does not store in the database.
	Configured bool `json:"configured,omitempty"`
	// contains filtered or unexported fields
}

Setting is the model entity for the Setting schema.

func (*Setting) ExecContext

func (c *Setting) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Setting) GetValue

func (s *Setting) GetValue(name string) (ent.Value, error)

GetValue returns the ent.Value that was dynamically selected and assigned to the Setting. This includes values selected through modifiers, order, etc.

func (*Setting) QueryContext

func (c *Setting) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Setting) String

func (s *Setting) String() string

String implements the fmt.Stringer.

func (*Setting) Unwrap

func (s *Setting) Unwrap() *Setting

Unwrap unwraps the Setting 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 (*Setting) Update

func (s *Setting) Update() *SettingUpdateOne

Update returns a builder for updating this Setting. Note that you need to call Setting.Unwrap() before calling this method if this Setting was returned from a transaction, and the transaction was committed or rolled back.

func (*Setting) View

func (_s *Setting) View() *SettingOutput

View returns the output of Setting entity.

type SettingClient

type SettingClient struct {
	// contains filtered or unexported fields
}

SettingClient is a client for the Setting schema.

func NewSettingClient

func NewSettingClient(c config) *SettingClient

NewSettingClient returns a client for the Setting from the given config.

func (*SettingClient) Create

func (c *SettingClient) Create() *SettingCreate

Create returns a builder for creating a Setting entity.

func (*SettingClient) CreateBulk

func (c *SettingClient) CreateBulk(builders ...*SettingCreate) *SettingCreateBulk

CreateBulk returns a builder for creating a bulk of Setting entities.

func (*SettingClient) Delete

func (c *SettingClient) Delete() *SettingDelete

Delete returns a delete builder for Setting.

func (*SettingClient) DeleteOne

func (c *SettingClient) DeleteOne(s *Setting) *SettingDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SettingClient) DeleteOneID

func (c *SettingClient) DeleteOneID(id object.ID) *SettingDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SettingClient) ExecContext

func (c *SettingClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SettingClient) Get

func (c *SettingClient) Get(ctx context.Context, id object.ID) (*Setting, error)

Get returns a Setting entity by its id.

func (*SettingClient) GetX

func (c *SettingClient) GetX(ctx context.Context, id object.ID) *Setting

GetX is like Get, but panics if an error occurs.

func (*SettingClient) Hooks

func (c *SettingClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SettingClient) Intercept

func (c *SettingClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `setting.Intercept(f(g(h())))`.

func (*SettingClient) Interceptors

func (c *SettingClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SettingClient) MapCreateBulk added in v0.5.0

func (c *SettingClient) MapCreateBulk(slice any, setFunc func(*SettingCreate, int)) *SettingCreateBulk

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 (*SettingClient) Query

func (c *SettingClient) Query() *SettingQuery

Query returns a query builder for Setting.

func (*SettingClient) QueryContext

func (c *SettingClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SettingClient) Update

func (c *SettingClient) Update() *SettingUpdate

Update returns an update builder for Setting.

func (*SettingClient) UpdateOne

func (c *SettingClient) UpdateOne(s *Setting) *SettingUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SettingClient) UpdateOneID

func (c *SettingClient) UpdateOneID(id object.ID) *SettingUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SettingClient) Use

func (c *SettingClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `setting.Hooks(f(g(h())))`.

type SettingClientGetter

type SettingClientGetter interface {
	// Settings returns the client for interacting with the Setting builders.
	Settings() *SettingClient
}

SettingClientGetter is an interface that allows getting SettingClient.

type SettingCreate

type SettingCreate struct {
	// contains filtered or unexported fields
}

SettingCreate is the builder for creating a Setting entity.

func (*SettingCreate) Exec

func (sc *SettingCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SettingCreate) ExecContext

func (c *SettingCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SettingCreate) ExecE

func (sc *SettingCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Setting) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SettingCreate) ExecEX

func (sc *SettingCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Setting) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SettingCreate) ExecX

func (sc *SettingCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SettingCreate) Mutation

func (sc *SettingCreate) Mutation() *SettingMutation

Mutation returns the SettingMutation object of the builder.

func (*SettingCreate) OnConflict

func (sc *SettingCreate) OnConflict(opts ...sql.ConflictOption) *SettingUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Setting.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SettingUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*SettingCreate) OnConflictColumns

func (sc *SettingCreate) OnConflictColumns(columns ...string) *SettingUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Setting.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SettingCreate) QueryContext

func (c *SettingCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SettingCreate) Save

func (sc *SettingCreate) Save(ctx context.Context) (*Setting, error)

Save creates the Setting in the database.

func (*SettingCreate) SaveE

func (sc *SettingCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Setting) error) (*Setting, error)

SaveE calls the given function after created the Setting entity, which is always good for cascading create operations.

func (*SettingCreate) SaveEX

func (sc *SettingCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Setting) error) *Setting

SaveEX is like SaveE, but panics if an error occurs.

func (*SettingCreate) SaveX

func (sc *SettingCreate) SaveX(ctx context.Context) *Setting

SaveX calls Save and panics if Save returns an error.

func (*SettingCreate) Set

func (sc *SettingCreate) Set(obj *Setting) *SettingCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*SettingCreate) SetCreateTime

func (sc *SettingCreate) SetCreateTime(t time.Time) *SettingCreate

SetCreateTime sets the "create_time" field.

func (*SettingCreate) SetEditable

func (sc *SettingCreate) SetEditable(b bool) *SettingCreate

SetEditable sets the "editable" field.

func (*SettingCreate) SetHidden

func (sc *SettingCreate) SetHidden(b bool) *SettingCreate

SetHidden sets the "hidden" field.

func (*SettingCreate) SetID

func (sc *SettingCreate) SetID(o object.ID) *SettingCreate

SetID sets the "id" field.

func (*SettingCreate) SetName

func (sc *SettingCreate) SetName(s string) *SettingCreate

SetName sets the "name" field.

func (*SettingCreate) SetNillableCreateTime

func (sc *SettingCreate) SetNillableCreateTime(t *time.Time) *SettingCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*SettingCreate) SetNillableEditable

func (sc *SettingCreate) SetNillableEditable(b *bool) *SettingCreate

SetNillableEditable sets the "editable" field if the given value is not nil.

func (*SettingCreate) SetNillableHidden

func (sc *SettingCreate) SetNillableHidden(b *bool) *SettingCreate

SetNillableHidden sets the "hidden" field if the given value is not nil.

func (*SettingCreate) SetNillablePrivate

func (sc *SettingCreate) SetNillablePrivate(b *bool) *SettingCreate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*SettingCreate) SetNillableSensitive

func (sc *SettingCreate) SetNillableSensitive(b *bool) *SettingCreate

SetNillableSensitive sets the "sensitive" field if the given value is not nil.

func (*SettingCreate) SetNillableUpdateTime

func (sc *SettingCreate) SetNillableUpdateTime(t *time.Time) *SettingCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*SettingCreate) SetPrivate

func (sc *SettingCreate) SetPrivate(b bool) *SettingCreate

SetPrivate sets the "private" field.

func (*SettingCreate) SetSensitive

func (sc *SettingCreate) SetSensitive(b bool) *SettingCreate

SetSensitive sets the "sensitive" field.

func (*SettingCreate) SetUpdateTime

func (sc *SettingCreate) SetUpdateTime(t time.Time) *SettingCreate

SetUpdateTime sets the "update_time" field.

func (*SettingCreate) SetValue

func (sc *SettingCreate) SetValue(c crypto.String) *SettingCreate

SetValue sets the "value" field.

type SettingCreateBulk

type SettingCreateBulk struct {
	// contains filtered or unexported fields
}

SettingCreateBulk is the builder for creating many Setting entities in bulk.

func (*SettingCreateBulk) Exec

func (scb *SettingCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SettingCreateBulk) ExecContext

func (c *SettingCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SettingCreateBulk) ExecE

func (scb *SettingCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Setting) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SettingCreateBulk) ExecEX

func (scb *SettingCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Setting) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SettingCreateBulk) ExecX

func (scb *SettingCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SettingCreateBulk) OnConflict

func (scb *SettingCreateBulk) OnConflict(opts ...sql.ConflictOption) *SettingUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Setting.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SettingUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*SettingCreateBulk) OnConflictColumns

func (scb *SettingCreateBulk) OnConflictColumns(columns ...string) *SettingUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Setting.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SettingCreateBulk) QueryContext

func (c *SettingCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SettingCreateBulk) Save

func (scb *SettingCreateBulk) Save(ctx context.Context) ([]*Setting, error)

Save creates the Setting entities in the database.

func (*SettingCreateBulk) SaveE

func (scb *SettingCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Setting) error) ([]*Setting, error)

SaveE calls the given function after created the Setting entities, which is always good for cascading create operations.

func (*SettingCreateBulk) SaveEX

func (scb *SettingCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Setting) error) []*Setting

SaveEX is like SaveE, but panics if an error occurs.

func (*SettingCreateBulk) SaveX

func (scb *SettingCreateBulk) SaveX(ctx context.Context) []*Setting

SaveX is like Save, but panics if an error occurs.

func (*SettingCreateBulk) Set

func (scb *SettingCreateBulk) Set(objs ...*Setting) *SettingCreateBulk

Set leverages the SettingCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type SettingCreateInput

type SettingCreateInput struct {

	// The value of system setting, store in string.
	Value crypto.String `path:"-" query:"-" json:"value,cli-table-column"`
	// contains filtered or unexported fields
}

SettingCreateInput holds the creation input of the Setting entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*SettingCreateInput) Model

func (sci *SettingCreateInput) Model() *Setting

Model returns the Setting entity for creating, after validating.

func (*SettingCreateInput) SetGinContext

func (ic *SettingCreateInput) SetGinContext(ctx *gin.Context)

func (*SettingCreateInput) SetModelClient

func (ic *SettingCreateInput) SetModelClient(cli *Client)

func (*SettingCreateInput) Validate

func (sci *SettingCreateInput) Validate() error

Validate checks the SettingCreateInput entity.

func (*SettingCreateInput) ValidateWith

func (sci *SettingCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingCreateInput entity with the given context and client set.

type SettingCreateInputs

type SettingCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*SettingCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

SettingCreateInputs holds the creation input of the Setting entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*SettingCreateInputs) Model

func (sci *SettingCreateInputs) Model() []*Setting

Model returns the Setting entities for creating, after validating.

func (*SettingCreateInputs) SetGinContext

func (ic *SettingCreateInputs) SetGinContext(ctx *gin.Context)

func (*SettingCreateInputs) SetModelClient

func (ic *SettingCreateInputs) SetModelClient(cli *Client)

func (*SettingCreateInputs) Validate

func (sci *SettingCreateInputs) Validate() error

Validate checks the SettingCreateInputs entity .

func (*SettingCreateInputs) ValidateWith

func (sci *SettingCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingCreateInputs entity with the given context and client set.

type SettingCreateInputsItem

type SettingCreateInputsItem struct {
	// The value of system setting, store in string.
	Value crypto.String `path:"-" query:"-" json:"value,cli-table-column"`
}

SettingCreateInputs holds the creation input item of the Setting entities.

func (*SettingCreateInputsItem) ValidateWith

func (sci *SettingCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingCreateInputsItem entity with the given context and client set.

type SettingDelete

type SettingDelete struct {
	// contains filtered or unexported fields
}

SettingDelete is the builder for deleting a Setting entity.

func (*SettingDelete) Exec

func (sd *SettingDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SettingDelete) ExecContext

func (c *SettingDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SettingDelete) ExecX

func (sd *SettingDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SettingDelete) QueryContext

func (c *SettingDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SettingDelete) Where

func (sd *SettingDelete) Where(ps ...predicate.Setting) *SettingDelete

Where appends a list predicates to the SettingDelete builder.

type SettingDeleteInput

type SettingDeleteInput struct {
	SettingQueryInput `path:",inline"`
}

SettingDeleteInput holds the deletion input of the Setting entity, please tags with `path:",inline"` if embedding.

func (*SettingDeleteInput) SetGinContext

func (ic *SettingDeleteInput) SetGinContext(ctx *gin.Context)

func (*SettingDeleteInput) SetModelClient

func (ic *SettingDeleteInput) SetModelClient(cli *Client)

type SettingDeleteInputs

type SettingDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*SettingDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

SettingDeleteInputs holds the deletion input of the Setting entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*SettingDeleteInputs) IDs

func (sdi *SettingDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Setting entities for deleting, after validating.

func (*SettingDeleteInputs) Model

func (sdi *SettingDeleteInputs) Model() []*Setting

Model returns the Setting entities for deleting, after validating.

func (*SettingDeleteInputs) SetGinContext

func (ic *SettingDeleteInputs) SetGinContext(ctx *gin.Context)

func (*SettingDeleteInputs) SetModelClient

func (ic *SettingDeleteInputs) SetModelClient(cli *Client)

func (*SettingDeleteInputs) Validate

func (sdi *SettingDeleteInputs) Validate() error

Validate checks the SettingDeleteInputs entity.

func (*SettingDeleteInputs) ValidateWith

func (sdi *SettingDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingDeleteInputs entity with the given context and client set.

type SettingDeleteInputsItem

type SettingDeleteInputsItem struct {
	// ID of the Setting entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Setting entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

SettingDeleteInputs holds the deletion input item of the Setting entities.

type SettingDeleteOne

type SettingDeleteOne struct {
	// contains filtered or unexported fields
}

SettingDeleteOne is the builder for deleting a single Setting entity.

func (*SettingDeleteOne) Exec

func (sdo *SettingDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SettingDeleteOne) ExecX

func (sdo *SettingDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SettingDeleteOne) Where

Where appends a list predicates to the SettingDelete builder.

type SettingGroupBy

type SettingGroupBy struct {
	// contains filtered or unexported fields
}

SettingGroupBy is the group-by builder for Setting entities.

func (*SettingGroupBy) Aggregate

func (sgb *SettingGroupBy) Aggregate(fns ...AggregateFunc) *SettingGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SettingGroupBy) Bool

func (s *SettingGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SettingGroupBy) BoolX

func (s *SettingGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SettingGroupBy) Bools

func (s *SettingGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SettingGroupBy) BoolsX

func (s *SettingGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SettingGroupBy) Float64

func (s *SettingGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SettingGroupBy) Float64X

func (s *SettingGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SettingGroupBy) Float64s

func (s *SettingGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SettingGroupBy) Float64sX

func (s *SettingGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SettingGroupBy) Int

func (s *SettingGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SettingGroupBy) IntX

func (s *SettingGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SettingGroupBy) Ints

func (s *SettingGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SettingGroupBy) IntsX

func (s *SettingGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SettingGroupBy) Scan

func (sgb *SettingGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SettingGroupBy) ScanX

func (s *SettingGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SettingGroupBy) String

func (s *SettingGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SettingGroupBy) StringX

func (s *SettingGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SettingGroupBy) Strings

func (s *SettingGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SettingGroupBy) StringsX

func (s *SettingGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SettingMutation

type SettingMutation struct {
	// contains filtered or unexported fields
}

SettingMutation represents an operation that mutates the Setting nodes in the graph.

func (*SettingMutation) AddField

func (m *SettingMutation) 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 (*SettingMutation) AddedEdges

func (m *SettingMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SettingMutation) AddedField

func (m *SettingMutation) 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 (*SettingMutation) AddedFields

func (m *SettingMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SettingMutation) AddedIDs

func (m *SettingMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SettingMutation) ClearEdge

func (m *SettingMutation) 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 (*SettingMutation) ClearEditable

func (m *SettingMutation) ClearEditable()

ClearEditable clears the value of the "editable" field.

func (*SettingMutation) ClearField

func (m *SettingMutation) 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 (*SettingMutation) ClearHidden

func (m *SettingMutation) ClearHidden()

ClearHidden clears the value of the "hidden" field.

func (*SettingMutation) ClearPrivate

func (m *SettingMutation) ClearPrivate()

ClearPrivate clears the value of the "private" field.

func (*SettingMutation) ClearSensitive

func (m *SettingMutation) ClearSensitive()

ClearSensitive clears the value of the "sensitive" field.

func (*SettingMutation) ClearedEdges

func (m *SettingMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SettingMutation) ClearedFields

func (m *SettingMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SettingMutation) Client

func (m SettingMutation) 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 (*SettingMutation) CreateTime

func (m *SettingMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*SettingMutation) EdgeCleared

func (m *SettingMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SettingMutation) Editable

func (m *SettingMutation) Editable() (r bool, exists bool)

Editable returns the value of the "editable" field in the mutation.

func (*SettingMutation) EditableCleared

func (m *SettingMutation) EditableCleared() bool

EditableCleared returns if the "editable" field was cleared in this mutation.

func (*SettingMutation) ExecContext

func (c *SettingMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SettingMutation) Field

func (m *SettingMutation) 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 (*SettingMutation) FieldCleared

func (m *SettingMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SettingMutation) Fields

func (m *SettingMutation) 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 (*SettingMutation) Hidden

func (m *SettingMutation) Hidden() (r bool, exists bool)

Hidden returns the value of the "hidden" field in the mutation.

func (*SettingMutation) HiddenCleared

func (m *SettingMutation) HiddenCleared() bool

HiddenCleared returns if the "hidden" field was cleared in this mutation.

func (*SettingMutation) ID

func (m *SettingMutation) ID() (id object.ID, 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 (*SettingMutation) IDs

func (m *SettingMutation) IDs(ctx context.Context) ([]object.ID, 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 (*SettingMutation) Name

func (m *SettingMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SettingMutation) OldCreateTime

func (m *SettingMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldEditable

func (m *SettingMutation) OldEditable(ctx context.Context) (v *bool, err error)

OldEditable returns the old "editable" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldField

func (m *SettingMutation) 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 (*SettingMutation) OldHidden

func (m *SettingMutation) OldHidden(ctx context.Context) (v *bool, err error)

OldHidden returns the old "hidden" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldName

func (m *SettingMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldPrivate

func (m *SettingMutation) OldPrivate(ctx context.Context) (v *bool, err error)

OldPrivate returns the old "private" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldSensitive

func (m *SettingMutation) OldSensitive(ctx context.Context) (v *bool, err error)

OldSensitive returns the old "sensitive" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldUpdateTime

func (m *SettingMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Setting entity. If the Setting 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 (*SettingMutation) OldValue

func (m *SettingMutation) OldValue(ctx context.Context) (v crypto.String, err error)

OldValue returns the old "value" field's value of the Setting entity. If the Setting 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 (*SettingMutation) Op

func (m *SettingMutation) Op() Op

Op returns the operation name.

func (*SettingMutation) Private

func (m *SettingMutation) Private() (r bool, exists bool)

Private returns the value of the "private" field in the mutation.

func (*SettingMutation) PrivateCleared

func (m *SettingMutation) PrivateCleared() bool

PrivateCleared returns if the "private" field was cleared in this mutation.

func (*SettingMutation) QueryContext

func (c *SettingMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SettingMutation) RemovedEdges

func (m *SettingMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SettingMutation) RemovedIDs

func (m *SettingMutation) 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 (*SettingMutation) ResetCreateTime

func (m *SettingMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*SettingMutation) ResetEdge

func (m *SettingMutation) 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 (*SettingMutation) ResetEditable

func (m *SettingMutation) ResetEditable()

ResetEditable resets all changes to the "editable" field.

func (*SettingMutation) ResetField

func (m *SettingMutation) 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 (*SettingMutation) ResetHidden

func (m *SettingMutation) ResetHidden()

ResetHidden resets all changes to the "hidden" field.

func (*SettingMutation) ResetName

func (m *SettingMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SettingMutation) ResetPrivate

func (m *SettingMutation) ResetPrivate()

ResetPrivate resets all changes to the "private" field.

func (*SettingMutation) ResetSensitive

func (m *SettingMutation) ResetSensitive()

ResetSensitive resets all changes to the "sensitive" field.

func (*SettingMutation) ResetUpdateTime

func (m *SettingMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*SettingMutation) ResetValue

func (m *SettingMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*SettingMutation) Sensitive

func (m *SettingMutation) Sensitive() (r bool, exists bool)

Sensitive returns the value of the "sensitive" field in the mutation.

func (*SettingMutation) SensitiveCleared

func (m *SettingMutation) SensitiveCleared() bool

SensitiveCleared returns if the "sensitive" field was cleared in this mutation.

func (*SettingMutation) SetCreateTime

func (m *SettingMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*SettingMutation) SetEditable

func (m *SettingMutation) SetEditable(b bool)

SetEditable sets the "editable" field.

func (*SettingMutation) SetField

func (m *SettingMutation) 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 (*SettingMutation) SetHidden

func (m *SettingMutation) SetHidden(b bool)

SetHidden sets the "hidden" field.

func (*SettingMutation) SetID

func (m *SettingMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Setting entities.

func (*SettingMutation) SetName

func (m *SettingMutation) SetName(s string)

SetName sets the "name" field.

func (*SettingMutation) SetOp

func (m *SettingMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SettingMutation) SetPrivate

func (m *SettingMutation) SetPrivate(b bool)

SetPrivate sets the "private" field.

func (*SettingMutation) SetSensitive

func (m *SettingMutation) SetSensitive(b bool)

SetSensitive sets the "sensitive" field.

func (*SettingMutation) SetUpdateTime

func (m *SettingMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*SettingMutation) SetValue

func (m *SettingMutation) SetValue(c crypto.String)

SetValue sets the "value" field.

func (SettingMutation) Tx

func (m SettingMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SettingMutation) Type

func (m *SettingMutation) Type() string

Type returns the node type of this mutation (Setting).

func (*SettingMutation) UpdateTime

func (m *SettingMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*SettingMutation) Value

func (m *SettingMutation) Value() (r crypto.String, exists bool)

Value returns the value of the "value" field in the mutation.

func (*SettingMutation) Where

func (m *SettingMutation) Where(ps ...predicate.Setting)

Where appends a list predicates to the SettingMutation builder.

func (*SettingMutation) WhereP

func (m *SettingMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SettingMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SettingOutput

type SettingOutput struct {
	ID         object.ID     `json:"id,omitempty"`
	CreateTime *time.Time    `json:"createTime,omitempty"`
	UpdateTime *time.Time    `json:"updateTime,omitempty"`
	Name       string        `json:"name,omitempty"`
	Value      crypto.String `json:"value,cli-table-column,omitempty"`
	Hidden     *bool         `json:"hidden,omitempty"`
	Editable   *bool         `json:"editable,omitempty"`
	Sensitive  *bool         `json:"sensitive,omitempty"`
	Configured bool          `json:"configured,omitempty"`
}

SettingOutput holds the output of the Setting entity.

func ExposeSetting

func ExposeSetting(_s *Setting) *SettingOutput

ExposeSetting converts the Setting to SettingOutput.

func ExposeSettings

func ExposeSettings(_ss []*Setting) []*SettingOutput

ExposeSettings converts the Setting slice to SettingOutput pointer slice.

type SettingPatchInput added in v0.5.0

type SettingPatchInput struct {
	SettingQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// The name of system setting.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// The value of system setting, store in string.
	Value crypto.String `path:"-" query:"-" json:"value,omitempty"`
	// Indicate the system setting should be hidden or not, default is visible.
	Hidden *bool `path:"-" query:"-" json:"hidden,omitempty"`
	// Indicate the system setting should be edited or not, default is readonly.
	Editable *bool `path:"-" query:"-" json:"editable,omitempty"`
	// Indicate the system setting should be sanitized or not before exposing, default is not.
	Sensitive *bool `path:"-" query:"-" json:"sensitive,omitempty"`
	// Indicate the system setting should be exposed or not, default is exposed.
	Private *bool `path:"-" query:"-" json:"private,omitempty"`
	// Configured indicates the setting whether to be configured.
	Configured bool `path:"-" query:"-" json:"configured,omitempty"`
	// contains filtered or unexported fields
}

SettingPatchInput holds the patch input of the Setting entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*SettingPatchInput) Model added in v0.5.0

func (spi *SettingPatchInput) Model() *Setting

Model returns the Setting patched entity, after validating.

func (*SettingPatchInput) PatchModel added in v0.5.0

func (spi *SettingPatchInput) PatchModel() *Setting

PatchModel returns the Setting partition entity for patching.

func (*SettingPatchInput) SetGinContext added in v0.5.0

func (ic *SettingPatchInput) SetGinContext(ctx *gin.Context)

func (*SettingPatchInput) SetModelClient added in v0.5.0

func (ic *SettingPatchInput) SetModelClient(cli *Client)

func (*SettingPatchInput) Validate added in v0.5.0

func (spi *SettingPatchInput) Validate() error

Validate checks the SettingPatchInput entity.

func (*SettingPatchInput) ValidateWith added in v0.5.0

func (spi *SettingPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingPatchInput entity with the given context and client set.

type SettingQuery

type SettingQuery struct {
	// contains filtered or unexported fields
}

SettingQuery is the builder for querying Setting entities.

func (*SettingQuery) Aggregate

func (sq *SettingQuery) Aggregate(fns ...AggregateFunc) *SettingSelect

Aggregate returns a SettingSelect configured with the given aggregations.

func (*SettingQuery) All

func (sq *SettingQuery) All(ctx context.Context) ([]*Setting, error)

All executes the query and returns a list of Settings.

func (*SettingQuery) AllX

func (sq *SettingQuery) AllX(ctx context.Context) []*Setting

AllX is like All, but panics if an error occurs.

func (*SettingQuery) Clone

func (sq *SettingQuery) Clone() *SettingQuery

Clone returns a duplicate of the SettingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SettingQuery) Count

func (sq *SettingQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SettingQuery) CountX

func (sq *SettingQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SettingQuery) ExecContext

func (c *SettingQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SettingQuery) Exist

func (sq *SettingQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SettingQuery) ExistX

func (sq *SettingQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SettingQuery) First

func (sq *SettingQuery) First(ctx context.Context) (*Setting, error)

First returns the first Setting entity from the query. Returns a *NotFoundError when no Setting was found.

func (*SettingQuery) FirstID

func (sq *SettingQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Setting ID from the query. Returns a *NotFoundError when no Setting ID was found.

func (*SettingQuery) FirstIDX

func (sq *SettingQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SettingQuery) FirstX

func (sq *SettingQuery) FirstX(ctx context.Context) *Setting

FirstX is like First, but panics if an error occurs.

func (*SettingQuery) ForShare

func (sq *SettingQuery) ForShare(opts ...sql.LockOption) *SettingQuery

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 (*SettingQuery) ForUpdate

func (sq *SettingQuery) ForUpdate(opts ...sql.LockOption) *SettingQuery

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 (*SettingQuery) GroupBy

func (sq *SettingQuery) GroupBy(field string, fields ...string) *SettingGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Setting.Query().
	GroupBy(setting.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*SettingQuery) IDs

func (sq *SettingQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Setting IDs.

func (*SettingQuery) IDsX

func (sq *SettingQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*SettingQuery) Limit

func (sq *SettingQuery) Limit(limit int) *SettingQuery

Limit the number of records to be returned by this query.

func (*SettingQuery) Modify

func (sq *SettingQuery) Modify(modifiers ...func(s *sql.Selector)) *SettingSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*SettingQuery) Offset

func (sq *SettingQuery) Offset(offset int) *SettingQuery

Offset to start from.

func (*SettingQuery) Only

func (sq *SettingQuery) Only(ctx context.Context) (*Setting, error)

Only returns a single Setting entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Setting entity is found. Returns a *NotFoundError when no Setting entities are found.

func (*SettingQuery) OnlyID

func (sq *SettingQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only Setting ID in the query. Returns a *NotSingularError when more than one Setting ID is found. Returns a *NotFoundError when no entities are found.

func (*SettingQuery) OnlyIDX

func (sq *SettingQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SettingQuery) OnlyX

func (sq *SettingQuery) OnlyX(ctx context.Context) *Setting

OnlyX is like Only, but panics if an error occurs.

func (*SettingQuery) Order

func (sq *SettingQuery) Order(o ...setting.OrderOption) *SettingQuery

Order specifies how the records should be ordered.

func (*SettingQuery) QueryContext

func (c *SettingQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SettingQuery) Select

func (sq *SettingQuery) Select(fields ...string) *SettingSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Setting.Query().
	Select(setting.FieldCreateTime).
	Scan(ctx, &v)

func (*SettingQuery) Unique

func (sq *SettingQuery) Unique(unique bool) *SettingQuery

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 (*SettingQuery) Where

func (sq *SettingQuery) Where(ps ...predicate.Setting) *SettingQuery

Where adds a new predicate for the SettingQuery builder.

func (*SettingQuery) WhereP

func (sq *SettingQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SettingQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SettingQueryInput

type SettingQueryInput struct {

	// Refer holds the route path reference of the Setting entity.
	Refer *object.Refer `path:"setting,default=" query:"-" json:"-"`
	// ID of the Setting entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Setting entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

SettingQueryInput holds the query input of the Setting entity, please tags with `path:",inline"` if embedding.

func (*SettingQueryInput) Model

func (sqi *SettingQueryInput) Model() *Setting

Model returns the Setting entity for querying, after validating.

func (*SettingQueryInput) SetGinContext

func (ic *SettingQueryInput) SetGinContext(ctx *gin.Context)

func (*SettingQueryInput) SetModelClient

func (ic *SettingQueryInput) SetModelClient(cli *Client)

func (*SettingQueryInput) Validate

func (sqi *SettingQueryInput) Validate() error

Validate checks the SettingQueryInput entity.

func (*SettingQueryInput) ValidateWith

func (sqi *SettingQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingQueryInput entity with the given context and client set.

type SettingQueryInputs

type SettingQueryInputs struct {
	// contains filtered or unexported fields
}

SettingQueryInputs holds the query input of the Setting entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*SettingQueryInputs) SetGinContext

func (ic *SettingQueryInputs) SetGinContext(ctx *gin.Context)

func (*SettingQueryInputs) SetModelClient

func (ic *SettingQueryInputs) SetModelClient(cli *Client)

func (*SettingQueryInputs) Validate

func (sqi *SettingQueryInputs) Validate() error

Validate checks the SettingQueryInputs entity.

func (*SettingQueryInputs) ValidateWith

func (sqi *SettingQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingQueryInputs entity with the given context and client set.

type SettingSelect

type SettingSelect struct {
	*SettingQuery
	// contains filtered or unexported fields
}

SettingSelect is the builder for selecting fields of Setting entities.

func (*SettingSelect) Aggregate

func (ss *SettingSelect) Aggregate(fns ...AggregateFunc) *SettingSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SettingSelect) Bool

func (s *SettingSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SettingSelect) BoolX

func (s *SettingSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SettingSelect) Bools

func (s *SettingSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SettingSelect) BoolsX

func (s *SettingSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (SettingSelect) ExecContext

func (c SettingSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SettingSelect) Float64

func (s *SettingSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SettingSelect) Float64X

func (s *SettingSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SettingSelect) Float64s

func (s *SettingSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SettingSelect) Float64sX

func (s *SettingSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SettingSelect) Int

func (s *SettingSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SettingSelect) IntX

func (s *SettingSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SettingSelect) Ints

func (s *SettingSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SettingSelect) IntsX

func (s *SettingSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SettingSelect) Modify

func (ss *SettingSelect) Modify(modifiers ...func(s *sql.Selector)) *SettingSelect

Modify adds a query modifier for attaching custom logic to queries.

func (SettingSelect) QueryContext

func (c SettingSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SettingSelect) Scan

func (ss *SettingSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SettingSelect) ScanX

func (s *SettingSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SettingSelect) String

func (s *SettingSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SettingSelect) StringX

func (s *SettingSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SettingSelect) Strings

func (s *SettingSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SettingSelect) StringsX

func (s *SettingSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SettingUpdate

type SettingUpdate struct {
	// contains filtered or unexported fields
}

SettingUpdate is the builder for updating Setting entities.

func (*SettingUpdate) ClearEditable

func (su *SettingUpdate) ClearEditable() *SettingUpdate

ClearEditable clears the value of the "editable" field.

func (*SettingUpdate) ClearHidden

func (su *SettingUpdate) ClearHidden() *SettingUpdate

ClearHidden clears the value of the "hidden" field.

func (*SettingUpdate) ClearPrivate

func (su *SettingUpdate) ClearPrivate() *SettingUpdate

ClearPrivate clears the value of the "private" field.

func (*SettingUpdate) ClearSensitive

func (su *SettingUpdate) ClearSensitive() *SettingUpdate

ClearSensitive clears the value of the "sensitive" field.

func (*SettingUpdate) Exec

func (su *SettingUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SettingUpdate) ExecContext

func (c *SettingUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SettingUpdate) ExecX

func (su *SettingUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SettingUpdate) Modify

func (su *SettingUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SettingUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SettingUpdate) Mutation

func (su *SettingUpdate) Mutation() *SettingMutation

Mutation returns the SettingMutation object of the builder.

func (*SettingUpdate) QueryContext

func (c *SettingUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SettingUpdate) Save

func (su *SettingUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SettingUpdate) SaveX

func (su *SettingUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SettingUpdate) Set

func (su *SettingUpdate) Set(obj *Setting) *SettingUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*SettingUpdate) SetEditable

func (su *SettingUpdate) SetEditable(b bool) *SettingUpdate

SetEditable sets the "editable" field.

func (*SettingUpdate) SetHidden

func (su *SettingUpdate) SetHidden(b bool) *SettingUpdate

SetHidden sets the "hidden" field.

func (*SettingUpdate) SetNillableEditable

func (su *SettingUpdate) SetNillableEditable(b *bool) *SettingUpdate

SetNillableEditable sets the "editable" field if the given value is not nil.

func (*SettingUpdate) SetNillableHidden

func (su *SettingUpdate) SetNillableHidden(b *bool) *SettingUpdate

SetNillableHidden sets the "hidden" field if the given value is not nil.

func (*SettingUpdate) SetNillablePrivate

func (su *SettingUpdate) SetNillablePrivate(b *bool) *SettingUpdate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*SettingUpdate) SetNillableSensitive

func (su *SettingUpdate) SetNillableSensitive(b *bool) *SettingUpdate

SetNillableSensitive sets the "sensitive" field if the given value is not nil.

func (*SettingUpdate) SetNillableValue added in v0.5.0

func (su *SettingUpdate) SetNillableValue(c *crypto.String) *SettingUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*SettingUpdate) SetPrivate

func (su *SettingUpdate) SetPrivate(b bool) *SettingUpdate

SetPrivate sets the "private" field.

func (*SettingUpdate) SetSensitive

func (su *SettingUpdate) SetSensitive(b bool) *SettingUpdate

SetSensitive sets the "sensitive" field.

func (*SettingUpdate) SetUpdateTime

func (su *SettingUpdate) SetUpdateTime(t time.Time) *SettingUpdate

SetUpdateTime sets the "update_time" field.

func (*SettingUpdate) SetValue

func (su *SettingUpdate) SetValue(c crypto.String) *SettingUpdate

SetValue sets the "value" field.

func (*SettingUpdate) Where

func (su *SettingUpdate) Where(ps ...predicate.Setting) *SettingUpdate

Where appends a list predicates to the SettingUpdate builder.

type SettingUpdateInput

type SettingUpdateInput struct {
	SettingQueryInput `path:",inline" query:"-" json:"-"`

	// The value of system setting, store in string.
	Value crypto.String `path:"-" query:"-" json:"value,omitempty"`
}

SettingUpdateInput holds the modification input of the Setting entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*SettingUpdateInput) Model

func (sui *SettingUpdateInput) Model() *Setting

Model returns the Setting entity for modifying, after validating.

func (*SettingUpdateInput) SetGinContext

func (ic *SettingUpdateInput) SetGinContext(ctx *gin.Context)

func (*SettingUpdateInput) SetModelClient

func (ic *SettingUpdateInput) SetModelClient(cli *Client)

func (*SettingUpdateInput) Validate

func (sui *SettingUpdateInput) Validate() error

Validate checks the SettingUpdateInput entity.

func (*SettingUpdateInput) ValidateWith

func (sui *SettingUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingUpdateInput entity with the given context and client set.

type SettingUpdateInputs

type SettingUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*SettingUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

SettingUpdateInputs holds the modification input of the Setting entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*SettingUpdateInputs) IDs

func (sui *SettingUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Setting entities for modifying, after validating.

func (*SettingUpdateInputs) Model

func (sui *SettingUpdateInputs) Model() []*Setting

Model returns the Setting entities for modifying, after validating.

func (*SettingUpdateInputs) SetGinContext

func (ic *SettingUpdateInputs) SetGinContext(ctx *gin.Context)

func (*SettingUpdateInputs) SetModelClient

func (ic *SettingUpdateInputs) SetModelClient(cli *Client)

func (*SettingUpdateInputs) Validate

func (sui *SettingUpdateInputs) Validate() error

Validate checks the SettingUpdateInputs entity.

func (*SettingUpdateInputs) ValidateWith

func (sui *SettingUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingUpdateInputs entity with the given context and client set.

type SettingUpdateInputsItem

type SettingUpdateInputsItem struct {
	// ID of the Setting entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Setting entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// The value of system setting, store in string.
	Value crypto.String `path:"-" query:"-" json:"value,cli-table-column"`
}

SettingUpdateInputs holds the modification input item of the Setting entities.

func (*SettingUpdateInputsItem) ValidateWith

func (sui *SettingUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SettingUpdateInputsItem entity with the given context and client set.

type SettingUpdateOne

type SettingUpdateOne struct {
	// contains filtered or unexported fields
}

SettingUpdateOne is the builder for updating a single Setting entity.

func (*SettingUpdateOne) ClearEditable

func (suo *SettingUpdateOne) ClearEditable() *SettingUpdateOne

ClearEditable clears the value of the "editable" field.

func (*SettingUpdateOne) ClearHidden

func (suo *SettingUpdateOne) ClearHidden() *SettingUpdateOne

ClearHidden clears the value of the "hidden" field.

func (*SettingUpdateOne) ClearPrivate

func (suo *SettingUpdateOne) ClearPrivate() *SettingUpdateOne

ClearPrivate clears the value of the "private" field.

func (*SettingUpdateOne) ClearSensitive

func (suo *SettingUpdateOne) ClearSensitive() *SettingUpdateOne

ClearSensitive clears the value of the "sensitive" field.

func (*SettingUpdateOne) Exec

func (suo *SettingUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SettingUpdateOne) ExecContext

func (c *SettingUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SettingUpdateOne) ExecE

func (suo *SettingUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Setting) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*SettingUpdateOne) ExecEX

func (suo *SettingUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Setting) error)

ExecX is like Exec, but panics if an error occurs.

func (*SettingUpdateOne) ExecX

func (suo *SettingUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SettingUpdateOne) Modify

func (suo *SettingUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SettingUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SettingUpdateOne) Mutation

func (suo *SettingUpdateOne) Mutation() *SettingMutation

Mutation returns the SettingMutation object of the builder.

func (*SettingUpdateOne) QueryContext

func (c *SettingUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SettingUpdateOne) Save

func (suo *SettingUpdateOne) Save(ctx context.Context) (*Setting, error)

Save executes the query and returns the updated Setting entity.

func (*SettingUpdateOne) SaveE

func (suo *SettingUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Setting) error) (*Setting, error)

SaveE calls the given function after updated the Setting entity, which is always good for cascading update operations.

func (*SettingUpdateOne) SaveEX

func (suo *SettingUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Setting) error) *Setting

SaveEX is like SaveE, but panics if an error occurs.

func (*SettingUpdateOne) SaveX

func (suo *SettingUpdateOne) SaveX(ctx context.Context) *Setting

SaveX is like Save, but panics if an error occurs.

func (*SettingUpdateOne) Select

func (suo *SettingUpdateOne) Select(field string, fields ...string) *SettingUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SettingUpdateOne) Set

func (suo *SettingUpdateOne) Set(obj *Setting) *SettingUpdateOne

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*SettingUpdateOne) SetEditable

func (suo *SettingUpdateOne) SetEditable(b bool) *SettingUpdateOne

SetEditable sets the "editable" field.

func (*SettingUpdateOne) SetHidden

func (suo *SettingUpdateOne) SetHidden(b bool) *SettingUpdateOne

SetHidden sets the "hidden" field.

func (*SettingUpdateOne) SetNillableEditable

func (suo *SettingUpdateOne) SetNillableEditable(b *bool) *SettingUpdateOne

SetNillableEditable sets the "editable" field if the given value is not nil.

func (*SettingUpdateOne) SetNillableHidden

func (suo *SettingUpdateOne) SetNillableHidden(b *bool) *SettingUpdateOne

SetNillableHidden sets the "hidden" field if the given value is not nil.

func (*SettingUpdateOne) SetNillablePrivate

func (suo *SettingUpdateOne) SetNillablePrivate(b *bool) *SettingUpdateOne

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*SettingUpdateOne) SetNillableSensitive

func (suo *SettingUpdateOne) SetNillableSensitive(b *bool) *SettingUpdateOne

SetNillableSensitive sets the "sensitive" field if the given value is not nil.

func (*SettingUpdateOne) SetNillableValue added in v0.5.0

func (suo *SettingUpdateOne) SetNillableValue(c *crypto.String) *SettingUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*SettingUpdateOne) SetPrivate

func (suo *SettingUpdateOne) SetPrivate(b bool) *SettingUpdateOne

SetPrivate sets the "private" field.

func (*SettingUpdateOne) SetSensitive

func (suo *SettingUpdateOne) SetSensitive(b bool) *SettingUpdateOne

SetSensitive sets the "sensitive" field.

func (*SettingUpdateOne) SetUpdateTime

func (suo *SettingUpdateOne) SetUpdateTime(t time.Time) *SettingUpdateOne

SetUpdateTime sets the "update_time" field.

func (*SettingUpdateOne) SetValue

func (suo *SettingUpdateOne) SetValue(c crypto.String) *SettingUpdateOne

SetValue sets the "value" field.

func (*SettingUpdateOne) Where

Where appends a list predicates to the SettingUpdate builder.

type SettingUpsert

type SettingUpsert struct {
	*sql.UpdateSet
}

SettingUpsert is the "OnConflict" setter.

func (*SettingUpsert) ClearEditable

func (u *SettingUpsert) ClearEditable() *SettingUpsert

ClearEditable clears the value of the "editable" field.

func (*SettingUpsert) ClearHidden

func (u *SettingUpsert) ClearHidden() *SettingUpsert

ClearHidden clears the value of the "hidden" field.

func (*SettingUpsert) ClearPrivate

func (u *SettingUpsert) ClearPrivate() *SettingUpsert

ClearPrivate clears the value of the "private" field.

func (*SettingUpsert) ClearSensitive

func (u *SettingUpsert) ClearSensitive() *SettingUpsert

ClearSensitive clears the value of the "sensitive" field.

func (*SettingUpsert) SetEditable

func (u *SettingUpsert) SetEditable(v bool) *SettingUpsert

SetEditable sets the "editable" field.

func (*SettingUpsert) SetHidden

func (u *SettingUpsert) SetHidden(v bool) *SettingUpsert

SetHidden sets the "hidden" field.

func (*SettingUpsert) SetPrivate

func (u *SettingUpsert) SetPrivate(v bool) *SettingUpsert

SetPrivate sets the "private" field.

func (*SettingUpsert) SetSensitive

func (u *SettingUpsert) SetSensitive(v bool) *SettingUpsert

SetSensitive sets the "sensitive" field.

func (*SettingUpsert) SetUpdateTime

func (u *SettingUpsert) SetUpdateTime(v time.Time) *SettingUpsert

SetUpdateTime sets the "update_time" field.

func (*SettingUpsert) SetValue

func (u *SettingUpsert) SetValue(v crypto.String) *SettingUpsert

SetValue sets the "value" field.

func (*SettingUpsert) UpdateEditable

func (u *SettingUpsert) UpdateEditable() *SettingUpsert

UpdateEditable sets the "editable" field to the value that was provided on create.

func (*SettingUpsert) UpdateHidden

func (u *SettingUpsert) UpdateHidden() *SettingUpsert

UpdateHidden sets the "hidden" field to the value that was provided on create.

func (*SettingUpsert) UpdatePrivate

func (u *SettingUpsert) UpdatePrivate() *SettingUpsert

UpdatePrivate sets the "private" field to the value that was provided on create.

func (*SettingUpsert) UpdateSensitive

func (u *SettingUpsert) UpdateSensitive() *SettingUpsert

UpdateSensitive sets the "sensitive" field to the value that was provided on create.

func (*SettingUpsert) UpdateUpdateTime

func (u *SettingUpsert) UpdateUpdateTime() *SettingUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*SettingUpsert) UpdateValue

func (u *SettingUpsert) UpdateValue() *SettingUpsert

UpdateValue sets the "value" field to the value that was provided on create.

type SettingUpsertBulk

type SettingUpsertBulk struct {
	// contains filtered or unexported fields
}

SettingUpsertBulk is the builder for "upsert"-ing a bulk of Setting nodes.

func (*SettingUpsertBulk) ClearEditable

func (u *SettingUpsertBulk) ClearEditable() *SettingUpsertBulk

ClearEditable clears the value of the "editable" field.

func (*SettingUpsertBulk) ClearHidden

func (u *SettingUpsertBulk) ClearHidden() *SettingUpsertBulk

ClearHidden clears the value of the "hidden" field.

func (*SettingUpsertBulk) ClearPrivate

func (u *SettingUpsertBulk) ClearPrivate() *SettingUpsertBulk

ClearPrivate clears the value of the "private" field.

func (*SettingUpsertBulk) ClearSensitive

func (u *SettingUpsertBulk) ClearSensitive() *SettingUpsertBulk

ClearSensitive clears the value of the "sensitive" field.

func (*SettingUpsertBulk) DoNothing

func (u *SettingUpsertBulk) DoNothing() *SettingUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SettingUpsertBulk) Exec

func (u *SettingUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SettingUpsertBulk) ExecE

func (u *SettingUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Setting) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SettingUpsertBulk) ExecEX

func (u *SettingUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Setting) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SettingUpsertBulk) ExecX

func (u *SettingUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SettingUpsertBulk) Ignore

func (u *SettingUpsertBulk) Ignore() *SettingUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Setting.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SettingUpsertBulk) SetEditable

func (u *SettingUpsertBulk) SetEditable(v bool) *SettingUpsertBulk

SetEditable sets the "editable" field.

func (*SettingUpsertBulk) SetHidden

func (u *SettingUpsertBulk) SetHidden(v bool) *SettingUpsertBulk

SetHidden sets the "hidden" field.

func (*SettingUpsertBulk) SetPrivate

func (u *SettingUpsertBulk) SetPrivate(v bool) *SettingUpsertBulk

SetPrivate sets the "private" field.

func (*SettingUpsertBulk) SetSensitive

func (u *SettingUpsertBulk) SetSensitive(v bool) *SettingUpsertBulk

SetSensitive sets the "sensitive" field.

func (*SettingUpsertBulk) SetUpdateTime

func (u *SettingUpsertBulk) SetUpdateTime(v time.Time) *SettingUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*SettingUpsertBulk) SetValue

SetValue sets the "value" field.

func (*SettingUpsertBulk) Update

func (u *SettingUpsertBulk) Update(set func(*SettingUpsert)) *SettingUpsertBulk

Update allows overriding fields `UPDATE` values. See the SettingCreateBulk.OnConflict documentation for more info.

func (*SettingUpsertBulk) UpdateEditable

func (u *SettingUpsertBulk) UpdateEditable() *SettingUpsertBulk

UpdateEditable sets the "editable" field to the value that was provided on create.

func (*SettingUpsertBulk) UpdateHidden

func (u *SettingUpsertBulk) UpdateHidden() *SettingUpsertBulk

UpdateHidden sets the "hidden" field to the value that was provided on create.

func (*SettingUpsertBulk) UpdateNewValues

func (u *SettingUpsertBulk) UpdateNewValues() *SettingUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Setting.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(setting.FieldID)
		}),
	).
	Exec(ctx)

func (*SettingUpsertBulk) UpdatePrivate

func (u *SettingUpsertBulk) UpdatePrivate() *SettingUpsertBulk

UpdatePrivate sets the "private" field to the value that was provided on create.

func (*SettingUpsertBulk) UpdateSensitive

func (u *SettingUpsertBulk) UpdateSensitive() *SettingUpsertBulk

UpdateSensitive sets the "sensitive" field to the value that was provided on create.

func (*SettingUpsertBulk) UpdateUpdateTime

func (u *SettingUpsertBulk) UpdateUpdateTime() *SettingUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*SettingUpsertBulk) UpdateValue

func (u *SettingUpsertBulk) UpdateValue() *SettingUpsertBulk

UpdateValue sets the "value" field to the value that was provided on create.

type SettingUpsertOne

type SettingUpsertOne struct {
	// contains filtered or unexported fields
}

SettingUpsertOne is the builder for "upsert"-ing

one Setting node.

func (*SettingUpsertOne) ClearEditable

func (u *SettingUpsertOne) ClearEditable() *SettingUpsertOne

ClearEditable clears the value of the "editable" field.

func (*SettingUpsertOne) ClearHidden

func (u *SettingUpsertOne) ClearHidden() *SettingUpsertOne

ClearHidden clears the value of the "hidden" field.

func (*SettingUpsertOne) ClearPrivate

func (u *SettingUpsertOne) ClearPrivate() *SettingUpsertOne

ClearPrivate clears the value of the "private" field.

func (*SettingUpsertOne) ClearSensitive

func (u *SettingUpsertOne) ClearSensitive() *SettingUpsertOne

ClearSensitive clears the value of the "sensitive" field.

func (*SettingUpsertOne) DoNothing

func (u *SettingUpsertOne) DoNothing() *SettingUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SettingUpsertOne) Exec

func (u *SettingUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SettingUpsertOne) ExecE

func (u *SettingUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Setting) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SettingUpsertOne) ExecEX

func (u *SettingUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Setting) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SettingUpsertOne) ExecX

func (u *SettingUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SettingUpsertOne) ID

func (u *SettingUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SettingUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SettingUpsertOne) Ignore

func (u *SettingUpsertOne) Ignore() *SettingUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Setting.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SettingUpsertOne) SetEditable

func (u *SettingUpsertOne) SetEditable(v bool) *SettingUpsertOne

SetEditable sets the "editable" field.

func (*SettingUpsertOne) SetHidden

func (u *SettingUpsertOne) SetHidden(v bool) *SettingUpsertOne

SetHidden sets the "hidden" field.

func (*SettingUpsertOne) SetPrivate

func (u *SettingUpsertOne) SetPrivate(v bool) *SettingUpsertOne

SetPrivate sets the "private" field.

func (*SettingUpsertOne) SetSensitive

func (u *SettingUpsertOne) SetSensitive(v bool) *SettingUpsertOne

SetSensitive sets the "sensitive" field.

func (*SettingUpsertOne) SetUpdateTime

func (u *SettingUpsertOne) SetUpdateTime(v time.Time) *SettingUpsertOne

SetUpdateTime sets the "update_time" field.

func (*SettingUpsertOne) SetValue

SetValue sets the "value" field.

func (*SettingUpsertOne) Update

func (u *SettingUpsertOne) Update(set func(*SettingUpsert)) *SettingUpsertOne

Update allows overriding fields `UPDATE` values. See the SettingCreate.OnConflict documentation for more info.

func (*SettingUpsertOne) UpdateEditable

func (u *SettingUpsertOne) UpdateEditable() *SettingUpsertOne

UpdateEditable sets the "editable" field to the value that was provided on create.

func (*SettingUpsertOne) UpdateHidden

func (u *SettingUpsertOne) UpdateHidden() *SettingUpsertOne

UpdateHidden sets the "hidden" field to the value that was provided on create.

func (*SettingUpsertOne) UpdateNewValues

func (u *SettingUpsertOne) UpdateNewValues() *SettingUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Setting.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(setting.FieldID)
		}),
	).
	Exec(ctx)

func (*SettingUpsertOne) UpdatePrivate

func (u *SettingUpsertOne) UpdatePrivate() *SettingUpsertOne

UpdatePrivate sets the "private" field to the value that was provided on create.

func (*SettingUpsertOne) UpdateSensitive

func (u *SettingUpsertOne) UpdateSensitive() *SettingUpsertOne

UpdateSensitive sets the "sensitive" field to the value that was provided on create.

func (*SettingUpsertOne) UpdateUpdateTime

func (u *SettingUpsertOne) UpdateUpdateTime() *SettingUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*SettingUpsertOne) UpdateValue

func (u *SettingUpsertOne) UpdateValue() *SettingUpsertOne

UpdateValue sets the "value" field to the value that was provided on create.

type Settings

type Settings []*Setting

Settings is a parsable slice of Setting.

func (Settings) View

func (_ss Settings) View() []*SettingOutput

View returns the output of Setting entities.

type Subject

type Subject struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// The kind of the subject.
	Kind string `json:"kind,omitempty,cli-table-column"`
	// The domain of the subject.
	Domain string `json:"domain,omitempty"`
	// The name of the subject.
	Name string `json:"name,omitempty"`
	// The detail of the subject.
	Description string `json:"description,omitempty"`
	// Indicate whether the subject is builtin, decide when creating.
	Builtin bool `json:"builtin,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SubjectQuery when eager-loading is set.
	Edges SubjectEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

Subject is the model entity for the Subject schema.

func (*Subject) ExecContext

func (c *Subject) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Subject) QueryContext

func (c *Subject) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Subject) QueryRoles

func (s *Subject) QueryRoles() *SubjectRoleRelationshipQuery

QueryRoles queries the "roles" edge of the Subject entity.

func (*Subject) QueryTokens

func (s *Subject) QueryTokens() *TokenQuery

QueryTokens queries the "tokens" edge of the Subject entity.

func (*Subject) String

func (s *Subject) String() string

String implements the fmt.Stringer.

func (*Subject) Unwrap

func (s *Subject) Unwrap() *Subject

Unwrap unwraps the Subject 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 (*Subject) Update

func (s *Subject) Update() *SubjectUpdateOne

Update returns a builder for updating this Subject. Note that you need to call Subject.Unwrap() before calling this method if this Subject was returned from a transaction, and the transaction was committed or rolled back.

func (*Subject) Value

func (s *Subject) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Subject. This includes values selected through modifiers, order, etc.

func (*Subject) View

func (_s *Subject) View() *SubjectOutput

View returns the output of Subject entity.

type SubjectClient

type SubjectClient struct {
	// contains filtered or unexported fields
}

SubjectClient is a client for the Subject schema.

func NewSubjectClient

func NewSubjectClient(c config) *SubjectClient

NewSubjectClient returns a client for the Subject from the given config.

func (*SubjectClient) Create

func (c *SubjectClient) Create() *SubjectCreate

Create returns a builder for creating a Subject entity.

func (*SubjectClient) CreateBulk

func (c *SubjectClient) CreateBulk(builders ...*SubjectCreate) *SubjectCreateBulk

CreateBulk returns a builder for creating a bulk of Subject entities.

func (*SubjectClient) Delete

func (c *SubjectClient) Delete() *SubjectDelete

Delete returns a delete builder for Subject.

func (*SubjectClient) DeleteOne

func (c *SubjectClient) DeleteOne(s *Subject) *SubjectDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SubjectClient) DeleteOneID

func (c *SubjectClient) DeleteOneID(id object.ID) *SubjectDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SubjectClient) ExecContext

func (c *SubjectClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectClient) Get

func (c *SubjectClient) Get(ctx context.Context, id object.ID) (*Subject, error)

Get returns a Subject entity by its id.

func (*SubjectClient) GetX

func (c *SubjectClient) GetX(ctx context.Context, id object.ID) *Subject

GetX is like Get, but panics if an error occurs.

func (*SubjectClient) Hooks

func (c *SubjectClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SubjectClient) Intercept

func (c *SubjectClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `subject.Intercept(f(g(h())))`.

func (*SubjectClient) Interceptors

func (c *SubjectClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SubjectClient) MapCreateBulk added in v0.5.0

func (c *SubjectClient) MapCreateBulk(slice any, setFunc func(*SubjectCreate, int)) *SubjectCreateBulk

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 (*SubjectClient) Query

func (c *SubjectClient) Query() *SubjectQuery

Query returns a query builder for Subject.

func (*SubjectClient) QueryContext

func (c *SubjectClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectClient) QueryRoles

QueryRoles queries the roles edge of a Subject.

func (*SubjectClient) QueryTokens

func (c *SubjectClient) QueryTokens(s *Subject) *TokenQuery

QueryTokens queries the tokens edge of a Subject.

func (*SubjectClient) Update

func (c *SubjectClient) Update() *SubjectUpdate

Update returns an update builder for Subject.

func (*SubjectClient) UpdateOne

func (c *SubjectClient) UpdateOne(s *Subject) *SubjectUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SubjectClient) UpdateOneID

func (c *SubjectClient) UpdateOneID(id object.ID) *SubjectUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SubjectClient) Use

func (c *SubjectClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subject.Hooks(f(g(h())))`.

type SubjectClientGetter

type SubjectClientGetter interface {
	// Subjects returns the client for interacting with the Subject builders.
	Subjects() *SubjectClient
}

SubjectClientGetter is an interface that allows getting SubjectClient.

type SubjectCreate

type SubjectCreate struct {
	// contains filtered or unexported fields
}

SubjectCreate is the builder for creating a Subject entity.

func (*SubjectCreate) AddRoleIDs

func (sc *SubjectCreate) AddRoleIDs(ids ...object.ID) *SubjectCreate

AddRoleIDs adds the "roles" edge to the SubjectRoleRelationship entity by IDs.

func (*SubjectCreate) AddRoles

AddRoles adds the "roles" edges to the SubjectRoleRelationship entity.

func (*SubjectCreate) AddTokenIDs

func (sc *SubjectCreate) AddTokenIDs(ids ...object.ID) *SubjectCreate

AddTokenIDs adds the "tokens" edge to the Token entity by IDs.

func (*SubjectCreate) AddTokens

func (sc *SubjectCreate) AddTokens(t ...*Token) *SubjectCreate

AddTokens adds the "tokens" edges to the Token entity.

func (*SubjectCreate) Exec

func (sc *SubjectCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectCreate) ExecContext

func (c *SubjectCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectCreate) ExecE

func (sc *SubjectCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Subject) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SubjectCreate) ExecEX

func (sc *SubjectCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Subject) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SubjectCreate) ExecX

func (sc *SubjectCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectCreate) Mutation

func (sc *SubjectCreate) Mutation() *SubjectMutation

Mutation returns the SubjectMutation object of the builder.

func (*SubjectCreate) OnConflict

func (sc *SubjectCreate) OnConflict(opts ...sql.ConflictOption) *SubjectUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Subject.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SubjectUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*SubjectCreate) OnConflictColumns

func (sc *SubjectCreate) OnConflictColumns(columns ...string) *SubjectUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Subject.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SubjectCreate) QueryContext

func (c *SubjectCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectCreate) Save

func (sc *SubjectCreate) Save(ctx context.Context) (*Subject, error)

Save creates the Subject in the database.

func (*SubjectCreate) SaveE

func (sc *SubjectCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Subject) error) (*Subject, error)

SaveE calls the given function after created the Subject entity, which is always good for cascading create operations.

func (*SubjectCreate) SaveEX

func (sc *SubjectCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Subject) error) *Subject

SaveEX is like SaveE, but panics if an error occurs.

func (*SubjectCreate) SaveX

func (sc *SubjectCreate) SaveX(ctx context.Context) *Subject

SaveX calls Save and panics if Save returns an error.

func (*SubjectCreate) Set

func (sc *SubjectCreate) Set(obj *Subject) *SubjectCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*SubjectCreate) SetBuiltin

func (sc *SubjectCreate) SetBuiltin(b bool) *SubjectCreate

SetBuiltin sets the "builtin" field.

func (*SubjectCreate) SetCreateTime

func (sc *SubjectCreate) SetCreateTime(t time.Time) *SubjectCreate

SetCreateTime sets the "create_time" field.

func (*SubjectCreate) SetDescription

func (sc *SubjectCreate) SetDescription(s string) *SubjectCreate

SetDescription sets the "description" field.

func (*SubjectCreate) SetDomain

func (sc *SubjectCreate) SetDomain(s string) *SubjectCreate

SetDomain sets the "domain" field.

func (*SubjectCreate) SetID

func (sc *SubjectCreate) SetID(o object.ID) *SubjectCreate

SetID sets the "id" field.

func (*SubjectCreate) SetKind

func (sc *SubjectCreate) SetKind(s string) *SubjectCreate

SetKind sets the "kind" field.

func (*SubjectCreate) SetName

func (sc *SubjectCreate) SetName(s string) *SubjectCreate

SetName sets the "name" field.

func (*SubjectCreate) SetNillableBuiltin

func (sc *SubjectCreate) SetNillableBuiltin(b *bool) *SubjectCreate

SetNillableBuiltin sets the "builtin" field if the given value is not nil.

func (*SubjectCreate) SetNillableCreateTime

func (sc *SubjectCreate) SetNillableCreateTime(t *time.Time) *SubjectCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*SubjectCreate) SetNillableDescription

func (sc *SubjectCreate) SetNillableDescription(s *string) *SubjectCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SubjectCreate) SetNillableDomain

func (sc *SubjectCreate) SetNillableDomain(s *string) *SubjectCreate

SetNillableDomain sets the "domain" field if the given value is not nil.

func (*SubjectCreate) SetNillableKind

func (sc *SubjectCreate) SetNillableKind(s *string) *SubjectCreate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*SubjectCreate) SetNillableUpdateTime

func (sc *SubjectCreate) SetNillableUpdateTime(t *time.Time) *SubjectCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*SubjectCreate) SetUpdateTime

func (sc *SubjectCreate) SetUpdateTime(t time.Time) *SubjectCreate

SetUpdateTime sets the "update_time" field.

type SubjectCreateBulk

type SubjectCreateBulk struct {
	// contains filtered or unexported fields
}

SubjectCreateBulk is the builder for creating many Subject entities in bulk.

func (*SubjectCreateBulk) Exec

func (scb *SubjectCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectCreateBulk) ExecContext

func (c *SubjectCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectCreateBulk) ExecE

func (scb *SubjectCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Subject) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SubjectCreateBulk) ExecEX

func (scb *SubjectCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Subject) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SubjectCreateBulk) ExecX

func (scb *SubjectCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectCreateBulk) OnConflict

func (scb *SubjectCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubjectUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Subject.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SubjectUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*SubjectCreateBulk) OnConflictColumns

func (scb *SubjectCreateBulk) OnConflictColumns(columns ...string) *SubjectUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Subject.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SubjectCreateBulk) QueryContext

func (c *SubjectCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectCreateBulk) Save

func (scb *SubjectCreateBulk) Save(ctx context.Context) ([]*Subject, error)

Save creates the Subject entities in the database.

func (*SubjectCreateBulk) SaveE

func (scb *SubjectCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Subject) error) ([]*Subject, error)

SaveE calls the given function after created the Subject entities, which is always good for cascading create operations.

func (*SubjectCreateBulk) SaveEX

func (scb *SubjectCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Subject) error) []*Subject

SaveEX is like SaveE, but panics if an error occurs.

func (*SubjectCreateBulk) SaveX

func (scb *SubjectCreateBulk) SaveX(ctx context.Context) []*Subject

SaveX is like Save, but panics if an error occurs.

func (*SubjectCreateBulk) Set

func (scb *SubjectCreateBulk) Set(objs ...*Subject) *SubjectCreateBulk

Set leverages the SubjectCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type SubjectCreateInput

type SubjectCreateInput struct {

	// The name of the subject.
	Name string `path:"-" query:"-" json:"name"`
	// The kind of the subject.
	Kind string `path:"-" query:"-" json:"kind,cli-table-column,omitempty"`
	// The domain of the subject.
	Domain string `path:"-" query:"-" json:"domain,omitempty"`
	// The detail of the subject.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Indicate whether the subject is builtin, decide when creating.
	Builtin bool `path:"-" query:"-" json:"builtin,omitempty"`

	// Roles specifies full inserting the new SubjectRoleRelationship entities of the Subject entity.
	Roles []*SubjectRoleRelationshipCreateInput `uri:"-" query:"-" json:"roles,omitempty"`
	// contains filtered or unexported fields
}

SubjectCreateInput holds the creation input of the Subject entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectCreateInput) Model

func (sci *SubjectCreateInput) Model() *Subject

Model returns the Subject entity for creating, after validating.

func (*SubjectCreateInput) SetGinContext

func (ic *SubjectCreateInput) SetGinContext(ctx *gin.Context)

func (*SubjectCreateInput) SetModelClient

func (ic *SubjectCreateInput) SetModelClient(cli *Client)

func (*SubjectCreateInput) Validate

func (sci *SubjectCreateInput) Validate() error

Validate checks the SubjectCreateInput entity.

func (*SubjectCreateInput) ValidateWith

func (sci *SubjectCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectCreateInput entity with the given context and client set.

type SubjectCreateInputs

type SubjectCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*SubjectCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

SubjectCreateInputs holds the creation input of the Subject entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectCreateInputs) Model

func (sci *SubjectCreateInputs) Model() []*Subject

Model returns the Subject entities for creating, after validating.

func (*SubjectCreateInputs) SetGinContext

func (ic *SubjectCreateInputs) SetGinContext(ctx *gin.Context)

func (*SubjectCreateInputs) SetModelClient

func (ic *SubjectCreateInputs) SetModelClient(cli *Client)

func (*SubjectCreateInputs) Validate

func (sci *SubjectCreateInputs) Validate() error

Validate checks the SubjectCreateInputs entity .

func (*SubjectCreateInputs) ValidateWith

func (sci *SubjectCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectCreateInputs entity with the given context and client set.

type SubjectCreateInputsItem

type SubjectCreateInputsItem struct {
	// The name of the subject.
	Name string `path:"-" query:"-" json:"name"`
	// The kind of the subject.
	Kind string `path:"-" query:"-" json:"kind,cli-table-column,omitempty"`
	// The domain of the subject.
	Domain string `path:"-" query:"-" json:"domain,omitempty"`
	// The detail of the subject.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Indicate whether the subject is builtin, decide when creating.
	Builtin bool `path:"-" query:"-" json:"builtin,omitempty"`

	// Roles specifies full inserting the new SubjectRoleRelationship entities.
	Roles []*SubjectRoleRelationshipCreateInput `uri:"-" query:"-" json:"roles,omitempty"`
}

SubjectCreateInputs holds the creation input item of the Subject entities.

func (*SubjectCreateInputsItem) ValidateWith

func (sci *SubjectCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectCreateInputsItem entity with the given context and client set.

type SubjectDelete

type SubjectDelete struct {
	// contains filtered or unexported fields
}

SubjectDelete is the builder for deleting a Subject entity.

func (*SubjectDelete) Exec

func (sd *SubjectDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SubjectDelete) ExecContext

func (c *SubjectDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectDelete) ExecX

func (sd *SubjectDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDelete) QueryContext

func (c *SubjectDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectDelete) Where

func (sd *SubjectDelete) Where(ps ...predicate.Subject) *SubjectDelete

Where appends a list predicates to the SubjectDelete builder.

type SubjectDeleteInput

type SubjectDeleteInput struct {
	SubjectQueryInput `path:",inline"`
}

SubjectDeleteInput holds the deletion input of the Subject entity, please tags with `path:",inline"` if embedding.

func (*SubjectDeleteInput) SetGinContext

func (ic *SubjectDeleteInput) SetGinContext(ctx *gin.Context)

func (*SubjectDeleteInput) SetModelClient

func (ic *SubjectDeleteInput) SetModelClient(cli *Client)

type SubjectDeleteInputs

type SubjectDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*SubjectDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

SubjectDeleteInputs holds the deletion input of the Subject entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectDeleteInputs) IDs

func (sdi *SubjectDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Subject entities for deleting, after validating.

func (*SubjectDeleteInputs) Model

func (sdi *SubjectDeleteInputs) Model() []*Subject

Model returns the Subject entities for deleting, after validating.

func (*SubjectDeleteInputs) SetGinContext

func (ic *SubjectDeleteInputs) SetGinContext(ctx *gin.Context)

func (*SubjectDeleteInputs) SetModelClient

func (ic *SubjectDeleteInputs) SetModelClient(cli *Client)

func (*SubjectDeleteInputs) Validate

func (sdi *SubjectDeleteInputs) Validate() error

Validate checks the SubjectDeleteInputs entity.

func (*SubjectDeleteInputs) ValidateWith

func (sdi *SubjectDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectDeleteInputs entity with the given context and client set.

type SubjectDeleteInputsItem

type SubjectDeleteInputsItem struct {
	// ID of the Subject entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Kind of the Subject entity, a part of the unique index.
	Kind string `path:"-" query:"-" json:"kind,omitempty"`
	// Domain of the Subject entity, a part of the unique index.
	Domain string `path:"-" query:"-" json:"domain,omitempty"`
	// Name of the Subject entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

SubjectDeleteInputs holds the deletion input item of the Subject entities.

type SubjectDeleteOne

type SubjectDeleteOne struct {
	// contains filtered or unexported fields
}

SubjectDeleteOne is the builder for deleting a single Subject entity.

func (*SubjectDeleteOne) Exec

func (sdo *SubjectDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SubjectDeleteOne) ExecX

func (sdo *SubjectDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDeleteOne) Where

Where appends a list predicates to the SubjectDelete builder.

type SubjectEdges

type SubjectEdges struct {
	// Tokens that belong to the subject.
	Tokens []*Token `json:"tokens,omitempty"`
	// Roles holds the value of the roles edge.
	Roles []*SubjectRoleRelationship `json:"roles,omitempty"`
	// contains filtered or unexported fields
}

SubjectEdges holds the relations/edges for other nodes in the graph.

func (SubjectEdges) RolesOrErr

func (e SubjectEdges) RolesOrErr() ([]*SubjectRoleRelationship, error)

RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.

func (SubjectEdges) TokensOrErr

func (e SubjectEdges) TokensOrErr() ([]*Token, error)

TokensOrErr returns the Tokens value or an error if the edge was not loaded in eager-loading.

type SubjectGroupBy

type SubjectGroupBy struct {
	// contains filtered or unexported fields
}

SubjectGroupBy is the group-by builder for Subject entities.

func (*SubjectGroupBy) Aggregate

func (sgb *SubjectGroupBy) Aggregate(fns ...AggregateFunc) *SubjectGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SubjectGroupBy) Bool

func (s *SubjectGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) BoolX

func (s *SubjectGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubjectGroupBy) Bools

func (s *SubjectGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) BoolsX

func (s *SubjectGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SubjectGroupBy) Float64

func (s *SubjectGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) Float64X

func (s *SubjectGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubjectGroupBy) Float64s

func (s *SubjectGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) Float64sX

func (s *SubjectGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubjectGroupBy) Int

func (s *SubjectGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) IntX

func (s *SubjectGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubjectGroupBy) Ints

func (s *SubjectGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) IntsX

func (s *SubjectGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubjectGroupBy) Scan

func (sgb *SubjectGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SubjectGroupBy) ScanX

func (s *SubjectGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubjectGroupBy) String

func (s *SubjectGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) StringX

func (s *SubjectGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubjectGroupBy) Strings

func (s *SubjectGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) StringsX

func (s *SubjectGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubjectMutation

type SubjectMutation struct {
	// contains filtered or unexported fields
}

SubjectMutation represents an operation that mutates the Subject nodes in the graph.

func (*SubjectMutation) AddField

func (m *SubjectMutation) 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 (*SubjectMutation) AddRoleIDs

func (m *SubjectMutation) AddRoleIDs(ids ...object.ID)

AddRoleIDs adds the "roles" edge to the SubjectRoleRelationship entity by ids.

func (*SubjectMutation) AddTokenIDs

func (m *SubjectMutation) AddTokenIDs(ids ...object.ID)

AddTokenIDs adds the "tokens" edge to the Token entity by ids.

func (*SubjectMutation) AddedEdges

func (m *SubjectMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SubjectMutation) AddedField

func (m *SubjectMutation) 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 (*SubjectMutation) AddedFields

func (m *SubjectMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SubjectMutation) AddedIDs

func (m *SubjectMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SubjectMutation) Builtin

func (m *SubjectMutation) Builtin() (r bool, exists bool)

Builtin returns the value of the "builtin" field in the mutation.

func (*SubjectMutation) ClearDescription

func (m *SubjectMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*SubjectMutation) ClearEdge

func (m *SubjectMutation) 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 (*SubjectMutation) ClearField

func (m *SubjectMutation) 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 (*SubjectMutation) ClearRoles

func (m *SubjectMutation) ClearRoles()

ClearRoles clears the "roles" edge to the SubjectRoleRelationship entity.

func (*SubjectMutation) ClearTokens

func (m *SubjectMutation) ClearTokens()

ClearTokens clears the "tokens" edge to the Token entity.

func (*SubjectMutation) ClearedEdges

func (m *SubjectMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SubjectMutation) ClearedFields

func (m *SubjectMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SubjectMutation) Client

func (m SubjectMutation) 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 (*SubjectMutation) CreateTime

func (m *SubjectMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*SubjectMutation) Description

func (m *SubjectMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*SubjectMutation) DescriptionCleared

func (m *SubjectMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*SubjectMutation) Domain

func (m *SubjectMutation) Domain() (r string, exists bool)

Domain returns the value of the "domain" field in the mutation.

func (*SubjectMutation) EdgeCleared

func (m *SubjectMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SubjectMutation) ExecContext

func (c *SubjectMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectMutation) Field

func (m *SubjectMutation) 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 (*SubjectMutation) FieldCleared

func (m *SubjectMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SubjectMutation) Fields

func (m *SubjectMutation) 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 (*SubjectMutation) ID

func (m *SubjectMutation) ID() (id object.ID, 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 (*SubjectMutation) IDs

func (m *SubjectMutation) IDs(ctx context.Context) ([]object.ID, 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 (*SubjectMutation) Kind

func (m *SubjectMutation) Kind() (r string, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*SubjectMutation) Name

func (m *SubjectMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SubjectMutation) OldBuiltin

func (m *SubjectMutation) OldBuiltin(ctx context.Context) (v bool, err error)

OldBuiltin returns the old "builtin" field's value of the Subject entity. If the Subject 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 (*SubjectMutation) OldCreateTime

func (m *SubjectMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Subject entity. If the Subject 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 (*SubjectMutation) OldDescription

func (m *SubjectMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Subject entity. If the Subject 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 (*SubjectMutation) OldDomain

func (m *SubjectMutation) OldDomain(ctx context.Context) (v string, err error)

OldDomain returns the old "domain" field's value of the Subject entity. If the Subject 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 (*SubjectMutation) OldField

func (m *SubjectMutation) 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 (*SubjectMutation) OldKind

func (m *SubjectMutation) OldKind(ctx context.Context) (v string, err error)

OldKind returns the old "kind" field's value of the Subject entity. If the Subject 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 (*SubjectMutation) OldName

func (m *SubjectMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Subject entity. If the Subject 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 (*SubjectMutation) OldUpdateTime

func (m *SubjectMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Subject entity. If the Subject 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 (*SubjectMutation) Op

func (m *SubjectMutation) Op() Op

Op returns the operation name.

func (*SubjectMutation) QueryContext

func (c *SubjectMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectMutation) RemoveRoleIDs

func (m *SubjectMutation) RemoveRoleIDs(ids ...object.ID)

RemoveRoleIDs removes the "roles" edge to the SubjectRoleRelationship entity by IDs.

func (*SubjectMutation) RemoveTokenIDs

func (m *SubjectMutation) RemoveTokenIDs(ids ...object.ID)

RemoveTokenIDs removes the "tokens" edge to the Token entity by IDs.

func (*SubjectMutation) RemovedEdges

func (m *SubjectMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SubjectMutation) RemovedIDs

func (m *SubjectMutation) 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 (*SubjectMutation) RemovedRolesIDs

func (m *SubjectMutation) RemovedRolesIDs() (ids []object.ID)

RemovedRoles returns the removed IDs of the "roles" edge to the SubjectRoleRelationship entity.

func (*SubjectMutation) RemovedTokensIDs

func (m *SubjectMutation) RemovedTokensIDs() (ids []object.ID)

RemovedTokens returns the removed IDs of the "tokens" edge to the Token entity.

func (*SubjectMutation) ResetBuiltin

func (m *SubjectMutation) ResetBuiltin()

ResetBuiltin resets all changes to the "builtin" field.

func (*SubjectMutation) ResetCreateTime

func (m *SubjectMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*SubjectMutation) ResetDescription

func (m *SubjectMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*SubjectMutation) ResetDomain

func (m *SubjectMutation) ResetDomain()

ResetDomain resets all changes to the "domain" field.

func (*SubjectMutation) ResetEdge

func (m *SubjectMutation) 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 (*SubjectMutation) ResetField

func (m *SubjectMutation) 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 (*SubjectMutation) ResetKind

func (m *SubjectMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*SubjectMutation) ResetName

func (m *SubjectMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SubjectMutation) ResetRoles

func (m *SubjectMutation) ResetRoles()

ResetRoles resets all changes to the "roles" edge.

func (*SubjectMutation) ResetTokens

func (m *SubjectMutation) ResetTokens()

ResetTokens resets all changes to the "tokens" edge.

func (*SubjectMutation) ResetUpdateTime

func (m *SubjectMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*SubjectMutation) RolesCleared

func (m *SubjectMutation) RolesCleared() bool

RolesCleared reports if the "roles" edge to the SubjectRoleRelationship entity was cleared.

func (*SubjectMutation) RolesIDs

func (m *SubjectMutation) RolesIDs() (ids []object.ID)

RolesIDs returns the "roles" edge IDs in the mutation.

func (*SubjectMutation) SetBuiltin

func (m *SubjectMutation) SetBuiltin(b bool)

SetBuiltin sets the "builtin" field.

func (*SubjectMutation) SetCreateTime

func (m *SubjectMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*SubjectMutation) SetDescription

func (m *SubjectMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*SubjectMutation) SetDomain

func (m *SubjectMutation) SetDomain(s string)

SetDomain sets the "domain" field.

func (*SubjectMutation) SetField

func (m *SubjectMutation) 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 (*SubjectMutation) SetID

func (m *SubjectMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Subject entities.

func (*SubjectMutation) SetKind

func (m *SubjectMutation) SetKind(s string)

SetKind sets the "kind" field.

func (*SubjectMutation) SetName

func (m *SubjectMutation) SetName(s string)

SetName sets the "name" field.

func (*SubjectMutation) SetOp

func (m *SubjectMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SubjectMutation) SetUpdateTime

func (m *SubjectMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*SubjectMutation) TokensCleared

func (m *SubjectMutation) TokensCleared() bool

TokensCleared reports if the "tokens" edge to the Token entity was cleared.

func (*SubjectMutation) TokensIDs

func (m *SubjectMutation) TokensIDs() (ids []object.ID)

TokensIDs returns the "tokens" edge IDs in the mutation.

func (SubjectMutation) Tx

func (m SubjectMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SubjectMutation) Type

func (m *SubjectMutation) Type() string

Type returns the node type of this mutation (Subject).

func (*SubjectMutation) UpdateTime

func (m *SubjectMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*SubjectMutation) Where

func (m *SubjectMutation) Where(ps ...predicate.Subject)

Where appends a list predicates to the SubjectMutation builder.

func (*SubjectMutation) WhereP

func (m *SubjectMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SubjectMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SubjectOutput

type SubjectOutput struct {
	ID          object.ID  `json:"id,omitempty"`
	CreateTime  *time.Time `json:"createTime,omitempty"`
	UpdateTime  *time.Time `json:"updateTime,omitempty"`
	Kind        string     `json:"kind,cli-table-column,omitempty"`
	Domain      string     `json:"domain,omitempty"`
	Name        string     `json:"name,omitempty"`
	Description string     `json:"description,omitempty"`
	Builtin     bool       `json:"builtin,omitempty"`

	Roles []*SubjectRoleRelationshipOutput `json:"roles,omitempty"`
}

SubjectOutput holds the output of the Subject entity.

func ExposeSubject

func ExposeSubject(_s *Subject) *SubjectOutput

ExposeSubject converts the Subject to SubjectOutput.

func ExposeSubjects

func ExposeSubjects(_ss []*Subject) []*SubjectOutput

ExposeSubjects converts the Subject slice to SubjectOutput pointer slice.

type SubjectPatchInput added in v0.5.0

type SubjectPatchInput struct {
	SubjectQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// The kind of the subject.
	Kind string `path:"-" query:"-" json:"kind,omitempty"`
	// The domain of the subject.
	Domain string `path:"-" query:"-" json:"domain,omitempty"`
	// The name of the subject.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// The detail of the subject.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Indicate whether the subject is builtin, decide when creating.
	Builtin bool `path:"-" query:"-" json:"builtin,omitempty"`

	// Roles indicates replacing the stale SubjectRoleRelationship entities.
	Roles []*SubjectRoleRelationshipCreateInput `uri:"-" query:"-" json:"roles,omitempty"`
	// contains filtered or unexported fields
}

SubjectPatchInput holds the patch input of the Subject entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectPatchInput) Model added in v0.5.0

func (spi *SubjectPatchInput) Model() *Subject

Model returns the Subject patched entity, after validating.

func (*SubjectPatchInput) PatchModel added in v0.5.0

func (spi *SubjectPatchInput) PatchModel() *Subject

PatchModel returns the Subject partition entity for patching.

func (*SubjectPatchInput) SetGinContext added in v0.5.0

func (ic *SubjectPatchInput) SetGinContext(ctx *gin.Context)

func (*SubjectPatchInput) SetModelClient added in v0.5.0

func (ic *SubjectPatchInput) SetModelClient(cli *Client)

func (*SubjectPatchInput) Validate added in v0.5.0

func (spi *SubjectPatchInput) Validate() error

Validate checks the SubjectPatchInput entity.

func (*SubjectPatchInput) ValidateWith added in v0.5.0

func (spi *SubjectPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectPatchInput entity with the given context and client set.

type SubjectQuery

type SubjectQuery struct {
	// contains filtered or unexported fields
}

SubjectQuery is the builder for querying Subject entities.

func (*SubjectQuery) Aggregate

func (sq *SubjectQuery) Aggregate(fns ...AggregateFunc) *SubjectSelect

Aggregate returns a SubjectSelect configured with the given aggregations.

func (*SubjectQuery) All

func (sq *SubjectQuery) All(ctx context.Context) ([]*Subject, error)

All executes the query and returns a list of Subjects.

func (*SubjectQuery) AllX

func (sq *SubjectQuery) AllX(ctx context.Context) []*Subject

AllX is like All, but panics if an error occurs.

func (*SubjectQuery) Clone

func (sq *SubjectQuery) Clone() *SubjectQuery

Clone returns a duplicate of the SubjectQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SubjectQuery) Count

func (sq *SubjectQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SubjectQuery) CountX

func (sq *SubjectQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SubjectQuery) ExecContext

func (c *SubjectQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectQuery) Exist

func (sq *SubjectQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SubjectQuery) ExistX

func (sq *SubjectQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SubjectQuery) First

func (sq *SubjectQuery) First(ctx context.Context) (*Subject, error)

First returns the first Subject entity from the query. Returns a *NotFoundError when no Subject was found.

func (*SubjectQuery) FirstID

func (sq *SubjectQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Subject ID from the query. Returns a *NotFoundError when no Subject ID was found.

func (*SubjectQuery) FirstIDX

func (sq *SubjectQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SubjectQuery) FirstX

func (sq *SubjectQuery) FirstX(ctx context.Context) *Subject

FirstX is like First, but panics if an error occurs.

func (*SubjectQuery) ForShare

func (sq *SubjectQuery) ForShare(opts ...sql.LockOption) *SubjectQuery

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 (*SubjectQuery) ForUpdate

func (sq *SubjectQuery) ForUpdate(opts ...sql.LockOption) *SubjectQuery

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 (*SubjectQuery) GroupBy

func (sq *SubjectQuery) GroupBy(field string, fields ...string) *SubjectGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Subject.Query().
	GroupBy(subject.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*SubjectQuery) IDs

func (sq *SubjectQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Subject IDs.

func (*SubjectQuery) IDsX

func (sq *SubjectQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*SubjectQuery) Limit

func (sq *SubjectQuery) Limit(limit int) *SubjectQuery

Limit the number of records to be returned by this query.

func (*SubjectQuery) Modify

func (sq *SubjectQuery) Modify(modifiers ...func(s *sql.Selector)) *SubjectSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*SubjectQuery) Offset

func (sq *SubjectQuery) Offset(offset int) *SubjectQuery

Offset to start from.

func (*SubjectQuery) Only

func (sq *SubjectQuery) Only(ctx context.Context) (*Subject, error)

Only returns a single Subject entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Subject entity is found. Returns a *NotFoundError when no Subject entities are found.

func (*SubjectQuery) OnlyID

func (sq *SubjectQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only Subject ID in the query. Returns a *NotSingularError when more than one Subject ID is found. Returns a *NotFoundError when no entities are found.

func (*SubjectQuery) OnlyIDX

func (sq *SubjectQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SubjectQuery) OnlyX

func (sq *SubjectQuery) OnlyX(ctx context.Context) *Subject

OnlyX is like Only, but panics if an error occurs.

func (*SubjectQuery) Order

func (sq *SubjectQuery) Order(o ...subject.OrderOption) *SubjectQuery

Order specifies how the records should be ordered.

func (*SubjectQuery) QueryContext

func (c *SubjectQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectQuery) QueryRoles

func (sq *SubjectQuery) QueryRoles() *SubjectRoleRelationshipQuery

QueryRoles chains the current query on the "roles" edge.

func (*SubjectQuery) QueryTokens

func (sq *SubjectQuery) QueryTokens() *TokenQuery

QueryTokens chains the current query on the "tokens" edge.

func (*SubjectQuery) Select

func (sq *SubjectQuery) Select(fields ...string) *SubjectSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Subject.Query().
	Select(subject.FieldCreateTime).
	Scan(ctx, &v)

func (*SubjectQuery) Unique

func (sq *SubjectQuery) Unique(unique bool) *SubjectQuery

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 (*SubjectQuery) Where

func (sq *SubjectQuery) Where(ps ...predicate.Subject) *SubjectQuery

Where adds a new predicate for the SubjectQuery builder.

func (*SubjectQuery) WhereP

func (sq *SubjectQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SubjectQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*SubjectQuery) WithRoles

func (sq *SubjectQuery) WithRoles(opts ...func(*SubjectRoleRelationshipQuery)) *SubjectQuery

WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.

func (*SubjectQuery) WithTokens

func (sq *SubjectQuery) WithTokens(opts ...func(*TokenQuery)) *SubjectQuery

WithTokens tells the query-builder to eager-load the nodes that are connected to the "tokens" edge. The optional arguments are used to configure the query builder of the edge.

type SubjectQueryInput

type SubjectQueryInput struct {

	// Refer holds the route path reference of the Subject entity.
	Refer *object.Refer `path:"subject,default=" query:"-" json:"-"`
	// ID of the Subject entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Kind of the Subject entity, a part of the unique index.
	Kind string `path:"-" query:"-" json:"kind,omitempty"`
	// Domain of the Subject entity, a part of the unique index.
	Domain string `path:"-" query:"-" json:"domain,omitempty"`
	// Name of the Subject entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

SubjectQueryInput holds the query input of the Subject entity, please tags with `path:",inline"` if embedding.

func (*SubjectQueryInput) Model

func (sqi *SubjectQueryInput) Model() *Subject

Model returns the Subject entity for querying, after validating.

func (*SubjectQueryInput) SetGinContext

func (ic *SubjectQueryInput) SetGinContext(ctx *gin.Context)

func (*SubjectQueryInput) SetModelClient

func (ic *SubjectQueryInput) SetModelClient(cli *Client)

func (*SubjectQueryInput) Validate

func (sqi *SubjectQueryInput) Validate() error

Validate checks the SubjectQueryInput entity.

func (*SubjectQueryInput) ValidateWith

func (sqi *SubjectQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectQueryInput entity with the given context and client set.

type SubjectQueryInputs

type SubjectQueryInputs struct {
	// contains filtered or unexported fields
}

SubjectQueryInputs holds the query input of the Subject entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*SubjectQueryInputs) SetGinContext

func (ic *SubjectQueryInputs) SetGinContext(ctx *gin.Context)

func (*SubjectQueryInputs) SetModelClient

func (ic *SubjectQueryInputs) SetModelClient(cli *Client)

func (*SubjectQueryInputs) Validate

func (sqi *SubjectQueryInputs) Validate() error

Validate checks the SubjectQueryInputs entity.

func (*SubjectQueryInputs) ValidateWith

func (sqi *SubjectQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectQueryInputs entity with the given context and client set.

type SubjectRoleRelationship

type SubjectRoleRelationship struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// ID of the project to belong, empty means for all projects.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the subject to which the relationship connects.
	SubjectID object.ID `json:"subject_id,omitempty"`
	// ID of the role to which the relationship connects.
	RoleID string `json:"role_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SubjectRoleRelationshipQuery when eager-loading is set.
	Edges SubjectRoleRelationshipEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

SubjectRoleRelationship is the model entity for the SubjectRoleRelationship schema.

func (*SubjectRoleRelationship) ExecContext

func (c *SubjectRoleRelationship) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationship) QueryContext

func (c *SubjectRoleRelationship) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationship) QueryProject

func (srr *SubjectRoleRelationship) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the SubjectRoleRelationship entity.

func (*SubjectRoleRelationship) QueryRole

func (srr *SubjectRoleRelationship) QueryRole() *RoleQuery

QueryRole queries the "role" edge of the SubjectRoleRelationship entity.

func (*SubjectRoleRelationship) QuerySubject

func (srr *SubjectRoleRelationship) QuerySubject() *SubjectQuery

QuerySubject queries the "subject" edge of the SubjectRoleRelationship entity.

func (*SubjectRoleRelationship) String

func (srr *SubjectRoleRelationship) String() string

String implements the fmt.Stringer.

func (*SubjectRoleRelationship) Unwrap

Unwrap unwraps the SubjectRoleRelationship 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 (*SubjectRoleRelationship) Update

Update returns a builder for updating this SubjectRoleRelationship. Note that you need to call SubjectRoleRelationship.Unwrap() before calling this method if this SubjectRoleRelationship was returned from a transaction, and the transaction was committed or rolled back.

func (*SubjectRoleRelationship) Value

func (srr *SubjectRoleRelationship) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the SubjectRoleRelationship. This includes values selected through modifiers, order, etc.

func (*SubjectRoleRelationship) View

View returns the output of SubjectRoleRelationship entity.

type SubjectRoleRelationshipClient

type SubjectRoleRelationshipClient struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipClient is a client for the SubjectRoleRelationship schema.

func NewSubjectRoleRelationshipClient

func NewSubjectRoleRelationshipClient(c config) *SubjectRoleRelationshipClient

NewSubjectRoleRelationshipClient returns a client for the SubjectRoleRelationship from the given config.

func (*SubjectRoleRelationshipClient) Create

Create returns a builder for creating a SubjectRoleRelationship entity.

func (*SubjectRoleRelationshipClient) CreateBulk

CreateBulk returns a builder for creating a bulk of SubjectRoleRelationship entities.

func (*SubjectRoleRelationshipClient) Delete

Delete returns a delete builder for SubjectRoleRelationship.

func (*SubjectRoleRelationshipClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SubjectRoleRelationshipClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SubjectRoleRelationshipClient) ExecContext

func (c *SubjectRoleRelationshipClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationshipClient) Get

Get returns a SubjectRoleRelationship entity by its id.

func (*SubjectRoleRelationshipClient) GetX

GetX is like Get, but panics if an error occurs.

func (*SubjectRoleRelationshipClient) Hooks

func (c *SubjectRoleRelationshipClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SubjectRoleRelationshipClient) Intercept

func (c *SubjectRoleRelationshipClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `subjectrolerelationship.Intercept(f(g(h())))`.

func (*SubjectRoleRelationshipClient) Interceptors

func (c *SubjectRoleRelationshipClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SubjectRoleRelationshipClient) MapCreateBulk added in v0.5.0

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 (*SubjectRoleRelationshipClient) Query

Query returns a query builder for SubjectRoleRelationship.

func (*SubjectRoleRelationshipClient) QueryContext

func (c *SubjectRoleRelationshipClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationshipClient) QueryProject

QueryProject queries the project edge of a SubjectRoleRelationship.

func (*SubjectRoleRelationshipClient) QueryRole

QueryRole queries the role edge of a SubjectRoleRelationship.

func (*SubjectRoleRelationshipClient) QuerySubject

QuerySubject queries the subject edge of a SubjectRoleRelationship.

func (*SubjectRoleRelationshipClient) Update

Update returns an update builder for SubjectRoleRelationship.

func (*SubjectRoleRelationshipClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SubjectRoleRelationshipClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*SubjectRoleRelationshipClient) Use

func (c *SubjectRoleRelationshipClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subjectrolerelationship.Hooks(f(g(h())))`.

type SubjectRoleRelationshipClientGetter

type SubjectRoleRelationshipClientGetter interface {
	// SubjectRoleRelationships returns the client for interacting with the SubjectRoleRelationship builders.
	SubjectRoleRelationships() *SubjectRoleRelationshipClient
}

SubjectRoleRelationshipClientGetter is an interface that allows getting SubjectRoleRelationshipClient.

type SubjectRoleRelationshipCreate

type SubjectRoleRelationshipCreate struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipCreate is the builder for creating a SubjectRoleRelationship entity.

func (*SubjectRoleRelationshipCreate) Exec

Exec executes the query.

func (*SubjectRoleRelationshipCreate) ExecContext

func (c *SubjectRoleRelationshipCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationshipCreate) ExecE

func (srrc *SubjectRoleRelationshipCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *SubjectRoleRelationship) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SubjectRoleRelationshipCreate) ExecEX

func (srrc *SubjectRoleRelationshipCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *SubjectRoleRelationship) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SubjectRoleRelationshipCreate) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SubjectRoleRelationshipCreate) Mutation

Mutation returns the SubjectRoleRelationshipMutation object of the builder.

func (*SubjectRoleRelationshipCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SubjectRoleRelationship.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SubjectRoleRelationshipUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*SubjectRoleRelationshipCreate) OnConflictColumns

func (srrc *SubjectRoleRelationshipCreate) OnConflictColumns(columns ...string) *SubjectRoleRelationshipUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SubjectRoleRelationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SubjectRoleRelationshipCreate) QueryContext

func (c *SubjectRoleRelationshipCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationshipCreate) Save

Save creates the SubjectRoleRelationship in the database.

func (*SubjectRoleRelationshipCreate) SaveE

SaveE calls the given function after created the SubjectRoleRelationship entity, which is always good for cascading create operations.

func (*SubjectRoleRelationshipCreate) SaveEX

SaveEX is like SaveE, but panics if an error occurs.

func (*SubjectRoleRelationshipCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*SubjectRoleRelationshipCreate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*SubjectRoleRelationshipCreate) SetCreateTime

SetCreateTime sets the "create_time" field.

func (*SubjectRoleRelationshipCreate) SetID

SetID sets the "id" field.

func (*SubjectRoleRelationshipCreate) SetNillableCreateTime

func (srrc *SubjectRoleRelationshipCreate) SetNillableCreateTime(t *time.Time) *SubjectRoleRelationshipCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*SubjectRoleRelationshipCreate) SetNillableProjectID

func (srrc *SubjectRoleRelationshipCreate) SetNillableProjectID(o *object.ID) *SubjectRoleRelationshipCreate

SetNillableProjectID sets the "project_id" field if the given value is not nil.

func (*SubjectRoleRelationshipCreate) SetProject

SetProject sets the "project" edge to the Project entity.

func (*SubjectRoleRelationshipCreate) SetProjectID

SetProjectID sets the "project_id" field.

func (*SubjectRoleRelationshipCreate) SetRole

SetRole sets the "role" edge to the Role entity.

func (*SubjectRoleRelationshipCreate) SetRoleID

SetRoleID sets the "role_id" field.

func (*SubjectRoleRelationshipCreate) SetSubject

SetSubject sets the "subject" edge to the Subject entity.

func (*SubjectRoleRelationshipCreate) SetSubjectID

SetSubjectID sets the "subject_id" field.

type SubjectRoleRelationshipCreateBulk

type SubjectRoleRelationshipCreateBulk struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipCreateBulk is the builder for creating many SubjectRoleRelationship entities in bulk.

func (*SubjectRoleRelationshipCreateBulk) Exec

Exec executes the query.

func (*SubjectRoleRelationshipCreateBulk) ExecContext

func (c *SubjectRoleRelationshipCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationshipCreateBulk) ExecE

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SubjectRoleRelationshipCreateBulk) ExecEX

func (srrcb *SubjectRoleRelationshipCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *SubjectRoleRelationship) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SubjectRoleRelationshipCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SubjectRoleRelationshipCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SubjectRoleRelationship.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SubjectRoleRelationshipUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*SubjectRoleRelationshipCreateBulk) OnConflictColumns

func (srrcb *SubjectRoleRelationshipCreateBulk) OnConflictColumns(columns ...string) *SubjectRoleRelationshipUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SubjectRoleRelationship.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SubjectRoleRelationshipCreateBulk) QueryContext

func (c *SubjectRoleRelationshipCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationshipCreateBulk) Save

Save creates the SubjectRoleRelationship entities in the database.

func (*SubjectRoleRelationshipCreateBulk) SaveE

SaveE calls the given function after created the SubjectRoleRelationship entities, which is always good for cascading create operations.

func (*SubjectRoleRelationshipCreateBulk) SaveEX

SaveEX is like SaveE, but panics if an error occurs.

func (*SubjectRoleRelationshipCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

func (*SubjectRoleRelationshipCreateBulk) Set

Set leverages the SubjectRoleRelationshipCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type SubjectRoleRelationshipCreateInput

type SubjectRoleRelationshipCreateInput struct {

	// Project indicates to create SubjectRoleRelationship entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Subject specifies full inserting the new Subject entity of the SubjectRoleRelationship entity.
	Subject *SubjectQueryInput `uri:"-" query:"-" json:"subject"`
	// Role specifies full inserting the new Role entity of the SubjectRoleRelationship entity.
	Role *RoleQueryInput `uri:"-" query:"-" json:"role"`
	// contains filtered or unexported fields
}

SubjectRoleRelationshipCreateInput holds the creation input of the SubjectRoleRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectRoleRelationshipCreateInput) Model

Model returns the SubjectRoleRelationship entity for creating, after validating.

func (*SubjectRoleRelationshipCreateInput) SetGinContext

func (ic *SubjectRoleRelationshipCreateInput) SetGinContext(ctx *gin.Context)

func (*SubjectRoleRelationshipCreateInput) SetModelClient

func (ic *SubjectRoleRelationshipCreateInput) SetModelClient(cli *Client)

func (*SubjectRoleRelationshipCreateInput) Validate

func (srrci *SubjectRoleRelationshipCreateInput) Validate() error

Validate checks the SubjectRoleRelationshipCreateInput entity.

func (*SubjectRoleRelationshipCreateInput) ValidateWith

func (srrci *SubjectRoleRelationshipCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipCreateInput entity with the given context and client set.

type SubjectRoleRelationshipCreateInputs

type SubjectRoleRelationshipCreateInputs struct {

	// Project indicates to create SubjectRoleRelationship entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*SubjectRoleRelationshipCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

SubjectRoleRelationshipCreateInputs holds the creation input of the SubjectRoleRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectRoleRelationshipCreateInputs) Model

Model returns the SubjectRoleRelationship entities for creating, after validating.

func (*SubjectRoleRelationshipCreateInputs) SetGinContext

func (ic *SubjectRoleRelationshipCreateInputs) SetGinContext(ctx *gin.Context)

func (*SubjectRoleRelationshipCreateInputs) SetModelClient

func (ic *SubjectRoleRelationshipCreateInputs) SetModelClient(cli *Client)

func (*SubjectRoleRelationshipCreateInputs) Validate

func (srrci *SubjectRoleRelationshipCreateInputs) Validate() error

Validate checks the SubjectRoleRelationshipCreateInputs entity .

func (*SubjectRoleRelationshipCreateInputs) ValidateWith

func (srrci *SubjectRoleRelationshipCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipCreateInputs entity with the given context and client set.

type SubjectRoleRelationshipCreateInputsItem

type SubjectRoleRelationshipCreateInputsItem struct {

	// Subject specifies full inserting the new Subject entity.
	Subject *SubjectQueryInput `uri:"-" query:"-" json:"subject"`
	// Role specifies full inserting the new Role entity.
	Role *RoleQueryInput `uri:"-" query:"-" json:"role"`
}

SubjectRoleRelationshipCreateInputs holds the creation input item of the SubjectRoleRelationship entities.

func (*SubjectRoleRelationshipCreateInputsItem) ValidateWith

func (srrci *SubjectRoleRelationshipCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipCreateInputsItem entity with the given context and client set.

type SubjectRoleRelationshipDelete

type SubjectRoleRelationshipDelete struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipDelete is the builder for deleting a SubjectRoleRelationship entity.

func (*SubjectRoleRelationshipDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*SubjectRoleRelationshipDelete) ExecContext

func (c *SubjectRoleRelationshipDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationshipDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SubjectRoleRelationshipDelete) QueryContext

func (c *SubjectRoleRelationshipDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationshipDelete) Where

Where appends a list predicates to the SubjectRoleRelationshipDelete builder.

type SubjectRoleRelationshipDeleteInput

type SubjectRoleRelationshipDeleteInput struct {
	SubjectRoleRelationshipQueryInput `path:",inline"`
}

SubjectRoleRelationshipDeleteInput holds the deletion input of the SubjectRoleRelationship entity, please tags with `path:",inline"` if embedding.

func (*SubjectRoleRelationshipDeleteInput) SetGinContext

func (ic *SubjectRoleRelationshipDeleteInput) SetGinContext(ctx *gin.Context)

func (*SubjectRoleRelationshipDeleteInput) SetModelClient

func (ic *SubjectRoleRelationshipDeleteInput) SetModelClient(cli *Client)

type SubjectRoleRelationshipDeleteInputs

type SubjectRoleRelationshipDeleteInputs struct {

	// Project indicates to delete SubjectRoleRelationship entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*SubjectRoleRelationshipDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

SubjectRoleRelationshipDeleteInputs holds the deletion input of the SubjectRoleRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectRoleRelationshipDeleteInputs) IDs

IDs returns the ID list of the SubjectRoleRelationship entities for deleting, after validating.

func (*SubjectRoleRelationshipDeleteInputs) Model

Model returns the SubjectRoleRelationship entities for deleting, after validating.

func (*SubjectRoleRelationshipDeleteInputs) SetGinContext

func (ic *SubjectRoleRelationshipDeleteInputs) SetGinContext(ctx *gin.Context)

func (*SubjectRoleRelationshipDeleteInputs) SetModelClient

func (ic *SubjectRoleRelationshipDeleteInputs) SetModelClient(cli *Client)

func (*SubjectRoleRelationshipDeleteInputs) Validate

func (srrdi *SubjectRoleRelationshipDeleteInputs) Validate() error

Validate checks the SubjectRoleRelationshipDeleteInputs entity.

func (*SubjectRoleRelationshipDeleteInputs) ValidateWith

func (srrdi *SubjectRoleRelationshipDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipDeleteInputs entity with the given context and client set.

type SubjectRoleRelationshipDeleteInputsItem

type SubjectRoleRelationshipDeleteInputsItem struct {
	// ID of the SubjectRoleRelationship entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

SubjectRoleRelationshipDeleteInputs holds the deletion input item of the SubjectRoleRelationship entities.

type SubjectRoleRelationshipDeleteOne

type SubjectRoleRelationshipDeleteOne struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipDeleteOne is the builder for deleting a single SubjectRoleRelationship entity.

func (*SubjectRoleRelationshipDeleteOne) Exec

Exec executes the deletion query.

func (*SubjectRoleRelationshipDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SubjectRoleRelationshipDeleteOne) Where

Where appends a list predicates to the SubjectRoleRelationshipDelete builder.

type SubjectRoleRelationshipEdges

type SubjectRoleRelationshipEdges struct {
	// Project to which the subject role belongs.
	Project *Project `json:"project,omitempty"`
	// Subject that connect to the relationship.
	Subject *Subject `json:"subject,omitempty"`
	// Role that connect to the relationship.
	Role *Role `json:"role,omitempty"`
	// contains filtered or unexported fields
}

SubjectRoleRelationshipEdges holds the relations/edges for other nodes in the graph.

func (SubjectRoleRelationshipEdges) ProjectOrErr

func (e SubjectRoleRelationshipEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SubjectRoleRelationshipEdges) RoleOrErr

func (e SubjectRoleRelationshipEdges) RoleOrErr() (*Role, error)

RoleOrErr returns the Role value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SubjectRoleRelationshipEdges) SubjectOrErr

func (e SubjectRoleRelationshipEdges) SubjectOrErr() (*Subject, error)

SubjectOrErr returns the Subject value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SubjectRoleRelationshipGroupBy

type SubjectRoleRelationshipGroupBy struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipGroupBy is the group-by builder for SubjectRoleRelationship entities.

func (*SubjectRoleRelationshipGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*SubjectRoleRelationshipGroupBy) Bool

func (s *SubjectRoleRelationshipGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipGroupBy) BoolX

func (s *SubjectRoleRelationshipGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubjectRoleRelationshipGroupBy) Bools

func (s *SubjectRoleRelationshipGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipGroupBy) BoolsX

func (s *SubjectRoleRelationshipGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SubjectRoleRelationshipGroupBy) Float64

func (s *SubjectRoleRelationshipGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipGroupBy) Float64X

func (s *SubjectRoleRelationshipGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubjectRoleRelationshipGroupBy) Float64s

func (s *SubjectRoleRelationshipGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipGroupBy) Float64sX

func (s *SubjectRoleRelationshipGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubjectRoleRelationshipGroupBy) Int

func (s *SubjectRoleRelationshipGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipGroupBy) IntX

func (s *SubjectRoleRelationshipGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubjectRoleRelationshipGroupBy) Ints

func (s *SubjectRoleRelationshipGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipGroupBy) IntsX

func (s *SubjectRoleRelationshipGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubjectRoleRelationshipGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*SubjectRoleRelationshipGroupBy) ScanX

func (s *SubjectRoleRelationshipGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubjectRoleRelationshipGroupBy) String

func (s *SubjectRoleRelationshipGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipGroupBy) StringX

func (s *SubjectRoleRelationshipGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubjectRoleRelationshipGroupBy) Strings

func (s *SubjectRoleRelationshipGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipGroupBy) StringsX

func (s *SubjectRoleRelationshipGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubjectRoleRelationshipMutation

type SubjectRoleRelationshipMutation struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipMutation represents an operation that mutates the SubjectRoleRelationship nodes in the graph.

func (*SubjectRoleRelationshipMutation) AddField

func (m *SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) AddedEdges

func (m *SubjectRoleRelationshipMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SubjectRoleRelationshipMutation) AddedField

func (m *SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) AddedFields

func (m *SubjectRoleRelationshipMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SubjectRoleRelationshipMutation) AddedIDs

func (m *SubjectRoleRelationshipMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SubjectRoleRelationshipMutation) ClearEdge

func (m *SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) ClearField

func (m *SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) ClearProject

func (m *SubjectRoleRelationshipMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*SubjectRoleRelationshipMutation) ClearProjectID

func (m *SubjectRoleRelationshipMutation) ClearProjectID()

ClearProjectID clears the value of the "project_id" field.

func (*SubjectRoleRelationshipMutation) ClearRole

func (m *SubjectRoleRelationshipMutation) ClearRole()

ClearRole clears the "role" edge to the Role entity.

func (*SubjectRoleRelationshipMutation) ClearSubject

func (m *SubjectRoleRelationshipMutation) ClearSubject()

ClearSubject clears the "subject" edge to the Subject entity.

func (*SubjectRoleRelationshipMutation) ClearedEdges

func (m *SubjectRoleRelationshipMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SubjectRoleRelationshipMutation) ClearedFields

func (m *SubjectRoleRelationshipMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) CreateTime

func (m *SubjectRoleRelationshipMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*SubjectRoleRelationshipMutation) EdgeCleared

func (m *SubjectRoleRelationshipMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SubjectRoleRelationshipMutation) ExecContext

func (c *SubjectRoleRelationshipMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) FieldCleared

func (m *SubjectRoleRelationshipMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) ID

func (m *SubjectRoleRelationshipMutation) ID() (id object.ID, 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 (*SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) OldCreateTime

func (m *SubjectRoleRelationshipMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the SubjectRoleRelationship entity. If the SubjectRoleRelationship 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 (*SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) OldProjectID

func (m *SubjectRoleRelationshipMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the SubjectRoleRelationship entity. If the SubjectRoleRelationship 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 (*SubjectRoleRelationshipMutation) OldRoleID

func (m *SubjectRoleRelationshipMutation) OldRoleID(ctx context.Context) (v string, err error)

OldRoleID returns the old "role_id" field's value of the SubjectRoleRelationship entity. If the SubjectRoleRelationship 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 (*SubjectRoleRelationshipMutation) OldSubjectID

func (m *SubjectRoleRelationshipMutation) OldSubjectID(ctx context.Context) (v object.ID, err error)

OldSubjectID returns the old "subject_id" field's value of the SubjectRoleRelationship entity. If the SubjectRoleRelationship 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 (*SubjectRoleRelationshipMutation) Op

Op returns the operation name.

func (*SubjectRoleRelationshipMutation) ProjectCleared

func (m *SubjectRoleRelationshipMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*SubjectRoleRelationshipMutation) ProjectID

func (m *SubjectRoleRelationshipMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*SubjectRoleRelationshipMutation) ProjectIDCleared

func (m *SubjectRoleRelationshipMutation) ProjectIDCleared() bool

ProjectIDCleared returns if the "project_id" field was cleared in this mutation.

func (*SubjectRoleRelationshipMutation) ProjectIDs

func (m *SubjectRoleRelationshipMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*SubjectRoleRelationshipMutation) QueryContext

func (c *SubjectRoleRelationshipMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationshipMutation) RemovedEdges

func (m *SubjectRoleRelationshipMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SubjectRoleRelationshipMutation) RemovedIDs

func (m *SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) ResetCreateTime

func (m *SubjectRoleRelationshipMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*SubjectRoleRelationshipMutation) ResetEdge

func (m *SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) ResetField

func (m *SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) ResetProject

func (m *SubjectRoleRelationshipMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*SubjectRoleRelationshipMutation) ResetProjectID

func (m *SubjectRoleRelationshipMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*SubjectRoleRelationshipMutation) ResetRole

func (m *SubjectRoleRelationshipMutation) ResetRole()

ResetRole resets all changes to the "role" edge.

func (*SubjectRoleRelationshipMutation) ResetRoleID

func (m *SubjectRoleRelationshipMutation) ResetRoleID()

ResetRoleID resets all changes to the "role_id" field.

func (*SubjectRoleRelationshipMutation) ResetSubject

func (m *SubjectRoleRelationshipMutation) ResetSubject()

ResetSubject resets all changes to the "subject" edge.

func (*SubjectRoleRelationshipMutation) ResetSubjectID

func (m *SubjectRoleRelationshipMutation) ResetSubjectID()

ResetSubjectID resets all changes to the "subject_id" field.

func (*SubjectRoleRelationshipMutation) RoleCleared

func (m *SubjectRoleRelationshipMutation) RoleCleared() bool

RoleCleared reports if the "role" edge to the Role entity was cleared.

func (*SubjectRoleRelationshipMutation) RoleID

func (m *SubjectRoleRelationshipMutation) RoleID() (r string, exists bool)

RoleID returns the value of the "role_id" field in the mutation.

func (*SubjectRoleRelationshipMutation) RoleIDs

func (m *SubjectRoleRelationshipMutation) RoleIDs() (ids []string)

RoleIDs returns the "role" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoleID instead. It exists only for internal usage by the builders.

func (*SubjectRoleRelationshipMutation) SetCreateTime

func (m *SubjectRoleRelationshipMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*SubjectRoleRelationshipMutation) SetField

func (m *SubjectRoleRelationshipMutation) 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 (*SubjectRoleRelationshipMutation) SetID

SetID sets the value of the id field. Note that this operation is only accepted on creation of SubjectRoleRelationship entities.

func (*SubjectRoleRelationshipMutation) SetOp

func (m *SubjectRoleRelationshipMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SubjectRoleRelationshipMutation) SetProjectID

func (m *SubjectRoleRelationshipMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*SubjectRoleRelationshipMutation) SetRoleID

func (m *SubjectRoleRelationshipMutation) SetRoleID(s string)

SetRoleID sets the "role_id" field.

func (*SubjectRoleRelationshipMutation) SetSubjectID

func (m *SubjectRoleRelationshipMutation) SetSubjectID(o object.ID)

SetSubjectID sets the "subject_id" field.

func (*SubjectRoleRelationshipMutation) SubjectCleared

func (m *SubjectRoleRelationshipMutation) SubjectCleared() bool

SubjectCleared reports if the "subject" edge to the Subject entity was cleared.

func (*SubjectRoleRelationshipMutation) SubjectID

func (m *SubjectRoleRelationshipMutation) SubjectID() (r object.ID, exists bool)

SubjectID returns the value of the "subject_id" field in the mutation.

func (*SubjectRoleRelationshipMutation) SubjectIDs

func (m *SubjectRoleRelationshipMutation) SubjectIDs() (ids []object.ID)

SubjectIDs returns the "subject" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubjectID instead. It exists only for internal usage by the builders.

func (SubjectRoleRelationshipMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SubjectRoleRelationshipMutation) Type

Type returns the node type of this mutation (SubjectRoleRelationship).

func (*SubjectRoleRelationshipMutation) Where

Where appends a list predicates to the SubjectRoleRelationshipMutation builder.

func (*SubjectRoleRelationshipMutation) WhereP

func (m *SubjectRoleRelationshipMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SubjectRoleRelationshipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SubjectRoleRelationshipOutput

type SubjectRoleRelationshipOutput struct {
	ID         object.ID  `json:"id,omitempty"`
	CreateTime *time.Time `json:"createTime,omitempty"`

	Project *ProjectOutput `json:"project,omitempty"`
	Subject *SubjectOutput `json:"subject,omitempty"`
	Role    *RoleOutput    `json:"role,omitempty"`
}

SubjectRoleRelationshipOutput holds the output of the SubjectRoleRelationship entity.

func ExposeSubjectRoleRelationship

func ExposeSubjectRoleRelationship(_srr *SubjectRoleRelationship) *SubjectRoleRelationshipOutput

ExposeSubjectRoleRelationship converts the SubjectRoleRelationship to SubjectRoleRelationshipOutput.

func ExposeSubjectRoleRelationships

func ExposeSubjectRoleRelationships(_srrs []*SubjectRoleRelationship) []*SubjectRoleRelationshipOutput

ExposeSubjectRoleRelationships converts the SubjectRoleRelationship slice to SubjectRoleRelationshipOutput pointer slice.

type SubjectRoleRelationshipPatchInput added in v0.5.0

type SubjectRoleRelationshipPatchInput struct {
	SubjectRoleRelationshipQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`

	// Subject indicates replacing the stale Subject entity.
	Subject *SubjectQueryInput `uri:"-" query:"-" json:"subject"`
	// Role indicates replacing the stale Role entity.
	Role *RoleQueryInput `uri:"-" query:"-" json:"role"`
	// contains filtered or unexported fields
}

SubjectRoleRelationshipPatchInput holds the patch input of the SubjectRoleRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectRoleRelationshipPatchInput) Model added in v0.5.0

Model returns the SubjectRoleRelationship patched entity, after validating.

func (*SubjectRoleRelationshipPatchInput) PatchModel added in v0.5.0

PatchModel returns the SubjectRoleRelationship partition entity for patching.

func (*SubjectRoleRelationshipPatchInput) SetGinContext added in v0.5.0

func (ic *SubjectRoleRelationshipPatchInput) SetGinContext(ctx *gin.Context)

func (*SubjectRoleRelationshipPatchInput) SetModelClient added in v0.5.0

func (ic *SubjectRoleRelationshipPatchInput) SetModelClient(cli *Client)

func (*SubjectRoleRelationshipPatchInput) Validate added in v0.5.0

func (srrpi *SubjectRoleRelationshipPatchInput) Validate() error

Validate checks the SubjectRoleRelationshipPatchInput entity.

func (*SubjectRoleRelationshipPatchInput) ValidateWith added in v0.5.0

func (srrpi *SubjectRoleRelationshipPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipPatchInput entity with the given context and client set.

type SubjectRoleRelationshipQuery

type SubjectRoleRelationshipQuery struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipQuery is the builder for querying SubjectRoleRelationship entities.

func (*SubjectRoleRelationshipQuery) Aggregate

Aggregate returns a SubjectRoleRelationshipSelect configured with the given aggregations.

func (*SubjectRoleRelationshipQuery) All

All executes the query and returns a list of SubjectRoleRelationships.

func (*SubjectRoleRelationshipQuery) AllX

AllX is like All, but panics if an error occurs.

func (*SubjectRoleRelationshipQuery) Clone

Clone returns a duplicate of the SubjectRoleRelationshipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SubjectRoleRelationshipQuery) Count

Count returns the count of the given query.

func (*SubjectRoleRelationshipQuery) CountX

func (srrq *SubjectRoleRelationshipQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SubjectRoleRelationshipQuery) ExecContext

func (c *SubjectRoleRelationshipQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationshipQuery) Exist

Exist returns true if the query has elements in the graph.

func (*SubjectRoleRelationshipQuery) ExistX

ExistX is like Exist, but panics if an error occurs.

func (*SubjectRoleRelationshipQuery) First

First returns the first SubjectRoleRelationship entity from the query. Returns a *NotFoundError when no SubjectRoleRelationship was found.

func (*SubjectRoleRelationshipQuery) FirstID

func (srrq *SubjectRoleRelationshipQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first SubjectRoleRelationship ID from the query. Returns a *NotFoundError when no SubjectRoleRelationship ID was found.

func (*SubjectRoleRelationshipQuery) FirstIDX

FirstIDX is like FirstID, but panics if an error occurs.

func (*SubjectRoleRelationshipQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*SubjectRoleRelationshipQuery) ForShare

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 (*SubjectRoleRelationshipQuery) ForUpdate

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 (*SubjectRoleRelationshipQuery) 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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SubjectRoleRelationship.Query().
	GroupBy(subjectrolerelationship.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*SubjectRoleRelationshipQuery) IDs

func (srrq *SubjectRoleRelationshipQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of SubjectRoleRelationship IDs.

func (*SubjectRoleRelationshipQuery) IDsX

IDsX is like IDs, but panics if an error occurs.

func (*SubjectRoleRelationshipQuery) Limit

Limit the number of records to be returned by this query.

func (*SubjectRoleRelationshipQuery) Modify

func (srrq *SubjectRoleRelationshipQuery) Modify(modifiers ...func(s *sql.Selector)) *SubjectRoleRelationshipSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*SubjectRoleRelationshipQuery) Offset

Offset to start from.

func (*SubjectRoleRelationshipQuery) Only

Only returns a single SubjectRoleRelationship entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SubjectRoleRelationship entity is found. Returns a *NotFoundError when no SubjectRoleRelationship entities are found.

func (*SubjectRoleRelationshipQuery) OnlyID

func (srrq *SubjectRoleRelationshipQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only SubjectRoleRelationship ID in the query. Returns a *NotSingularError when more than one SubjectRoleRelationship ID is found. Returns a *NotFoundError when no entities are found.

func (*SubjectRoleRelationshipQuery) OnlyIDX

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SubjectRoleRelationshipQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*SubjectRoleRelationshipQuery) Order

Order specifies how the records should be ordered.

func (*SubjectRoleRelationshipQuery) QueryContext

func (c *SubjectRoleRelationshipQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationshipQuery) QueryProject

func (srrq *SubjectRoleRelationshipQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*SubjectRoleRelationshipQuery) QueryRole

func (srrq *SubjectRoleRelationshipQuery) QueryRole() *RoleQuery

QueryRole chains the current query on the "role" edge.

func (*SubjectRoleRelationshipQuery) QuerySubject

func (srrq *SubjectRoleRelationshipQuery) QuerySubject() *SubjectQuery

QuerySubject chains the current query on the "subject" edge.

func (*SubjectRoleRelationshipQuery) 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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.SubjectRoleRelationship.Query().
	Select(subjectrolerelationship.FieldCreateTime).
	Scan(ctx, &v)

func (*SubjectRoleRelationshipQuery) 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 (*SubjectRoleRelationshipQuery) Where

Where adds a new predicate for the SubjectRoleRelationshipQuery builder.

func (*SubjectRoleRelationshipQuery) WhereP

func (srrq *SubjectRoleRelationshipQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SubjectRoleRelationshipQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*SubjectRoleRelationshipQuery) WithProject

func (srrq *SubjectRoleRelationshipQuery) WithProject(opts ...func(*ProjectQuery)) *SubjectRoleRelationshipQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*SubjectRoleRelationshipQuery) WithRole

WithRole tells the query-builder to eager-load the nodes that are connected to the "role" edge. The optional arguments are used to configure the query builder of the edge.

func (*SubjectRoleRelationshipQuery) WithSubject

func (srrq *SubjectRoleRelationshipQuery) WithSubject(opts ...func(*SubjectQuery)) *SubjectRoleRelationshipQuery

WithSubject tells the query-builder to eager-load the nodes that are connected to the "subject" edge. The optional arguments are used to configure the query builder of the edge.

type SubjectRoleRelationshipQueryInput

type SubjectRoleRelationshipQueryInput struct {

	// Project indicates to query SubjectRoleRelationship entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project,omitempty"`

	// Refer holds the route path reference of the SubjectRoleRelationship entity.
	Refer *object.Refer `path:"subjectrolerelationship,default=" query:"-" json:"-"`
	// ID of the SubjectRoleRelationship entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

SubjectRoleRelationshipQueryInput holds the query input of the SubjectRoleRelationship entity, please tags with `path:",inline"` if embedding.

func (*SubjectRoleRelationshipQueryInput) Model

Model returns the SubjectRoleRelationship entity for querying, after validating.

func (*SubjectRoleRelationshipQueryInput) SetGinContext

func (ic *SubjectRoleRelationshipQueryInput) SetGinContext(ctx *gin.Context)

func (*SubjectRoleRelationshipQueryInput) SetModelClient

func (ic *SubjectRoleRelationshipQueryInput) SetModelClient(cli *Client)

func (*SubjectRoleRelationshipQueryInput) Validate

func (srrqi *SubjectRoleRelationshipQueryInput) Validate() error

Validate checks the SubjectRoleRelationshipQueryInput entity.

func (*SubjectRoleRelationshipQueryInput) ValidateWith

func (srrqi *SubjectRoleRelationshipQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipQueryInput entity with the given context and client set.

type SubjectRoleRelationshipQueryInputs

type SubjectRoleRelationshipQueryInputs struct {

	// Project indicates to query SubjectRoleRelationship entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

SubjectRoleRelationshipQueryInputs holds the query input of the SubjectRoleRelationship entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*SubjectRoleRelationshipQueryInputs) SetGinContext

func (ic *SubjectRoleRelationshipQueryInputs) SetGinContext(ctx *gin.Context)

func (*SubjectRoleRelationshipQueryInputs) SetModelClient

func (ic *SubjectRoleRelationshipQueryInputs) SetModelClient(cli *Client)

func (*SubjectRoleRelationshipQueryInputs) Validate

func (srrqi *SubjectRoleRelationshipQueryInputs) Validate() error

Validate checks the SubjectRoleRelationshipQueryInputs entity.

func (*SubjectRoleRelationshipQueryInputs) ValidateWith

func (srrqi *SubjectRoleRelationshipQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipQueryInputs entity with the given context and client set.

type SubjectRoleRelationshipSelect

type SubjectRoleRelationshipSelect struct {
	*SubjectRoleRelationshipQuery
	// contains filtered or unexported fields
}

SubjectRoleRelationshipSelect is the builder for selecting fields of SubjectRoleRelationship entities.

func (*SubjectRoleRelationshipSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*SubjectRoleRelationshipSelect) Bool

func (s *SubjectRoleRelationshipSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipSelect) BoolX

func (s *SubjectRoleRelationshipSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubjectRoleRelationshipSelect) Bools

func (s *SubjectRoleRelationshipSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipSelect) BoolsX

func (s *SubjectRoleRelationshipSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (SubjectRoleRelationshipSelect) ExecContext

func (c SubjectRoleRelationshipSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationshipSelect) Float64

func (s *SubjectRoleRelationshipSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipSelect) Float64X

func (s *SubjectRoleRelationshipSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubjectRoleRelationshipSelect) Float64s

func (s *SubjectRoleRelationshipSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipSelect) Float64sX

func (s *SubjectRoleRelationshipSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubjectRoleRelationshipSelect) Int

func (s *SubjectRoleRelationshipSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipSelect) IntX

func (s *SubjectRoleRelationshipSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubjectRoleRelationshipSelect) Ints

func (s *SubjectRoleRelationshipSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipSelect) IntsX

func (s *SubjectRoleRelationshipSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubjectRoleRelationshipSelect) Modify

func (srrs *SubjectRoleRelationshipSelect) Modify(modifiers ...func(s *sql.Selector)) *SubjectRoleRelationshipSelect

Modify adds a query modifier for attaching custom logic to queries.

func (SubjectRoleRelationshipSelect) QueryContext

func (c SubjectRoleRelationshipSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationshipSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*SubjectRoleRelationshipSelect) ScanX

func (s *SubjectRoleRelationshipSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubjectRoleRelationshipSelect) String

func (s *SubjectRoleRelationshipSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipSelect) StringX

func (s *SubjectRoleRelationshipSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubjectRoleRelationshipSelect) Strings

func (s *SubjectRoleRelationshipSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubjectRoleRelationshipSelect) StringsX

func (s *SubjectRoleRelationshipSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubjectRoleRelationshipUpdate

type SubjectRoleRelationshipUpdate struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipUpdate is the builder for updating SubjectRoleRelationship entities.

func (*SubjectRoleRelationshipUpdate) Exec

Exec executes the query.

func (*SubjectRoleRelationshipUpdate) ExecContext

func (c *SubjectRoleRelationshipUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationshipUpdate) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SubjectRoleRelationshipUpdate) Modify

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SubjectRoleRelationshipUpdate) Mutation

Mutation returns the SubjectRoleRelationshipMutation object of the builder.

func (*SubjectRoleRelationshipUpdate) QueryContext

func (c *SubjectRoleRelationshipUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationshipUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*SubjectRoleRelationshipUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*SubjectRoleRelationshipUpdate) Where

Where appends a list predicates to the SubjectRoleRelationshipUpdate builder.

type SubjectRoleRelationshipUpdateInput

type SubjectRoleRelationshipUpdateInput struct {
	SubjectRoleRelationshipQueryInput `path:",inline" query:"-" json:"-"`

	// Subject indicates replacing the stale Subject entity.
	Subject *SubjectQueryInput `uri:"-" query:"-" json:"subject"`
	// Role indicates replacing the stale Role entity.
	Role *RoleQueryInput `uri:"-" query:"-" json:"role"`
}

SubjectRoleRelationshipUpdateInput holds the modification input of the SubjectRoleRelationship entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectRoleRelationshipUpdateInput) Model

Model returns the SubjectRoleRelationship entity for modifying, after validating.

func (*SubjectRoleRelationshipUpdateInput) SetGinContext

func (ic *SubjectRoleRelationshipUpdateInput) SetGinContext(ctx *gin.Context)

func (*SubjectRoleRelationshipUpdateInput) SetModelClient

func (ic *SubjectRoleRelationshipUpdateInput) SetModelClient(cli *Client)

func (*SubjectRoleRelationshipUpdateInput) Validate

func (srrui *SubjectRoleRelationshipUpdateInput) Validate() error

Validate checks the SubjectRoleRelationshipUpdateInput entity.

func (*SubjectRoleRelationshipUpdateInput) ValidateWith

func (srrui *SubjectRoleRelationshipUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipUpdateInput entity with the given context and client set.

type SubjectRoleRelationshipUpdateInputs

type SubjectRoleRelationshipUpdateInputs struct {

	// Project indicates to update SubjectRoleRelationship entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*SubjectRoleRelationshipUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

SubjectRoleRelationshipUpdateInputs holds the modification input of the SubjectRoleRelationship entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectRoleRelationshipUpdateInputs) IDs

IDs returns the ID list of the SubjectRoleRelationship entities for modifying, after validating.

func (*SubjectRoleRelationshipUpdateInputs) Model

Model returns the SubjectRoleRelationship entities for modifying, after validating.

func (*SubjectRoleRelationshipUpdateInputs) SetGinContext

func (ic *SubjectRoleRelationshipUpdateInputs) SetGinContext(ctx *gin.Context)

func (*SubjectRoleRelationshipUpdateInputs) SetModelClient

func (ic *SubjectRoleRelationshipUpdateInputs) SetModelClient(cli *Client)

func (*SubjectRoleRelationshipUpdateInputs) Validate

func (srrui *SubjectRoleRelationshipUpdateInputs) Validate() error

Validate checks the SubjectRoleRelationshipUpdateInputs entity.

func (*SubjectRoleRelationshipUpdateInputs) ValidateWith

func (srrui *SubjectRoleRelationshipUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipUpdateInputs entity with the given context and client set.

type SubjectRoleRelationshipUpdateInputsItem

type SubjectRoleRelationshipUpdateInputsItem struct {
	// ID of the SubjectRoleRelationship entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Subject indicates replacing the stale Subject entity.
	Subject *SubjectQueryInput `uri:"-" query:"-" json:"subject"`
	// Role indicates replacing the stale Role entity.
	Role *RoleQueryInput `uri:"-" query:"-" json:"role"`
}

SubjectRoleRelationshipUpdateInputs holds the modification input item of the SubjectRoleRelationship entities.

func (*SubjectRoleRelationshipUpdateInputsItem) ValidateWith

func (srrui *SubjectRoleRelationshipUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectRoleRelationshipUpdateInputsItem entity with the given context and client set.

type SubjectRoleRelationshipUpdateOne

type SubjectRoleRelationshipUpdateOne struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipUpdateOne is the builder for updating a single SubjectRoleRelationship entity.

func (*SubjectRoleRelationshipUpdateOne) Exec

Exec executes the query on the entity.

func (*SubjectRoleRelationshipUpdateOne) ExecContext

func (c *SubjectRoleRelationshipUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectRoleRelationshipUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SubjectRoleRelationshipUpdateOne) Modify

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SubjectRoleRelationshipUpdateOne) Mutation

Mutation returns the SubjectRoleRelationshipMutation object of the builder.

func (*SubjectRoleRelationshipUpdateOne) QueryContext

func (c *SubjectRoleRelationshipUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectRoleRelationshipUpdateOne) Save

Save executes the query and returns the updated SubjectRoleRelationship entity.

func (*SubjectRoleRelationshipUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*SubjectRoleRelationshipUpdateOne) 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 (*SubjectRoleRelationshipUpdateOne) Where

Where appends a list predicates to the SubjectRoleRelationshipUpdate builder.

type SubjectRoleRelationshipUpsert

type SubjectRoleRelationshipUpsert struct {
	*sql.UpdateSet
}

SubjectRoleRelationshipUpsert is the "OnConflict" setter.

type SubjectRoleRelationshipUpsertBulk

type SubjectRoleRelationshipUpsertBulk struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipUpsertBulk is the builder for "upsert"-ing a bulk of SubjectRoleRelationship nodes.

func (*SubjectRoleRelationshipUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SubjectRoleRelationshipUpsertBulk) Exec

Exec executes the query.

func (*SubjectRoleRelationshipUpsertBulk) ExecE

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SubjectRoleRelationshipUpsertBulk) ExecEX

ExecEX is like ExecE, but panics if an error occurs.

func (*SubjectRoleRelationshipUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SubjectRoleRelationshipUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SubjectRoleRelationship.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SubjectRoleRelationshipUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the SubjectRoleRelationshipCreateBulk.OnConflict documentation for more info.

func (*SubjectRoleRelationshipUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SubjectRoleRelationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(subjectrolerelationship.FieldID)
		}),
	).
	Exec(ctx)

type SubjectRoleRelationshipUpsertOne

type SubjectRoleRelationshipUpsertOne struct {
	// contains filtered or unexported fields
}

SubjectRoleRelationshipUpsertOne is the builder for "upsert"-ing

one SubjectRoleRelationship node.

func (*SubjectRoleRelationshipUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SubjectRoleRelationshipUpsertOne) Exec

Exec executes the query.

func (*SubjectRoleRelationshipUpsertOne) ExecE

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SubjectRoleRelationshipUpsertOne) ExecEX

ExecEX is like ExecE, but panics if an error occurs.

func (*SubjectRoleRelationshipUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SubjectRoleRelationshipUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SubjectRoleRelationshipUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SubjectRoleRelationshipUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SubjectRoleRelationship.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SubjectRoleRelationshipUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the SubjectRoleRelationshipCreate.OnConflict documentation for more info.

func (*SubjectRoleRelationshipUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.SubjectRoleRelationship.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(subjectrolerelationship.FieldID)
		}),
	).
	Exec(ctx)

type SubjectRoleRelationships

type SubjectRoleRelationships []*SubjectRoleRelationship

SubjectRoleRelationships is a parsable slice of SubjectRoleRelationship.

func (SubjectRoleRelationships) View

View returns the output of SubjectRoleRelationship entities.

type SubjectSelect

type SubjectSelect struct {
	*SubjectQuery
	// contains filtered or unexported fields
}

SubjectSelect is the builder for selecting fields of Subject entities.

func (*SubjectSelect) Aggregate

func (ss *SubjectSelect) Aggregate(fns ...AggregateFunc) *SubjectSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SubjectSelect) Bool

func (s *SubjectSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) BoolX

func (s *SubjectSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubjectSelect) Bools

func (s *SubjectSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) BoolsX

func (s *SubjectSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (SubjectSelect) ExecContext

func (c SubjectSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectSelect) Float64

func (s *SubjectSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) Float64X

func (s *SubjectSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubjectSelect) Float64s

func (s *SubjectSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) Float64sX

func (s *SubjectSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubjectSelect) Int

func (s *SubjectSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) IntX

func (s *SubjectSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubjectSelect) Ints

func (s *SubjectSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) IntsX

func (s *SubjectSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubjectSelect) Modify

func (ss *SubjectSelect) Modify(modifiers ...func(s *sql.Selector)) *SubjectSelect

Modify adds a query modifier for attaching custom logic to queries.

func (SubjectSelect) QueryContext

func (c SubjectSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectSelect) Scan

func (ss *SubjectSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SubjectSelect) ScanX

func (s *SubjectSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubjectSelect) String

func (s *SubjectSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) StringX

func (s *SubjectSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubjectSelect) Strings

func (s *SubjectSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) StringsX

func (s *SubjectSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubjectUpdate

type SubjectUpdate struct {
	// contains filtered or unexported fields
}

SubjectUpdate is the builder for updating Subject entities.

func (*SubjectUpdate) AddRoleIDs

func (su *SubjectUpdate) AddRoleIDs(ids ...object.ID) *SubjectUpdate

AddRoleIDs adds the "roles" edge to the SubjectRoleRelationship entity by IDs.

func (*SubjectUpdate) AddRoles

AddRoles adds the "roles" edges to the SubjectRoleRelationship entity.

func (*SubjectUpdate) AddTokenIDs

func (su *SubjectUpdate) AddTokenIDs(ids ...object.ID) *SubjectUpdate

AddTokenIDs adds the "tokens" edge to the Token entity by IDs.

func (*SubjectUpdate) AddTokens

func (su *SubjectUpdate) AddTokens(t ...*Token) *SubjectUpdate

AddTokens adds the "tokens" edges to the Token entity.

func (*SubjectUpdate) ClearDescription

func (su *SubjectUpdate) ClearDescription() *SubjectUpdate

ClearDescription clears the value of the "description" field.

func (*SubjectUpdate) ClearRoles

func (su *SubjectUpdate) ClearRoles() *SubjectUpdate

ClearRoles clears all "roles" edges to the SubjectRoleRelationship entity.

func (*SubjectUpdate) ClearTokens

func (su *SubjectUpdate) ClearTokens() *SubjectUpdate

ClearTokens clears all "tokens" edges to the Token entity.

func (*SubjectUpdate) Exec

func (su *SubjectUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectUpdate) ExecContext

func (c *SubjectUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectUpdate) ExecX

func (su *SubjectUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectUpdate) Modify

func (su *SubjectUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubjectUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SubjectUpdate) Mutation

func (su *SubjectUpdate) Mutation() *SubjectMutation

Mutation returns the SubjectMutation object of the builder.

func (*SubjectUpdate) QueryContext

func (c *SubjectUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectUpdate) RemoveRoleIDs

func (su *SubjectUpdate) RemoveRoleIDs(ids ...object.ID) *SubjectUpdate

RemoveRoleIDs removes the "roles" edge to SubjectRoleRelationship entities by IDs.

func (*SubjectUpdate) RemoveRoles

func (su *SubjectUpdate) RemoveRoles(s ...*SubjectRoleRelationship) *SubjectUpdate

RemoveRoles removes "roles" edges to SubjectRoleRelationship entities.

func (*SubjectUpdate) RemoveTokenIDs

func (su *SubjectUpdate) RemoveTokenIDs(ids ...object.ID) *SubjectUpdate

RemoveTokenIDs removes the "tokens" edge to Token entities by IDs.

func (*SubjectUpdate) RemoveTokens

func (su *SubjectUpdate) RemoveTokens(t ...*Token) *SubjectUpdate

RemoveTokens removes "tokens" edges to Token entities.

func (*SubjectUpdate) Save

func (su *SubjectUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SubjectUpdate) SaveX

func (su *SubjectUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SubjectUpdate) Set

func (su *SubjectUpdate) Set(obj *Subject) *SubjectUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*SubjectUpdate) SetDescription

func (su *SubjectUpdate) SetDescription(s string) *SubjectUpdate

SetDescription sets the "description" field.

func (*SubjectUpdate) SetNillableDescription

func (su *SubjectUpdate) SetNillableDescription(s *string) *SubjectUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SubjectUpdate) SetUpdateTime

func (su *SubjectUpdate) SetUpdateTime(t time.Time) *SubjectUpdate

SetUpdateTime sets the "update_time" field.

func (*SubjectUpdate) Where

func (su *SubjectUpdate) Where(ps ...predicate.Subject) *SubjectUpdate

Where appends a list predicates to the SubjectUpdate builder.

type SubjectUpdateInput

type SubjectUpdateInput struct {
	SubjectQueryInput `path:",inline" query:"-" json:"-"`

	// The kind of the subject.
	Kind string `path:"-" query:"-" json:"kind,omitempty"`
	// The domain of the subject.
	Domain string `path:"-" query:"-" json:"domain,omitempty"`
	// The name of the subject.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// The detail of the subject.
	Description string `path:"-" query:"-" json:"description,omitempty"`

	// Roles indicates replacing the stale SubjectRoleRelationship entities.
	Roles []*SubjectRoleRelationshipCreateInput `uri:"-" query:"-" json:"roles,omitempty"`
}

SubjectUpdateInput holds the modification input of the Subject entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectUpdateInput) Model

func (sui *SubjectUpdateInput) Model() *Subject

Model returns the Subject entity for modifying, after validating.

func (*SubjectUpdateInput) SetGinContext

func (ic *SubjectUpdateInput) SetGinContext(ctx *gin.Context)

func (*SubjectUpdateInput) SetModelClient

func (ic *SubjectUpdateInput) SetModelClient(cli *Client)

func (*SubjectUpdateInput) Validate

func (sui *SubjectUpdateInput) Validate() error

Validate checks the SubjectUpdateInput entity.

func (*SubjectUpdateInput) ValidateWith

func (sui *SubjectUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectUpdateInput entity with the given context and client set.

type SubjectUpdateInputs

type SubjectUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*SubjectUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

SubjectUpdateInputs holds the modification input of the Subject entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*SubjectUpdateInputs) IDs

func (sui *SubjectUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Subject entities for modifying, after validating.

func (*SubjectUpdateInputs) Model

func (sui *SubjectUpdateInputs) Model() []*Subject

Model returns the Subject entities for modifying, after validating.

func (*SubjectUpdateInputs) SetGinContext

func (ic *SubjectUpdateInputs) SetGinContext(ctx *gin.Context)

func (*SubjectUpdateInputs) SetModelClient

func (ic *SubjectUpdateInputs) SetModelClient(cli *Client)

func (*SubjectUpdateInputs) Validate

func (sui *SubjectUpdateInputs) Validate() error

Validate checks the SubjectUpdateInputs entity.

func (*SubjectUpdateInputs) ValidateWith

func (sui *SubjectUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectUpdateInputs entity with the given context and client set.

type SubjectUpdateInputsItem

type SubjectUpdateInputsItem struct {
	// ID of the Subject entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Kind of the Subject entity, a part of the unique index.
	Kind string `path:"-" query:"-" json:"kind,omitempty"`
	// Domain of the Subject entity, a part of the unique index.
	Domain string `path:"-" query:"-" json:"domain,omitempty"`
	// Name of the Subject entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// The detail of the subject.
	Description string `path:"-" query:"-" json:"description,omitempty"`

	// Roles indicates replacing the stale SubjectRoleRelationship entities.
	Roles []*SubjectRoleRelationshipCreateInput `uri:"-" query:"-" json:"roles,omitempty"`
}

SubjectUpdateInputs holds the modification input item of the Subject entities.

func (*SubjectUpdateInputsItem) ValidateWith

func (sui *SubjectUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the SubjectUpdateInputsItem entity with the given context and client set.

type SubjectUpdateOne

type SubjectUpdateOne struct {
	// contains filtered or unexported fields
}

SubjectUpdateOne is the builder for updating a single Subject entity.

func (*SubjectUpdateOne) AddRoleIDs

func (suo *SubjectUpdateOne) AddRoleIDs(ids ...object.ID) *SubjectUpdateOne

AddRoleIDs adds the "roles" edge to the SubjectRoleRelationship entity by IDs.

func (*SubjectUpdateOne) AddRoles

AddRoles adds the "roles" edges to the SubjectRoleRelationship entity.

func (*SubjectUpdateOne) AddTokenIDs

func (suo *SubjectUpdateOne) AddTokenIDs(ids ...object.ID) *SubjectUpdateOne

AddTokenIDs adds the "tokens" edge to the Token entity by IDs.

func (*SubjectUpdateOne) AddTokens

func (suo *SubjectUpdateOne) AddTokens(t ...*Token) *SubjectUpdateOne

AddTokens adds the "tokens" edges to the Token entity.

func (*SubjectUpdateOne) ClearDescription

func (suo *SubjectUpdateOne) ClearDescription() *SubjectUpdateOne

ClearDescription clears the value of the "description" field.

func (*SubjectUpdateOne) ClearRoles

func (suo *SubjectUpdateOne) ClearRoles() *SubjectUpdateOne

ClearRoles clears all "roles" edges to the SubjectRoleRelationship entity.

func (*SubjectUpdateOne) ClearTokens

func (suo *SubjectUpdateOne) ClearTokens() *SubjectUpdateOne

ClearTokens clears all "tokens" edges to the Token entity.

func (*SubjectUpdateOne) Exec

func (suo *SubjectUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SubjectUpdateOne) ExecContext

func (c *SubjectUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SubjectUpdateOne) ExecE

func (suo *SubjectUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Subject) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*SubjectUpdateOne) ExecEX

func (suo *SubjectUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Subject) error)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectUpdateOne) ExecX

func (suo *SubjectUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectUpdateOne) Modify

func (suo *SubjectUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubjectUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SubjectUpdateOne) Mutation

func (suo *SubjectUpdateOne) Mutation() *SubjectMutation

Mutation returns the SubjectMutation object of the builder.

func (*SubjectUpdateOne) QueryContext

func (c *SubjectUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SubjectUpdateOne) RemoveRoleIDs

func (suo *SubjectUpdateOne) RemoveRoleIDs(ids ...object.ID) *SubjectUpdateOne

RemoveRoleIDs removes the "roles" edge to SubjectRoleRelationship entities by IDs.

func (*SubjectUpdateOne) RemoveRoles

RemoveRoles removes "roles" edges to SubjectRoleRelationship entities.

func (*SubjectUpdateOne) RemoveTokenIDs

func (suo *SubjectUpdateOne) RemoveTokenIDs(ids ...object.ID) *SubjectUpdateOne

RemoveTokenIDs removes the "tokens" edge to Token entities by IDs.

func (*SubjectUpdateOne) RemoveTokens

func (suo *SubjectUpdateOne) RemoveTokens(t ...*Token) *SubjectUpdateOne

RemoveTokens removes "tokens" edges to Token entities.

func (*SubjectUpdateOne) Save

func (suo *SubjectUpdateOne) Save(ctx context.Context) (*Subject, error)

Save executes the query and returns the updated Subject entity.

func (*SubjectUpdateOne) SaveE

func (suo *SubjectUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Subject) error) (*Subject, error)

SaveE calls the given function after updated the Subject entity, which is always good for cascading update operations.

func (*SubjectUpdateOne) SaveEX

func (suo *SubjectUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Subject) error) *Subject

SaveEX is like SaveE, but panics if an error occurs.

func (*SubjectUpdateOne) SaveX

func (suo *SubjectUpdateOne) SaveX(ctx context.Context) *Subject

SaveX is like Save, but panics if an error occurs.

func (*SubjectUpdateOne) Select

func (suo *SubjectUpdateOne) Select(field string, fields ...string) *SubjectUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SubjectUpdateOne) Set

func (suo *SubjectUpdateOne) Set(obj *Subject) *SubjectUpdateOne

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*SubjectUpdateOne) SetDescription

func (suo *SubjectUpdateOne) SetDescription(s string) *SubjectUpdateOne

SetDescription sets the "description" field.

func (*SubjectUpdateOne) SetNillableDescription

func (suo *SubjectUpdateOne) SetNillableDescription(s *string) *SubjectUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SubjectUpdateOne) SetUpdateTime

func (suo *SubjectUpdateOne) SetUpdateTime(t time.Time) *SubjectUpdateOne

SetUpdateTime sets the "update_time" field.

func (*SubjectUpdateOne) Where

Where appends a list predicates to the SubjectUpdate builder.

type SubjectUpsert

type SubjectUpsert struct {
	*sql.UpdateSet
}

SubjectUpsert is the "OnConflict" setter.

func (*SubjectUpsert) ClearDescription

func (u *SubjectUpsert) ClearDescription() *SubjectUpsert

ClearDescription clears the value of the "description" field.

func (*SubjectUpsert) SetDescription

func (u *SubjectUpsert) SetDescription(v string) *SubjectUpsert

SetDescription sets the "description" field.

func (*SubjectUpsert) SetUpdateTime

func (u *SubjectUpsert) SetUpdateTime(v time.Time) *SubjectUpsert

SetUpdateTime sets the "update_time" field.

func (*SubjectUpsert) UpdateDescription

func (u *SubjectUpsert) UpdateDescription() *SubjectUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*SubjectUpsert) UpdateUpdateTime

func (u *SubjectUpsert) UpdateUpdateTime() *SubjectUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type SubjectUpsertBulk

type SubjectUpsertBulk struct {
	// contains filtered or unexported fields
}

SubjectUpsertBulk is the builder for "upsert"-ing a bulk of Subject nodes.

func (*SubjectUpsertBulk) ClearDescription

func (u *SubjectUpsertBulk) ClearDescription() *SubjectUpsertBulk

ClearDescription clears the value of the "description" field.

func (*SubjectUpsertBulk) DoNothing

func (u *SubjectUpsertBulk) DoNothing() *SubjectUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SubjectUpsertBulk) Exec

func (u *SubjectUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectUpsertBulk) ExecE

func (u *SubjectUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Subject) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SubjectUpsertBulk) ExecEX

func (u *SubjectUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Subject) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SubjectUpsertBulk) ExecX

func (u *SubjectUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectUpsertBulk) Ignore

func (u *SubjectUpsertBulk) Ignore() *SubjectUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Subject.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SubjectUpsertBulk) SetDescription

func (u *SubjectUpsertBulk) SetDescription(v string) *SubjectUpsertBulk

SetDescription sets the "description" field.

func (*SubjectUpsertBulk) SetUpdateTime

func (u *SubjectUpsertBulk) SetUpdateTime(v time.Time) *SubjectUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*SubjectUpsertBulk) Update

func (u *SubjectUpsertBulk) Update(set func(*SubjectUpsert)) *SubjectUpsertBulk

Update allows overriding fields `UPDATE` values. See the SubjectCreateBulk.OnConflict documentation for more info.

func (*SubjectUpsertBulk) UpdateDescription

func (u *SubjectUpsertBulk) UpdateDescription() *SubjectUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*SubjectUpsertBulk) UpdateNewValues

func (u *SubjectUpsertBulk) UpdateNewValues() *SubjectUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Subject.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(subject.FieldID)
		}),
	).
	Exec(ctx)

func (*SubjectUpsertBulk) UpdateUpdateTime

func (u *SubjectUpsertBulk) UpdateUpdateTime() *SubjectUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type SubjectUpsertOne

type SubjectUpsertOne struct {
	// contains filtered or unexported fields
}

SubjectUpsertOne is the builder for "upsert"-ing

one Subject node.

func (*SubjectUpsertOne) ClearDescription

func (u *SubjectUpsertOne) ClearDescription() *SubjectUpsertOne

ClearDescription clears the value of the "description" field.

func (*SubjectUpsertOne) DoNothing

func (u *SubjectUpsertOne) DoNothing() *SubjectUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SubjectUpsertOne) Exec

func (u *SubjectUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectUpsertOne) ExecE

func (u *SubjectUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Subject) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*SubjectUpsertOne) ExecEX

func (u *SubjectUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Subject) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*SubjectUpsertOne) ExecX

func (u *SubjectUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectUpsertOne) ID

func (u *SubjectUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SubjectUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SubjectUpsertOne) Ignore

func (u *SubjectUpsertOne) Ignore() *SubjectUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Subject.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SubjectUpsertOne) SetDescription

func (u *SubjectUpsertOne) SetDescription(v string) *SubjectUpsertOne

SetDescription sets the "description" field.

func (*SubjectUpsertOne) SetUpdateTime

func (u *SubjectUpsertOne) SetUpdateTime(v time.Time) *SubjectUpsertOne

SetUpdateTime sets the "update_time" field.

func (*SubjectUpsertOne) Update

func (u *SubjectUpsertOne) Update(set func(*SubjectUpsert)) *SubjectUpsertOne

Update allows overriding fields `UPDATE` values. See the SubjectCreate.OnConflict documentation for more info.

func (*SubjectUpsertOne) UpdateDescription

func (u *SubjectUpsertOne) UpdateDescription() *SubjectUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*SubjectUpsertOne) UpdateNewValues

func (u *SubjectUpsertOne) UpdateNewValues() *SubjectUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Subject.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(subject.FieldID)
		}),
	).
	Exec(ctx)

func (*SubjectUpsertOne) UpdateUpdateTime

func (u *SubjectUpsertOne) UpdateUpdateTime() *SubjectUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Subjects

type Subjects []*Subject

Subjects is a parsable slice of Subject.

func (Subjects) View

func (_ss Subjects) View() []*SubjectOutput

View returns the output of Subject entities.

type Template

type Template struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `json:"status,omitempty"`
	// A URL to an SVG or PNG image to be used as an icon.
	Icon string `json:"icon,omitempty"`
	// Source of the template.
	Source string `json:"source,omitempty"`
	// ID of the template catalog.
	CatalogID object.ID `json:"catalog_id,omitempty"`
	// ID of the project to belong, empty means for all projects.
	ProjectID object.ID `json:"project_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TemplateQuery when eager-loading is set.
	Edges TemplateEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

Template is the model entity for the Template schema.

func (*Template) ExecContext

func (c *Template) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Template) QueryCatalog

func (t *Template) QueryCatalog() *CatalogQuery

QueryCatalog queries the "catalog" edge of the Template entity.

func (*Template) QueryContext

func (c *Template) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Template) QueryProject added in v0.4.0

func (t *Template) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Template entity.

func (*Template) QueryVersions

func (t *Template) QueryVersions() *TemplateVersionQuery

QueryVersions queries the "versions" edge of the Template entity.

func (*Template) String

func (t *Template) String() string

String implements the fmt.Stringer.

func (*Template) Unwrap

func (t *Template) Unwrap() *Template

Unwrap unwraps the Template 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 (*Template) Update

func (t *Template) Update() *TemplateUpdateOne

Update returns a builder for updating this Template. Note that you need to call Template.Unwrap() before calling this method if this Template was returned from a transaction, and the transaction was committed or rolled back.

func (*Template) Value

func (t *Template) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Template. This includes values selected through modifiers, order, etc.

func (*Template) View

func (_t *Template) View() *TemplateOutput

View returns the output of Template entity.

type TemplateClient

type TemplateClient struct {
	// contains filtered or unexported fields
}

TemplateClient is a client for the Template schema.

func NewTemplateClient

func NewTemplateClient(c config) *TemplateClient

NewTemplateClient returns a client for the Template from the given config.

func (*TemplateClient) Create

func (c *TemplateClient) Create() *TemplateCreate

Create returns a builder for creating a Template entity.

func (*TemplateClient) CreateBulk

func (c *TemplateClient) CreateBulk(builders ...*TemplateCreate) *TemplateCreateBulk

CreateBulk returns a builder for creating a bulk of Template entities.

func (*TemplateClient) Delete

func (c *TemplateClient) Delete() *TemplateDelete

Delete returns a delete builder for Template.

func (*TemplateClient) DeleteOne

func (c *TemplateClient) DeleteOne(t *Template) *TemplateDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TemplateClient) DeleteOneID

func (c *TemplateClient) DeleteOneID(id object.ID) *TemplateDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TemplateClient) ExecContext

func (c *TemplateClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateClient) Get

func (c *TemplateClient) Get(ctx context.Context, id object.ID) (*Template, error)

Get returns a Template entity by its id.

func (*TemplateClient) GetX

func (c *TemplateClient) GetX(ctx context.Context, id object.ID) *Template

GetX is like Get, but panics if an error occurs.

func (*TemplateClient) Hooks

func (c *TemplateClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TemplateClient) Intercept

func (c *TemplateClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `template.Intercept(f(g(h())))`.

func (*TemplateClient) Interceptors

func (c *TemplateClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TemplateClient) MapCreateBulk added in v0.5.0

func (c *TemplateClient) MapCreateBulk(slice any, setFunc func(*TemplateCreate, int)) *TemplateCreateBulk

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 (*TemplateClient) Query

func (c *TemplateClient) Query() *TemplateQuery

Query returns a query builder for Template.

func (*TemplateClient) QueryCatalog

func (c *TemplateClient) QueryCatalog(t *Template) *CatalogQuery

QueryCatalog queries the catalog edge of a Template.

func (*TemplateClient) QueryContext

func (c *TemplateClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateClient) QueryProject added in v0.4.0

func (c *TemplateClient) QueryProject(t *Template) *ProjectQuery

QueryProject queries the project edge of a Template.

func (*TemplateClient) QueryVersions

func (c *TemplateClient) QueryVersions(t *Template) *TemplateVersionQuery

QueryVersions queries the versions edge of a Template.

func (*TemplateClient) Update

func (c *TemplateClient) Update() *TemplateUpdate

Update returns an update builder for Template.

func (*TemplateClient) UpdateOne

func (c *TemplateClient) UpdateOne(t *Template) *TemplateUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TemplateClient) UpdateOneID

func (c *TemplateClient) UpdateOneID(id object.ID) *TemplateUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TemplateClient) Use

func (c *TemplateClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `template.Hooks(f(g(h())))`.

type TemplateClientGetter

type TemplateClientGetter interface {
	// Templates returns the client for interacting with the Template builders.
	Templates() *TemplateClient
}

TemplateClientGetter is an interface that allows getting TemplateClient.

type TemplateCreate

type TemplateCreate struct {
	// contains filtered or unexported fields
}

TemplateCreate is the builder for creating a Template entity.

func (*TemplateCreate) AddVersionIDs

func (tc *TemplateCreate) AddVersionIDs(ids ...object.ID) *TemplateCreate

AddVersionIDs adds the "versions" edge to the TemplateVersion entity by IDs.

func (*TemplateCreate) AddVersions

func (tc *TemplateCreate) AddVersions(t ...*TemplateVersion) *TemplateCreate

AddVersions adds the "versions" edges to the TemplateVersion entity.

func (*TemplateCreate) Exec

func (tc *TemplateCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TemplateCreate) ExecContext

func (c *TemplateCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateCreate) ExecE

func (tc *TemplateCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Template) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TemplateCreate) ExecEX

func (tc *TemplateCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Template) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TemplateCreate) ExecX

func (tc *TemplateCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateCreate) Mutation

func (tc *TemplateCreate) Mutation() *TemplateMutation

Mutation returns the TemplateMutation object of the builder.

func (*TemplateCreate) OnConflict

func (tc *TemplateCreate) OnConflict(opts ...sql.ConflictOption) *TemplateUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Template.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TemplateUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*TemplateCreate) OnConflictColumns

func (tc *TemplateCreate) OnConflictColumns(columns ...string) *TemplateUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Template.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TemplateCreate) QueryContext

func (c *TemplateCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateCreate) Save

func (tc *TemplateCreate) Save(ctx context.Context) (*Template, error)

Save creates the Template in the database.

func (*TemplateCreate) SaveE

func (tc *TemplateCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Template) error) (*Template, error)

SaveE calls the given function after created the Template entity, which is always good for cascading create operations.

func (*TemplateCreate) SaveEX

func (tc *TemplateCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Template) error) *Template

SaveEX is like SaveE, but panics if an error occurs.

func (*TemplateCreate) SaveX

func (tc *TemplateCreate) SaveX(ctx context.Context) *Template

SaveX calls Save and panics if Save returns an error.

func (*TemplateCreate) Set

func (tc *TemplateCreate) Set(obj *Template) *TemplateCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*TemplateCreate) SetCatalog

func (tc *TemplateCreate) SetCatalog(c *Catalog) *TemplateCreate

SetCatalog sets the "catalog" edge to the Catalog entity.

func (*TemplateCreate) SetCatalogID

func (tc *TemplateCreate) SetCatalogID(o object.ID) *TemplateCreate

SetCatalogID sets the "catalog_id" field.

func (*TemplateCreate) SetCreateTime

func (tc *TemplateCreate) SetCreateTime(t time.Time) *TemplateCreate

SetCreateTime sets the "create_time" field.

func (*TemplateCreate) SetDescription

func (tc *TemplateCreate) SetDescription(s string) *TemplateCreate

SetDescription sets the "description" field.

func (*TemplateCreate) SetID

func (tc *TemplateCreate) SetID(o object.ID) *TemplateCreate

SetID sets the "id" field.

func (*TemplateCreate) SetIcon

func (tc *TemplateCreate) SetIcon(s string) *TemplateCreate

SetIcon sets the "icon" field.

func (*TemplateCreate) SetLabels

func (tc *TemplateCreate) SetLabels(m map[string]string) *TemplateCreate

SetLabels sets the "labels" field.

func (*TemplateCreate) SetName

func (tc *TemplateCreate) SetName(s string) *TemplateCreate

SetName sets the "name" field.

func (*TemplateCreate) SetNillableCatalogID

func (tc *TemplateCreate) SetNillableCatalogID(o *object.ID) *TemplateCreate

SetNillableCatalogID sets the "catalog_id" field if the given value is not nil.

func (*TemplateCreate) SetNillableCreateTime

func (tc *TemplateCreate) SetNillableCreateTime(t *time.Time) *TemplateCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*TemplateCreate) SetNillableDescription

func (tc *TemplateCreate) SetNillableDescription(s *string) *TemplateCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*TemplateCreate) SetNillableIcon

func (tc *TemplateCreate) SetNillableIcon(s *string) *TemplateCreate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*TemplateCreate) SetNillableProjectID added in v0.4.0

func (tc *TemplateCreate) SetNillableProjectID(o *object.ID) *TemplateCreate

SetNillableProjectID sets the "project_id" field if the given value is not nil.

func (*TemplateCreate) SetNillableStatus

func (tc *TemplateCreate) SetNillableStatus(s *status.Status) *TemplateCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*TemplateCreate) SetNillableUpdateTime

func (tc *TemplateCreate) SetNillableUpdateTime(t *time.Time) *TemplateCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*TemplateCreate) SetProject added in v0.4.0

func (tc *TemplateCreate) SetProject(p *Project) *TemplateCreate

SetProject sets the "project" edge to the Project entity.

func (*TemplateCreate) SetProjectID added in v0.4.0

func (tc *TemplateCreate) SetProjectID(o object.ID) *TemplateCreate

SetProjectID sets the "project_id" field.

func (*TemplateCreate) SetSource

func (tc *TemplateCreate) SetSource(s string) *TemplateCreate

SetSource sets the "source" field.

func (*TemplateCreate) SetStatus

func (tc *TemplateCreate) SetStatus(s status.Status) *TemplateCreate

SetStatus sets the "status" field.

func (*TemplateCreate) SetUpdateTime

func (tc *TemplateCreate) SetUpdateTime(t time.Time) *TemplateCreate

SetUpdateTime sets the "update_time" field.

type TemplateCreateBulk

type TemplateCreateBulk struct {
	// contains filtered or unexported fields
}

TemplateCreateBulk is the builder for creating many Template entities in bulk.

func (*TemplateCreateBulk) Exec

func (tcb *TemplateCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TemplateCreateBulk) ExecContext

func (c *TemplateCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateCreateBulk) ExecE

func (tcb *TemplateCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Template) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TemplateCreateBulk) ExecEX

func (tcb *TemplateCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Template) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TemplateCreateBulk) ExecX

func (tcb *TemplateCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateCreateBulk) OnConflict

func (tcb *TemplateCreateBulk) OnConflict(opts ...sql.ConflictOption) *TemplateUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Template.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TemplateUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*TemplateCreateBulk) OnConflictColumns

func (tcb *TemplateCreateBulk) OnConflictColumns(columns ...string) *TemplateUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Template.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TemplateCreateBulk) QueryContext

func (c *TemplateCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateCreateBulk) Save

func (tcb *TemplateCreateBulk) Save(ctx context.Context) ([]*Template, error)

Save creates the Template entities in the database.

func (*TemplateCreateBulk) SaveE

func (tcb *TemplateCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Template) error) ([]*Template, error)

SaveE calls the given function after created the Template entities, which is always good for cascading create operations.

func (*TemplateCreateBulk) SaveEX

func (tcb *TemplateCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Template) error) []*Template

SaveEX is like SaveE, but panics if an error occurs.

func (*TemplateCreateBulk) SaveX

func (tcb *TemplateCreateBulk) SaveX(ctx context.Context) []*Template

SaveX is like Save, but panics if an error occurs.

func (*TemplateCreateBulk) Set

func (tcb *TemplateCreateBulk) Set(objs ...*Template) *TemplateCreateBulk

Set leverages the TemplateCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type TemplateCreateInput

type TemplateCreateInput struct {

	// Project indicates to create Template entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Source of the template.
	Source string `path:"-" query:"-" json:"source"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// contains filtered or unexported fields
}

TemplateCreateInput holds the creation input of the Template entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateCreateInput) Model

func (tci *TemplateCreateInput) Model() *Template

Model returns the Template entity for creating, after validating.

func (*TemplateCreateInput) SetGinContext

func (ic *TemplateCreateInput) SetGinContext(ctx *gin.Context)

func (*TemplateCreateInput) SetModelClient

func (ic *TemplateCreateInput) SetModelClient(cli *Client)

func (*TemplateCreateInput) Validate

func (tci *TemplateCreateInput) Validate() error

Validate checks the TemplateCreateInput entity.

func (*TemplateCreateInput) ValidateWith

func (tci *TemplateCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateCreateInput entity with the given context and client set.

type TemplateCreateInputs

type TemplateCreateInputs struct {

	// Project indicates to create Template entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*TemplateCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

TemplateCreateInputs holds the creation input of the Template entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateCreateInputs) Model

func (tci *TemplateCreateInputs) Model() []*Template

Model returns the Template entities for creating, after validating.

func (*TemplateCreateInputs) SetGinContext

func (ic *TemplateCreateInputs) SetGinContext(ctx *gin.Context)

func (*TemplateCreateInputs) SetModelClient

func (ic *TemplateCreateInputs) SetModelClient(cli *Client)

func (*TemplateCreateInputs) Validate

func (tci *TemplateCreateInputs) Validate() error

Validate checks the TemplateCreateInputs entity .

func (*TemplateCreateInputs) ValidateWith

func (tci *TemplateCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateCreateInputs entity with the given context and client set.

type TemplateCreateInputsItem

type TemplateCreateInputsItem struct {
	// Source of the template.
	Source string `path:"-" query:"-" json:"source"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
}

TemplateCreateInputs holds the creation input item of the Template entities.

func (*TemplateCreateInputsItem) ValidateWith

func (tci *TemplateCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateCreateInputsItem entity with the given context and client set.

type TemplateDelete

type TemplateDelete struct {
	// contains filtered or unexported fields
}

TemplateDelete is the builder for deleting a Template entity.

func (*TemplateDelete) Exec

func (td *TemplateDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TemplateDelete) ExecContext

func (c *TemplateDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateDelete) ExecX

func (td *TemplateDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TemplateDelete) QueryContext

func (c *TemplateDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateDelete) Where

func (td *TemplateDelete) Where(ps ...predicate.Template) *TemplateDelete

Where appends a list predicates to the TemplateDelete builder.

type TemplateDeleteInput

type TemplateDeleteInput struct {
	TemplateQueryInput `path:",inline"`
}

TemplateDeleteInput holds the deletion input of the Template entity, please tags with `path:",inline"` if embedding.

func (*TemplateDeleteInput) SetGinContext

func (ic *TemplateDeleteInput) SetGinContext(ctx *gin.Context)

func (*TemplateDeleteInput) SetModelClient

func (ic *TemplateDeleteInput) SetModelClient(cli *Client)

type TemplateDeleteInputs

type TemplateDeleteInputs struct {

	// Project indicates to delete Template entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*TemplateDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

TemplateDeleteInputs holds the deletion input of the Template entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateDeleteInputs) IDs

func (tdi *TemplateDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Template entities for deleting, after validating.

func (*TemplateDeleteInputs) Model

func (tdi *TemplateDeleteInputs) Model() []*Template

Model returns the Template entities for deleting, after validating.

func (*TemplateDeleteInputs) SetGinContext

func (ic *TemplateDeleteInputs) SetGinContext(ctx *gin.Context)

func (*TemplateDeleteInputs) SetModelClient

func (ic *TemplateDeleteInputs) SetModelClient(cli *Client)

func (*TemplateDeleteInputs) Validate

func (tdi *TemplateDeleteInputs) Validate() error

Validate checks the TemplateDeleteInputs entity.

func (*TemplateDeleteInputs) ValidateWith

func (tdi *TemplateDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateDeleteInputs entity with the given context and client set.

type TemplateDeleteInputsItem

type TemplateDeleteInputsItem struct {
	// ID of the Template entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Template entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

TemplateDeleteInputs holds the deletion input item of the Template entities.

type TemplateDeleteOne

type TemplateDeleteOne struct {
	// contains filtered or unexported fields
}

TemplateDeleteOne is the builder for deleting a single Template entity.

func (*TemplateDeleteOne) Exec

func (tdo *TemplateDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TemplateDeleteOne) ExecX

func (tdo *TemplateDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateDeleteOne) Where

Where appends a list predicates to the TemplateDelete builder.

type TemplateEdges

type TemplateEdges struct {
	// Versions that belong to the template.
	Versions []*TemplateVersion `json:"versions,omitempty"`
	// Catalog to which the template belongs.
	Catalog *Catalog `json:"catalog,omitempty"`
	// Project to which the template belongs.
	Project *Project `json:"project,omitempty"`
	// contains filtered or unexported fields
}

TemplateEdges holds the relations/edges for other nodes in the graph.

func (TemplateEdges) CatalogOrErr

func (e TemplateEdges) CatalogOrErr() (*Catalog, error)

CatalogOrErr returns the Catalog value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TemplateEdges) ProjectOrErr added in v0.4.0

func (e TemplateEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TemplateEdges) VersionsOrErr

func (e TemplateEdges) VersionsOrErr() ([]*TemplateVersion, error)

VersionsOrErr returns the Versions value or an error if the edge was not loaded in eager-loading.

type TemplateGroupBy

type TemplateGroupBy struct {
	// contains filtered or unexported fields
}

TemplateGroupBy is the group-by builder for Template entities.

func (*TemplateGroupBy) Aggregate

func (tgb *TemplateGroupBy) Aggregate(fns ...AggregateFunc) *TemplateGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TemplateGroupBy) Bool

func (s *TemplateGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TemplateGroupBy) BoolX

func (s *TemplateGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TemplateGroupBy) Bools

func (s *TemplateGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TemplateGroupBy) BoolsX

func (s *TemplateGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TemplateGroupBy) Float64

func (s *TemplateGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TemplateGroupBy) Float64X

func (s *TemplateGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TemplateGroupBy) Float64s

func (s *TemplateGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TemplateGroupBy) Float64sX

func (s *TemplateGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TemplateGroupBy) Int

func (s *TemplateGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TemplateGroupBy) IntX

func (s *TemplateGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TemplateGroupBy) Ints

func (s *TemplateGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TemplateGroupBy) IntsX

func (s *TemplateGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TemplateGroupBy) Scan

func (tgb *TemplateGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TemplateGroupBy) ScanX

func (s *TemplateGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TemplateGroupBy) String

func (s *TemplateGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TemplateGroupBy) StringX

func (s *TemplateGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TemplateGroupBy) Strings

func (s *TemplateGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TemplateGroupBy) StringsX

func (s *TemplateGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TemplateMutation

type TemplateMutation struct {
	// contains filtered or unexported fields
}

TemplateMutation represents an operation that mutates the Template nodes in the graph.

func (*TemplateMutation) AddField

func (m *TemplateMutation) 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 (*TemplateMutation) AddVersionIDs

func (m *TemplateMutation) AddVersionIDs(ids ...object.ID)

AddVersionIDs adds the "versions" edge to the TemplateVersion entity by ids.

func (*TemplateMutation) AddedEdges

func (m *TemplateMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TemplateMutation) AddedField

func (m *TemplateMutation) 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 (*TemplateMutation) AddedFields

func (m *TemplateMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TemplateMutation) AddedIDs

func (m *TemplateMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TemplateMutation) CatalogCleared

func (m *TemplateMutation) CatalogCleared() bool

CatalogCleared reports if the "catalog" edge to the Catalog entity was cleared.

func (*TemplateMutation) CatalogID

func (m *TemplateMutation) CatalogID() (r object.ID, exists bool)

CatalogID returns the value of the "catalog_id" field in the mutation.

func (*TemplateMutation) CatalogIDCleared

func (m *TemplateMutation) CatalogIDCleared() bool

CatalogIDCleared returns if the "catalog_id" field was cleared in this mutation.

func (*TemplateMutation) CatalogIDs

func (m *TemplateMutation) CatalogIDs() (ids []object.ID)

CatalogIDs returns the "catalog" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CatalogID instead. It exists only for internal usage by the builders.

func (*TemplateMutation) ClearCatalog

func (m *TemplateMutation) ClearCatalog()

ClearCatalog clears the "catalog" edge to the Catalog entity.

func (*TemplateMutation) ClearCatalogID

func (m *TemplateMutation) ClearCatalogID()

ClearCatalogID clears the value of the "catalog_id" field.

func (*TemplateMutation) ClearDescription

func (m *TemplateMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*TemplateMutation) ClearEdge

func (m *TemplateMutation) 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 (*TemplateMutation) ClearField

func (m *TemplateMutation) 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 (*TemplateMutation) ClearIcon

func (m *TemplateMutation) ClearIcon()

ClearIcon clears the value of the "icon" field.

func (*TemplateMutation) ClearLabels

func (m *TemplateMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*TemplateMutation) ClearProject added in v0.4.0

func (m *TemplateMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*TemplateMutation) ClearProjectID added in v0.4.0

func (m *TemplateMutation) ClearProjectID()

ClearProjectID clears the value of the "project_id" field.

func (*TemplateMutation) ClearStatus

func (m *TemplateMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*TemplateMutation) ClearVersions

func (m *TemplateMutation) ClearVersions()

ClearVersions clears the "versions" edge to the TemplateVersion entity.

func (*TemplateMutation) ClearedEdges

func (m *TemplateMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TemplateMutation) ClearedFields

func (m *TemplateMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TemplateMutation) Client

func (m TemplateMutation) 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 (*TemplateMutation) CreateTime

func (m *TemplateMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*TemplateMutation) Description

func (m *TemplateMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*TemplateMutation) DescriptionCleared

func (m *TemplateMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*TemplateMutation) EdgeCleared

func (m *TemplateMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TemplateMutation) ExecContext

func (c *TemplateMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateMutation) Field

func (m *TemplateMutation) 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 (*TemplateMutation) FieldCleared

func (m *TemplateMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TemplateMutation) Fields

func (m *TemplateMutation) 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 (*TemplateMutation) ID

func (m *TemplateMutation) ID() (id object.ID, 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 (*TemplateMutation) IDs

func (m *TemplateMutation) IDs(ctx context.Context) ([]object.ID, 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 (*TemplateMutation) Icon

func (m *TemplateMutation) Icon() (r string, exists bool)

Icon returns the value of the "icon" field in the mutation.

func (*TemplateMutation) IconCleared

func (m *TemplateMutation) IconCleared() bool

IconCleared returns if the "icon" field was cleared in this mutation.

func (*TemplateMutation) Labels

func (m *TemplateMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*TemplateMutation) LabelsCleared

func (m *TemplateMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*TemplateMutation) Name

func (m *TemplateMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TemplateMutation) OldCatalogID

func (m *TemplateMutation) OldCatalogID(ctx context.Context) (v object.ID, err error)

OldCatalogID returns the old "catalog_id" field's value of the Template entity. If the Template 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 (*TemplateMutation) OldCreateTime

func (m *TemplateMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Template entity. If the Template 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 (*TemplateMutation) OldDescription

func (m *TemplateMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Template entity. If the Template 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 (*TemplateMutation) OldField

func (m *TemplateMutation) 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 (*TemplateMutation) OldIcon

func (m *TemplateMutation) OldIcon(ctx context.Context) (v string, err error)

OldIcon returns the old "icon" field's value of the Template entity. If the Template 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 (*TemplateMutation) OldLabels

func (m *TemplateMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the Template entity. If the Template 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 (*TemplateMutation) OldName

func (m *TemplateMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Template entity. If the Template 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 (*TemplateMutation) OldProjectID added in v0.4.0

func (m *TemplateMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the Template entity. If the Template 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 (*TemplateMutation) OldSource

func (m *TemplateMutation) OldSource(ctx context.Context) (v string, err error)

OldSource returns the old "source" field's value of the Template entity. If the Template 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 (*TemplateMutation) OldStatus

func (m *TemplateMutation) OldStatus(ctx context.Context) (v status.Status, err error)

OldStatus returns the old "status" field's value of the Template entity. If the Template 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 (*TemplateMutation) OldUpdateTime

func (m *TemplateMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Template entity. If the Template 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 (*TemplateMutation) Op

func (m *TemplateMutation) Op() Op

Op returns the operation name.

func (*TemplateMutation) ProjectCleared added in v0.4.0

func (m *TemplateMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*TemplateMutation) ProjectID added in v0.4.0

func (m *TemplateMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*TemplateMutation) ProjectIDCleared added in v0.4.0

func (m *TemplateMutation) ProjectIDCleared() bool

ProjectIDCleared returns if the "project_id" field was cleared in this mutation.

func (*TemplateMutation) ProjectIDs added in v0.4.0

func (m *TemplateMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*TemplateMutation) QueryContext

func (c *TemplateMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateMutation) RemoveVersionIDs

func (m *TemplateMutation) RemoveVersionIDs(ids ...object.ID)

RemoveVersionIDs removes the "versions" edge to the TemplateVersion entity by IDs.

func (*TemplateMutation) RemovedEdges

func (m *TemplateMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TemplateMutation) RemovedIDs

func (m *TemplateMutation) 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 (*TemplateMutation) RemovedVersionsIDs

func (m *TemplateMutation) RemovedVersionsIDs() (ids []object.ID)

RemovedVersions returns the removed IDs of the "versions" edge to the TemplateVersion entity.

func (*TemplateMutation) ResetCatalog

func (m *TemplateMutation) ResetCatalog()

ResetCatalog resets all changes to the "catalog" edge.

func (*TemplateMutation) ResetCatalogID

func (m *TemplateMutation) ResetCatalogID()

ResetCatalogID resets all changes to the "catalog_id" field.

func (*TemplateMutation) ResetCreateTime

func (m *TemplateMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*TemplateMutation) ResetDescription

func (m *TemplateMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*TemplateMutation) ResetEdge

func (m *TemplateMutation) 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 (*TemplateMutation) ResetField

func (m *TemplateMutation) 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 (*TemplateMutation) ResetIcon

func (m *TemplateMutation) ResetIcon()

ResetIcon resets all changes to the "icon" field.

func (*TemplateMutation) ResetLabels

func (m *TemplateMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*TemplateMutation) ResetName

func (m *TemplateMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TemplateMutation) ResetProject added in v0.4.0

func (m *TemplateMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*TemplateMutation) ResetProjectID added in v0.4.0

func (m *TemplateMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*TemplateMutation) ResetSource

func (m *TemplateMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*TemplateMutation) ResetStatus

func (m *TemplateMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*TemplateMutation) ResetUpdateTime

func (m *TemplateMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*TemplateMutation) ResetVersions

func (m *TemplateMutation) ResetVersions()

ResetVersions resets all changes to the "versions" edge.

func (*TemplateMutation) SetCatalogID

func (m *TemplateMutation) SetCatalogID(o object.ID)

SetCatalogID sets the "catalog_id" field.

func (*TemplateMutation) SetCreateTime

func (m *TemplateMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*TemplateMutation) SetDescription

func (m *TemplateMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*TemplateMutation) SetField

func (m *TemplateMutation) 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 (*TemplateMutation) SetID

func (m *TemplateMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Template entities.

func (*TemplateMutation) SetIcon

func (m *TemplateMutation) SetIcon(s string)

SetIcon sets the "icon" field.

func (*TemplateMutation) SetLabels

func (m *TemplateMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*TemplateMutation) SetName

func (m *TemplateMutation) SetName(s string)

SetName sets the "name" field.

func (*TemplateMutation) SetOp

func (m *TemplateMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TemplateMutation) SetProjectID added in v0.4.0

func (m *TemplateMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*TemplateMutation) SetSource

func (m *TemplateMutation) SetSource(s string)

SetSource sets the "source" field.

func (*TemplateMutation) SetStatus

func (m *TemplateMutation) SetStatus(s status.Status)

SetStatus sets the "status" field.

func (*TemplateMutation) SetUpdateTime

func (m *TemplateMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*TemplateMutation) Source

func (m *TemplateMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (*TemplateMutation) Status

func (m *TemplateMutation) Status() (r status.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*TemplateMutation) StatusCleared

func (m *TemplateMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (TemplateMutation) Tx

func (m TemplateMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TemplateMutation) Type

func (m *TemplateMutation) Type() string

Type returns the node type of this mutation (Template).

func (*TemplateMutation) UpdateTime

func (m *TemplateMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*TemplateMutation) VersionsCleared

func (m *TemplateMutation) VersionsCleared() bool

VersionsCleared reports if the "versions" edge to the TemplateVersion entity was cleared.

func (*TemplateMutation) VersionsIDs

func (m *TemplateMutation) VersionsIDs() (ids []object.ID)

VersionsIDs returns the "versions" edge IDs in the mutation.

func (*TemplateMutation) Where

func (m *TemplateMutation) Where(ps ...predicate.Template)

Where appends a list predicates to the TemplateMutation builder.

func (*TemplateMutation) WhereP

func (m *TemplateMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TemplateMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TemplateOutput

type TemplateOutput struct {
	ID          object.ID         `json:"id,omitempty"`
	Name        string            `json:"name,omitempty"`
	Description string            `json:"description,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	CreateTime  *time.Time        `json:"createTime,omitempty"`
	UpdateTime  *time.Time        `json:"updateTime,omitempty"`
	Status      status.Status     `json:"status,omitempty"`
	Icon        string            `json:"icon,omitempty"`
	Source      string            `json:"source,omitempty"`

	Catalog *CatalogOutput `json:"catalog,omitempty"`
	Project *ProjectOutput `json:"project,omitempty"`
}

TemplateOutput holds the output of the Template entity.

func ExposeTemplate

func ExposeTemplate(_t *Template) *TemplateOutput

ExposeTemplate converts the Template to TemplateOutput.

func ExposeTemplates

func ExposeTemplates(_ts []*Template) []*TemplateOutput

ExposeTemplates converts the Template slice to TemplateOutput pointer slice.

type TemplatePatchInput added in v0.5.0

type TemplatePatchInput struct {
	TemplateQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `path:"-" query:"-" json:"status,omitempty"`
	// A URL to an SVG or PNG image to be used as an icon.
	Icon string `path:"-" query:"-" json:"icon,omitempty"`
	// Source of the template.
	Source string `path:"-" query:"-" json:"source,omitempty"`
	// contains filtered or unexported fields
}

TemplatePatchInput holds the patch input of the Template entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplatePatchInput) Model added in v0.5.0

func (tpi *TemplatePatchInput) Model() *Template

Model returns the Template patched entity, after validating.

func (*TemplatePatchInput) PatchModel added in v0.5.0

func (tpi *TemplatePatchInput) PatchModel() *Template

PatchModel returns the Template partition entity for patching.

func (*TemplatePatchInput) SetGinContext added in v0.5.0

func (ic *TemplatePatchInput) SetGinContext(ctx *gin.Context)

func (*TemplatePatchInput) SetModelClient added in v0.5.0

func (ic *TemplatePatchInput) SetModelClient(cli *Client)

func (*TemplatePatchInput) Validate added in v0.5.0

func (tpi *TemplatePatchInput) Validate() error

Validate checks the TemplatePatchInput entity.

func (*TemplatePatchInput) ValidateWith added in v0.5.0

func (tpi *TemplatePatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplatePatchInput entity with the given context and client set.

type TemplateQuery

type TemplateQuery struct {
	// contains filtered or unexported fields
}

TemplateQuery is the builder for querying Template entities.

func (*TemplateQuery) Aggregate

func (tq *TemplateQuery) Aggregate(fns ...AggregateFunc) *TemplateSelect

Aggregate returns a TemplateSelect configured with the given aggregations.

func (*TemplateQuery) All

func (tq *TemplateQuery) All(ctx context.Context) ([]*Template, error)

All executes the query and returns a list of Templates.

func (*TemplateQuery) AllX

func (tq *TemplateQuery) AllX(ctx context.Context) []*Template

AllX is like All, but panics if an error occurs.

func (*TemplateQuery) Clone

func (tq *TemplateQuery) Clone() *TemplateQuery

Clone returns a duplicate of the TemplateQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TemplateQuery) Count

func (tq *TemplateQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TemplateQuery) CountX

func (tq *TemplateQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TemplateQuery) ExecContext

func (c *TemplateQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateQuery) Exist

func (tq *TemplateQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TemplateQuery) ExistX

func (tq *TemplateQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TemplateQuery) First

func (tq *TemplateQuery) First(ctx context.Context) (*Template, error)

First returns the first Template entity from the query. Returns a *NotFoundError when no Template was found.

func (*TemplateQuery) FirstID

func (tq *TemplateQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Template ID from the query. Returns a *NotFoundError when no Template ID was found.

func (*TemplateQuery) FirstIDX

func (tq *TemplateQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TemplateQuery) FirstX

func (tq *TemplateQuery) FirstX(ctx context.Context) *Template

FirstX is like First, but panics if an error occurs.

func (*TemplateQuery) ForShare

func (tq *TemplateQuery) ForShare(opts ...sql.LockOption) *TemplateQuery

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 (*TemplateQuery) ForUpdate

func (tq *TemplateQuery) ForUpdate(opts ...sql.LockOption) *TemplateQuery

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 (*TemplateQuery) GroupBy

func (tq *TemplateQuery) GroupBy(field string, fields ...string) *TemplateGroupBy

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.Template.Query().
	GroupBy(template.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*TemplateQuery) IDs

func (tq *TemplateQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Template IDs.

func (*TemplateQuery) IDsX

func (tq *TemplateQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*TemplateQuery) Limit

func (tq *TemplateQuery) Limit(limit int) *TemplateQuery

Limit the number of records to be returned by this query.

func (*TemplateQuery) Modify

func (tq *TemplateQuery) Modify(modifiers ...func(s *sql.Selector)) *TemplateSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TemplateQuery) Offset

func (tq *TemplateQuery) Offset(offset int) *TemplateQuery

Offset to start from.

func (*TemplateQuery) Only

func (tq *TemplateQuery) Only(ctx context.Context) (*Template, error)

Only returns a single Template entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Template entity is found. Returns a *NotFoundError when no Template entities are found.

func (*TemplateQuery) OnlyID

func (tq *TemplateQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only Template ID in the query. Returns a *NotSingularError when more than one Template ID is found. Returns a *NotFoundError when no entities are found.

func (*TemplateQuery) OnlyIDX

func (tq *TemplateQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TemplateQuery) OnlyX

func (tq *TemplateQuery) OnlyX(ctx context.Context) *Template

OnlyX is like Only, but panics if an error occurs.

func (*TemplateQuery) Order

Order specifies how the records should be ordered.

func (*TemplateQuery) QueryCatalog

func (tq *TemplateQuery) QueryCatalog() *CatalogQuery

QueryCatalog chains the current query on the "catalog" edge.

func (*TemplateQuery) QueryContext

func (c *TemplateQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateQuery) QueryProject added in v0.4.0

func (tq *TemplateQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*TemplateQuery) QueryVersions

func (tq *TemplateQuery) QueryVersions() *TemplateVersionQuery

QueryVersions chains the current query on the "versions" edge.

func (*TemplateQuery) Select

func (tq *TemplateQuery) Select(fields ...string) *TemplateSelect

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.Template.Query().
	Select(template.FieldName).
	Scan(ctx, &v)

func (*TemplateQuery) Unique

func (tq *TemplateQuery) Unique(unique bool) *TemplateQuery

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 (*TemplateQuery) Where

func (tq *TemplateQuery) Where(ps ...predicate.Template) *TemplateQuery

Where adds a new predicate for the TemplateQuery builder.

func (*TemplateQuery) WhereP

func (tq *TemplateQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TemplateQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*TemplateQuery) WithCatalog

func (tq *TemplateQuery) WithCatalog(opts ...func(*CatalogQuery)) *TemplateQuery

WithCatalog tells the query-builder to eager-load the nodes that are connected to the "catalog" edge. The optional arguments are used to configure the query builder of the edge.

func (*TemplateQuery) WithProject added in v0.4.0

func (tq *TemplateQuery) WithProject(opts ...func(*ProjectQuery)) *TemplateQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*TemplateQuery) WithVersions

func (tq *TemplateQuery) WithVersions(opts ...func(*TemplateVersionQuery)) *TemplateQuery

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.

type TemplateQueryInput

type TemplateQueryInput struct {

	// Project indicates to query Template entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project,omitempty"`

	// Refer holds the route path reference of the Template entity.
	Refer *object.Refer `path:"template,default=" query:"-" json:"-"`
	// ID of the Template entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Template entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

TemplateQueryInput holds the query input of the Template entity, please tags with `path:",inline"` if embedding.

func (*TemplateQueryInput) Model

func (tqi *TemplateQueryInput) Model() *Template

Model returns the Template entity for querying, after validating.

func (*TemplateQueryInput) SetGinContext

func (ic *TemplateQueryInput) SetGinContext(ctx *gin.Context)

func (*TemplateQueryInput) SetModelClient

func (ic *TemplateQueryInput) SetModelClient(cli *Client)

func (*TemplateQueryInput) Validate

func (tqi *TemplateQueryInput) Validate() error

Validate checks the TemplateQueryInput entity.

func (*TemplateQueryInput) ValidateWith

func (tqi *TemplateQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateQueryInput entity with the given context and client set.

type TemplateQueryInputs

type TemplateQueryInputs struct {

	// Project indicates to query Template entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

TemplateQueryInputs holds the query input of the Template entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*TemplateQueryInputs) SetGinContext

func (ic *TemplateQueryInputs) SetGinContext(ctx *gin.Context)

func (*TemplateQueryInputs) SetModelClient

func (ic *TemplateQueryInputs) SetModelClient(cli *Client)

func (*TemplateQueryInputs) Validate

func (tqi *TemplateQueryInputs) Validate() error

Validate checks the TemplateQueryInputs entity.

func (*TemplateQueryInputs) ValidateWith

func (tqi *TemplateQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateQueryInputs entity with the given context and client set.

type TemplateSelect

type TemplateSelect struct {
	*TemplateQuery
	// contains filtered or unexported fields
}

TemplateSelect is the builder for selecting fields of Template entities.

func (*TemplateSelect) Aggregate

func (ts *TemplateSelect) Aggregate(fns ...AggregateFunc) *TemplateSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TemplateSelect) Bool

func (s *TemplateSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TemplateSelect) BoolX

func (s *TemplateSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TemplateSelect) Bools

func (s *TemplateSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TemplateSelect) BoolsX

func (s *TemplateSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (TemplateSelect) ExecContext

func (c TemplateSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateSelect) Float64

func (s *TemplateSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TemplateSelect) Float64X

func (s *TemplateSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TemplateSelect) Float64s

func (s *TemplateSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TemplateSelect) Float64sX

func (s *TemplateSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TemplateSelect) Int

func (s *TemplateSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TemplateSelect) IntX

func (s *TemplateSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TemplateSelect) Ints

func (s *TemplateSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TemplateSelect) IntsX

func (s *TemplateSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TemplateSelect) Modify

func (ts *TemplateSelect) Modify(modifiers ...func(s *sql.Selector)) *TemplateSelect

Modify adds a query modifier for attaching custom logic to queries.

func (TemplateSelect) QueryContext

func (c TemplateSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateSelect) Scan

func (ts *TemplateSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TemplateSelect) ScanX

func (s *TemplateSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TemplateSelect) String

func (s *TemplateSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TemplateSelect) StringX

func (s *TemplateSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TemplateSelect) Strings

func (s *TemplateSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TemplateSelect) StringsX

func (s *TemplateSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TemplateUpdate

type TemplateUpdate struct {
	// contains filtered or unexported fields
}

TemplateUpdate is the builder for updating Template entities.

func (*TemplateUpdate) AddVersionIDs

func (tu *TemplateUpdate) AddVersionIDs(ids ...object.ID) *TemplateUpdate

AddVersionIDs adds the "versions" edge to the TemplateVersion entity by IDs.

func (*TemplateUpdate) AddVersions

func (tu *TemplateUpdate) AddVersions(t ...*TemplateVersion) *TemplateUpdate

AddVersions adds the "versions" edges to the TemplateVersion entity.

func (*TemplateUpdate) ClearDescription

func (tu *TemplateUpdate) ClearDescription() *TemplateUpdate

ClearDescription clears the value of the "description" field.

func (*TemplateUpdate) ClearIcon

func (tu *TemplateUpdate) ClearIcon() *TemplateUpdate

ClearIcon clears the value of the "icon" field.

func (*TemplateUpdate) ClearLabels

func (tu *TemplateUpdate) ClearLabels() *TemplateUpdate

ClearLabels clears the value of the "labels" field.

func (*TemplateUpdate) ClearStatus

func (tu *TemplateUpdate) ClearStatus() *TemplateUpdate

ClearStatus clears the value of the "status" field.

func (*TemplateUpdate) ClearVersions

func (tu *TemplateUpdate) ClearVersions() *TemplateUpdate

ClearVersions clears all "versions" edges to the TemplateVersion entity.

func (*TemplateUpdate) Exec

func (tu *TemplateUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TemplateUpdate) ExecContext

func (c *TemplateUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateUpdate) ExecX

func (tu *TemplateUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateUpdate) Modify

func (tu *TemplateUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TemplateUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TemplateUpdate) Mutation

func (tu *TemplateUpdate) Mutation() *TemplateMutation

Mutation returns the TemplateMutation object of the builder.

func (*TemplateUpdate) QueryContext

func (c *TemplateUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateUpdate) RemoveVersionIDs

func (tu *TemplateUpdate) RemoveVersionIDs(ids ...object.ID) *TemplateUpdate

RemoveVersionIDs removes the "versions" edge to TemplateVersion entities by IDs.

func (*TemplateUpdate) RemoveVersions

func (tu *TemplateUpdate) RemoveVersions(t ...*TemplateVersion) *TemplateUpdate

RemoveVersions removes "versions" edges to TemplateVersion entities.

func (*TemplateUpdate) Save

func (tu *TemplateUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TemplateUpdate) SaveX

func (tu *TemplateUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TemplateUpdate) Set

func (tu *TemplateUpdate) Set(obj *Template) *TemplateUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*TemplateUpdate) SetDescription

func (tu *TemplateUpdate) SetDescription(s string) *TemplateUpdate

SetDescription sets the "description" field.

func (*TemplateUpdate) SetIcon

func (tu *TemplateUpdate) SetIcon(s string) *TemplateUpdate

SetIcon sets the "icon" field.

func (*TemplateUpdate) SetLabels

func (tu *TemplateUpdate) SetLabels(m map[string]string) *TemplateUpdate

SetLabels sets the "labels" field.

func (*TemplateUpdate) SetNillableDescription

func (tu *TemplateUpdate) SetNillableDescription(s *string) *TemplateUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*TemplateUpdate) SetNillableIcon

func (tu *TemplateUpdate) SetNillableIcon(s *string) *TemplateUpdate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*TemplateUpdate) SetNillableStatus

func (tu *TemplateUpdate) SetNillableStatus(s *status.Status) *TemplateUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*TemplateUpdate) SetStatus

func (tu *TemplateUpdate) SetStatus(s status.Status) *TemplateUpdate

SetStatus sets the "status" field.

func (*TemplateUpdate) SetUpdateTime

func (tu *TemplateUpdate) SetUpdateTime(t time.Time) *TemplateUpdate

SetUpdateTime sets the "update_time" field.

func (*TemplateUpdate) Where

func (tu *TemplateUpdate) Where(ps ...predicate.Template) *TemplateUpdate

Where appends a list predicates to the TemplateUpdate builder.

type TemplateUpdateInput

type TemplateUpdateInput struct {
	TemplateQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
}

TemplateUpdateInput holds the modification input of the Template entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateUpdateInput) Model

func (tui *TemplateUpdateInput) Model() *Template

Model returns the Template entity for modifying, after validating.

func (*TemplateUpdateInput) SetGinContext

func (ic *TemplateUpdateInput) SetGinContext(ctx *gin.Context)

func (*TemplateUpdateInput) SetModelClient

func (ic *TemplateUpdateInput) SetModelClient(cli *Client)

func (*TemplateUpdateInput) Validate

func (tui *TemplateUpdateInput) Validate() error

Validate checks the TemplateUpdateInput entity.

func (*TemplateUpdateInput) ValidateWith

func (tui *TemplateUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateUpdateInput entity with the given context and client set.

type TemplateUpdateInputs

type TemplateUpdateInputs struct {

	// Project indicates to update Template entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*TemplateUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

TemplateUpdateInputs holds the modification input of the Template entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateUpdateInputs) IDs

func (tui *TemplateUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Template entities for modifying, after validating.

func (*TemplateUpdateInputs) Model

func (tui *TemplateUpdateInputs) Model() []*Template

Model returns the Template entities for modifying, after validating.

func (*TemplateUpdateInputs) SetGinContext

func (ic *TemplateUpdateInputs) SetGinContext(ctx *gin.Context)

func (*TemplateUpdateInputs) SetModelClient

func (ic *TemplateUpdateInputs) SetModelClient(cli *Client)

func (*TemplateUpdateInputs) Validate

func (tui *TemplateUpdateInputs) Validate() error

Validate checks the TemplateUpdateInputs entity.

func (*TemplateUpdateInputs) ValidateWith

func (tui *TemplateUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateUpdateInputs entity with the given context and client set.

type TemplateUpdateInputsItem

type TemplateUpdateInputsItem struct {
	// ID of the Template entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Template entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
}

TemplateUpdateInputs holds the modification input item of the Template entities.

func (*TemplateUpdateInputsItem) ValidateWith

func (tui *TemplateUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateUpdateInputsItem entity with the given context and client set.

type TemplateUpdateOne

type TemplateUpdateOne struct {
	// contains filtered or unexported fields
}

TemplateUpdateOne is the builder for updating a single Template entity.

func (*TemplateUpdateOne) AddVersionIDs

func (tuo *TemplateUpdateOne) AddVersionIDs(ids ...object.ID) *TemplateUpdateOne

AddVersionIDs adds the "versions" edge to the TemplateVersion entity by IDs.

func (*TemplateUpdateOne) AddVersions

func (tuo *TemplateUpdateOne) AddVersions(t ...*TemplateVersion) *TemplateUpdateOne

AddVersions adds the "versions" edges to the TemplateVersion entity.

func (*TemplateUpdateOne) ClearDescription

func (tuo *TemplateUpdateOne) ClearDescription() *TemplateUpdateOne

ClearDescription clears the value of the "description" field.

func (*TemplateUpdateOne) ClearIcon

func (tuo *TemplateUpdateOne) ClearIcon() *TemplateUpdateOne

ClearIcon clears the value of the "icon" field.

func (*TemplateUpdateOne) ClearLabels

func (tuo *TemplateUpdateOne) ClearLabels() *TemplateUpdateOne

ClearLabels clears the value of the "labels" field.

func (*TemplateUpdateOne) ClearStatus

func (tuo *TemplateUpdateOne) ClearStatus() *TemplateUpdateOne

ClearStatus clears the value of the "status" field.

func (*TemplateUpdateOne) ClearVersions

func (tuo *TemplateUpdateOne) ClearVersions() *TemplateUpdateOne

ClearVersions clears all "versions" edges to the TemplateVersion entity.

func (*TemplateUpdateOne) Exec

func (tuo *TemplateUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TemplateUpdateOne) ExecContext

func (c *TemplateUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateUpdateOne) ExecE

func (tuo *TemplateUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Template) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*TemplateUpdateOne) ExecEX

func (tuo *TemplateUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Template) error)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateUpdateOne) ExecX

func (tuo *TemplateUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateUpdateOne) Modify

func (tuo *TemplateUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TemplateUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TemplateUpdateOne) Mutation

func (tuo *TemplateUpdateOne) Mutation() *TemplateMutation

Mutation returns the TemplateMutation object of the builder.

func (*TemplateUpdateOne) QueryContext

func (c *TemplateUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateUpdateOne) RemoveVersionIDs

func (tuo *TemplateUpdateOne) RemoveVersionIDs(ids ...object.ID) *TemplateUpdateOne

RemoveVersionIDs removes the "versions" edge to TemplateVersion entities by IDs.

func (*TemplateUpdateOne) RemoveVersions

func (tuo *TemplateUpdateOne) RemoveVersions(t ...*TemplateVersion) *TemplateUpdateOne

RemoveVersions removes "versions" edges to TemplateVersion entities.

func (*TemplateUpdateOne) Save

func (tuo *TemplateUpdateOne) Save(ctx context.Context) (*Template, error)

Save executes the query and returns the updated Template entity.

func (*TemplateUpdateOne) SaveE

func (tuo *TemplateUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Template) error) (*Template, error)

SaveE calls the given function after updated the Template entity, which is always good for cascading update operations.

func (*TemplateUpdateOne) SaveEX

func (tuo *TemplateUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Template) error) *Template

SaveEX is like SaveE, but panics if an error occurs.

func (*TemplateUpdateOne) SaveX

func (tuo *TemplateUpdateOne) SaveX(ctx context.Context) *Template

SaveX is like Save, but panics if an error occurs.

func (*TemplateUpdateOne) Select

func (tuo *TemplateUpdateOne) Select(field string, fields ...string) *TemplateUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TemplateUpdateOne) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*TemplateUpdateOne) SetDescription

func (tuo *TemplateUpdateOne) SetDescription(s string) *TemplateUpdateOne

SetDescription sets the "description" field.

func (*TemplateUpdateOne) SetIcon

func (tuo *TemplateUpdateOne) SetIcon(s string) *TemplateUpdateOne

SetIcon sets the "icon" field.

func (*TemplateUpdateOne) SetLabels

func (tuo *TemplateUpdateOne) SetLabels(m map[string]string) *TemplateUpdateOne

SetLabels sets the "labels" field.

func (*TemplateUpdateOne) SetNillableDescription

func (tuo *TemplateUpdateOne) SetNillableDescription(s *string) *TemplateUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*TemplateUpdateOne) SetNillableIcon

func (tuo *TemplateUpdateOne) SetNillableIcon(s *string) *TemplateUpdateOne

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*TemplateUpdateOne) SetNillableStatus

func (tuo *TemplateUpdateOne) SetNillableStatus(s *status.Status) *TemplateUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*TemplateUpdateOne) SetStatus

func (tuo *TemplateUpdateOne) SetStatus(s status.Status) *TemplateUpdateOne

SetStatus sets the "status" field.

func (*TemplateUpdateOne) SetUpdateTime

func (tuo *TemplateUpdateOne) SetUpdateTime(t time.Time) *TemplateUpdateOne

SetUpdateTime sets the "update_time" field.

func (*TemplateUpdateOne) Where

Where appends a list predicates to the TemplateUpdate builder.

type TemplateUpsert

type TemplateUpsert struct {
	*sql.UpdateSet
}

TemplateUpsert is the "OnConflict" setter.

func (*TemplateUpsert) ClearDescription

func (u *TemplateUpsert) ClearDescription() *TemplateUpsert

ClearDescription clears the value of the "description" field.

func (*TemplateUpsert) ClearIcon

func (u *TemplateUpsert) ClearIcon() *TemplateUpsert

ClearIcon clears the value of the "icon" field.

func (*TemplateUpsert) ClearLabels

func (u *TemplateUpsert) ClearLabels() *TemplateUpsert

ClearLabels clears the value of the "labels" field.

func (*TemplateUpsert) ClearStatus

func (u *TemplateUpsert) ClearStatus() *TemplateUpsert

ClearStatus clears the value of the "status" field.

func (*TemplateUpsert) SetDescription

func (u *TemplateUpsert) SetDescription(v string) *TemplateUpsert

SetDescription sets the "description" field.

func (*TemplateUpsert) SetIcon

func (u *TemplateUpsert) SetIcon(v string) *TemplateUpsert

SetIcon sets the "icon" field.

func (*TemplateUpsert) SetLabels

func (u *TemplateUpsert) SetLabels(v map[string]string) *TemplateUpsert

SetLabels sets the "labels" field.

func (*TemplateUpsert) SetStatus

func (u *TemplateUpsert) SetStatus(v status.Status) *TemplateUpsert

SetStatus sets the "status" field.

func (*TemplateUpsert) SetUpdateTime

func (u *TemplateUpsert) SetUpdateTime(v time.Time) *TemplateUpsert

SetUpdateTime sets the "update_time" field.

func (*TemplateUpsert) UpdateDescription

func (u *TemplateUpsert) UpdateDescription() *TemplateUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*TemplateUpsert) UpdateIcon

func (u *TemplateUpsert) UpdateIcon() *TemplateUpsert

UpdateIcon sets the "icon" field to the value that was provided on create.

func (*TemplateUpsert) UpdateLabels

func (u *TemplateUpsert) UpdateLabels() *TemplateUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*TemplateUpsert) UpdateStatus

func (u *TemplateUpsert) UpdateStatus() *TemplateUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*TemplateUpsert) UpdateUpdateTime

func (u *TemplateUpsert) UpdateUpdateTime() *TemplateUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type TemplateUpsertBulk

type TemplateUpsertBulk struct {
	// contains filtered or unexported fields
}

TemplateUpsertBulk is the builder for "upsert"-ing a bulk of Template nodes.

func (*TemplateUpsertBulk) ClearDescription

func (u *TemplateUpsertBulk) ClearDescription() *TemplateUpsertBulk

ClearDescription clears the value of the "description" field.

func (*TemplateUpsertBulk) ClearIcon

func (u *TemplateUpsertBulk) ClearIcon() *TemplateUpsertBulk

ClearIcon clears the value of the "icon" field.

func (*TemplateUpsertBulk) ClearLabels

func (u *TemplateUpsertBulk) ClearLabels() *TemplateUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*TemplateUpsertBulk) ClearStatus

func (u *TemplateUpsertBulk) ClearStatus() *TemplateUpsertBulk

ClearStatus clears the value of the "status" field.

func (*TemplateUpsertBulk) DoNothing

func (u *TemplateUpsertBulk) DoNothing() *TemplateUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TemplateUpsertBulk) Exec

func (u *TemplateUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TemplateUpsertBulk) ExecE

func (u *TemplateUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Template) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TemplateUpsertBulk) ExecEX

func (u *TemplateUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Template) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TemplateUpsertBulk) ExecX

func (u *TemplateUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Template.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TemplateUpsertBulk) SetDescription

func (u *TemplateUpsertBulk) SetDescription(v string) *TemplateUpsertBulk

SetDescription sets the "description" field.

func (*TemplateUpsertBulk) SetIcon

SetIcon sets the "icon" field.

func (*TemplateUpsertBulk) SetLabels

func (u *TemplateUpsertBulk) SetLabels(v map[string]string) *TemplateUpsertBulk

SetLabels sets the "labels" field.

func (*TemplateUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*TemplateUpsertBulk) SetUpdateTime

func (u *TemplateUpsertBulk) SetUpdateTime(v time.Time) *TemplateUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*TemplateUpsertBulk) Update

func (u *TemplateUpsertBulk) Update(set func(*TemplateUpsert)) *TemplateUpsertBulk

Update allows overriding fields `UPDATE` values. See the TemplateCreateBulk.OnConflict documentation for more info.

func (*TemplateUpsertBulk) UpdateDescription

func (u *TemplateUpsertBulk) UpdateDescription() *TemplateUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*TemplateUpsertBulk) UpdateIcon

func (u *TemplateUpsertBulk) UpdateIcon() *TemplateUpsertBulk

UpdateIcon sets the "icon" field to the value that was provided on create.

func (*TemplateUpsertBulk) UpdateLabels

func (u *TemplateUpsertBulk) UpdateLabels() *TemplateUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*TemplateUpsertBulk) UpdateNewValues

func (u *TemplateUpsertBulk) UpdateNewValues() *TemplateUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Template.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(template.FieldID)
		}),
	).
	Exec(ctx)

func (*TemplateUpsertBulk) UpdateStatus

func (u *TemplateUpsertBulk) UpdateStatus() *TemplateUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*TemplateUpsertBulk) UpdateUpdateTime

func (u *TemplateUpsertBulk) UpdateUpdateTime() *TemplateUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type TemplateUpsertOne

type TemplateUpsertOne struct {
	// contains filtered or unexported fields
}

TemplateUpsertOne is the builder for "upsert"-ing

one Template node.

func (*TemplateUpsertOne) ClearDescription

func (u *TemplateUpsertOne) ClearDescription() *TemplateUpsertOne

ClearDescription clears the value of the "description" field.

func (*TemplateUpsertOne) ClearIcon

func (u *TemplateUpsertOne) ClearIcon() *TemplateUpsertOne

ClearIcon clears the value of the "icon" field.

func (*TemplateUpsertOne) ClearLabels

func (u *TemplateUpsertOne) ClearLabels() *TemplateUpsertOne

ClearLabels clears the value of the "labels" field.

func (*TemplateUpsertOne) ClearStatus

func (u *TemplateUpsertOne) ClearStatus() *TemplateUpsertOne

ClearStatus clears the value of the "status" field.

func (*TemplateUpsertOne) DoNothing

func (u *TemplateUpsertOne) DoNothing() *TemplateUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TemplateUpsertOne) Exec

func (u *TemplateUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*TemplateUpsertOne) ExecE

func (u *TemplateUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Template) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TemplateUpsertOne) ExecEX

func (u *TemplateUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Template) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TemplateUpsertOne) ExecX

func (u *TemplateUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateUpsertOne) ID

func (u *TemplateUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TemplateUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*TemplateUpsertOne) Ignore

func (u *TemplateUpsertOne) Ignore() *TemplateUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Template.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TemplateUpsertOne) SetDescription

func (u *TemplateUpsertOne) SetDescription(v string) *TemplateUpsertOne

SetDescription sets the "description" field.

func (*TemplateUpsertOne) SetIcon

SetIcon sets the "icon" field.

func (*TemplateUpsertOne) SetLabels

func (u *TemplateUpsertOne) SetLabels(v map[string]string) *TemplateUpsertOne

SetLabels sets the "labels" field.

func (*TemplateUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*TemplateUpsertOne) SetUpdateTime

func (u *TemplateUpsertOne) SetUpdateTime(v time.Time) *TemplateUpsertOne

SetUpdateTime sets the "update_time" field.

func (*TemplateUpsertOne) Update

func (u *TemplateUpsertOne) Update(set func(*TemplateUpsert)) *TemplateUpsertOne

Update allows overriding fields `UPDATE` values. See the TemplateCreate.OnConflict documentation for more info.

func (*TemplateUpsertOne) UpdateDescription

func (u *TemplateUpsertOne) UpdateDescription() *TemplateUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*TemplateUpsertOne) UpdateIcon

func (u *TemplateUpsertOne) UpdateIcon() *TemplateUpsertOne

UpdateIcon sets the "icon" field to the value that was provided on create.

func (*TemplateUpsertOne) UpdateLabels

func (u *TemplateUpsertOne) UpdateLabels() *TemplateUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*TemplateUpsertOne) UpdateNewValues

func (u *TemplateUpsertOne) UpdateNewValues() *TemplateUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Template.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(template.FieldID)
		}),
	).
	Exec(ctx)

func (*TemplateUpsertOne) UpdateStatus

func (u *TemplateUpsertOne) UpdateStatus() *TemplateUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*TemplateUpsertOne) UpdateUpdateTime

func (u *TemplateUpsertOne) UpdateUpdateTime() *TemplateUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type TemplateVersion

type TemplateVersion struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// ID of the template.
	TemplateID object.ID `json:"template_id,omitempty"`
	// Name of the template.
	Name string `json:"name,omitempty"`
	// Version of the template.
	Version string `json:"version,omitempty,cli-table-column"`
	// Source of the template.
	Source string `json:"source,omitempty"`
	// Generated schema and data of the template.
	Schema types.TemplateVersionSchema `json:"schema,omitempty"`
	// store the original ui schema of the template.
	OriginalUISchema types.UISchema `json:"original_ui_schema,omitempty"`
	// ui schema of the template.
	UISchema types.UISchema `json:"ui_schema,omitempty"`
	// Default value generated from schema and ui schema
	SchemaDefaultValue []byte `json:"schema_default_value,omitempty"`
	// ID of the project to belong, empty means for all projects.
	ProjectID object.ID `json:"project_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TemplateVersionQuery when eager-loading is set.
	Edges TemplateVersionEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

TemplateVersion is the model entity for the TemplateVersion schema.

func (*TemplateVersion) ExecContext

func (c *TemplateVersion) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersion) QueryContext

func (c *TemplateVersion) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersion) QueryProject added in v0.4.0

func (tv *TemplateVersion) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the TemplateVersion entity.

func (*TemplateVersion) QueryResourceDefinitions added in v0.4.0

func (tv *TemplateVersion) QueryResourceDefinitions() *ResourceDefinitionMatchingRuleQuery

QueryResourceDefinitions queries the "resource_definitions" edge of the TemplateVersion entity.

func (*TemplateVersion) QueryResources added in v0.4.0

func (tv *TemplateVersion) QueryResources() *ResourceQuery

QueryResources queries the "resources" edge of the TemplateVersion entity.

func (*TemplateVersion) QueryTemplate

func (tv *TemplateVersion) QueryTemplate() *TemplateQuery

QueryTemplate queries the "template" edge of the TemplateVersion entity.

func (*TemplateVersion) String

func (tv *TemplateVersion) String() string

String implements the fmt.Stringer.

func (*TemplateVersion) Unwrap

func (tv *TemplateVersion) Unwrap() *TemplateVersion

Unwrap unwraps the TemplateVersion 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 (*TemplateVersion) Update

Update returns a builder for updating this TemplateVersion. Note that you need to call TemplateVersion.Unwrap() before calling this method if this TemplateVersion was returned from a transaction, and the transaction was committed or rolled back.

func (*TemplateVersion) Value

func (tv *TemplateVersion) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TemplateVersion. This includes values selected through modifiers, order, etc.

func (*TemplateVersion) View

View returns the output of TemplateVersion entity.

type TemplateVersionClient

type TemplateVersionClient struct {
	// contains filtered or unexported fields
}

TemplateVersionClient is a client for the TemplateVersion schema.

func NewTemplateVersionClient

func NewTemplateVersionClient(c config) *TemplateVersionClient

NewTemplateVersionClient returns a client for the TemplateVersion from the given config.

func (*TemplateVersionClient) Create

Create returns a builder for creating a TemplateVersion entity.

func (*TemplateVersionClient) CreateBulk

CreateBulk returns a builder for creating a bulk of TemplateVersion entities.

func (*TemplateVersionClient) Delete

Delete returns a delete builder for TemplateVersion.

func (*TemplateVersionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TemplateVersionClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TemplateVersionClient) ExecContext

func (c *TemplateVersionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersionClient) Get

Get returns a TemplateVersion entity by its id.

func (*TemplateVersionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*TemplateVersionClient) Hooks

func (c *TemplateVersionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TemplateVersionClient) Intercept

func (c *TemplateVersionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `templateversion.Intercept(f(g(h())))`.

func (*TemplateVersionClient) Interceptors

func (c *TemplateVersionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TemplateVersionClient) MapCreateBulk added in v0.5.0

func (c *TemplateVersionClient) MapCreateBulk(slice any, setFunc func(*TemplateVersionCreate, int)) *TemplateVersionCreateBulk

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 (*TemplateVersionClient) Query

Query returns a query builder for TemplateVersion.

func (*TemplateVersionClient) QueryContext

func (c *TemplateVersionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersionClient) QueryProject added in v0.4.0

func (c *TemplateVersionClient) QueryProject(tv *TemplateVersion) *ProjectQuery

QueryProject queries the project edge of a TemplateVersion.

func (*TemplateVersionClient) QueryResourceDefinitions added in v0.4.0

QueryResourceDefinitions queries the resource_definitions edge of a TemplateVersion.

func (*TemplateVersionClient) QueryResources added in v0.4.0

func (c *TemplateVersionClient) QueryResources(tv *TemplateVersion) *ResourceQuery

QueryResources queries the resources edge of a TemplateVersion.

func (*TemplateVersionClient) QueryTemplate

func (c *TemplateVersionClient) QueryTemplate(tv *TemplateVersion) *TemplateQuery

QueryTemplate queries the template edge of a TemplateVersion.

func (*TemplateVersionClient) Update

Update returns an update builder for TemplateVersion.

func (*TemplateVersionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TemplateVersionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*TemplateVersionClient) Use

func (c *TemplateVersionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `templateversion.Hooks(f(g(h())))`.

type TemplateVersionClientGetter

type TemplateVersionClientGetter interface {
	// TemplateVersions returns the client for interacting with the TemplateVersion builders.
	TemplateVersions() *TemplateVersionClient
}

TemplateVersionClientGetter is an interface that allows getting TemplateVersionClient.

type TemplateVersionCreate

type TemplateVersionCreate struct {
	// contains filtered or unexported fields
}

TemplateVersionCreate is the builder for creating a TemplateVersion entity.

func (*TemplateVersionCreate) AddResourceDefinitionIDs added in v0.4.0

func (tvc *TemplateVersionCreate) AddResourceDefinitionIDs(ids ...object.ID) *TemplateVersionCreate

AddResourceDefinitionIDs adds the "resource_definitions" edge to the ResourceDefinitionMatchingRule entity by IDs.

func (*TemplateVersionCreate) AddResourceDefinitions added in v0.4.0

AddResourceDefinitions adds the "resource_definitions" edges to the ResourceDefinitionMatchingRule entity.

func (*TemplateVersionCreate) AddResourceIDs added in v0.4.0

func (tvc *TemplateVersionCreate) AddResourceIDs(ids ...object.ID) *TemplateVersionCreate

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*TemplateVersionCreate) AddResources added in v0.4.0

func (tvc *TemplateVersionCreate) AddResources(r ...*Resource) *TemplateVersionCreate

AddResources adds the "resources" edges to the Resource entity.

func (*TemplateVersionCreate) Exec

func (tvc *TemplateVersionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TemplateVersionCreate) ExecContext

func (c *TemplateVersionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersionCreate) ExecE

func (tvc *TemplateVersionCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *TemplateVersion) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TemplateVersionCreate) ExecEX

func (tvc *TemplateVersionCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *TemplateVersion) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TemplateVersionCreate) ExecX

func (tvc *TemplateVersionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateVersionCreate) Mutation

Mutation returns the TemplateVersionMutation object of the builder.

func (*TemplateVersionCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TemplateVersion.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TemplateVersionUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*TemplateVersionCreate) OnConflictColumns

func (tvc *TemplateVersionCreate) OnConflictColumns(columns ...string) *TemplateVersionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TemplateVersion.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TemplateVersionCreate) QueryContext

func (c *TemplateVersionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersionCreate) Save

Save creates the TemplateVersion in the database.

func (*TemplateVersionCreate) SaveE

func (tvc *TemplateVersionCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *TemplateVersion) error) (*TemplateVersion, error)

SaveE calls the given function after created the TemplateVersion entity, which is always good for cascading create operations.

func (*TemplateVersionCreate) SaveEX

func (tvc *TemplateVersionCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *TemplateVersion) error) *TemplateVersion

SaveEX is like SaveE, but panics if an error occurs.

func (*TemplateVersionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*TemplateVersionCreate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*TemplateVersionCreate) SetCreateTime

func (tvc *TemplateVersionCreate) SetCreateTime(t time.Time) *TemplateVersionCreate

SetCreateTime sets the "create_time" field.

func (*TemplateVersionCreate) SetID

SetID sets the "id" field.

func (*TemplateVersionCreate) SetName

SetName sets the "name" field.

func (*TemplateVersionCreate) SetNillableCreateTime

func (tvc *TemplateVersionCreate) SetNillableCreateTime(t *time.Time) *TemplateVersionCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*TemplateVersionCreate) SetNillableOriginalUISchema added in v0.6.0

func (tvc *TemplateVersionCreate) SetNillableOriginalUISchema(ts *types.UISchema) *TemplateVersionCreate

SetNillableOriginalUISchema sets the "original_ui_schema" field if the given value is not nil.

func (*TemplateVersionCreate) SetNillableProjectID added in v0.4.0

func (tvc *TemplateVersionCreate) SetNillableProjectID(o *object.ID) *TemplateVersionCreate

SetNillableProjectID sets the "project_id" field if the given value is not nil.

func (*TemplateVersionCreate) SetNillableSchema added in v0.4.0

SetNillableSchema sets the "schema" field if the given value is not nil.

func (*TemplateVersionCreate) SetNillableUISchema added in v0.6.0

func (tvc *TemplateVersionCreate) SetNillableUISchema(ts *types.UISchema) *TemplateVersionCreate

SetNillableUISchema sets the "ui_schema" field if the given value is not nil.

func (*TemplateVersionCreate) SetNillableUpdateTime

func (tvc *TemplateVersionCreate) SetNillableUpdateTime(t *time.Time) *TemplateVersionCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*TemplateVersionCreate) SetOriginalUISchema added in v0.6.0

func (tvc *TemplateVersionCreate) SetOriginalUISchema(ts types.UISchema) *TemplateVersionCreate

SetOriginalUISchema sets the "original_ui_schema" field.

func (*TemplateVersionCreate) SetProject added in v0.4.0

SetProject sets the "project" edge to the Project entity.

func (*TemplateVersionCreate) SetProjectID added in v0.4.0

func (tvc *TemplateVersionCreate) SetProjectID(o object.ID) *TemplateVersionCreate

SetProjectID sets the "project_id" field.

func (*TemplateVersionCreate) SetSchema

SetSchema sets the "schema" field.

func (*TemplateVersionCreate) SetSchemaDefaultValue added in v0.5.0

func (tvc *TemplateVersionCreate) SetSchemaDefaultValue(b []byte) *TemplateVersionCreate

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*TemplateVersionCreate) SetSource

SetSource sets the "source" field.

func (*TemplateVersionCreate) SetTemplate

SetTemplate sets the "template" edge to the Template entity.

func (*TemplateVersionCreate) SetTemplateID

func (tvc *TemplateVersionCreate) SetTemplateID(o object.ID) *TemplateVersionCreate

SetTemplateID sets the "template_id" field.

func (*TemplateVersionCreate) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*TemplateVersionCreate) SetUpdateTime

func (tvc *TemplateVersionCreate) SetUpdateTime(t time.Time) *TemplateVersionCreate

SetUpdateTime sets the "update_time" field.

func (*TemplateVersionCreate) SetVersion

SetVersion sets the "version" field.

type TemplateVersionCreateBulk

type TemplateVersionCreateBulk struct {
	// contains filtered or unexported fields
}

TemplateVersionCreateBulk is the builder for creating many TemplateVersion entities in bulk.

func (*TemplateVersionCreateBulk) Exec

Exec executes the query.

func (*TemplateVersionCreateBulk) ExecContext

func (c *TemplateVersionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersionCreateBulk) ExecE

func (tvcb *TemplateVersionCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *TemplateVersion) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TemplateVersionCreateBulk) ExecEX

func (tvcb *TemplateVersionCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *TemplateVersion) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TemplateVersionCreateBulk) ExecX

func (tvcb *TemplateVersionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateVersionCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TemplateVersion.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TemplateVersionUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*TemplateVersionCreateBulk) OnConflictColumns

func (tvcb *TemplateVersionCreateBulk) OnConflictColumns(columns ...string) *TemplateVersionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TemplateVersion.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TemplateVersionCreateBulk) QueryContext

func (c *TemplateVersionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersionCreateBulk) Save

Save creates the TemplateVersion entities in the database.

func (*TemplateVersionCreateBulk) SaveE

func (tvcb *TemplateVersionCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *TemplateVersion) error) ([]*TemplateVersion, error)

SaveE calls the given function after created the TemplateVersion entities, which is always good for cascading create operations.

func (*TemplateVersionCreateBulk) SaveEX

func (tvcb *TemplateVersionCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *TemplateVersion) error) []*TemplateVersion

SaveEX is like SaveE, but panics if an error occurs.

func (*TemplateVersionCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

func (*TemplateVersionCreateBulk) Set

Set leverages the TemplateVersionCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type TemplateVersionCreateInput

type TemplateVersionCreateInput struct {

	// Project indicates to create TemplateVersion entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Source of the template.
	Source string `path:"-" query:"-" json:"source"`
	// Version of the template.
	Version string `path:"-" query:"-" json:"version,cli-table-column"`
	// Name of the template.
	Name string `path:"-" query:"-" json:"name"`
	// Generated schema and data of the template.
	Schema types.TemplateVersionSchema `path:"-" query:"-" json:"schema,omitempty"`
	// ui schema of the template.
	UISchema types.UISchema `path:"-" query:"-" json:"uiSchema,omitempty"`
	// contains filtered or unexported fields
}

TemplateVersionCreateInput holds the creation input of the TemplateVersion entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateVersionCreateInput) Model

Model returns the TemplateVersion entity for creating, after validating.

func (*TemplateVersionCreateInput) SetGinContext

func (ic *TemplateVersionCreateInput) SetGinContext(ctx *gin.Context)

func (*TemplateVersionCreateInput) SetModelClient

func (ic *TemplateVersionCreateInput) SetModelClient(cli *Client)

func (*TemplateVersionCreateInput) Validate

func (tvci *TemplateVersionCreateInput) Validate() error

Validate checks the TemplateVersionCreateInput entity.

func (*TemplateVersionCreateInput) ValidateWith

func (tvci *TemplateVersionCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionCreateInput entity with the given context and client set.

type TemplateVersionCreateInputs

type TemplateVersionCreateInputs struct {

	// Project indicates to create TemplateVersion entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*TemplateVersionCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

TemplateVersionCreateInputs holds the creation input of the TemplateVersion entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateVersionCreateInputs) Model

Model returns the TemplateVersion entities for creating, after validating.

func (*TemplateVersionCreateInputs) SetGinContext

func (ic *TemplateVersionCreateInputs) SetGinContext(ctx *gin.Context)

func (*TemplateVersionCreateInputs) SetModelClient

func (ic *TemplateVersionCreateInputs) SetModelClient(cli *Client)

func (*TemplateVersionCreateInputs) Validate

func (tvci *TemplateVersionCreateInputs) Validate() error

Validate checks the TemplateVersionCreateInputs entity .

func (*TemplateVersionCreateInputs) ValidateWith

func (tvci *TemplateVersionCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionCreateInputs entity with the given context and client set.

type TemplateVersionCreateInputsItem

type TemplateVersionCreateInputsItem struct {
	// Source of the template.
	Source string `path:"-" query:"-" json:"source"`
	// Version of the template.
	Version string `path:"-" query:"-" json:"version,cli-table-column"`
	// Name of the template.
	Name string `path:"-" query:"-" json:"name"`
	// Generated schema and data of the template.
	Schema types.TemplateVersionSchema `path:"-" query:"-" json:"schema,omitempty"`
	// ui schema of the template.
	UISchema types.UISchema `path:"-" query:"-" json:"uiSchema,omitempty"`
}

TemplateVersionCreateInputs holds the creation input item of the TemplateVersion entities.

func (*TemplateVersionCreateInputsItem) ValidateWith

func (tvci *TemplateVersionCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionCreateInputsItem entity with the given context and client set.

type TemplateVersionDelete

type TemplateVersionDelete struct {
	// contains filtered or unexported fields
}

TemplateVersionDelete is the builder for deleting a TemplateVersion entity.

func (*TemplateVersionDelete) Exec

func (tvd *TemplateVersionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TemplateVersionDelete) ExecContext

func (c *TemplateVersionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersionDelete) ExecX

func (tvd *TemplateVersionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TemplateVersionDelete) QueryContext

func (c *TemplateVersionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersionDelete) Where

Where appends a list predicates to the TemplateVersionDelete builder.

type TemplateVersionDeleteInput

type TemplateVersionDeleteInput struct {
	TemplateVersionQueryInput `path:",inline"`
}

TemplateVersionDeleteInput holds the deletion input of the TemplateVersion entity, please tags with `path:",inline"` if embedding.

func (*TemplateVersionDeleteInput) SetGinContext

func (ic *TemplateVersionDeleteInput) SetGinContext(ctx *gin.Context)

func (*TemplateVersionDeleteInput) SetModelClient

func (ic *TemplateVersionDeleteInput) SetModelClient(cli *Client)

type TemplateVersionDeleteInputs

type TemplateVersionDeleteInputs struct {

	// Project indicates to delete TemplateVersion entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*TemplateVersionDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

TemplateVersionDeleteInputs holds the deletion input of the TemplateVersion entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateVersionDeleteInputs) IDs

func (tvdi *TemplateVersionDeleteInputs) IDs() []object.ID

IDs returns the ID list of the TemplateVersion entities for deleting, after validating.

func (*TemplateVersionDeleteInputs) Model

Model returns the TemplateVersion entities for deleting, after validating.

func (*TemplateVersionDeleteInputs) SetGinContext

func (ic *TemplateVersionDeleteInputs) SetGinContext(ctx *gin.Context)

func (*TemplateVersionDeleteInputs) SetModelClient

func (ic *TemplateVersionDeleteInputs) SetModelClient(cli *Client)

func (*TemplateVersionDeleteInputs) Validate

func (tvdi *TemplateVersionDeleteInputs) Validate() error

Validate checks the TemplateVersionDeleteInputs entity.

func (*TemplateVersionDeleteInputs) ValidateWith

func (tvdi *TemplateVersionDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionDeleteInputs entity with the given context and client set.

type TemplateVersionDeleteInputsItem

type TemplateVersionDeleteInputsItem struct {
	// ID of the TemplateVersion entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the TemplateVersion entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Version of the TemplateVersion entity, a part of the unique index.
	Version string `path:"-" query:"-" json:"version,omitempty"`
}

TemplateVersionDeleteInputs holds the deletion input item of the TemplateVersion entities.

type TemplateVersionDeleteOne

type TemplateVersionDeleteOne struct {
	// contains filtered or unexported fields
}

TemplateVersionDeleteOne is the builder for deleting a single TemplateVersion entity.

func (*TemplateVersionDeleteOne) Exec

Exec executes the deletion query.

func (*TemplateVersionDeleteOne) ExecX

func (tvdo *TemplateVersionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateVersionDeleteOne) Where

Where appends a list predicates to the TemplateVersionDelete builder.

type TemplateVersionEdges

type TemplateVersionEdges struct {
	// Template to which the template version belongs.
	Template *Template `json:"template,omitempty"`
	// Resources that belong to the template version.
	Resources []*Resource `json:"resources,omitempty"`
	// ResourceDefinitions holds the value of the resource_definitions edge.
	ResourceDefinitions []*ResourceDefinitionMatchingRule `json:"resource_definitions,omitempty"`
	// Project to which the template version belongs.
	Project *Project `json:"project,omitempty"`
	// contains filtered or unexported fields
}

TemplateVersionEdges holds the relations/edges for other nodes in the graph.

func (TemplateVersionEdges) ProjectOrErr added in v0.4.0

func (e TemplateVersionEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TemplateVersionEdges) ResourceDefinitionsOrErr added in v0.4.0

func (e TemplateVersionEdges) ResourceDefinitionsOrErr() ([]*ResourceDefinitionMatchingRule, error)

ResourceDefinitionsOrErr returns the ResourceDefinitions value or an error if the edge was not loaded in eager-loading.

func (TemplateVersionEdges) ResourcesOrErr added in v0.4.0

func (e TemplateVersionEdges) ResourcesOrErr() ([]*Resource, error)

ResourcesOrErr returns the Resources value or an error if the edge was not loaded in eager-loading.

func (TemplateVersionEdges) TemplateOrErr

func (e TemplateVersionEdges) TemplateOrErr() (*Template, error)

TemplateOrErr returns the Template value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TemplateVersionGroupBy

type TemplateVersionGroupBy struct {
	// contains filtered or unexported fields
}

TemplateVersionGroupBy is the group-by builder for TemplateVersion entities.

func (*TemplateVersionGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*TemplateVersionGroupBy) Bool

func (s *TemplateVersionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TemplateVersionGroupBy) BoolX

func (s *TemplateVersionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TemplateVersionGroupBy) Bools

func (s *TemplateVersionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TemplateVersionGroupBy) BoolsX

func (s *TemplateVersionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TemplateVersionGroupBy) Float64

func (s *TemplateVersionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TemplateVersionGroupBy) Float64X

func (s *TemplateVersionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TemplateVersionGroupBy) Float64s

func (s *TemplateVersionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TemplateVersionGroupBy) Float64sX

func (s *TemplateVersionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TemplateVersionGroupBy) Int

func (s *TemplateVersionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TemplateVersionGroupBy) IntX

func (s *TemplateVersionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TemplateVersionGroupBy) Ints

func (s *TemplateVersionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TemplateVersionGroupBy) IntsX

func (s *TemplateVersionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TemplateVersionGroupBy) Scan

func (tvgb *TemplateVersionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TemplateVersionGroupBy) ScanX

func (s *TemplateVersionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TemplateVersionGroupBy) String

func (s *TemplateVersionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TemplateVersionGroupBy) StringX

func (s *TemplateVersionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TemplateVersionGroupBy) Strings

func (s *TemplateVersionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TemplateVersionGroupBy) StringsX

func (s *TemplateVersionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TemplateVersionMutation

type TemplateVersionMutation struct {
	// contains filtered or unexported fields
}

TemplateVersionMutation represents an operation that mutates the TemplateVersion nodes in the graph.

func (*TemplateVersionMutation) AddField

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) AddResourceDefinitionIDs added in v0.4.0

func (m *TemplateVersionMutation) AddResourceDefinitionIDs(ids ...object.ID)

AddResourceDefinitionIDs adds the "resource_definitions" edge to the ResourceDefinitionMatchingRule entity by ids.

func (*TemplateVersionMutation) AddResourceIDs added in v0.4.0

func (m *TemplateVersionMutation) AddResourceIDs(ids ...object.ID)

AddResourceIDs adds the "resources" edge to the Resource entity by ids.

func (*TemplateVersionMutation) AddedEdges

func (m *TemplateVersionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TemplateVersionMutation) AddedField

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) AddedFields

func (m *TemplateVersionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TemplateVersionMutation) AddedIDs

func (m *TemplateVersionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TemplateVersionMutation) ClearEdge

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) ClearField

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) ClearProject added in v0.4.0

func (m *TemplateVersionMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*TemplateVersionMutation) ClearProjectID added in v0.4.0

func (m *TemplateVersionMutation) ClearProjectID()

ClearProjectID clears the value of the "project_id" field.

func (*TemplateVersionMutation) ClearResourceDefinitions added in v0.4.0

func (m *TemplateVersionMutation) ClearResourceDefinitions()

ClearResourceDefinitions clears the "resource_definitions" edge to the ResourceDefinitionMatchingRule entity.

func (*TemplateVersionMutation) ClearResources added in v0.4.0

func (m *TemplateVersionMutation) ClearResources()

ClearResources clears the "resources" edge to the Resource entity.

func (*TemplateVersionMutation) ClearSchemaDefaultValue added in v0.5.0

func (m *TemplateVersionMutation) ClearSchemaDefaultValue()

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*TemplateVersionMutation) ClearTemplate

func (m *TemplateVersionMutation) ClearTemplate()

ClearTemplate clears the "template" edge to the Template entity.

func (*TemplateVersionMutation) ClearedEdges

func (m *TemplateVersionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TemplateVersionMutation) ClearedFields

func (m *TemplateVersionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TemplateVersionMutation) Client

func (m TemplateVersionMutation) 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 (*TemplateVersionMutation) CreateTime

func (m *TemplateVersionMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*TemplateVersionMutation) EdgeCleared

func (m *TemplateVersionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TemplateVersionMutation) ExecContext

func (c *TemplateVersionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersionMutation) Field

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) FieldCleared

func (m *TemplateVersionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TemplateVersionMutation) Fields

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) ID

func (m *TemplateVersionMutation) ID() (id object.ID, 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 (*TemplateVersionMutation) 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 (*TemplateVersionMutation) Name

func (m *TemplateVersionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TemplateVersionMutation) OldCreateTime

func (m *TemplateVersionMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldField

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) OldName

func (m *TemplateVersionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldOriginalUISchema added in v0.6.0

func (m *TemplateVersionMutation) OldOriginalUISchema(ctx context.Context) (v types.UISchema, err error)

OldOriginalUISchema returns the old "original_ui_schema" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldProjectID added in v0.4.0

func (m *TemplateVersionMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldSchema

OldSchema returns the old "schema" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldSchemaDefaultValue added in v0.5.0

func (m *TemplateVersionMutation) OldSchemaDefaultValue(ctx context.Context) (v []byte, err error)

OldSchemaDefaultValue returns the old "schema_default_value" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldSource

func (m *TemplateVersionMutation) OldSource(ctx context.Context) (v string, err error)

OldSource returns the old "source" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldTemplateID

func (m *TemplateVersionMutation) OldTemplateID(ctx context.Context) (v object.ID, err error)

OldTemplateID returns the old "template_id" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldUISchema added in v0.6.0

func (m *TemplateVersionMutation) OldUISchema(ctx context.Context) (v types.UISchema, err error)

OldUISchema returns the old "ui_schema" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldUpdateTime

func (m *TemplateVersionMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) OldVersion

func (m *TemplateVersionMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" field's value of the TemplateVersion entity. If the TemplateVersion 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 (*TemplateVersionMutation) Op

func (m *TemplateVersionMutation) Op() Op

Op returns the operation name.

func (*TemplateVersionMutation) OriginalUISchema added in v0.6.0

func (m *TemplateVersionMutation) OriginalUISchema() (r types.UISchema, exists bool)

OriginalUISchema returns the value of the "original_ui_schema" field in the mutation.

func (*TemplateVersionMutation) ProjectCleared added in v0.4.0

func (m *TemplateVersionMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*TemplateVersionMutation) ProjectID added in v0.4.0

func (m *TemplateVersionMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*TemplateVersionMutation) ProjectIDCleared added in v0.4.0

func (m *TemplateVersionMutation) ProjectIDCleared() bool

ProjectIDCleared returns if the "project_id" field was cleared in this mutation.

func (*TemplateVersionMutation) ProjectIDs added in v0.4.0

func (m *TemplateVersionMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*TemplateVersionMutation) QueryContext

func (c *TemplateVersionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersionMutation) RemoveResourceDefinitionIDs added in v0.4.0

func (m *TemplateVersionMutation) RemoveResourceDefinitionIDs(ids ...object.ID)

RemoveResourceDefinitionIDs removes the "resource_definitions" edge to the ResourceDefinitionMatchingRule entity by IDs.

func (*TemplateVersionMutation) RemoveResourceIDs added in v0.4.0

func (m *TemplateVersionMutation) RemoveResourceIDs(ids ...object.ID)

RemoveResourceIDs removes the "resources" edge to the Resource entity by IDs.

func (*TemplateVersionMutation) RemovedEdges

func (m *TemplateVersionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TemplateVersionMutation) RemovedIDs

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) RemovedResourceDefinitionsIDs added in v0.4.0

func (m *TemplateVersionMutation) RemovedResourceDefinitionsIDs() (ids []object.ID)

RemovedResourceDefinitions returns the removed IDs of the "resource_definitions" edge to the ResourceDefinitionMatchingRule entity.

func (*TemplateVersionMutation) RemovedResourcesIDs added in v0.4.0

func (m *TemplateVersionMutation) RemovedResourcesIDs() (ids []object.ID)

RemovedResources returns the removed IDs of the "resources" edge to the Resource entity.

func (*TemplateVersionMutation) ResetCreateTime

func (m *TemplateVersionMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*TemplateVersionMutation) ResetEdge

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) ResetField

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) ResetName

func (m *TemplateVersionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TemplateVersionMutation) ResetOriginalUISchema added in v0.6.0

func (m *TemplateVersionMutation) ResetOriginalUISchema()

ResetOriginalUISchema resets all changes to the "original_ui_schema" field.

func (*TemplateVersionMutation) ResetProject added in v0.4.0

func (m *TemplateVersionMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*TemplateVersionMutation) ResetProjectID added in v0.4.0

func (m *TemplateVersionMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*TemplateVersionMutation) ResetResourceDefinitions added in v0.4.0

func (m *TemplateVersionMutation) ResetResourceDefinitions()

ResetResourceDefinitions resets all changes to the "resource_definitions" edge.

func (*TemplateVersionMutation) ResetResources added in v0.4.0

func (m *TemplateVersionMutation) ResetResources()

ResetResources resets all changes to the "resources" edge.

func (*TemplateVersionMutation) ResetSchema

func (m *TemplateVersionMutation) ResetSchema()

ResetSchema resets all changes to the "schema" field.

func (*TemplateVersionMutation) ResetSchemaDefaultValue added in v0.5.0

func (m *TemplateVersionMutation) ResetSchemaDefaultValue()

ResetSchemaDefaultValue resets all changes to the "schema_default_value" field.

func (*TemplateVersionMutation) ResetSource

func (m *TemplateVersionMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*TemplateVersionMutation) ResetTemplate

func (m *TemplateVersionMutation) ResetTemplate()

ResetTemplate resets all changes to the "template" edge.

func (*TemplateVersionMutation) ResetTemplateID

func (m *TemplateVersionMutation) ResetTemplateID()

ResetTemplateID resets all changes to the "template_id" field.

func (*TemplateVersionMutation) ResetUISchema added in v0.6.0

func (m *TemplateVersionMutation) ResetUISchema()

ResetUISchema resets all changes to the "ui_schema" field.

func (*TemplateVersionMutation) ResetUpdateTime

func (m *TemplateVersionMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*TemplateVersionMutation) ResetVersion

func (m *TemplateVersionMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*TemplateVersionMutation) ResourceDefinitionsCleared added in v0.4.0

func (m *TemplateVersionMutation) ResourceDefinitionsCleared() bool

ResourceDefinitionsCleared reports if the "resource_definitions" edge to the ResourceDefinitionMatchingRule entity was cleared.

func (*TemplateVersionMutation) ResourceDefinitionsIDs added in v0.4.0

func (m *TemplateVersionMutation) ResourceDefinitionsIDs() (ids []object.ID)

ResourceDefinitionsIDs returns the "resource_definitions" edge IDs in the mutation.

func (*TemplateVersionMutation) ResourcesCleared added in v0.4.0

func (m *TemplateVersionMutation) ResourcesCleared() bool

ResourcesCleared reports if the "resources" edge to the Resource entity was cleared.

func (*TemplateVersionMutation) ResourcesIDs added in v0.4.0

func (m *TemplateVersionMutation) ResourcesIDs() (ids []object.ID)

ResourcesIDs returns the "resources" edge IDs in the mutation.

func (*TemplateVersionMutation) Schema

func (m *TemplateVersionMutation) Schema() (r types.TemplateVersionSchema, exists bool)

Schema returns the value of the "schema" field in the mutation.

func (*TemplateVersionMutation) SchemaDefaultValue added in v0.5.0

func (m *TemplateVersionMutation) SchemaDefaultValue() (r []byte, exists bool)

SchemaDefaultValue returns the value of the "schema_default_value" field in the mutation.

func (*TemplateVersionMutation) SchemaDefaultValueCleared added in v0.5.0

func (m *TemplateVersionMutation) SchemaDefaultValueCleared() bool

SchemaDefaultValueCleared returns if the "schema_default_value" field was cleared in this mutation.

func (*TemplateVersionMutation) SetCreateTime

func (m *TemplateVersionMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*TemplateVersionMutation) SetField

func (m *TemplateVersionMutation) 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 (*TemplateVersionMutation) SetID

func (m *TemplateVersionMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of TemplateVersion entities.

func (*TemplateVersionMutation) SetName

func (m *TemplateVersionMutation) SetName(s string)

SetName sets the "name" field.

func (*TemplateVersionMutation) SetOp

func (m *TemplateVersionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TemplateVersionMutation) SetOriginalUISchema added in v0.6.0

func (m *TemplateVersionMutation) SetOriginalUISchema(ts types.UISchema)

SetOriginalUISchema sets the "original_ui_schema" field.

func (*TemplateVersionMutation) SetProjectID added in v0.4.0

func (m *TemplateVersionMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*TemplateVersionMutation) SetSchema

SetSchema sets the "schema" field.

func (*TemplateVersionMutation) SetSchemaDefaultValue added in v0.5.0

func (m *TemplateVersionMutation) SetSchemaDefaultValue(b []byte)

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*TemplateVersionMutation) SetSource

func (m *TemplateVersionMutation) SetSource(s string)

SetSource sets the "source" field.

func (*TemplateVersionMutation) SetTemplateID

func (m *TemplateVersionMutation) SetTemplateID(o object.ID)

SetTemplateID sets the "template_id" field.

func (*TemplateVersionMutation) SetUISchema added in v0.6.0

func (m *TemplateVersionMutation) SetUISchema(ts types.UISchema)

SetUISchema sets the "ui_schema" field.

func (*TemplateVersionMutation) SetUpdateTime

func (m *TemplateVersionMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*TemplateVersionMutation) SetVersion

func (m *TemplateVersionMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*TemplateVersionMutation) Source

func (m *TemplateVersionMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (*TemplateVersionMutation) TemplateCleared

func (m *TemplateVersionMutation) TemplateCleared() bool

TemplateCleared reports if the "template" edge to the Template entity was cleared.

func (*TemplateVersionMutation) TemplateID

func (m *TemplateVersionMutation) TemplateID() (r object.ID, exists bool)

TemplateID returns the value of the "template_id" field in the mutation.

func (*TemplateVersionMutation) TemplateIDs

func (m *TemplateVersionMutation) TemplateIDs() (ids []object.ID)

TemplateIDs returns the "template" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TemplateID instead. It exists only for internal usage by the builders.

func (TemplateVersionMutation) Tx

func (m TemplateVersionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TemplateVersionMutation) Type

func (m *TemplateVersionMutation) Type() string

Type returns the node type of this mutation (TemplateVersion).

func (*TemplateVersionMutation) UISchema added in v0.6.0

func (m *TemplateVersionMutation) UISchema() (r types.UISchema, exists bool)

UISchema returns the value of the "ui_schema" field in the mutation.

func (*TemplateVersionMutation) UpdateTime

func (m *TemplateVersionMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*TemplateVersionMutation) Version

func (m *TemplateVersionMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*TemplateVersionMutation) Where

Where appends a list predicates to the TemplateVersionMutation builder.

func (*TemplateVersionMutation) WhereP

func (m *TemplateVersionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TemplateVersionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TemplateVersionOutput

type TemplateVersionOutput struct {
	ID         object.ID                   `json:"id,omitempty"`
	CreateTime *time.Time                  `json:"createTime,omitempty"`
	UpdateTime *time.Time                  `json:"updateTime,omitempty"`
	Name       string                      `json:"name,omitempty"`
	Version    string                      `json:"version,cli-table-column,omitempty"`
	Source     string                      `json:"source,omitempty"`
	Schema     types.TemplateVersionSchema `json:"schema,omitempty"`
	UISchema   types.UISchema              `json:"uiSchema,omitempty"`

	Template *TemplateOutput `json:"template,omitempty"`
	Project  *ProjectOutput  `json:"project,omitempty"`
}

TemplateVersionOutput holds the output of the TemplateVersion entity.

func ExposeTemplateVersion

func ExposeTemplateVersion(_tv *TemplateVersion) *TemplateVersionOutput

ExposeTemplateVersion converts the TemplateVersion to TemplateVersionOutput.

func ExposeTemplateVersions

func ExposeTemplateVersions(_tvs []*TemplateVersion) []*TemplateVersionOutput

ExposeTemplateVersions converts the TemplateVersion slice to TemplateVersionOutput pointer slice.

type TemplateVersionPatchInput added in v0.5.0

type TemplateVersionPatchInput struct {
	TemplateVersionQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Name of the template.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Version of the template.
	Version string `path:"-" query:"-" json:"version,omitempty"`
	// Source of the template.
	Source string `path:"-" query:"-" json:"source,omitempty"`
	// Generated schema and data of the template.
	Schema types.TemplateVersionSchema `path:"-" query:"-" json:"schema,omitempty"`
	// store the original ui schema of the template.
	OriginalUISchema types.UISchema `path:"-" query:"-" json:"originalUISchema,omitempty"`
	// ui schema of the template.
	UISchema types.UISchema `path:"-" query:"-" json:"uiSchema,omitempty"`
	// Default value generated from schema and ui schema
	SchemaDefaultValue []byte `path:"-" query:"-" json:"schemaDefaultValue,omitempty"`
	// contains filtered or unexported fields
}

TemplateVersionPatchInput holds the patch input of the TemplateVersion entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateVersionPatchInput) Model added in v0.5.0

Model returns the TemplateVersion patched entity, after validating.

func (*TemplateVersionPatchInput) PatchModel added in v0.5.0

func (tvpi *TemplateVersionPatchInput) PatchModel() *TemplateVersion

PatchModel returns the TemplateVersion partition entity for patching.

func (*TemplateVersionPatchInput) SetGinContext added in v0.5.0

func (ic *TemplateVersionPatchInput) SetGinContext(ctx *gin.Context)

func (*TemplateVersionPatchInput) SetModelClient added in v0.5.0

func (ic *TemplateVersionPatchInput) SetModelClient(cli *Client)

func (*TemplateVersionPatchInput) Validate added in v0.5.0

func (tvpi *TemplateVersionPatchInput) Validate() error

Validate checks the TemplateVersionPatchInput entity.

func (*TemplateVersionPatchInput) ValidateWith added in v0.5.0

func (tvpi *TemplateVersionPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionPatchInput entity with the given context and client set.

type TemplateVersionQuery

type TemplateVersionQuery struct {
	// contains filtered or unexported fields
}

TemplateVersionQuery is the builder for querying TemplateVersion entities.

func (*TemplateVersionQuery) Aggregate

Aggregate returns a TemplateVersionSelect configured with the given aggregations.

func (*TemplateVersionQuery) All

All executes the query and returns a list of TemplateVersions.

func (*TemplateVersionQuery) AllX

AllX is like All, but panics if an error occurs.

func (*TemplateVersionQuery) Clone

Clone returns a duplicate of the TemplateVersionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TemplateVersionQuery) Count

func (tvq *TemplateVersionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TemplateVersionQuery) CountX

func (tvq *TemplateVersionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TemplateVersionQuery) ExecContext

func (c *TemplateVersionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersionQuery) Exist

func (tvq *TemplateVersionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TemplateVersionQuery) ExistX

func (tvq *TemplateVersionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TemplateVersionQuery) First

First returns the first TemplateVersion entity from the query. Returns a *NotFoundError when no TemplateVersion was found.

func (*TemplateVersionQuery) FirstID

func (tvq *TemplateVersionQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first TemplateVersion ID from the query. Returns a *NotFoundError when no TemplateVersion ID was found.

func (*TemplateVersionQuery) FirstIDX

func (tvq *TemplateVersionQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TemplateVersionQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*TemplateVersionQuery) ForShare

func (tvq *TemplateVersionQuery) ForShare(opts ...sql.LockOption) *TemplateVersionQuery

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 (*TemplateVersionQuery) ForUpdate

func (tvq *TemplateVersionQuery) ForUpdate(opts ...sql.LockOption) *TemplateVersionQuery

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 (*TemplateVersionQuery) GroupBy

func (tvq *TemplateVersionQuery) GroupBy(field string, fields ...string) *TemplateVersionGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TemplateVersion.Query().
	GroupBy(templateversion.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*TemplateVersionQuery) IDs

func (tvq *TemplateVersionQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of TemplateVersion IDs.

func (*TemplateVersionQuery) IDsX

func (tvq *TemplateVersionQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*TemplateVersionQuery) Limit

func (tvq *TemplateVersionQuery) Limit(limit int) *TemplateVersionQuery

Limit the number of records to be returned by this query.

func (*TemplateVersionQuery) Modify

func (tvq *TemplateVersionQuery) Modify(modifiers ...func(s *sql.Selector)) *TemplateVersionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TemplateVersionQuery) Offset

func (tvq *TemplateVersionQuery) Offset(offset int) *TemplateVersionQuery

Offset to start from.

func (*TemplateVersionQuery) Only

Only returns a single TemplateVersion entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TemplateVersion entity is found. Returns a *NotFoundError when no TemplateVersion entities are found.

func (*TemplateVersionQuery) OnlyID

func (tvq *TemplateVersionQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only TemplateVersion ID in the query. Returns a *NotSingularError when more than one TemplateVersion ID is found. Returns a *NotFoundError when no entities are found.

func (*TemplateVersionQuery) OnlyIDX

func (tvq *TemplateVersionQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TemplateVersionQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*TemplateVersionQuery) Order

Order specifies how the records should be ordered.

func (*TemplateVersionQuery) QueryContext

func (c *TemplateVersionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersionQuery) QueryProject added in v0.4.0

func (tvq *TemplateVersionQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*TemplateVersionQuery) QueryResourceDefinitions added in v0.4.0

func (tvq *TemplateVersionQuery) QueryResourceDefinitions() *ResourceDefinitionMatchingRuleQuery

QueryResourceDefinitions chains the current query on the "resource_definitions" edge.

func (*TemplateVersionQuery) QueryResources added in v0.4.0

func (tvq *TemplateVersionQuery) QueryResources() *ResourceQuery

QueryResources chains the current query on the "resources" edge.

func (*TemplateVersionQuery) QueryTemplate

func (tvq *TemplateVersionQuery) QueryTemplate() *TemplateQuery

QueryTemplate chains the current query on the "template" edge.

func (*TemplateVersionQuery) Select

func (tvq *TemplateVersionQuery) Select(fields ...string) *TemplateVersionSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.TemplateVersion.Query().
	Select(templateversion.FieldCreateTime).
	Scan(ctx, &v)

func (*TemplateVersionQuery) Unique

func (tvq *TemplateVersionQuery) Unique(unique bool) *TemplateVersionQuery

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 (*TemplateVersionQuery) Where

Where adds a new predicate for the TemplateVersionQuery builder.

func (*TemplateVersionQuery) WhereP

func (tvq *TemplateVersionQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TemplateVersionQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*TemplateVersionQuery) WithProject added in v0.4.0

func (tvq *TemplateVersionQuery) WithProject(opts ...func(*ProjectQuery)) *TemplateVersionQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*TemplateVersionQuery) WithResourceDefinitions added in v0.4.0

func (tvq *TemplateVersionQuery) WithResourceDefinitions(opts ...func(*ResourceDefinitionMatchingRuleQuery)) *TemplateVersionQuery

WithResourceDefinitions tells the query-builder to eager-load the nodes that are connected to the "resource_definitions" edge. The optional arguments are used to configure the query builder of the edge.

func (*TemplateVersionQuery) WithResources added in v0.4.0

func (tvq *TemplateVersionQuery) WithResources(opts ...func(*ResourceQuery)) *TemplateVersionQuery

WithResources tells the query-builder to eager-load the nodes that are connected to the "resources" edge. The optional arguments are used to configure the query builder of the edge.

func (*TemplateVersionQuery) WithTemplate

func (tvq *TemplateVersionQuery) WithTemplate(opts ...func(*TemplateQuery)) *TemplateVersionQuery

WithTemplate tells the query-builder to eager-load the nodes that are connected to the "template" edge. The optional arguments are used to configure the query builder of the edge.

type TemplateVersionQueryInput

type TemplateVersionQueryInput struct {

	// Project indicates to query TemplateVersion entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project,omitempty"`

	// Refer holds the route path reference of the TemplateVersion entity.
	Refer *object.Refer `path:"templateversion,default=" query:"-" json:"-"`
	// ID of the TemplateVersion entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the TemplateVersion entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Version of the TemplateVersion entity, a part of the unique index.
	Version string `path:"-" query:"-" json:"version,omitempty"`
	// contains filtered or unexported fields
}

TemplateVersionQueryInput holds the query input of the TemplateVersion entity, please tags with `path:",inline"` if embedding.

func (*TemplateVersionQueryInput) Model

Model returns the TemplateVersion entity for querying, after validating.

func (*TemplateVersionQueryInput) SetGinContext

func (ic *TemplateVersionQueryInput) SetGinContext(ctx *gin.Context)

func (*TemplateVersionQueryInput) SetModelClient

func (ic *TemplateVersionQueryInput) SetModelClient(cli *Client)

func (*TemplateVersionQueryInput) Validate

func (tvqi *TemplateVersionQueryInput) Validate() error

Validate checks the TemplateVersionQueryInput entity.

func (*TemplateVersionQueryInput) ValidateWith

func (tvqi *TemplateVersionQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionQueryInput entity with the given context and client set.

type TemplateVersionQueryInputs

type TemplateVersionQueryInputs struct {

	// Project indicates to query TemplateVersion entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

TemplateVersionQueryInputs holds the query input of the TemplateVersion entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*TemplateVersionQueryInputs) SetGinContext

func (ic *TemplateVersionQueryInputs) SetGinContext(ctx *gin.Context)

func (*TemplateVersionQueryInputs) SetModelClient

func (ic *TemplateVersionQueryInputs) SetModelClient(cli *Client)

func (*TemplateVersionQueryInputs) Validate

func (tvqi *TemplateVersionQueryInputs) Validate() error

Validate checks the TemplateVersionQueryInputs entity.

func (*TemplateVersionQueryInputs) ValidateWith

func (tvqi *TemplateVersionQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionQueryInputs entity with the given context and client set.

type TemplateVersionSelect

type TemplateVersionSelect struct {
	*TemplateVersionQuery
	// contains filtered or unexported fields
}

TemplateVersionSelect is the builder for selecting fields of TemplateVersion entities.

func (*TemplateVersionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*TemplateVersionSelect) Bool

func (s *TemplateVersionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TemplateVersionSelect) BoolX

func (s *TemplateVersionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TemplateVersionSelect) Bools

func (s *TemplateVersionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TemplateVersionSelect) BoolsX

func (s *TemplateVersionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (TemplateVersionSelect) ExecContext

func (c TemplateVersionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersionSelect) Float64

func (s *TemplateVersionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TemplateVersionSelect) Float64X

func (s *TemplateVersionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TemplateVersionSelect) Float64s

func (s *TemplateVersionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TemplateVersionSelect) Float64sX

func (s *TemplateVersionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TemplateVersionSelect) Int

func (s *TemplateVersionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TemplateVersionSelect) IntX

func (s *TemplateVersionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TemplateVersionSelect) Ints

func (s *TemplateVersionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TemplateVersionSelect) IntsX

func (s *TemplateVersionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TemplateVersionSelect) Modify

func (tvs *TemplateVersionSelect) Modify(modifiers ...func(s *sql.Selector)) *TemplateVersionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (TemplateVersionSelect) QueryContext

func (c TemplateVersionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersionSelect) Scan

func (tvs *TemplateVersionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TemplateVersionSelect) ScanX

func (s *TemplateVersionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TemplateVersionSelect) String

func (s *TemplateVersionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TemplateVersionSelect) StringX

func (s *TemplateVersionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TemplateVersionSelect) Strings

func (s *TemplateVersionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TemplateVersionSelect) StringsX

func (s *TemplateVersionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TemplateVersionUpdate

type TemplateVersionUpdate struct {
	// contains filtered or unexported fields
}

TemplateVersionUpdate is the builder for updating TemplateVersion entities.

func (*TemplateVersionUpdate) AddResourceDefinitionIDs added in v0.4.0

func (tvu *TemplateVersionUpdate) AddResourceDefinitionIDs(ids ...object.ID) *TemplateVersionUpdate

AddResourceDefinitionIDs adds the "resource_definitions" edge to the ResourceDefinitionMatchingRule entity by IDs.

func (*TemplateVersionUpdate) AddResourceDefinitions added in v0.4.0

AddResourceDefinitions adds the "resource_definitions" edges to the ResourceDefinitionMatchingRule entity.

func (*TemplateVersionUpdate) AddResourceIDs added in v0.4.0

func (tvu *TemplateVersionUpdate) AddResourceIDs(ids ...object.ID) *TemplateVersionUpdate

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*TemplateVersionUpdate) AddResources added in v0.4.0

func (tvu *TemplateVersionUpdate) AddResources(r ...*Resource) *TemplateVersionUpdate

AddResources adds the "resources" edges to the Resource entity.

func (*TemplateVersionUpdate) ClearResourceDefinitions added in v0.4.0

func (tvu *TemplateVersionUpdate) ClearResourceDefinitions() *TemplateVersionUpdate

ClearResourceDefinitions clears all "resource_definitions" edges to the ResourceDefinitionMatchingRule entity.

func (*TemplateVersionUpdate) ClearResources added in v0.4.0

func (tvu *TemplateVersionUpdate) ClearResources() *TemplateVersionUpdate

ClearResources clears all "resources" edges to the Resource entity.

func (*TemplateVersionUpdate) ClearSchemaDefaultValue added in v0.5.0

func (tvu *TemplateVersionUpdate) ClearSchemaDefaultValue() *TemplateVersionUpdate

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*TemplateVersionUpdate) Exec

func (tvu *TemplateVersionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TemplateVersionUpdate) ExecContext

func (c *TemplateVersionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersionUpdate) ExecX

func (tvu *TemplateVersionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateVersionUpdate) Modify

func (tvu *TemplateVersionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TemplateVersionUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TemplateVersionUpdate) Mutation

Mutation returns the TemplateVersionMutation object of the builder.

func (*TemplateVersionUpdate) QueryContext

func (c *TemplateVersionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersionUpdate) RemoveResourceDefinitionIDs added in v0.4.0

func (tvu *TemplateVersionUpdate) RemoveResourceDefinitionIDs(ids ...object.ID) *TemplateVersionUpdate

RemoveResourceDefinitionIDs removes the "resource_definitions" edge to ResourceDefinitionMatchingRule entities by IDs.

func (*TemplateVersionUpdate) RemoveResourceDefinitions added in v0.4.0

func (tvu *TemplateVersionUpdate) RemoveResourceDefinitions(r ...*ResourceDefinitionMatchingRule) *TemplateVersionUpdate

RemoveResourceDefinitions removes "resource_definitions" edges to ResourceDefinitionMatchingRule entities.

func (*TemplateVersionUpdate) RemoveResourceIDs added in v0.4.0

func (tvu *TemplateVersionUpdate) RemoveResourceIDs(ids ...object.ID) *TemplateVersionUpdate

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*TemplateVersionUpdate) RemoveResources added in v0.4.0

func (tvu *TemplateVersionUpdate) RemoveResources(r ...*Resource) *TemplateVersionUpdate

RemoveResources removes "resources" edges to Resource entities.

func (*TemplateVersionUpdate) Save

func (tvu *TemplateVersionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TemplateVersionUpdate) SaveX

func (tvu *TemplateVersionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TemplateVersionUpdate) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*TemplateVersionUpdate) SetNillableOriginalUISchema added in v0.6.0

func (tvu *TemplateVersionUpdate) SetNillableOriginalUISchema(ts *types.UISchema) *TemplateVersionUpdate

SetNillableOriginalUISchema sets the "original_ui_schema" field if the given value is not nil.

func (*TemplateVersionUpdate) SetNillableSchema added in v0.4.0

SetNillableSchema sets the "schema" field if the given value is not nil.

func (*TemplateVersionUpdate) SetNillableUISchema added in v0.6.0

func (tvu *TemplateVersionUpdate) SetNillableUISchema(ts *types.UISchema) *TemplateVersionUpdate

SetNillableUISchema sets the "ui_schema" field if the given value is not nil.

func (*TemplateVersionUpdate) SetOriginalUISchema added in v0.6.0

func (tvu *TemplateVersionUpdate) SetOriginalUISchema(ts types.UISchema) *TemplateVersionUpdate

SetOriginalUISchema sets the "original_ui_schema" field.

func (*TemplateVersionUpdate) SetSchema

SetSchema sets the "schema" field.

func (*TemplateVersionUpdate) SetSchemaDefaultValue added in v0.5.0

func (tvu *TemplateVersionUpdate) SetSchemaDefaultValue(b []byte) *TemplateVersionUpdate

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*TemplateVersionUpdate) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*TemplateVersionUpdate) SetUpdateTime

func (tvu *TemplateVersionUpdate) SetUpdateTime(t time.Time) *TemplateVersionUpdate

SetUpdateTime sets the "update_time" field.

func (*TemplateVersionUpdate) Where

Where appends a list predicates to the TemplateVersionUpdate builder.

type TemplateVersionUpdateInput

type TemplateVersionUpdateInput struct {
	TemplateVersionQueryInput `path:",inline" query:"-" json:"-"`

	// Generated schema and data of the template.
	Schema types.TemplateVersionSchema `path:"-" query:"-" json:"schema,omitempty"`
	// ui schema of the template.
	UISchema types.UISchema `path:"-" query:"-" json:"uiSchema,omitempty"`
}

TemplateVersionUpdateInput holds the modification input of the TemplateVersion entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateVersionUpdateInput) Model

Model returns the TemplateVersion entity for modifying, after validating.

func (*TemplateVersionUpdateInput) SetGinContext

func (ic *TemplateVersionUpdateInput) SetGinContext(ctx *gin.Context)

func (*TemplateVersionUpdateInput) SetModelClient

func (ic *TemplateVersionUpdateInput) SetModelClient(cli *Client)

func (*TemplateVersionUpdateInput) Validate

func (tvui *TemplateVersionUpdateInput) Validate() error

Validate checks the TemplateVersionUpdateInput entity.

func (*TemplateVersionUpdateInput) ValidateWith

func (tvui *TemplateVersionUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionUpdateInput entity with the given context and client set.

type TemplateVersionUpdateInputs

type TemplateVersionUpdateInputs struct {

	// Project indicates to update TemplateVersion entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*TemplateVersionUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

TemplateVersionUpdateInputs holds the modification input of the TemplateVersion entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*TemplateVersionUpdateInputs) IDs

func (tvui *TemplateVersionUpdateInputs) IDs() []object.ID

IDs returns the ID list of the TemplateVersion entities for modifying, after validating.

func (*TemplateVersionUpdateInputs) Model

Model returns the TemplateVersion entities for modifying, after validating.

func (*TemplateVersionUpdateInputs) SetGinContext

func (ic *TemplateVersionUpdateInputs) SetGinContext(ctx *gin.Context)

func (*TemplateVersionUpdateInputs) SetModelClient

func (ic *TemplateVersionUpdateInputs) SetModelClient(cli *Client)

func (*TemplateVersionUpdateInputs) Validate

func (tvui *TemplateVersionUpdateInputs) Validate() error

Validate checks the TemplateVersionUpdateInputs entity.

func (*TemplateVersionUpdateInputs) ValidateWith

func (tvui *TemplateVersionUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionUpdateInputs entity with the given context and client set.

type TemplateVersionUpdateInputsItem

type TemplateVersionUpdateInputsItem struct {
	// ID of the TemplateVersion entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the TemplateVersion entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Version of the TemplateVersion entity, a part of the unique index.
	Version string `path:"-" query:"-" json:"version,omitempty"`

	// Generated schema and data of the template.
	Schema types.TemplateVersionSchema `path:"-" query:"-" json:"schema"`
	// ui schema of the template.
	UISchema types.UISchema `path:"-" query:"-" json:"uiSchema"`
}

TemplateVersionUpdateInputs holds the modification input item of the TemplateVersion entities.

func (*TemplateVersionUpdateInputsItem) ValidateWith

func (tvui *TemplateVersionUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TemplateVersionUpdateInputsItem entity with the given context and client set.

type TemplateVersionUpdateOne

type TemplateVersionUpdateOne struct {
	// contains filtered or unexported fields
}

TemplateVersionUpdateOne is the builder for updating a single TemplateVersion entity.

func (*TemplateVersionUpdateOne) AddResourceDefinitionIDs added in v0.4.0

func (tvuo *TemplateVersionUpdateOne) AddResourceDefinitionIDs(ids ...object.ID) *TemplateVersionUpdateOne

AddResourceDefinitionIDs adds the "resource_definitions" edge to the ResourceDefinitionMatchingRule entity by IDs.

func (*TemplateVersionUpdateOne) AddResourceDefinitions added in v0.4.0

AddResourceDefinitions adds the "resource_definitions" edges to the ResourceDefinitionMatchingRule entity.

func (*TemplateVersionUpdateOne) AddResourceIDs added in v0.4.0

func (tvuo *TemplateVersionUpdateOne) AddResourceIDs(ids ...object.ID) *TemplateVersionUpdateOne

AddResourceIDs adds the "resources" edge to the Resource entity by IDs.

func (*TemplateVersionUpdateOne) AddResources added in v0.4.0

func (tvuo *TemplateVersionUpdateOne) AddResources(r ...*Resource) *TemplateVersionUpdateOne

AddResources adds the "resources" edges to the Resource entity.

func (*TemplateVersionUpdateOne) ClearResourceDefinitions added in v0.4.0

func (tvuo *TemplateVersionUpdateOne) ClearResourceDefinitions() *TemplateVersionUpdateOne

ClearResourceDefinitions clears all "resource_definitions" edges to the ResourceDefinitionMatchingRule entity.

func (*TemplateVersionUpdateOne) ClearResources added in v0.4.0

func (tvuo *TemplateVersionUpdateOne) ClearResources() *TemplateVersionUpdateOne

ClearResources clears all "resources" edges to the Resource entity.

func (*TemplateVersionUpdateOne) ClearSchemaDefaultValue added in v0.5.0

func (tvuo *TemplateVersionUpdateOne) ClearSchemaDefaultValue() *TemplateVersionUpdateOne

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*TemplateVersionUpdateOne) Exec

Exec executes the query on the entity.

func (*TemplateVersionUpdateOne) ExecContext

func (c *TemplateVersionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TemplateVersionUpdateOne) ExecE

func (tvuo *TemplateVersionUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *TemplateVersion) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*TemplateVersionUpdateOne) ExecEX

func (tvuo *TemplateVersionUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *TemplateVersion) error)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateVersionUpdateOne) ExecX

func (tvuo *TemplateVersionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateVersionUpdateOne) Modify

func (tvuo *TemplateVersionUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TemplateVersionUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TemplateVersionUpdateOne) Mutation

Mutation returns the TemplateVersionMutation object of the builder.

func (*TemplateVersionUpdateOne) QueryContext

func (c *TemplateVersionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TemplateVersionUpdateOne) RemoveResourceDefinitionIDs added in v0.4.0

func (tvuo *TemplateVersionUpdateOne) RemoveResourceDefinitionIDs(ids ...object.ID) *TemplateVersionUpdateOne

RemoveResourceDefinitionIDs removes the "resource_definitions" edge to ResourceDefinitionMatchingRule entities by IDs.

func (*TemplateVersionUpdateOne) RemoveResourceDefinitions added in v0.4.0

RemoveResourceDefinitions removes "resource_definitions" edges to ResourceDefinitionMatchingRule entities.

func (*TemplateVersionUpdateOne) RemoveResourceIDs added in v0.4.0

func (tvuo *TemplateVersionUpdateOne) RemoveResourceIDs(ids ...object.ID) *TemplateVersionUpdateOne

RemoveResourceIDs removes the "resources" edge to Resource entities by IDs.

func (*TemplateVersionUpdateOne) RemoveResources added in v0.4.0

func (tvuo *TemplateVersionUpdateOne) RemoveResources(r ...*Resource) *TemplateVersionUpdateOne

RemoveResources removes "resources" edges to Resource entities.

func (*TemplateVersionUpdateOne) Save

Save executes the query and returns the updated TemplateVersion entity.

func (*TemplateVersionUpdateOne) SaveE

func (tvuo *TemplateVersionUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *TemplateVersion) error) (*TemplateVersion, error)

SaveE calls the given function after updated the TemplateVersion entity, which is always good for cascading update operations.

func (*TemplateVersionUpdateOne) SaveEX

func (tvuo *TemplateVersionUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *TemplateVersion) error) *TemplateVersion

SaveEX is like SaveE, but panics if an error occurs.

func (*TemplateVersionUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*TemplateVersionUpdateOne) Select

func (tvuo *TemplateVersionUpdateOne) Select(field string, fields ...string) *TemplateVersionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TemplateVersionUpdateOne) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*TemplateVersionUpdateOne) SetNillableOriginalUISchema added in v0.6.0

func (tvuo *TemplateVersionUpdateOne) SetNillableOriginalUISchema(ts *types.UISchema) *TemplateVersionUpdateOne

SetNillableOriginalUISchema sets the "original_ui_schema" field if the given value is not nil.

func (*TemplateVersionUpdateOne) SetNillableSchema added in v0.4.0

SetNillableSchema sets the "schema" field if the given value is not nil.

func (*TemplateVersionUpdateOne) SetNillableUISchema added in v0.6.0

func (tvuo *TemplateVersionUpdateOne) SetNillableUISchema(ts *types.UISchema) *TemplateVersionUpdateOne

SetNillableUISchema sets the "ui_schema" field if the given value is not nil.

func (*TemplateVersionUpdateOne) SetOriginalUISchema added in v0.6.0

func (tvuo *TemplateVersionUpdateOne) SetOriginalUISchema(ts types.UISchema) *TemplateVersionUpdateOne

SetOriginalUISchema sets the "original_ui_schema" field.

func (*TemplateVersionUpdateOne) SetSchema

SetSchema sets the "schema" field.

func (*TemplateVersionUpdateOne) SetSchemaDefaultValue added in v0.5.0

func (tvuo *TemplateVersionUpdateOne) SetSchemaDefaultValue(b []byte) *TemplateVersionUpdateOne

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*TemplateVersionUpdateOne) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*TemplateVersionUpdateOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*TemplateVersionUpdateOne) Where

Where appends a list predicates to the TemplateVersionUpdate builder.

type TemplateVersionUpsert

type TemplateVersionUpsert struct {
	*sql.UpdateSet
}

TemplateVersionUpsert is the "OnConflict" setter.

func (*TemplateVersionUpsert) ClearSchemaDefaultValue added in v0.5.0

func (u *TemplateVersionUpsert) ClearSchemaDefaultValue() *TemplateVersionUpsert

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*TemplateVersionUpsert) SetOriginalUISchema added in v0.6.0

func (u *TemplateVersionUpsert) SetOriginalUISchema(v types.UISchema) *TemplateVersionUpsert

SetOriginalUISchema sets the "original_ui_schema" field.

func (*TemplateVersionUpsert) SetSchema

SetSchema sets the "schema" field.

func (*TemplateVersionUpsert) SetSchemaDefaultValue added in v0.5.0

func (u *TemplateVersionUpsert) SetSchemaDefaultValue(v []byte) *TemplateVersionUpsert

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*TemplateVersionUpsert) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*TemplateVersionUpsert) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*TemplateVersionUpsert) UpdateOriginalUISchema added in v0.6.0

func (u *TemplateVersionUpsert) UpdateOriginalUISchema() *TemplateVersionUpsert

UpdateOriginalUISchema sets the "original_ui_schema" field to the value that was provided on create.

func (*TemplateVersionUpsert) UpdateSchema

func (u *TemplateVersionUpsert) UpdateSchema() *TemplateVersionUpsert

UpdateSchema sets the "schema" field to the value that was provided on create.

func (*TemplateVersionUpsert) UpdateSchemaDefaultValue added in v0.5.0

func (u *TemplateVersionUpsert) UpdateSchemaDefaultValue() *TemplateVersionUpsert

UpdateSchemaDefaultValue sets the "schema_default_value" field to the value that was provided on create.

func (*TemplateVersionUpsert) UpdateUISchema added in v0.6.0

func (u *TemplateVersionUpsert) UpdateUISchema() *TemplateVersionUpsert

UpdateUISchema sets the "ui_schema" field to the value that was provided on create.

func (*TemplateVersionUpsert) UpdateUpdateTime

func (u *TemplateVersionUpsert) UpdateUpdateTime() *TemplateVersionUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type TemplateVersionUpsertBulk

type TemplateVersionUpsertBulk struct {
	// contains filtered or unexported fields
}

TemplateVersionUpsertBulk is the builder for "upsert"-ing a bulk of TemplateVersion nodes.

func (*TemplateVersionUpsertBulk) ClearSchemaDefaultValue added in v0.5.0

func (u *TemplateVersionUpsertBulk) ClearSchemaDefaultValue() *TemplateVersionUpsertBulk

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*TemplateVersionUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TemplateVersionUpsertBulk) Exec

Exec executes the query.

func (*TemplateVersionUpsertBulk) ExecE

func (u *TemplateVersionUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *TemplateVersion) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TemplateVersionUpsertBulk) ExecEX

func (u *TemplateVersionUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *TemplateVersion) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TemplateVersionUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*TemplateVersionUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TemplateVersion.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TemplateVersionUpsertBulk) SetOriginalUISchema added in v0.6.0

SetOriginalUISchema sets the "original_ui_schema" field.

func (*TemplateVersionUpsertBulk) SetSchema

SetSchema sets the "schema" field.

func (*TemplateVersionUpsertBulk) SetSchemaDefaultValue added in v0.5.0

func (u *TemplateVersionUpsertBulk) SetSchemaDefaultValue(v []byte) *TemplateVersionUpsertBulk

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*TemplateVersionUpsertBulk) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*TemplateVersionUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*TemplateVersionUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the TemplateVersionCreateBulk.OnConflict documentation for more info.

func (*TemplateVersionUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TemplateVersion.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(templateversion.FieldID)
		}),
	).
	Exec(ctx)

func (*TemplateVersionUpsertBulk) UpdateOriginalUISchema added in v0.6.0

func (u *TemplateVersionUpsertBulk) UpdateOriginalUISchema() *TemplateVersionUpsertBulk

UpdateOriginalUISchema sets the "original_ui_schema" field to the value that was provided on create.

func (*TemplateVersionUpsertBulk) UpdateSchema

UpdateSchema sets the "schema" field to the value that was provided on create.

func (*TemplateVersionUpsertBulk) UpdateSchemaDefaultValue added in v0.5.0

func (u *TemplateVersionUpsertBulk) UpdateSchemaDefaultValue() *TemplateVersionUpsertBulk

UpdateSchemaDefaultValue sets the "schema_default_value" field to the value that was provided on create.

func (*TemplateVersionUpsertBulk) UpdateUISchema added in v0.6.0

UpdateUISchema sets the "ui_schema" field to the value that was provided on create.

func (*TemplateVersionUpsertBulk) UpdateUpdateTime

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type TemplateVersionUpsertOne

type TemplateVersionUpsertOne struct {
	// contains filtered or unexported fields
}

TemplateVersionUpsertOne is the builder for "upsert"-ing

one TemplateVersion node.

func (*TemplateVersionUpsertOne) ClearSchemaDefaultValue added in v0.5.0

func (u *TemplateVersionUpsertOne) ClearSchemaDefaultValue() *TemplateVersionUpsertOne

ClearSchemaDefaultValue clears the value of the "schema_default_value" field.

func (*TemplateVersionUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TemplateVersionUpsertOne) Exec

Exec executes the query.

func (*TemplateVersionUpsertOne) ExecE

func (u *TemplateVersionUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *TemplateVersion) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TemplateVersionUpsertOne) ExecEX

func (u *TemplateVersionUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *TemplateVersion) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TemplateVersionUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*TemplateVersionUpsertOne) ID

func (u *TemplateVersionUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TemplateVersionUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*TemplateVersionUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TemplateVersion.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TemplateVersionUpsertOne) SetOriginalUISchema added in v0.6.0

SetOriginalUISchema sets the "original_ui_schema" field.

func (*TemplateVersionUpsertOne) SetSchema

SetSchema sets the "schema" field.

func (*TemplateVersionUpsertOne) SetSchemaDefaultValue added in v0.5.0

func (u *TemplateVersionUpsertOne) SetSchemaDefaultValue(v []byte) *TemplateVersionUpsertOne

SetSchemaDefaultValue sets the "schema_default_value" field.

func (*TemplateVersionUpsertOne) SetUISchema added in v0.6.0

SetUISchema sets the "ui_schema" field.

func (*TemplateVersionUpsertOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*TemplateVersionUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the TemplateVersionCreate.OnConflict documentation for more info.

func (*TemplateVersionUpsertOne) UpdateNewValues

func (u *TemplateVersionUpsertOne) UpdateNewValues() *TemplateVersionUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.TemplateVersion.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(templateversion.FieldID)
		}),
	).
	Exec(ctx)

func (*TemplateVersionUpsertOne) UpdateOriginalUISchema added in v0.6.0

func (u *TemplateVersionUpsertOne) UpdateOriginalUISchema() *TemplateVersionUpsertOne

UpdateOriginalUISchema sets the "original_ui_schema" field to the value that was provided on create.

func (*TemplateVersionUpsertOne) UpdateSchema

UpdateSchema sets the "schema" field to the value that was provided on create.

func (*TemplateVersionUpsertOne) UpdateSchemaDefaultValue added in v0.5.0

func (u *TemplateVersionUpsertOne) UpdateSchemaDefaultValue() *TemplateVersionUpsertOne

UpdateSchemaDefaultValue sets the "schema_default_value" field to the value that was provided on create.

func (*TemplateVersionUpsertOne) UpdateUISchema added in v0.6.0

UpdateUISchema sets the "ui_schema" field to the value that was provided on create.

func (*TemplateVersionUpsertOne) UpdateUpdateTime

func (u *TemplateVersionUpsertOne) UpdateUpdateTime() *TemplateVersionUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type TemplateVersions

type TemplateVersions []*TemplateVersion

TemplateVersions is a parsable slice of TemplateVersion.

func (TemplateVersions) View

func (_tvs TemplateVersions) View() []*TemplateVersionOutput

View returns the output of TemplateVersion entities.

type Templates

type Templates []*Template

Templates is a parsable slice of Template.

func (Templates) View

func (_ts Templates) View() []*TemplateOutput

View returns the output of Template entities.

type Token

type Token struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// ID of the subject to belong.
	SubjectID object.ID `json:"subject_id,omitempty"`
	// The kind of token.
	Kind string `json:"kind,omitempty"`
	// The name of token.
	Name string `json:"name,omitempty"`
	// The time of expiration, empty means forever.
	Expiration *time.Time `json:"expiration,omitempty"`
	// The value of token, store in string.
	Value crypto.String `json:"-"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TokenQuery when eager-loading is set.
	Edges TokenEdges `json:"edges,omitempty"`

	// AccessToken is the token used for authentication.
	// AccessToken does not store in the database.
	AccessToken string `json:"access_token,omitempty"`
	// contains filtered or unexported fields
}

Token is the model entity for the Token schema.

func (*Token) ExecContext

func (c *Token) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Token) GetValue

func (t *Token) GetValue(name string) (ent.Value, error)

GetValue returns the ent.Value that was dynamically selected and assigned to the Token. This includes values selected through modifiers, order, etc.

func (*Token) QueryContext

func (c *Token) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Token) QuerySubject

func (t *Token) QuerySubject() *SubjectQuery

QuerySubject queries the "subject" edge of the Token entity.

func (*Token) String

func (t *Token) String() string

String implements the fmt.Stringer.

func (*Token) Unwrap

func (t *Token) Unwrap() *Token

Unwrap unwraps the Token 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 (*Token) Update

func (t *Token) Update() *TokenUpdateOne

Update returns a builder for updating this Token. Note that you need to call Token.Unwrap() before calling this method if this Token was returned from a transaction, and the transaction was committed or rolled back.

func (*Token) View

func (_t *Token) View() *TokenOutput

View returns the output of Token entity.

type TokenClient

type TokenClient struct {
	// contains filtered or unexported fields
}

TokenClient is a client for the Token schema.

func NewTokenClient

func NewTokenClient(c config) *TokenClient

NewTokenClient returns a client for the Token from the given config.

func (*TokenClient) Create

func (c *TokenClient) Create() *TokenCreate

Create returns a builder for creating a Token entity.

func (*TokenClient) CreateBulk

func (c *TokenClient) CreateBulk(builders ...*TokenCreate) *TokenCreateBulk

CreateBulk returns a builder for creating a bulk of Token entities.

func (*TokenClient) Delete

func (c *TokenClient) Delete() *TokenDelete

Delete returns a delete builder for Token.

func (*TokenClient) DeleteOne

func (c *TokenClient) DeleteOne(t *Token) *TokenDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TokenClient) DeleteOneID

func (c *TokenClient) DeleteOneID(id object.ID) *TokenDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TokenClient) ExecContext

func (c *TokenClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TokenClient) Get

func (c *TokenClient) Get(ctx context.Context, id object.ID) (*Token, error)

Get returns a Token entity by its id.

func (*TokenClient) GetX

func (c *TokenClient) GetX(ctx context.Context, id object.ID) *Token

GetX is like Get, but panics if an error occurs.

func (*TokenClient) Hooks

func (c *TokenClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TokenClient) Intercept

func (c *TokenClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `token.Intercept(f(g(h())))`.

func (*TokenClient) Interceptors

func (c *TokenClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TokenClient) MapCreateBulk added in v0.5.0

func (c *TokenClient) MapCreateBulk(slice any, setFunc func(*TokenCreate, int)) *TokenCreateBulk

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 (*TokenClient) Query

func (c *TokenClient) Query() *TokenQuery

Query returns a query builder for Token.

func (*TokenClient) QueryContext

func (c *TokenClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TokenClient) QuerySubject

func (c *TokenClient) QuerySubject(t *Token) *SubjectQuery

QuerySubject queries the subject edge of a Token.

func (*TokenClient) Update

func (c *TokenClient) Update() *TokenUpdate

Update returns an update builder for Token.

func (*TokenClient) UpdateOne

func (c *TokenClient) UpdateOne(t *Token) *TokenUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TokenClient) UpdateOneID

func (c *TokenClient) UpdateOneID(id object.ID) *TokenUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TokenClient) Use

func (c *TokenClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `token.Hooks(f(g(h())))`.

type TokenClientGetter

type TokenClientGetter interface {
	// Tokens returns the client for interacting with the Token builders.
	Tokens() *TokenClient
}

TokenClientGetter is an interface that allows getting TokenClient.

type TokenCreate

type TokenCreate struct {
	// contains filtered or unexported fields
}

TokenCreate is the builder for creating a Token entity.

func (*TokenCreate) Exec

func (tc *TokenCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TokenCreate) ExecContext

func (c *TokenCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TokenCreate) ExecE

func (tc *TokenCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Token) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TokenCreate) ExecEX

func (tc *TokenCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Token) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TokenCreate) ExecX

func (tc *TokenCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokenCreate) Mutation

func (tc *TokenCreate) Mutation() *TokenMutation

Mutation returns the TokenMutation object of the builder.

func (*TokenCreate) OnConflict

func (tc *TokenCreate) OnConflict(opts ...sql.ConflictOption) *TokenUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Token.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TokenUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*TokenCreate) OnConflictColumns

func (tc *TokenCreate) OnConflictColumns(columns ...string) *TokenUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Token.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TokenCreate) QueryContext

func (c *TokenCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TokenCreate) Save

func (tc *TokenCreate) Save(ctx context.Context) (*Token, error)

Save creates the Token in the database.

func (*TokenCreate) SaveE

func (tc *TokenCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Token) error) (*Token, error)

SaveE calls the given function after created the Token entity, which is always good for cascading create operations.

func (*TokenCreate) SaveEX

func (tc *TokenCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Token) error) *Token

SaveEX is like SaveE, but panics if an error occurs.

func (*TokenCreate) SaveX

func (tc *TokenCreate) SaveX(ctx context.Context) *Token

SaveX calls Save and panics if Save returns an error.

func (*TokenCreate) Set

func (tc *TokenCreate) Set(obj *Token) *TokenCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*TokenCreate) SetCreateTime

func (tc *TokenCreate) SetCreateTime(t time.Time) *TokenCreate

SetCreateTime sets the "create_time" field.

func (*TokenCreate) SetExpiration

func (tc *TokenCreate) SetExpiration(t time.Time) *TokenCreate

SetExpiration sets the "expiration" field.

func (*TokenCreate) SetID

func (tc *TokenCreate) SetID(o object.ID) *TokenCreate

SetID sets the "id" field.

func (*TokenCreate) SetKind

func (tc *TokenCreate) SetKind(s string) *TokenCreate

SetKind sets the "kind" field.

func (*TokenCreate) SetName

func (tc *TokenCreate) SetName(s string) *TokenCreate

SetName sets the "name" field.

func (*TokenCreate) SetNillableCreateTime

func (tc *TokenCreate) SetNillableCreateTime(t *time.Time) *TokenCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*TokenCreate) SetNillableExpiration

func (tc *TokenCreate) SetNillableExpiration(t *time.Time) *TokenCreate

SetNillableExpiration sets the "expiration" field if the given value is not nil.

func (*TokenCreate) SetNillableKind

func (tc *TokenCreate) SetNillableKind(s *string) *TokenCreate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*TokenCreate) SetSubject

func (tc *TokenCreate) SetSubject(s *Subject) *TokenCreate

SetSubject sets the "subject" edge to the Subject entity.

func (*TokenCreate) SetSubjectID

func (tc *TokenCreate) SetSubjectID(o object.ID) *TokenCreate

SetSubjectID sets the "subject_id" field.

func (*TokenCreate) SetValue

func (tc *TokenCreate) SetValue(c crypto.String) *TokenCreate

SetValue sets the "value" field.

type TokenCreateBulk

type TokenCreateBulk struct {
	// contains filtered or unexported fields
}

TokenCreateBulk is the builder for creating many Token entities in bulk.

func (*TokenCreateBulk) Exec

func (tcb *TokenCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TokenCreateBulk) ExecContext

func (c *TokenCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TokenCreateBulk) ExecE

func (tcb *TokenCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Token) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TokenCreateBulk) ExecEX

func (tcb *TokenCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Token) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TokenCreateBulk) ExecX

func (tcb *TokenCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokenCreateBulk) OnConflict

func (tcb *TokenCreateBulk) OnConflict(opts ...sql.ConflictOption) *TokenUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Token.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TokenUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*TokenCreateBulk) OnConflictColumns

func (tcb *TokenCreateBulk) OnConflictColumns(columns ...string) *TokenUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Token.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TokenCreateBulk) QueryContext

func (c *TokenCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TokenCreateBulk) Save

func (tcb *TokenCreateBulk) Save(ctx context.Context) ([]*Token, error)

Save creates the Token entities in the database.

func (*TokenCreateBulk) SaveE

func (tcb *TokenCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Token) error) ([]*Token, error)

SaveE calls the given function after created the Token entities, which is always good for cascading create operations.

func (*TokenCreateBulk) SaveEX

func (tcb *TokenCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Token) error) []*Token

SaveEX is like SaveE, but panics if an error occurs.

func (*TokenCreateBulk) SaveX

func (tcb *TokenCreateBulk) SaveX(ctx context.Context) []*Token

SaveX is like Save, but panics if an error occurs.

func (*TokenCreateBulk) Set

func (tcb *TokenCreateBulk) Set(objs ...*Token) *TokenCreateBulk

Set leverages the TokenCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type TokenCreateInput

type TokenCreateInput struct {

	// The value of token, store in string.
	Value crypto.String `path:"-" query:"-" json:"value"`
	// The name of token.
	Name string `path:"-" query:"-" json:"name"`
	// The kind of token.
	Kind string `path:"-" query:"-" json:"kind,omitempty"`
	// The time of expiration, empty means forever.
	Expiration *time.Time `path:"-" query:"-" json:"expiration,omitempty"`
	// contains filtered or unexported fields
}

TokenCreateInput holds the creation input of the Token entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*TokenCreateInput) Model

func (tci *TokenCreateInput) Model() *Token

Model returns the Token entity for creating, after validating.

func (*TokenCreateInput) SetGinContext

func (ic *TokenCreateInput) SetGinContext(ctx *gin.Context)

func (*TokenCreateInput) SetModelClient

func (ic *TokenCreateInput) SetModelClient(cli *Client)

func (*TokenCreateInput) Validate

func (tci *TokenCreateInput) Validate() error

Validate checks the TokenCreateInput entity.

func (*TokenCreateInput) ValidateWith

func (tci *TokenCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenCreateInput entity with the given context and client set.

type TokenCreateInputs

type TokenCreateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*TokenCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

TokenCreateInputs holds the creation input of the Token entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*TokenCreateInputs) Model

func (tci *TokenCreateInputs) Model() []*Token

Model returns the Token entities for creating, after validating.

func (*TokenCreateInputs) SetGinContext

func (ic *TokenCreateInputs) SetGinContext(ctx *gin.Context)

func (*TokenCreateInputs) SetModelClient

func (ic *TokenCreateInputs) SetModelClient(cli *Client)

func (*TokenCreateInputs) Validate

func (tci *TokenCreateInputs) Validate() error

Validate checks the TokenCreateInputs entity .

func (*TokenCreateInputs) ValidateWith

func (tci *TokenCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenCreateInputs entity with the given context and client set.

type TokenCreateInputsItem

type TokenCreateInputsItem struct {
	// The value of token, store in string.
	Value crypto.String `path:"-" query:"-" json:"value"`
	// The name of token.
	Name string `path:"-" query:"-" json:"name"`
	// The kind of token.
	Kind string `path:"-" query:"-" json:"kind,omitempty"`
	// The time of expiration, empty means forever.
	Expiration *time.Time `path:"-" query:"-" json:"expiration,omitempty"`
}

TokenCreateInputs holds the creation input item of the Token entities.

func (*TokenCreateInputsItem) ValidateWith

func (tci *TokenCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenCreateInputsItem entity with the given context and client set.

type TokenDelete

type TokenDelete struct {
	// contains filtered or unexported fields
}

TokenDelete is the builder for deleting a Token entity.

func (*TokenDelete) Exec

func (td *TokenDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TokenDelete) ExecContext

func (c *TokenDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TokenDelete) ExecX

func (td *TokenDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TokenDelete) QueryContext

func (c *TokenDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TokenDelete) Where

func (td *TokenDelete) Where(ps ...predicate.Token) *TokenDelete

Where appends a list predicates to the TokenDelete builder.

type TokenDeleteInput

type TokenDeleteInput struct {
	TokenQueryInput `path:",inline"`
}

TokenDeleteInput holds the deletion input of the Token entity, please tags with `path:",inline"` if embedding.

func (*TokenDeleteInput) SetGinContext

func (ic *TokenDeleteInput) SetGinContext(ctx *gin.Context)

func (*TokenDeleteInput) SetModelClient

func (ic *TokenDeleteInput) SetModelClient(cli *Client)

type TokenDeleteInputs

type TokenDeleteInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*TokenDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

TokenDeleteInputs holds the deletion input of the Token entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*TokenDeleteInputs) IDs

func (tdi *TokenDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Token entities for deleting, after validating.

func (*TokenDeleteInputs) Model

func (tdi *TokenDeleteInputs) Model() []*Token

Model returns the Token entities for deleting, after validating.

func (*TokenDeleteInputs) SetGinContext

func (ic *TokenDeleteInputs) SetGinContext(ctx *gin.Context)

func (*TokenDeleteInputs) SetModelClient

func (ic *TokenDeleteInputs) SetModelClient(cli *Client)

func (*TokenDeleteInputs) Validate

func (tdi *TokenDeleteInputs) Validate() error

Validate checks the TokenDeleteInputs entity.

func (*TokenDeleteInputs) ValidateWith

func (tdi *TokenDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenDeleteInputs entity with the given context and client set.

type TokenDeleteInputsItem

type TokenDeleteInputsItem struct {
	// ID of the Token entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Token entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

TokenDeleteInputs holds the deletion input item of the Token entities.

type TokenDeleteOne

type TokenDeleteOne struct {
	// contains filtered or unexported fields
}

TokenDeleteOne is the builder for deleting a single Token entity.

func (*TokenDeleteOne) Exec

func (tdo *TokenDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TokenDeleteOne) ExecX

func (tdo *TokenDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokenDeleteOne) Where

func (tdo *TokenDeleteOne) Where(ps ...predicate.Token) *TokenDeleteOne

Where appends a list predicates to the TokenDelete builder.

type TokenEdges

type TokenEdges struct {
	// Subject to which the token belongs.
	Subject *Subject `json:"subject,omitempty"`
	// contains filtered or unexported fields
}

TokenEdges holds the relations/edges for other nodes in the graph.

func (TokenEdges) SubjectOrErr

func (e TokenEdges) SubjectOrErr() (*Subject, error)

SubjectOrErr returns the Subject value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TokenGroupBy

type TokenGroupBy struct {
	// contains filtered or unexported fields
}

TokenGroupBy is the group-by builder for Token entities.

func (*TokenGroupBy) Aggregate

func (tgb *TokenGroupBy) Aggregate(fns ...AggregateFunc) *TokenGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TokenGroupBy) Bool

func (s *TokenGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TokenGroupBy) BoolX

func (s *TokenGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TokenGroupBy) Bools

func (s *TokenGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TokenGroupBy) BoolsX

func (s *TokenGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TokenGroupBy) Float64

func (s *TokenGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TokenGroupBy) Float64X

func (s *TokenGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TokenGroupBy) Float64s

func (s *TokenGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TokenGroupBy) Float64sX

func (s *TokenGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TokenGroupBy) Int

func (s *TokenGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TokenGroupBy) IntX

func (s *TokenGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TokenGroupBy) Ints

func (s *TokenGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TokenGroupBy) IntsX

func (s *TokenGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TokenGroupBy) Scan

func (tgb *TokenGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TokenGroupBy) ScanX

func (s *TokenGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TokenGroupBy) String

func (s *TokenGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TokenGroupBy) StringX

func (s *TokenGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TokenGroupBy) Strings

func (s *TokenGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TokenGroupBy) StringsX

func (s *TokenGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TokenMutation

type TokenMutation struct {
	// contains filtered or unexported fields
}

TokenMutation represents an operation that mutates the Token nodes in the graph.

func (*TokenMutation) AddField

func (m *TokenMutation) 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 (*TokenMutation) AddedEdges

func (m *TokenMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TokenMutation) AddedField

func (m *TokenMutation) 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 (*TokenMutation) AddedFields

func (m *TokenMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TokenMutation) AddedIDs

func (m *TokenMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TokenMutation) ClearEdge

func (m *TokenMutation) 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 (*TokenMutation) ClearExpiration

func (m *TokenMutation) ClearExpiration()

ClearExpiration clears the value of the "expiration" field.

func (*TokenMutation) ClearField

func (m *TokenMutation) 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 (*TokenMutation) ClearSubject

func (m *TokenMutation) ClearSubject()

ClearSubject clears the "subject" edge to the Subject entity.

func (*TokenMutation) ClearedEdges

func (m *TokenMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TokenMutation) ClearedFields

func (m *TokenMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TokenMutation) Client

func (m TokenMutation) 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 (*TokenMutation) CreateTime

func (m *TokenMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*TokenMutation) EdgeCleared

func (m *TokenMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TokenMutation) ExecContext

func (c *TokenMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TokenMutation) Expiration

func (m *TokenMutation) Expiration() (r time.Time, exists bool)

Expiration returns the value of the "expiration" field in the mutation.

func (*TokenMutation) ExpirationCleared

func (m *TokenMutation) ExpirationCleared() bool

ExpirationCleared returns if the "expiration" field was cleared in this mutation.

func (*TokenMutation) Field

func (m *TokenMutation) 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 (*TokenMutation) FieldCleared

func (m *TokenMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TokenMutation) Fields

func (m *TokenMutation) 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 (*TokenMutation) ID

func (m *TokenMutation) ID() (id object.ID, 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 (*TokenMutation) IDs

func (m *TokenMutation) IDs(ctx context.Context) ([]object.ID, 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 (*TokenMutation) Kind

func (m *TokenMutation) Kind() (r string, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*TokenMutation) Name

func (m *TokenMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TokenMutation) OldCreateTime

func (m *TokenMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Token entity. If the Token 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 (*TokenMutation) OldExpiration

func (m *TokenMutation) OldExpiration(ctx context.Context) (v *time.Time, err error)

OldExpiration returns the old "expiration" field's value of the Token entity. If the Token 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 (*TokenMutation) OldField

func (m *TokenMutation) 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 (*TokenMutation) OldKind

func (m *TokenMutation) OldKind(ctx context.Context) (v string, err error)

OldKind returns the old "kind" field's value of the Token entity. If the Token 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 (*TokenMutation) OldName

func (m *TokenMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Token entity. If the Token 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 (*TokenMutation) OldSubjectID

func (m *TokenMutation) OldSubjectID(ctx context.Context) (v object.ID, err error)

OldSubjectID returns the old "subject_id" field's value of the Token entity. If the Token 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 (*TokenMutation) OldValue

func (m *TokenMutation) OldValue(ctx context.Context) (v crypto.String, err error)

OldValue returns the old "value" field's value of the Token entity. If the Token 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 (*TokenMutation) Op

func (m *TokenMutation) Op() Op

Op returns the operation name.

func (*TokenMutation) QueryContext

func (c *TokenMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TokenMutation) RemovedEdges

func (m *TokenMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TokenMutation) RemovedIDs

func (m *TokenMutation) 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 (*TokenMutation) ResetCreateTime

func (m *TokenMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*TokenMutation) ResetEdge

func (m *TokenMutation) 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 (*TokenMutation) ResetExpiration

func (m *TokenMutation) ResetExpiration()

ResetExpiration resets all changes to the "expiration" field.

func (*TokenMutation) ResetField

func (m *TokenMutation) 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 (*TokenMutation) ResetKind

func (m *TokenMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*TokenMutation) ResetName

func (m *TokenMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TokenMutation) ResetSubject

func (m *TokenMutation) ResetSubject()

ResetSubject resets all changes to the "subject" edge.

func (*TokenMutation) ResetSubjectID

func (m *TokenMutation) ResetSubjectID()

ResetSubjectID resets all changes to the "subject_id" field.

func (*TokenMutation) ResetValue

func (m *TokenMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*TokenMutation) SetCreateTime

func (m *TokenMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*TokenMutation) SetExpiration

func (m *TokenMutation) SetExpiration(t time.Time)

SetExpiration sets the "expiration" field.

func (*TokenMutation) SetField

func (m *TokenMutation) 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 (*TokenMutation) SetID

func (m *TokenMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Token entities.

func (*TokenMutation) SetKind

func (m *TokenMutation) SetKind(s string)

SetKind sets the "kind" field.

func (*TokenMutation) SetName

func (m *TokenMutation) SetName(s string)

SetName sets the "name" field.

func (*TokenMutation) SetOp

func (m *TokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TokenMutation) SetSubjectID

func (m *TokenMutation) SetSubjectID(o object.ID)

SetSubjectID sets the "subject_id" field.

func (*TokenMutation) SetValue

func (m *TokenMutation) SetValue(c crypto.String)

SetValue sets the "value" field.

func (*TokenMutation) SubjectCleared

func (m *TokenMutation) SubjectCleared() bool

SubjectCleared reports if the "subject" edge to the Subject entity was cleared.

func (*TokenMutation) SubjectID

func (m *TokenMutation) SubjectID() (r object.ID, exists bool)

SubjectID returns the value of the "subject_id" field in the mutation.

func (*TokenMutation) SubjectIDs

func (m *TokenMutation) SubjectIDs() (ids []object.ID)

SubjectIDs returns the "subject" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubjectID instead. It exists only for internal usage by the builders.

func (TokenMutation) Tx

func (m TokenMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TokenMutation) Type

func (m *TokenMutation) Type() string

Type returns the node type of this mutation (Token).

func (*TokenMutation) Value

func (m *TokenMutation) Value() (r crypto.String, exists bool)

Value returns the value of the "value" field in the mutation.

func (*TokenMutation) Where

func (m *TokenMutation) Where(ps ...predicate.Token)

Where appends a list predicates to the TokenMutation builder.

func (*TokenMutation) WhereP

func (m *TokenMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TokenOutput

type TokenOutput struct {
	ID          object.ID  `json:"id,omitempty"`
	CreateTime  *time.Time `json:"createTime,omitempty"`
	Kind        string     `json:"kind,omitempty"`
	Name        string     `json:"name,omitempty"`
	Expiration  *time.Time `json:"expiration,omitempty"`
	AccessToken string     `json:"accessToken,omitempty"`

	Subject *SubjectOutput `json:"subject,omitempty"`
}

TokenOutput holds the output of the Token entity.

func ExposeToken

func ExposeToken(_t *Token) *TokenOutput

ExposeToken converts the Token to TokenOutput.

func ExposeTokens

func ExposeTokens(_ts []*Token) []*TokenOutput

ExposeTokens converts the Token slice to TokenOutput pointer slice.

type TokenPatchInput added in v0.5.0

type TokenPatchInput struct {
	TokenQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// The kind of token.
	Kind string `path:"-" query:"-" json:"kind,omitempty"`
	// The name of token.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// The time of expiration, empty means forever.
	Expiration *time.Time `path:"-" query:"-" json:"expiration,omitempty"`
	// The value of token, store in string.
	Value crypto.String `path:"-" query:"-" json:"value,omitempty"`
	// AccessToken is the token used for authentication.
	AccessToken string `path:"-" query:"-" json:"accessToken,omitempty"`
	// contains filtered or unexported fields
}

TokenPatchInput holds the patch input of the Token entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*TokenPatchInput) Model added in v0.5.0

func (tpi *TokenPatchInput) Model() *Token

Model returns the Token patched entity, after validating.

func (*TokenPatchInput) PatchModel added in v0.5.0

func (tpi *TokenPatchInput) PatchModel() *Token

PatchModel returns the Token partition entity for patching.

func (*TokenPatchInput) SetGinContext added in v0.5.0

func (ic *TokenPatchInput) SetGinContext(ctx *gin.Context)

func (*TokenPatchInput) SetModelClient added in v0.5.0

func (ic *TokenPatchInput) SetModelClient(cli *Client)

func (*TokenPatchInput) Validate added in v0.5.0

func (tpi *TokenPatchInput) Validate() error

Validate checks the TokenPatchInput entity.

func (*TokenPatchInput) ValidateWith added in v0.5.0

func (tpi *TokenPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenPatchInput entity with the given context and client set.

type TokenQuery

type TokenQuery struct {
	// contains filtered or unexported fields
}

TokenQuery is the builder for querying Token entities.

func (*TokenQuery) Aggregate

func (tq *TokenQuery) Aggregate(fns ...AggregateFunc) *TokenSelect

Aggregate returns a TokenSelect configured with the given aggregations.

func (*TokenQuery) All

func (tq *TokenQuery) All(ctx context.Context) ([]*Token, error)

All executes the query and returns a list of Tokens.

func (*TokenQuery) AllX

func (tq *TokenQuery) AllX(ctx context.Context) []*Token

AllX is like All, but panics if an error occurs.

func (*TokenQuery) Clone

func (tq *TokenQuery) Clone() *TokenQuery

Clone returns a duplicate of the TokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TokenQuery) Count

func (tq *TokenQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TokenQuery) CountX

func (tq *TokenQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TokenQuery) ExecContext

func (c *TokenQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TokenQuery) Exist

func (tq *TokenQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TokenQuery) ExistX

func (tq *TokenQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TokenQuery) First

func (tq *TokenQuery) First(ctx context.Context) (*Token, error)

First returns the first Token entity from the query. Returns a *NotFoundError when no Token was found.

func (*TokenQuery) FirstID

func (tq *TokenQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Token ID from the query. Returns a *NotFoundError when no Token ID was found.

func (*TokenQuery) FirstIDX

func (tq *TokenQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TokenQuery) FirstX

func (tq *TokenQuery) FirstX(ctx context.Context) *Token

FirstX is like First, but panics if an error occurs.

func (*TokenQuery) ForShare

func (tq *TokenQuery) ForShare(opts ...sql.LockOption) *TokenQuery

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 (*TokenQuery) ForUpdate

func (tq *TokenQuery) ForUpdate(opts ...sql.LockOption) *TokenQuery

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 (*TokenQuery) GroupBy

func (tq *TokenQuery) GroupBy(field string, fields ...string) *TokenGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Token.Query().
	GroupBy(token.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*TokenQuery) IDs

func (tq *TokenQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Token IDs.

func (*TokenQuery) IDsX

func (tq *TokenQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*TokenQuery) Limit

func (tq *TokenQuery) Limit(limit int) *TokenQuery

Limit the number of records to be returned by this query.

func (*TokenQuery) Modify

func (tq *TokenQuery) Modify(modifiers ...func(s *sql.Selector)) *TokenSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TokenQuery) Offset

func (tq *TokenQuery) Offset(offset int) *TokenQuery

Offset to start from.

func (*TokenQuery) Only

func (tq *TokenQuery) Only(ctx context.Context) (*Token, error)

Only returns a single Token entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Token entity is found. Returns a *NotFoundError when no Token entities are found.

func (*TokenQuery) OnlyID

func (tq *TokenQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only Token ID in the query. Returns a *NotSingularError when more than one Token ID is found. Returns a *NotFoundError when no entities are found.

func (*TokenQuery) OnlyIDX

func (tq *TokenQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TokenQuery) OnlyX

func (tq *TokenQuery) OnlyX(ctx context.Context) *Token

OnlyX is like Only, but panics if an error occurs.

func (*TokenQuery) Order

func (tq *TokenQuery) Order(o ...token.OrderOption) *TokenQuery

Order specifies how the records should be ordered.

func (*TokenQuery) QueryContext

func (c *TokenQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TokenQuery) QuerySubject

func (tq *TokenQuery) QuerySubject() *SubjectQuery

QuerySubject chains the current query on the "subject" edge.

func (*TokenQuery) Select

func (tq *TokenQuery) Select(fields ...string) *TokenSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Token.Query().
	Select(token.FieldCreateTime).
	Scan(ctx, &v)

func (*TokenQuery) Unique

func (tq *TokenQuery) Unique(unique bool) *TokenQuery

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 (*TokenQuery) Where

func (tq *TokenQuery) Where(ps ...predicate.Token) *TokenQuery

Where adds a new predicate for the TokenQuery builder.

func (*TokenQuery) WhereP

func (tq *TokenQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TokenQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*TokenQuery) WithSubject

func (tq *TokenQuery) WithSubject(opts ...func(*SubjectQuery)) *TokenQuery

WithSubject tells the query-builder to eager-load the nodes that are connected to the "subject" edge. The optional arguments are used to configure the query builder of the edge.

type TokenQueryInput

type TokenQueryInput struct {

	// Refer holds the route path reference of the Token entity.
	Refer *object.Refer `path:"token,default=" query:"-" json:"-"`
	// ID of the Token entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Token entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

TokenQueryInput holds the query input of the Token entity, please tags with `path:",inline"` if embedding.

func (*TokenQueryInput) Model

func (tqi *TokenQueryInput) Model() *Token

Model returns the Token entity for querying, after validating.

func (*TokenQueryInput) SetGinContext

func (ic *TokenQueryInput) SetGinContext(ctx *gin.Context)

func (*TokenQueryInput) SetModelClient

func (ic *TokenQueryInput) SetModelClient(cli *Client)

func (*TokenQueryInput) Validate

func (tqi *TokenQueryInput) Validate() error

Validate checks the TokenQueryInput entity.

func (*TokenQueryInput) ValidateWith

func (tqi *TokenQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenQueryInput entity with the given context and client set.

type TokenQueryInputs

type TokenQueryInputs struct {
	// contains filtered or unexported fields
}

TokenQueryInputs holds the query input of the Token entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*TokenQueryInputs) SetGinContext

func (ic *TokenQueryInputs) SetGinContext(ctx *gin.Context)

func (*TokenQueryInputs) SetModelClient

func (ic *TokenQueryInputs) SetModelClient(cli *Client)

func (*TokenQueryInputs) Validate

func (tqi *TokenQueryInputs) Validate() error

Validate checks the TokenQueryInputs entity.

func (*TokenQueryInputs) ValidateWith

func (tqi *TokenQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenQueryInputs entity with the given context and client set.

type TokenSelect

type TokenSelect struct {
	*TokenQuery
	// contains filtered or unexported fields
}

TokenSelect is the builder for selecting fields of Token entities.

func (*TokenSelect) Aggregate

func (ts *TokenSelect) Aggregate(fns ...AggregateFunc) *TokenSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TokenSelect) Bool

func (s *TokenSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TokenSelect) BoolX

func (s *TokenSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TokenSelect) Bools

func (s *TokenSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TokenSelect) BoolsX

func (s *TokenSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (TokenSelect) ExecContext

func (c TokenSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TokenSelect) Float64

func (s *TokenSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TokenSelect) Float64X

func (s *TokenSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TokenSelect) Float64s

func (s *TokenSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TokenSelect) Float64sX

func (s *TokenSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TokenSelect) Int

func (s *TokenSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TokenSelect) IntX

func (s *TokenSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TokenSelect) Ints

func (s *TokenSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TokenSelect) IntsX

func (s *TokenSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TokenSelect) Modify

func (ts *TokenSelect) Modify(modifiers ...func(s *sql.Selector)) *TokenSelect

Modify adds a query modifier for attaching custom logic to queries.

func (TokenSelect) QueryContext

func (c TokenSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TokenSelect) Scan

func (ts *TokenSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TokenSelect) ScanX

func (s *TokenSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TokenSelect) String

func (s *TokenSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TokenSelect) StringX

func (s *TokenSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TokenSelect) Strings

func (s *TokenSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TokenSelect) StringsX

func (s *TokenSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TokenUpdate

type TokenUpdate struct {
	// contains filtered or unexported fields
}

TokenUpdate is the builder for updating Token entities.

func (*TokenUpdate) Exec

func (tu *TokenUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TokenUpdate) ExecContext

func (c *TokenUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TokenUpdate) ExecX

func (tu *TokenUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokenUpdate) Modify

func (tu *TokenUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TokenUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TokenUpdate) Mutation

func (tu *TokenUpdate) Mutation() *TokenMutation

Mutation returns the TokenMutation object of the builder.

func (*TokenUpdate) QueryContext

func (c *TokenUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TokenUpdate) Save

func (tu *TokenUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TokenUpdate) SaveX

func (tu *TokenUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TokenUpdate) Where

func (tu *TokenUpdate) Where(ps ...predicate.Token) *TokenUpdate

Where appends a list predicates to the TokenUpdate builder.

type TokenUpdateInput

type TokenUpdateInput struct {
	TokenQueryInput `path:",inline" query:"-" json:"-"`
}

TokenUpdateInput holds the modification input of the Token entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*TokenUpdateInput) Model

func (tui *TokenUpdateInput) Model() *Token

Model returns the Token entity for modifying, after validating.

func (*TokenUpdateInput) SetGinContext

func (ic *TokenUpdateInput) SetGinContext(ctx *gin.Context)

func (*TokenUpdateInput) SetModelClient

func (ic *TokenUpdateInput) SetModelClient(cli *Client)

func (*TokenUpdateInput) Validate

func (tui *TokenUpdateInput) Validate() error

Validate checks the TokenUpdateInput entity.

func (*TokenUpdateInput) ValidateWith

func (tui *TokenUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenUpdateInput entity with the given context and client set.

type TokenUpdateInputs

type TokenUpdateInputs struct {

	// Items holds the entities to create, which MUST not be empty.
	Items []*TokenUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

TokenUpdateInputs holds the modification input of the Token entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*TokenUpdateInputs) IDs

func (tui *TokenUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Token entities for modifying, after validating.

func (*TokenUpdateInputs) Model

func (tui *TokenUpdateInputs) Model() []*Token

Model returns the Token entities for modifying, after validating.

func (*TokenUpdateInputs) SetGinContext

func (ic *TokenUpdateInputs) SetGinContext(ctx *gin.Context)

func (*TokenUpdateInputs) SetModelClient

func (ic *TokenUpdateInputs) SetModelClient(cli *Client)

func (*TokenUpdateInputs) Validate

func (tui *TokenUpdateInputs) Validate() error

Validate checks the TokenUpdateInputs entity.

func (*TokenUpdateInputs) ValidateWith

func (tui *TokenUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenUpdateInputs entity with the given context and client set.

type TokenUpdateInputsItem

type TokenUpdateInputsItem struct {
	// ID of the Token entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Token entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

TokenUpdateInputs holds the modification input item of the Token entities.

func (*TokenUpdateInputsItem) ValidateWith

func (tui *TokenUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the TokenUpdateInputsItem entity with the given context and client set.

type TokenUpdateOne

type TokenUpdateOne struct {
	// contains filtered or unexported fields
}

TokenUpdateOne is the builder for updating a single Token entity.

func (*TokenUpdateOne) Exec

func (tuo *TokenUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TokenUpdateOne) ExecContext

func (c *TokenUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TokenUpdateOne) ExecX

func (tuo *TokenUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokenUpdateOne) Modify

func (tuo *TokenUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TokenUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TokenUpdateOne) Mutation

func (tuo *TokenUpdateOne) Mutation() *TokenMutation

Mutation returns the TokenMutation object of the builder.

func (*TokenUpdateOne) QueryContext

func (c *TokenUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TokenUpdateOne) Save

func (tuo *TokenUpdateOne) Save(ctx context.Context) (*Token, error)

Save executes the query and returns the updated Token entity.

func (*TokenUpdateOne) SaveX

func (tuo *TokenUpdateOne) SaveX(ctx context.Context) *Token

SaveX is like Save, but panics if an error occurs.

func (*TokenUpdateOne) Select

func (tuo *TokenUpdateOne) Select(field string, fields ...string) *TokenUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TokenUpdateOne) Where

func (tuo *TokenUpdateOne) Where(ps ...predicate.Token) *TokenUpdateOne

Where appends a list predicates to the TokenUpdate builder.

type TokenUpsert

type TokenUpsert struct {
	*sql.UpdateSet
}

TokenUpsert is the "OnConflict" setter.

type TokenUpsertBulk

type TokenUpsertBulk struct {
	// contains filtered or unexported fields
}

TokenUpsertBulk is the builder for "upsert"-ing a bulk of Token nodes.

func (*TokenUpsertBulk) DoNothing

func (u *TokenUpsertBulk) DoNothing() *TokenUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TokenUpsertBulk) Exec

func (u *TokenUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TokenUpsertBulk) ExecE

func (u *TokenUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Token) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TokenUpsertBulk) ExecEX

func (u *TokenUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Token) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TokenUpsertBulk) ExecX

func (u *TokenUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokenUpsertBulk) Ignore

func (u *TokenUpsertBulk) Ignore() *TokenUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Token.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TokenUpsertBulk) Update

func (u *TokenUpsertBulk) Update(set func(*TokenUpsert)) *TokenUpsertBulk

Update allows overriding fields `UPDATE` values. See the TokenCreateBulk.OnConflict documentation for more info.

func (*TokenUpsertBulk) UpdateNewValues

func (u *TokenUpsertBulk) UpdateNewValues() *TokenUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Token.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(token.FieldID)
		}),
	).
	Exec(ctx)

type TokenUpsertOne

type TokenUpsertOne struct {
	// contains filtered or unexported fields
}

TokenUpsertOne is the builder for "upsert"-ing

one Token node.

func (*TokenUpsertOne) DoNothing

func (u *TokenUpsertOne) DoNothing() *TokenUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TokenUpsertOne) Exec

func (u *TokenUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*TokenUpsertOne) ExecE

func (u *TokenUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Token) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*TokenUpsertOne) ExecEX

func (u *TokenUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Token) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*TokenUpsertOne) ExecX

func (u *TokenUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokenUpsertOne) ID

func (u *TokenUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TokenUpsertOne) IDX

func (u *TokenUpsertOne) IDX(ctx context.Context) object.ID

IDX is like ID, but panics if an error occurs.

func (*TokenUpsertOne) Ignore

func (u *TokenUpsertOne) Ignore() *TokenUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Token.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TokenUpsertOne) Update

func (u *TokenUpsertOne) Update(set func(*TokenUpsert)) *TokenUpsertOne

Update allows overriding fields `UPDATE` values. See the TokenCreate.OnConflict documentation for more info.

func (*TokenUpsertOne) UpdateNewValues

func (u *TokenUpsertOne) UpdateNewValues() *TokenUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Token.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(token.FieldID)
		}),
	).
	Exec(ctx)

type Tokens

type Tokens []*Token

Tokens is a parsable slice of Token.

func (Tokens) View

func (_ts Tokens) View() []*TokenOutput

View returns the output of Token entities.

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 {

	// Catalog is the client for interacting with the Catalog builders.
	Catalog *CatalogClient
	// Connector is the client for interacting with the Connector builders.
	Connector *ConnectorClient
	// CostReport is the client for interacting with the CostReport builders.
	CostReport *CostReportClient
	// DistributeLock is the client for interacting with the DistributeLock builders.
	DistributeLock *DistributeLockClient
	// Environment is the client for interacting with the Environment builders.
	Environment *EnvironmentClient
	// EnvironmentConnectorRelationship is the client for interacting with the EnvironmentConnectorRelationship builders.
	EnvironmentConnectorRelationship *EnvironmentConnectorRelationshipClient
	// Perspective is the client for interacting with the Perspective builders.
	Perspective *PerspectiveClient
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// Resource is the client for interacting with the Resource builders.
	Resource *ResourceClient
	// ResourceComponent is the client for interacting with the ResourceComponent builders.
	ResourceComponent *ResourceComponentClient
	// ResourceComponentRelationship is the client for interacting with the ResourceComponentRelationship builders.
	ResourceComponentRelationship *ResourceComponentRelationshipClient
	// ResourceDefinition is the client for interacting with the ResourceDefinition builders.
	ResourceDefinition *ResourceDefinitionClient
	// ResourceDefinitionMatchingRule is the client for interacting with the ResourceDefinitionMatchingRule builders.
	ResourceDefinitionMatchingRule *ResourceDefinitionMatchingRuleClient
	// ResourceRelationship is the client for interacting with the ResourceRelationship builders.
	ResourceRelationship *ResourceRelationshipClient
	// ResourceRun is the client for interacting with the ResourceRun builders.
	ResourceRun *ResourceRunClient
	// ResourceState is the client for interacting with the ResourceState builders.
	ResourceState *ResourceStateClient
	// Role is the client for interacting with the Role builders.
	Role *RoleClient
	// Setting is the client for interacting with the Setting builders.
	Setting *SettingClient
	// Subject is the client for interacting with the Subject builders.
	Subject *SubjectClient
	// SubjectRoleRelationship is the client for interacting with the SubjectRoleRelationship builders.
	SubjectRoleRelationship *SubjectRoleRelationshipClient
	// Template is the client for interacting with the Template builders.
	Template *TemplateClient
	// TemplateVersion is the client for interacting with the TemplateVersion builders.
	TemplateVersion *TemplateVersionClient
	// Token is the client for interacting with the Token builders.
	Token *TokenClient
	// Variable is the client for interacting with the Variable builders.
	Variable *VariableClient
	// Workflow is the client for interacting with the Workflow builders.
	Workflow *WorkflowClient
	// WorkflowExecution is the client for interacting with the WorkflowExecution builders.
	WorkflowExecution *WorkflowExecutionClient
	// WorkflowStage is the client for interacting with the WorkflowStage builders.
	WorkflowStage *WorkflowStageClient
	// WorkflowStageExecution is the client for interacting with the WorkflowStageExecution builders.
	WorkflowStageExecution *WorkflowStageExecutionClient
	// WorkflowStep is the client for interacting with the WorkflowStep builders.
	WorkflowStep *WorkflowStepClient
	// WorkflowStepExecution is the client for interacting with the WorkflowStepExecution builders.
	WorkflowStepExecution *WorkflowStepExecutionClient
	// 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) Catalogs

func (tx *Tx) Catalogs() *CatalogClient

Catalogs implements the ClientSet.

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) Connectors

func (tx *Tx) Connectors() *ConnectorClient

Connectors implements the ClientSet.

func (*Tx) CostReports

func (tx *Tx) CostReports() *CostReportClient

CostReports implements the ClientSet.

func (*Tx) Dialect

func (tx *Tx) Dialect() string

Dialect returns the dialect name of the driver.

func (*Tx) DistributeLocks

func (tx *Tx) DistributeLocks() *DistributeLockClient

DistributeLocks implements the ClientSet.

func (*Tx) EnvironmentConnectorRelationships

func (tx *Tx) EnvironmentConnectorRelationships() *EnvironmentConnectorRelationshipClient

EnvironmentConnectorRelationships implements the ClientSet.

func (*Tx) Environments

func (tx *Tx) Environments() *EnvironmentClient

Environments implements the ClientSet.

func (*Tx) ExecContext

func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Tx) Intercept

func (tx *Tx) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients.

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) Perspectives

func (tx *Tx) Perspectives() *PerspectiveClient

Perspectives implements the ClientSet.

func (*Tx) Projects

func (tx *Tx) Projects() *ProjectClient

Projects implements the ClientSet.

func (*Tx) QueryContext

func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Tx) ResourceComponentRelationships added in v0.4.0

func (tx *Tx) ResourceComponentRelationships() *ResourceComponentRelationshipClient

ResourceComponentRelationships implements the ClientSet.

func (*Tx) ResourceComponents added in v0.4.0

func (tx *Tx) ResourceComponents() *ResourceComponentClient

ResourceComponents implements the ClientSet.

func (*Tx) ResourceDefinitionMatchingRules added in v0.4.0

func (tx *Tx) ResourceDefinitionMatchingRules() *ResourceDefinitionMatchingRuleClient

ResourceDefinitionMatchingRules implements the ClientSet.

func (*Tx) ResourceDefinitions added in v0.4.0

func (tx *Tx) ResourceDefinitions() *ResourceDefinitionClient

ResourceDefinitions implements the ClientSet.

func (*Tx) ResourceRelationships added in v0.4.0

func (tx *Tx) ResourceRelationships() *ResourceRelationshipClient

ResourceRelationships implements the ClientSet.

func (*Tx) ResourceRuns added in v0.6.0

func (tx *Tx) ResourceRuns() *ResourceRunClient

ResourceRuns implements the ClientSet.

func (*Tx) ResourceStates added in v0.6.0

func (tx *Tx) ResourceStates() *ResourceStateClient

ResourceStates implements the ClientSet.

func (*Tx) Resources added in v0.4.0

func (tx *Tx) Resources() *ResourceClient

Resources implements the ClientSet.

func (*Tx) Roles

func (tx *Tx) Roles() *RoleClient

Roles implements the ClientSet.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

func (*Tx) Settings

func (tx *Tx) Settings() *SettingClient

Settings implements the ClientSet.

func (*Tx) SubjectRoleRelationships

func (tx *Tx) SubjectRoleRelationships() *SubjectRoleRelationshipClient

SubjectRoleRelationships implements the ClientSet.

func (*Tx) Subjects

func (tx *Tx) Subjects() *SubjectClient

Subjects implements the ClientSet.

func (*Tx) TemplateVersions

func (tx *Tx) TemplateVersions() *TemplateVersionClient

TemplateVersions implements the ClientSet.

func (*Tx) Templates

func (tx *Tx) Templates() *TemplateClient

Templates implements the ClientSet.

func (*Tx) Tokens

func (tx *Tx) Tokens() *TokenClient

Tokens implements the ClientSet.

func (*Tx) Use

func (tx *Tx) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients.

func (*Tx) Variables

func (tx *Tx) Variables() *VariableClient

Variables implements the ClientSet.

func (*Tx) WithDebug

func (tx *Tx) WithDebug() ClientSet

WithDebug enables the debug mode of the client.

func (*Tx) WithTx

func (tx *Tx) WithTx(ctx context.Context, cb func(tx *Tx) error) error

WithTx gives a new transactional client in the callback function, if already in a transaction, this will keep in the same transaction.

func (*Tx) WorkflowExecutions added in v0.4.0

func (tx *Tx) WorkflowExecutions() *WorkflowExecutionClient

WorkflowExecutions implements the ClientSet.

func (*Tx) WorkflowStageExecutions added in v0.4.0

func (tx *Tx) WorkflowStageExecutions() *WorkflowStageExecutionClient

WorkflowStageExecutions implements the ClientSet.

func (*Tx) WorkflowStages added in v0.4.0

func (tx *Tx) WorkflowStages() *WorkflowStageClient

WorkflowStages implements the ClientSet.

func (*Tx) WorkflowStepExecutions added in v0.4.0

func (tx *Tx) WorkflowStepExecutions() *WorkflowStepExecutionClient

WorkflowStepExecutions implements the ClientSet.

func (*Tx) WorkflowSteps added in v0.4.0

func (tx *Tx) WorkflowSteps() *WorkflowStepClient

WorkflowSteps implements the ClientSet.

func (*Tx) Workflows added in v0.4.0

func (tx *Tx) Workflows() *WorkflowClient

Workflows implements the ClientSet.

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 Variable

type Variable struct {

	// ID of the ent.
	ID object.ID `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// ID of the project to belong, empty means for all projects.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the environment to which the variable belongs to.
	EnvironmentID object.ID `json:"environment_id,omitempty"`
	// The name of variable.
	Name string `json:"name,omitempty"`
	// The value of variable, store in string.
	Value crypto.String `json:"value,omitempty"`
	// The value is sensitive or not.
	Sensitive bool `json:"sensitive,omitempty"`
	// Description of the variable.
	Description string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VariableQuery when eager-loading is set.
	Edges VariableEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

Variable is the model entity for the Variable schema.

func (*Variable) ExecContext

func (c *Variable) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Variable) GetValue

func (v *Variable) GetValue(name string) (ent.Value, error)

GetValue returns the ent.Value that was dynamically selected and assigned to the Variable. This includes values selected through modifiers, order, etc.

func (*Variable) QueryContext

func (c *Variable) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Variable) QueryEnvironment

func (v *Variable) QueryEnvironment() *EnvironmentQuery

QueryEnvironment queries the "environment" edge of the Variable entity.

func (*Variable) QueryProject

func (v *Variable) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Variable entity.

func (*Variable) String

func (v *Variable) String() string

String implements the fmt.Stringer.

func (*Variable) Unwrap

func (v *Variable) Unwrap() *Variable

Unwrap unwraps the Variable 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 (*Variable) Update

func (v *Variable) Update() *VariableUpdateOne

Update returns a builder for updating this Variable. Note that you need to call Variable.Unwrap() before calling this method if this Variable was returned from a transaction, and the transaction was committed or rolled back.

func (*Variable) View

func (_v *Variable) View() *VariableOutput

View returns the output of Variable entity.

type VariableClient

type VariableClient struct {
	// contains filtered or unexported fields
}

VariableClient is a client for the Variable schema.

func NewVariableClient

func NewVariableClient(c config) *VariableClient

NewVariableClient returns a client for the Variable from the given config.

func (*VariableClient) Create

func (c *VariableClient) Create() *VariableCreate

Create returns a builder for creating a Variable entity.

func (*VariableClient) CreateBulk

func (c *VariableClient) CreateBulk(builders ...*VariableCreate) *VariableCreateBulk

CreateBulk returns a builder for creating a bulk of Variable entities.

func (*VariableClient) Delete

func (c *VariableClient) Delete() *VariableDelete

Delete returns a delete builder for Variable.

func (*VariableClient) DeleteOne

func (c *VariableClient) DeleteOne(v *Variable) *VariableDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VariableClient) DeleteOneID

func (c *VariableClient) DeleteOneID(id object.ID) *VariableDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VariableClient) ExecContext

func (c *VariableClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VariableClient) Get

func (c *VariableClient) Get(ctx context.Context, id object.ID) (*Variable, error)

Get returns a Variable entity by its id.

func (*VariableClient) GetX

func (c *VariableClient) GetX(ctx context.Context, id object.ID) *Variable

GetX is like Get, but panics if an error occurs.

func (*VariableClient) Hooks

func (c *VariableClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VariableClient) Intercept

func (c *VariableClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `variable.Intercept(f(g(h())))`.

func (*VariableClient) Interceptors

func (c *VariableClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VariableClient) MapCreateBulk added in v0.5.0

func (c *VariableClient) MapCreateBulk(slice any, setFunc func(*VariableCreate, int)) *VariableCreateBulk

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 (*VariableClient) Query

func (c *VariableClient) Query() *VariableQuery

Query returns a query builder for Variable.

func (*VariableClient) QueryContext

func (c *VariableClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VariableClient) QueryEnvironment

func (c *VariableClient) QueryEnvironment(v *Variable) *EnvironmentQuery

QueryEnvironment queries the environment edge of a Variable.

func (*VariableClient) QueryProject

func (c *VariableClient) QueryProject(v *Variable) *ProjectQuery

QueryProject queries the project edge of a Variable.

func (*VariableClient) Update

func (c *VariableClient) Update() *VariableUpdate

Update returns an update builder for Variable.

func (*VariableClient) UpdateOne

func (c *VariableClient) UpdateOne(v *Variable) *VariableUpdateOne

UpdateOne returns an update builder for the given entity.

func (*VariableClient) UpdateOneID

func (c *VariableClient) UpdateOneID(id object.ID) *VariableUpdateOne

UpdateOneID returns an update builder for the given id.

func (*VariableClient) Use

func (c *VariableClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `variable.Hooks(f(g(h())))`.

type VariableClientGetter

type VariableClientGetter interface {
	// Variables returns the client for interacting with the Variable builders.
	Variables() *VariableClient
}

VariableClientGetter is an interface that allows getting VariableClient.

type VariableCreate

type VariableCreate struct {
	// contains filtered or unexported fields
}

VariableCreate is the builder for creating a Variable entity.

func (*VariableCreate) Exec

func (vc *VariableCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VariableCreate) ExecContext

func (c *VariableCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VariableCreate) ExecE

func (vc *VariableCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Variable) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*VariableCreate) ExecEX

func (vc *VariableCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Variable) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*VariableCreate) ExecX

func (vc *VariableCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VariableCreate) Mutation

func (vc *VariableCreate) Mutation() *VariableMutation

Mutation returns the VariableMutation object of the builder.

func (*VariableCreate) OnConflict

func (vc *VariableCreate) OnConflict(opts ...sql.ConflictOption) *VariableUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Variable.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VariableUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*VariableCreate) OnConflictColumns

func (vc *VariableCreate) OnConflictColumns(columns ...string) *VariableUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Variable.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VariableCreate) QueryContext

func (c *VariableCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VariableCreate) Save

func (vc *VariableCreate) Save(ctx context.Context) (*Variable, error)

Save creates the Variable in the database.

func (*VariableCreate) SaveE

func (vc *VariableCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Variable) error) (*Variable, error)

SaveE calls the given function after created the Variable entity, which is always good for cascading create operations.

func (*VariableCreate) SaveEX

func (vc *VariableCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Variable) error) *Variable

SaveEX is like SaveE, but panics if an error occurs.

func (*VariableCreate) SaveX

func (vc *VariableCreate) SaveX(ctx context.Context) *Variable

SaveX calls Save and panics if Save returns an error.

func (*VariableCreate) Set

func (vc *VariableCreate) Set(obj *Variable) *VariableCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*VariableCreate) SetCreateTime

func (vc *VariableCreate) SetCreateTime(t time.Time) *VariableCreate

SetCreateTime sets the "create_time" field.

func (*VariableCreate) SetDescription

func (vc *VariableCreate) SetDescription(s string) *VariableCreate

SetDescription sets the "description" field.

func (*VariableCreate) SetEnvironment

func (vc *VariableCreate) SetEnvironment(e *Environment) *VariableCreate

SetEnvironment sets the "environment" edge to the Environment entity.

func (*VariableCreate) SetEnvironmentID

func (vc *VariableCreate) SetEnvironmentID(o object.ID) *VariableCreate

SetEnvironmentID sets the "environment_id" field.

func (*VariableCreate) SetID

func (vc *VariableCreate) SetID(o object.ID) *VariableCreate

SetID sets the "id" field.

func (*VariableCreate) SetName

func (vc *VariableCreate) SetName(s string) *VariableCreate

SetName sets the "name" field.

func (*VariableCreate) SetNillableCreateTime

func (vc *VariableCreate) SetNillableCreateTime(t *time.Time) *VariableCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*VariableCreate) SetNillableDescription

func (vc *VariableCreate) SetNillableDescription(s *string) *VariableCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*VariableCreate) SetNillableEnvironmentID

func (vc *VariableCreate) SetNillableEnvironmentID(o *object.ID) *VariableCreate

SetNillableEnvironmentID sets the "environment_id" field if the given value is not nil.

func (*VariableCreate) SetNillableProjectID

func (vc *VariableCreate) SetNillableProjectID(o *object.ID) *VariableCreate

SetNillableProjectID sets the "project_id" field if the given value is not nil.

func (*VariableCreate) SetNillableSensitive

func (vc *VariableCreate) SetNillableSensitive(b *bool) *VariableCreate

SetNillableSensitive sets the "sensitive" field if the given value is not nil.

func (*VariableCreate) SetNillableUpdateTime

func (vc *VariableCreate) SetNillableUpdateTime(t *time.Time) *VariableCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*VariableCreate) SetProject

func (vc *VariableCreate) SetProject(p *Project) *VariableCreate

SetProject sets the "project" edge to the Project entity.

func (*VariableCreate) SetProjectID

func (vc *VariableCreate) SetProjectID(o object.ID) *VariableCreate

SetProjectID sets the "project_id" field.

func (*VariableCreate) SetSensitive

func (vc *VariableCreate) SetSensitive(b bool) *VariableCreate

SetSensitive sets the "sensitive" field.

func (*VariableCreate) SetUpdateTime

func (vc *VariableCreate) SetUpdateTime(t time.Time) *VariableCreate

SetUpdateTime sets the "update_time" field.

func (*VariableCreate) SetValue

func (vc *VariableCreate) SetValue(c crypto.String) *VariableCreate

SetValue sets the "value" field.

type VariableCreateBulk

type VariableCreateBulk struct {
	// contains filtered or unexported fields
}

VariableCreateBulk is the builder for creating many Variable entities in bulk.

func (*VariableCreateBulk) Exec

func (vcb *VariableCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VariableCreateBulk) ExecContext

func (c *VariableCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VariableCreateBulk) ExecE

func (vcb *VariableCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Variable) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*VariableCreateBulk) ExecEX

func (vcb *VariableCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Variable) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*VariableCreateBulk) ExecX

func (vcb *VariableCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VariableCreateBulk) OnConflict

func (vcb *VariableCreateBulk) OnConflict(opts ...sql.ConflictOption) *VariableUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Variable.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VariableUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*VariableCreateBulk) OnConflictColumns

func (vcb *VariableCreateBulk) OnConflictColumns(columns ...string) *VariableUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Variable.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VariableCreateBulk) QueryContext

func (c *VariableCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VariableCreateBulk) Save

func (vcb *VariableCreateBulk) Save(ctx context.Context) ([]*Variable, error)

Save creates the Variable entities in the database.

func (*VariableCreateBulk) SaveE

func (vcb *VariableCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Variable) error) ([]*Variable, error)

SaveE calls the given function after created the Variable entities, which is always good for cascading create operations.

func (*VariableCreateBulk) SaveEX

func (vcb *VariableCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Variable) error) []*Variable

SaveEX is like SaveE, but panics if an error occurs.

func (*VariableCreateBulk) SaveX

func (vcb *VariableCreateBulk) SaveX(ctx context.Context) []*Variable

SaveX is like Save, but panics if an error occurs.

func (*VariableCreateBulk) Set

func (vcb *VariableCreateBulk) Set(objs ...*Variable) *VariableCreateBulk

Set leverages the VariableCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type VariableCreateInput

type VariableCreateInput struct {

	// Project indicates to create Variable entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to create Variable entity CAN under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// The value of variable, store in string.
	Value crypto.String `path:"-" query:"-" json:"value"`
	// The name of variable.
	Name string `path:"-" query:"-" json:"name"`
	// The value is sensitive or not.
	Sensitive bool `path:"-" query:"-" json:"sensitive,omitempty"`
	// Description of the variable.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// contains filtered or unexported fields
}

VariableCreateInput holds the creation input of the Variable entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*VariableCreateInput) Model

func (vci *VariableCreateInput) Model() *Variable

Model returns the Variable entity for creating, after validating.

func (*VariableCreateInput) SetGinContext

func (ic *VariableCreateInput) SetGinContext(ctx *gin.Context)

func (*VariableCreateInput) SetModelClient

func (ic *VariableCreateInput) SetModelClient(cli *Client)

func (*VariableCreateInput) Validate

func (vci *VariableCreateInput) Validate() error

Validate checks the VariableCreateInput entity.

func (*VariableCreateInput) ValidateWith

func (vci *VariableCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariableCreateInput entity with the given context and client set.

type VariableCreateInputs

type VariableCreateInputs struct {

	// Project indicates to create Variable entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to create Variable entity CAN under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*VariableCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

VariableCreateInputs holds the creation input of the Variable entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*VariableCreateInputs) Model

func (vci *VariableCreateInputs) Model() []*Variable

Model returns the Variable entities for creating, after validating.

func (*VariableCreateInputs) SetGinContext

func (ic *VariableCreateInputs) SetGinContext(ctx *gin.Context)

func (*VariableCreateInputs) SetModelClient

func (ic *VariableCreateInputs) SetModelClient(cli *Client)

func (*VariableCreateInputs) Validate

func (vci *VariableCreateInputs) Validate() error

Validate checks the VariableCreateInputs entity .

func (*VariableCreateInputs) ValidateWith

func (vci *VariableCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariableCreateInputs entity with the given context and client set.

type VariableCreateInputsItem

type VariableCreateInputsItem struct {
	// The value of variable, store in string.
	Value crypto.String `path:"-" query:"-" json:"value"`
	// The name of variable.
	Name string `path:"-" query:"-" json:"name"`
	// The value is sensitive or not.
	Sensitive bool `path:"-" query:"-" json:"sensitive,omitempty"`
	// Description of the variable.
	Description string `path:"-" query:"-" json:"description,omitempty"`
}

VariableCreateInputs holds the creation input item of the Variable entities.

func (*VariableCreateInputsItem) ValidateWith

func (vci *VariableCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariableCreateInputsItem entity with the given context and client set.

type VariableDelete

type VariableDelete struct {
	// contains filtered or unexported fields
}

VariableDelete is the builder for deleting a Variable entity.

func (*VariableDelete) Exec

func (vd *VariableDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VariableDelete) ExecContext

func (c *VariableDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VariableDelete) ExecX

func (vd *VariableDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VariableDelete) QueryContext

func (c *VariableDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VariableDelete) Where

func (vd *VariableDelete) Where(ps ...predicate.Variable) *VariableDelete

Where appends a list predicates to the VariableDelete builder.

type VariableDeleteInput

type VariableDeleteInput struct {
	VariableQueryInput `path:",inline"`
}

VariableDeleteInput holds the deletion input of the Variable entity, please tags with `path:",inline"` if embedding.

func (*VariableDeleteInput) SetGinContext

func (ic *VariableDeleteInput) SetGinContext(ctx *gin.Context)

func (*VariableDeleteInput) SetModelClient

func (ic *VariableDeleteInput) SetModelClient(cli *Client)

type VariableDeleteInputs

type VariableDeleteInputs struct {

	// Project indicates to delete Variable entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to delete Variable entity CAN under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*VariableDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

VariableDeleteInputs holds the deletion input of the Variable entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*VariableDeleteInputs) IDs

func (vdi *VariableDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Variable entities for deleting, after validating.

func (*VariableDeleteInputs) Model

func (vdi *VariableDeleteInputs) Model() []*Variable

Model returns the Variable entities for deleting, after validating.

func (*VariableDeleteInputs) SetGinContext

func (ic *VariableDeleteInputs) SetGinContext(ctx *gin.Context)

func (*VariableDeleteInputs) SetModelClient

func (ic *VariableDeleteInputs) SetModelClient(cli *Client)

func (*VariableDeleteInputs) Validate

func (vdi *VariableDeleteInputs) Validate() error

Validate checks the VariableDeleteInputs entity.

func (*VariableDeleteInputs) ValidateWith

func (vdi *VariableDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariableDeleteInputs entity with the given context and client set.

type VariableDeleteInputsItem

type VariableDeleteInputsItem struct {
	// ID of the Variable entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Variable entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

VariableDeleteInputs holds the deletion input item of the Variable entities.

type VariableDeleteOne

type VariableDeleteOne struct {
	// contains filtered or unexported fields
}

VariableDeleteOne is the builder for deleting a single Variable entity.

func (*VariableDeleteOne) Exec

func (vdo *VariableDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VariableDeleteOne) ExecX

func (vdo *VariableDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VariableDeleteOne) Where

Where appends a list predicates to the VariableDelete builder.

type VariableEdges

type VariableEdges struct {
	// Project to which the variable belongs.
	Project *Project `json:"project,omitempty"`
	// Environment to which the variable belongs.
	Environment *Environment `json:"environment,omitempty"`
	// contains filtered or unexported fields
}

VariableEdges holds the relations/edges for other nodes in the graph.

func (VariableEdges) EnvironmentOrErr

func (e VariableEdges) EnvironmentOrErr() (*Environment, error)

EnvironmentOrErr returns the Environment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VariableEdges) ProjectOrErr

func (e VariableEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type VariableGroupBy

type VariableGroupBy struct {
	// contains filtered or unexported fields
}

VariableGroupBy is the group-by builder for Variable entities.

func (*VariableGroupBy) Aggregate

func (vgb *VariableGroupBy) Aggregate(fns ...AggregateFunc) *VariableGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*VariableGroupBy) Bool

func (s *VariableGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VariableGroupBy) BoolX

func (s *VariableGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VariableGroupBy) Bools

func (s *VariableGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VariableGroupBy) BoolsX

func (s *VariableGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VariableGroupBy) Float64

func (s *VariableGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VariableGroupBy) Float64X

func (s *VariableGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VariableGroupBy) Float64s

func (s *VariableGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VariableGroupBy) Float64sX

func (s *VariableGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VariableGroupBy) Int

func (s *VariableGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VariableGroupBy) IntX

func (s *VariableGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VariableGroupBy) Ints

func (s *VariableGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VariableGroupBy) IntsX

func (s *VariableGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VariableGroupBy) Scan

func (vgb *VariableGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VariableGroupBy) ScanX

func (s *VariableGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VariableGroupBy) String

func (s *VariableGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VariableGroupBy) StringX

func (s *VariableGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VariableGroupBy) Strings

func (s *VariableGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VariableGroupBy) StringsX

func (s *VariableGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VariableMutation

type VariableMutation struct {
	// contains filtered or unexported fields
}

VariableMutation represents an operation that mutates the Variable nodes in the graph.

func (*VariableMutation) AddField

func (m *VariableMutation) 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 (*VariableMutation) AddedEdges

func (m *VariableMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VariableMutation) AddedField

func (m *VariableMutation) 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 (*VariableMutation) AddedFields

func (m *VariableMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VariableMutation) AddedIDs

func (m *VariableMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VariableMutation) ClearDescription

func (m *VariableMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*VariableMutation) ClearEdge

func (m *VariableMutation) 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 (*VariableMutation) ClearEnvironment

func (m *VariableMutation) ClearEnvironment()

ClearEnvironment clears the "environment" edge to the Environment entity.

func (*VariableMutation) ClearEnvironmentID

func (m *VariableMutation) ClearEnvironmentID()

ClearEnvironmentID clears the value of the "environment_id" field.

func (*VariableMutation) ClearField

func (m *VariableMutation) 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 (*VariableMutation) ClearProject

func (m *VariableMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*VariableMutation) ClearProjectID

func (m *VariableMutation) ClearProjectID()

ClearProjectID clears the value of the "project_id" field.

func (*VariableMutation) ClearedEdges

func (m *VariableMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VariableMutation) ClearedFields

func (m *VariableMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VariableMutation) Client

func (m VariableMutation) 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 (*VariableMutation) CreateTime

func (m *VariableMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*VariableMutation) Description

func (m *VariableMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*VariableMutation) DescriptionCleared

func (m *VariableMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*VariableMutation) EdgeCleared

func (m *VariableMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VariableMutation) EnvironmentCleared

func (m *VariableMutation) EnvironmentCleared() bool

EnvironmentCleared reports if the "environment" edge to the Environment entity was cleared.

func (*VariableMutation) EnvironmentID

func (m *VariableMutation) EnvironmentID() (r object.ID, exists bool)

EnvironmentID returns the value of the "environment_id" field in the mutation.

func (*VariableMutation) EnvironmentIDCleared

func (m *VariableMutation) EnvironmentIDCleared() bool

EnvironmentIDCleared returns if the "environment_id" field was cleared in this mutation.

func (*VariableMutation) EnvironmentIDs

func (m *VariableMutation) EnvironmentIDs() (ids []object.ID)

EnvironmentIDs returns the "environment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EnvironmentID instead. It exists only for internal usage by the builders.

func (*VariableMutation) ExecContext

func (c *VariableMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VariableMutation) Field

func (m *VariableMutation) 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 (*VariableMutation) FieldCleared

func (m *VariableMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VariableMutation) Fields

func (m *VariableMutation) 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 (*VariableMutation) ID

func (m *VariableMutation) ID() (id object.ID, 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 (*VariableMutation) IDs

func (m *VariableMutation) IDs(ctx context.Context) ([]object.ID, 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 (*VariableMutation) Name

func (m *VariableMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*VariableMutation) OldCreateTime

func (m *VariableMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Variable entity. If the Variable 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 (*VariableMutation) OldDescription

func (m *VariableMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Variable entity. If the Variable 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 (*VariableMutation) OldEnvironmentID

func (m *VariableMutation) OldEnvironmentID(ctx context.Context) (v object.ID, err error)

OldEnvironmentID returns the old "environment_id" field's value of the Variable entity. If the Variable 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 (*VariableMutation) OldField

func (m *VariableMutation) 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 (*VariableMutation) OldName

func (m *VariableMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Variable entity. If the Variable 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 (*VariableMutation) OldProjectID

func (m *VariableMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the Variable entity. If the Variable 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 (*VariableMutation) OldSensitive

func (m *VariableMutation) OldSensitive(ctx context.Context) (v bool, err error)

OldSensitive returns the old "sensitive" field's value of the Variable entity. If the Variable 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 (*VariableMutation) OldUpdateTime

func (m *VariableMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Variable entity. If the Variable 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 (*VariableMutation) OldValue

func (m *VariableMutation) OldValue(ctx context.Context) (v crypto.String, err error)

OldValue returns the old "value" field's value of the Variable entity. If the Variable 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 (*VariableMutation) Op

func (m *VariableMutation) Op() Op

Op returns the operation name.

func (*VariableMutation) ProjectCleared

func (m *VariableMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*VariableMutation) ProjectID

func (m *VariableMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*VariableMutation) ProjectIDCleared

func (m *VariableMutation) ProjectIDCleared() bool

ProjectIDCleared returns if the "project_id" field was cleared in this mutation.

func (*VariableMutation) ProjectIDs

func (m *VariableMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*VariableMutation) QueryContext

func (c *VariableMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VariableMutation) RemovedEdges

func (m *VariableMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VariableMutation) RemovedIDs

func (m *VariableMutation) 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 (*VariableMutation) ResetCreateTime

func (m *VariableMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*VariableMutation) ResetDescription

func (m *VariableMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*VariableMutation) ResetEdge

func (m *VariableMutation) 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 (*VariableMutation) ResetEnvironment

func (m *VariableMutation) ResetEnvironment()

ResetEnvironment resets all changes to the "environment" edge.

func (*VariableMutation) ResetEnvironmentID

func (m *VariableMutation) ResetEnvironmentID()

ResetEnvironmentID resets all changes to the "environment_id" field.

func (*VariableMutation) ResetField

func (m *VariableMutation) 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 (*VariableMutation) ResetName

func (m *VariableMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*VariableMutation) ResetProject

func (m *VariableMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*VariableMutation) ResetProjectID

func (m *VariableMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*VariableMutation) ResetSensitive

func (m *VariableMutation) ResetSensitive()

ResetSensitive resets all changes to the "sensitive" field.

func (*VariableMutation) ResetUpdateTime

func (m *VariableMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*VariableMutation) ResetValue

func (m *VariableMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*VariableMutation) Sensitive

func (m *VariableMutation) Sensitive() (r bool, exists bool)

Sensitive returns the value of the "sensitive" field in the mutation.

func (*VariableMutation) SetCreateTime

func (m *VariableMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*VariableMutation) SetDescription

func (m *VariableMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*VariableMutation) SetEnvironmentID

func (m *VariableMutation) SetEnvironmentID(o object.ID)

SetEnvironmentID sets the "environment_id" field.

func (*VariableMutation) SetField

func (m *VariableMutation) 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 (*VariableMutation) SetID

func (m *VariableMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Variable entities.

func (*VariableMutation) SetName

func (m *VariableMutation) SetName(s string)

SetName sets the "name" field.

func (*VariableMutation) SetOp

func (m *VariableMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VariableMutation) SetProjectID

func (m *VariableMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*VariableMutation) SetSensitive

func (m *VariableMutation) SetSensitive(b bool)

SetSensitive sets the "sensitive" field.

func (*VariableMutation) SetUpdateTime

func (m *VariableMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*VariableMutation) SetValue

func (m *VariableMutation) SetValue(c crypto.String)

SetValue sets the "value" field.

func (VariableMutation) Tx

func (m VariableMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VariableMutation) Type

func (m *VariableMutation) Type() string

Type returns the node type of this mutation (Variable).

func (*VariableMutation) UpdateTime

func (m *VariableMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*VariableMutation) Value

func (m *VariableMutation) Value() (r crypto.String, exists bool)

Value returns the value of the "value" field in the mutation.

func (*VariableMutation) Where

func (m *VariableMutation) Where(ps ...predicate.Variable)

Where appends a list predicates to the VariableMutation builder.

func (*VariableMutation) WhereP

func (m *VariableMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VariableMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VariableOutput

type VariableOutput struct {
	ID          object.ID     `json:"id,omitempty"`
	CreateTime  *time.Time    `json:"createTime,omitempty"`
	UpdateTime  *time.Time    `json:"updateTime,omitempty"`
	Name        string        `json:"name,omitempty"`
	Value       crypto.String `json:"value,omitempty"`
	Sensitive   bool          `json:"sensitive,omitempty"`
	Description string        `json:"description,omitempty"`

	Project     *ProjectOutput     `json:"project,omitempty"`
	Environment *EnvironmentOutput `json:"environment,omitempty"`
}

VariableOutput holds the output of the Variable entity.

func ExposeVariable

func ExposeVariable(_v *Variable) *VariableOutput

ExposeVariable converts the Variable to VariableOutput.

func ExposeVariables

func ExposeVariables(_vs []*Variable) []*VariableOutput

ExposeVariables converts the Variable slice to VariableOutput pointer slice.

type VariablePatchInput added in v0.5.0

type VariablePatchInput struct {
	VariableQueryInput `path:",inline" query:"-" json:"-"`

	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// The name of variable.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// The value of variable, store in string.
	Value crypto.String `path:"-" query:"-" json:"value,omitempty"`
	// The value is sensitive or not.
	Sensitive bool `path:"-" query:"-" json:"sensitive,omitempty"`
	// Description of the variable.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// contains filtered or unexported fields
}

VariablePatchInput holds the patch input of the Variable entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*VariablePatchInput) Model added in v0.5.0

func (vpi *VariablePatchInput) Model() *Variable

Model returns the Variable patched entity, after validating.

func (*VariablePatchInput) PatchModel added in v0.5.0

func (vpi *VariablePatchInput) PatchModel() *Variable

PatchModel returns the Variable partition entity for patching.

func (*VariablePatchInput) SetGinContext added in v0.5.0

func (ic *VariablePatchInput) SetGinContext(ctx *gin.Context)

func (*VariablePatchInput) SetModelClient added in v0.5.0

func (ic *VariablePatchInput) SetModelClient(cli *Client)

func (*VariablePatchInput) Validate added in v0.5.0

func (vpi *VariablePatchInput) Validate() error

Validate checks the VariablePatchInput entity.

func (*VariablePatchInput) ValidateWith added in v0.5.0

func (vpi *VariablePatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariablePatchInput entity with the given context and client set.

type VariableQuery

type VariableQuery struct {
	// contains filtered or unexported fields
}

VariableQuery is the builder for querying Variable entities.

func (*VariableQuery) Aggregate

func (vq *VariableQuery) Aggregate(fns ...AggregateFunc) *VariableSelect

Aggregate returns a VariableSelect configured with the given aggregations.

func (*VariableQuery) All

func (vq *VariableQuery) All(ctx context.Context) ([]*Variable, error)

All executes the query and returns a list of Variables.

func (*VariableQuery) AllX

func (vq *VariableQuery) AllX(ctx context.Context) []*Variable

AllX is like All, but panics if an error occurs.

func (*VariableQuery) Clone

func (vq *VariableQuery) Clone() *VariableQuery

Clone returns a duplicate of the VariableQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VariableQuery) Count

func (vq *VariableQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VariableQuery) CountX

func (vq *VariableQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VariableQuery) ExecContext

func (c *VariableQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VariableQuery) Exist

func (vq *VariableQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VariableQuery) ExistX

func (vq *VariableQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VariableQuery) First

func (vq *VariableQuery) First(ctx context.Context) (*Variable, error)

First returns the first Variable entity from the query. Returns a *NotFoundError when no Variable was found.

func (*VariableQuery) FirstID

func (vq *VariableQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Variable ID from the query. Returns a *NotFoundError when no Variable ID was found.

func (*VariableQuery) FirstIDX

func (vq *VariableQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VariableQuery) FirstX

func (vq *VariableQuery) FirstX(ctx context.Context) *Variable

FirstX is like First, but panics if an error occurs.

func (*VariableQuery) ForShare

func (vq *VariableQuery) ForShare(opts ...sql.LockOption) *VariableQuery

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 (*VariableQuery) ForUpdate

func (vq *VariableQuery) ForUpdate(opts ...sql.LockOption) *VariableQuery

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 (*VariableQuery) GroupBy

func (vq *VariableQuery) GroupBy(field string, fields ...string) *VariableGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Variable.Query().
	GroupBy(variable.FieldCreateTime).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*VariableQuery) IDs

func (vq *VariableQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Variable IDs.

func (*VariableQuery) IDsX

func (vq *VariableQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*VariableQuery) Limit

func (vq *VariableQuery) Limit(limit int) *VariableQuery

Limit the number of records to be returned by this query.

func (*VariableQuery) Modify

func (vq *VariableQuery) Modify(modifiers ...func(s *sql.Selector)) *VariableSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*VariableQuery) Offset

func (vq *VariableQuery) Offset(offset int) *VariableQuery

Offset to start from.

func (*VariableQuery) Only

func (vq *VariableQuery) Only(ctx context.Context) (*Variable, error)

Only returns a single Variable entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Variable entity is found. Returns a *NotFoundError when no Variable entities are found.

func (*VariableQuery) OnlyID

func (vq *VariableQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only Variable ID in the query. Returns a *NotSingularError when more than one Variable ID is found. Returns a *NotFoundError when no entities are found.

func (*VariableQuery) OnlyIDX

func (vq *VariableQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VariableQuery) OnlyX

func (vq *VariableQuery) OnlyX(ctx context.Context) *Variable

OnlyX is like Only, but panics if an error occurs.

func (*VariableQuery) Order

Order specifies how the records should be ordered.

func (*VariableQuery) QueryContext

func (c *VariableQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VariableQuery) QueryEnvironment

func (vq *VariableQuery) QueryEnvironment() *EnvironmentQuery

QueryEnvironment chains the current query on the "environment" edge.

func (*VariableQuery) QueryProject

func (vq *VariableQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*VariableQuery) Select

func (vq *VariableQuery) Select(fields ...string) *VariableSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Variable.Query().
	Select(variable.FieldCreateTime).
	Scan(ctx, &v)

func (*VariableQuery) Unique

func (vq *VariableQuery) Unique(unique bool) *VariableQuery

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 (*VariableQuery) Where

func (vq *VariableQuery) Where(ps ...predicate.Variable) *VariableQuery

Where adds a new predicate for the VariableQuery builder.

func (*VariableQuery) WhereP

func (vq *VariableQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VariableQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*VariableQuery) WithEnvironment

func (vq *VariableQuery) WithEnvironment(opts ...func(*EnvironmentQuery)) *VariableQuery

WithEnvironment tells the query-builder to eager-load the nodes that are connected to the "environment" edge. The optional arguments are used to configure the query builder of the edge.

func (*VariableQuery) WithProject

func (vq *VariableQuery) WithProject(opts ...func(*ProjectQuery)) *VariableQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

type VariableQueryInput

type VariableQueryInput struct {

	// Project indicates to query Variable entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project,omitempty"`
	// Environment indicates to query Variable entity CAN under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"environment,omitempty"`

	// Refer holds the route path reference of the Variable entity.
	Refer *object.Refer `path:"variable,default=" query:"-" json:"-"`
	// ID of the Variable entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Variable entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

VariableQueryInput holds the query input of the Variable entity, please tags with `path:",inline"` if embedding.

func (*VariableQueryInput) Model

func (vqi *VariableQueryInput) Model() *Variable

Model returns the Variable entity for querying, after validating.

func (*VariableQueryInput) SetGinContext

func (ic *VariableQueryInput) SetGinContext(ctx *gin.Context)

func (*VariableQueryInput) SetModelClient

func (ic *VariableQueryInput) SetModelClient(cli *Client)

func (*VariableQueryInput) Validate

func (vqi *VariableQueryInput) Validate() error

Validate checks the VariableQueryInput entity.

func (*VariableQueryInput) ValidateWith

func (vqi *VariableQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariableQueryInput entity with the given context and client set.

type VariableQueryInputs

type VariableQueryInputs struct {

	// Project indicates to query Variable entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to query Variable entity CAN under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

VariableQueryInputs holds the query input of the Variable entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*VariableQueryInputs) SetGinContext

func (ic *VariableQueryInputs) SetGinContext(ctx *gin.Context)

func (*VariableQueryInputs) SetModelClient

func (ic *VariableQueryInputs) SetModelClient(cli *Client)

func (*VariableQueryInputs) Validate

func (vqi *VariableQueryInputs) Validate() error

Validate checks the VariableQueryInputs entity.

func (*VariableQueryInputs) ValidateWith

func (vqi *VariableQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariableQueryInputs entity with the given context and client set.

type VariableSelect

type VariableSelect struct {
	*VariableQuery
	// contains filtered or unexported fields
}

VariableSelect is the builder for selecting fields of Variable entities.

func (*VariableSelect) Aggregate

func (vs *VariableSelect) Aggregate(fns ...AggregateFunc) *VariableSelect

Aggregate adds the given aggregation functions to the selector query.

func (*VariableSelect) Bool

func (s *VariableSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VariableSelect) BoolX

func (s *VariableSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VariableSelect) Bools

func (s *VariableSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VariableSelect) BoolsX

func (s *VariableSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (VariableSelect) ExecContext

func (c VariableSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VariableSelect) Float64

func (s *VariableSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VariableSelect) Float64X

func (s *VariableSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VariableSelect) Float64s

func (s *VariableSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VariableSelect) Float64sX

func (s *VariableSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VariableSelect) Int

func (s *VariableSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VariableSelect) IntX

func (s *VariableSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VariableSelect) Ints

func (s *VariableSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VariableSelect) IntsX

func (s *VariableSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VariableSelect) Modify

func (vs *VariableSelect) Modify(modifiers ...func(s *sql.Selector)) *VariableSelect

Modify adds a query modifier for attaching custom logic to queries.

func (VariableSelect) QueryContext

func (c VariableSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VariableSelect) Scan

func (vs *VariableSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VariableSelect) ScanX

func (s *VariableSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VariableSelect) String

func (s *VariableSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VariableSelect) StringX

func (s *VariableSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VariableSelect) Strings

func (s *VariableSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VariableSelect) StringsX

func (s *VariableSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VariableUpdate

type VariableUpdate struct {
	// contains filtered or unexported fields
}

VariableUpdate is the builder for updating Variable entities.

func (*VariableUpdate) ClearDescription

func (vu *VariableUpdate) ClearDescription() *VariableUpdate

ClearDescription clears the value of the "description" field.

func (*VariableUpdate) Exec

func (vu *VariableUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VariableUpdate) ExecContext

func (c *VariableUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VariableUpdate) ExecX

func (vu *VariableUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VariableUpdate) Modify

func (vu *VariableUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VariableUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VariableUpdate) Mutation

func (vu *VariableUpdate) Mutation() *VariableMutation

Mutation returns the VariableMutation object of the builder.

func (*VariableUpdate) QueryContext

func (c *VariableUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VariableUpdate) Save

func (vu *VariableUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VariableUpdate) SaveX

func (vu *VariableUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VariableUpdate) Set

func (vu *VariableUpdate) Set(obj *Variable) *VariableUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*VariableUpdate) SetDescription

func (vu *VariableUpdate) SetDescription(s string) *VariableUpdate

SetDescription sets the "description" field.

func (*VariableUpdate) SetNillableDescription

func (vu *VariableUpdate) SetNillableDescription(s *string) *VariableUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*VariableUpdate) SetNillableSensitive

func (vu *VariableUpdate) SetNillableSensitive(b *bool) *VariableUpdate

SetNillableSensitive sets the "sensitive" field if the given value is not nil.

func (*VariableUpdate) SetNillableValue added in v0.5.0

func (vu *VariableUpdate) SetNillableValue(c *crypto.String) *VariableUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*VariableUpdate) SetSensitive

func (vu *VariableUpdate) SetSensitive(b bool) *VariableUpdate

SetSensitive sets the "sensitive" field.

func (*VariableUpdate) SetUpdateTime

func (vu *VariableUpdate) SetUpdateTime(t time.Time) *VariableUpdate

SetUpdateTime sets the "update_time" field.

func (*VariableUpdate) SetValue

func (vu *VariableUpdate) SetValue(c crypto.String) *VariableUpdate

SetValue sets the "value" field.

func (*VariableUpdate) Where

func (vu *VariableUpdate) Where(ps ...predicate.Variable) *VariableUpdate

Where appends a list predicates to the VariableUpdate builder.

type VariableUpdateInput

type VariableUpdateInput struct {
	VariableQueryInput `path:",inline" query:"-" json:"-"`

	// The value of variable, store in string.
	Value crypto.String `path:"-" query:"-" json:"value,omitempty"`
	// The value is sensitive or not.
	Sensitive bool `path:"-" query:"-" json:"sensitive,omitempty"`
	// Description of the variable.
	Description string `path:"-" query:"-" json:"description,omitempty"`
}

VariableUpdateInput holds the modification input of the Variable entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*VariableUpdateInput) Model

func (vui *VariableUpdateInput) Model() *Variable

Model returns the Variable entity for modifying, after validating.

func (*VariableUpdateInput) SetGinContext

func (ic *VariableUpdateInput) SetGinContext(ctx *gin.Context)

func (*VariableUpdateInput) SetModelClient

func (ic *VariableUpdateInput) SetModelClient(cli *Client)

func (*VariableUpdateInput) Validate

func (vui *VariableUpdateInput) Validate() error

Validate checks the VariableUpdateInput entity.

func (*VariableUpdateInput) ValidateWith

func (vui *VariableUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariableUpdateInput entity with the given context and client set.

type VariableUpdateInputs

type VariableUpdateInputs struct {

	// Project indicates to update Variable entity CAN under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Environment indicates to update Variable entity CAN under the Environment route.
	Environment *EnvironmentQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*VariableUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

VariableUpdateInputs holds the modification input of the Variable entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*VariableUpdateInputs) IDs

func (vui *VariableUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Variable entities for modifying, after validating.

func (*VariableUpdateInputs) Model

func (vui *VariableUpdateInputs) Model() []*Variable

Model returns the Variable entities for modifying, after validating.

func (*VariableUpdateInputs) SetGinContext

func (ic *VariableUpdateInputs) SetGinContext(ctx *gin.Context)

func (*VariableUpdateInputs) SetModelClient

func (ic *VariableUpdateInputs) SetModelClient(cli *Client)

func (*VariableUpdateInputs) Validate

func (vui *VariableUpdateInputs) Validate() error

Validate checks the VariableUpdateInputs entity.

func (*VariableUpdateInputs) ValidateWith

func (vui *VariableUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariableUpdateInputs entity with the given context and client set.

type VariableUpdateInputsItem

type VariableUpdateInputsItem struct {
	// ID of the Variable entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Variable entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// The value of variable, store in string.
	Value crypto.String `path:"-" query:"-" json:"value"`
	// The value is sensitive or not.
	Sensitive bool `path:"-" query:"-" json:"sensitive"`
	// Description of the variable.
	Description string `path:"-" query:"-" json:"description,omitempty"`
}

VariableUpdateInputs holds the modification input item of the Variable entities.

func (*VariableUpdateInputsItem) ValidateWith

func (vui *VariableUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the VariableUpdateInputsItem entity with the given context and client set.

type VariableUpdateOne

type VariableUpdateOne struct {
	// contains filtered or unexported fields
}

VariableUpdateOne is the builder for updating a single Variable entity.

func (*VariableUpdateOne) ClearDescription

func (vuo *VariableUpdateOne) ClearDescription() *VariableUpdateOne

ClearDescription clears the value of the "description" field.

func (*VariableUpdateOne) Exec

func (vuo *VariableUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VariableUpdateOne) ExecContext

func (c *VariableUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VariableUpdateOne) ExecE

func (vuo *VariableUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Variable) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*VariableUpdateOne) ExecEX

func (vuo *VariableUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Variable) error)

ExecX is like Exec, but panics if an error occurs.

func (*VariableUpdateOne) ExecX

func (vuo *VariableUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VariableUpdateOne) Modify

func (vuo *VariableUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VariableUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VariableUpdateOne) Mutation

func (vuo *VariableUpdateOne) Mutation() *VariableMutation

Mutation returns the VariableMutation object of the builder.

func (*VariableUpdateOne) QueryContext

func (c *VariableUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VariableUpdateOne) Save

func (vuo *VariableUpdateOne) Save(ctx context.Context) (*Variable, error)

Save executes the query and returns the updated Variable entity.

func (*VariableUpdateOne) SaveE

func (vuo *VariableUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Variable) error) (*Variable, error)

SaveE calls the given function after updated the Variable entity, which is always good for cascading update operations.

func (*VariableUpdateOne) SaveEX

func (vuo *VariableUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Variable) error) *Variable

SaveEX is like SaveE, but panics if an error occurs.

func (*VariableUpdateOne) SaveX

func (vuo *VariableUpdateOne) SaveX(ctx context.Context) *Variable

SaveX is like Save, but panics if an error occurs.

func (*VariableUpdateOne) Select

func (vuo *VariableUpdateOne) Select(field string, fields ...string) *VariableUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VariableUpdateOne) Set

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*VariableUpdateOne) SetDescription

func (vuo *VariableUpdateOne) SetDescription(s string) *VariableUpdateOne

SetDescription sets the "description" field.

func (*VariableUpdateOne) SetNillableDescription

func (vuo *VariableUpdateOne) SetNillableDescription(s *string) *VariableUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*VariableUpdateOne) SetNillableSensitive

func (vuo *VariableUpdateOne) SetNillableSensitive(b *bool) *VariableUpdateOne

SetNillableSensitive sets the "sensitive" field if the given value is not nil.

func (*VariableUpdateOne) SetNillableValue added in v0.5.0

func (vuo *VariableUpdateOne) SetNillableValue(c *crypto.String) *VariableUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*VariableUpdateOne) SetSensitive

func (vuo *VariableUpdateOne) SetSensitive(b bool) *VariableUpdateOne

SetSensitive sets the "sensitive" field.

func (*VariableUpdateOne) SetUpdateTime

func (vuo *VariableUpdateOne) SetUpdateTime(t time.Time) *VariableUpdateOne

SetUpdateTime sets the "update_time" field.

func (*VariableUpdateOne) SetValue

SetValue sets the "value" field.

func (*VariableUpdateOne) Where

Where appends a list predicates to the VariableUpdate builder.

type VariableUpsert

type VariableUpsert struct {
	*sql.UpdateSet
}

VariableUpsert is the "OnConflict" setter.

func (*VariableUpsert) ClearDescription

func (u *VariableUpsert) ClearDescription() *VariableUpsert

ClearDescription clears the value of the "description" field.

func (*VariableUpsert) SetDescription

func (u *VariableUpsert) SetDescription(v string) *VariableUpsert

SetDescription sets the "description" field.

func (*VariableUpsert) SetSensitive

func (u *VariableUpsert) SetSensitive(v bool) *VariableUpsert

SetSensitive sets the "sensitive" field.

func (*VariableUpsert) SetUpdateTime

func (u *VariableUpsert) SetUpdateTime(v time.Time) *VariableUpsert

SetUpdateTime sets the "update_time" field.

func (*VariableUpsert) SetValue

func (u *VariableUpsert) SetValue(v crypto.String) *VariableUpsert

SetValue sets the "value" field.

func (*VariableUpsert) UpdateDescription

func (u *VariableUpsert) UpdateDescription() *VariableUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*VariableUpsert) UpdateSensitive

func (u *VariableUpsert) UpdateSensitive() *VariableUpsert

UpdateSensitive sets the "sensitive" field to the value that was provided on create.

func (*VariableUpsert) UpdateUpdateTime

func (u *VariableUpsert) UpdateUpdateTime() *VariableUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*VariableUpsert) UpdateValue

func (u *VariableUpsert) UpdateValue() *VariableUpsert

UpdateValue sets the "value" field to the value that was provided on create.

type VariableUpsertBulk

type VariableUpsertBulk struct {
	// contains filtered or unexported fields
}

VariableUpsertBulk is the builder for "upsert"-ing a bulk of Variable nodes.

func (*VariableUpsertBulk) ClearDescription

func (u *VariableUpsertBulk) ClearDescription() *VariableUpsertBulk

ClearDescription clears the value of the "description" field.

func (*VariableUpsertBulk) DoNothing

func (u *VariableUpsertBulk) DoNothing() *VariableUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VariableUpsertBulk) Exec

func (u *VariableUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VariableUpsertBulk) ExecE

func (u *VariableUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Variable) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*VariableUpsertBulk) ExecEX

func (u *VariableUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Variable) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*VariableUpsertBulk) ExecX

func (u *VariableUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VariableUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Variable.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VariableUpsertBulk) SetDescription

func (u *VariableUpsertBulk) SetDescription(v string) *VariableUpsertBulk

SetDescription sets the "description" field.

func (*VariableUpsertBulk) SetSensitive

func (u *VariableUpsertBulk) SetSensitive(v bool) *VariableUpsertBulk

SetSensitive sets the "sensitive" field.

func (*VariableUpsertBulk) SetUpdateTime

func (u *VariableUpsertBulk) SetUpdateTime(v time.Time) *VariableUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*VariableUpsertBulk) SetValue

SetValue sets the "value" field.

func (*VariableUpsertBulk) Update

func (u *VariableUpsertBulk) Update(set func(*VariableUpsert)) *VariableUpsertBulk

Update allows overriding fields `UPDATE` values. See the VariableCreateBulk.OnConflict documentation for more info.

func (*VariableUpsertBulk) UpdateDescription

func (u *VariableUpsertBulk) UpdateDescription() *VariableUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*VariableUpsertBulk) UpdateNewValues

func (u *VariableUpsertBulk) UpdateNewValues() *VariableUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Variable.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(variable.FieldID)
		}),
	).
	Exec(ctx)

func (*VariableUpsertBulk) UpdateSensitive

func (u *VariableUpsertBulk) UpdateSensitive() *VariableUpsertBulk

UpdateSensitive sets the "sensitive" field to the value that was provided on create.

func (*VariableUpsertBulk) UpdateUpdateTime

func (u *VariableUpsertBulk) UpdateUpdateTime() *VariableUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*VariableUpsertBulk) UpdateValue

func (u *VariableUpsertBulk) UpdateValue() *VariableUpsertBulk

UpdateValue sets the "value" field to the value that was provided on create.

type VariableUpsertOne

type VariableUpsertOne struct {
	// contains filtered or unexported fields
}

VariableUpsertOne is the builder for "upsert"-ing

one Variable node.

func (*VariableUpsertOne) ClearDescription

func (u *VariableUpsertOne) ClearDescription() *VariableUpsertOne

ClearDescription clears the value of the "description" field.

func (*VariableUpsertOne) DoNothing

func (u *VariableUpsertOne) DoNothing() *VariableUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VariableUpsertOne) Exec

func (u *VariableUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*VariableUpsertOne) ExecE

func (u *VariableUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Variable) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*VariableUpsertOne) ExecEX

func (u *VariableUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Variable) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*VariableUpsertOne) ExecX

func (u *VariableUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VariableUpsertOne) ID

func (u *VariableUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VariableUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VariableUpsertOne) Ignore

func (u *VariableUpsertOne) Ignore() *VariableUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Variable.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VariableUpsertOne) SetDescription

func (u *VariableUpsertOne) SetDescription(v string) *VariableUpsertOne

SetDescription sets the "description" field.

func (*VariableUpsertOne) SetSensitive

func (u *VariableUpsertOne) SetSensitive(v bool) *VariableUpsertOne

SetSensitive sets the "sensitive" field.

func (*VariableUpsertOne) SetUpdateTime

func (u *VariableUpsertOne) SetUpdateTime(v time.Time) *VariableUpsertOne

SetUpdateTime sets the "update_time" field.

func (*VariableUpsertOne) SetValue

SetValue sets the "value" field.

func (*VariableUpsertOne) Update

func (u *VariableUpsertOne) Update(set func(*VariableUpsert)) *VariableUpsertOne

Update allows overriding fields `UPDATE` values. See the VariableCreate.OnConflict documentation for more info.

func (*VariableUpsertOne) UpdateDescription

func (u *VariableUpsertOne) UpdateDescription() *VariableUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*VariableUpsertOne) UpdateNewValues

func (u *VariableUpsertOne) UpdateNewValues() *VariableUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Variable.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(variable.FieldID)
		}),
	).
	Exec(ctx)

func (*VariableUpsertOne) UpdateSensitive

func (u *VariableUpsertOne) UpdateSensitive() *VariableUpsertOne

UpdateSensitive sets the "sensitive" field to the value that was provided on create.

func (*VariableUpsertOne) UpdateUpdateTime

func (u *VariableUpsertOne) UpdateUpdateTime() *VariableUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*VariableUpsertOne) UpdateValue

func (u *VariableUpsertOne) UpdateValue() *VariableUpsertOne

UpdateValue sets the "value" field to the value that was provided on create.

type Variables

type Variables []*Variable

Variables is a parsable slice of Variable.

func (Variables) View

func (_vs Variables) View() []*VariableOutput

View returns the output of Variable entities.

type Workflow added in v0.4.0

type Workflow struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// ID of the project that this workflow belongs to.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the environment that this workflow belongs to.
	EnvironmentID object.ID `json:"environment_id,omitempty"`
	// Type of the workflow.
	Type string `json:"type,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `json:"parallelism,omitempty"`
	// Timeout seconds of the workflow.
	Timeout int `json:"timeout,omitempty"`
	// Execution version of the workflow.
	Version int `json:"version,omitempty"`
	// Configs of workflow variables.
	Variables types.WorkflowVariables `json:"variables,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,omitempty"`
	// contains filtered or unexported fields
}

Workflow is the model entity for the Workflow schema.

func (*Workflow) ExecContext added in v0.4.0

func (c *Workflow) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Workflow) QueryContext added in v0.4.0

func (c *Workflow) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Workflow) QueryExecutions added in v0.4.0

func (w *Workflow) QueryExecutions() *WorkflowExecutionQuery

QueryExecutions queries the "executions" edge of the Workflow entity.

func (*Workflow) QueryProject added in v0.4.0

func (w *Workflow) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Workflow entity.

func (*Workflow) QueryStages added in v0.4.0

func (w *Workflow) QueryStages() *WorkflowStageQuery

QueryStages queries the "stages" edge of the Workflow entity.

func (*Workflow) String added in v0.4.0

func (w *Workflow) String() string

String implements the fmt.Stringer.

func (*Workflow) Unwrap added in v0.4.0

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 added in v0.4.0

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 added in v0.4.0

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.

func (*Workflow) View added in v0.4.0

func (_w *Workflow) View() *WorkflowOutput

View returns the output of Workflow entity.

type WorkflowClient added in v0.4.0

type WorkflowClient struct {
	// contains filtered or unexported fields
}

WorkflowClient is a client for the Workflow schema.

func NewWorkflowClient added in v0.4.0

func NewWorkflowClient(c config) *WorkflowClient

NewWorkflowClient returns a client for the Workflow from the given config.

func (*WorkflowClient) Create added in v0.4.0

func (c *WorkflowClient) Create() *WorkflowCreate

Create returns a builder for creating a Workflow entity.

func (*WorkflowClient) CreateBulk added in v0.4.0

func (c *WorkflowClient) CreateBulk(builders ...*WorkflowCreate) *WorkflowCreateBulk

CreateBulk returns a builder for creating a bulk of Workflow entities.

func (*WorkflowClient) Delete added in v0.4.0

func (c *WorkflowClient) Delete() *WorkflowDelete

Delete returns a delete builder for Workflow.

func (*WorkflowClient) DeleteOne added in v0.4.0

func (c *WorkflowClient) DeleteOne(w *Workflow) *WorkflowDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowClient) DeleteOneID added in v0.4.0

func (c *WorkflowClient) DeleteOneID(id object.ID) *WorkflowDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowClient) ExecContext added in v0.4.0

func (c *WorkflowClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowClient) Get added in v0.4.0

func (c *WorkflowClient) Get(ctx context.Context, id object.ID) (*Workflow, error)

Get returns a Workflow entity by its id.

func (*WorkflowClient) GetX added in v0.4.0

func (c *WorkflowClient) GetX(ctx context.Context, id object.ID) *Workflow

GetX is like Get, but panics if an error occurs.

func (*WorkflowClient) Hooks added in v0.4.0

func (c *WorkflowClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowClient) Intercept added in v0.4.0

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 added in v0.4.0

func (c *WorkflowClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowClient) MapCreateBulk added in v0.5.0

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 added in v0.4.0

func (c *WorkflowClient) Query() *WorkflowQuery

Query returns a query builder for Workflow.

func (*WorkflowClient) QueryContext added in v0.4.0

func (c *WorkflowClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowClient) QueryExecutions added in v0.4.0

func (c *WorkflowClient) QueryExecutions(w *Workflow) *WorkflowExecutionQuery

QueryExecutions queries the executions edge of a Workflow.

func (*WorkflowClient) QueryProject added in v0.4.0

func (c *WorkflowClient) QueryProject(w *Workflow) *ProjectQuery

QueryProject queries the project edge of a Workflow.

func (*WorkflowClient) QueryStages added in v0.4.0

func (c *WorkflowClient) QueryStages(w *Workflow) *WorkflowStageQuery

QueryStages queries the stages edge of a Workflow.

func (*WorkflowClient) Update added in v0.4.0

func (c *WorkflowClient) Update() *WorkflowUpdate

Update returns an update builder for Workflow.

func (*WorkflowClient) UpdateOne added in v0.4.0

func (c *WorkflowClient) UpdateOne(w *Workflow) *WorkflowUpdateOne

UpdateOne returns an update builder for the given entity.

func (*WorkflowClient) UpdateOneID added in v0.4.0

func (c *WorkflowClient) UpdateOneID(id object.ID) *WorkflowUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WorkflowClient) Use added in v0.4.0

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 WorkflowClientGetter added in v0.4.0

type WorkflowClientGetter interface {
	// Workflows returns the client for interacting with the Workflow builders.
	Workflows() *WorkflowClient
}

WorkflowClientGetter is an interface that allows getting WorkflowClient.

type WorkflowCreate added in v0.4.0

type WorkflowCreate struct {
	// contains filtered or unexported fields
}

WorkflowCreate is the builder for creating a Workflow entity.

func (*WorkflowCreate) AddExecutionIDs added in v0.4.0

func (wc *WorkflowCreate) AddExecutionIDs(ids ...object.ID) *WorkflowCreate

AddExecutionIDs adds the "executions" edge to the WorkflowExecution entity by IDs.

func (*WorkflowCreate) AddExecutions added in v0.4.0

func (wc *WorkflowCreate) AddExecutions(w ...*WorkflowExecution) *WorkflowCreate

AddExecutions adds the "executions" edges to the WorkflowExecution entity.

func (*WorkflowCreate) AddStageIDs added in v0.4.0

func (wc *WorkflowCreate) AddStageIDs(ids ...object.ID) *WorkflowCreate

AddStageIDs adds the "stages" edge to the WorkflowStage entity by IDs.

func (*WorkflowCreate) AddStages added in v0.4.0

func (wc *WorkflowCreate) AddStages(w ...*WorkflowStage) *WorkflowCreate

AddStages adds the "stages" edges to the WorkflowStage entity.

func (*WorkflowCreate) Exec added in v0.4.0

func (wc *WorkflowCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowCreate) ExecContext added in v0.4.0

func (c *WorkflowCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowCreate) ExecE added in v0.4.0

func (wc *WorkflowCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Workflow) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowCreate) ExecEX added in v0.4.0

func (wc *WorkflowCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Workflow) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowCreate) ExecX added in v0.4.0

func (wc *WorkflowCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowCreate) Mutation added in v0.4.0

func (wc *WorkflowCreate) Mutation() *WorkflowMutation

Mutation returns the WorkflowMutation object of the builder.

func (*WorkflowCreate) OnConflict added in v0.4.0

func (wc *WorkflowCreate) OnConflict(opts ...sql.ConflictOption) *WorkflowUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Workflow.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowCreate) OnConflictColumns added in v0.4.0

func (wc *WorkflowCreate) OnConflictColumns(columns ...string) *WorkflowUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Workflow.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowCreate) QueryContext added in v0.4.0

func (c *WorkflowCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowCreate) Save added in v0.4.0

func (wc *WorkflowCreate) Save(ctx context.Context) (*Workflow, error)

Save creates the Workflow in the database.

func (*WorkflowCreate) SaveE added in v0.4.0

func (wc *WorkflowCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Workflow) error) (*Workflow, error)

SaveE calls the given function after created the Workflow entity, which is always good for cascading create operations.

func (*WorkflowCreate) SaveEX added in v0.4.0

func (wc *WorkflowCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Workflow) error) *Workflow

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowCreate) SaveX added in v0.4.0

func (wc *WorkflowCreate) SaveX(ctx context.Context) *Workflow

SaveX calls Save and panics if Save returns an error.

func (*WorkflowCreate) Set added in v0.4.0

func (wc *WorkflowCreate) Set(obj *Workflow) *WorkflowCreate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowCreate) SetAnnotations added in v0.4.0

func (wc *WorkflowCreate) SetAnnotations(m map[string]string) *WorkflowCreate

SetAnnotations sets the "annotations" field.

func (*WorkflowCreate) SetCreateTime added in v0.4.0

func (wc *WorkflowCreate) SetCreateTime(t time.Time) *WorkflowCreate

SetCreateTime sets the "create_time" field.

func (*WorkflowCreate) SetDescription added in v0.4.0

func (wc *WorkflowCreate) SetDescription(s string) *WorkflowCreate

SetDescription sets the "description" field.

func (*WorkflowCreate) SetEnvironmentID added in v0.4.0

func (wc *WorkflowCreate) SetEnvironmentID(o object.ID) *WorkflowCreate

SetEnvironmentID sets the "environment_id" field.

func (*WorkflowCreate) SetID added in v0.4.0

func (wc *WorkflowCreate) SetID(o object.ID) *WorkflowCreate

SetID sets the "id" field.

func (*WorkflowCreate) SetLabels added in v0.4.0

func (wc *WorkflowCreate) SetLabels(m map[string]string) *WorkflowCreate

SetLabels sets the "labels" field.

func (*WorkflowCreate) SetName added in v0.4.0

func (wc *WorkflowCreate) SetName(s string) *WorkflowCreate

SetName sets the "name" field.

func (*WorkflowCreate) SetNillableCreateTime added in v0.4.0

func (wc *WorkflowCreate) SetNillableCreateTime(t *time.Time) *WorkflowCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*WorkflowCreate) SetNillableDescription added in v0.4.0

func (wc *WorkflowCreate) SetNillableDescription(s *string) *WorkflowCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowCreate) SetNillableEnvironmentID added in v0.4.0

func (wc *WorkflowCreate) SetNillableEnvironmentID(o *object.ID) *WorkflowCreate

SetNillableEnvironmentID sets the "environment_id" field if the given value is not nil.

func (*WorkflowCreate) SetNillableParallelism added in v0.4.0

func (wc *WorkflowCreate) SetNillableParallelism(i *int) *WorkflowCreate

SetNillableParallelism sets the "parallelism" field if the given value is not nil.

func (*WorkflowCreate) SetNillableTimeout added in v0.4.0

func (wc *WorkflowCreate) SetNillableTimeout(i *int) *WorkflowCreate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowCreate) SetNillableUpdateTime added in v0.4.0

func (wc *WorkflowCreate) SetNillableUpdateTime(t *time.Time) *WorkflowCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*WorkflowCreate) SetNillableVersion added in v0.4.0

func (wc *WorkflowCreate) SetNillableVersion(i *int) *WorkflowCreate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*WorkflowCreate) SetParallelism added in v0.4.0

func (wc *WorkflowCreate) SetParallelism(i int) *WorkflowCreate

SetParallelism sets the "parallelism" field.

func (*WorkflowCreate) SetProject added in v0.4.0

func (wc *WorkflowCreate) SetProject(p *Project) *WorkflowCreate

SetProject sets the "project" edge to the Project entity.

func (*WorkflowCreate) SetProjectID added in v0.4.0

func (wc *WorkflowCreate) SetProjectID(o object.ID) *WorkflowCreate

SetProjectID sets the "project_id" field.

func (*WorkflowCreate) SetTimeout added in v0.4.0

func (wc *WorkflowCreate) SetTimeout(i int) *WorkflowCreate

SetTimeout sets the "timeout" field.

func (*WorkflowCreate) SetType added in v0.4.0

func (wc *WorkflowCreate) SetType(s string) *WorkflowCreate

SetType sets the "type" field.

func (*WorkflowCreate) SetUpdateTime added in v0.4.0

func (wc *WorkflowCreate) SetUpdateTime(t time.Time) *WorkflowCreate

SetUpdateTime sets the "update_time" field.

func (*WorkflowCreate) SetVariables added in v0.4.0

func (wc *WorkflowCreate) SetVariables(tv types.WorkflowVariables) *WorkflowCreate

SetVariables sets the "variables" field.

func (*WorkflowCreate) SetVersion added in v0.4.0

func (wc *WorkflowCreate) SetVersion(i int) *WorkflowCreate

SetVersion sets the "version" field.

type WorkflowCreateBulk added in v0.4.0

type WorkflowCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowCreateBulk is the builder for creating many Workflow entities in bulk.

func (*WorkflowCreateBulk) Exec added in v0.4.0

func (wcb *WorkflowCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowCreateBulk) ExecContext added in v0.4.0

func (c *WorkflowCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowCreateBulk) ExecE added in v0.4.0

func (wcb *WorkflowCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Workflow) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowCreateBulk) ExecEX added in v0.4.0

func (wcb *WorkflowCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Workflow) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowCreateBulk) ExecX added in v0.4.0

func (wcb *WorkflowCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowCreateBulk) OnConflict added in v0.4.0

func (wcb *WorkflowCreateBulk) OnConflict(opts ...sql.ConflictOption) *WorkflowUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Workflow.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowCreateBulk) OnConflictColumns added in v0.4.0

func (wcb *WorkflowCreateBulk) OnConflictColumns(columns ...string) *WorkflowUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Workflow.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowCreateBulk) QueryContext added in v0.4.0

func (c *WorkflowCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowCreateBulk) Save added in v0.4.0

func (wcb *WorkflowCreateBulk) Save(ctx context.Context) ([]*Workflow, error)

Save creates the Workflow entities in the database.

func (*WorkflowCreateBulk) SaveE added in v0.4.0

func (wcb *WorkflowCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Workflow) error) ([]*Workflow, error)

SaveE calls the given function after created the Workflow entities, which is always good for cascading create operations.

func (*WorkflowCreateBulk) SaveEX added in v0.4.0

func (wcb *WorkflowCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *Workflow) error) []*Workflow

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowCreateBulk) SaveX added in v0.4.0

func (wcb *WorkflowCreateBulk) SaveX(ctx context.Context) []*Workflow

SaveX is like Save, but panics if an error occurs.

func (*WorkflowCreateBulk) Set added in v0.4.0

func (wcb *WorkflowCreateBulk) Set(objs ...*Workflow) *WorkflowCreateBulk

Set leverages the WorkflowCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type WorkflowCreateInput added in v0.4.0

type WorkflowCreateInput struct {

	// Project indicates to create Workflow entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Type of the workflow.
	Type string `path:"-" query:"-" json:"type"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// ID of the environment that this workflow belongs to.
	EnvironmentID object.ID `path:"-" query:"-" json:"environmentID,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism,omitempty"`
	// Timeout seconds of the workflow.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// Configs of workflow variables.
	Variables types.WorkflowVariables `path:"-" query:"-" json:"variables,omitempty"`

	// Stages specifies full inserting the new WorkflowStage entities of the Workflow entity.
	Stages []*WorkflowStageCreateInput `uri:"-" query:"-" json:"stages,omitempty"`
	// contains filtered or unexported fields
}

WorkflowCreateInput holds the creation input of the Workflow entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowCreateInput) Model added in v0.4.0

func (wci *WorkflowCreateInput) Model() *Workflow

Model returns the Workflow entity for creating, after validating.

func (*WorkflowCreateInput) SetGinContext added in v0.4.0

func (ic *WorkflowCreateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowCreateInput) SetModelClient added in v0.4.0

func (ic *WorkflowCreateInput) SetModelClient(cli *Client)

func (*WorkflowCreateInput) Validate added in v0.4.0

func (wci *WorkflowCreateInput) Validate() error

Validate checks the WorkflowCreateInput entity.

func (*WorkflowCreateInput) ValidateWith added in v0.4.0

func (wci *WorkflowCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowCreateInput entity with the given context and client set.

type WorkflowCreateInputs added in v0.4.0

type WorkflowCreateInputs struct {

	// Project indicates to create Workflow entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowCreateInputs holds the creation input of the Workflow entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowCreateInputs) Model added in v0.4.0

func (wci *WorkflowCreateInputs) Model() []*Workflow

Model returns the Workflow entities for creating, after validating.

func (*WorkflowCreateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowCreateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowCreateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowCreateInputs) SetModelClient(cli *Client)

func (*WorkflowCreateInputs) Validate added in v0.4.0

func (wci *WorkflowCreateInputs) Validate() error

Validate checks the WorkflowCreateInputs entity .

func (*WorkflowCreateInputs) ValidateWith added in v0.4.0

func (wci *WorkflowCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowCreateInputs entity with the given context and client set.

type WorkflowCreateInputsItem added in v0.4.0

type WorkflowCreateInputsItem struct {
	// Type of the workflow.
	Type string `path:"-" query:"-" json:"type"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// ID of the environment that this workflow belongs to.
	EnvironmentID object.ID `path:"-" query:"-" json:"environmentID,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism,omitempty"`
	// Timeout seconds of the workflow.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// Configs of workflow variables.
	Variables types.WorkflowVariables `path:"-" query:"-" json:"variables,omitempty"`

	// Stages specifies full inserting the new WorkflowStage entities.
	Stages []*WorkflowStageCreateInput `uri:"-" query:"-" json:"stages,omitempty"`
}

WorkflowCreateInputs holds the creation input item of the Workflow entities.

func (*WorkflowCreateInputsItem) ValidateWith added in v0.4.0

func (wci *WorkflowCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowCreateInputsItem entity with the given context and client set.

type WorkflowDelete added in v0.4.0

type WorkflowDelete struct {
	// contains filtered or unexported fields
}

WorkflowDelete is the builder for deleting a Workflow entity.

func (*WorkflowDelete) Exec added in v0.4.0

func (wd *WorkflowDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowDelete) ExecContext added in v0.4.0

func (c *WorkflowDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowDelete) ExecX added in v0.4.0

func (wd *WorkflowDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowDelete) QueryContext added in v0.4.0

func (c *WorkflowDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowDelete) Where added in v0.4.0

func (wd *WorkflowDelete) Where(ps ...predicate.Workflow) *WorkflowDelete

Where appends a list predicates to the WorkflowDelete builder.

type WorkflowDeleteInput added in v0.4.0

type WorkflowDeleteInput struct {
	WorkflowQueryInput `path:",inline"`
}

WorkflowDeleteInput holds the deletion input of the Workflow entity, please tags with `path:",inline"` if embedding.

func (*WorkflowDeleteInput) SetGinContext added in v0.4.0

func (ic *WorkflowDeleteInput) SetGinContext(ctx *gin.Context)

func (*WorkflowDeleteInput) SetModelClient added in v0.4.0

func (ic *WorkflowDeleteInput) SetModelClient(cli *Client)

type WorkflowDeleteInputs added in v0.4.0

type WorkflowDeleteInputs struct {

	// Project indicates to delete Workflow entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowDeleteInputs holds the deletion input of the Workflow entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowDeleteInputs) IDs added in v0.4.0

func (wdi *WorkflowDeleteInputs) IDs() []object.ID

IDs returns the ID list of the Workflow entities for deleting, after validating.

func (*WorkflowDeleteInputs) Model added in v0.4.0

func (wdi *WorkflowDeleteInputs) Model() []*Workflow

Model returns the Workflow entities for deleting, after validating.

func (*WorkflowDeleteInputs) SetGinContext added in v0.4.0

func (ic *WorkflowDeleteInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowDeleteInputs) SetModelClient added in v0.4.0

func (ic *WorkflowDeleteInputs) SetModelClient(cli *Client)

func (*WorkflowDeleteInputs) Validate added in v0.4.0

func (wdi *WorkflowDeleteInputs) Validate() error

Validate checks the WorkflowDeleteInputs entity.

func (*WorkflowDeleteInputs) ValidateWith added in v0.4.0

func (wdi *WorkflowDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowDeleteInputs entity with the given context and client set.

type WorkflowDeleteInputsItem added in v0.4.0

type WorkflowDeleteInputsItem struct {
	// ID of the Workflow entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Workflow entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
}

WorkflowDeleteInputs holds the deletion input item of the Workflow entities.

type WorkflowDeleteOne added in v0.4.0

type WorkflowDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowDeleteOne is the builder for deleting a single Workflow entity.

func (*WorkflowDeleteOne) Exec added in v0.4.0

func (wdo *WorkflowDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WorkflowDeleteOne) ExecX added in v0.4.0

func (wdo *WorkflowDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowDeleteOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowDelete builder.

type WorkflowEdges added in v0.4.0

type WorkflowEdges struct {
	// Project to which the workflow belongs.
	Project *Project `json:"project,omitempty"`
	// Stages that belong to this workflow.
	Stages []*WorkflowStage `json:"stages,omitempty"`
	// Workflow executions that belong to this workflow.
	Executions []*WorkflowExecution `json:"executions,omitempty"`
	// contains filtered or unexported fields
}

WorkflowEdges holds the relations/edges for other nodes in the graph.

func (WorkflowEdges) ExecutionsOrErr added in v0.4.0

func (e WorkflowEdges) ExecutionsOrErr() ([]*WorkflowExecution, error)

ExecutionsOrErr returns the Executions value or an error if the edge was not loaded in eager-loading.

func (WorkflowEdges) ProjectOrErr added in v0.4.0

func (e WorkflowEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowEdges) StagesOrErr added in v0.4.0

func (e WorkflowEdges) StagesOrErr() ([]*WorkflowStage, error)

StagesOrErr returns the Stages value or an error if the edge was not loaded in eager-loading.

type WorkflowExecution added in v0.4.0

type WorkflowExecution struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `json:"status,omitempty"`
	// ID of the project to belong.
	ProjectID object.ID `json:"project_id,omitempty"`
	// Version of the workflow execution.
	Version int `json:"version,omitempty,cli-table-column"`
	// Type of the workflow execution.
	Type string `json:"type,omitempty"`
	// ID of the workflow that this workflow execution belongs to.
	WorkflowID object.ID `json:"workflow_id,omitempty"`
	// ID of the subject that create workflow execution.
	SubjectID object.ID `json:"subject_id,omitempty"`
	// Time of the workflow execution started.
	ExecuteTime time.Time `json:"execute_time,omitempty"`
	// Number of times that this workflow execution has been executed.
	Times int `json:"times,omitempty"`
	// Duration seconds of the workflow execution.
	Duration int `json:"duration,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `json:"parallelism,omitempty"`
	// Timeout of the workflow execution.
	Timeout int `json:"timeout,omitempty"`
	// Trigger of the workflow execution.
	Trigger types.WorkflowExecutionTrigger `json:"trigger,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorkflowExecutionQuery when eager-loading is set.
	Edges WorkflowExecutionEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

WorkflowExecution is the model entity for the WorkflowExecution schema.

func (*WorkflowExecution) ExecContext added in v0.4.0

func (c *WorkflowExecution) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecution) QueryContext added in v0.4.0

func (c *WorkflowExecution) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecution) QueryProject added in v0.4.0

func (we *WorkflowExecution) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the WorkflowExecution entity.

func (*WorkflowExecution) QueryStages added in v0.4.0

QueryStages queries the "stages" edge of the WorkflowExecution entity.

func (*WorkflowExecution) QueryWorkflow added in v0.4.0

func (we *WorkflowExecution) QueryWorkflow() *WorkflowQuery

QueryWorkflow queries the "workflow" edge of the WorkflowExecution entity.

func (*WorkflowExecution) String added in v0.4.0

func (we *WorkflowExecution) String() string

String implements the fmt.Stringer.

func (*WorkflowExecution) Unwrap added in v0.4.0

func (we *WorkflowExecution) Unwrap() *WorkflowExecution

Unwrap unwraps the WorkflowExecution 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 (*WorkflowExecution) Update added in v0.4.0

Update returns a builder for updating this WorkflowExecution. Note that you need to call WorkflowExecution.Unwrap() before calling this method if this WorkflowExecution was returned from a transaction, and the transaction was committed or rolled back.

func (*WorkflowExecution) Value added in v0.4.0

func (we *WorkflowExecution) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WorkflowExecution. This includes values selected through modifiers, order, etc.

func (*WorkflowExecution) View added in v0.4.0

View returns the output of WorkflowExecution entity.

type WorkflowExecutionClient added in v0.4.0

type WorkflowExecutionClient struct {
	// contains filtered or unexported fields
}

WorkflowExecutionClient is a client for the WorkflowExecution schema.

func NewWorkflowExecutionClient added in v0.4.0

func NewWorkflowExecutionClient(c config) *WorkflowExecutionClient

NewWorkflowExecutionClient returns a client for the WorkflowExecution from the given config.

func (*WorkflowExecutionClient) Create added in v0.4.0

Create returns a builder for creating a WorkflowExecution entity.

func (*WorkflowExecutionClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of WorkflowExecution entities.

func (*WorkflowExecutionClient) Delete added in v0.4.0

Delete returns a delete builder for WorkflowExecution.

func (*WorkflowExecutionClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowExecutionClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowExecutionClient) ExecContext added in v0.4.0

func (c *WorkflowExecutionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecutionClient) Get added in v0.4.0

Get returns a WorkflowExecution entity by its id.

func (*WorkflowExecutionClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*WorkflowExecutionClient) Hooks added in v0.4.0

func (c *WorkflowExecutionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowExecutionClient) Intercept added in v0.4.0

func (c *WorkflowExecutionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowexecution.Intercept(f(g(h())))`.

func (*WorkflowExecutionClient) Interceptors added in v0.4.0

func (c *WorkflowExecutionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowExecutionClient) MapCreateBulk added in v0.5.0

func (c *WorkflowExecutionClient) MapCreateBulk(slice any, setFunc func(*WorkflowExecutionCreate, int)) *WorkflowExecutionCreateBulk

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 (*WorkflowExecutionClient) Query added in v0.4.0

Query returns a query builder for WorkflowExecution.

func (*WorkflowExecutionClient) QueryContext added in v0.4.0

func (c *WorkflowExecutionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecutionClient) QueryProject added in v0.4.0

QueryProject queries the project edge of a WorkflowExecution.

func (*WorkflowExecutionClient) QueryStages added in v0.4.0

QueryStages queries the stages edge of a WorkflowExecution.

func (*WorkflowExecutionClient) QueryWorkflow added in v0.4.0

QueryWorkflow queries the workflow edge of a WorkflowExecution.

func (*WorkflowExecutionClient) Update added in v0.4.0

Update returns an update builder for WorkflowExecution.

func (*WorkflowExecutionClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*WorkflowExecutionClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*WorkflowExecutionClient) Use added in v0.4.0

func (c *WorkflowExecutionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowexecution.Hooks(f(g(h())))`.

type WorkflowExecutionClientGetter added in v0.4.0

type WorkflowExecutionClientGetter interface {
	// WorkflowExecutions returns the client for interacting with the WorkflowExecution builders.
	WorkflowExecutions() *WorkflowExecutionClient
}

WorkflowExecutionClientGetter is an interface that allows getting WorkflowExecutionClient.

type WorkflowExecutionCreate added in v0.4.0

type WorkflowExecutionCreate struct {
	// contains filtered or unexported fields
}

WorkflowExecutionCreate is the builder for creating a WorkflowExecution entity.

func (*WorkflowExecutionCreate) AddStageIDs added in v0.4.0

func (wec *WorkflowExecutionCreate) AddStageIDs(ids ...object.ID) *WorkflowExecutionCreate

AddStageIDs adds the "stages" edge to the WorkflowStageExecution entity by IDs.

func (*WorkflowExecutionCreate) AddStages added in v0.4.0

AddStages adds the "stages" edges to the WorkflowStageExecution entity.

func (*WorkflowExecutionCreate) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowExecutionCreate) ExecContext added in v0.4.0

func (c *WorkflowExecutionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecutionCreate) ExecE added in v0.4.0

func (wec *WorkflowExecutionCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowExecutionCreate) ExecEX added in v0.4.0

func (wec *WorkflowExecutionCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowExecutionCreate) ExecX added in v0.4.0

func (wec *WorkflowExecutionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowExecutionCreate) Mutation added in v0.4.0

Mutation returns the WorkflowExecutionMutation object of the builder.

func (*WorkflowExecutionCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowExecution.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowExecutionUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowExecutionCreate) OnConflictColumns added in v0.4.0

func (wec *WorkflowExecutionCreate) OnConflictColumns(columns ...string) *WorkflowExecutionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowExecution.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowExecutionCreate) QueryContext added in v0.4.0

func (c *WorkflowExecutionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecutionCreate) Save added in v0.4.0

Save creates the WorkflowExecution in the database.

func (*WorkflowExecutionCreate) SaveE added in v0.4.0

func (wec *WorkflowExecutionCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowExecution) error) (*WorkflowExecution, error)

SaveE calls the given function after created the WorkflowExecution entity, which is always good for cascading create operations.

func (*WorkflowExecutionCreate) SaveEX added in v0.4.0

func (wec *WorkflowExecutionCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowExecution) error) *WorkflowExecution

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowExecutionCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*WorkflowExecutionCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowExecutionCreate) SetAnnotations added in v0.4.0

func (wec *WorkflowExecutionCreate) SetAnnotations(m map[string]string) *WorkflowExecutionCreate

SetAnnotations sets the "annotations" field.

func (*WorkflowExecutionCreate) SetCreateTime added in v0.4.0

SetCreateTime sets the "create_time" field.

func (*WorkflowExecutionCreate) SetDescription added in v0.4.0

func (wec *WorkflowExecutionCreate) SetDescription(s string) *WorkflowExecutionCreate

SetDescription sets the "description" field.

func (*WorkflowExecutionCreate) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowExecutionCreate) SetExecuteTime added in v0.4.0

func (wec *WorkflowExecutionCreate) SetExecuteTime(t time.Time) *WorkflowExecutionCreate

SetExecuteTime sets the "execute_time" field.

func (*WorkflowExecutionCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*WorkflowExecutionCreate) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowExecutionCreate) SetName added in v0.4.0

SetName sets the "name" field.

func (*WorkflowExecutionCreate) SetNillableCreateTime added in v0.4.0

func (wec *WorkflowExecutionCreate) SetNillableCreateTime(t *time.Time) *WorkflowExecutionCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetNillableDescription added in v0.4.0

func (wec *WorkflowExecutionCreate) SetNillableDescription(s *string) *WorkflowExecutionCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetNillableDuration added in v0.4.0

func (wec *WorkflowExecutionCreate) SetNillableDuration(i *int) *WorkflowExecutionCreate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetNillableExecuteTime added in v0.4.0

func (wec *WorkflowExecutionCreate) SetNillableExecuteTime(t *time.Time) *WorkflowExecutionCreate

SetNillableExecuteTime sets the "execute_time" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetNillableParallelism added in v0.4.0

func (wec *WorkflowExecutionCreate) SetNillableParallelism(i *int) *WorkflowExecutionCreate

SetNillableParallelism sets the "parallelism" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetNillableStatus added in v0.4.0

func (wec *WorkflowExecutionCreate) SetNillableStatus(s *status.Status) *WorkflowExecutionCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetNillableTimeout added in v0.4.0

func (wec *WorkflowExecutionCreate) SetNillableTimeout(i *int) *WorkflowExecutionCreate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetNillableTimes added in v0.4.0

func (wec *WorkflowExecutionCreate) SetNillableTimes(i *int) *WorkflowExecutionCreate

SetNillableTimes sets the "times" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetNillableTrigger added in v0.4.0

SetNillableTrigger sets the "trigger" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetNillableUpdateTime added in v0.4.0

func (wec *WorkflowExecutionCreate) SetNillableUpdateTime(t *time.Time) *WorkflowExecutionCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*WorkflowExecutionCreate) SetParallelism added in v0.4.0

func (wec *WorkflowExecutionCreate) SetParallelism(i int) *WorkflowExecutionCreate

SetParallelism sets the "parallelism" field.

func (*WorkflowExecutionCreate) SetProject added in v0.4.0

SetProject sets the "project" edge to the Project entity.

func (*WorkflowExecutionCreate) SetProjectID added in v0.4.0

SetProjectID sets the "project_id" field.

func (*WorkflowExecutionCreate) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowExecutionCreate) SetSubjectID added in v0.4.0

SetSubjectID sets the "subject_id" field.

func (*WorkflowExecutionCreate) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowExecutionCreate) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowExecutionCreate) SetTrigger added in v0.4.0

SetTrigger sets the "trigger" field.

func (*WorkflowExecutionCreate) SetType added in v0.4.0

SetType sets the "type" field.

func (*WorkflowExecutionCreate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowExecutionCreate) SetVersion added in v0.4.0

SetVersion sets the "version" field.

func (*WorkflowExecutionCreate) SetWorkflow added in v0.4.0

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*WorkflowExecutionCreate) SetWorkflowID added in v0.4.0

SetWorkflowID sets the "workflow_id" field.

type WorkflowExecutionCreateBulk added in v0.4.0

type WorkflowExecutionCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowExecutionCreateBulk is the builder for creating many WorkflowExecution entities in bulk.

func (*WorkflowExecutionCreateBulk) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowExecutionCreateBulk) ExecContext added in v0.4.0

func (c *WorkflowExecutionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecutionCreateBulk) ExecE added in v0.4.0

func (wecb *WorkflowExecutionCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowExecutionCreateBulk) ExecEX added in v0.4.0

func (wecb *WorkflowExecutionCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowExecutionCreateBulk) ExecX added in v0.4.0

func (wecb *WorkflowExecutionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowExecutionCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowExecution.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowExecutionUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowExecutionCreateBulk) OnConflictColumns added in v0.4.0

func (wecb *WorkflowExecutionCreateBulk) OnConflictColumns(columns ...string) *WorkflowExecutionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowExecution.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowExecutionCreateBulk) QueryContext added in v0.4.0

func (c *WorkflowExecutionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecutionCreateBulk) Save added in v0.4.0

Save creates the WorkflowExecution entities in the database.

func (*WorkflowExecutionCreateBulk) SaveE added in v0.4.0

func (wecb *WorkflowExecutionCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowExecution) error) ([]*WorkflowExecution, error)

SaveE calls the given function after created the WorkflowExecution entities, which is always good for cascading create operations.

func (*WorkflowExecutionCreateBulk) SaveEX added in v0.4.0

func (wecb *WorkflowExecutionCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowExecution) error) []*WorkflowExecution

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowExecutionCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowExecutionCreateBulk) Set added in v0.4.0

Set leverages the WorkflowExecutionCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type WorkflowExecutionCreateInput added in v0.4.0

type WorkflowExecutionCreateInput struct {

	// Project indicates to create WorkflowExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to create WorkflowExecution entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Number of times that this workflow execution has been executed.
	Times int `path:"-" query:"-" json:"times,omitempty"`
	// Duration seconds of the workflow execution.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism,omitempty"`
	// Timeout of the workflow execution.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

WorkflowExecutionCreateInput holds the creation input of the WorkflowExecution entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowExecutionCreateInput) Model added in v0.4.0

Model returns the WorkflowExecution entity for creating, after validating.

func (*WorkflowExecutionCreateInput) SetGinContext added in v0.4.0

func (ic *WorkflowExecutionCreateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowExecutionCreateInput) SetModelClient added in v0.4.0

func (ic *WorkflowExecutionCreateInput) SetModelClient(cli *Client)

func (*WorkflowExecutionCreateInput) Validate added in v0.4.0

func (weci *WorkflowExecutionCreateInput) Validate() error

Validate checks the WorkflowExecutionCreateInput entity.

func (*WorkflowExecutionCreateInput) ValidateWith added in v0.4.0

func (weci *WorkflowExecutionCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionCreateInput entity with the given context and client set.

type WorkflowExecutionCreateInputs added in v0.4.0

type WorkflowExecutionCreateInputs struct {

	// Project indicates to create WorkflowExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to create WorkflowExecution entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowExecutionCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowExecutionCreateInputs holds the creation input of the WorkflowExecution entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowExecutionCreateInputs) Model added in v0.4.0

Model returns the WorkflowExecution entities for creating, after validating.

func (*WorkflowExecutionCreateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowExecutionCreateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowExecutionCreateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowExecutionCreateInputs) SetModelClient(cli *Client)

func (*WorkflowExecutionCreateInputs) Validate added in v0.4.0

func (weci *WorkflowExecutionCreateInputs) Validate() error

Validate checks the WorkflowExecutionCreateInputs entity .

func (*WorkflowExecutionCreateInputs) ValidateWith added in v0.4.0

func (weci *WorkflowExecutionCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionCreateInputs entity with the given context and client set.

type WorkflowExecutionCreateInputsItem added in v0.4.0

type WorkflowExecutionCreateInputsItem struct {
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Number of times that this workflow execution has been executed.
	Times int `path:"-" query:"-" json:"times,omitempty"`
	// Duration seconds of the workflow execution.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism,omitempty"`
	// Timeout of the workflow execution.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
}

WorkflowExecutionCreateInputs holds the creation input item of the WorkflowExecution entities.

func (*WorkflowExecutionCreateInputsItem) ValidateWith added in v0.4.0

func (weci *WorkflowExecutionCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionCreateInputsItem entity with the given context and client set.

type WorkflowExecutionDelete added in v0.4.0

type WorkflowExecutionDelete struct {
	// contains filtered or unexported fields
}

WorkflowExecutionDelete is the builder for deleting a WorkflowExecution entity.

func (*WorkflowExecutionDelete) Exec added in v0.4.0

func (wed *WorkflowExecutionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowExecutionDelete) ExecContext added in v0.4.0

func (c *WorkflowExecutionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecutionDelete) ExecX added in v0.4.0

func (wed *WorkflowExecutionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowExecutionDelete) QueryContext added in v0.4.0

func (c *WorkflowExecutionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecutionDelete) Where added in v0.4.0

Where appends a list predicates to the WorkflowExecutionDelete builder.

type WorkflowExecutionDeleteInput added in v0.4.0

type WorkflowExecutionDeleteInput struct {
	WorkflowExecutionQueryInput `path:",inline"`
}

WorkflowExecutionDeleteInput holds the deletion input of the WorkflowExecution entity, please tags with `path:",inline"` if embedding.

func (*WorkflowExecutionDeleteInput) SetGinContext added in v0.4.0

func (ic *WorkflowExecutionDeleteInput) SetGinContext(ctx *gin.Context)

func (*WorkflowExecutionDeleteInput) SetModelClient added in v0.4.0

func (ic *WorkflowExecutionDeleteInput) SetModelClient(cli *Client)

type WorkflowExecutionDeleteInputs added in v0.4.0

type WorkflowExecutionDeleteInputs struct {

	// Project indicates to delete WorkflowExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to delete WorkflowExecution entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowExecutionDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowExecutionDeleteInputs holds the deletion input of the WorkflowExecution entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowExecutionDeleteInputs) IDs added in v0.4.0

func (wedi *WorkflowExecutionDeleteInputs) IDs() []object.ID

IDs returns the ID list of the WorkflowExecution entities for deleting, after validating.

func (*WorkflowExecutionDeleteInputs) Model added in v0.4.0

Model returns the WorkflowExecution entities for deleting, after validating.

func (*WorkflowExecutionDeleteInputs) SetGinContext added in v0.4.0

func (ic *WorkflowExecutionDeleteInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowExecutionDeleteInputs) SetModelClient added in v0.4.0

func (ic *WorkflowExecutionDeleteInputs) SetModelClient(cli *Client)

func (*WorkflowExecutionDeleteInputs) Validate added in v0.4.0

func (wedi *WorkflowExecutionDeleteInputs) Validate() error

Validate checks the WorkflowExecutionDeleteInputs entity.

func (*WorkflowExecutionDeleteInputs) ValidateWith added in v0.4.0

func (wedi *WorkflowExecutionDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionDeleteInputs entity with the given context and client set.

type WorkflowExecutionDeleteInputsItem added in v0.4.0

type WorkflowExecutionDeleteInputsItem struct {
	// ID of the WorkflowExecution entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

WorkflowExecutionDeleteInputs holds the deletion input item of the WorkflowExecution entities.

type WorkflowExecutionDeleteOne added in v0.4.0

type WorkflowExecutionDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowExecutionDeleteOne is the builder for deleting a single WorkflowExecution entity.

func (*WorkflowExecutionDeleteOne) Exec added in v0.4.0

Exec executes the deletion query.

func (*WorkflowExecutionDeleteOne) ExecX added in v0.4.0

func (wedo *WorkflowExecutionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowExecutionDeleteOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowExecutionDelete builder.

type WorkflowExecutionEdges added in v0.4.0

type WorkflowExecutionEdges struct {
	// Project to which the workflow execution belongs.
	Project *Project `json:"project,omitempty"`
	// Workflow stage executions that belong to this workflow execution.
	Stages []*WorkflowStageExecution `json:"stages,omitempty"`
	// Workflow that this workflow execution belongs to.
	Workflow *Workflow `json:"workflow,omitempty"`
	// contains filtered or unexported fields
}

WorkflowExecutionEdges holds the relations/edges for other nodes in the graph.

func (WorkflowExecutionEdges) ProjectOrErr added in v0.4.0

func (e WorkflowExecutionEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowExecutionEdges) StagesOrErr added in v0.4.0

func (e WorkflowExecutionEdges) StagesOrErr() ([]*WorkflowStageExecution, error)

StagesOrErr returns the Stages value or an error if the edge was not loaded in eager-loading.

func (WorkflowExecutionEdges) WorkflowOrErr added in v0.4.0

func (e WorkflowExecutionEdges) 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 WorkflowExecutionGroupBy added in v0.4.0

type WorkflowExecutionGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowExecutionGroupBy is the group-by builder for WorkflowExecution entities.

func (*WorkflowExecutionGroupBy) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowExecutionGroupBy) Bool added in v0.4.0

func (s *WorkflowExecutionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionGroupBy) BoolX added in v0.4.0

func (s *WorkflowExecutionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowExecutionGroupBy) Bools added in v0.4.0

func (s *WorkflowExecutionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionGroupBy) BoolsX added in v0.4.0

func (s *WorkflowExecutionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowExecutionGroupBy) Float64 added in v0.4.0

func (s *WorkflowExecutionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionGroupBy) Float64X added in v0.4.0

func (s *WorkflowExecutionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowExecutionGroupBy) Float64s added in v0.4.0

func (s *WorkflowExecutionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionGroupBy) Float64sX added in v0.4.0

func (s *WorkflowExecutionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowExecutionGroupBy) Int added in v0.4.0

func (s *WorkflowExecutionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionGroupBy) IntX added in v0.4.0

func (s *WorkflowExecutionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowExecutionGroupBy) Ints added in v0.4.0

func (s *WorkflowExecutionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionGroupBy) IntsX added in v0.4.0

func (s *WorkflowExecutionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowExecutionGroupBy) Scan added in v0.4.0

func (wegb *WorkflowExecutionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowExecutionGroupBy) ScanX added in v0.4.0

func (s *WorkflowExecutionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowExecutionGroupBy) String added in v0.4.0

func (s *WorkflowExecutionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionGroupBy) StringX added in v0.4.0

func (s *WorkflowExecutionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowExecutionGroupBy) Strings added in v0.4.0

func (s *WorkflowExecutionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionGroupBy) StringsX added in v0.4.0

func (s *WorkflowExecutionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowExecutionMutation added in v0.4.0

type WorkflowExecutionMutation struct {
	// contains filtered or unexported fields
}

WorkflowExecutionMutation represents an operation that mutates the WorkflowExecution nodes in the graph.

func (*WorkflowExecutionMutation) AddDuration added in v0.4.0

func (m *WorkflowExecutionMutation) AddDuration(i int)

AddDuration adds i to the "duration" field.

func (*WorkflowExecutionMutation) AddField added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) AddParallelism added in v0.4.0

func (m *WorkflowExecutionMutation) AddParallelism(i int)

AddParallelism adds i to the "parallelism" field.

func (*WorkflowExecutionMutation) AddStageIDs added in v0.4.0

func (m *WorkflowExecutionMutation) AddStageIDs(ids ...object.ID)

AddStageIDs adds the "stages" edge to the WorkflowStageExecution entity by ids.

func (*WorkflowExecutionMutation) AddTimeout added in v0.4.0

func (m *WorkflowExecutionMutation) AddTimeout(i int)

AddTimeout adds i to the "timeout" field.

func (*WorkflowExecutionMutation) AddTimes added in v0.4.0

func (m *WorkflowExecutionMutation) AddTimes(i int)

AddTimes adds i to the "times" field.

func (*WorkflowExecutionMutation) AddVersion added in v0.4.0

func (m *WorkflowExecutionMutation) AddVersion(i int)

AddVersion adds i to the "version" field.

func (*WorkflowExecutionMutation) AddedDuration added in v0.4.0

func (m *WorkflowExecutionMutation) AddedDuration() (r int, exists bool)

AddedDuration returns the value that was added to the "duration" field in this mutation.

func (*WorkflowExecutionMutation) AddedEdges added in v0.4.0

func (m *WorkflowExecutionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowExecutionMutation) AddedField added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) AddedFields added in v0.4.0

func (m *WorkflowExecutionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowExecutionMutation) AddedIDs added in v0.4.0

func (m *WorkflowExecutionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorkflowExecutionMutation) AddedParallelism added in v0.4.0

func (m *WorkflowExecutionMutation) AddedParallelism() (r int, exists bool)

AddedParallelism returns the value that was added to the "parallelism" field in this mutation.

func (*WorkflowExecutionMutation) AddedTimeout added in v0.4.0

func (m *WorkflowExecutionMutation) AddedTimeout() (r int, exists bool)

AddedTimeout returns the value that was added to the "timeout" field in this mutation.

func (*WorkflowExecutionMutation) AddedTimes added in v0.4.0

func (m *WorkflowExecutionMutation) AddedTimes() (r int, exists bool)

AddedTimes returns the value that was added to the "times" field in this mutation.

func (*WorkflowExecutionMutation) AddedVersion added in v0.4.0

func (m *WorkflowExecutionMutation) AddedVersion() (r int, exists bool)

AddedVersion returns the value that was added to the "version" field in this mutation.

func (*WorkflowExecutionMutation) Annotations added in v0.4.0

func (m *WorkflowExecutionMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*WorkflowExecutionMutation) AnnotationsCleared added in v0.4.0

func (m *WorkflowExecutionMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*WorkflowExecutionMutation) ClearAnnotations added in v0.4.0

func (m *WorkflowExecutionMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowExecutionMutation) ClearDescription added in v0.4.0

func (m *WorkflowExecutionMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*WorkflowExecutionMutation) ClearEdge added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) ClearExecuteTime added in v0.4.0

func (m *WorkflowExecutionMutation) ClearExecuteTime()

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowExecutionMutation) ClearField added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) ClearLabels added in v0.4.0

func (m *WorkflowExecutionMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*WorkflowExecutionMutation) ClearProject added in v0.4.0

func (m *WorkflowExecutionMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*WorkflowExecutionMutation) ClearStages added in v0.4.0

func (m *WorkflowExecutionMutation) ClearStages()

ClearStages clears the "stages" edge to the WorkflowStageExecution entity.

func (*WorkflowExecutionMutation) ClearStatus added in v0.4.0

func (m *WorkflowExecutionMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*WorkflowExecutionMutation) ClearWorkflow added in v0.4.0

func (m *WorkflowExecutionMutation) ClearWorkflow()

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*WorkflowExecutionMutation) ClearedEdges added in v0.4.0

func (m *WorkflowExecutionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowExecutionMutation) ClearedFields added in v0.4.0

func (m *WorkflowExecutionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowExecutionMutation) Client added in v0.4.0

func (m WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) CreateTime added in v0.4.0

func (m *WorkflowExecutionMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*WorkflowExecutionMutation) Description added in v0.4.0

func (m *WorkflowExecutionMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*WorkflowExecutionMutation) DescriptionCleared added in v0.4.0

func (m *WorkflowExecutionMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*WorkflowExecutionMutation) Duration added in v0.4.0

func (m *WorkflowExecutionMutation) Duration() (r int, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*WorkflowExecutionMutation) EdgeCleared added in v0.4.0

func (m *WorkflowExecutionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorkflowExecutionMutation) ExecContext added in v0.4.0

func (c *WorkflowExecutionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecutionMutation) ExecuteTime added in v0.4.0

func (m *WorkflowExecutionMutation) ExecuteTime() (r time.Time, exists bool)

ExecuteTime returns the value of the "execute_time" field in the mutation.

func (*WorkflowExecutionMutation) ExecuteTimeCleared added in v0.4.0

func (m *WorkflowExecutionMutation) ExecuteTimeCleared() bool

ExecuteTimeCleared returns if the "execute_time" field was cleared in this mutation.

func (*WorkflowExecutionMutation) Field added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) FieldCleared added in v0.4.0

func (m *WorkflowExecutionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorkflowExecutionMutation) Fields added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) GetType added in v0.4.0

func (m *WorkflowExecutionMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*WorkflowExecutionMutation) ID added in v0.4.0

func (m *WorkflowExecutionMutation) ID() (id object.ID, 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 (*WorkflowExecutionMutation) IDs added in v0.4.0

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 (*WorkflowExecutionMutation) Labels added in v0.4.0

func (m *WorkflowExecutionMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*WorkflowExecutionMutation) LabelsCleared added in v0.4.0

func (m *WorkflowExecutionMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*WorkflowExecutionMutation) Name added in v0.4.0

func (m *WorkflowExecutionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WorkflowExecutionMutation) OldAnnotations added in v0.4.0

func (m *WorkflowExecutionMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldCreateTime added in v0.4.0

func (m *WorkflowExecutionMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldDescription added in v0.4.0

func (m *WorkflowExecutionMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldDuration added in v0.4.0

func (m *WorkflowExecutionMutation) OldDuration(ctx context.Context) (v int, err error)

OldDuration returns the old "duration" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldExecuteTime added in v0.4.0

func (m *WorkflowExecutionMutation) OldExecuteTime(ctx context.Context) (v time.Time, err error)

OldExecuteTime returns the old "execute_time" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldField added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) OldLabels added in v0.4.0

func (m *WorkflowExecutionMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldName added in v0.4.0

func (m *WorkflowExecutionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldParallelism added in v0.4.0

func (m *WorkflowExecutionMutation) OldParallelism(ctx context.Context) (v int, err error)

OldParallelism returns the old "parallelism" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldProjectID added in v0.4.0

func (m *WorkflowExecutionMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldStatus added in v0.4.0

func (m *WorkflowExecutionMutation) OldStatus(ctx context.Context) (v status.Status, err error)

OldStatus returns the old "status" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldSubjectID added in v0.4.0

func (m *WorkflowExecutionMutation) OldSubjectID(ctx context.Context) (v object.ID, err error)

OldSubjectID returns the old "subject_id" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldTimeout added in v0.4.0

func (m *WorkflowExecutionMutation) OldTimeout(ctx context.Context) (v int, err error)

OldTimeout returns the old "timeout" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldTimes added in v0.4.0

func (m *WorkflowExecutionMutation) OldTimes(ctx context.Context) (v int, err error)

OldTimes returns the old "times" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldTrigger added in v0.4.0

OldTrigger returns the old "trigger" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldType added in v0.4.0

func (m *WorkflowExecutionMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldUpdateTime added in v0.4.0

func (m *WorkflowExecutionMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldVersion added in v0.4.0

func (m *WorkflowExecutionMutation) OldVersion(ctx context.Context) (v int, err error)

OldVersion returns the old "version" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) OldWorkflowID added in v0.4.0

func (m *WorkflowExecutionMutation) OldWorkflowID(ctx context.Context) (v object.ID, err error)

OldWorkflowID returns the old "workflow_id" field's value of the WorkflowExecution entity. If the WorkflowExecution 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 (*WorkflowExecutionMutation) Op added in v0.4.0

func (m *WorkflowExecutionMutation) Op() Op

Op returns the operation name.

func (*WorkflowExecutionMutation) Parallelism added in v0.4.0

func (m *WorkflowExecutionMutation) Parallelism() (r int, exists bool)

Parallelism returns the value of the "parallelism" field in the mutation.

func (*WorkflowExecutionMutation) ProjectCleared added in v0.4.0

func (m *WorkflowExecutionMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*WorkflowExecutionMutation) ProjectID added in v0.4.0

func (m *WorkflowExecutionMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*WorkflowExecutionMutation) ProjectIDs added in v0.4.0

func (m *WorkflowExecutionMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*WorkflowExecutionMutation) QueryContext added in v0.4.0

func (c *WorkflowExecutionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecutionMutation) RemoveStageIDs added in v0.4.0

func (m *WorkflowExecutionMutation) RemoveStageIDs(ids ...object.ID)

RemoveStageIDs removes the "stages" edge to the WorkflowStageExecution entity by IDs.

func (*WorkflowExecutionMutation) RemovedEdges added in v0.4.0

func (m *WorkflowExecutionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowExecutionMutation) RemovedIDs added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) RemovedStagesIDs added in v0.4.0

func (m *WorkflowExecutionMutation) RemovedStagesIDs() (ids []object.ID)

RemovedStages returns the removed IDs of the "stages" edge to the WorkflowStageExecution entity.

func (*WorkflowExecutionMutation) ResetAnnotations added in v0.4.0

func (m *WorkflowExecutionMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*WorkflowExecutionMutation) ResetCreateTime added in v0.4.0

func (m *WorkflowExecutionMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*WorkflowExecutionMutation) ResetDescription added in v0.4.0

func (m *WorkflowExecutionMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*WorkflowExecutionMutation) ResetDuration added in v0.4.0

func (m *WorkflowExecutionMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*WorkflowExecutionMutation) ResetEdge added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) ResetExecuteTime added in v0.4.0

func (m *WorkflowExecutionMutation) ResetExecuteTime()

ResetExecuteTime resets all changes to the "execute_time" field.

func (*WorkflowExecutionMutation) ResetField added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) ResetLabels added in v0.4.0

func (m *WorkflowExecutionMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*WorkflowExecutionMutation) ResetName added in v0.4.0

func (m *WorkflowExecutionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WorkflowExecutionMutation) ResetParallelism added in v0.4.0

func (m *WorkflowExecutionMutation) ResetParallelism()

ResetParallelism resets all changes to the "parallelism" field.

func (*WorkflowExecutionMutation) ResetProject added in v0.4.0

func (m *WorkflowExecutionMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*WorkflowExecutionMutation) ResetProjectID added in v0.4.0

func (m *WorkflowExecutionMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*WorkflowExecutionMutation) ResetStages added in v0.4.0

func (m *WorkflowExecutionMutation) ResetStages()

ResetStages resets all changes to the "stages" edge.

func (*WorkflowExecutionMutation) ResetStatus added in v0.4.0

func (m *WorkflowExecutionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*WorkflowExecutionMutation) ResetSubjectID added in v0.4.0

func (m *WorkflowExecutionMutation) ResetSubjectID()

ResetSubjectID resets all changes to the "subject_id" field.

func (*WorkflowExecutionMutation) ResetTimeout added in v0.4.0

func (m *WorkflowExecutionMutation) ResetTimeout()

ResetTimeout resets all changes to the "timeout" field.

func (*WorkflowExecutionMutation) ResetTimes added in v0.4.0

func (m *WorkflowExecutionMutation) ResetTimes()

ResetTimes resets all changes to the "times" field.

func (*WorkflowExecutionMutation) ResetTrigger added in v0.4.0

func (m *WorkflowExecutionMutation) ResetTrigger()

ResetTrigger resets all changes to the "trigger" field.

func (*WorkflowExecutionMutation) ResetType added in v0.4.0

func (m *WorkflowExecutionMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*WorkflowExecutionMutation) ResetUpdateTime added in v0.4.0

func (m *WorkflowExecutionMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*WorkflowExecutionMutation) ResetVersion added in v0.4.0

func (m *WorkflowExecutionMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*WorkflowExecutionMutation) ResetWorkflow added in v0.4.0

func (m *WorkflowExecutionMutation) ResetWorkflow()

ResetWorkflow resets all changes to the "workflow" edge.

func (*WorkflowExecutionMutation) ResetWorkflowID added in v0.4.0

func (m *WorkflowExecutionMutation) ResetWorkflowID()

ResetWorkflowID resets all changes to the "workflow_id" field.

func (*WorkflowExecutionMutation) SetAnnotations added in v0.4.0

func (m *WorkflowExecutionMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*WorkflowExecutionMutation) SetCreateTime added in v0.4.0

func (m *WorkflowExecutionMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*WorkflowExecutionMutation) SetDescription added in v0.4.0

func (m *WorkflowExecutionMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*WorkflowExecutionMutation) SetDuration added in v0.4.0

func (m *WorkflowExecutionMutation) SetDuration(i int)

SetDuration sets the "duration" field.

func (*WorkflowExecutionMutation) SetExecuteTime added in v0.4.0

func (m *WorkflowExecutionMutation) SetExecuteTime(t time.Time)

SetExecuteTime sets the "execute_time" field.

func (*WorkflowExecutionMutation) SetField added in v0.4.0

func (m *WorkflowExecutionMutation) 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 (*WorkflowExecutionMutation) SetID added in v0.4.0

func (m *WorkflowExecutionMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowExecution entities.

func (*WorkflowExecutionMutation) SetLabels added in v0.4.0

func (m *WorkflowExecutionMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*WorkflowExecutionMutation) SetName added in v0.4.0

func (m *WorkflowExecutionMutation) SetName(s string)

SetName sets the "name" field.

func (*WorkflowExecutionMutation) SetOp added in v0.4.0

func (m *WorkflowExecutionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowExecutionMutation) SetParallelism added in v0.4.0

func (m *WorkflowExecutionMutation) SetParallelism(i int)

SetParallelism sets the "parallelism" field.

func (*WorkflowExecutionMutation) SetProjectID added in v0.4.0

func (m *WorkflowExecutionMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*WorkflowExecutionMutation) SetStatus added in v0.4.0

func (m *WorkflowExecutionMutation) SetStatus(s status.Status)

SetStatus sets the "status" field.

func (*WorkflowExecutionMutation) SetSubjectID added in v0.4.0

func (m *WorkflowExecutionMutation) SetSubjectID(o object.ID)

SetSubjectID sets the "subject_id" field.

func (*WorkflowExecutionMutation) SetTimeout added in v0.4.0

func (m *WorkflowExecutionMutation) SetTimeout(i int)

SetTimeout sets the "timeout" field.

func (*WorkflowExecutionMutation) SetTimes added in v0.4.0

func (m *WorkflowExecutionMutation) SetTimes(i int)

SetTimes sets the "times" field.

func (*WorkflowExecutionMutation) SetTrigger added in v0.4.0

SetTrigger sets the "trigger" field.

func (*WorkflowExecutionMutation) SetType added in v0.4.0

func (m *WorkflowExecutionMutation) SetType(s string)

SetType sets the "type" field.

func (*WorkflowExecutionMutation) SetUpdateTime added in v0.4.0

func (m *WorkflowExecutionMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*WorkflowExecutionMutation) SetVersion added in v0.4.0

func (m *WorkflowExecutionMutation) SetVersion(i int)

SetVersion sets the "version" field.

func (*WorkflowExecutionMutation) SetWorkflowID added in v0.4.0

func (m *WorkflowExecutionMutation) SetWorkflowID(o object.ID)

SetWorkflowID sets the "workflow_id" field.

func (*WorkflowExecutionMutation) StagesCleared added in v0.4.0

func (m *WorkflowExecutionMutation) StagesCleared() bool

StagesCleared reports if the "stages" edge to the WorkflowStageExecution entity was cleared.

func (*WorkflowExecutionMutation) StagesIDs added in v0.4.0

func (m *WorkflowExecutionMutation) StagesIDs() (ids []object.ID)

StagesIDs returns the "stages" edge IDs in the mutation.

func (*WorkflowExecutionMutation) Status added in v0.4.0

func (m *WorkflowExecutionMutation) Status() (r status.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*WorkflowExecutionMutation) StatusCleared added in v0.4.0

func (m *WorkflowExecutionMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*WorkflowExecutionMutation) SubjectID added in v0.4.0

func (m *WorkflowExecutionMutation) SubjectID() (r object.ID, exists bool)

SubjectID returns the value of the "subject_id" field in the mutation.

func (*WorkflowExecutionMutation) Timeout added in v0.4.0

func (m *WorkflowExecutionMutation) Timeout() (r int, exists bool)

Timeout returns the value of the "timeout" field in the mutation.

func (*WorkflowExecutionMutation) Times added in v0.4.0

func (m *WorkflowExecutionMutation) Times() (r int, exists bool)

Times returns the value of the "times" field in the mutation.

func (*WorkflowExecutionMutation) Trigger added in v0.4.0

Trigger returns the value of the "trigger" field in the mutation.

func (WorkflowExecutionMutation) Tx added in v0.4.0

func (m WorkflowExecutionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorkflowExecutionMutation) Type added in v0.4.0

Type returns the node type of this mutation (WorkflowExecution).

func (*WorkflowExecutionMutation) UpdateTime added in v0.4.0

func (m *WorkflowExecutionMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*WorkflowExecutionMutation) Version added in v0.4.0

func (m *WorkflowExecutionMutation) Version() (r int, exists bool)

Version returns the value of the "version" field in the mutation.

func (*WorkflowExecutionMutation) Where added in v0.4.0

Where appends a list predicates to the WorkflowExecutionMutation builder.

func (*WorkflowExecutionMutation) WhereP added in v0.4.0

func (m *WorkflowExecutionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowExecutionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowExecutionMutation) WorkflowCleared added in v0.4.0

func (m *WorkflowExecutionMutation) WorkflowCleared() bool

WorkflowCleared reports if the "workflow" edge to the Workflow entity was cleared.

func (*WorkflowExecutionMutation) WorkflowID added in v0.4.0

func (m *WorkflowExecutionMutation) WorkflowID() (r object.ID, exists bool)

WorkflowID returns the value of the "workflow_id" field in the mutation.

func (*WorkflowExecutionMutation) WorkflowIDs added in v0.4.0

func (m *WorkflowExecutionMutation) WorkflowIDs() (ids []object.ID)

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 WorkflowExecutionOutput added in v0.4.0

type WorkflowExecutionOutput struct {
	ID          object.ID                      `json:"id,omitempty"`
	Name        string                         `json:"name,omitempty"`
	Description string                         `json:"description,omitempty"`
	Labels      map[string]string              `json:"labels,omitempty"`
	CreateTime  *time.Time                     `json:"createTime,omitempty"`
	UpdateTime  *time.Time                     `json:"updateTime,omitempty"`
	Status      status.Status                  `json:"status,omitempty"`
	Version     int                            `json:"version,cli-table-column,omitempty"`
	Type        string                         `json:"type,omitempty"`
	SubjectID   object.ID                      `json:"subjectID,omitempty"`
	ExecuteTime time.Time                      `json:"executeTime,omitempty"`
	Times       int                            `json:"times,omitempty"`
	Duration    int                            `json:"duration,omitempty"`
	Parallelism int                            `json:"parallelism,omitempty"`
	Timeout     int                            `json:"timeout,omitempty"`
	Trigger     types.WorkflowExecutionTrigger `json:"trigger,omitempty"`

	Project  *ProjectOutput                  `json:"project,omitempty"`
	Stages   []*WorkflowStageExecutionOutput `json:"stages,omitempty"`
	Workflow *WorkflowOutput                 `json:"workflow,omitempty"`
}

WorkflowExecutionOutput holds the output of the WorkflowExecution entity.

func ExposeWorkflowExecution added in v0.4.0

func ExposeWorkflowExecution(_we *WorkflowExecution) *WorkflowExecutionOutput

ExposeWorkflowExecution converts the WorkflowExecution to WorkflowExecutionOutput.

func ExposeWorkflowExecutions added in v0.4.0

func ExposeWorkflowExecutions(_wes []*WorkflowExecution) []*WorkflowExecutionOutput

ExposeWorkflowExecutions converts the WorkflowExecution slice to WorkflowExecutionOutput pointer slice.

type WorkflowExecutionPatchInput added in v0.5.0

type WorkflowExecutionPatchInput struct {
	WorkflowExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `path:"-" query:"-" json:"status,omitempty"`
	// Version of the workflow execution.
	Version int `path:"-" query:"-" json:"version,omitempty"`
	// Type of the workflow execution.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// ID of the subject that create workflow execution.
	SubjectID object.ID `path:"-" query:"-" json:"subjectID,omitempty"`
	// Time of the workflow execution started.
	ExecuteTime time.Time `path:"-" query:"-" json:"executeTime,omitempty"`
	// Number of times that this workflow execution has been executed.
	Times int `path:"-" query:"-" json:"times,omitempty"`
	// Duration seconds of the workflow execution.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism,omitempty"`
	// Timeout of the workflow execution.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// Trigger of the workflow execution.
	Trigger types.WorkflowExecutionTrigger `path:"-" query:"-" json:"trigger,omitempty"`
	// contains filtered or unexported fields
}

WorkflowExecutionPatchInput holds the patch input of the WorkflowExecution entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowExecutionPatchInput) Model added in v0.5.0

Model returns the WorkflowExecution patched entity, after validating.

func (*WorkflowExecutionPatchInput) PatchModel added in v0.5.0

func (wepi *WorkflowExecutionPatchInput) PatchModel() *WorkflowExecution

PatchModel returns the WorkflowExecution partition entity for patching.

func (*WorkflowExecutionPatchInput) SetGinContext added in v0.5.0

func (ic *WorkflowExecutionPatchInput) SetGinContext(ctx *gin.Context)

func (*WorkflowExecutionPatchInput) SetModelClient added in v0.5.0

func (ic *WorkflowExecutionPatchInput) SetModelClient(cli *Client)

func (*WorkflowExecutionPatchInput) Validate added in v0.5.0

func (wepi *WorkflowExecutionPatchInput) Validate() error

Validate checks the WorkflowExecutionPatchInput entity.

func (*WorkflowExecutionPatchInput) ValidateWith added in v0.5.0

func (wepi *WorkflowExecutionPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionPatchInput entity with the given context and client set.

type WorkflowExecutionQuery added in v0.4.0

type WorkflowExecutionQuery struct {
	// contains filtered or unexported fields
}

WorkflowExecutionQuery is the builder for querying WorkflowExecution entities.

func (*WorkflowExecutionQuery) Aggregate added in v0.4.0

Aggregate returns a WorkflowExecutionSelect configured with the given aggregations.

func (*WorkflowExecutionQuery) All added in v0.4.0

All executes the query and returns a list of WorkflowExecutions.

func (*WorkflowExecutionQuery) AllX added in v0.4.0

AllX is like All, but panics if an error occurs.

func (*WorkflowExecutionQuery) Clone added in v0.4.0

Clone returns a duplicate of the WorkflowExecutionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorkflowExecutionQuery) Count added in v0.4.0

func (weq *WorkflowExecutionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorkflowExecutionQuery) CountX added in v0.4.0

func (weq *WorkflowExecutionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowExecutionQuery) ExecContext added in v0.4.0

func (c *WorkflowExecutionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecutionQuery) Exist added in v0.4.0

func (weq *WorkflowExecutionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WorkflowExecutionQuery) ExistX added in v0.4.0

func (weq *WorkflowExecutionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowExecutionQuery) First added in v0.4.0

First returns the first WorkflowExecution entity from the query. Returns a *NotFoundError when no WorkflowExecution was found.

func (*WorkflowExecutionQuery) FirstID added in v0.4.0

func (weq *WorkflowExecutionQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first WorkflowExecution ID from the query. Returns a *NotFoundError when no WorkflowExecution ID was found.

func (*WorkflowExecutionQuery) FirstIDX added in v0.4.0

func (weq *WorkflowExecutionQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowExecutionQuery) FirstX added in v0.4.0

FirstX is like First, but panics if an error occurs.

func (*WorkflowExecutionQuery) ForShare added in v0.4.0

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 (*WorkflowExecutionQuery) ForUpdate added in v0.4.0

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 (*WorkflowExecutionQuery) GroupBy added in v0.4.0

func (weq *WorkflowExecutionQuery) GroupBy(field string, fields ...string) *WorkflowExecutionGroupBy

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.WorkflowExecution.Query().
	GroupBy(workflowexecution.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*WorkflowExecutionQuery) IDs added in v0.4.0

func (weq *WorkflowExecutionQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of WorkflowExecution IDs.

func (*WorkflowExecutionQuery) IDsX added in v0.4.0

func (weq *WorkflowExecutionQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowExecutionQuery) Limit added in v0.4.0

Limit the number of records to be returned by this query.

func (*WorkflowExecutionQuery) Modify added in v0.4.0

func (weq *WorkflowExecutionQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowExecutionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowExecutionQuery) Offset added in v0.4.0

func (weq *WorkflowExecutionQuery) Offset(offset int) *WorkflowExecutionQuery

Offset to start from.

func (*WorkflowExecutionQuery) Only added in v0.4.0

Only returns a single WorkflowExecution entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowExecution entity is found. Returns a *NotFoundError when no WorkflowExecution entities are found.

func (*WorkflowExecutionQuery) OnlyID added in v0.4.0

func (weq *WorkflowExecutionQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only WorkflowExecution ID in the query. Returns a *NotSingularError when more than one WorkflowExecution ID is found. Returns a *NotFoundError when no entities are found.

func (*WorkflowExecutionQuery) OnlyIDX added in v0.4.0

func (weq *WorkflowExecutionQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowExecutionQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowExecutionQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*WorkflowExecutionQuery) QueryContext added in v0.4.0

func (c *WorkflowExecutionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecutionQuery) QueryProject added in v0.4.0

func (weq *WorkflowExecutionQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*WorkflowExecutionQuery) QueryStages added in v0.4.0

QueryStages chains the current query on the "stages" edge.

func (*WorkflowExecutionQuery) QueryWorkflow added in v0.4.0

func (weq *WorkflowExecutionQuery) QueryWorkflow() *WorkflowQuery

QueryWorkflow chains the current query on the "workflow" edge.

func (*WorkflowExecutionQuery) Select added in v0.4.0

func (weq *WorkflowExecutionQuery) Select(fields ...string) *WorkflowExecutionSelect

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.WorkflowExecution.Query().
	Select(workflowexecution.FieldName).
	Scan(ctx, &v)

func (*WorkflowExecutionQuery) Unique added in v0.4.0

func (weq *WorkflowExecutionQuery) Unique(unique bool) *WorkflowExecutionQuery

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 (*WorkflowExecutionQuery) Where added in v0.4.0

Where adds a new predicate for the WorkflowExecutionQuery builder.

func (*WorkflowExecutionQuery) WhereP added in v0.4.0

func (weq *WorkflowExecutionQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowExecutionQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowExecutionQuery) WithProject added in v0.4.0

func (weq *WorkflowExecutionQuery) WithProject(opts ...func(*ProjectQuery)) *WorkflowExecutionQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowExecutionQuery) WithStages added in v0.4.0

WithStages tells the query-builder to eager-load the nodes that are connected to the "stages" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowExecutionQuery) WithWorkflow added in v0.4.0

func (weq *WorkflowExecutionQuery) WithWorkflow(opts ...func(*WorkflowQuery)) *WorkflowExecutionQuery

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 WorkflowExecutionQueryInput added in v0.4.0

type WorkflowExecutionQueryInput struct {

	// Project indicates to query WorkflowExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project"`
	// Workflow indicates to query WorkflowExecution entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"workflow"`

	// Refer holds the route path reference of the WorkflowExecution entity.
	Refer *object.Refer `path:"workflowexecution,default=" query:"-" json:"-"`
	// ID of the WorkflowExecution entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

WorkflowExecutionQueryInput holds the query input of the WorkflowExecution entity, please tags with `path:",inline"` if embedding.

func (*WorkflowExecutionQueryInput) Model added in v0.4.0

Model returns the WorkflowExecution entity for querying, after validating.

func (*WorkflowExecutionQueryInput) SetGinContext added in v0.4.0

func (ic *WorkflowExecutionQueryInput) SetGinContext(ctx *gin.Context)

func (*WorkflowExecutionQueryInput) SetModelClient added in v0.4.0

func (ic *WorkflowExecutionQueryInput) SetModelClient(cli *Client)

func (*WorkflowExecutionQueryInput) Validate added in v0.4.0

func (weqi *WorkflowExecutionQueryInput) Validate() error

Validate checks the WorkflowExecutionQueryInput entity.

func (*WorkflowExecutionQueryInput) ValidateWith added in v0.4.0

func (weqi *WorkflowExecutionQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionQueryInput entity with the given context and client set.

type WorkflowExecutionQueryInputs added in v0.4.0

type WorkflowExecutionQueryInputs struct {

	// Project indicates to query WorkflowExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to query WorkflowExecution entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

WorkflowExecutionQueryInputs holds the query input of the WorkflowExecution entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*WorkflowExecutionQueryInputs) SetGinContext added in v0.4.0

func (ic *WorkflowExecutionQueryInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowExecutionQueryInputs) SetModelClient added in v0.4.0

func (ic *WorkflowExecutionQueryInputs) SetModelClient(cli *Client)

func (*WorkflowExecutionQueryInputs) Validate added in v0.4.0

func (weqi *WorkflowExecutionQueryInputs) Validate() error

Validate checks the WorkflowExecutionQueryInputs entity.

func (*WorkflowExecutionQueryInputs) ValidateWith added in v0.4.0

func (weqi *WorkflowExecutionQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionQueryInputs entity with the given context and client set.

type WorkflowExecutionSelect added in v0.4.0

type WorkflowExecutionSelect struct {
	*WorkflowExecutionQuery
	// contains filtered or unexported fields
}

WorkflowExecutionSelect is the builder for selecting fields of WorkflowExecution entities.

func (*WorkflowExecutionSelect) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowExecutionSelect) Bool added in v0.4.0

func (s *WorkflowExecutionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionSelect) BoolX added in v0.4.0

func (s *WorkflowExecutionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowExecutionSelect) Bools added in v0.4.0

func (s *WorkflowExecutionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionSelect) BoolsX added in v0.4.0

func (s *WorkflowExecutionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (WorkflowExecutionSelect) ExecContext added in v0.4.0

func (c WorkflowExecutionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecutionSelect) Float64 added in v0.4.0

func (s *WorkflowExecutionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionSelect) Float64X added in v0.4.0

func (s *WorkflowExecutionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowExecutionSelect) Float64s added in v0.4.0

func (s *WorkflowExecutionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionSelect) Float64sX added in v0.4.0

func (s *WorkflowExecutionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowExecutionSelect) Int added in v0.4.0

func (s *WorkflowExecutionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionSelect) IntX added in v0.4.0

func (s *WorkflowExecutionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowExecutionSelect) Ints added in v0.4.0

func (s *WorkflowExecutionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionSelect) IntsX added in v0.4.0

func (s *WorkflowExecutionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowExecutionSelect) Modify added in v0.4.0

func (wes *WorkflowExecutionSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowExecutionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (WorkflowExecutionSelect) QueryContext added in v0.4.0

func (c WorkflowExecutionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecutionSelect) Scan added in v0.4.0

func (wes *WorkflowExecutionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowExecutionSelect) ScanX added in v0.4.0

func (s *WorkflowExecutionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowExecutionSelect) String added in v0.4.0

func (s *WorkflowExecutionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionSelect) StringX added in v0.4.0

func (s *WorkflowExecutionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowExecutionSelect) Strings added in v0.4.0

func (s *WorkflowExecutionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowExecutionSelect) StringsX added in v0.4.0

func (s *WorkflowExecutionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowExecutionUpdate added in v0.4.0

type WorkflowExecutionUpdate struct {
	// contains filtered or unexported fields
}

WorkflowExecutionUpdate is the builder for updating WorkflowExecution entities.

func (*WorkflowExecutionUpdate) AddDuration added in v0.4.0

AddDuration adds i to the "duration" field.

func (*WorkflowExecutionUpdate) AddParallelism added in v0.4.0

func (weu *WorkflowExecutionUpdate) AddParallelism(i int) *WorkflowExecutionUpdate

AddParallelism adds i to the "parallelism" field.

func (*WorkflowExecutionUpdate) AddStageIDs added in v0.4.0

func (weu *WorkflowExecutionUpdate) AddStageIDs(ids ...object.ID) *WorkflowExecutionUpdate

AddStageIDs adds the "stages" edge to the WorkflowStageExecution entity by IDs.

func (*WorkflowExecutionUpdate) AddStages added in v0.4.0

AddStages adds the "stages" edges to the WorkflowStageExecution entity.

func (*WorkflowExecutionUpdate) AddTimeout added in v0.4.0

AddTimeout adds i to the "timeout" field.

func (*WorkflowExecutionUpdate) AddTimes added in v0.4.0

AddTimes adds i to the "times" field.

func (*WorkflowExecutionUpdate) AddVersion added in v0.4.0

AddVersion adds i to the "version" field.

func (*WorkflowExecutionUpdate) ClearAnnotations added in v0.4.0

func (weu *WorkflowExecutionUpdate) ClearAnnotations() *WorkflowExecutionUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowExecutionUpdate) ClearDescription added in v0.4.0

func (weu *WorkflowExecutionUpdate) ClearDescription() *WorkflowExecutionUpdate

ClearDescription clears the value of the "description" field.

func (*WorkflowExecutionUpdate) ClearExecuteTime added in v0.4.0

func (weu *WorkflowExecutionUpdate) ClearExecuteTime() *WorkflowExecutionUpdate

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowExecutionUpdate) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowExecutionUpdate) ClearStages added in v0.4.0

ClearStages clears all "stages" edges to the WorkflowStageExecution entity.

func (*WorkflowExecutionUpdate) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowExecutionUpdate) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowExecutionUpdate) ExecContext added in v0.4.0

func (c *WorkflowExecutionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecutionUpdate) ExecX added in v0.4.0

func (weu *WorkflowExecutionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowExecutionUpdate) Modify added in v0.4.0

func (weu *WorkflowExecutionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowExecutionUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowExecutionUpdate) Mutation added in v0.4.0

Mutation returns the WorkflowExecutionMutation object of the builder.

func (*WorkflowExecutionUpdate) QueryContext added in v0.4.0

func (c *WorkflowExecutionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecutionUpdate) RemoveStageIDs added in v0.4.0

func (weu *WorkflowExecutionUpdate) RemoveStageIDs(ids ...object.ID) *WorkflowExecutionUpdate

RemoveStageIDs removes the "stages" edge to WorkflowStageExecution entities by IDs.

func (*WorkflowExecutionUpdate) RemoveStages added in v0.4.0

RemoveStages removes "stages" edges to WorkflowStageExecution entities.

func (*WorkflowExecutionUpdate) Save added in v0.4.0

func (weu *WorkflowExecutionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorkflowExecutionUpdate) SaveX added in v0.4.0

func (weu *WorkflowExecutionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WorkflowExecutionUpdate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowExecutionUpdate) SetAnnotations added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetAnnotations(m map[string]string) *WorkflowExecutionUpdate

SetAnnotations sets the "annotations" field.

func (*WorkflowExecutionUpdate) SetDescription added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetDescription(s string) *WorkflowExecutionUpdate

SetDescription sets the "description" field.

func (*WorkflowExecutionUpdate) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowExecutionUpdate) SetExecuteTime added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetExecuteTime(t time.Time) *WorkflowExecutionUpdate

SetExecuteTime sets the "execute_time" field.

func (*WorkflowExecutionUpdate) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowExecutionUpdate) SetNillableDescription added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetNillableDescription(s *string) *WorkflowExecutionUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowExecutionUpdate) SetNillableDuration added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetNillableDuration(i *int) *WorkflowExecutionUpdate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*WorkflowExecutionUpdate) SetNillableExecuteTime added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetNillableExecuteTime(t *time.Time) *WorkflowExecutionUpdate

SetNillableExecuteTime sets the "execute_time" field if the given value is not nil.

func (*WorkflowExecutionUpdate) SetNillableParallelism added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetNillableParallelism(i *int) *WorkflowExecutionUpdate

SetNillableParallelism sets the "parallelism" field if the given value is not nil.

func (*WorkflowExecutionUpdate) SetNillableStatus added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetNillableStatus(s *status.Status) *WorkflowExecutionUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*WorkflowExecutionUpdate) SetNillableTimeout added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetNillableTimeout(i *int) *WorkflowExecutionUpdate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowExecutionUpdate) SetNillableTimes added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetNillableTimes(i *int) *WorkflowExecutionUpdate

SetNillableTimes sets the "times" field if the given value is not nil.

func (*WorkflowExecutionUpdate) SetNillableTrigger added in v0.4.0

SetNillableTrigger sets the "trigger" field if the given value is not nil.

func (*WorkflowExecutionUpdate) SetNillableVersion added in v0.5.0

func (weu *WorkflowExecutionUpdate) SetNillableVersion(i *int) *WorkflowExecutionUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*WorkflowExecutionUpdate) SetParallelism added in v0.4.0

func (weu *WorkflowExecutionUpdate) SetParallelism(i int) *WorkflowExecutionUpdate

SetParallelism sets the "parallelism" field.

func (*WorkflowExecutionUpdate) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowExecutionUpdate) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowExecutionUpdate) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowExecutionUpdate) SetTrigger added in v0.4.0

SetTrigger sets the "trigger" field.

func (*WorkflowExecutionUpdate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowExecutionUpdate) SetVersion added in v0.4.0

SetVersion sets the "version" field.

func (*WorkflowExecutionUpdate) Where added in v0.4.0

Where appends a list predicates to the WorkflowExecutionUpdate builder.

type WorkflowExecutionUpdateInput added in v0.4.0

type WorkflowExecutionUpdateInput struct {
	WorkflowExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Number of times that this workflow execution has been executed.
	Times int `path:"-" query:"-" json:"times,omitempty"`
	// Duration seconds of the workflow execution.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism,omitempty"`
	// Timeout of the workflow execution.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
}

WorkflowExecutionUpdateInput holds the modification input of the WorkflowExecution entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowExecutionUpdateInput) Model added in v0.4.0

Model returns the WorkflowExecution entity for modifying, after validating.

func (*WorkflowExecutionUpdateInput) SetGinContext added in v0.4.0

func (ic *WorkflowExecutionUpdateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowExecutionUpdateInput) SetModelClient added in v0.4.0

func (ic *WorkflowExecutionUpdateInput) SetModelClient(cli *Client)

func (*WorkflowExecutionUpdateInput) Validate added in v0.4.0

func (weui *WorkflowExecutionUpdateInput) Validate() error

Validate checks the WorkflowExecutionUpdateInput entity.

func (*WorkflowExecutionUpdateInput) ValidateWith added in v0.4.0

func (weui *WorkflowExecutionUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionUpdateInput entity with the given context and client set.

type WorkflowExecutionUpdateInputs added in v0.4.0

type WorkflowExecutionUpdateInputs struct {

	// Project indicates to update WorkflowExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to update WorkflowExecution entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowExecutionUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowExecutionUpdateInputs holds the modification input of the WorkflowExecution entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowExecutionUpdateInputs) IDs added in v0.4.0

func (weui *WorkflowExecutionUpdateInputs) IDs() []object.ID

IDs returns the ID list of the WorkflowExecution entities for modifying, after validating.

func (*WorkflowExecutionUpdateInputs) Model added in v0.4.0

Model returns the WorkflowExecution entities for modifying, after validating.

func (*WorkflowExecutionUpdateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowExecutionUpdateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowExecutionUpdateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowExecutionUpdateInputs) SetModelClient(cli *Client)

func (*WorkflowExecutionUpdateInputs) Validate added in v0.4.0

func (weui *WorkflowExecutionUpdateInputs) Validate() error

Validate checks the WorkflowExecutionUpdateInputs entity.

func (*WorkflowExecutionUpdateInputs) ValidateWith added in v0.4.0

func (weui *WorkflowExecutionUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionUpdateInputs entity with the given context and client set.

type WorkflowExecutionUpdateInputsItem added in v0.4.0

type WorkflowExecutionUpdateInputsItem struct {
	// ID of the WorkflowExecution entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Number of times that this workflow execution has been executed.
	Times int `path:"-" query:"-" json:"times"`
	// Duration seconds of the workflow execution.
	Duration int `path:"-" query:"-" json:"duration"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism"`
	// Timeout of the workflow execution.
	Timeout int `path:"-" query:"-" json:"timeout"`
}

WorkflowExecutionUpdateInputs holds the modification input item of the WorkflowExecution entities.

func (*WorkflowExecutionUpdateInputsItem) ValidateWith added in v0.4.0

func (weui *WorkflowExecutionUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowExecutionUpdateInputsItem entity with the given context and client set.

type WorkflowExecutionUpdateOne added in v0.4.0

type WorkflowExecutionUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowExecutionUpdateOne is the builder for updating a single WorkflowExecution entity.

func (*WorkflowExecutionUpdateOne) AddDuration added in v0.4.0

AddDuration adds i to the "duration" field.

func (*WorkflowExecutionUpdateOne) AddParallelism added in v0.4.0

AddParallelism adds i to the "parallelism" field.

func (*WorkflowExecutionUpdateOne) AddStageIDs added in v0.4.0

AddStageIDs adds the "stages" edge to the WorkflowStageExecution entity by IDs.

func (*WorkflowExecutionUpdateOne) AddStages added in v0.4.0

AddStages adds the "stages" edges to the WorkflowStageExecution entity.

func (*WorkflowExecutionUpdateOne) AddTimeout added in v0.4.0

AddTimeout adds i to the "timeout" field.

func (*WorkflowExecutionUpdateOne) AddTimes added in v0.4.0

AddTimes adds i to the "times" field.

func (*WorkflowExecutionUpdateOne) AddVersion added in v0.4.0

AddVersion adds i to the "version" field.

func (*WorkflowExecutionUpdateOne) ClearAnnotations added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) ClearAnnotations() *WorkflowExecutionUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowExecutionUpdateOne) ClearDescription added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) ClearDescription() *WorkflowExecutionUpdateOne

ClearDescription clears the value of the "description" field.

func (*WorkflowExecutionUpdateOne) ClearExecuteTime added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) ClearExecuteTime() *WorkflowExecutionUpdateOne

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowExecutionUpdateOne) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowExecutionUpdateOne) ClearStages added in v0.4.0

ClearStages clears all "stages" edges to the WorkflowStageExecution entity.

func (*WorkflowExecutionUpdateOne) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowExecutionUpdateOne) Exec added in v0.4.0

Exec executes the query on the entity.

func (*WorkflowExecutionUpdateOne) ExecContext added in v0.4.0

func (c *WorkflowExecutionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowExecutionUpdateOne) ExecE added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*WorkflowExecutionUpdateOne) ExecEX added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowExecution) error)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowExecutionUpdateOne) ExecX added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowExecutionUpdateOne) Modify added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowExecutionUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowExecutionUpdateOne) Mutation added in v0.4.0

Mutation returns the WorkflowExecutionMutation object of the builder.

func (*WorkflowExecutionUpdateOne) QueryContext added in v0.4.0

func (c *WorkflowExecutionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowExecutionUpdateOne) RemoveStageIDs added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) RemoveStageIDs(ids ...object.ID) *WorkflowExecutionUpdateOne

RemoveStageIDs removes the "stages" edge to WorkflowStageExecution entities by IDs.

func (*WorkflowExecutionUpdateOne) RemoveStages added in v0.4.0

RemoveStages removes "stages" edges to WorkflowStageExecution entities.

func (*WorkflowExecutionUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated WorkflowExecution entity.

func (*WorkflowExecutionUpdateOne) SaveE added in v0.4.0

SaveE calls the given function after updated the WorkflowExecution entity, which is always good for cascading update operations.

func (*WorkflowExecutionUpdateOne) SaveEX added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowExecution) error) *WorkflowExecution

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowExecutionUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowExecutionUpdateOne) Select added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) Select(field string, fields ...string) *WorkflowExecutionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WorkflowExecutionUpdateOne) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowExecutionUpdateOne) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowExecutionUpdateOne) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowExecutionUpdateOne) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowExecutionUpdateOne) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowExecutionUpdateOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowExecutionUpdateOne) SetNillableDescription added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) SetNillableDescription(s *string) *WorkflowExecutionUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowExecutionUpdateOne) SetNillableDuration added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) SetNillableDuration(i *int) *WorkflowExecutionUpdateOne

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*WorkflowExecutionUpdateOne) SetNillableExecuteTime added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) SetNillableExecuteTime(t *time.Time) *WorkflowExecutionUpdateOne

SetNillableExecuteTime sets the "execute_time" field if the given value is not nil.

func (*WorkflowExecutionUpdateOne) SetNillableParallelism added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) SetNillableParallelism(i *int) *WorkflowExecutionUpdateOne

SetNillableParallelism sets the "parallelism" field if the given value is not nil.

func (*WorkflowExecutionUpdateOne) SetNillableStatus added in v0.4.0

SetNillableStatus sets the "status" field if the given value is not nil.

func (*WorkflowExecutionUpdateOne) SetNillableTimeout added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) SetNillableTimeout(i *int) *WorkflowExecutionUpdateOne

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowExecutionUpdateOne) SetNillableTimes added in v0.4.0

func (weuo *WorkflowExecutionUpdateOne) SetNillableTimes(i *int) *WorkflowExecutionUpdateOne

SetNillableTimes sets the "times" field if the given value is not nil.

func (*WorkflowExecutionUpdateOne) SetNillableTrigger added in v0.4.0

SetNillableTrigger sets the "trigger" field if the given value is not nil.

func (*WorkflowExecutionUpdateOne) SetNillableVersion added in v0.5.0

func (weuo *WorkflowExecutionUpdateOne) SetNillableVersion(i *int) *WorkflowExecutionUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*WorkflowExecutionUpdateOne) SetParallelism added in v0.4.0

SetParallelism sets the "parallelism" field.

func (*WorkflowExecutionUpdateOne) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowExecutionUpdateOne) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowExecutionUpdateOne) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowExecutionUpdateOne) SetTrigger added in v0.4.0

SetTrigger sets the "trigger" field.

func (*WorkflowExecutionUpdateOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowExecutionUpdateOne) SetVersion added in v0.4.0

SetVersion sets the "version" field.

func (*WorkflowExecutionUpdateOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowExecutionUpdate builder.

type WorkflowExecutionUpsert added in v0.4.0

type WorkflowExecutionUpsert struct {
	*sql.UpdateSet
}

WorkflowExecutionUpsert is the "OnConflict" setter.

func (*WorkflowExecutionUpsert) AddDuration added in v0.4.0

AddDuration adds v to the "duration" field.

func (*WorkflowExecutionUpsert) AddParallelism added in v0.4.0

func (u *WorkflowExecutionUpsert) AddParallelism(v int) *WorkflowExecutionUpsert

AddParallelism adds v to the "parallelism" field.

func (*WorkflowExecutionUpsert) AddTimeout added in v0.4.0

AddTimeout adds v to the "timeout" field.

func (*WorkflowExecutionUpsert) AddTimes added in v0.4.0

AddTimes adds v to the "times" field.

func (*WorkflowExecutionUpsert) AddVersion added in v0.4.0

AddVersion adds v to the "version" field.

func (*WorkflowExecutionUpsert) ClearAnnotations added in v0.4.0

func (u *WorkflowExecutionUpsert) ClearAnnotations() *WorkflowExecutionUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowExecutionUpsert) ClearDescription added in v0.4.0

func (u *WorkflowExecutionUpsert) ClearDescription() *WorkflowExecutionUpsert

ClearDescription clears the value of the "description" field.

func (*WorkflowExecutionUpsert) ClearExecuteTime added in v0.4.0

func (u *WorkflowExecutionUpsert) ClearExecuteTime() *WorkflowExecutionUpsert

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowExecutionUpsert) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowExecutionUpsert) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowExecutionUpsert) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowExecutionUpsert) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowExecutionUpsert) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowExecutionUpsert) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowExecutionUpsert) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowExecutionUpsert) SetParallelism added in v0.4.0

func (u *WorkflowExecutionUpsert) SetParallelism(v int) *WorkflowExecutionUpsert

SetParallelism sets the "parallelism" field.

func (*WorkflowExecutionUpsert) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowExecutionUpsert) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowExecutionUpsert) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowExecutionUpsert) SetTrigger added in v0.4.0

SetTrigger sets the "trigger" field.

func (*WorkflowExecutionUpsert) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowExecutionUpsert) SetVersion added in v0.4.0

SetVersion sets the "version" field.

func (*WorkflowExecutionUpsert) UpdateAnnotations added in v0.4.0

func (u *WorkflowExecutionUpsert) UpdateAnnotations() *WorkflowExecutionUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateDescription added in v0.4.0

func (u *WorkflowExecutionUpsert) UpdateDescription() *WorkflowExecutionUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateDuration added in v0.4.0

func (u *WorkflowExecutionUpsert) UpdateDuration() *WorkflowExecutionUpsert

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateExecuteTime added in v0.4.0

func (u *WorkflowExecutionUpsert) UpdateExecuteTime() *WorkflowExecutionUpsert

UpdateExecuteTime sets the "execute_time" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateParallelism added in v0.4.0

func (u *WorkflowExecutionUpsert) UpdateParallelism() *WorkflowExecutionUpsert

UpdateParallelism sets the "parallelism" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateTimeout added in v0.4.0

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateTimes added in v0.4.0

UpdateTimes sets the "times" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateTrigger added in v0.4.0

UpdateTrigger sets the "trigger" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateUpdateTime added in v0.4.0

func (u *WorkflowExecutionUpsert) UpdateUpdateTime() *WorkflowExecutionUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*WorkflowExecutionUpsert) UpdateVersion added in v0.4.0

UpdateVersion sets the "version" field to the value that was provided on create.

type WorkflowExecutionUpsertBulk added in v0.4.0

type WorkflowExecutionUpsertBulk struct {
	// contains filtered or unexported fields
}

WorkflowExecutionUpsertBulk is the builder for "upsert"-ing a bulk of WorkflowExecution nodes.

func (*WorkflowExecutionUpsertBulk) AddDuration added in v0.4.0

AddDuration adds v to the "duration" field.

func (*WorkflowExecutionUpsertBulk) AddParallelism added in v0.4.0

AddParallelism adds v to the "parallelism" field.

func (*WorkflowExecutionUpsertBulk) AddTimeout added in v0.4.0

AddTimeout adds v to the "timeout" field.

func (*WorkflowExecutionUpsertBulk) AddTimes added in v0.4.0

AddTimes adds v to the "times" field.

func (*WorkflowExecutionUpsertBulk) AddVersion added in v0.4.0

AddVersion adds v to the "version" field.

func (*WorkflowExecutionUpsertBulk) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowExecutionUpsertBulk) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowExecutionUpsertBulk) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowExecutionUpsertBulk) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowExecutionUpsertBulk) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowExecutionUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowExecutionUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowExecutionUpsertBulk) ExecE added in v0.4.0

func (u *WorkflowExecutionUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowExecutionUpsertBulk) ExecEX added in v0.4.0

func (u *WorkflowExecutionUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowExecutionUpsertBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowExecutionUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowExecution.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*WorkflowExecutionUpsertBulk) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowExecutionUpsertBulk) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowExecutionUpsertBulk) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowExecutionUpsertBulk) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowExecutionUpsertBulk) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowExecutionUpsertBulk) SetParallelism added in v0.4.0

SetParallelism sets the "parallelism" field.

func (*WorkflowExecutionUpsertBulk) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowExecutionUpsertBulk) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowExecutionUpsertBulk) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowExecutionUpsertBulk) SetTrigger added in v0.4.0

SetTrigger sets the "trigger" field.

func (*WorkflowExecutionUpsertBulk) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowExecutionUpsertBulk) SetVersion added in v0.4.0

SetVersion sets the "version" field.

func (*WorkflowExecutionUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowExecutionCreateBulk.OnConflict documentation for more info.

func (*WorkflowExecutionUpsertBulk) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateDuration added in v0.4.0

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateExecuteTime added in v0.4.0

UpdateExecuteTime sets the "execute_time" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.WorkflowExecution.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowexecution.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowExecutionUpsertBulk) UpdateParallelism added in v0.4.0

UpdateParallelism sets the "parallelism" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateTimeout added in v0.4.0

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateTimes added in v0.4.0

UpdateTimes sets the "times" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateTrigger added in v0.4.0

UpdateTrigger sets the "trigger" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*WorkflowExecutionUpsertBulk) UpdateVersion added in v0.4.0

UpdateVersion sets the "version" field to the value that was provided on create.

type WorkflowExecutionUpsertOne added in v0.4.0

type WorkflowExecutionUpsertOne struct {
	// contains filtered or unexported fields
}

WorkflowExecutionUpsertOne is the builder for "upsert"-ing

one WorkflowExecution node.

func (*WorkflowExecutionUpsertOne) AddDuration added in v0.4.0

AddDuration adds v to the "duration" field.

func (*WorkflowExecutionUpsertOne) AddParallelism added in v0.4.0

AddParallelism adds v to the "parallelism" field.

func (*WorkflowExecutionUpsertOne) AddTimeout added in v0.4.0

AddTimeout adds v to the "timeout" field.

func (*WorkflowExecutionUpsertOne) AddTimes added in v0.4.0

AddTimes adds v to the "times" field.

func (*WorkflowExecutionUpsertOne) AddVersion added in v0.4.0

AddVersion adds v to the "version" field.

func (*WorkflowExecutionUpsertOne) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowExecutionUpsertOne) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowExecutionUpsertOne) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowExecutionUpsertOne) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowExecutionUpsertOne) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowExecutionUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowExecutionUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowExecutionUpsertOne) ExecE added in v0.4.0

func (u *WorkflowExecutionUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowExecutionUpsertOne) ExecEX added in v0.4.0

func (u *WorkflowExecutionUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowExecutionUpsertOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowExecutionUpsertOne) ID added in v0.4.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*WorkflowExecutionUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*WorkflowExecutionUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowExecution.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*WorkflowExecutionUpsertOne) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowExecutionUpsertOne) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowExecutionUpsertOne) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowExecutionUpsertOne) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowExecutionUpsertOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowExecutionUpsertOne) SetParallelism added in v0.4.0

SetParallelism sets the "parallelism" field.

func (*WorkflowExecutionUpsertOne) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowExecutionUpsertOne) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowExecutionUpsertOne) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowExecutionUpsertOne) SetTrigger added in v0.4.0

SetTrigger sets the "trigger" field.

func (*WorkflowExecutionUpsertOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowExecutionUpsertOne) SetVersion added in v0.4.0

SetVersion sets the "version" field.

func (*WorkflowExecutionUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowExecutionCreate.OnConflict documentation for more info.

func (*WorkflowExecutionUpsertOne) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateDuration added in v0.4.0

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateExecuteTime added in v0.4.0

UpdateExecuteTime sets the "execute_time" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.WorkflowExecution.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowexecution.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowExecutionUpsertOne) UpdateParallelism added in v0.4.0

UpdateParallelism sets the "parallelism" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateTimeout added in v0.4.0

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateTimes added in v0.4.0

UpdateTimes sets the "times" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateTrigger added in v0.4.0

UpdateTrigger sets the "trigger" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*WorkflowExecutionUpsertOne) UpdateVersion added in v0.4.0

UpdateVersion sets the "version" field to the value that was provided on create.

type WorkflowExecutions added in v0.4.0

type WorkflowExecutions []*WorkflowExecution

WorkflowExecutions is a parsable slice of WorkflowExecution.

func (WorkflowExecutions) View added in v0.4.0

View returns the output of WorkflowExecution entities.

type WorkflowGroupBy added in v0.4.0

type WorkflowGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowGroupBy is the group-by builder for Workflow entities.

func (*WorkflowGroupBy) Aggregate added in v0.4.0

func (wgb *WorkflowGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowGroupBy) Bool added in v0.4.0

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 added in v0.4.0

func (s *WorkflowGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowGroupBy) Bools added in v0.4.0

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 added in v0.4.0

func (s *WorkflowGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowGroupBy) Float64 added in v0.4.0

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 added in v0.4.0

func (s *WorkflowGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowGroupBy) Float64s added in v0.4.0

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 added in v0.4.0

func (s *WorkflowGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowGroupBy) Int added in v0.4.0

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 added in v0.4.0

func (s *WorkflowGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowGroupBy) Ints added in v0.4.0

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 added in v0.4.0

func (s *WorkflowGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowGroupBy) Scan added in v0.4.0

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 added in v0.4.0

func (s *WorkflowGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowGroupBy) String added in v0.4.0

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 added in v0.4.0

func (s *WorkflowGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowGroupBy) Strings added in v0.4.0

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 added in v0.4.0

func (s *WorkflowGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowMutation added in v0.4.0

type WorkflowMutation struct {
	// contains filtered or unexported fields
}

WorkflowMutation represents an operation that mutates the Workflow nodes in the graph.

func (*WorkflowMutation) AddExecutionIDs added in v0.4.0

func (m *WorkflowMutation) AddExecutionIDs(ids ...object.ID)

AddExecutionIDs adds the "executions" edge to the WorkflowExecution entity by ids.

func (*WorkflowMutation) AddField added in v0.4.0

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) AddParallelism added in v0.4.0

func (m *WorkflowMutation) AddParallelism(i int)

AddParallelism adds i to the "parallelism" field.

func (*WorkflowMutation) AddStageIDs added in v0.4.0

func (m *WorkflowMutation) AddStageIDs(ids ...object.ID)

AddStageIDs adds the "stages" edge to the WorkflowStage entity by ids.

func (*WorkflowMutation) AddTimeout added in v0.4.0

func (m *WorkflowMutation) AddTimeout(i int)

AddTimeout adds i to the "timeout" field.

func (*WorkflowMutation) AddVersion added in v0.4.0

func (m *WorkflowMutation) AddVersion(i int)

AddVersion adds i to the "version" field.

func (*WorkflowMutation) AddedEdges added in v0.4.0

func (m *WorkflowMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowMutation) AddedField added in v0.4.0

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 added in v0.4.0

func (m *WorkflowMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowMutation) AddedIDs added in v0.4.0

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) AddedParallelism added in v0.4.0

func (m *WorkflowMutation) AddedParallelism() (r int, exists bool)

AddedParallelism returns the value that was added to the "parallelism" field in this mutation.

func (*WorkflowMutation) AddedTimeout added in v0.4.0

func (m *WorkflowMutation) AddedTimeout() (r int, exists bool)

AddedTimeout returns the value that was added to the "timeout" field in this mutation.

func (*WorkflowMutation) AddedVersion added in v0.4.0

func (m *WorkflowMutation) AddedVersion() (r int, exists bool)

AddedVersion returns the value that was added to the "version" field in this mutation.

func (*WorkflowMutation) Annotations added in v0.4.0

func (m *WorkflowMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*WorkflowMutation) AnnotationsCleared added in v0.4.0

func (m *WorkflowMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*WorkflowMutation) AppendVariables added in v0.4.0

func (m *WorkflowMutation) AppendVariables(tv types.WorkflowVariables)

AppendVariables adds tv to the "variables" field.

func (*WorkflowMutation) AppendedVariables added in v0.4.0

func (m *WorkflowMutation) AppendedVariables() (types.WorkflowVariables, bool)

AppendedVariables returns the list of values that were appended to the "variables" field in this mutation.

func (*WorkflowMutation) ClearAnnotations added in v0.4.0

func (m *WorkflowMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowMutation) ClearDescription added in v0.4.0

func (m *WorkflowMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*WorkflowMutation) ClearEdge added in v0.4.0

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) ClearEnvironmentID added in v0.4.0

func (m *WorkflowMutation) ClearEnvironmentID()

ClearEnvironmentID clears the value of the "environment_id" field.

func (*WorkflowMutation) ClearExecutions added in v0.4.0

func (m *WorkflowMutation) ClearExecutions()

ClearExecutions clears the "executions" edge to the WorkflowExecution entity.

func (*WorkflowMutation) ClearField added in v0.4.0

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) ClearLabels added in v0.4.0

func (m *WorkflowMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*WorkflowMutation) ClearProject added in v0.4.0

func (m *WorkflowMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*WorkflowMutation) ClearStages added in v0.4.0

func (m *WorkflowMutation) ClearStages()

ClearStages clears the "stages" edge to the WorkflowStage entity.

func (*WorkflowMutation) ClearVariables added in v0.4.0

func (m *WorkflowMutation) ClearVariables()

ClearVariables clears the value of the "variables" field.

func (*WorkflowMutation) ClearedEdges added in v0.4.0

func (m *WorkflowMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowMutation) ClearedFields added in v0.4.0

func (m *WorkflowMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowMutation) Client added in v0.4.0

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) CreateTime added in v0.4.0

func (m *WorkflowMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*WorkflowMutation) Description added in v0.4.0

func (m *WorkflowMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*WorkflowMutation) DescriptionCleared added in v0.4.0

func (m *WorkflowMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*WorkflowMutation) EdgeCleared added in v0.4.0

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) EnvironmentID added in v0.4.0

func (m *WorkflowMutation) EnvironmentID() (r object.ID, exists bool)

EnvironmentID returns the value of the "environment_id" field in the mutation.

func (*WorkflowMutation) EnvironmentIDCleared added in v0.4.0

func (m *WorkflowMutation) EnvironmentIDCleared() bool

EnvironmentIDCleared returns if the "environment_id" field was cleared in this mutation.

func (*WorkflowMutation) ExecContext added in v0.4.0

func (c *WorkflowMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowMutation) ExecutionsCleared added in v0.4.0

func (m *WorkflowMutation) ExecutionsCleared() bool

ExecutionsCleared reports if the "executions" edge to the WorkflowExecution entity was cleared.

func (*WorkflowMutation) ExecutionsIDs added in v0.4.0

func (m *WorkflowMutation) ExecutionsIDs() (ids []object.ID)

ExecutionsIDs returns the "executions" edge IDs in the mutation.

func (*WorkflowMutation) Field added in v0.4.0

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 added in v0.4.0

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 added in v0.4.0

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) GetType added in v0.4.0

func (m *WorkflowMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*WorkflowMutation) ID added in v0.4.0

func (m *WorkflowMutation) ID() (id object.ID, 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 added in v0.4.0

func (m *WorkflowMutation) IDs(ctx context.Context) ([]object.ID, 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) Labels added in v0.4.0

func (m *WorkflowMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*WorkflowMutation) LabelsCleared added in v0.4.0

func (m *WorkflowMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*WorkflowMutation) Name added in v0.4.0

func (m *WorkflowMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WorkflowMutation) OldAnnotations added in v0.4.0

func (m *WorkflowMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" 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) OldCreateTime added in v0.4.0

func (m *WorkflowMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" 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 added in v0.4.0

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) OldEnvironmentID added in v0.4.0

func (m *WorkflowMutation) OldEnvironmentID(ctx context.Context) (v object.ID, err error)

OldEnvironmentID returns the old "environment_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) OldField added in v0.4.0

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) OldLabels added in v0.4.0

func (m *WorkflowMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" 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) OldName added in v0.4.0

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) OldParallelism added in v0.4.0

func (m *WorkflowMutation) OldParallelism(ctx context.Context) (v int, err error)

OldParallelism returns the old "parallelism" 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) OldProjectID added in v0.4.0

func (m *WorkflowMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_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) OldTimeout added in v0.4.0

func (m *WorkflowMutation) OldTimeout(ctx context.Context) (v int, err error)

OldTimeout returns the old "timeout" 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) OldType added in v0.4.0

func (m *WorkflowMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" 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) OldUpdateTime added in v0.4.0

func (m *WorkflowMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" 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) OldVariables added in v0.4.0

func (m *WorkflowMutation) OldVariables(ctx context.Context) (v types.WorkflowVariables, err error)

OldVariables returns the old "variables" 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) OldVersion added in v0.4.0

func (m *WorkflowMutation) OldVersion(ctx context.Context) (v int, err error)

OldVersion returns the old "version" 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 added in v0.4.0

func (m *WorkflowMutation) Op() Op

Op returns the operation name.

func (*WorkflowMutation) Parallelism added in v0.4.0

func (m *WorkflowMutation) Parallelism() (r int, exists bool)

Parallelism returns the value of the "parallelism" field in the mutation.

func (*WorkflowMutation) ProjectCleared added in v0.4.0

func (m *WorkflowMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*WorkflowMutation) ProjectID added in v0.4.0

func (m *WorkflowMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*WorkflowMutation) ProjectIDs added in v0.4.0

func (m *WorkflowMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*WorkflowMutation) QueryContext added in v0.4.0

func (c *WorkflowMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowMutation) RemoveExecutionIDs added in v0.4.0

func (m *WorkflowMutation) RemoveExecutionIDs(ids ...object.ID)

RemoveExecutionIDs removes the "executions" edge to the WorkflowExecution entity by IDs.

func (*WorkflowMutation) RemoveStageIDs added in v0.4.0

func (m *WorkflowMutation) RemoveStageIDs(ids ...object.ID)

RemoveStageIDs removes the "stages" edge to the WorkflowStage entity by IDs.

func (*WorkflowMutation) RemovedEdges added in v0.4.0

func (m *WorkflowMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowMutation) RemovedExecutionsIDs added in v0.4.0

func (m *WorkflowMutation) RemovedExecutionsIDs() (ids []object.ID)

RemovedExecutions returns the removed IDs of the "executions" edge to the WorkflowExecution entity.

func (*WorkflowMutation) RemovedIDs added in v0.4.0

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) RemovedStagesIDs added in v0.4.0

func (m *WorkflowMutation) RemovedStagesIDs() (ids []object.ID)

RemovedStages returns the removed IDs of the "stages" edge to the WorkflowStage entity.

func (*WorkflowMutation) ResetAnnotations added in v0.4.0

func (m *WorkflowMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*WorkflowMutation) ResetCreateTime added in v0.4.0

func (m *WorkflowMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*WorkflowMutation) ResetDescription added in v0.4.0

func (m *WorkflowMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*WorkflowMutation) ResetEdge added in v0.4.0

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) ResetEnvironmentID added in v0.4.0

func (m *WorkflowMutation) ResetEnvironmentID()

ResetEnvironmentID resets all changes to the "environment_id" field.

func (*WorkflowMutation) ResetExecutions added in v0.4.0

func (m *WorkflowMutation) ResetExecutions()

ResetExecutions resets all changes to the "executions" edge.

func (*WorkflowMutation) ResetField added in v0.4.0

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) ResetLabels added in v0.4.0

func (m *WorkflowMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*WorkflowMutation) ResetName added in v0.4.0

func (m *WorkflowMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WorkflowMutation) ResetParallelism added in v0.4.0

func (m *WorkflowMutation) ResetParallelism()

ResetParallelism resets all changes to the "parallelism" field.

func (*WorkflowMutation) ResetProject added in v0.4.0

func (m *WorkflowMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*WorkflowMutation) ResetProjectID added in v0.4.0

func (m *WorkflowMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*WorkflowMutation) ResetStages added in v0.4.0

func (m *WorkflowMutation) ResetStages()

ResetStages resets all changes to the "stages" edge.

func (*WorkflowMutation) ResetTimeout added in v0.4.0

func (m *WorkflowMutation) ResetTimeout()

ResetTimeout resets all changes to the "timeout" field.

func (*WorkflowMutation) ResetType added in v0.4.0

func (m *WorkflowMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*WorkflowMutation) ResetUpdateTime added in v0.4.0

func (m *WorkflowMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*WorkflowMutation) ResetVariables added in v0.4.0

func (m *WorkflowMutation) ResetVariables()

ResetVariables resets all changes to the "variables" field.

func (*WorkflowMutation) ResetVersion added in v0.4.0

func (m *WorkflowMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*WorkflowMutation) SetAnnotations added in v0.4.0

func (m *WorkflowMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*WorkflowMutation) SetCreateTime added in v0.4.0

func (m *WorkflowMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*WorkflowMutation) SetDescription added in v0.4.0

func (m *WorkflowMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*WorkflowMutation) SetEnvironmentID added in v0.4.0

func (m *WorkflowMutation) SetEnvironmentID(o object.ID)

SetEnvironmentID sets the "environment_id" field.

func (*WorkflowMutation) SetField added in v0.4.0

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 added in v0.4.0

func (m *WorkflowMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Workflow entities.

func (*WorkflowMutation) SetLabels added in v0.4.0

func (m *WorkflowMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*WorkflowMutation) SetName added in v0.4.0

func (m *WorkflowMutation) SetName(s string)

SetName sets the "name" field.

func (*WorkflowMutation) SetOp added in v0.4.0

func (m *WorkflowMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowMutation) SetParallelism added in v0.4.0

func (m *WorkflowMutation) SetParallelism(i int)

SetParallelism sets the "parallelism" field.

func (*WorkflowMutation) SetProjectID added in v0.4.0

func (m *WorkflowMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*WorkflowMutation) SetTimeout added in v0.4.0

func (m *WorkflowMutation) SetTimeout(i int)

SetTimeout sets the "timeout" field.

func (*WorkflowMutation) SetType added in v0.4.0

func (m *WorkflowMutation) SetType(s string)

SetType sets the "type" field.

func (*WorkflowMutation) SetUpdateTime added in v0.4.0

func (m *WorkflowMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*WorkflowMutation) SetVariables added in v0.4.0

func (m *WorkflowMutation) SetVariables(tv types.WorkflowVariables)

SetVariables sets the "variables" field.

func (*WorkflowMutation) SetVersion added in v0.4.0

func (m *WorkflowMutation) SetVersion(i int)

SetVersion sets the "version" field.

func (*WorkflowMutation) StagesCleared added in v0.4.0

func (m *WorkflowMutation) StagesCleared() bool

StagesCleared reports if the "stages" edge to the WorkflowStage entity was cleared.

func (*WorkflowMutation) StagesIDs added in v0.4.0

func (m *WorkflowMutation) StagesIDs() (ids []object.ID)

StagesIDs returns the "stages" edge IDs in the mutation.

func (*WorkflowMutation) Timeout added in v0.4.0

func (m *WorkflowMutation) Timeout() (r int, exists bool)

Timeout returns the value of the "timeout" field in the mutation.

func (WorkflowMutation) Tx added in v0.4.0

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 added in v0.4.0

func (m *WorkflowMutation) Type() string

Type returns the node type of this mutation (Workflow).

func (*WorkflowMutation) UpdateTime added in v0.4.0

func (m *WorkflowMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*WorkflowMutation) Variables added in v0.4.0

func (m *WorkflowMutation) Variables() (r types.WorkflowVariables, exists bool)

Variables returns the value of the "variables" field in the mutation.

func (*WorkflowMutation) VariablesCleared added in v0.4.0

func (m *WorkflowMutation) VariablesCleared() bool

VariablesCleared returns if the "variables" field was cleared in this mutation.

func (*WorkflowMutation) Version added in v0.4.0

func (m *WorkflowMutation) Version() (r int, exists bool)

Version returns the value of the "version" field in the mutation.

func (*WorkflowMutation) Where added in v0.4.0

func (m *WorkflowMutation) Where(ps ...predicate.Workflow)

Where appends a list predicates to the WorkflowMutation builder.

func (*WorkflowMutation) WhereP added in v0.4.0

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.

type WorkflowOutput added in v0.4.0

type WorkflowOutput struct {
	ID            object.ID               `json:"id,omitempty"`
	Name          string                  `json:"name,omitempty"`
	Description   string                  `json:"description,omitempty"`
	Labels        map[string]string       `json:"labels,omitempty"`
	CreateTime    *time.Time              `json:"createTime,omitempty"`
	UpdateTime    *time.Time              `json:"updateTime,omitempty"`
	EnvironmentID object.ID               `json:"environmentID,omitempty"`
	Type          string                  `json:"type,omitempty"`
	Parallelism   int                     `json:"parallelism,omitempty"`
	Timeout       int                     `json:"timeout,omitempty"`
	Version       int                     `json:"version,omitempty"`
	Variables     types.WorkflowVariables `json:"variables,omitempty"`

	Project    *ProjectOutput             `json:"project,omitempty"`
	Stages     []*WorkflowStageOutput     `json:"stages,omitempty"`
	Executions []*WorkflowExecutionOutput `json:"executions,omitempty"`
}

WorkflowOutput holds the output of the Workflow entity.

func ExposeWorkflow added in v0.4.0

func ExposeWorkflow(_w *Workflow) *WorkflowOutput

ExposeWorkflow converts the Workflow to WorkflowOutput.

func ExposeWorkflows added in v0.4.0

func ExposeWorkflows(_ws []*Workflow) []*WorkflowOutput

ExposeWorkflows converts the Workflow slice to WorkflowOutput pointer slice.

type WorkflowPatchInput added in v0.5.0

type WorkflowPatchInput struct {
	WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// ID of the environment that this workflow belongs to.
	EnvironmentID object.ID `path:"-" query:"-" json:"environmentID,omitempty"`
	// Type of the workflow.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism,omitempty"`
	// Timeout seconds of the workflow.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// Execution version of the workflow.
	Version int `path:"-" query:"-" json:"version,omitempty"`
	// Configs of workflow variables.
	Variables types.WorkflowVariables `path:"-" query:"-" json:"variables,omitempty"`

	// Stages indicates replacing the stale WorkflowStage entities.
	Stages []*WorkflowStageCreateInput `uri:"-" query:"-" json:"stages,omitempty"`
	// contains filtered or unexported fields
}

WorkflowPatchInput holds the patch input of the Workflow entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowPatchInput) Model added in v0.5.0

func (wpi *WorkflowPatchInput) Model() *Workflow

Model returns the Workflow patched entity, after validating.

func (*WorkflowPatchInput) PatchModel added in v0.5.0

func (wpi *WorkflowPatchInput) PatchModel() *Workflow

PatchModel returns the Workflow partition entity for patching.

func (*WorkflowPatchInput) SetGinContext added in v0.5.0

func (ic *WorkflowPatchInput) SetGinContext(ctx *gin.Context)

func (*WorkflowPatchInput) SetModelClient added in v0.5.0

func (ic *WorkflowPatchInput) SetModelClient(cli *Client)

func (*WorkflowPatchInput) Validate added in v0.5.0

func (wpi *WorkflowPatchInput) Validate() error

Validate checks the WorkflowPatchInput entity.

func (*WorkflowPatchInput) ValidateWith added in v0.5.0

func (wpi *WorkflowPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowPatchInput entity with the given context and client set.

type WorkflowQuery added in v0.4.0

type WorkflowQuery struct {
	// contains filtered or unexported fields
}

WorkflowQuery is the builder for querying Workflow entities.

func (*WorkflowQuery) Aggregate added in v0.4.0

func (wq *WorkflowQuery) Aggregate(fns ...AggregateFunc) *WorkflowSelect

Aggregate returns a WorkflowSelect configured with the given aggregations.

func (*WorkflowQuery) All added in v0.4.0

func (wq *WorkflowQuery) All(ctx context.Context) ([]*Workflow, error)

All executes the query and returns a list of Workflows.

func (*WorkflowQuery) AllX added in v0.4.0

func (wq *WorkflowQuery) AllX(ctx context.Context) []*Workflow

AllX is like All, but panics if an error occurs.

func (*WorkflowQuery) Clone added in v0.4.0

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 added in v0.4.0

func (wq *WorkflowQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorkflowQuery) CountX added in v0.4.0

func (wq *WorkflowQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowQuery) ExecContext added in v0.4.0

func (c *WorkflowQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowQuery) Exist added in v0.4.0

func (wq *WorkflowQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WorkflowQuery) ExistX added in v0.4.0

func (wq *WorkflowQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowQuery) First added in v0.4.0

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 added in v0.4.0

func (wq *WorkflowQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first Workflow ID from the query. Returns a *NotFoundError when no Workflow ID was found.

func (*WorkflowQuery) FirstIDX added in v0.4.0

func (wq *WorkflowQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowQuery) FirstX added in v0.4.0

func (wq *WorkflowQuery) FirstX(ctx context.Context) *Workflow

FirstX is like First, but panics if an error occurs.

func (*WorkflowQuery) ForShare added in v0.4.0

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.4.0

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 added in v0.4.0

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(model.Count()).
	Scan(ctx, &v)

func (*WorkflowQuery) IDs added in v0.4.0

func (wq *WorkflowQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of Workflow IDs.

func (*WorkflowQuery) IDsX added in v0.4.0

func (wq *WorkflowQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowQuery) Limit added in v0.4.0

func (wq *WorkflowQuery) Limit(limit int) *WorkflowQuery

Limit the number of records to be returned by this query.

func (*WorkflowQuery) Modify added in v0.4.0

func (wq *WorkflowQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowQuery) Offset added in v0.4.0

func (wq *WorkflowQuery) Offset(offset int) *WorkflowQuery

Offset to start from.

func (*WorkflowQuery) Only added in v0.4.0

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 added in v0.4.0

func (wq *WorkflowQuery) OnlyID(ctx context.Context) (id object.ID, 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 added in v0.4.0

func (wq *WorkflowQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowQuery) OnlyX added in v0.4.0

func (wq *WorkflowQuery) OnlyX(ctx context.Context) *Workflow

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*WorkflowQuery) QueryContext added in v0.4.0

func (c *WorkflowQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowQuery) QueryExecutions added in v0.4.0

func (wq *WorkflowQuery) QueryExecutions() *WorkflowExecutionQuery

QueryExecutions chains the current query on the "executions" edge.

func (*WorkflowQuery) QueryProject added in v0.4.0

func (wq *WorkflowQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*WorkflowQuery) QueryStages added in v0.4.0

func (wq *WorkflowQuery) QueryStages() *WorkflowStageQuery

QueryStages chains the current query on the "stages" edge.

func (*WorkflowQuery) Select added in v0.4.0

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 added in v0.4.0

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 added in v0.4.0

func (wq *WorkflowQuery) Where(ps ...predicate.Workflow) *WorkflowQuery

Where adds a new predicate for the WorkflowQuery builder.

func (*WorkflowQuery) WhereP added in v0.4.0

func (wq *WorkflowQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowQuery) WithExecutions added in v0.4.0

func (wq *WorkflowQuery) WithExecutions(opts ...func(*WorkflowExecutionQuery)) *WorkflowQuery

WithExecutions tells the query-builder to eager-load the nodes that are connected to the "executions" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowQuery) WithProject added in v0.4.0

func (wq *WorkflowQuery) WithProject(opts ...func(*ProjectQuery)) *WorkflowQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowQuery) WithStages added in v0.4.0

func (wq *WorkflowQuery) WithStages(opts ...func(*WorkflowStageQuery)) *WorkflowQuery

WithStages tells the query-builder to eager-load the nodes that are connected to the "stages" edge. The optional arguments are used to configure the query builder of the edge.

type WorkflowQueryInput added in v0.4.0

type WorkflowQueryInput struct {

	// Project indicates to query Workflow entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project"`

	// Refer holds the route path reference of the Workflow entity.
	Refer *object.Refer `path:"workflow,default=" query:"-" json:"-"`
	// ID of the Workflow entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Workflow entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// contains filtered or unexported fields
}

WorkflowQueryInput holds the query input of the Workflow entity, please tags with `path:",inline"` if embedding.

func (*WorkflowQueryInput) Model added in v0.4.0

func (wqi *WorkflowQueryInput) Model() *Workflow

Model returns the Workflow entity for querying, after validating.

func (*WorkflowQueryInput) SetGinContext added in v0.4.0

func (ic *WorkflowQueryInput) SetGinContext(ctx *gin.Context)

func (*WorkflowQueryInput) SetModelClient added in v0.4.0

func (ic *WorkflowQueryInput) SetModelClient(cli *Client)

func (*WorkflowQueryInput) Validate added in v0.4.0

func (wqi *WorkflowQueryInput) Validate() error

Validate checks the WorkflowQueryInput entity.

func (*WorkflowQueryInput) ValidateWith added in v0.4.0

func (wqi *WorkflowQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowQueryInput entity with the given context and client set.

type WorkflowQueryInputs added in v0.4.0

type WorkflowQueryInputs struct {

	// Project indicates to query Workflow entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

WorkflowQueryInputs holds the query input of the Workflow entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*WorkflowQueryInputs) SetGinContext added in v0.4.0

func (ic *WorkflowQueryInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowQueryInputs) SetModelClient added in v0.4.0

func (ic *WorkflowQueryInputs) SetModelClient(cli *Client)

func (*WorkflowQueryInputs) Validate added in v0.4.0

func (wqi *WorkflowQueryInputs) Validate() error

Validate checks the WorkflowQueryInputs entity.

func (*WorkflowQueryInputs) ValidateWith added in v0.4.0

func (wqi *WorkflowQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowQueryInputs entity with the given context and client set.

type WorkflowSelect added in v0.4.0

type WorkflowSelect struct {
	*WorkflowQuery
	// contains filtered or unexported fields
}

WorkflowSelect is the builder for selecting fields of Workflow entities.

func (*WorkflowSelect) Aggregate added in v0.4.0

func (ws *WorkflowSelect) Aggregate(fns ...AggregateFunc) *WorkflowSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowSelect) Bool added in v0.4.0

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 added in v0.4.0

func (s *WorkflowSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowSelect) Bools added in v0.4.0

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 added in v0.4.0

func (s *WorkflowSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (WorkflowSelect) ExecContext added in v0.4.0

func (c WorkflowSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowSelect) Float64 added in v0.4.0

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 added in v0.4.0

func (s *WorkflowSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowSelect) Float64s added in v0.4.0

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 added in v0.4.0

func (s *WorkflowSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowSelect) Int added in v0.4.0

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 added in v0.4.0

func (s *WorkflowSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowSelect) Ints added in v0.4.0

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 added in v0.4.0

func (s *WorkflowSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowSelect) Modify added in v0.4.0

func (ws *WorkflowSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowSelect

Modify adds a query modifier for attaching custom logic to queries.

func (WorkflowSelect) QueryContext added in v0.4.0

func (c WorkflowSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowSelect) Scan added in v0.4.0

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 added in v0.4.0

func (s *WorkflowSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowSelect) String added in v0.4.0

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 added in v0.4.0

func (s *WorkflowSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowSelect) Strings added in v0.4.0

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 added in v0.4.0

func (s *WorkflowSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowStage added in v0.4.0

type WorkflowStage struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// ID of the project to belong.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the workflow that this workflow stage belongs to.
	WorkflowID object.ID `json:"workflow_id,omitempty"`
	// ID list of the workflow stages that this workflow stage depends on.
	Dependencies []object.ID `json:"dependencies,omitempty"`
	// Order of the workflow stage.
	Order int `json:"order,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorkflowStageQuery when eager-loading is set.
	Edges WorkflowStageEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStage is the model entity for the WorkflowStage schema.

func (*WorkflowStage) ExecContext added in v0.4.0

func (c *WorkflowStage) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStage) QueryContext added in v0.4.0

func (c *WorkflowStage) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStage) QueryProject added in v0.4.0

func (ws *WorkflowStage) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the WorkflowStage entity.

func (*WorkflowStage) QuerySteps added in v0.4.0

func (ws *WorkflowStage) QuerySteps() *WorkflowStepQuery

QuerySteps queries the "steps" edge of the WorkflowStage entity.

func (*WorkflowStage) QueryWorkflow added in v0.4.0

func (ws *WorkflowStage) QueryWorkflow() *WorkflowQuery

QueryWorkflow queries the "workflow" edge of the WorkflowStage entity.

func (*WorkflowStage) String added in v0.4.0

func (ws *WorkflowStage) String() string

String implements the fmt.Stringer.

func (*WorkflowStage) Unwrap added in v0.4.0

func (ws *WorkflowStage) Unwrap() *WorkflowStage

Unwrap unwraps the WorkflowStage 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 (*WorkflowStage) Update added in v0.4.0

func (ws *WorkflowStage) Update() *WorkflowStageUpdateOne

Update returns a builder for updating this WorkflowStage. Note that you need to call WorkflowStage.Unwrap() before calling this method if this WorkflowStage was returned from a transaction, and the transaction was committed or rolled back.

func (*WorkflowStage) Value added in v0.4.0

func (ws *WorkflowStage) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WorkflowStage. This includes values selected through modifiers, order, etc.

func (*WorkflowStage) View added in v0.4.0

func (_ws *WorkflowStage) View() *WorkflowStageOutput

View returns the output of WorkflowStage entity.

type WorkflowStageClient added in v0.4.0

type WorkflowStageClient struct {
	// contains filtered or unexported fields
}

WorkflowStageClient is a client for the WorkflowStage schema.

func NewWorkflowStageClient added in v0.4.0

func NewWorkflowStageClient(c config) *WorkflowStageClient

NewWorkflowStageClient returns a client for the WorkflowStage from the given config.

func (*WorkflowStageClient) Create added in v0.4.0

Create returns a builder for creating a WorkflowStage entity.

func (*WorkflowStageClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of WorkflowStage entities.

func (*WorkflowStageClient) Delete added in v0.4.0

Delete returns a delete builder for WorkflowStage.

func (*WorkflowStageClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowStageClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowStageClient) ExecContext added in v0.4.0

func (c *WorkflowStageClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageClient) Get added in v0.4.0

Get returns a WorkflowStage entity by its id.

func (*WorkflowStageClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*WorkflowStageClient) Hooks added in v0.4.0

func (c *WorkflowStageClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowStageClient) Intercept added in v0.4.0

func (c *WorkflowStageClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowstage.Intercept(f(g(h())))`.

func (*WorkflowStageClient) Interceptors added in v0.4.0

func (c *WorkflowStageClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowStageClient) MapCreateBulk added in v0.5.0

func (c *WorkflowStageClient) MapCreateBulk(slice any, setFunc func(*WorkflowStageCreate, int)) *WorkflowStageCreateBulk

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 (*WorkflowStageClient) Query added in v0.4.0

Query returns a query builder for WorkflowStage.

func (*WorkflowStageClient) QueryContext added in v0.4.0

func (c *WorkflowStageClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageClient) QueryProject added in v0.4.0

func (c *WorkflowStageClient) QueryProject(ws *WorkflowStage) *ProjectQuery

QueryProject queries the project edge of a WorkflowStage.

func (*WorkflowStageClient) QuerySteps added in v0.4.0

QuerySteps queries the steps edge of a WorkflowStage.

func (*WorkflowStageClient) QueryWorkflow added in v0.4.0

func (c *WorkflowStageClient) QueryWorkflow(ws *WorkflowStage) *WorkflowQuery

QueryWorkflow queries the workflow edge of a WorkflowStage.

func (*WorkflowStageClient) Update added in v0.4.0

Update returns an update builder for WorkflowStage.

func (*WorkflowStageClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*WorkflowStageClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*WorkflowStageClient) Use added in v0.4.0

func (c *WorkflowStageClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowstage.Hooks(f(g(h())))`.

type WorkflowStageClientGetter added in v0.4.0

type WorkflowStageClientGetter interface {
	// WorkflowStages returns the client for interacting with the WorkflowStage builders.
	WorkflowStages() *WorkflowStageClient
}

WorkflowStageClientGetter is an interface that allows getting WorkflowStageClient.

type WorkflowStageCreate added in v0.4.0

type WorkflowStageCreate struct {
	// contains filtered or unexported fields
}

WorkflowStageCreate is the builder for creating a WorkflowStage entity.

func (*WorkflowStageCreate) AddStepIDs added in v0.4.0

func (wsc *WorkflowStageCreate) AddStepIDs(ids ...object.ID) *WorkflowStageCreate

AddStepIDs adds the "steps" edge to the WorkflowStep entity by IDs.

func (*WorkflowStageCreate) AddSteps added in v0.4.0

AddSteps adds the "steps" edges to the WorkflowStep entity.

func (*WorkflowStageCreate) Exec added in v0.4.0

func (wsc *WorkflowStageCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowStageCreate) ExecContext added in v0.4.0

func (c *WorkflowStageCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageCreate) ExecE added in v0.4.0

func (wsc *WorkflowStageCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStage) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStageCreate) ExecEX added in v0.4.0

func (wsc *WorkflowStageCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStage) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStageCreate) ExecX added in v0.4.0

func (wsc *WorkflowStageCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageCreate) Mutation added in v0.4.0

func (wsc *WorkflowStageCreate) Mutation() *WorkflowStageMutation

Mutation returns the WorkflowStageMutation object of the builder.

func (*WorkflowStageCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowStage.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowStageUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowStageCreate) OnConflictColumns added in v0.4.0

func (wsc *WorkflowStageCreate) OnConflictColumns(columns ...string) *WorkflowStageUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowStage.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowStageCreate) QueryContext added in v0.4.0

func (c *WorkflowStageCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageCreate) Save added in v0.4.0

Save creates the WorkflowStage in the database.

func (*WorkflowStageCreate) SaveE added in v0.4.0

func (wsc *WorkflowStageCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStage) error) (*WorkflowStage, error)

SaveE calls the given function after created the WorkflowStage entity, which is always good for cascading create operations.

func (*WorkflowStageCreate) SaveEX added in v0.4.0

func (wsc *WorkflowStageCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStage) error) *WorkflowStage

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStageCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*WorkflowStageCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStageCreate) SetAnnotations added in v0.4.0

func (wsc *WorkflowStageCreate) SetAnnotations(m map[string]string) *WorkflowStageCreate

SetAnnotations sets the "annotations" field.

func (*WorkflowStageCreate) SetCreateTime added in v0.4.0

func (wsc *WorkflowStageCreate) SetCreateTime(t time.Time) *WorkflowStageCreate

SetCreateTime sets the "create_time" field.

func (*WorkflowStageCreate) SetDependencies added in v0.4.0

func (wsc *WorkflowStageCreate) SetDependencies(o []object.ID) *WorkflowStageCreate

SetDependencies sets the "dependencies" field.

func (*WorkflowStageCreate) SetDescription added in v0.4.0

func (wsc *WorkflowStageCreate) SetDescription(s string) *WorkflowStageCreate

SetDescription sets the "description" field.

func (*WorkflowStageCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*WorkflowStageCreate) SetLabels added in v0.4.0

func (wsc *WorkflowStageCreate) SetLabels(m map[string]string) *WorkflowStageCreate

SetLabels sets the "labels" field.

func (*WorkflowStageCreate) SetName added in v0.4.0

SetName sets the "name" field.

func (*WorkflowStageCreate) SetNillableCreateTime added in v0.4.0

func (wsc *WorkflowStageCreate) SetNillableCreateTime(t *time.Time) *WorkflowStageCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*WorkflowStageCreate) SetNillableDescription added in v0.4.0

func (wsc *WorkflowStageCreate) SetNillableDescription(s *string) *WorkflowStageCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStageCreate) SetNillableOrder added in v0.4.0

func (wsc *WorkflowStageCreate) SetNillableOrder(i *int) *WorkflowStageCreate

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStageCreate) SetNillableUpdateTime added in v0.4.0

func (wsc *WorkflowStageCreate) SetNillableUpdateTime(t *time.Time) *WorkflowStageCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*WorkflowStageCreate) SetOrder added in v0.4.0

func (wsc *WorkflowStageCreate) SetOrder(i int) *WorkflowStageCreate

SetOrder sets the "order" field.

func (*WorkflowStageCreate) SetProject added in v0.4.0

func (wsc *WorkflowStageCreate) SetProject(p *Project) *WorkflowStageCreate

SetProject sets the "project" edge to the Project entity.

func (*WorkflowStageCreate) SetProjectID added in v0.4.0

func (wsc *WorkflowStageCreate) SetProjectID(o object.ID) *WorkflowStageCreate

SetProjectID sets the "project_id" field.

func (*WorkflowStageCreate) SetUpdateTime added in v0.4.0

func (wsc *WorkflowStageCreate) SetUpdateTime(t time.Time) *WorkflowStageCreate

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageCreate) SetWorkflow added in v0.4.0

func (wsc *WorkflowStageCreate) SetWorkflow(w *Workflow) *WorkflowStageCreate

SetWorkflow sets the "workflow" edge to the Workflow entity.

func (*WorkflowStageCreate) SetWorkflowID added in v0.4.0

func (wsc *WorkflowStageCreate) SetWorkflowID(o object.ID) *WorkflowStageCreate

SetWorkflowID sets the "workflow_id" field.

type WorkflowStageCreateBulk added in v0.4.0

type WorkflowStageCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowStageCreateBulk is the builder for creating many WorkflowStage entities in bulk.

func (*WorkflowStageCreateBulk) Exec added in v0.4.0

func (wscb *WorkflowStageCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowStageCreateBulk) ExecContext added in v0.4.0

func (c *WorkflowStageCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageCreateBulk) ExecE added in v0.4.0

func (wscb *WorkflowStageCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStage) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStageCreateBulk) ExecEX added in v0.4.0

func (wscb *WorkflowStageCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStage) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStageCreateBulk) ExecX added in v0.4.0

func (wscb *WorkflowStageCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowStage.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowStageUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowStageCreateBulk) OnConflictColumns added in v0.4.0

func (wscb *WorkflowStageCreateBulk) OnConflictColumns(columns ...string) *WorkflowStageUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowStage.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowStageCreateBulk) QueryContext added in v0.4.0

func (c *WorkflowStageCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageCreateBulk) Save added in v0.4.0

Save creates the WorkflowStage entities in the database.

func (*WorkflowStageCreateBulk) SaveE added in v0.4.0

func (wscb *WorkflowStageCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStage) error) ([]*WorkflowStage, error)

SaveE calls the given function after created the WorkflowStage entities, which is always good for cascading create operations.

func (*WorkflowStageCreateBulk) SaveEX added in v0.4.0

func (wscb *WorkflowStageCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStage) error) []*WorkflowStage

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStageCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStageCreateBulk) Set added in v0.4.0

Set leverages the WorkflowStageCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type WorkflowStageCreateInput added in v0.4.0

type WorkflowStageCreateInput struct {

	// Project indicates to create WorkflowStage entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to create WorkflowStage entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// ID list of the workflow stages that this workflow stage depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies,omitempty"`

	// Steps specifies full inserting the new WorkflowStep entities of the WorkflowStage entity.
	Steps []*WorkflowStepCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStageCreateInput holds the creation input of the WorkflowStage entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageCreateInput) Model added in v0.4.0

func (wsci *WorkflowStageCreateInput) Model() *WorkflowStage

Model returns the WorkflowStage entity for creating, after validating.

func (*WorkflowStageCreateInput) SetGinContext added in v0.4.0

func (ic *WorkflowStageCreateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStageCreateInput) SetModelClient added in v0.4.0

func (ic *WorkflowStageCreateInput) SetModelClient(cli *Client)

func (*WorkflowStageCreateInput) Validate added in v0.4.0

func (wsci *WorkflowStageCreateInput) Validate() error

Validate checks the WorkflowStageCreateInput entity.

func (*WorkflowStageCreateInput) ValidateWith added in v0.4.0

func (wsci *WorkflowStageCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageCreateInput entity with the given context and client set.

type WorkflowStageCreateInputs added in v0.4.0

type WorkflowStageCreateInputs struct {

	// Project indicates to create WorkflowStage entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to create WorkflowStage entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStageCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStageCreateInputs holds the creation input of the WorkflowStage entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageCreateInputs) Model added in v0.4.0

func (wsci *WorkflowStageCreateInputs) Model() []*WorkflowStage

Model returns the WorkflowStage entities for creating, after validating.

func (*WorkflowStageCreateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStageCreateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStageCreateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStageCreateInputs) SetModelClient(cli *Client)

func (*WorkflowStageCreateInputs) Validate added in v0.4.0

func (wsci *WorkflowStageCreateInputs) Validate() error

Validate checks the WorkflowStageCreateInputs entity .

func (*WorkflowStageCreateInputs) ValidateWith added in v0.4.0

func (wsci *WorkflowStageCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageCreateInputs entity with the given context and client set.

type WorkflowStageCreateInputsItem added in v0.4.0

type WorkflowStageCreateInputsItem struct {
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// ID list of the workflow stages that this workflow stage depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies,omitempty"`

	// Steps specifies full inserting the new WorkflowStep entities.
	Steps []*WorkflowStepCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
}

WorkflowStageCreateInputs holds the creation input item of the WorkflowStage entities.

func (*WorkflowStageCreateInputsItem) ValidateWith added in v0.4.0

func (wsci *WorkflowStageCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageCreateInputsItem entity with the given context and client set.

type WorkflowStageDelete added in v0.4.0

type WorkflowStageDelete struct {
	// contains filtered or unexported fields
}

WorkflowStageDelete is the builder for deleting a WorkflowStage entity.

func (*WorkflowStageDelete) Exec added in v0.4.0

func (wsd *WorkflowStageDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowStageDelete) ExecContext added in v0.4.0

func (c *WorkflowStageDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageDelete) ExecX added in v0.4.0

func (wsd *WorkflowStageDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageDelete) QueryContext added in v0.4.0

func (c *WorkflowStageDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageDelete) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageDelete builder.

type WorkflowStageDeleteInput added in v0.4.0

type WorkflowStageDeleteInput struct {
	WorkflowStageQueryInput `path:",inline"`
}

WorkflowStageDeleteInput holds the deletion input of the WorkflowStage entity, please tags with `path:",inline"` if embedding.

func (*WorkflowStageDeleteInput) SetGinContext added in v0.4.0

func (ic *WorkflowStageDeleteInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStageDeleteInput) SetModelClient added in v0.4.0

func (ic *WorkflowStageDeleteInput) SetModelClient(cli *Client)

type WorkflowStageDeleteInputs added in v0.4.0

type WorkflowStageDeleteInputs struct {

	// Project indicates to delete WorkflowStage entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to delete WorkflowStage entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStageDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStageDeleteInputs holds the deletion input of the WorkflowStage entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageDeleteInputs) IDs added in v0.4.0

func (wsdi *WorkflowStageDeleteInputs) IDs() []object.ID

IDs returns the ID list of the WorkflowStage entities for deleting, after validating.

func (*WorkflowStageDeleteInputs) Model added in v0.4.0

func (wsdi *WorkflowStageDeleteInputs) Model() []*WorkflowStage

Model returns the WorkflowStage entities for deleting, after validating.

func (*WorkflowStageDeleteInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStageDeleteInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStageDeleteInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStageDeleteInputs) SetModelClient(cli *Client)

func (*WorkflowStageDeleteInputs) Validate added in v0.4.0

func (wsdi *WorkflowStageDeleteInputs) Validate() error

Validate checks the WorkflowStageDeleteInputs entity.

func (*WorkflowStageDeleteInputs) ValidateWith added in v0.4.0

func (wsdi *WorkflowStageDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageDeleteInputs entity with the given context and client set.

type WorkflowStageDeleteInputsItem added in v0.4.0

type WorkflowStageDeleteInputsItem struct {
	// ID of the WorkflowStage entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

WorkflowStageDeleteInputs holds the deletion input item of the WorkflowStage entities.

type WorkflowStageDeleteOne added in v0.4.0

type WorkflowStageDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowStageDeleteOne is the builder for deleting a single WorkflowStage entity.

func (*WorkflowStageDeleteOne) Exec added in v0.4.0

func (wsdo *WorkflowStageDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WorkflowStageDeleteOne) ExecX added in v0.4.0

func (wsdo *WorkflowStageDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageDeleteOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageDelete builder.

type WorkflowStageEdges added in v0.4.0

type WorkflowStageEdges struct {
	// Project to which the workflow stage belongs.
	Project *Project `json:"project,omitempty"`
	// Workflow steps that belong to this workflow stage.
	Steps []*WorkflowStep `json:"steps,omitempty"`
	// Workflow that this workflow stage belongs to.
	Workflow *Workflow `json:"workflow,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStageEdges holds the relations/edges for other nodes in the graph.

func (WorkflowStageEdges) ProjectOrErr added in v0.4.0

func (e WorkflowStageEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowStageEdges) StepsOrErr added in v0.4.0

func (e WorkflowStageEdges) StepsOrErr() ([]*WorkflowStep, error)

StepsOrErr returns the Steps value or an error if the edge was not loaded in eager-loading.

func (WorkflowStageEdges) WorkflowOrErr added in v0.4.0

func (e WorkflowStageEdges) 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 WorkflowStageExecution added in v0.4.0

type WorkflowStageExecution struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `json:"status,omitempty"`
	// ID of the project to belong.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the workflow that this workflow execution belongs to.
	WorkflowID object.ID `json:"workflow_id,omitempty"`
	// ID of the workflow stage that this workflow stage execution belongs to.
	WorkflowStageID object.ID `json:"workflow_stage_id,omitempty"`
	// ID of the workflow execution that this workflow stage execution belongs to.
	WorkflowExecutionID object.ID `json:"workflow_execution_id,omitempty"`
	// Time of the stage execution started.
	ExecuteTime time.Time `json:"execute_time,omitempty"`
	// Duration of the workflow stage execution.
	Duration int `json:"duration,omitempty"`
	// Order of the workflow stage execution.
	Order int `json:"order,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorkflowStageExecutionQuery when eager-loading is set.
	Edges WorkflowStageExecutionEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStageExecution is the model entity for the WorkflowStageExecution schema.

func (*WorkflowStageExecution) ExecContext added in v0.4.0

func (c *WorkflowStageExecution) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecution) QueryContext added in v0.4.0

func (c *WorkflowStageExecution) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecution) QueryProject added in v0.4.0

func (wse *WorkflowStageExecution) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the WorkflowStageExecution entity.

func (*WorkflowStageExecution) QuerySteps added in v0.4.0

QuerySteps queries the "steps" edge of the WorkflowStageExecution entity.

func (*WorkflowStageExecution) QueryWorkflowExecution added in v0.4.0

func (wse *WorkflowStageExecution) QueryWorkflowExecution() *WorkflowExecutionQuery

QueryWorkflowExecution queries the "workflow_execution" edge of the WorkflowStageExecution entity.

func (*WorkflowStageExecution) String added in v0.4.0

func (wse *WorkflowStageExecution) String() string

String implements the fmt.Stringer.

func (*WorkflowStageExecution) Unwrap added in v0.4.0

Unwrap unwraps the WorkflowStageExecution 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 (*WorkflowStageExecution) Update added in v0.4.0

Update returns a builder for updating this WorkflowStageExecution. Note that you need to call WorkflowStageExecution.Unwrap() before calling this method if this WorkflowStageExecution was returned from a transaction, and the transaction was committed or rolled back.

func (*WorkflowStageExecution) Value added in v0.4.0

func (wse *WorkflowStageExecution) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WorkflowStageExecution. This includes values selected through modifiers, order, etc.

func (*WorkflowStageExecution) View added in v0.4.0

View returns the output of WorkflowStageExecution entity.

type WorkflowStageExecutionClient added in v0.4.0

type WorkflowStageExecutionClient struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionClient is a client for the WorkflowStageExecution schema.

func NewWorkflowStageExecutionClient added in v0.4.0

func NewWorkflowStageExecutionClient(c config) *WorkflowStageExecutionClient

NewWorkflowStageExecutionClient returns a client for the WorkflowStageExecution from the given config.

func (*WorkflowStageExecutionClient) Create added in v0.4.0

Create returns a builder for creating a WorkflowStageExecution entity.

func (*WorkflowStageExecutionClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of WorkflowStageExecution entities.

func (*WorkflowStageExecutionClient) Delete added in v0.4.0

Delete returns a delete builder for WorkflowStageExecution.

func (*WorkflowStageExecutionClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowStageExecutionClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowStageExecutionClient) ExecContext added in v0.4.0

func (c *WorkflowStageExecutionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecutionClient) Get added in v0.4.0

Get returns a WorkflowStageExecution entity by its id.

func (*WorkflowStageExecutionClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*WorkflowStageExecutionClient) Hooks added in v0.4.0

func (c *WorkflowStageExecutionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowStageExecutionClient) Intercept added in v0.4.0

func (c *WorkflowStageExecutionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowstageexecution.Intercept(f(g(h())))`.

func (*WorkflowStageExecutionClient) Interceptors added in v0.4.0

func (c *WorkflowStageExecutionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowStageExecutionClient) MapCreateBulk added in v0.5.0

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 (*WorkflowStageExecutionClient) Query added in v0.4.0

Query returns a query builder for WorkflowStageExecution.

func (*WorkflowStageExecutionClient) QueryContext added in v0.4.0

func (c *WorkflowStageExecutionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecutionClient) QueryProject added in v0.4.0

QueryProject queries the project edge of a WorkflowStageExecution.

func (*WorkflowStageExecutionClient) QuerySteps added in v0.4.0

QuerySteps queries the steps edge of a WorkflowStageExecution.

func (*WorkflowStageExecutionClient) QueryWorkflowExecution added in v0.4.0

QueryWorkflowExecution queries the workflow_execution edge of a WorkflowStageExecution.

func (*WorkflowStageExecutionClient) Update added in v0.4.0

Update returns an update builder for WorkflowStageExecution.

func (*WorkflowStageExecutionClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*WorkflowStageExecutionClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*WorkflowStageExecutionClient) Use added in v0.4.0

func (c *WorkflowStageExecutionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowstageexecution.Hooks(f(g(h())))`.

type WorkflowStageExecutionClientGetter added in v0.4.0

type WorkflowStageExecutionClientGetter interface {
	// WorkflowStageExecutions returns the client for interacting with the WorkflowStageExecution builders.
	WorkflowStageExecutions() *WorkflowStageExecutionClient
}

WorkflowStageExecutionClientGetter is an interface that allows getting WorkflowStageExecutionClient.

type WorkflowStageExecutionCreate added in v0.4.0

type WorkflowStageExecutionCreate struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionCreate is the builder for creating a WorkflowStageExecution entity.

func (*WorkflowStageExecutionCreate) AddStepIDs added in v0.4.0

AddStepIDs adds the "steps" edge to the WorkflowStepExecution entity by IDs.

func (*WorkflowStageExecutionCreate) AddSteps added in v0.4.0

AddSteps adds the "steps" edges to the WorkflowStepExecution entity.

func (*WorkflowStageExecutionCreate) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStageExecutionCreate) ExecContext added in v0.4.0

func (c *WorkflowStageExecutionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecutionCreate) ExecE added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStageExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStageExecutionCreate) ExecEX added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStageExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStageExecutionCreate) ExecX added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageExecutionCreate) Mutation added in v0.4.0

Mutation returns the WorkflowStageExecutionMutation object of the builder.

func (*WorkflowStageExecutionCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowStageExecution.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowStageExecutionUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowStageExecutionCreate) OnConflictColumns added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) OnConflictColumns(columns ...string) *WorkflowStageExecutionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowStageExecution.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowStageExecutionCreate) QueryContext added in v0.4.0

func (c *WorkflowStageExecutionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecutionCreate) Save added in v0.4.0

Save creates the WorkflowStageExecution in the database.

func (*WorkflowStageExecutionCreate) SaveE added in v0.4.0

SaveE calls the given function after created the WorkflowStageExecution entity, which is always good for cascading create operations.

func (*WorkflowStageExecutionCreate) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStageExecutionCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*WorkflowStageExecutionCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStageExecutionCreate) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStageExecutionCreate) SetCreateTime added in v0.4.0

SetCreateTime sets the "create_time" field.

func (*WorkflowStageExecutionCreate) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStageExecutionCreate) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStageExecutionCreate) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStageExecutionCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*WorkflowStageExecutionCreate) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageExecutionCreate) SetName added in v0.4.0

SetName sets the "name" field.

func (*WorkflowStageExecutionCreate) SetNillableCreateTime added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) SetNillableCreateTime(t *time.Time) *WorkflowStageExecutionCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*WorkflowStageExecutionCreate) SetNillableDescription added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) SetNillableDescription(s *string) *WorkflowStageExecutionCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStageExecutionCreate) SetNillableDuration added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) SetNillableDuration(i *int) *WorkflowStageExecutionCreate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*WorkflowStageExecutionCreate) SetNillableExecuteTime added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) SetNillableExecuteTime(t *time.Time) *WorkflowStageExecutionCreate

SetNillableExecuteTime sets the "execute_time" field if the given value is not nil.

func (*WorkflowStageExecutionCreate) SetNillableOrder added in v0.4.0

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStageExecutionCreate) SetNillableStatus added in v0.4.0

SetNillableStatus sets the "status" field if the given value is not nil.

func (*WorkflowStageExecutionCreate) SetNillableUpdateTime added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) SetNillableUpdateTime(t *time.Time) *WorkflowStageExecutionCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*WorkflowStageExecutionCreate) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageExecutionCreate) SetProject added in v0.4.0

SetProject sets the "project" edge to the Project entity.

func (*WorkflowStageExecutionCreate) SetProjectID added in v0.4.0

SetProjectID sets the "project_id" field.

func (*WorkflowStageExecutionCreate) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStageExecutionCreate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageExecutionCreate) SetWorkflowExecution added in v0.4.0

SetWorkflowExecution sets the "workflow_execution" edge to the WorkflowExecution entity.

func (*WorkflowStageExecutionCreate) SetWorkflowExecutionID added in v0.4.0

func (wsec *WorkflowStageExecutionCreate) SetWorkflowExecutionID(o object.ID) *WorkflowStageExecutionCreate

SetWorkflowExecutionID sets the "workflow_execution_id" field.

func (*WorkflowStageExecutionCreate) SetWorkflowID added in v0.4.0

SetWorkflowID sets the "workflow_id" field.

func (*WorkflowStageExecutionCreate) SetWorkflowStageID added in v0.4.0

SetWorkflowStageID sets the "workflow_stage_id" field.

type WorkflowStageExecutionCreateBulk added in v0.4.0

type WorkflowStageExecutionCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionCreateBulk is the builder for creating many WorkflowStageExecution entities in bulk.

func (*WorkflowStageExecutionCreateBulk) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStageExecutionCreateBulk) ExecContext added in v0.4.0

func (c *WorkflowStageExecutionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecutionCreateBulk) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStageExecutionCreateBulk) ExecEX added in v0.4.0

func (wsecb *WorkflowStageExecutionCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStageExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStageExecutionCreateBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageExecutionCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowStageExecution.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowStageExecutionUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowStageExecutionCreateBulk) OnConflictColumns added in v0.4.0

func (wsecb *WorkflowStageExecutionCreateBulk) OnConflictColumns(columns ...string) *WorkflowStageExecutionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowStageExecution.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowStageExecutionCreateBulk) QueryContext added in v0.4.0

func (c *WorkflowStageExecutionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecutionCreateBulk) Save added in v0.4.0

Save creates the WorkflowStageExecution entities in the database.

func (*WorkflowStageExecutionCreateBulk) SaveE added in v0.4.0

SaveE calls the given function after created the WorkflowStageExecution entities, which is always good for cascading create operations.

func (*WorkflowStageExecutionCreateBulk) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStageExecutionCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStageExecutionCreateBulk) Set added in v0.4.0

Set leverages the WorkflowStageExecutionCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type WorkflowStageExecutionCreateInput added in v0.4.0

type WorkflowStageExecutionCreateInput struct {

	// WorkflowExecution indicates to create WorkflowStageExecution entity MUST under the WorkflowExecution route.
	WorkflowExecution *WorkflowExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// ID of the workflow stage that this workflow stage execution belongs to.
	WorkflowStageID object.ID `path:"-" query:"-" json:"workflowStageID"`
	// ID of the workflow that this workflow execution belongs to.
	WorkflowID object.ID `path:"-" query:"-" json:"workflowID"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`

	// Steps specifies full inserting the new WorkflowStepExecution entities of the WorkflowStageExecution entity.
	Steps []*WorkflowStepExecutionCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStageExecutionCreateInput holds the creation input of the WorkflowStageExecution entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageExecutionCreateInput) Model added in v0.4.0

Model returns the WorkflowStageExecution entity for creating, after validating.

func (*WorkflowStageExecutionCreateInput) SetGinContext added in v0.4.0

func (ic *WorkflowStageExecutionCreateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStageExecutionCreateInput) SetModelClient added in v0.4.0

func (ic *WorkflowStageExecutionCreateInput) SetModelClient(cli *Client)

func (*WorkflowStageExecutionCreateInput) Validate added in v0.4.0

func (wseci *WorkflowStageExecutionCreateInput) Validate() error

Validate checks the WorkflowStageExecutionCreateInput entity.

func (*WorkflowStageExecutionCreateInput) ValidateWith added in v0.4.0

func (wseci *WorkflowStageExecutionCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionCreateInput entity with the given context and client set.

type WorkflowStageExecutionCreateInputs added in v0.4.0

type WorkflowStageExecutionCreateInputs struct {

	// WorkflowExecution indicates to create WorkflowStageExecution entity MUST under the WorkflowExecution route.
	WorkflowExecution *WorkflowExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStageExecutionCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStageExecutionCreateInputs holds the creation input of the WorkflowStageExecution entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageExecutionCreateInputs) Model added in v0.4.0

Model returns the WorkflowStageExecution entities for creating, after validating.

func (*WorkflowStageExecutionCreateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStageExecutionCreateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStageExecutionCreateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStageExecutionCreateInputs) SetModelClient(cli *Client)

func (*WorkflowStageExecutionCreateInputs) Validate added in v0.4.0

func (wseci *WorkflowStageExecutionCreateInputs) Validate() error

Validate checks the WorkflowStageExecutionCreateInputs entity .

func (*WorkflowStageExecutionCreateInputs) ValidateWith added in v0.4.0

func (wseci *WorkflowStageExecutionCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionCreateInputs entity with the given context and client set.

type WorkflowStageExecutionCreateInputsItem added in v0.4.0

type WorkflowStageExecutionCreateInputsItem struct {
	// ID of the workflow stage that this workflow stage execution belongs to.
	WorkflowStageID object.ID `path:"-" query:"-" json:"workflowStageID"`
	// ID of the workflow that this workflow execution belongs to.
	WorkflowID object.ID `path:"-" query:"-" json:"workflowID"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`

	// Steps specifies full inserting the new WorkflowStepExecution entities.
	Steps []*WorkflowStepExecutionCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
}

WorkflowStageExecutionCreateInputs holds the creation input item of the WorkflowStageExecution entities.

func (*WorkflowStageExecutionCreateInputsItem) ValidateWith added in v0.4.0

func (wseci *WorkflowStageExecutionCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionCreateInputsItem entity with the given context and client set.

type WorkflowStageExecutionDelete added in v0.4.0

type WorkflowStageExecutionDelete struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionDelete is the builder for deleting a WorkflowStageExecution entity.

func (*WorkflowStageExecutionDelete) Exec added in v0.4.0

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowStageExecutionDelete) ExecContext added in v0.4.0

func (c *WorkflowStageExecutionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecutionDelete) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageExecutionDelete) QueryContext added in v0.4.0

func (c *WorkflowStageExecutionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecutionDelete) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageExecutionDelete builder.

type WorkflowStageExecutionDeleteInput added in v0.4.0

type WorkflowStageExecutionDeleteInput struct {
	WorkflowStageExecutionQueryInput `path:",inline"`
}

WorkflowStageExecutionDeleteInput holds the deletion input of the WorkflowStageExecution entity, please tags with `path:",inline"` if embedding.

func (*WorkflowStageExecutionDeleteInput) SetGinContext added in v0.4.0

func (ic *WorkflowStageExecutionDeleteInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStageExecutionDeleteInput) SetModelClient added in v0.4.0

func (ic *WorkflowStageExecutionDeleteInput) SetModelClient(cli *Client)

type WorkflowStageExecutionDeleteInputs added in v0.4.0

type WorkflowStageExecutionDeleteInputs struct {

	// WorkflowExecution indicates to delete WorkflowStageExecution entity MUST under the WorkflowExecution route.
	WorkflowExecution *WorkflowExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStageExecutionDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStageExecutionDeleteInputs holds the deletion input of the WorkflowStageExecution entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageExecutionDeleteInputs) IDs added in v0.4.0

IDs returns the ID list of the WorkflowStageExecution entities for deleting, after validating.

func (*WorkflowStageExecutionDeleteInputs) Model added in v0.4.0

Model returns the WorkflowStageExecution entities for deleting, after validating.

func (*WorkflowStageExecutionDeleteInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStageExecutionDeleteInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStageExecutionDeleteInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStageExecutionDeleteInputs) SetModelClient(cli *Client)

func (*WorkflowStageExecutionDeleteInputs) Validate added in v0.4.0

func (wsedi *WorkflowStageExecutionDeleteInputs) Validate() error

Validate checks the WorkflowStageExecutionDeleteInputs entity.

func (*WorkflowStageExecutionDeleteInputs) ValidateWith added in v0.4.0

func (wsedi *WorkflowStageExecutionDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionDeleteInputs entity with the given context and client set.

type WorkflowStageExecutionDeleteInputsItem added in v0.4.0

type WorkflowStageExecutionDeleteInputsItem struct {
	// ID of the WorkflowStageExecution entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

WorkflowStageExecutionDeleteInputs holds the deletion input item of the WorkflowStageExecution entities.

type WorkflowStageExecutionDeleteOne added in v0.4.0

type WorkflowStageExecutionDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionDeleteOne is the builder for deleting a single WorkflowStageExecution entity.

func (*WorkflowStageExecutionDeleteOne) Exec added in v0.4.0

Exec executes the deletion query.

func (*WorkflowStageExecutionDeleteOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageExecutionDeleteOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageExecutionDelete builder.

type WorkflowStageExecutionEdges added in v0.4.0

type WorkflowStageExecutionEdges struct {
	// Project to which the workflow stage executions belongs.
	Project *Project `json:"project,omitempty"`
	// Workflow step executions that belong to this workflow stage execution.
	Steps []*WorkflowStepExecution `json:"steps,omitempty"`
	// Workflow execution that this workflow stage execution belongs to.
	WorkflowExecution *WorkflowExecution `json:"workflow_execution,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStageExecutionEdges holds the relations/edges for other nodes in the graph.

func (WorkflowStageExecutionEdges) ProjectOrErr added in v0.4.0

func (e WorkflowStageExecutionEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowStageExecutionEdges) StepsOrErr added in v0.4.0

StepsOrErr returns the Steps value or an error if the edge was not loaded in eager-loading.

func (WorkflowStageExecutionEdges) WorkflowExecutionOrErr added in v0.4.0

func (e WorkflowStageExecutionEdges) WorkflowExecutionOrErr() (*WorkflowExecution, error)

WorkflowExecutionOrErr returns the WorkflowExecution value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WorkflowStageExecutionGroupBy added in v0.4.0

type WorkflowStageExecutionGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionGroupBy is the group-by builder for WorkflowStageExecution entities.

func (*WorkflowStageExecutionGroupBy) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowStageExecutionGroupBy) Bool added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionGroupBy) BoolX added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowStageExecutionGroupBy) Bools added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionGroupBy) BoolsX added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowStageExecutionGroupBy) Float64 added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionGroupBy) Float64X added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowStageExecutionGroupBy) Float64s added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionGroupBy) Float64sX added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowStageExecutionGroupBy) Int added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionGroupBy) IntX added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowStageExecutionGroupBy) Ints added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionGroupBy) IntsX added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowStageExecutionGroupBy) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*WorkflowStageExecutionGroupBy) ScanX added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowStageExecutionGroupBy) String added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionGroupBy) StringX added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowStageExecutionGroupBy) Strings added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionGroupBy) StringsX added in v0.4.0

func (s *WorkflowStageExecutionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowStageExecutionMutation added in v0.4.0

type WorkflowStageExecutionMutation struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionMutation represents an operation that mutates the WorkflowStageExecution nodes in the graph.

func (*WorkflowStageExecutionMutation) AddDuration added in v0.4.0

func (m *WorkflowStageExecutionMutation) AddDuration(i int)

AddDuration adds i to the "duration" field.

func (*WorkflowStageExecutionMutation) AddField added in v0.4.0

func (m *WorkflowStageExecutionMutation) 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 (*WorkflowStageExecutionMutation) AddOrder added in v0.4.0

func (m *WorkflowStageExecutionMutation) AddOrder(i int)

AddOrder adds i to the "order" field.

func (*WorkflowStageExecutionMutation) AddStepIDs added in v0.4.0

func (m *WorkflowStageExecutionMutation) AddStepIDs(ids ...object.ID)

AddStepIDs adds the "steps" edge to the WorkflowStepExecution entity by ids.

func (*WorkflowStageExecutionMutation) AddedDuration added in v0.4.0

func (m *WorkflowStageExecutionMutation) AddedDuration() (r int, exists bool)

AddedDuration returns the value that was added to the "duration" field in this mutation.

func (*WorkflowStageExecutionMutation) AddedEdges added in v0.4.0

func (m *WorkflowStageExecutionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowStageExecutionMutation) AddedField added in v0.4.0

func (m *WorkflowStageExecutionMutation) 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 (*WorkflowStageExecutionMutation) AddedFields added in v0.4.0

func (m *WorkflowStageExecutionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowStageExecutionMutation) AddedIDs added in v0.4.0

func (m *WorkflowStageExecutionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorkflowStageExecutionMutation) AddedOrder added in v0.4.0

func (m *WorkflowStageExecutionMutation) AddedOrder() (r int, exists bool)

AddedOrder returns the value that was added to the "order" field in this mutation.

func (*WorkflowStageExecutionMutation) Annotations added in v0.4.0

func (m *WorkflowStageExecutionMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*WorkflowStageExecutionMutation) AnnotationsCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*WorkflowStageExecutionMutation) ClearAnnotations added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageExecutionMutation) ClearDescription added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*WorkflowStageExecutionMutation) ClearEdge added in v0.4.0

func (m *WorkflowStageExecutionMutation) 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 (*WorkflowStageExecutionMutation) ClearExecuteTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearExecuteTime()

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStageExecutionMutation) ClearField added in v0.4.0

func (m *WorkflowStageExecutionMutation) 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 (*WorkflowStageExecutionMutation) ClearLabels added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageExecutionMutation) ClearProject added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*WorkflowStageExecutionMutation) ClearStatus added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*WorkflowStageExecutionMutation) ClearSteps added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearSteps()

ClearSteps clears the "steps" edge to the WorkflowStepExecution entity.

func (*WorkflowStageExecutionMutation) ClearWorkflowExecution added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearWorkflowExecution()

ClearWorkflowExecution clears the "workflow_execution" edge to the WorkflowExecution entity.

func (*WorkflowStageExecutionMutation) ClearedEdges added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowStageExecutionMutation) ClearedFields added in v0.4.0

func (m *WorkflowStageExecutionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowStageExecutionMutation) Client added in v0.4.0

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 (*WorkflowStageExecutionMutation) CreateTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*WorkflowStageExecutionMutation) Description added in v0.4.0

func (m *WorkflowStageExecutionMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*WorkflowStageExecutionMutation) DescriptionCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*WorkflowStageExecutionMutation) Duration added in v0.4.0

func (m *WorkflowStageExecutionMutation) Duration() (r int, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*WorkflowStageExecutionMutation) EdgeCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorkflowStageExecutionMutation) ExecContext added in v0.4.0

func (c *WorkflowStageExecutionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecutionMutation) ExecuteTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) ExecuteTime() (r time.Time, exists bool)

ExecuteTime returns the value of the "execute_time" field in the mutation.

func (*WorkflowStageExecutionMutation) ExecuteTimeCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) ExecuteTimeCleared() bool

ExecuteTimeCleared returns if the "execute_time" field was cleared in this mutation.

func (*WorkflowStageExecutionMutation) Field added in v0.4.0

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 (*WorkflowStageExecutionMutation) FieldCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorkflowStageExecutionMutation) Fields added in v0.4.0

func (m *WorkflowStageExecutionMutation) 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 (*WorkflowStageExecutionMutation) ID added in v0.4.0

func (m *WorkflowStageExecutionMutation) ID() (id object.ID, 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 (*WorkflowStageExecutionMutation) IDs added in v0.4.0

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 (*WorkflowStageExecutionMutation) Labels added in v0.4.0

func (m *WorkflowStageExecutionMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*WorkflowStageExecutionMutation) LabelsCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*WorkflowStageExecutionMutation) Name added in v0.4.0

func (m *WorkflowStageExecutionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WorkflowStageExecutionMutation) OldAnnotations added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldCreateTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldDescription added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldDuration added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldDuration(ctx context.Context) (v int, err error)

OldDuration returns the old "duration" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldExecuteTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldExecuteTime(ctx context.Context) (v time.Time, err error)

OldExecuteTime returns the old "execute_time" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldField added in v0.4.0

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 (*WorkflowStageExecutionMutation) OldLabels added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldName added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldOrder added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldOrder(ctx context.Context) (v int, err error)

OldOrder returns the old "order" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldProjectID added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldStatus added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldStatus(ctx context.Context) (v status.Status, err error)

OldStatus returns the old "status" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldUpdateTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldWorkflowExecutionID added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldWorkflowExecutionID(ctx context.Context) (v object.ID, err error)

OldWorkflowExecutionID returns the old "workflow_execution_id" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldWorkflowID added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldWorkflowID(ctx context.Context) (v object.ID, err error)

OldWorkflowID returns the old "workflow_id" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) OldWorkflowStageID added in v0.4.0

func (m *WorkflowStageExecutionMutation) OldWorkflowStageID(ctx context.Context) (v object.ID, err error)

OldWorkflowStageID returns the old "workflow_stage_id" field's value of the WorkflowStageExecution entity. If the WorkflowStageExecution 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 (*WorkflowStageExecutionMutation) Op added in v0.4.0

Op returns the operation name.

func (*WorkflowStageExecutionMutation) Order added in v0.4.0

func (m *WorkflowStageExecutionMutation) Order() (r int, exists bool)

Order returns the value of the "order" field in the mutation.

func (*WorkflowStageExecutionMutation) ProjectCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*WorkflowStageExecutionMutation) ProjectID added in v0.4.0

func (m *WorkflowStageExecutionMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*WorkflowStageExecutionMutation) ProjectIDs added in v0.4.0

func (m *WorkflowStageExecutionMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*WorkflowStageExecutionMutation) QueryContext added in v0.4.0

func (c *WorkflowStageExecutionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecutionMutation) RemoveStepIDs added in v0.4.0

func (m *WorkflowStageExecutionMutation) RemoveStepIDs(ids ...object.ID)

RemoveStepIDs removes the "steps" edge to the WorkflowStepExecution entity by IDs.

func (*WorkflowStageExecutionMutation) RemovedEdges added in v0.4.0

func (m *WorkflowStageExecutionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowStageExecutionMutation) RemovedIDs added in v0.4.0

func (m *WorkflowStageExecutionMutation) 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 (*WorkflowStageExecutionMutation) RemovedStepsIDs added in v0.4.0

func (m *WorkflowStageExecutionMutation) RemovedStepsIDs() (ids []object.ID)

RemovedSteps returns the removed IDs of the "steps" edge to the WorkflowStepExecution entity.

func (*WorkflowStageExecutionMutation) ResetAnnotations added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*WorkflowStageExecutionMutation) ResetCreateTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*WorkflowStageExecutionMutation) ResetDescription added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*WorkflowStageExecutionMutation) ResetDuration added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*WorkflowStageExecutionMutation) ResetEdge added in v0.4.0

func (m *WorkflowStageExecutionMutation) 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 (*WorkflowStageExecutionMutation) ResetExecuteTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetExecuteTime()

ResetExecuteTime resets all changes to the "execute_time" field.

func (*WorkflowStageExecutionMutation) ResetField added in v0.4.0

func (m *WorkflowStageExecutionMutation) 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 (*WorkflowStageExecutionMutation) ResetLabels added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*WorkflowStageExecutionMutation) ResetName added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WorkflowStageExecutionMutation) ResetOrder added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetOrder()

ResetOrder resets all changes to the "order" field.

func (*WorkflowStageExecutionMutation) ResetProject added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*WorkflowStageExecutionMutation) ResetProjectID added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*WorkflowStageExecutionMutation) ResetStatus added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*WorkflowStageExecutionMutation) ResetSteps added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetSteps()

ResetSteps resets all changes to the "steps" edge.

func (*WorkflowStageExecutionMutation) ResetUpdateTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*WorkflowStageExecutionMutation) ResetWorkflowExecution added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetWorkflowExecution()

ResetWorkflowExecution resets all changes to the "workflow_execution" edge.

func (*WorkflowStageExecutionMutation) ResetWorkflowExecutionID added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetWorkflowExecutionID()

ResetWorkflowExecutionID resets all changes to the "workflow_execution_id" field.

func (*WorkflowStageExecutionMutation) ResetWorkflowID added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetWorkflowID()

ResetWorkflowID resets all changes to the "workflow_id" field.

func (*WorkflowStageExecutionMutation) ResetWorkflowStageID added in v0.4.0

func (m *WorkflowStageExecutionMutation) ResetWorkflowStageID()

ResetWorkflowStageID resets all changes to the "workflow_stage_id" field.

func (*WorkflowStageExecutionMutation) SetAnnotations added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*WorkflowStageExecutionMutation) SetCreateTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*WorkflowStageExecutionMutation) SetDescription added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*WorkflowStageExecutionMutation) SetDuration added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetDuration(i int)

SetDuration sets the "duration" field.

func (*WorkflowStageExecutionMutation) SetExecuteTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetExecuteTime(t time.Time)

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStageExecutionMutation) SetField added in v0.4.0

func (m *WorkflowStageExecutionMutation) 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 (*WorkflowStageExecutionMutation) SetID added in v0.4.0

SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowStageExecution entities.

func (*WorkflowStageExecutionMutation) SetLabels added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*WorkflowStageExecutionMutation) SetName added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetName(s string)

SetName sets the "name" field.

func (*WorkflowStageExecutionMutation) SetOp added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowStageExecutionMutation) SetOrder added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetOrder(i int)

SetOrder sets the "order" field.

func (*WorkflowStageExecutionMutation) SetProjectID added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*WorkflowStageExecutionMutation) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStageExecutionMutation) SetUpdateTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageExecutionMutation) SetWorkflowExecutionID added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetWorkflowExecutionID(o object.ID)

SetWorkflowExecutionID sets the "workflow_execution_id" field.

func (*WorkflowStageExecutionMutation) SetWorkflowID added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetWorkflowID(o object.ID)

SetWorkflowID sets the "workflow_id" field.

func (*WorkflowStageExecutionMutation) SetWorkflowStageID added in v0.4.0

func (m *WorkflowStageExecutionMutation) SetWorkflowStageID(o object.ID)

SetWorkflowStageID sets the "workflow_stage_id" field.

func (*WorkflowStageExecutionMutation) Status added in v0.4.0

func (m *WorkflowStageExecutionMutation) Status() (r status.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*WorkflowStageExecutionMutation) StatusCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*WorkflowStageExecutionMutation) StepsCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) StepsCleared() bool

StepsCleared reports if the "steps" edge to the WorkflowStepExecution entity was cleared.

func (*WorkflowStageExecutionMutation) StepsIDs added in v0.4.0

func (m *WorkflowStageExecutionMutation) StepsIDs() (ids []object.ID)

StepsIDs returns the "steps" edge IDs in the mutation.

func (WorkflowStageExecutionMutation) Tx added in v0.4.0

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorkflowStageExecutionMutation) Type added in v0.4.0

Type returns the node type of this mutation (WorkflowStageExecution).

func (*WorkflowStageExecutionMutation) UpdateTime added in v0.4.0

func (m *WorkflowStageExecutionMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*WorkflowStageExecutionMutation) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageExecutionMutation builder.

func (*WorkflowStageExecutionMutation) WhereP added in v0.4.0

func (m *WorkflowStageExecutionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowStageExecutionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowStageExecutionMutation) WorkflowExecutionCleared added in v0.4.0

func (m *WorkflowStageExecutionMutation) WorkflowExecutionCleared() bool

WorkflowExecutionCleared reports if the "workflow_execution" edge to the WorkflowExecution entity was cleared.

func (*WorkflowStageExecutionMutation) WorkflowExecutionID added in v0.4.0

func (m *WorkflowStageExecutionMutation) WorkflowExecutionID() (r object.ID, exists bool)

WorkflowExecutionID returns the value of the "workflow_execution_id" field in the mutation.

func (*WorkflowStageExecutionMutation) WorkflowExecutionIDs added in v0.4.0

func (m *WorkflowStageExecutionMutation) WorkflowExecutionIDs() (ids []object.ID)

WorkflowExecutionIDs returns the "workflow_execution" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorkflowExecutionID instead. It exists only for internal usage by the builders.

func (*WorkflowStageExecutionMutation) WorkflowID added in v0.4.0

func (m *WorkflowStageExecutionMutation) WorkflowID() (r object.ID, exists bool)

WorkflowID returns the value of the "workflow_id" field in the mutation.

func (*WorkflowStageExecutionMutation) WorkflowStageID added in v0.4.0

func (m *WorkflowStageExecutionMutation) WorkflowStageID() (r object.ID, exists bool)

WorkflowStageID returns the value of the "workflow_stage_id" field in the mutation.

type WorkflowStageExecutionOutput added in v0.4.0

type WorkflowStageExecutionOutput struct {
	ID              object.ID         `json:"id,omitempty"`
	Name            string            `json:"name,omitempty"`
	Description     string            `json:"description,omitempty"`
	Labels          map[string]string `json:"labels,omitempty"`
	CreateTime      *time.Time        `json:"createTime,omitempty"`
	UpdateTime      *time.Time        `json:"updateTime,omitempty"`
	Status          status.Status     `json:"status,omitempty"`
	WorkflowID      object.ID         `json:"workflowID,omitempty"`
	WorkflowStageID object.ID         `json:"workflowStageID,omitempty"`
	ExecuteTime     time.Time         `json:"executeTime,omitempty"`

	Project           *ProjectOutput                 `json:"project,omitempty"`
	Steps             []*WorkflowStepExecutionOutput `json:"steps,omitempty"`
	WorkflowExecution *WorkflowExecutionOutput       `json:"workflowExecution,omitempty"`
}

WorkflowStageExecutionOutput holds the output of the WorkflowStageExecution entity.

func ExposeWorkflowStageExecution added in v0.4.0

func ExposeWorkflowStageExecution(_wse *WorkflowStageExecution) *WorkflowStageExecutionOutput

ExposeWorkflowStageExecution converts the WorkflowStageExecution to WorkflowStageExecutionOutput.

func ExposeWorkflowStageExecutions added in v0.4.0

func ExposeWorkflowStageExecutions(_wses []*WorkflowStageExecution) []*WorkflowStageExecutionOutput

ExposeWorkflowStageExecutions converts the WorkflowStageExecution slice to WorkflowStageExecutionOutput pointer slice.

type WorkflowStageExecutionPatchInput added in v0.5.0

type WorkflowStageExecutionPatchInput struct {
	WorkflowStageExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `path:"-" query:"-" json:"status,omitempty"`
	// ID of the workflow that this workflow execution belongs to.
	WorkflowID object.ID `path:"-" query:"-" json:"workflowID,omitempty"`
	// ID of the workflow stage that this workflow stage execution belongs to.
	WorkflowStageID object.ID `path:"-" query:"-" json:"workflowStageID,omitempty"`
	// Time of the stage execution started.
	ExecuteTime time.Time `path:"-" query:"-" json:"executeTime,omitempty"`
	// Duration of the workflow stage execution.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Order of the workflow stage execution.
	Order int `path:"-" query:"-" json:"order,omitempty"`

	// Steps indicates replacing the stale WorkflowStepExecution entities.
	Steps []*WorkflowStepExecutionCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStageExecutionPatchInput holds the patch input of the WorkflowStageExecution entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageExecutionPatchInput) Model added in v0.5.0

Model returns the WorkflowStageExecution patched entity, after validating.

func (*WorkflowStageExecutionPatchInput) PatchModel added in v0.5.0

PatchModel returns the WorkflowStageExecution partition entity for patching.

func (*WorkflowStageExecutionPatchInput) SetGinContext added in v0.5.0

func (ic *WorkflowStageExecutionPatchInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStageExecutionPatchInput) SetModelClient added in v0.5.0

func (ic *WorkflowStageExecutionPatchInput) SetModelClient(cli *Client)

func (*WorkflowStageExecutionPatchInput) Validate added in v0.5.0

func (wsepi *WorkflowStageExecutionPatchInput) Validate() error

Validate checks the WorkflowStageExecutionPatchInput entity.

func (*WorkflowStageExecutionPatchInput) ValidateWith added in v0.5.0

func (wsepi *WorkflowStageExecutionPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionPatchInput entity with the given context and client set.

type WorkflowStageExecutionQuery added in v0.4.0

type WorkflowStageExecutionQuery struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionQuery is the builder for querying WorkflowStageExecution entities.

func (*WorkflowStageExecutionQuery) Aggregate added in v0.4.0

Aggregate returns a WorkflowStageExecutionSelect configured with the given aggregations.

func (*WorkflowStageExecutionQuery) All added in v0.4.0

All executes the query and returns a list of WorkflowStageExecutions.

func (*WorkflowStageExecutionQuery) AllX added in v0.4.0

AllX is like All, but panics if an error occurs.

func (*WorkflowStageExecutionQuery) Clone added in v0.4.0

Clone returns a duplicate of the WorkflowStageExecutionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorkflowStageExecutionQuery) Count added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorkflowStageExecutionQuery) CountX added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowStageExecutionQuery) ExecContext added in v0.4.0

func (c *WorkflowStageExecutionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecutionQuery) Exist added in v0.4.0

Exist returns true if the query has elements in the graph.

func (*WorkflowStageExecutionQuery) ExistX added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowStageExecutionQuery) First added in v0.4.0

First returns the first WorkflowStageExecution entity from the query. Returns a *NotFoundError when no WorkflowStageExecution was found.

func (*WorkflowStageExecutionQuery) FirstID added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first WorkflowStageExecution ID from the query. Returns a *NotFoundError when no WorkflowStageExecution ID was found.

func (*WorkflowStageExecutionQuery) FirstIDX added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowStageExecutionQuery) FirstX added in v0.4.0

FirstX is like First, but panics if an error occurs.

func (*WorkflowStageExecutionQuery) ForShare added in v0.4.0

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 (*WorkflowStageExecutionQuery) ForUpdate added in v0.4.0

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 (*WorkflowStageExecutionQuery) GroupBy added in v0.4.0

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.WorkflowStageExecution.Query().
	GroupBy(workflowstageexecution.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*WorkflowStageExecutionQuery) IDs added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of WorkflowStageExecution IDs.

func (*WorkflowStageExecutionQuery) IDsX added in v0.4.0

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowStageExecutionQuery) Limit added in v0.4.0

Limit the number of records to be returned by this query.

func (*WorkflowStageExecutionQuery) Modify added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowStageExecutionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowStageExecutionQuery) Offset added in v0.4.0

Offset to start from.

func (*WorkflowStageExecutionQuery) Only added in v0.4.0

Only returns a single WorkflowStageExecution entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowStageExecution entity is found. Returns a *NotFoundError when no WorkflowStageExecution entities are found.

func (*WorkflowStageExecutionQuery) OnlyID added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only WorkflowStageExecution ID in the query. Returns a *NotSingularError when more than one WorkflowStageExecution ID is found. Returns a *NotFoundError when no entities are found.

func (*WorkflowStageExecutionQuery) OnlyIDX added in v0.4.0

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowStageExecutionQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowStageExecutionQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*WorkflowStageExecutionQuery) QueryContext added in v0.4.0

func (c *WorkflowStageExecutionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecutionQuery) QueryProject added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*WorkflowStageExecutionQuery) QuerySteps added in v0.4.0

QuerySteps chains the current query on the "steps" edge.

func (*WorkflowStageExecutionQuery) QueryWorkflowExecution added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) QueryWorkflowExecution() *WorkflowExecutionQuery

QueryWorkflowExecution chains the current query on the "workflow_execution" edge.

func (*WorkflowStageExecutionQuery) Select added in v0.4.0

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.WorkflowStageExecution.Query().
	Select(workflowstageexecution.FieldName).
	Scan(ctx, &v)

func (*WorkflowStageExecutionQuery) Unique added in v0.4.0

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 (*WorkflowStageExecutionQuery) Where added in v0.4.0

Where adds a new predicate for the WorkflowStageExecutionQuery builder.

func (*WorkflowStageExecutionQuery) WhereP added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowStageExecutionQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowStageExecutionQuery) WithProject added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) WithProject(opts ...func(*ProjectQuery)) *WorkflowStageExecutionQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowStageExecutionQuery) WithSteps added in v0.4.0

WithSteps tells the query-builder to eager-load the nodes that are connected to the "steps" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowStageExecutionQuery) WithWorkflowExecution added in v0.4.0

func (wseq *WorkflowStageExecutionQuery) WithWorkflowExecution(opts ...func(*WorkflowExecutionQuery)) *WorkflowStageExecutionQuery

WithWorkflowExecution tells the query-builder to eager-load the nodes that are connected to the "workflow_execution" edge. The optional arguments are used to configure the query builder of the edge.

type WorkflowStageExecutionQueryInput added in v0.4.0

type WorkflowStageExecutionQueryInput struct {

	// WorkflowExecution indicates to query WorkflowStageExecution entity MUST under the WorkflowExecution route.
	WorkflowExecution *WorkflowExecutionQueryInput `path:",inline" query:"-" json:"workflowExecution"`

	// Refer holds the route path reference of the WorkflowStageExecution entity.
	Refer *object.Refer `path:"workflowstageexecution,default=" query:"-" json:"-"`
	// ID of the WorkflowStageExecution entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

WorkflowStageExecutionQueryInput holds the query input of the WorkflowStageExecution entity, please tags with `path:",inline"` if embedding.

func (*WorkflowStageExecutionQueryInput) Model added in v0.4.0

Model returns the WorkflowStageExecution entity for querying, after validating.

func (*WorkflowStageExecutionQueryInput) SetGinContext added in v0.4.0

func (ic *WorkflowStageExecutionQueryInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStageExecutionQueryInput) SetModelClient added in v0.4.0

func (ic *WorkflowStageExecutionQueryInput) SetModelClient(cli *Client)

func (*WorkflowStageExecutionQueryInput) Validate added in v0.4.0

func (wseqi *WorkflowStageExecutionQueryInput) Validate() error

Validate checks the WorkflowStageExecutionQueryInput entity.

func (*WorkflowStageExecutionQueryInput) ValidateWith added in v0.4.0

func (wseqi *WorkflowStageExecutionQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionQueryInput entity with the given context and client set.

type WorkflowStageExecutionQueryInputs added in v0.4.0

type WorkflowStageExecutionQueryInputs struct {

	// WorkflowExecution indicates to query WorkflowStageExecution entity MUST under the WorkflowExecution route.
	WorkflowExecution *WorkflowExecutionQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

WorkflowStageExecutionQueryInputs holds the query input of the WorkflowStageExecution entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*WorkflowStageExecutionQueryInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStageExecutionQueryInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStageExecutionQueryInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStageExecutionQueryInputs) SetModelClient(cli *Client)

func (*WorkflowStageExecutionQueryInputs) Validate added in v0.4.0

func (wseqi *WorkflowStageExecutionQueryInputs) Validate() error

Validate checks the WorkflowStageExecutionQueryInputs entity.

func (*WorkflowStageExecutionQueryInputs) ValidateWith added in v0.4.0

func (wseqi *WorkflowStageExecutionQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionQueryInputs entity with the given context and client set.

type WorkflowStageExecutionSelect added in v0.4.0

type WorkflowStageExecutionSelect struct {
	*WorkflowStageExecutionQuery
	// contains filtered or unexported fields
}

WorkflowStageExecutionSelect is the builder for selecting fields of WorkflowStageExecution entities.

func (*WorkflowStageExecutionSelect) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowStageExecutionSelect) Bool added in v0.4.0

func (s *WorkflowStageExecutionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionSelect) BoolX added in v0.4.0

func (s *WorkflowStageExecutionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowStageExecutionSelect) Bools added in v0.4.0

func (s *WorkflowStageExecutionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionSelect) BoolsX added in v0.4.0

func (s *WorkflowStageExecutionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (WorkflowStageExecutionSelect) ExecContext added in v0.4.0

func (c WorkflowStageExecutionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecutionSelect) Float64 added in v0.4.0

func (s *WorkflowStageExecutionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionSelect) Float64X added in v0.4.0

func (s *WorkflowStageExecutionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowStageExecutionSelect) Float64s added in v0.4.0

func (s *WorkflowStageExecutionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionSelect) Float64sX added in v0.4.0

func (s *WorkflowStageExecutionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowStageExecutionSelect) Int added in v0.4.0

func (s *WorkflowStageExecutionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionSelect) IntX added in v0.4.0

func (s *WorkflowStageExecutionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowStageExecutionSelect) Ints added in v0.4.0

func (s *WorkflowStageExecutionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionSelect) IntsX added in v0.4.0

func (s *WorkflowStageExecutionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowStageExecutionSelect) Modify added in v0.4.0

func (wses *WorkflowStageExecutionSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowStageExecutionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (WorkflowStageExecutionSelect) QueryContext added in v0.4.0

func (c WorkflowStageExecutionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecutionSelect) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*WorkflowStageExecutionSelect) ScanX added in v0.4.0

func (s *WorkflowStageExecutionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowStageExecutionSelect) String added in v0.4.0

func (s *WorkflowStageExecutionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionSelect) StringX added in v0.4.0

func (s *WorkflowStageExecutionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowStageExecutionSelect) Strings added in v0.4.0

func (s *WorkflowStageExecutionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowStageExecutionSelect) StringsX added in v0.4.0

func (s *WorkflowStageExecutionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowStageExecutionUpdate added in v0.4.0

type WorkflowStageExecutionUpdate struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionUpdate is the builder for updating WorkflowStageExecution entities.

func (*WorkflowStageExecutionUpdate) AddDuration added in v0.4.0

AddDuration adds i to the "duration" field.

func (*WorkflowStageExecutionUpdate) AddOrder added in v0.4.0

AddOrder adds i to the "order" field.

func (*WorkflowStageExecutionUpdate) AddStepIDs added in v0.4.0

AddStepIDs adds the "steps" edge to the WorkflowStepExecution entity by IDs.

func (*WorkflowStageExecutionUpdate) AddSteps added in v0.4.0

AddSteps adds the "steps" edges to the WorkflowStepExecution entity.

func (*WorkflowStageExecutionUpdate) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageExecutionUpdate) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowStageExecutionUpdate) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStageExecutionUpdate) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageExecutionUpdate) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStageExecutionUpdate) ClearSteps added in v0.4.0

ClearSteps clears all "steps" edges to the WorkflowStepExecution entity.

func (*WorkflowStageExecutionUpdate) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStageExecutionUpdate) ExecContext added in v0.4.0

func (c *WorkflowStageExecutionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecutionUpdate) ExecX added in v0.4.0

func (wseu *WorkflowStageExecutionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageExecutionUpdate) Modify added in v0.4.0

func (wseu *WorkflowStageExecutionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowStageExecutionUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowStageExecutionUpdate) Mutation added in v0.4.0

Mutation returns the WorkflowStageExecutionMutation object of the builder.

func (*WorkflowStageExecutionUpdate) QueryContext added in v0.4.0

func (c *WorkflowStageExecutionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecutionUpdate) RemoveStepIDs added in v0.4.0

RemoveStepIDs removes the "steps" edge to WorkflowStepExecution entities by IDs.

func (*WorkflowStageExecutionUpdate) RemoveSteps added in v0.4.0

RemoveSteps removes "steps" edges to WorkflowStepExecution entities.

func (*WorkflowStageExecutionUpdate) Save added in v0.4.0

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorkflowStageExecutionUpdate) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStageExecutionUpdate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStageExecutionUpdate) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStageExecutionUpdate) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStageExecutionUpdate) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStageExecutionUpdate) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStageExecutionUpdate) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageExecutionUpdate) SetNillableDescription added in v0.4.0

func (wseu *WorkflowStageExecutionUpdate) SetNillableDescription(s *string) *WorkflowStageExecutionUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStageExecutionUpdate) SetNillableDuration added in v0.4.0

func (wseu *WorkflowStageExecutionUpdate) SetNillableDuration(i *int) *WorkflowStageExecutionUpdate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*WorkflowStageExecutionUpdate) SetNillableExecuteTime added in v0.4.0

func (wseu *WorkflowStageExecutionUpdate) SetNillableExecuteTime(t *time.Time) *WorkflowStageExecutionUpdate

SetNillableExecuteTime sets the "execute_time" field if the given value is not nil.

func (*WorkflowStageExecutionUpdate) SetNillableOrder added in v0.4.0

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStageExecutionUpdate) SetNillableStatus added in v0.4.0

SetNillableStatus sets the "status" field if the given value is not nil.

func (*WorkflowStageExecutionUpdate) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageExecutionUpdate) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStageExecutionUpdate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageExecutionUpdate) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageExecutionUpdate builder.

type WorkflowStageExecutionUpdateInput added in v0.4.0

type WorkflowStageExecutionUpdateInput struct {
	WorkflowStageExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`

	// Steps indicates replacing the stale WorkflowStepExecution entities.
	Steps []*WorkflowStepExecutionCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
}

WorkflowStageExecutionUpdateInput holds the modification input of the WorkflowStageExecution entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageExecutionUpdateInput) Model added in v0.4.0

Model returns the WorkflowStageExecution entity for modifying, after validating.

func (*WorkflowStageExecutionUpdateInput) SetGinContext added in v0.4.0

func (ic *WorkflowStageExecutionUpdateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStageExecutionUpdateInput) SetModelClient added in v0.4.0

func (ic *WorkflowStageExecutionUpdateInput) SetModelClient(cli *Client)

func (*WorkflowStageExecutionUpdateInput) Validate added in v0.4.0

func (wseui *WorkflowStageExecutionUpdateInput) Validate() error

Validate checks the WorkflowStageExecutionUpdateInput entity.

func (*WorkflowStageExecutionUpdateInput) ValidateWith added in v0.4.0

func (wseui *WorkflowStageExecutionUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionUpdateInput entity with the given context and client set.

type WorkflowStageExecutionUpdateInputs added in v0.4.0

type WorkflowStageExecutionUpdateInputs struct {

	// WorkflowExecution indicates to update WorkflowStageExecution entity MUST under the WorkflowExecution route.
	WorkflowExecution *WorkflowExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStageExecutionUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStageExecutionUpdateInputs holds the modification input of the WorkflowStageExecution entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageExecutionUpdateInputs) IDs added in v0.4.0

IDs returns the ID list of the WorkflowStageExecution entities for modifying, after validating.

func (*WorkflowStageExecutionUpdateInputs) Model added in v0.4.0

Model returns the WorkflowStageExecution entities for modifying, after validating.

func (*WorkflowStageExecutionUpdateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStageExecutionUpdateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStageExecutionUpdateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStageExecutionUpdateInputs) SetModelClient(cli *Client)

func (*WorkflowStageExecutionUpdateInputs) Validate added in v0.4.0

func (wseui *WorkflowStageExecutionUpdateInputs) Validate() error

Validate checks the WorkflowStageExecutionUpdateInputs entity.

func (*WorkflowStageExecutionUpdateInputs) ValidateWith added in v0.4.0

func (wseui *WorkflowStageExecutionUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionUpdateInputs entity with the given context and client set.

type WorkflowStageExecutionUpdateInputsItem added in v0.4.0

type WorkflowStageExecutionUpdateInputsItem struct {
	// ID of the WorkflowStageExecution entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`

	// Steps indicates replacing the stale WorkflowStepExecution entities.
	Steps []*WorkflowStepExecutionCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
}

WorkflowStageExecutionUpdateInputs holds the modification input item of the WorkflowStageExecution entities.

func (*WorkflowStageExecutionUpdateInputsItem) ValidateWith added in v0.4.0

func (wseui *WorkflowStageExecutionUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageExecutionUpdateInputsItem entity with the given context and client set.

type WorkflowStageExecutionUpdateOne added in v0.4.0

type WorkflowStageExecutionUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionUpdateOne is the builder for updating a single WorkflowStageExecution entity.

func (*WorkflowStageExecutionUpdateOne) AddDuration added in v0.4.0

AddDuration adds i to the "duration" field.

func (*WorkflowStageExecutionUpdateOne) AddOrder added in v0.4.0

AddOrder adds i to the "order" field.

func (*WorkflowStageExecutionUpdateOne) AddStepIDs added in v0.4.0

AddStepIDs adds the "steps" edge to the WorkflowStepExecution entity by IDs.

func (*WorkflowStageExecutionUpdateOne) AddSteps added in v0.4.0

AddSteps adds the "steps" edges to the WorkflowStepExecution entity.

func (*WorkflowStageExecutionUpdateOne) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageExecutionUpdateOne) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowStageExecutionUpdateOne) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStageExecutionUpdateOne) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageExecutionUpdateOne) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStageExecutionUpdateOne) ClearSteps added in v0.4.0

ClearSteps clears all "steps" edges to the WorkflowStepExecution entity.

func (*WorkflowStageExecutionUpdateOne) Exec added in v0.4.0

Exec executes the query on the entity.

func (*WorkflowStageExecutionUpdateOne) ExecContext added in v0.4.0

func (c *WorkflowStageExecutionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageExecutionUpdateOne) ExecE added in v0.4.0

func (wseuo *WorkflowStageExecutionUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStageExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*WorkflowStageExecutionUpdateOne) ExecEX added in v0.4.0

func (wseuo *WorkflowStageExecutionUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStageExecution) error)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageExecutionUpdateOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageExecutionUpdateOne) Modify added in v0.4.0

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowStageExecutionUpdateOne) Mutation added in v0.4.0

Mutation returns the WorkflowStageExecutionMutation object of the builder.

func (*WorkflowStageExecutionUpdateOne) QueryContext added in v0.4.0

func (c *WorkflowStageExecutionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageExecutionUpdateOne) RemoveStepIDs added in v0.4.0

RemoveStepIDs removes the "steps" edge to WorkflowStepExecution entities by IDs.

func (*WorkflowStageExecutionUpdateOne) RemoveSteps added in v0.4.0

RemoveSteps removes "steps" edges to WorkflowStepExecution entities.

func (*WorkflowStageExecutionUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated WorkflowStageExecution entity.

func (*WorkflowStageExecutionUpdateOne) SaveE added in v0.4.0

SaveE calls the given function after updated the WorkflowStageExecution entity, which is always good for cascading update operations.

func (*WorkflowStageExecutionUpdateOne) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStageExecutionUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStageExecutionUpdateOne) Select added in v0.4.0

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WorkflowStageExecutionUpdateOne) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStageExecutionUpdateOne) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStageExecutionUpdateOne) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStageExecutionUpdateOne) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStageExecutionUpdateOne) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStageExecutionUpdateOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageExecutionUpdateOne) SetNillableDescription added in v0.4.0

func (wseuo *WorkflowStageExecutionUpdateOne) SetNillableDescription(s *string) *WorkflowStageExecutionUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStageExecutionUpdateOne) SetNillableDuration added in v0.4.0

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*WorkflowStageExecutionUpdateOne) SetNillableExecuteTime added in v0.4.0

func (wseuo *WorkflowStageExecutionUpdateOne) SetNillableExecuteTime(t *time.Time) *WorkflowStageExecutionUpdateOne

SetNillableExecuteTime sets the "execute_time" field if the given value is not nil.

func (*WorkflowStageExecutionUpdateOne) SetNillableOrder added in v0.4.0

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStageExecutionUpdateOne) SetNillableStatus added in v0.4.0

SetNillableStatus sets the "status" field if the given value is not nil.

func (*WorkflowStageExecutionUpdateOne) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageExecutionUpdateOne) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStageExecutionUpdateOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageExecutionUpdateOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageExecutionUpdate builder.

type WorkflowStageExecutionUpsert added in v0.4.0

type WorkflowStageExecutionUpsert struct {
	*sql.UpdateSet
}

WorkflowStageExecutionUpsert is the "OnConflict" setter.

func (*WorkflowStageExecutionUpsert) AddDuration added in v0.4.0

AddDuration adds v to the "duration" field.

func (*WorkflowStageExecutionUpsert) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStageExecutionUpsert) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageExecutionUpsert) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowStageExecutionUpsert) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStageExecutionUpsert) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageExecutionUpsert) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStageExecutionUpsert) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStageExecutionUpsert) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStageExecutionUpsert) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStageExecutionUpsert) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStageExecutionUpsert) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageExecutionUpsert) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageExecutionUpsert) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStageExecutionUpsert) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageExecutionUpsert) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsert) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsert) UpdateDuration added in v0.4.0

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsert) UpdateExecuteTime added in v0.4.0

UpdateExecuteTime sets the "execute_time" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsert) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsert) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsert) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsert) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStageExecutionUpsertBulk added in v0.4.0

type WorkflowStageExecutionUpsertBulk struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionUpsertBulk is the builder for "upsert"-ing a bulk of WorkflowStageExecution nodes.

func (*WorkflowStageExecutionUpsertBulk) AddDuration added in v0.4.0

AddDuration adds v to the "duration" field.

func (*WorkflowStageExecutionUpsertBulk) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStageExecutionUpsertBulk) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageExecutionUpsertBulk) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowStageExecutionUpsertBulk) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStageExecutionUpsertBulk) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageExecutionUpsertBulk) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStageExecutionUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowStageExecutionUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStageExecutionUpsertBulk) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStageExecutionUpsertBulk) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStageExecutionUpsertBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageExecutionUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowStageExecution.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*WorkflowStageExecutionUpsertBulk) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStageExecutionUpsertBulk) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStageExecutionUpsertBulk) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStageExecutionUpsertBulk) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStageExecutionUpsertBulk) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageExecutionUpsertBulk) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageExecutionUpsertBulk) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStageExecutionUpsertBulk) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageExecutionUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowStageExecutionCreateBulk.OnConflict documentation for more info.

func (*WorkflowStageExecutionUpsertBulk) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertBulk) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertBulk) UpdateDuration added in v0.4.0

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertBulk) UpdateExecuteTime added in v0.4.0

UpdateExecuteTime sets the "execute_time" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertBulk) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertBulk) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.WorkflowStageExecution.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowstageexecution.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowStageExecutionUpsertBulk) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertBulk) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertBulk) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStageExecutionUpsertOne added in v0.4.0

type WorkflowStageExecutionUpsertOne struct {
	// contains filtered or unexported fields
}

WorkflowStageExecutionUpsertOne is the builder for "upsert"-ing

one WorkflowStageExecution node.

func (*WorkflowStageExecutionUpsertOne) AddDuration added in v0.4.0

AddDuration adds v to the "duration" field.

func (*WorkflowStageExecutionUpsertOne) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStageExecutionUpsertOne) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageExecutionUpsertOne) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowStageExecutionUpsertOne) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStageExecutionUpsertOne) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageExecutionUpsertOne) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStageExecutionUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowStageExecutionUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStageExecutionUpsertOne) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStageExecutionUpsertOne) ExecEX added in v0.4.0

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStageExecutionUpsertOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageExecutionUpsertOne) ID added in v0.4.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*WorkflowStageExecutionUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*WorkflowStageExecutionUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowStageExecution.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*WorkflowStageExecutionUpsertOne) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStageExecutionUpsertOne) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStageExecutionUpsertOne) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStageExecutionUpsertOne) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStageExecutionUpsertOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageExecutionUpsertOne) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageExecutionUpsertOne) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStageExecutionUpsertOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageExecutionUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowStageExecutionCreate.OnConflict documentation for more info.

func (*WorkflowStageExecutionUpsertOne) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertOne) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertOne) UpdateDuration added in v0.4.0

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertOne) UpdateExecuteTime added in v0.4.0

UpdateExecuteTime sets the "execute_time" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertOne) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertOne) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.WorkflowStageExecution.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowstageexecution.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowStageExecutionUpsertOne) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertOne) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*WorkflowStageExecutionUpsertOne) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStageExecutions added in v0.4.0

type WorkflowStageExecutions []*WorkflowStageExecution

WorkflowStageExecutions is a parsable slice of WorkflowStageExecution.

func (WorkflowStageExecutions) View added in v0.4.0

View returns the output of WorkflowStageExecution entities.

type WorkflowStageGroupBy added in v0.4.0

type WorkflowStageGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowStageGroupBy is the group-by builder for WorkflowStage entities.

func (*WorkflowStageGroupBy) Aggregate added in v0.4.0

func (wsgb *WorkflowStageGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowStageGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowStageGroupBy) Bool added in v0.4.0

func (s *WorkflowStageGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowStageGroupBy) BoolX added in v0.4.0

func (s *WorkflowStageGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowStageGroupBy) Bools added in v0.4.0

func (s *WorkflowStageGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowStageGroupBy) BoolsX added in v0.4.0

func (s *WorkflowStageGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowStageGroupBy) Float64 added in v0.4.0

func (s *WorkflowStageGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowStageGroupBy) Float64X added in v0.4.0

func (s *WorkflowStageGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowStageGroupBy) Float64s added in v0.4.0

func (s *WorkflowStageGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowStageGroupBy) Float64sX added in v0.4.0

func (s *WorkflowStageGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowStageGroupBy) Int added in v0.4.0

func (s *WorkflowStageGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowStageGroupBy) IntX added in v0.4.0

func (s *WorkflowStageGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowStageGroupBy) Ints added in v0.4.0

func (s *WorkflowStageGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowStageGroupBy) IntsX added in v0.4.0

func (s *WorkflowStageGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowStageGroupBy) Scan added in v0.4.0

func (wsgb *WorkflowStageGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowStageGroupBy) ScanX added in v0.4.0

func (s *WorkflowStageGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowStageGroupBy) String added in v0.4.0

func (s *WorkflowStageGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowStageGroupBy) StringX added in v0.4.0

func (s *WorkflowStageGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowStageGroupBy) Strings added in v0.4.0

func (s *WorkflowStageGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowStageGroupBy) StringsX added in v0.4.0

func (s *WorkflowStageGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowStageMutation added in v0.4.0

type WorkflowStageMutation struct {
	// contains filtered or unexported fields
}

WorkflowStageMutation represents an operation that mutates the WorkflowStage nodes in the graph.

func (*WorkflowStageMutation) AddField added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) AddOrder added in v0.4.0

func (m *WorkflowStageMutation) AddOrder(i int)

AddOrder adds i to the "order" field.

func (*WorkflowStageMutation) AddStepIDs added in v0.4.0

func (m *WorkflowStageMutation) AddStepIDs(ids ...object.ID)

AddStepIDs adds the "steps" edge to the WorkflowStep entity by ids.

func (*WorkflowStageMutation) AddedEdges added in v0.4.0

func (m *WorkflowStageMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowStageMutation) AddedField added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) AddedFields added in v0.4.0

func (m *WorkflowStageMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowStageMutation) AddedIDs added in v0.4.0

func (m *WorkflowStageMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorkflowStageMutation) AddedOrder added in v0.4.0

func (m *WorkflowStageMutation) AddedOrder() (r int, exists bool)

AddedOrder returns the value that was added to the "order" field in this mutation.

func (*WorkflowStageMutation) Annotations added in v0.4.0

func (m *WorkflowStageMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*WorkflowStageMutation) AnnotationsCleared added in v0.4.0

func (m *WorkflowStageMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*WorkflowStageMutation) AppendDependencies added in v0.4.0

func (m *WorkflowStageMutation) AppendDependencies(o []object.ID)

AppendDependencies adds o to the "dependencies" field.

func (*WorkflowStageMutation) AppendedDependencies added in v0.4.0

func (m *WorkflowStageMutation) AppendedDependencies() ([]object.ID, bool)

AppendedDependencies returns the list of values that were appended to the "dependencies" field in this mutation.

func (*WorkflowStageMutation) ClearAnnotations added in v0.4.0

func (m *WorkflowStageMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageMutation) ClearDescription added in v0.4.0

func (m *WorkflowStageMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*WorkflowStageMutation) ClearEdge added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) ClearField added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) ClearLabels added in v0.4.0

func (m *WorkflowStageMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageMutation) ClearProject added in v0.4.0

func (m *WorkflowStageMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*WorkflowStageMutation) ClearSteps added in v0.4.0

func (m *WorkflowStageMutation) ClearSteps()

ClearSteps clears the "steps" edge to the WorkflowStep entity.

func (*WorkflowStageMutation) ClearWorkflow added in v0.4.0

func (m *WorkflowStageMutation) ClearWorkflow()

ClearWorkflow clears the "workflow" edge to the Workflow entity.

func (*WorkflowStageMutation) ClearedEdges added in v0.4.0

func (m *WorkflowStageMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowStageMutation) ClearedFields added in v0.4.0

func (m *WorkflowStageMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowStageMutation) Client added in v0.4.0

func (m WorkflowStageMutation) 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 (*WorkflowStageMutation) CreateTime added in v0.4.0

func (m *WorkflowStageMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*WorkflowStageMutation) Dependencies added in v0.4.0

func (m *WorkflowStageMutation) Dependencies() (r []object.ID, exists bool)

Dependencies returns the value of the "dependencies" field in the mutation.

func (*WorkflowStageMutation) Description added in v0.4.0

func (m *WorkflowStageMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*WorkflowStageMutation) DescriptionCleared added in v0.4.0

func (m *WorkflowStageMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*WorkflowStageMutation) EdgeCleared added in v0.4.0

func (m *WorkflowStageMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorkflowStageMutation) ExecContext added in v0.4.0

func (c *WorkflowStageMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageMutation) Field added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) FieldCleared added in v0.4.0

func (m *WorkflowStageMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorkflowStageMutation) Fields added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) ID added in v0.4.0

func (m *WorkflowStageMutation) ID() (id object.ID, 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 (*WorkflowStageMutation) IDs added in v0.4.0

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 (*WorkflowStageMutation) Labels added in v0.4.0

func (m *WorkflowStageMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*WorkflowStageMutation) LabelsCleared added in v0.4.0

func (m *WorkflowStageMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*WorkflowStageMutation) Name added in v0.4.0

func (m *WorkflowStageMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WorkflowStageMutation) OldAnnotations added in v0.4.0

func (m *WorkflowStageMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) OldCreateTime added in v0.4.0

func (m *WorkflowStageMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) OldDependencies added in v0.4.0

func (m *WorkflowStageMutation) OldDependencies(ctx context.Context) (v []object.ID, err error)

OldDependencies returns the old "dependencies" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) OldDescription added in v0.4.0

func (m *WorkflowStageMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) OldField added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) OldLabels added in v0.4.0

func (m *WorkflowStageMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) OldName added in v0.4.0

func (m *WorkflowStageMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) OldOrder added in v0.4.0

func (m *WorkflowStageMutation) OldOrder(ctx context.Context) (v int, err error)

OldOrder returns the old "order" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) OldProjectID added in v0.4.0

func (m *WorkflowStageMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) OldUpdateTime added in v0.4.0

func (m *WorkflowStageMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) OldWorkflowID added in v0.4.0

func (m *WorkflowStageMutation) OldWorkflowID(ctx context.Context) (v object.ID, err error)

OldWorkflowID returns the old "workflow_id" field's value of the WorkflowStage entity. If the WorkflowStage 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 (*WorkflowStageMutation) Op added in v0.4.0

func (m *WorkflowStageMutation) Op() Op

Op returns the operation name.

func (*WorkflowStageMutation) Order added in v0.4.0

func (m *WorkflowStageMutation) Order() (r int, exists bool)

Order returns the value of the "order" field in the mutation.

func (*WorkflowStageMutation) ProjectCleared added in v0.4.0

func (m *WorkflowStageMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*WorkflowStageMutation) ProjectID added in v0.4.0

func (m *WorkflowStageMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*WorkflowStageMutation) ProjectIDs added in v0.4.0

func (m *WorkflowStageMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*WorkflowStageMutation) QueryContext added in v0.4.0

func (c *WorkflowStageMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageMutation) RemoveStepIDs added in v0.4.0

func (m *WorkflowStageMutation) RemoveStepIDs(ids ...object.ID)

RemoveStepIDs removes the "steps" edge to the WorkflowStep entity by IDs.

func (*WorkflowStageMutation) RemovedEdges added in v0.4.0

func (m *WorkflowStageMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowStageMutation) RemovedIDs added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) RemovedStepsIDs added in v0.4.0

func (m *WorkflowStageMutation) RemovedStepsIDs() (ids []object.ID)

RemovedSteps returns the removed IDs of the "steps" edge to the WorkflowStep entity.

func (*WorkflowStageMutation) ResetAnnotations added in v0.4.0

func (m *WorkflowStageMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*WorkflowStageMutation) ResetCreateTime added in v0.4.0

func (m *WorkflowStageMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*WorkflowStageMutation) ResetDependencies added in v0.4.0

func (m *WorkflowStageMutation) ResetDependencies()

ResetDependencies resets all changes to the "dependencies" field.

func (*WorkflowStageMutation) ResetDescription added in v0.4.0

func (m *WorkflowStageMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*WorkflowStageMutation) ResetEdge added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) ResetField added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) ResetLabels added in v0.4.0

func (m *WorkflowStageMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*WorkflowStageMutation) ResetName added in v0.4.0

func (m *WorkflowStageMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WorkflowStageMutation) ResetOrder added in v0.4.0

func (m *WorkflowStageMutation) ResetOrder()

ResetOrder resets all changes to the "order" field.

func (*WorkflowStageMutation) ResetProject added in v0.4.0

func (m *WorkflowStageMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*WorkflowStageMutation) ResetProjectID added in v0.4.0

func (m *WorkflowStageMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*WorkflowStageMutation) ResetSteps added in v0.4.0

func (m *WorkflowStageMutation) ResetSteps()

ResetSteps resets all changes to the "steps" edge.

func (*WorkflowStageMutation) ResetUpdateTime added in v0.4.0

func (m *WorkflowStageMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*WorkflowStageMutation) ResetWorkflow added in v0.4.0

func (m *WorkflowStageMutation) ResetWorkflow()

ResetWorkflow resets all changes to the "workflow" edge.

func (*WorkflowStageMutation) ResetWorkflowID added in v0.4.0

func (m *WorkflowStageMutation) ResetWorkflowID()

ResetWorkflowID resets all changes to the "workflow_id" field.

func (*WorkflowStageMutation) SetAnnotations added in v0.4.0

func (m *WorkflowStageMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*WorkflowStageMutation) SetCreateTime added in v0.4.0

func (m *WorkflowStageMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*WorkflowStageMutation) SetDependencies added in v0.4.0

func (m *WorkflowStageMutation) SetDependencies(o []object.ID)

SetDependencies sets the "dependencies" field.

func (*WorkflowStageMutation) SetDescription added in v0.4.0

func (m *WorkflowStageMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*WorkflowStageMutation) SetField added in v0.4.0

func (m *WorkflowStageMutation) 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 (*WorkflowStageMutation) SetID added in v0.4.0

func (m *WorkflowStageMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowStage entities.

func (*WorkflowStageMutation) SetLabels added in v0.4.0

func (m *WorkflowStageMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*WorkflowStageMutation) SetName added in v0.4.0

func (m *WorkflowStageMutation) SetName(s string)

SetName sets the "name" field.

func (*WorkflowStageMutation) SetOp added in v0.4.0

func (m *WorkflowStageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowStageMutation) SetOrder added in v0.4.0

func (m *WorkflowStageMutation) SetOrder(i int)

SetOrder sets the "order" field.

func (*WorkflowStageMutation) SetProjectID added in v0.4.0

func (m *WorkflowStageMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*WorkflowStageMutation) SetUpdateTime added in v0.4.0

func (m *WorkflowStageMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageMutation) SetWorkflowID added in v0.4.0

func (m *WorkflowStageMutation) SetWorkflowID(o object.ID)

SetWorkflowID sets the "workflow_id" field.

func (*WorkflowStageMutation) StepsCleared added in v0.4.0

func (m *WorkflowStageMutation) StepsCleared() bool

StepsCleared reports if the "steps" edge to the WorkflowStep entity was cleared.

func (*WorkflowStageMutation) StepsIDs added in v0.4.0

func (m *WorkflowStageMutation) StepsIDs() (ids []object.ID)

StepsIDs returns the "steps" edge IDs in the mutation.

func (WorkflowStageMutation) Tx added in v0.4.0

func (m WorkflowStageMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorkflowStageMutation) Type added in v0.4.0

func (m *WorkflowStageMutation) Type() string

Type returns the node type of this mutation (WorkflowStage).

func (*WorkflowStageMutation) UpdateTime added in v0.4.0

func (m *WorkflowStageMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*WorkflowStageMutation) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageMutation builder.

func (*WorkflowStageMutation) WhereP added in v0.4.0

func (m *WorkflowStageMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowStageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowStageMutation) WorkflowCleared added in v0.4.0

func (m *WorkflowStageMutation) WorkflowCleared() bool

WorkflowCleared reports if the "workflow" edge to the Workflow entity was cleared.

func (*WorkflowStageMutation) WorkflowID added in v0.4.0

func (m *WorkflowStageMutation) WorkflowID() (r object.ID, exists bool)

WorkflowID returns the value of the "workflow_id" field in the mutation.

func (*WorkflowStageMutation) WorkflowIDs added in v0.4.0

func (m *WorkflowStageMutation) WorkflowIDs() (ids []object.ID)

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 WorkflowStageOutput added in v0.4.0

type WorkflowStageOutput struct {
	ID           object.ID         `json:"id,omitempty"`
	Name         string            `json:"name,omitempty"`
	Description  string            `json:"description,omitempty"`
	Labels       map[string]string `json:"labels,omitempty"`
	CreateTime   *time.Time        `json:"createTime,omitempty"`
	UpdateTime   *time.Time        `json:"updateTime,omitempty"`
	Dependencies []object.ID       `json:"dependencies,omitempty"`

	Project  *ProjectOutput        `json:"project,omitempty"`
	Steps    []*WorkflowStepOutput `json:"steps,omitempty"`
	Workflow *WorkflowOutput       `json:"workflow,omitempty"`
}

WorkflowStageOutput holds the output of the WorkflowStage entity.

func ExposeWorkflowStage added in v0.4.0

func ExposeWorkflowStage(_ws *WorkflowStage) *WorkflowStageOutput

ExposeWorkflowStage converts the WorkflowStage to WorkflowStageOutput.

func ExposeWorkflowStages added in v0.4.0

func ExposeWorkflowStages(_wss []*WorkflowStage) []*WorkflowStageOutput

ExposeWorkflowStages converts the WorkflowStage slice to WorkflowStageOutput pointer slice.

type WorkflowStagePatchInput added in v0.5.0

type WorkflowStagePatchInput struct {
	WorkflowStageQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// ID list of the workflow stages that this workflow stage depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies,omitempty"`
	// Order of the workflow stage.
	Order int `path:"-" query:"-" json:"order,omitempty"`

	// Steps indicates replacing the stale WorkflowStep entities.
	Steps []*WorkflowStepCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStagePatchInput holds the patch input of the WorkflowStage entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStagePatchInput) Model added in v0.5.0

func (wspi *WorkflowStagePatchInput) Model() *WorkflowStage

Model returns the WorkflowStage patched entity, after validating.

func (*WorkflowStagePatchInput) PatchModel added in v0.5.0

func (wspi *WorkflowStagePatchInput) PatchModel() *WorkflowStage

PatchModel returns the WorkflowStage partition entity for patching.

func (*WorkflowStagePatchInput) SetGinContext added in v0.5.0

func (ic *WorkflowStagePatchInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStagePatchInput) SetModelClient added in v0.5.0

func (ic *WorkflowStagePatchInput) SetModelClient(cli *Client)

func (*WorkflowStagePatchInput) Validate added in v0.5.0

func (wspi *WorkflowStagePatchInput) Validate() error

Validate checks the WorkflowStagePatchInput entity.

func (*WorkflowStagePatchInput) ValidateWith added in v0.5.0

func (wspi *WorkflowStagePatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStagePatchInput entity with the given context and client set.

type WorkflowStageQuery added in v0.4.0

type WorkflowStageQuery struct {
	// contains filtered or unexported fields
}

WorkflowStageQuery is the builder for querying WorkflowStage entities.

func (*WorkflowStageQuery) Aggregate added in v0.4.0

func (wsq *WorkflowStageQuery) Aggregate(fns ...AggregateFunc) *WorkflowStageSelect

Aggregate returns a WorkflowStageSelect configured with the given aggregations.

func (*WorkflowStageQuery) All added in v0.4.0

All executes the query and returns a list of WorkflowStages.

func (*WorkflowStageQuery) AllX added in v0.4.0

func (wsq *WorkflowStageQuery) AllX(ctx context.Context) []*WorkflowStage

AllX is like All, but panics if an error occurs.

func (*WorkflowStageQuery) Clone added in v0.4.0

func (wsq *WorkflowStageQuery) Clone() *WorkflowStageQuery

Clone returns a duplicate of the WorkflowStageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorkflowStageQuery) Count added in v0.4.0

func (wsq *WorkflowStageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorkflowStageQuery) CountX added in v0.4.0

func (wsq *WorkflowStageQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowStageQuery) ExecContext added in v0.4.0

func (c *WorkflowStageQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageQuery) Exist added in v0.4.0

func (wsq *WorkflowStageQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WorkflowStageQuery) ExistX added in v0.4.0

func (wsq *WorkflowStageQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowStageQuery) First added in v0.4.0

First returns the first WorkflowStage entity from the query. Returns a *NotFoundError when no WorkflowStage was found.

func (*WorkflowStageQuery) FirstID added in v0.4.0

func (wsq *WorkflowStageQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first WorkflowStage ID from the query. Returns a *NotFoundError when no WorkflowStage ID was found.

func (*WorkflowStageQuery) FirstIDX added in v0.4.0

func (wsq *WorkflowStageQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowStageQuery) FirstX added in v0.4.0

func (wsq *WorkflowStageQuery) FirstX(ctx context.Context) *WorkflowStage

FirstX is like First, but panics if an error occurs.

func (*WorkflowStageQuery) ForShare added in v0.4.0

func (wsq *WorkflowStageQuery) ForShare(opts ...sql.LockOption) *WorkflowStageQuery

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 (*WorkflowStageQuery) ForUpdate added in v0.4.0

func (wsq *WorkflowStageQuery) ForUpdate(opts ...sql.LockOption) *WorkflowStageQuery

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 (*WorkflowStageQuery) GroupBy added in v0.4.0

func (wsq *WorkflowStageQuery) GroupBy(field string, fields ...string) *WorkflowStageGroupBy

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.WorkflowStage.Query().
	GroupBy(workflowstage.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*WorkflowStageQuery) IDs added in v0.4.0

func (wsq *WorkflowStageQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of WorkflowStage IDs.

func (*WorkflowStageQuery) IDsX added in v0.4.0

func (wsq *WorkflowStageQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowStageQuery) Limit added in v0.4.0

func (wsq *WorkflowStageQuery) Limit(limit int) *WorkflowStageQuery

Limit the number of records to be returned by this query.

func (*WorkflowStageQuery) Modify added in v0.4.0

func (wsq *WorkflowStageQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowStageSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowStageQuery) Offset added in v0.4.0

func (wsq *WorkflowStageQuery) Offset(offset int) *WorkflowStageQuery

Offset to start from.

func (*WorkflowStageQuery) Only added in v0.4.0

Only returns a single WorkflowStage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowStage entity is found. Returns a *NotFoundError when no WorkflowStage entities are found.

func (*WorkflowStageQuery) OnlyID added in v0.4.0

func (wsq *WorkflowStageQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only WorkflowStage ID in the query. Returns a *NotSingularError when more than one WorkflowStage ID is found. Returns a *NotFoundError when no entities are found.

func (*WorkflowStageQuery) OnlyIDX added in v0.4.0

func (wsq *WorkflowStageQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowStageQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowStageQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*WorkflowStageQuery) QueryContext added in v0.4.0

func (c *WorkflowStageQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageQuery) QueryProject added in v0.4.0

func (wsq *WorkflowStageQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*WorkflowStageQuery) QuerySteps added in v0.4.0

func (wsq *WorkflowStageQuery) QuerySteps() *WorkflowStepQuery

QuerySteps chains the current query on the "steps" edge.

func (*WorkflowStageQuery) QueryWorkflow added in v0.4.0

func (wsq *WorkflowStageQuery) QueryWorkflow() *WorkflowQuery

QueryWorkflow chains the current query on the "workflow" edge.

func (*WorkflowStageQuery) Select added in v0.4.0

func (wsq *WorkflowStageQuery) Select(fields ...string) *WorkflowStageSelect

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.WorkflowStage.Query().
	Select(workflowstage.FieldName).
	Scan(ctx, &v)

func (*WorkflowStageQuery) Unique added in v0.4.0

func (wsq *WorkflowStageQuery) Unique(unique bool) *WorkflowStageQuery

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 (*WorkflowStageQuery) Where added in v0.4.0

Where adds a new predicate for the WorkflowStageQuery builder.

func (*WorkflowStageQuery) WhereP added in v0.4.0

func (wsq *WorkflowStageQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowStageQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowStageQuery) WithProject added in v0.4.0

func (wsq *WorkflowStageQuery) WithProject(opts ...func(*ProjectQuery)) *WorkflowStageQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowStageQuery) WithSteps added in v0.4.0

func (wsq *WorkflowStageQuery) WithSteps(opts ...func(*WorkflowStepQuery)) *WorkflowStageQuery

WithSteps tells the query-builder to eager-load the nodes that are connected to the "steps" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowStageQuery) WithWorkflow added in v0.4.0

func (wsq *WorkflowStageQuery) WithWorkflow(opts ...func(*WorkflowQuery)) *WorkflowStageQuery

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 WorkflowStageQueryInput added in v0.4.0

type WorkflowStageQueryInput struct {

	// Project indicates to query WorkflowStage entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project"`
	// Workflow indicates to query WorkflowStage entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"workflow"`

	// Refer holds the route path reference of the WorkflowStage entity.
	Refer *object.Refer `path:"workflowstage,default=" query:"-" json:"-"`
	// ID of the WorkflowStage entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

WorkflowStageQueryInput holds the query input of the WorkflowStage entity, please tags with `path:",inline"` if embedding.

func (*WorkflowStageQueryInput) Model added in v0.4.0

func (wsqi *WorkflowStageQueryInput) Model() *WorkflowStage

Model returns the WorkflowStage entity for querying, after validating.

func (*WorkflowStageQueryInput) SetGinContext added in v0.4.0

func (ic *WorkflowStageQueryInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStageQueryInput) SetModelClient added in v0.4.0

func (ic *WorkflowStageQueryInput) SetModelClient(cli *Client)

func (*WorkflowStageQueryInput) Validate added in v0.4.0

func (wsqi *WorkflowStageQueryInput) Validate() error

Validate checks the WorkflowStageQueryInput entity.

func (*WorkflowStageQueryInput) ValidateWith added in v0.4.0

func (wsqi *WorkflowStageQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageQueryInput entity with the given context and client set.

type WorkflowStageQueryInputs added in v0.4.0

type WorkflowStageQueryInputs struct {

	// Project indicates to query WorkflowStage entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to query WorkflowStage entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

WorkflowStageQueryInputs holds the query input of the WorkflowStage entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*WorkflowStageQueryInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStageQueryInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStageQueryInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStageQueryInputs) SetModelClient(cli *Client)

func (*WorkflowStageQueryInputs) Validate added in v0.4.0

func (wsqi *WorkflowStageQueryInputs) Validate() error

Validate checks the WorkflowStageQueryInputs entity.

func (*WorkflowStageQueryInputs) ValidateWith added in v0.4.0

func (wsqi *WorkflowStageQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageQueryInputs entity with the given context and client set.

type WorkflowStageSelect added in v0.4.0

type WorkflowStageSelect struct {
	*WorkflowStageQuery
	// contains filtered or unexported fields
}

WorkflowStageSelect is the builder for selecting fields of WorkflowStage entities.

func (*WorkflowStageSelect) Aggregate added in v0.4.0

func (wss *WorkflowStageSelect) Aggregate(fns ...AggregateFunc) *WorkflowStageSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowStageSelect) Bool added in v0.4.0

func (s *WorkflowStageSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowStageSelect) BoolX added in v0.4.0

func (s *WorkflowStageSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowStageSelect) Bools added in v0.4.0

func (s *WorkflowStageSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowStageSelect) BoolsX added in v0.4.0

func (s *WorkflowStageSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (WorkflowStageSelect) ExecContext added in v0.4.0

func (c WorkflowStageSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageSelect) Float64 added in v0.4.0

func (s *WorkflowStageSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowStageSelect) Float64X added in v0.4.0

func (s *WorkflowStageSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowStageSelect) Float64s added in v0.4.0

func (s *WorkflowStageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowStageSelect) Float64sX added in v0.4.0

func (s *WorkflowStageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowStageSelect) Int added in v0.4.0

func (s *WorkflowStageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowStageSelect) IntX added in v0.4.0

func (s *WorkflowStageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowStageSelect) Ints added in v0.4.0

func (s *WorkflowStageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowStageSelect) IntsX added in v0.4.0

func (s *WorkflowStageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowStageSelect) Modify added in v0.4.0

func (wss *WorkflowStageSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowStageSelect

Modify adds a query modifier for attaching custom logic to queries.

func (WorkflowStageSelect) QueryContext added in v0.4.0

func (c WorkflowStageSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageSelect) Scan added in v0.4.0

func (wss *WorkflowStageSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowStageSelect) ScanX added in v0.4.0

func (s *WorkflowStageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowStageSelect) String added in v0.4.0

func (s *WorkflowStageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowStageSelect) StringX added in v0.4.0

func (s *WorkflowStageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowStageSelect) Strings added in v0.4.0

func (s *WorkflowStageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowStageSelect) StringsX added in v0.4.0

func (s *WorkflowStageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowStageUpdate added in v0.4.0

type WorkflowStageUpdate struct {
	// contains filtered or unexported fields
}

WorkflowStageUpdate is the builder for updating WorkflowStage entities.

func (*WorkflowStageUpdate) AddOrder added in v0.4.0

func (wsu *WorkflowStageUpdate) AddOrder(i int) *WorkflowStageUpdate

AddOrder adds i to the "order" field.

func (*WorkflowStageUpdate) AddStepIDs added in v0.4.0

func (wsu *WorkflowStageUpdate) AddStepIDs(ids ...object.ID) *WorkflowStageUpdate

AddStepIDs adds the "steps" edge to the WorkflowStep entity by IDs.

func (*WorkflowStageUpdate) AddSteps added in v0.4.0

AddSteps adds the "steps" edges to the WorkflowStep entity.

func (*WorkflowStageUpdate) AppendDependencies added in v0.4.0

func (wsu *WorkflowStageUpdate) AppendDependencies(o []object.ID) *WorkflowStageUpdate

AppendDependencies appends o to the "dependencies" field.

func (*WorkflowStageUpdate) ClearAnnotations added in v0.4.0

func (wsu *WorkflowStageUpdate) ClearAnnotations() *WorkflowStageUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageUpdate) ClearDescription added in v0.4.0

func (wsu *WorkflowStageUpdate) ClearDescription() *WorkflowStageUpdate

ClearDescription clears the value of the "description" field.

func (*WorkflowStageUpdate) ClearLabels added in v0.4.0

func (wsu *WorkflowStageUpdate) ClearLabels() *WorkflowStageUpdate

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageUpdate) ClearSteps added in v0.4.0

func (wsu *WorkflowStageUpdate) ClearSteps() *WorkflowStageUpdate

ClearSteps clears all "steps" edges to the WorkflowStep entity.

func (*WorkflowStageUpdate) Exec added in v0.4.0

func (wsu *WorkflowStageUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowStageUpdate) ExecContext added in v0.4.0

func (c *WorkflowStageUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageUpdate) ExecX added in v0.4.0

func (wsu *WorkflowStageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageUpdate) Modify added in v0.4.0

func (wsu *WorkflowStageUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowStageUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowStageUpdate) Mutation added in v0.4.0

func (wsu *WorkflowStageUpdate) Mutation() *WorkflowStageMutation

Mutation returns the WorkflowStageMutation object of the builder.

func (*WorkflowStageUpdate) QueryContext added in v0.4.0

func (c *WorkflowStageUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageUpdate) RemoveStepIDs added in v0.4.0

func (wsu *WorkflowStageUpdate) RemoveStepIDs(ids ...object.ID) *WorkflowStageUpdate

RemoveStepIDs removes the "steps" edge to WorkflowStep entities by IDs.

func (*WorkflowStageUpdate) RemoveSteps added in v0.4.0

func (wsu *WorkflowStageUpdate) RemoveSteps(w ...*WorkflowStep) *WorkflowStageUpdate

RemoveSteps removes "steps" edges to WorkflowStep entities.

func (*WorkflowStageUpdate) Save added in v0.4.0

func (wsu *WorkflowStageUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorkflowStageUpdate) SaveX added in v0.4.0

func (wsu *WorkflowStageUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStageUpdate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStageUpdate) SetAnnotations added in v0.4.0

func (wsu *WorkflowStageUpdate) SetAnnotations(m map[string]string) *WorkflowStageUpdate

SetAnnotations sets the "annotations" field.

func (*WorkflowStageUpdate) SetDependencies added in v0.4.0

func (wsu *WorkflowStageUpdate) SetDependencies(o []object.ID) *WorkflowStageUpdate

SetDependencies sets the "dependencies" field.

func (*WorkflowStageUpdate) SetDescription added in v0.4.0

func (wsu *WorkflowStageUpdate) SetDescription(s string) *WorkflowStageUpdate

SetDescription sets the "description" field.

func (*WorkflowStageUpdate) SetLabels added in v0.4.0

func (wsu *WorkflowStageUpdate) SetLabels(m map[string]string) *WorkflowStageUpdate

SetLabels sets the "labels" field.

func (*WorkflowStageUpdate) SetNillableDescription added in v0.4.0

func (wsu *WorkflowStageUpdate) SetNillableDescription(s *string) *WorkflowStageUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStageUpdate) SetNillableOrder added in v0.4.0

func (wsu *WorkflowStageUpdate) SetNillableOrder(i *int) *WorkflowStageUpdate

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStageUpdate) SetOrder added in v0.4.0

func (wsu *WorkflowStageUpdate) SetOrder(i int) *WorkflowStageUpdate

SetOrder sets the "order" field.

func (*WorkflowStageUpdate) SetUpdateTime added in v0.4.0

func (wsu *WorkflowStageUpdate) SetUpdateTime(t time.Time) *WorkflowStageUpdate

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageUpdate) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageUpdate builder.

type WorkflowStageUpdateInput added in v0.4.0

type WorkflowStageUpdateInput struct {
	WorkflowStageQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// ID list of the workflow stages that this workflow stage depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies,omitempty"`

	// Steps indicates replacing the stale WorkflowStep entities.
	Steps []*WorkflowStepCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
}

WorkflowStageUpdateInput holds the modification input of the WorkflowStage entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageUpdateInput) Model added in v0.4.0

func (wsui *WorkflowStageUpdateInput) Model() *WorkflowStage

Model returns the WorkflowStage entity for modifying, after validating.

func (*WorkflowStageUpdateInput) SetGinContext added in v0.4.0

func (ic *WorkflowStageUpdateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStageUpdateInput) SetModelClient added in v0.4.0

func (ic *WorkflowStageUpdateInput) SetModelClient(cli *Client)

func (*WorkflowStageUpdateInput) Validate added in v0.4.0

func (wsui *WorkflowStageUpdateInput) Validate() error

Validate checks the WorkflowStageUpdateInput entity.

func (*WorkflowStageUpdateInput) ValidateWith added in v0.4.0

func (wsui *WorkflowStageUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageUpdateInput entity with the given context and client set.

type WorkflowStageUpdateInputs added in v0.4.0

type WorkflowStageUpdateInputs struct {

	// Project indicates to update WorkflowStage entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Workflow indicates to update WorkflowStage entity MUST under the Workflow route.
	Workflow *WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStageUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStageUpdateInputs holds the modification input of the WorkflowStage entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStageUpdateInputs) IDs added in v0.4.0

func (wsui *WorkflowStageUpdateInputs) IDs() []object.ID

IDs returns the ID list of the WorkflowStage entities for modifying, after validating.

func (*WorkflowStageUpdateInputs) Model added in v0.4.0

func (wsui *WorkflowStageUpdateInputs) Model() []*WorkflowStage

Model returns the WorkflowStage entities for modifying, after validating.

func (*WorkflowStageUpdateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStageUpdateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStageUpdateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStageUpdateInputs) SetModelClient(cli *Client)

func (*WorkflowStageUpdateInputs) Validate added in v0.4.0

func (wsui *WorkflowStageUpdateInputs) Validate() error

Validate checks the WorkflowStageUpdateInputs entity.

func (*WorkflowStageUpdateInputs) ValidateWith added in v0.4.0

func (wsui *WorkflowStageUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageUpdateInputs entity with the given context and client set.

type WorkflowStageUpdateInputsItem added in v0.4.0

type WorkflowStageUpdateInputsItem struct {
	// ID of the WorkflowStage entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// ID list of the workflow stages that this workflow stage depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies"`

	// Steps indicates replacing the stale WorkflowStep entities.
	Steps []*WorkflowStepCreateInput `uri:"-" query:"-" json:"steps,omitempty"`
}

WorkflowStageUpdateInputs holds the modification input item of the WorkflowStage entities.

func (*WorkflowStageUpdateInputsItem) ValidateWith added in v0.4.0

func (wsui *WorkflowStageUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStageUpdateInputsItem entity with the given context and client set.

type WorkflowStageUpdateOne added in v0.4.0

type WorkflowStageUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowStageUpdateOne is the builder for updating a single WorkflowStage entity.

func (*WorkflowStageUpdateOne) AddOrder added in v0.4.0

AddOrder adds i to the "order" field.

func (*WorkflowStageUpdateOne) AddStepIDs added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) AddStepIDs(ids ...object.ID) *WorkflowStageUpdateOne

AddStepIDs adds the "steps" edge to the WorkflowStep entity by IDs.

func (*WorkflowStageUpdateOne) AddSteps added in v0.4.0

AddSteps adds the "steps" edges to the WorkflowStep entity.

func (*WorkflowStageUpdateOne) AppendDependencies added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) AppendDependencies(o []object.ID) *WorkflowStageUpdateOne

AppendDependencies appends o to the "dependencies" field.

func (*WorkflowStageUpdateOne) ClearAnnotations added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) ClearAnnotations() *WorkflowStageUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageUpdateOne) ClearDescription added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) ClearDescription() *WorkflowStageUpdateOne

ClearDescription clears the value of the "description" field.

func (*WorkflowStageUpdateOne) ClearLabels added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) ClearLabels() *WorkflowStageUpdateOne

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageUpdateOne) ClearSteps added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) ClearSteps() *WorkflowStageUpdateOne

ClearSteps clears all "steps" edges to the WorkflowStep entity.

func (*WorkflowStageUpdateOne) Exec added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WorkflowStageUpdateOne) ExecContext added in v0.4.0

func (c *WorkflowStageUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStageUpdateOne) ExecE added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStage) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*WorkflowStageUpdateOne) ExecEX added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStage) error)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageUpdateOne) ExecX added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageUpdateOne) Modify added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowStageUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowStageUpdateOne) Mutation added in v0.4.0

Mutation returns the WorkflowStageMutation object of the builder.

func (*WorkflowStageUpdateOne) QueryContext added in v0.4.0

func (c *WorkflowStageUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStageUpdateOne) RemoveStepIDs added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) RemoveStepIDs(ids ...object.ID) *WorkflowStageUpdateOne

RemoveStepIDs removes the "steps" edge to WorkflowStep entities by IDs.

func (*WorkflowStageUpdateOne) RemoveSteps added in v0.4.0

RemoveSteps removes "steps" edges to WorkflowStep entities.

func (*WorkflowStageUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated WorkflowStage entity.

func (*WorkflowStageUpdateOne) SaveE added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStage) error) (*WorkflowStage, error)

SaveE calls the given function after updated the WorkflowStage entity, which is always good for cascading update operations.

func (*WorkflowStageUpdateOne) SaveEX added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStage) error) *WorkflowStage

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStageUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStageUpdateOne) Select added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) Select(field string, fields ...string) *WorkflowStageUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WorkflowStageUpdateOne) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStageUpdateOne) SetAnnotations added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) SetAnnotations(m map[string]string) *WorkflowStageUpdateOne

SetAnnotations sets the "annotations" field.

func (*WorkflowStageUpdateOne) SetDependencies added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) SetDependencies(o []object.ID) *WorkflowStageUpdateOne

SetDependencies sets the "dependencies" field.

func (*WorkflowStageUpdateOne) SetDescription added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) SetDescription(s string) *WorkflowStageUpdateOne

SetDescription sets the "description" field.

func (*WorkflowStageUpdateOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageUpdateOne) SetNillableDescription added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) SetNillableDescription(s *string) *WorkflowStageUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStageUpdateOne) SetNillableOrder added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) SetNillableOrder(i *int) *WorkflowStageUpdateOne

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStageUpdateOne) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageUpdateOne) SetUpdateTime added in v0.4.0

func (wsuo *WorkflowStageUpdateOne) SetUpdateTime(t time.Time) *WorkflowStageUpdateOne

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageUpdateOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowStageUpdate builder.

type WorkflowStageUpsert added in v0.4.0

type WorkflowStageUpsert struct {
	*sql.UpdateSet
}

WorkflowStageUpsert is the "OnConflict" setter.

func (*WorkflowStageUpsert) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStageUpsert) ClearAnnotations added in v0.4.0

func (u *WorkflowStageUpsert) ClearAnnotations() *WorkflowStageUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageUpsert) ClearDescription added in v0.4.0

func (u *WorkflowStageUpsert) ClearDescription() *WorkflowStageUpsert

ClearDescription clears the value of the "description" field.

func (*WorkflowStageUpsert) ClearLabels added in v0.4.0

func (u *WorkflowStageUpsert) ClearLabels() *WorkflowStageUpsert

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageUpsert) SetAnnotations added in v0.4.0

func (u *WorkflowStageUpsert) SetAnnotations(v map[string]string) *WorkflowStageUpsert

SetAnnotations sets the "annotations" field.

func (*WorkflowStageUpsert) SetDependencies added in v0.4.0

func (u *WorkflowStageUpsert) SetDependencies(v []object.ID) *WorkflowStageUpsert

SetDependencies sets the "dependencies" field.

func (*WorkflowStageUpsert) SetDescription added in v0.4.0

func (u *WorkflowStageUpsert) SetDescription(v string) *WorkflowStageUpsert

SetDescription sets the "description" field.

func (*WorkflowStageUpsert) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageUpsert) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageUpsert) SetUpdateTime added in v0.4.0

func (u *WorkflowStageUpsert) SetUpdateTime(v time.Time) *WorkflowStageUpsert

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageUpsert) UpdateAnnotations added in v0.4.0

func (u *WorkflowStageUpsert) UpdateAnnotations() *WorkflowStageUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStageUpsert) UpdateDependencies added in v0.4.0

func (u *WorkflowStageUpsert) UpdateDependencies() *WorkflowStageUpsert

UpdateDependencies sets the "dependencies" field to the value that was provided on create.

func (*WorkflowStageUpsert) UpdateDescription added in v0.4.0

func (u *WorkflowStageUpsert) UpdateDescription() *WorkflowStageUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStageUpsert) UpdateLabels added in v0.4.0

func (u *WorkflowStageUpsert) UpdateLabels() *WorkflowStageUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStageUpsert) UpdateOrder added in v0.4.0

func (u *WorkflowStageUpsert) UpdateOrder() *WorkflowStageUpsert

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStageUpsert) UpdateUpdateTime added in v0.4.0

func (u *WorkflowStageUpsert) UpdateUpdateTime() *WorkflowStageUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStageUpsertBulk added in v0.4.0

type WorkflowStageUpsertBulk struct {
	// contains filtered or unexported fields
}

WorkflowStageUpsertBulk is the builder for "upsert"-ing a bulk of WorkflowStage nodes.

func (*WorkflowStageUpsertBulk) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStageUpsertBulk) ClearAnnotations added in v0.4.0

func (u *WorkflowStageUpsertBulk) ClearAnnotations() *WorkflowStageUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageUpsertBulk) ClearDescription added in v0.4.0

func (u *WorkflowStageUpsertBulk) ClearDescription() *WorkflowStageUpsertBulk

ClearDescription clears the value of the "description" field.

func (*WorkflowStageUpsertBulk) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowStageUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStageUpsertBulk) ExecE added in v0.4.0

func (u *WorkflowStageUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStage) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStageUpsertBulk) ExecEX added in v0.4.0

func (u *WorkflowStageUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStage) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStageUpsertBulk) ExecX added in v0.4.0

func (u *WorkflowStageUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowStage.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*WorkflowStageUpsertBulk) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStageUpsertBulk) SetDependencies added in v0.4.0

func (u *WorkflowStageUpsertBulk) SetDependencies(v []object.ID) *WorkflowStageUpsertBulk

SetDependencies sets the "dependencies" field.

func (*WorkflowStageUpsertBulk) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStageUpsertBulk) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageUpsertBulk) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageUpsertBulk) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowStageCreateBulk.OnConflict documentation for more info.

func (*WorkflowStageUpsertBulk) UpdateAnnotations added in v0.4.0

func (u *WorkflowStageUpsertBulk) UpdateAnnotations() *WorkflowStageUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStageUpsertBulk) UpdateDependencies added in v0.4.0

func (u *WorkflowStageUpsertBulk) UpdateDependencies() *WorkflowStageUpsertBulk

UpdateDependencies sets the "dependencies" field to the value that was provided on create.

func (*WorkflowStageUpsertBulk) UpdateDescription added in v0.4.0

func (u *WorkflowStageUpsertBulk) UpdateDescription() *WorkflowStageUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStageUpsertBulk) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStageUpsertBulk) UpdateNewValues added in v0.4.0

func (u *WorkflowStageUpsertBulk) UpdateNewValues() *WorkflowStageUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.WorkflowStage.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowstage.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowStageUpsertBulk) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStageUpsertBulk) UpdateUpdateTime added in v0.4.0

func (u *WorkflowStageUpsertBulk) UpdateUpdateTime() *WorkflowStageUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStageUpsertOne added in v0.4.0

type WorkflowStageUpsertOne struct {
	// contains filtered or unexported fields
}

WorkflowStageUpsertOne is the builder for "upsert"-ing

one WorkflowStage node.

func (*WorkflowStageUpsertOne) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStageUpsertOne) ClearAnnotations added in v0.4.0

func (u *WorkflowStageUpsertOne) ClearAnnotations() *WorkflowStageUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStageUpsertOne) ClearDescription added in v0.4.0

func (u *WorkflowStageUpsertOne) ClearDescription() *WorkflowStageUpsertOne

ClearDescription clears the value of the "description" field.

func (*WorkflowStageUpsertOne) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStageUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowStageUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStageUpsertOne) ExecE added in v0.4.0

func (u *WorkflowStageUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStage) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStageUpsertOne) ExecEX added in v0.4.0

func (u *WorkflowStageUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStage) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStageUpsertOne) ExecX added in v0.4.0

func (u *WorkflowStageUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStageUpsertOne) ID added in v0.4.0

func (u *WorkflowStageUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*WorkflowStageUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*WorkflowStageUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowStage.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*WorkflowStageUpsertOne) SetAnnotations added in v0.4.0

func (u *WorkflowStageUpsertOne) SetAnnotations(v map[string]string) *WorkflowStageUpsertOne

SetAnnotations sets the "annotations" field.

func (*WorkflowStageUpsertOne) SetDependencies added in v0.4.0

func (u *WorkflowStageUpsertOne) SetDependencies(v []object.ID) *WorkflowStageUpsertOne

SetDependencies sets the "dependencies" field.

func (*WorkflowStageUpsertOne) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStageUpsertOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStageUpsertOne) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStageUpsertOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStageUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowStageCreate.OnConflict documentation for more info.

func (*WorkflowStageUpsertOne) UpdateAnnotations added in v0.4.0

func (u *WorkflowStageUpsertOne) UpdateAnnotations() *WorkflowStageUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStageUpsertOne) UpdateDependencies added in v0.4.0

func (u *WorkflowStageUpsertOne) UpdateDependencies() *WorkflowStageUpsertOne

UpdateDependencies sets the "dependencies" field to the value that was provided on create.

func (*WorkflowStageUpsertOne) UpdateDescription added in v0.4.0

func (u *WorkflowStageUpsertOne) UpdateDescription() *WorkflowStageUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStageUpsertOne) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStageUpsertOne) UpdateNewValues added in v0.4.0

func (u *WorkflowStageUpsertOne) UpdateNewValues() *WorkflowStageUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.WorkflowStage.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowstage.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowStageUpsertOne) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStageUpsertOne) UpdateUpdateTime added in v0.4.0

func (u *WorkflowStageUpsertOne) UpdateUpdateTime() *WorkflowStageUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStages added in v0.4.0

type WorkflowStages []*WorkflowStage

WorkflowStages is a parsable slice of WorkflowStage.

func (WorkflowStages) View added in v0.4.0

func (_wss WorkflowStages) View() []*WorkflowStageOutput

View returns the output of WorkflowStage entities.

type WorkflowStep added in v0.4.0

type WorkflowStep struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Type of the workflow step.
	Type string `json:"type,omitempty"`
	// ID of the project to belong.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the workflow that this workflow step belongs to.
	WorkflowID object.ID `json:"workflow_id,omitempty"`
	// ID of the stage that this workflow step belongs to.
	WorkflowStageID object.ID `json:"workflow_stage_id,omitempty"`
	// Attributes of the workflow step.
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Inputs of the workflow step.
	Inputs map[string]interface{} `json:"inputs,omitempty"`
	// Outputs of the workflow step.
	Outputs map[string]interface{} `json:"outputs,omitempty"`
	// Order of the workflow step.
	Order int `json:"order,omitempty"`
	// ID list of the workflow steps that this workflow step depends on.
	Dependencies []object.ID `json:"dependencies,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `json:"retryStrategy,omitempty"`
	// Timeout seconds of the workflow step, 0 means no timeout.
	Timeout int `json:"timeout,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorkflowStepQuery when eager-loading is set.
	Edges WorkflowStepEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStep is the model entity for the WorkflowStep schema.

func (*WorkflowStep) ExecContext added in v0.4.0

func (c *WorkflowStep) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStep) QueryContext added in v0.4.0

func (c *WorkflowStep) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStep) QueryProject added in v0.4.0

func (ws *WorkflowStep) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the WorkflowStep entity.

func (*WorkflowStep) QueryStage added in v0.4.0

func (ws *WorkflowStep) QueryStage() *WorkflowStageQuery

QueryStage queries the "stage" edge of the WorkflowStep entity.

func (*WorkflowStep) String added in v0.4.0

func (ws *WorkflowStep) String() string

String implements the fmt.Stringer.

func (*WorkflowStep) Unwrap added in v0.4.0

func (ws *WorkflowStep) Unwrap() *WorkflowStep

Unwrap unwraps the WorkflowStep 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 (*WorkflowStep) Update added in v0.4.0

func (ws *WorkflowStep) Update() *WorkflowStepUpdateOne

Update returns a builder for updating this WorkflowStep. Note that you need to call WorkflowStep.Unwrap() before calling this method if this WorkflowStep was returned from a transaction, and the transaction was committed or rolled back.

func (*WorkflowStep) Value added in v0.4.0

func (ws *WorkflowStep) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WorkflowStep. This includes values selected through modifiers, order, etc.

func (*WorkflowStep) View added in v0.4.0

func (_ws *WorkflowStep) View() *WorkflowStepOutput

View returns the output of WorkflowStep entity.

type WorkflowStepClient added in v0.4.0

type WorkflowStepClient struct {
	// contains filtered or unexported fields
}

WorkflowStepClient is a client for the WorkflowStep schema.

func NewWorkflowStepClient added in v0.4.0

func NewWorkflowStepClient(c config) *WorkflowStepClient

NewWorkflowStepClient returns a client for the WorkflowStep from the given config.

func (*WorkflowStepClient) Create added in v0.4.0

Create returns a builder for creating a WorkflowStep entity.

func (*WorkflowStepClient) CreateBulk added in v0.4.0

func (c *WorkflowStepClient) CreateBulk(builders ...*WorkflowStepCreate) *WorkflowStepCreateBulk

CreateBulk returns a builder for creating a bulk of WorkflowStep entities.

func (*WorkflowStepClient) Delete added in v0.4.0

Delete returns a delete builder for WorkflowStep.

func (*WorkflowStepClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowStepClient) DeleteOneID added in v0.4.0

func (c *WorkflowStepClient) DeleteOneID(id object.ID) *WorkflowStepDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowStepClient) ExecContext added in v0.4.0

func (c *WorkflowStepClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepClient) Get added in v0.4.0

Get returns a WorkflowStep entity by its id.

func (*WorkflowStepClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*WorkflowStepClient) Hooks added in v0.4.0

func (c *WorkflowStepClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowStepClient) Intercept added in v0.4.0

func (c *WorkflowStepClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowstep.Intercept(f(g(h())))`.

func (*WorkflowStepClient) Interceptors added in v0.4.0

func (c *WorkflowStepClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowStepClient) MapCreateBulk added in v0.5.0

func (c *WorkflowStepClient) MapCreateBulk(slice any, setFunc func(*WorkflowStepCreate, int)) *WorkflowStepCreateBulk

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 (*WorkflowStepClient) Query added in v0.4.0

Query returns a query builder for WorkflowStep.

func (*WorkflowStepClient) QueryContext added in v0.4.0

func (c *WorkflowStepClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepClient) QueryProject added in v0.4.0

func (c *WorkflowStepClient) QueryProject(ws *WorkflowStep) *ProjectQuery

QueryProject queries the project edge of a WorkflowStep.

func (*WorkflowStepClient) QueryStage added in v0.4.0

QueryStage queries the stage edge of a WorkflowStep.

func (*WorkflowStepClient) Update added in v0.4.0

Update returns an update builder for WorkflowStep.

func (*WorkflowStepClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*WorkflowStepClient) UpdateOneID added in v0.4.0

func (c *WorkflowStepClient) UpdateOneID(id object.ID) *WorkflowStepUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WorkflowStepClient) Use added in v0.4.0

func (c *WorkflowStepClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowstep.Hooks(f(g(h())))`.

type WorkflowStepClientGetter added in v0.4.0

type WorkflowStepClientGetter interface {
	// WorkflowSteps returns the client for interacting with the WorkflowStep builders.
	WorkflowSteps() *WorkflowStepClient
}

WorkflowStepClientGetter is an interface that allows getting WorkflowStepClient.

type WorkflowStepCreate added in v0.4.0

type WorkflowStepCreate struct {
	// contains filtered or unexported fields
}

WorkflowStepCreate is the builder for creating a WorkflowStep entity.

func (*WorkflowStepCreate) Exec added in v0.4.0

func (wsc *WorkflowStepCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowStepCreate) ExecContext added in v0.4.0

func (c *WorkflowStepCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepCreate) ExecE added in v0.4.0

func (wsc *WorkflowStepCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStep) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStepCreate) ExecEX added in v0.4.0

func (wsc *WorkflowStepCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStep) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStepCreate) ExecX added in v0.4.0

func (wsc *WorkflowStepCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepCreate) Mutation added in v0.4.0

func (wsc *WorkflowStepCreate) Mutation() *WorkflowStepMutation

Mutation returns the WorkflowStepMutation object of the builder.

func (*WorkflowStepCreate) OnConflict added in v0.4.0

func (wsc *WorkflowStepCreate) OnConflict(opts ...sql.ConflictOption) *WorkflowStepUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowStep.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowStepUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowStepCreate) OnConflictColumns added in v0.4.0

func (wsc *WorkflowStepCreate) OnConflictColumns(columns ...string) *WorkflowStepUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowStep.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowStepCreate) QueryContext added in v0.4.0

func (c *WorkflowStepCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepCreate) Save added in v0.4.0

Save creates the WorkflowStep in the database.

func (*WorkflowStepCreate) SaveE added in v0.4.0

func (wsc *WorkflowStepCreate) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStep) error) (*WorkflowStep, error)

SaveE calls the given function after created the WorkflowStep entity, which is always good for cascading create operations.

func (*WorkflowStepCreate) SaveEX added in v0.4.0

func (wsc *WorkflowStepCreate) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStep) error) *WorkflowStep

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStepCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*WorkflowStepCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStepCreate) SetAnnotations added in v0.4.0

func (wsc *WorkflowStepCreate) SetAnnotations(m map[string]string) *WorkflowStepCreate

SetAnnotations sets the "annotations" field.

func (*WorkflowStepCreate) SetAttributes added in v0.4.0

func (wsc *WorkflowStepCreate) SetAttributes(m map[string]interface{}) *WorkflowStepCreate

SetAttributes sets the "attributes" field.

func (*WorkflowStepCreate) SetCreateTime added in v0.4.0

func (wsc *WorkflowStepCreate) SetCreateTime(t time.Time) *WorkflowStepCreate

SetCreateTime sets the "create_time" field.

func (*WorkflowStepCreate) SetDependencies added in v0.4.0

func (wsc *WorkflowStepCreate) SetDependencies(o []object.ID) *WorkflowStepCreate

SetDependencies sets the "dependencies" field.

func (*WorkflowStepCreate) SetDescription added in v0.4.0

func (wsc *WorkflowStepCreate) SetDescription(s string) *WorkflowStepCreate

SetDescription sets the "description" field.

func (*WorkflowStepCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*WorkflowStepCreate) SetInputs added in v0.4.0

func (wsc *WorkflowStepCreate) SetInputs(m map[string]interface{}) *WorkflowStepCreate

SetInputs sets the "inputs" field.

func (*WorkflowStepCreate) SetLabels added in v0.4.0

func (wsc *WorkflowStepCreate) SetLabels(m map[string]string) *WorkflowStepCreate

SetLabels sets the "labels" field.

func (*WorkflowStepCreate) SetName added in v0.4.0

func (wsc *WorkflowStepCreate) SetName(s string) *WorkflowStepCreate

SetName sets the "name" field.

func (*WorkflowStepCreate) SetNillableCreateTime added in v0.4.0

func (wsc *WorkflowStepCreate) SetNillableCreateTime(t *time.Time) *WorkflowStepCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*WorkflowStepCreate) SetNillableDescription added in v0.4.0

func (wsc *WorkflowStepCreate) SetNillableDescription(s *string) *WorkflowStepCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStepCreate) SetNillableOrder added in v0.4.0

func (wsc *WorkflowStepCreate) SetNillableOrder(i *int) *WorkflowStepCreate

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStepCreate) SetNillableTimeout added in v0.4.0

func (wsc *WorkflowStepCreate) SetNillableTimeout(i *int) *WorkflowStepCreate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowStepCreate) SetNillableUpdateTime added in v0.4.0

func (wsc *WorkflowStepCreate) SetNillableUpdateTime(t *time.Time) *WorkflowStepCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*WorkflowStepCreate) SetOrder added in v0.4.0

func (wsc *WorkflowStepCreate) SetOrder(i int) *WorkflowStepCreate

SetOrder sets the "order" field.

func (*WorkflowStepCreate) SetOutputs added in v0.4.0

func (wsc *WorkflowStepCreate) SetOutputs(m map[string]interface{}) *WorkflowStepCreate

SetOutputs sets the "outputs" field.

func (*WorkflowStepCreate) SetProject added in v0.4.0

func (wsc *WorkflowStepCreate) SetProject(p *Project) *WorkflowStepCreate

SetProject sets the "project" edge to the Project entity.

func (*WorkflowStepCreate) SetProjectID added in v0.4.0

func (wsc *WorkflowStepCreate) SetProjectID(o object.ID) *WorkflowStepCreate

SetProjectID sets the "project_id" field.

func (*WorkflowStepCreate) SetRetryStrategy added in v0.4.0

func (wsc *WorkflowStepCreate) SetRetryStrategy(ts *types.RetryStrategy) *WorkflowStepCreate

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepCreate) SetStage added in v0.4.0

SetStage sets the "stage" edge to the WorkflowStage entity.

func (*WorkflowStepCreate) SetStageID added in v0.4.0

func (wsc *WorkflowStepCreate) SetStageID(id object.ID) *WorkflowStepCreate

SetStageID sets the "stage" edge to the WorkflowStage entity by ID.

func (*WorkflowStepCreate) SetTimeout added in v0.4.0

func (wsc *WorkflowStepCreate) SetTimeout(i int) *WorkflowStepCreate

SetTimeout sets the "timeout" field.

func (*WorkflowStepCreate) SetType added in v0.4.0

func (wsc *WorkflowStepCreate) SetType(s string) *WorkflowStepCreate

SetType sets the "type" field.

func (*WorkflowStepCreate) SetUpdateTime added in v0.4.0

func (wsc *WorkflowStepCreate) SetUpdateTime(t time.Time) *WorkflowStepCreate

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepCreate) SetWorkflowID added in v0.4.0

func (wsc *WorkflowStepCreate) SetWorkflowID(o object.ID) *WorkflowStepCreate

SetWorkflowID sets the "workflow_id" field.

func (*WorkflowStepCreate) SetWorkflowStageID added in v0.4.0

func (wsc *WorkflowStepCreate) SetWorkflowStageID(o object.ID) *WorkflowStepCreate

SetWorkflowStageID sets the "workflow_stage_id" field.

type WorkflowStepCreateBulk added in v0.4.0

type WorkflowStepCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowStepCreateBulk is the builder for creating many WorkflowStep entities in bulk.

func (*WorkflowStepCreateBulk) Exec added in v0.4.0

func (wscb *WorkflowStepCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowStepCreateBulk) ExecContext added in v0.4.0

func (c *WorkflowStepCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepCreateBulk) ExecE added in v0.4.0

func (wscb *WorkflowStepCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStep) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStepCreateBulk) ExecEX added in v0.4.0

func (wscb *WorkflowStepCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStep) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStepCreateBulk) ExecX added in v0.4.0

func (wscb *WorkflowStepCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowStep.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowStepUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowStepCreateBulk) OnConflictColumns added in v0.4.0

func (wscb *WorkflowStepCreateBulk) OnConflictColumns(columns ...string) *WorkflowStepUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowStep.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowStepCreateBulk) QueryContext added in v0.4.0

func (c *WorkflowStepCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepCreateBulk) Save added in v0.4.0

Save creates the WorkflowStep entities in the database.

func (*WorkflowStepCreateBulk) SaveE added in v0.4.0

func (wscb *WorkflowStepCreateBulk) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStep) error) ([]*WorkflowStep, error)

SaveE calls the given function after created the WorkflowStep entities, which is always good for cascading create operations.

func (*WorkflowStepCreateBulk) SaveEX added in v0.4.0

func (wscb *WorkflowStepCreateBulk) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStep) error) []*WorkflowStep

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStepCreateBulk) SaveX added in v0.4.0

func (wscb *WorkflowStepCreateBulk) SaveX(ctx context.Context) []*WorkflowStep

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStepCreateBulk) Set added in v0.4.0

Set leverages the WorkflowStepCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type WorkflowStepCreateInput added in v0.4.0

type WorkflowStepCreateInput struct {

	// Project indicates to create WorkflowStep entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Stage indicates to create WorkflowStep entity MUST under the Stage route.
	Stage *WorkflowStageQueryInput `path:",inline" query:"-" json:"-"`

	// ID of the workflow that this workflow step belongs to.
	WorkflowID object.ID `path:"-" query:"-" json:"workflowID"`
	// Type of the workflow step.
	Type string `path:"-" query:"-" json:"type"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Attributes of the workflow step.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Inputs of the workflow step.
	Inputs map[string]interface{} `path:"-" query:"-" json:"inputs,omitempty"`
	// Outputs of the workflow step.
	Outputs map[string]interface{} `path:"-" query:"-" json:"outputs,omitempty"`
	// ID list of the workflow steps that this workflow step depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout seconds of the workflow step, 0 means no timeout.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStepCreateInput holds the creation input of the WorkflowStep entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepCreateInput) Model added in v0.4.0

func (wsci *WorkflowStepCreateInput) Model() *WorkflowStep

Model returns the WorkflowStep entity for creating, after validating.

func (*WorkflowStepCreateInput) SetGinContext added in v0.4.0

func (ic *WorkflowStepCreateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepCreateInput) SetModelClient added in v0.4.0

func (ic *WorkflowStepCreateInput) SetModelClient(cli *Client)

func (*WorkflowStepCreateInput) Validate added in v0.4.0

func (wsci *WorkflowStepCreateInput) Validate() error

Validate checks the WorkflowStepCreateInput entity.

func (*WorkflowStepCreateInput) ValidateWith added in v0.4.0

func (wsci *WorkflowStepCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepCreateInput entity with the given context and client set.

type WorkflowStepCreateInputs added in v0.4.0

type WorkflowStepCreateInputs struct {

	// Project indicates to create WorkflowStep entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Stage indicates to create WorkflowStep entity MUST under the Stage route.
	Stage *WorkflowStageQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStepCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStepCreateInputs holds the creation input of the WorkflowStep entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepCreateInputs) Model added in v0.4.0

func (wsci *WorkflowStepCreateInputs) Model() []*WorkflowStep

Model returns the WorkflowStep entities for creating, after validating.

func (*WorkflowStepCreateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStepCreateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStepCreateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStepCreateInputs) SetModelClient(cli *Client)

func (*WorkflowStepCreateInputs) Validate added in v0.4.0

func (wsci *WorkflowStepCreateInputs) Validate() error

Validate checks the WorkflowStepCreateInputs entity .

func (*WorkflowStepCreateInputs) ValidateWith added in v0.4.0

func (wsci *WorkflowStepCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepCreateInputs entity with the given context and client set.

type WorkflowStepCreateInputsItem added in v0.4.0

type WorkflowStepCreateInputsItem struct {
	// ID of the workflow that this workflow step belongs to.
	WorkflowID object.ID `path:"-" query:"-" json:"workflowID"`
	// Type of the workflow step.
	Type string `path:"-" query:"-" json:"type"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Attributes of the workflow step.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Inputs of the workflow step.
	Inputs map[string]interface{} `path:"-" query:"-" json:"inputs,omitempty"`
	// Outputs of the workflow step.
	Outputs map[string]interface{} `path:"-" query:"-" json:"outputs,omitempty"`
	// ID list of the workflow steps that this workflow step depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout seconds of the workflow step, 0 means no timeout.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
}

WorkflowStepCreateInputs holds the creation input item of the WorkflowStep entities.

func (*WorkflowStepCreateInputsItem) ValidateWith added in v0.4.0

func (wsci *WorkflowStepCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepCreateInputsItem entity with the given context and client set.

type WorkflowStepDelete added in v0.4.0

type WorkflowStepDelete struct {
	// contains filtered or unexported fields
}

WorkflowStepDelete is the builder for deleting a WorkflowStep entity.

func (*WorkflowStepDelete) Exec added in v0.4.0

func (wsd *WorkflowStepDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowStepDelete) ExecContext added in v0.4.0

func (c *WorkflowStepDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepDelete) ExecX added in v0.4.0

func (wsd *WorkflowStepDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepDelete) QueryContext added in v0.4.0

func (c *WorkflowStepDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepDelete) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepDelete builder.

type WorkflowStepDeleteInput added in v0.4.0

type WorkflowStepDeleteInput struct {
	WorkflowStepQueryInput `path:",inline"`
}

WorkflowStepDeleteInput holds the deletion input of the WorkflowStep entity, please tags with `path:",inline"` if embedding.

func (*WorkflowStepDeleteInput) SetGinContext added in v0.4.0

func (ic *WorkflowStepDeleteInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepDeleteInput) SetModelClient added in v0.4.0

func (ic *WorkflowStepDeleteInput) SetModelClient(cli *Client)

type WorkflowStepDeleteInputs added in v0.4.0

type WorkflowStepDeleteInputs struct {

	// Project indicates to delete WorkflowStep entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Stage indicates to delete WorkflowStep entity MUST under the Stage route.
	Stage *WorkflowStageQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStepDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStepDeleteInputs holds the deletion input of the WorkflowStep entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepDeleteInputs) IDs added in v0.4.0

func (wsdi *WorkflowStepDeleteInputs) IDs() []object.ID

IDs returns the ID list of the WorkflowStep entities for deleting, after validating.

func (*WorkflowStepDeleteInputs) Model added in v0.4.0

func (wsdi *WorkflowStepDeleteInputs) Model() []*WorkflowStep

Model returns the WorkflowStep entities for deleting, after validating.

func (*WorkflowStepDeleteInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStepDeleteInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStepDeleteInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStepDeleteInputs) SetModelClient(cli *Client)

func (*WorkflowStepDeleteInputs) Validate added in v0.4.0

func (wsdi *WorkflowStepDeleteInputs) Validate() error

Validate checks the WorkflowStepDeleteInputs entity.

func (*WorkflowStepDeleteInputs) ValidateWith added in v0.4.0

func (wsdi *WorkflowStepDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepDeleteInputs entity with the given context and client set.

type WorkflowStepDeleteInputsItem added in v0.4.0

type WorkflowStepDeleteInputsItem struct {
	// ID of the WorkflowStep entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

WorkflowStepDeleteInputs holds the deletion input item of the WorkflowStep entities.

type WorkflowStepDeleteOne added in v0.4.0

type WorkflowStepDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowStepDeleteOne is the builder for deleting a single WorkflowStep entity.

func (*WorkflowStepDeleteOne) Exec added in v0.4.0

func (wsdo *WorkflowStepDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WorkflowStepDeleteOne) ExecX added in v0.4.0

func (wsdo *WorkflowStepDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepDeleteOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepDelete builder.

type WorkflowStepEdges added in v0.4.0

type WorkflowStepEdges struct {
	// Project to which the step belongs.
	Project *Project `json:"project,omitempty"`
	// Workflow stage that this workflow step belongs to.
	Stage *WorkflowStage `json:"stage,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStepEdges holds the relations/edges for other nodes in the graph.

func (WorkflowStepEdges) ProjectOrErr added in v0.4.0

func (e WorkflowStepEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowStepEdges) StageOrErr added in v0.4.0

func (e WorkflowStepEdges) StageOrErr() (*WorkflowStage, error)

StageOrErr returns the Stage value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WorkflowStepExecution added in v0.4.0

type WorkflowStepExecution struct {

	// ID of the ent.
	ID object.ID `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"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `json:"update_time,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `json:"status,omitempty"`
	// ID of the workflow step that this workflow step execution belongs to.
	WorkflowStepID object.ID `json:"workflow_step_id,omitempty"`
	// ID of the workflow execution that this workflow step execution belongs to.
	WorkflowExecutionID object.ID `json:"workflow_execution_id,omitempty"`
	// ID of the workflow stage execution that this workflow step execution belongs to.
	WorkflowStageExecutionID object.ID `json:"workflow_stage_execution_id,omitempty"`
	// ID of the project to belong.
	ProjectID object.ID `json:"project_id,omitempty"`
	// ID of the workflow that this workflow step execution belongs to.
	WorkflowID object.ID `json:"workflow_id,omitempty"`
	// Type of the workflow step execution.
	Type string `json:"type,omitempty"`
	// Attributes of the workflow step execution.
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Number of times that this workflow step execution has been executed.
	Times int `json:"times,omitempty"`
	// Time of the step execution started.
	ExecuteTime time.Time `json:"execute_time,omitempty"`
	// Execution duration seconds of the workflow step.
	Duration int `json:"duration,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `json:"retryStrategy,omitempty"`
	// Timeout of the workflow step execution.
	Timeout int `json:"timeout,omitempty"`
	// Order of the workflow step execution.
	Order int `json:"order,omitempty"`
	// Log record of the workflow step execution.
	Record string `json:"record,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorkflowStepExecutionQuery when eager-loading is set.
	Edges WorkflowStepExecutionEdges `json:"edges,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStepExecution is the model entity for the WorkflowStepExecution schema.

func (*WorkflowStepExecution) ExecContext added in v0.4.0

func (c *WorkflowStepExecution) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecution) QueryContext added in v0.4.0

func (c *WorkflowStepExecution) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecution) QueryProject added in v0.4.0

func (wse *WorkflowStepExecution) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the WorkflowStepExecution entity.

func (*WorkflowStepExecution) QueryStageExecution added in v0.4.0

func (wse *WorkflowStepExecution) QueryStageExecution() *WorkflowStageExecutionQuery

QueryStageExecution queries the "stage_execution" edge of the WorkflowStepExecution entity.

func (*WorkflowStepExecution) String added in v0.4.0

func (wse *WorkflowStepExecution) String() string

String implements the fmt.Stringer.

func (*WorkflowStepExecution) Unwrap added in v0.4.0

Unwrap unwraps the WorkflowStepExecution 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 (*WorkflowStepExecution) Update added in v0.4.0

Update returns a builder for updating this WorkflowStepExecution. Note that you need to call WorkflowStepExecution.Unwrap() before calling this method if this WorkflowStepExecution was returned from a transaction, and the transaction was committed or rolled back.

func (*WorkflowStepExecution) Value added in v0.4.0

func (wse *WorkflowStepExecution) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WorkflowStepExecution. This includes values selected through modifiers, order, etc.

func (*WorkflowStepExecution) View added in v0.4.0

View returns the output of WorkflowStepExecution entity.

type WorkflowStepExecutionClient added in v0.4.0

type WorkflowStepExecutionClient struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionClient is a client for the WorkflowStepExecution schema.

func NewWorkflowStepExecutionClient added in v0.4.0

func NewWorkflowStepExecutionClient(c config) *WorkflowStepExecutionClient

NewWorkflowStepExecutionClient returns a client for the WorkflowStepExecution from the given config.

func (*WorkflowStepExecutionClient) Create added in v0.4.0

Create returns a builder for creating a WorkflowStepExecution entity.

func (*WorkflowStepExecutionClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of WorkflowStepExecution entities.

func (*WorkflowStepExecutionClient) Delete added in v0.4.0

Delete returns a delete builder for WorkflowStepExecution.

func (*WorkflowStepExecutionClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*WorkflowStepExecutionClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorkflowStepExecutionClient) ExecContext added in v0.4.0

func (c *WorkflowStepExecutionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecutionClient) Get added in v0.4.0

Get returns a WorkflowStepExecution entity by its id.

func (*WorkflowStepExecutionClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*WorkflowStepExecutionClient) Hooks added in v0.4.0

func (c *WorkflowStepExecutionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorkflowStepExecutionClient) Intercept added in v0.4.0

func (c *WorkflowStepExecutionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowstepexecution.Intercept(f(g(h())))`.

func (*WorkflowStepExecutionClient) Interceptors added in v0.4.0

func (c *WorkflowStepExecutionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorkflowStepExecutionClient) MapCreateBulk added in v0.5.0

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 (*WorkflowStepExecutionClient) Query added in v0.4.0

Query returns a query builder for WorkflowStepExecution.

func (*WorkflowStepExecutionClient) QueryContext added in v0.4.0

func (c *WorkflowStepExecutionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecutionClient) QueryProject added in v0.4.0

QueryProject queries the project edge of a WorkflowStepExecution.

func (*WorkflowStepExecutionClient) QueryStageExecution added in v0.4.0

QueryStageExecution queries the stage_execution edge of a WorkflowStepExecution.

func (*WorkflowStepExecutionClient) Update added in v0.4.0

Update returns an update builder for WorkflowStepExecution.

func (*WorkflowStepExecutionClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*WorkflowStepExecutionClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*WorkflowStepExecutionClient) Use added in v0.4.0

func (c *WorkflowStepExecutionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowstepexecution.Hooks(f(g(h())))`.

type WorkflowStepExecutionClientGetter added in v0.4.0

type WorkflowStepExecutionClientGetter interface {
	// WorkflowStepExecutions returns the client for interacting with the WorkflowStepExecution builders.
	WorkflowStepExecutions() *WorkflowStepExecutionClient
}

WorkflowStepExecutionClientGetter is an interface that allows getting WorkflowStepExecutionClient.

type WorkflowStepExecutionCreate added in v0.4.0

type WorkflowStepExecutionCreate struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionCreate is the builder for creating a WorkflowStepExecution entity.

func (*WorkflowStepExecutionCreate) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStepExecutionCreate) ExecContext added in v0.4.0

func (c *WorkflowStepExecutionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecutionCreate) ExecE added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStepExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStepExecutionCreate) ExecEX added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStepExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStepExecutionCreate) ExecX added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepExecutionCreate) Mutation added in v0.4.0

Mutation returns the WorkflowStepExecutionMutation object of the builder.

func (*WorkflowStepExecutionCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowStepExecution.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowStepExecutionUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowStepExecutionCreate) OnConflictColumns added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) OnConflictColumns(columns ...string) *WorkflowStepExecutionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowStepExecution.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowStepExecutionCreate) QueryContext added in v0.4.0

func (c *WorkflowStepExecutionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecutionCreate) Save added in v0.4.0

Save creates the WorkflowStepExecution in the database.

func (*WorkflowStepExecutionCreate) SaveE added in v0.4.0

SaveE calls the given function after created the WorkflowStepExecution entity, which is always good for cascading create operations.

func (*WorkflowStepExecutionCreate) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStepExecutionCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*WorkflowStepExecutionCreate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStepExecutionCreate) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStepExecutionCreate) SetAttributes added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetAttributes(m map[string]interface{}) *WorkflowStepExecutionCreate

SetAttributes sets the "attributes" field.

func (*WorkflowStepExecutionCreate) SetCreateTime added in v0.4.0

SetCreateTime sets the "create_time" field.

func (*WorkflowStepExecutionCreate) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStepExecutionCreate) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStepExecutionCreate) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStepExecutionCreate) SetID added in v0.4.0

SetID sets the "id" field.

func (*WorkflowStepExecutionCreate) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStepExecutionCreate) SetName added in v0.4.0

SetName sets the "name" field.

func (*WorkflowStepExecutionCreate) SetNillableCreateTime added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetNillableCreateTime(t *time.Time) *WorkflowStepExecutionCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetNillableDescription added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetNillableDescription(s *string) *WorkflowStepExecutionCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetNillableDuration added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetNillableDuration(i *int) *WorkflowStepExecutionCreate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetNillableExecuteTime added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetNillableExecuteTime(t *time.Time) *WorkflowStepExecutionCreate

SetNillableExecuteTime sets the "execute_time" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetNillableOrder added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetNillableOrder(i *int) *WorkflowStepExecutionCreate

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetNillableRecord added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetNillableRecord(s *string) *WorkflowStepExecutionCreate

SetNillableRecord sets the "record" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetNillableStatus added in v0.4.0

SetNillableStatus sets the "status" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetNillableTimeout added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetNillableTimeout(i *int) *WorkflowStepExecutionCreate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetNillableTimes added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetNillableTimes(i *int) *WorkflowStepExecutionCreate

SetNillableTimes sets the "times" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetNillableUpdateTime added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetNillableUpdateTime(t *time.Time) *WorkflowStepExecutionCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*WorkflowStepExecutionCreate) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStepExecutionCreate) SetProject added in v0.4.0

SetProject sets the "project" edge to the Project entity.

func (*WorkflowStepExecutionCreate) SetProjectID added in v0.4.0

SetProjectID sets the "project_id" field.

func (*WorkflowStepExecutionCreate) SetRecord added in v0.4.0

SetRecord sets the "record" field.

func (*WorkflowStepExecutionCreate) SetRetryStrategy added in v0.4.0

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepExecutionCreate) SetStageExecution added in v0.4.0

SetStageExecution sets the "stage_execution" edge to the WorkflowStageExecution entity.

func (*WorkflowStepExecutionCreate) SetStageExecutionID added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetStageExecutionID(id object.ID) *WorkflowStepExecutionCreate

SetStageExecutionID sets the "stage_execution" edge to the WorkflowStageExecution entity by ID.

func (*WorkflowStepExecutionCreate) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStepExecutionCreate) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowStepExecutionCreate) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowStepExecutionCreate) SetType added in v0.4.0

SetType sets the "type" field.

func (*WorkflowStepExecutionCreate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepExecutionCreate) SetWorkflowExecutionID added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetWorkflowExecutionID(o object.ID) *WorkflowStepExecutionCreate

SetWorkflowExecutionID sets the "workflow_execution_id" field.

func (*WorkflowStepExecutionCreate) SetWorkflowID added in v0.4.0

SetWorkflowID sets the "workflow_id" field.

func (*WorkflowStepExecutionCreate) SetWorkflowStageExecutionID added in v0.4.0

func (wsec *WorkflowStepExecutionCreate) SetWorkflowStageExecutionID(o object.ID) *WorkflowStepExecutionCreate

SetWorkflowStageExecutionID sets the "workflow_stage_execution_id" field.

func (*WorkflowStepExecutionCreate) SetWorkflowStepID added in v0.4.0

SetWorkflowStepID sets the "workflow_step_id" field.

type WorkflowStepExecutionCreateBulk added in v0.4.0

type WorkflowStepExecutionCreateBulk struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionCreateBulk is the builder for creating many WorkflowStepExecution entities in bulk.

func (*WorkflowStepExecutionCreateBulk) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStepExecutionCreateBulk) ExecContext added in v0.4.0

func (c *WorkflowStepExecutionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecutionCreateBulk) ExecE added in v0.4.0

func (wsecb *WorkflowStepExecutionCreateBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStepExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStepExecutionCreateBulk) ExecEX added in v0.4.0

func (wsecb *WorkflowStepExecutionCreateBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, created *WorkflowStepExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStepExecutionCreateBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepExecutionCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.WorkflowStepExecution.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.WorkflowStepExecutionUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*WorkflowStepExecutionCreateBulk) OnConflictColumns added in v0.4.0

func (wsecb *WorkflowStepExecutionCreateBulk) OnConflictColumns(columns ...string) *WorkflowStepExecutionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.WorkflowStepExecution.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorkflowStepExecutionCreateBulk) QueryContext added in v0.4.0

func (c *WorkflowStepExecutionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecutionCreateBulk) Save added in v0.4.0

Save creates the WorkflowStepExecution entities in the database.

func (*WorkflowStepExecutionCreateBulk) SaveE added in v0.4.0

SaveE calls the given function after created the WorkflowStepExecution entities, which is always good for cascading create operations.

func (*WorkflowStepExecutionCreateBulk) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStepExecutionCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStepExecutionCreateBulk) Set added in v0.4.0

Set leverages the WorkflowStepExecutionCreate Set method, it sets the value by judging the definition of each field within the entire item of the given list.

For required fields, Set calls directly.

For optional fields, Set calls if the value is not zero.

For example:

## Required

db.SetX(obj.X)

## Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

type WorkflowStepExecutionCreateInput added in v0.4.0

type WorkflowStepExecutionCreateInput struct {

	// Project indicates to create WorkflowStepExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// StageExecution indicates to create WorkflowStepExecution entity MUST under the StageExecution route.
	StageExecution *WorkflowStageExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Type of the workflow step execution.
	Type string `path:"-" query:"-" json:"type"`
	// ID of the workflow that this workflow step execution belongs to.
	WorkflowID object.ID `path:"-" query:"-" json:"workflowID"`
	// ID of the workflow execution that this workflow step execution belongs to.
	WorkflowExecutionID object.ID `path:"-" query:"-" json:"workflowExecutionID"`
	// ID of the workflow step that this workflow step execution belongs to.
	WorkflowStepID object.ID `path:"-" query:"-" json:"workflowStepID"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Attributes of the workflow step execution.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout of the workflow step execution.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// Log record of the workflow step execution.
	Record string `path:"-" query:"-" json:"record,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStepExecutionCreateInput holds the creation input of the WorkflowStepExecution entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepExecutionCreateInput) Model added in v0.4.0

Model returns the WorkflowStepExecution entity for creating, after validating.

func (*WorkflowStepExecutionCreateInput) SetGinContext added in v0.4.0

func (ic *WorkflowStepExecutionCreateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepExecutionCreateInput) SetModelClient added in v0.4.0

func (ic *WorkflowStepExecutionCreateInput) SetModelClient(cli *Client)

func (*WorkflowStepExecutionCreateInput) Validate added in v0.4.0

func (wseci *WorkflowStepExecutionCreateInput) Validate() error

Validate checks the WorkflowStepExecutionCreateInput entity.

func (*WorkflowStepExecutionCreateInput) ValidateWith added in v0.4.0

func (wseci *WorkflowStepExecutionCreateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionCreateInput entity with the given context and client set.

type WorkflowStepExecutionCreateInputs added in v0.4.0

type WorkflowStepExecutionCreateInputs struct {

	// Project indicates to create WorkflowStepExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// StageExecution indicates to create WorkflowStepExecution entity MUST under the StageExecution route.
	StageExecution *WorkflowStageExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStepExecutionCreateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStepExecutionCreateInputs holds the creation input of the WorkflowStepExecution entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepExecutionCreateInputs) Model added in v0.4.0

Model returns the WorkflowStepExecution entities for creating, after validating.

func (*WorkflowStepExecutionCreateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStepExecutionCreateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStepExecutionCreateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStepExecutionCreateInputs) SetModelClient(cli *Client)

func (*WorkflowStepExecutionCreateInputs) Validate added in v0.4.0

func (wseci *WorkflowStepExecutionCreateInputs) Validate() error

Validate checks the WorkflowStepExecutionCreateInputs entity .

func (*WorkflowStepExecutionCreateInputs) ValidateWith added in v0.4.0

func (wseci *WorkflowStepExecutionCreateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionCreateInputs entity with the given context and client set.

type WorkflowStepExecutionCreateInputsItem added in v0.4.0

type WorkflowStepExecutionCreateInputsItem struct {
	// Type of the workflow step execution.
	Type string `path:"-" query:"-" json:"type"`
	// ID of the workflow that this workflow step execution belongs to.
	WorkflowID object.ID `path:"-" query:"-" json:"workflowID"`
	// ID of the workflow execution that this workflow step execution belongs to.
	WorkflowExecutionID object.ID `path:"-" query:"-" json:"workflowExecutionID"`
	// ID of the workflow step that this workflow step execution belongs to.
	WorkflowStepID object.ID `path:"-" query:"-" json:"workflowStepID"`
	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Attributes of the workflow step execution.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout of the workflow step execution.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// Log record of the workflow step execution.
	Record string `path:"-" query:"-" json:"record,omitempty"`
}

WorkflowStepExecutionCreateInputs holds the creation input item of the WorkflowStepExecution entities.

func (*WorkflowStepExecutionCreateInputsItem) ValidateWith added in v0.4.0

func (wseci *WorkflowStepExecutionCreateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionCreateInputsItem entity with the given context and client set.

type WorkflowStepExecutionDelete added in v0.4.0

type WorkflowStepExecutionDelete struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionDelete is the builder for deleting a WorkflowStepExecution entity.

func (*WorkflowStepExecutionDelete) Exec added in v0.4.0

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorkflowStepExecutionDelete) ExecContext added in v0.4.0

func (c *WorkflowStepExecutionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecutionDelete) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepExecutionDelete) QueryContext added in v0.4.0

func (c *WorkflowStepExecutionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecutionDelete) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepExecutionDelete builder.

type WorkflowStepExecutionDeleteInput added in v0.4.0

type WorkflowStepExecutionDeleteInput struct {
	WorkflowStepExecutionQueryInput `path:",inline"`
}

WorkflowStepExecutionDeleteInput holds the deletion input of the WorkflowStepExecution entity, please tags with `path:",inline"` if embedding.

func (*WorkflowStepExecutionDeleteInput) SetGinContext added in v0.4.0

func (ic *WorkflowStepExecutionDeleteInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepExecutionDeleteInput) SetModelClient added in v0.4.0

func (ic *WorkflowStepExecutionDeleteInput) SetModelClient(cli *Client)

type WorkflowStepExecutionDeleteInputs added in v0.4.0

type WorkflowStepExecutionDeleteInputs struct {

	// Project indicates to delete WorkflowStepExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// StageExecution indicates to delete WorkflowStepExecution entity MUST under the StageExecution route.
	StageExecution *WorkflowStageExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStepExecutionDeleteInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStepExecutionDeleteInputs holds the deletion input of the WorkflowStepExecution entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepExecutionDeleteInputs) IDs added in v0.4.0

IDs returns the ID list of the WorkflowStepExecution entities for deleting, after validating.

func (*WorkflowStepExecutionDeleteInputs) Model added in v0.4.0

Model returns the WorkflowStepExecution entities for deleting, after validating.

func (*WorkflowStepExecutionDeleteInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStepExecutionDeleteInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStepExecutionDeleteInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStepExecutionDeleteInputs) SetModelClient(cli *Client)

func (*WorkflowStepExecutionDeleteInputs) Validate added in v0.4.0

func (wsedi *WorkflowStepExecutionDeleteInputs) Validate() error

Validate checks the WorkflowStepExecutionDeleteInputs entity.

func (*WorkflowStepExecutionDeleteInputs) ValidateWith added in v0.4.0

func (wsedi *WorkflowStepExecutionDeleteInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionDeleteInputs entity with the given context and client set.

type WorkflowStepExecutionDeleteInputsItem added in v0.4.0

type WorkflowStepExecutionDeleteInputsItem struct {
	// ID of the WorkflowStepExecution entity.
	ID object.ID `path:"-" query:"-" json:"id"`
}

WorkflowStepExecutionDeleteInputs holds the deletion input item of the WorkflowStepExecution entities.

type WorkflowStepExecutionDeleteOne added in v0.4.0

type WorkflowStepExecutionDeleteOne struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionDeleteOne is the builder for deleting a single WorkflowStepExecution entity.

func (*WorkflowStepExecutionDeleteOne) Exec added in v0.4.0

Exec executes the deletion query.

func (*WorkflowStepExecutionDeleteOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepExecutionDeleteOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepExecutionDelete builder.

type WorkflowStepExecutionEdges added in v0.4.0

type WorkflowStepExecutionEdges struct {
	// Project to which the workflow step execution belongs.
	Project *Project `json:"project,omitempty"`
	// Workflow stage execution that this workflow step execution belongs to.
	StageExecution *WorkflowStageExecution `json:"stage_execution,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStepExecutionEdges holds the relations/edges for other nodes in the graph.

func (WorkflowStepExecutionEdges) ProjectOrErr added in v0.4.0

func (e WorkflowStepExecutionEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WorkflowStepExecutionEdges) StageExecutionOrErr added in v0.4.0

func (e WorkflowStepExecutionEdges) StageExecutionOrErr() (*WorkflowStageExecution, error)

StageExecutionOrErr returns the StageExecution value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WorkflowStepExecutionGroupBy added in v0.4.0

type WorkflowStepExecutionGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionGroupBy is the group-by builder for WorkflowStepExecution entities.

func (*WorkflowStepExecutionGroupBy) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowStepExecutionGroupBy) Bool added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionGroupBy) BoolX added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowStepExecutionGroupBy) Bools added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionGroupBy) BoolsX added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowStepExecutionGroupBy) Float64 added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionGroupBy) Float64X added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowStepExecutionGroupBy) Float64s added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionGroupBy) Float64sX added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowStepExecutionGroupBy) Int added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionGroupBy) IntX added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowStepExecutionGroupBy) Ints added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionGroupBy) IntsX added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowStepExecutionGroupBy) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*WorkflowStepExecutionGroupBy) ScanX added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowStepExecutionGroupBy) String added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionGroupBy) StringX added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowStepExecutionGroupBy) Strings added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionGroupBy) StringsX added in v0.4.0

func (s *WorkflowStepExecutionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowStepExecutionMutation added in v0.4.0

type WorkflowStepExecutionMutation struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionMutation represents an operation that mutates the WorkflowStepExecution nodes in the graph.

func (*WorkflowStepExecutionMutation) AddDuration added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddDuration(i int)

AddDuration adds i to the "duration" field.

func (*WorkflowStepExecutionMutation) AddField added in v0.4.0

func (m *WorkflowStepExecutionMutation) 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 (*WorkflowStepExecutionMutation) AddOrder added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddOrder(i int)

AddOrder adds i to the "order" field.

func (*WorkflowStepExecutionMutation) AddTimeout added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddTimeout(i int)

AddTimeout adds i to the "timeout" field.

func (*WorkflowStepExecutionMutation) AddTimes added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddTimes(i int)

AddTimes adds i to the "times" field.

func (*WorkflowStepExecutionMutation) AddedDuration added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddedDuration() (r int, exists bool)

AddedDuration returns the value that was added to the "duration" field in this mutation.

func (*WorkflowStepExecutionMutation) AddedEdges added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowStepExecutionMutation) AddedField added in v0.4.0

func (m *WorkflowStepExecutionMutation) 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 (*WorkflowStepExecutionMutation) AddedFields added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowStepExecutionMutation) AddedIDs added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorkflowStepExecutionMutation) AddedOrder added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddedOrder() (r int, exists bool)

AddedOrder returns the value that was added to the "order" field in this mutation.

func (*WorkflowStepExecutionMutation) AddedTimeout added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddedTimeout() (r int, exists bool)

AddedTimeout returns the value that was added to the "timeout" field in this mutation.

func (*WorkflowStepExecutionMutation) AddedTimes added in v0.4.0

func (m *WorkflowStepExecutionMutation) AddedTimes() (r int, exists bool)

AddedTimes returns the value that was added to the "times" field in this mutation.

func (*WorkflowStepExecutionMutation) Annotations added in v0.4.0

func (m *WorkflowStepExecutionMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*WorkflowStepExecutionMutation) AnnotationsCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*WorkflowStepExecutionMutation) Attributes added in v0.4.0

func (m *WorkflowStepExecutionMutation) Attributes() (r map[string]interface{}, exists bool)

Attributes returns the value of the "attributes" field in the mutation.

func (*WorkflowStepExecutionMutation) AttributesCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) AttributesCleared() bool

AttributesCleared returns if the "attributes" field was cleared in this mutation.

func (*WorkflowStepExecutionMutation) ClearAnnotations added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepExecutionMutation) ClearAttributes added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearAttributes()

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepExecutionMutation) ClearDescription added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*WorkflowStepExecutionMutation) ClearEdge added in v0.4.0

func (m *WorkflowStepExecutionMutation) 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 (*WorkflowStepExecutionMutation) ClearExecuteTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearExecuteTime()

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStepExecutionMutation) ClearField added in v0.4.0

func (m *WorkflowStepExecutionMutation) 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 (*WorkflowStepExecutionMutation) ClearLabels added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepExecutionMutation) ClearProject added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*WorkflowStepExecutionMutation) ClearRetryStrategy added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearRetryStrategy()

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepExecutionMutation) ClearStageExecution added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearStageExecution()

ClearStageExecution clears the "stage_execution" edge to the WorkflowStageExecution entity.

func (*WorkflowStepExecutionMutation) ClearStatus added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*WorkflowStepExecutionMutation) ClearedEdges added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowStepExecutionMutation) ClearedFields added in v0.4.0

func (m *WorkflowStepExecutionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowStepExecutionMutation) Client added in v0.4.0

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 (*WorkflowStepExecutionMutation) CreateTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*WorkflowStepExecutionMutation) Description added in v0.4.0

func (m *WorkflowStepExecutionMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*WorkflowStepExecutionMutation) DescriptionCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*WorkflowStepExecutionMutation) Duration added in v0.4.0

func (m *WorkflowStepExecutionMutation) Duration() (r int, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*WorkflowStepExecutionMutation) EdgeCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorkflowStepExecutionMutation) ExecContext added in v0.4.0

func (c *WorkflowStepExecutionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecutionMutation) ExecuteTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) ExecuteTime() (r time.Time, exists bool)

ExecuteTime returns the value of the "execute_time" field in the mutation.

func (*WorkflowStepExecutionMutation) ExecuteTimeCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) ExecuteTimeCleared() bool

ExecuteTimeCleared returns if the "execute_time" field was cleared in this mutation.

func (*WorkflowStepExecutionMutation) Field added in v0.4.0

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 (*WorkflowStepExecutionMutation) FieldCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorkflowStepExecutionMutation) Fields added in v0.4.0

func (m *WorkflowStepExecutionMutation) 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 (*WorkflowStepExecutionMutation) GetType added in v0.4.0

func (m *WorkflowStepExecutionMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*WorkflowStepExecutionMutation) ID added in v0.4.0

func (m *WorkflowStepExecutionMutation) ID() (id object.ID, 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 (*WorkflowStepExecutionMutation) IDs added in v0.4.0

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 (*WorkflowStepExecutionMutation) Labels added in v0.4.0

func (m *WorkflowStepExecutionMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*WorkflowStepExecutionMutation) LabelsCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*WorkflowStepExecutionMutation) Name added in v0.4.0

func (m *WorkflowStepExecutionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WorkflowStepExecutionMutation) OldAnnotations added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldAttributes added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldAttributes(ctx context.Context) (v map[string]interface{}, err error)

OldAttributes returns the old "attributes" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldCreateTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldDescription added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldDuration added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldDuration(ctx context.Context) (v int, err error)

OldDuration returns the old "duration" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldExecuteTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldExecuteTime(ctx context.Context) (v time.Time, err error)

OldExecuteTime returns the old "execute_time" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldField added in v0.4.0

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 (*WorkflowStepExecutionMutation) OldLabels added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldName added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldOrder added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldOrder(ctx context.Context) (v int, err error)

OldOrder returns the old "order" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldProjectID added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldRecord added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldRecord(ctx context.Context) (v string, err error)

OldRecord returns the old "record" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldRetryStrategy added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldRetryStrategy(ctx context.Context) (v *types.RetryStrategy, err error)

OldRetryStrategy returns the old "retryStrategy" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldStatus added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldStatus(ctx context.Context) (v status.Status, err error)

OldStatus returns the old "status" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldTimeout added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldTimeout(ctx context.Context) (v int, err error)

OldTimeout returns the old "timeout" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldTimes added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldTimes(ctx context.Context) (v int, err error)

OldTimes returns the old "times" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldType added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldUpdateTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldWorkflowExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldWorkflowExecutionID(ctx context.Context) (v object.ID, err error)

OldWorkflowExecutionID returns the old "workflow_execution_id" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldWorkflowID added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldWorkflowID(ctx context.Context) (v object.ID, err error)

OldWorkflowID returns the old "workflow_id" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldWorkflowStageExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldWorkflowStageExecutionID(ctx context.Context) (v object.ID, err error)

OldWorkflowStageExecutionID returns the old "workflow_stage_execution_id" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) OldWorkflowStepID added in v0.4.0

func (m *WorkflowStepExecutionMutation) OldWorkflowStepID(ctx context.Context) (v object.ID, err error)

OldWorkflowStepID returns the old "workflow_step_id" field's value of the WorkflowStepExecution entity. If the WorkflowStepExecution 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 (*WorkflowStepExecutionMutation) Op added in v0.4.0

Op returns the operation name.

func (*WorkflowStepExecutionMutation) Order added in v0.4.0

func (m *WorkflowStepExecutionMutation) Order() (r int, exists bool)

Order returns the value of the "order" field in the mutation.

func (*WorkflowStepExecutionMutation) ProjectCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*WorkflowStepExecutionMutation) ProjectID added in v0.4.0

func (m *WorkflowStepExecutionMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*WorkflowStepExecutionMutation) ProjectIDs added in v0.4.0

func (m *WorkflowStepExecutionMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*WorkflowStepExecutionMutation) QueryContext added in v0.4.0

func (c *WorkflowStepExecutionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecutionMutation) Record added in v0.4.0

func (m *WorkflowStepExecutionMutation) Record() (r string, exists bool)

Record returns the value of the "record" field in the mutation.

func (*WorkflowStepExecutionMutation) RemovedEdges added in v0.4.0

func (m *WorkflowStepExecutionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowStepExecutionMutation) RemovedIDs added in v0.4.0

func (m *WorkflowStepExecutionMutation) 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 (*WorkflowStepExecutionMutation) ResetAnnotations added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*WorkflowStepExecutionMutation) ResetAttributes added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetAttributes()

ResetAttributes resets all changes to the "attributes" field.

func (*WorkflowStepExecutionMutation) ResetCreateTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*WorkflowStepExecutionMutation) ResetDescription added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*WorkflowStepExecutionMutation) ResetDuration added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*WorkflowStepExecutionMutation) ResetEdge added in v0.4.0

func (m *WorkflowStepExecutionMutation) 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 (*WorkflowStepExecutionMutation) ResetExecuteTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetExecuteTime()

ResetExecuteTime resets all changes to the "execute_time" field.

func (*WorkflowStepExecutionMutation) ResetField added in v0.4.0

func (m *WorkflowStepExecutionMutation) 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 (*WorkflowStepExecutionMutation) ResetLabels added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*WorkflowStepExecutionMutation) ResetName added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WorkflowStepExecutionMutation) ResetOrder added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetOrder()

ResetOrder resets all changes to the "order" field.

func (*WorkflowStepExecutionMutation) ResetProject added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*WorkflowStepExecutionMutation) ResetProjectID added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*WorkflowStepExecutionMutation) ResetRecord added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetRecord()

ResetRecord resets all changes to the "record" field.

func (*WorkflowStepExecutionMutation) ResetRetryStrategy added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetRetryStrategy()

ResetRetryStrategy resets all changes to the "retryStrategy" field.

func (*WorkflowStepExecutionMutation) ResetStageExecution added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetStageExecution()

ResetStageExecution resets all changes to the "stage_execution" edge.

func (*WorkflowStepExecutionMutation) ResetStatus added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*WorkflowStepExecutionMutation) ResetTimeout added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetTimeout()

ResetTimeout resets all changes to the "timeout" field.

func (*WorkflowStepExecutionMutation) ResetTimes added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetTimes()

ResetTimes resets all changes to the "times" field.

func (*WorkflowStepExecutionMutation) ResetType added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*WorkflowStepExecutionMutation) ResetUpdateTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*WorkflowStepExecutionMutation) ResetWorkflowExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetWorkflowExecutionID()

ResetWorkflowExecutionID resets all changes to the "workflow_execution_id" field.

func (*WorkflowStepExecutionMutation) ResetWorkflowID added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetWorkflowID()

ResetWorkflowID resets all changes to the "workflow_id" field.

func (*WorkflowStepExecutionMutation) ResetWorkflowStageExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetWorkflowStageExecutionID()

ResetWorkflowStageExecutionID resets all changes to the "workflow_stage_execution_id" field.

func (*WorkflowStepExecutionMutation) ResetWorkflowStepID added in v0.4.0

func (m *WorkflowStepExecutionMutation) ResetWorkflowStepID()

ResetWorkflowStepID resets all changes to the "workflow_step_id" field.

func (*WorkflowStepExecutionMutation) RetryStrategy added in v0.4.0

func (m *WorkflowStepExecutionMutation) RetryStrategy() (r *types.RetryStrategy, exists bool)

RetryStrategy returns the value of the "retryStrategy" field in the mutation.

func (*WorkflowStepExecutionMutation) RetryStrategyCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) RetryStrategyCleared() bool

RetryStrategyCleared returns if the "retryStrategy" field was cleared in this mutation.

func (*WorkflowStepExecutionMutation) SetAnnotations added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*WorkflowStepExecutionMutation) SetAttributes added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetAttributes(value map[string]interface{})

SetAttributes sets the "attributes" field.

func (*WorkflowStepExecutionMutation) SetCreateTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*WorkflowStepExecutionMutation) SetDescription added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*WorkflowStepExecutionMutation) SetDuration added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetDuration(i int)

SetDuration sets the "duration" field.

func (*WorkflowStepExecutionMutation) SetExecuteTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetExecuteTime(t time.Time)

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStepExecutionMutation) SetField added in v0.4.0

func (m *WorkflowStepExecutionMutation) 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 (*WorkflowStepExecutionMutation) SetID added in v0.4.0

SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowStepExecution entities.

func (*WorkflowStepExecutionMutation) SetLabels added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*WorkflowStepExecutionMutation) SetName added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetName(s string)

SetName sets the "name" field.

func (*WorkflowStepExecutionMutation) SetOp added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowStepExecutionMutation) SetOrder added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetOrder(i int)

SetOrder sets the "order" field.

func (*WorkflowStepExecutionMutation) SetProjectID added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*WorkflowStepExecutionMutation) SetRecord added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetRecord(s string)

SetRecord sets the "record" field.

func (*WorkflowStepExecutionMutation) SetRetryStrategy added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetRetryStrategy(ts *types.RetryStrategy)

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepExecutionMutation) SetStageExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetStageExecutionID(id object.ID)

SetStageExecutionID sets the "stage_execution" edge to the WorkflowStageExecution entity by id.

func (*WorkflowStepExecutionMutation) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStepExecutionMutation) SetTimeout added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetTimeout(i int)

SetTimeout sets the "timeout" field.

func (*WorkflowStepExecutionMutation) SetTimes added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetTimes(i int)

SetTimes sets the "times" field.

func (*WorkflowStepExecutionMutation) SetType added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetType(s string)

SetType sets the "type" field.

func (*WorkflowStepExecutionMutation) SetUpdateTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepExecutionMutation) SetWorkflowExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetWorkflowExecutionID(o object.ID)

SetWorkflowExecutionID sets the "workflow_execution_id" field.

func (*WorkflowStepExecutionMutation) SetWorkflowID added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetWorkflowID(o object.ID)

SetWorkflowID sets the "workflow_id" field.

func (*WorkflowStepExecutionMutation) SetWorkflowStageExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetWorkflowStageExecutionID(o object.ID)

SetWorkflowStageExecutionID sets the "workflow_stage_execution_id" field.

func (*WorkflowStepExecutionMutation) SetWorkflowStepID added in v0.4.0

func (m *WorkflowStepExecutionMutation) SetWorkflowStepID(o object.ID)

SetWorkflowStepID sets the "workflow_step_id" field.

func (*WorkflowStepExecutionMutation) StageExecutionCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) StageExecutionCleared() bool

StageExecutionCleared reports if the "stage_execution" edge to the WorkflowStageExecution entity was cleared.

func (*WorkflowStepExecutionMutation) StageExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) StageExecutionID() (id object.ID, exists bool)

StageExecutionID returns the "stage_execution" edge ID in the mutation.

func (*WorkflowStepExecutionMutation) StageExecutionIDs added in v0.4.0

func (m *WorkflowStepExecutionMutation) StageExecutionIDs() (ids []object.ID)

StageExecutionIDs returns the "stage_execution" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StageExecutionID instead. It exists only for internal usage by the builders.

func (*WorkflowStepExecutionMutation) Status added in v0.4.0

func (m *WorkflowStepExecutionMutation) Status() (r status.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*WorkflowStepExecutionMutation) StatusCleared added in v0.4.0

func (m *WorkflowStepExecutionMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*WorkflowStepExecutionMutation) Timeout added in v0.4.0

func (m *WorkflowStepExecutionMutation) Timeout() (r int, exists bool)

Timeout returns the value of the "timeout" field in the mutation.

func (*WorkflowStepExecutionMutation) Times added in v0.4.0

func (m *WorkflowStepExecutionMutation) Times() (r int, exists bool)

Times returns the value of the "times" field in the mutation.

func (WorkflowStepExecutionMutation) Tx added in v0.4.0

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorkflowStepExecutionMutation) Type added in v0.4.0

Type returns the node type of this mutation (WorkflowStepExecution).

func (*WorkflowStepExecutionMutation) UpdateTime added in v0.4.0

func (m *WorkflowStepExecutionMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*WorkflowStepExecutionMutation) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepExecutionMutation builder.

func (*WorkflowStepExecutionMutation) WhereP added in v0.4.0

func (m *WorkflowStepExecutionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowStepExecutionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowStepExecutionMutation) WorkflowExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) WorkflowExecutionID() (r object.ID, exists bool)

WorkflowExecutionID returns the value of the "workflow_execution_id" field in the mutation.

func (*WorkflowStepExecutionMutation) WorkflowID added in v0.4.0

func (m *WorkflowStepExecutionMutation) WorkflowID() (r object.ID, exists bool)

WorkflowID returns the value of the "workflow_id" field in the mutation.

func (*WorkflowStepExecutionMutation) WorkflowStageExecutionID added in v0.4.0

func (m *WorkflowStepExecutionMutation) WorkflowStageExecutionID() (r object.ID, exists bool)

WorkflowStageExecutionID returns the value of the "workflow_stage_execution_id" field in the mutation.

func (*WorkflowStepExecutionMutation) WorkflowStepID added in v0.4.0

func (m *WorkflowStepExecutionMutation) WorkflowStepID() (r object.ID, exists bool)

WorkflowStepID returns the value of the "workflow_step_id" field in the mutation.

type WorkflowStepExecutionOutput added in v0.4.0

type WorkflowStepExecutionOutput struct {
	ID                  object.ID              `json:"id,omitempty"`
	Name                string                 `json:"name,omitempty"`
	Description         string                 `json:"description,omitempty"`
	Labels              map[string]string      `json:"labels,omitempty"`
	CreateTime          *time.Time             `json:"createTime,omitempty"`
	UpdateTime          *time.Time             `json:"updateTime,omitempty"`
	Status              status.Status          `json:"status,omitempty"`
	WorkflowStepID      object.ID              `json:"workflowStepID,omitempty"`
	WorkflowExecutionID object.ID              `json:"workflowExecutionID,omitempty"`
	WorkflowID          object.ID              `json:"workflowID,omitempty"`
	Type                string                 `json:"type,omitempty"`
	Attributes          map[string]interface{} `json:"attributes,omitempty"`
	ExecuteTime         time.Time              `json:"executeTime,omitempty"`
	Duration            int                    `json:"duration,omitempty"`
	RetryStrategy       *types.RetryStrategy   `json:"retryStrategy,omitempty"`
	Timeout             int                    `json:"timeout,omitempty"`
	Record              string                 `json:"record,omitempty"`

	Project        *ProjectOutput                `json:"project,omitempty"`
	StageExecution *WorkflowStageExecutionOutput `json:"stageExecution,omitempty"`
}

WorkflowStepExecutionOutput holds the output of the WorkflowStepExecution entity.

func ExposeWorkflowStepExecution added in v0.4.0

func ExposeWorkflowStepExecution(_wse *WorkflowStepExecution) *WorkflowStepExecutionOutput

ExposeWorkflowStepExecution converts the WorkflowStepExecution to WorkflowStepExecutionOutput.

func ExposeWorkflowStepExecutions added in v0.4.0

func ExposeWorkflowStepExecutions(_wses []*WorkflowStepExecution) []*WorkflowStepExecutionOutput

ExposeWorkflowStepExecutions converts the WorkflowStepExecution slice to WorkflowStepExecutionOutput pointer slice.

type WorkflowStepExecutionPatchInput added in v0.5.0

type WorkflowStepExecutionPatchInput struct {
	WorkflowStepExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Status holds the value of the "status" field.
	Status status.Status `path:"-" query:"-" json:"status,omitempty"`
	// ID of the workflow step that this workflow step execution belongs to.
	WorkflowStepID object.ID `path:"-" query:"-" json:"workflowStepID,omitempty"`
	// ID of the workflow execution that this workflow step execution belongs to.
	WorkflowExecutionID object.ID `path:"-" query:"-" json:"workflowExecutionID,omitempty"`
	// ID of the workflow that this workflow step execution belongs to.
	WorkflowID object.ID `path:"-" query:"-" json:"workflowID,omitempty"`
	// Type of the workflow step execution.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// Attributes of the workflow step execution.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Number of times that this workflow step execution has been executed.
	Times int `path:"-" query:"-" json:"times,omitempty"`
	// Time of the step execution started.
	ExecuteTime time.Time `path:"-" query:"-" json:"executeTime,omitempty"`
	// Execution duration seconds of the workflow step.
	Duration int `path:"-" query:"-" json:"duration,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout of the workflow step execution.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// Order of the workflow step execution.
	Order int `path:"-" query:"-" json:"order,omitempty"`
	// Log record of the workflow step execution.
	Record string `path:"-" query:"-" json:"record,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStepExecutionPatchInput holds the patch input of the WorkflowStepExecution entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepExecutionPatchInput) Model added in v0.5.0

Model returns the WorkflowStepExecution patched entity, after validating.

func (*WorkflowStepExecutionPatchInput) PatchModel added in v0.5.0

PatchModel returns the WorkflowStepExecution partition entity for patching.

func (*WorkflowStepExecutionPatchInput) SetGinContext added in v0.5.0

func (ic *WorkflowStepExecutionPatchInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepExecutionPatchInput) SetModelClient added in v0.5.0

func (ic *WorkflowStepExecutionPatchInput) SetModelClient(cli *Client)

func (*WorkflowStepExecutionPatchInput) Validate added in v0.5.0

func (wsepi *WorkflowStepExecutionPatchInput) Validate() error

Validate checks the WorkflowStepExecutionPatchInput entity.

func (*WorkflowStepExecutionPatchInput) ValidateWith added in v0.5.0

func (wsepi *WorkflowStepExecutionPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionPatchInput entity with the given context and client set.

type WorkflowStepExecutionQuery added in v0.4.0

type WorkflowStepExecutionQuery struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionQuery is the builder for querying WorkflowStepExecution entities.

func (*WorkflowStepExecutionQuery) Aggregate added in v0.4.0

Aggregate returns a WorkflowStepExecutionSelect configured with the given aggregations.

func (*WorkflowStepExecutionQuery) All added in v0.4.0

All executes the query and returns a list of WorkflowStepExecutions.

func (*WorkflowStepExecutionQuery) AllX added in v0.4.0

AllX is like All, but panics if an error occurs.

func (*WorkflowStepExecutionQuery) Clone added in v0.4.0

Clone returns a duplicate of the WorkflowStepExecutionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorkflowStepExecutionQuery) Count added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorkflowStepExecutionQuery) CountX added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowStepExecutionQuery) ExecContext added in v0.4.0

func (c *WorkflowStepExecutionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecutionQuery) Exist added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WorkflowStepExecutionQuery) ExistX added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowStepExecutionQuery) First added in v0.4.0

First returns the first WorkflowStepExecution entity from the query. Returns a *NotFoundError when no WorkflowStepExecution was found.

func (*WorkflowStepExecutionQuery) FirstID added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first WorkflowStepExecution ID from the query. Returns a *NotFoundError when no WorkflowStepExecution ID was found.

func (*WorkflowStepExecutionQuery) FirstIDX added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowStepExecutionQuery) FirstX added in v0.4.0

FirstX is like First, but panics if an error occurs.

func (*WorkflowStepExecutionQuery) ForShare added in v0.4.0

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 (*WorkflowStepExecutionQuery) ForUpdate added in v0.4.0

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 (*WorkflowStepExecutionQuery) GroupBy added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) GroupBy(field string, fields ...string) *WorkflowStepExecutionGroupBy

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.WorkflowStepExecution.Query().
	GroupBy(workflowstepexecution.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*WorkflowStepExecutionQuery) IDs added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of WorkflowStepExecution IDs.

func (*WorkflowStepExecutionQuery) IDsX added in v0.4.0

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowStepExecutionQuery) Limit added in v0.4.0

Limit the number of records to be returned by this query.

func (*WorkflowStepExecutionQuery) Modify added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowStepExecutionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowStepExecutionQuery) Offset added in v0.4.0

Offset to start from.

func (*WorkflowStepExecutionQuery) Only added in v0.4.0

Only returns a single WorkflowStepExecution entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowStepExecution entity is found. Returns a *NotFoundError when no WorkflowStepExecution entities are found.

func (*WorkflowStepExecutionQuery) OnlyID added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only WorkflowStepExecution ID in the query. Returns a *NotSingularError when more than one WorkflowStepExecution ID is found. Returns a *NotFoundError when no entities are found.

func (*WorkflowStepExecutionQuery) OnlyIDX added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowStepExecutionQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowStepExecutionQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*WorkflowStepExecutionQuery) QueryContext added in v0.4.0

func (c *WorkflowStepExecutionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecutionQuery) QueryProject added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*WorkflowStepExecutionQuery) QueryStageExecution added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) QueryStageExecution() *WorkflowStageExecutionQuery

QueryStageExecution chains the current query on the "stage_execution" edge.

func (*WorkflowStepExecutionQuery) Select added in v0.4.0

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.WorkflowStepExecution.Query().
	Select(workflowstepexecution.FieldName).
	Scan(ctx, &v)

func (*WorkflowStepExecutionQuery) Unique added in v0.4.0

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 (*WorkflowStepExecutionQuery) Where added in v0.4.0

Where adds a new predicate for the WorkflowStepExecutionQuery builder.

func (*WorkflowStepExecutionQuery) WhereP added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowStepExecutionQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowStepExecutionQuery) WithProject added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) WithProject(opts ...func(*ProjectQuery)) *WorkflowStepExecutionQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowStepExecutionQuery) WithStageExecution added in v0.4.0

func (wseq *WorkflowStepExecutionQuery) WithStageExecution(opts ...func(*WorkflowStageExecutionQuery)) *WorkflowStepExecutionQuery

WithStageExecution tells the query-builder to eager-load the nodes that are connected to the "stage_execution" edge. The optional arguments are used to configure the query builder of the edge.

type WorkflowStepExecutionQueryInput added in v0.4.0

type WorkflowStepExecutionQueryInput struct {

	// Project indicates to query WorkflowStepExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project"`
	// StageExecution indicates to query WorkflowStepExecution entity MUST under the StageExecution route.
	StageExecution *WorkflowStageExecutionQueryInput `path:",inline" query:"-" json:"stageExecution"`

	// Refer holds the route path reference of the WorkflowStepExecution entity.
	Refer *object.Refer `path:"workflowstepexecution,default=" query:"-" json:"-"`
	// ID of the WorkflowStepExecution entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

WorkflowStepExecutionQueryInput holds the query input of the WorkflowStepExecution entity, please tags with `path:",inline"` if embedding.

func (*WorkflowStepExecutionQueryInput) Model added in v0.4.0

Model returns the WorkflowStepExecution entity for querying, after validating.

func (*WorkflowStepExecutionQueryInput) SetGinContext added in v0.4.0

func (ic *WorkflowStepExecutionQueryInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepExecutionQueryInput) SetModelClient added in v0.4.0

func (ic *WorkflowStepExecutionQueryInput) SetModelClient(cli *Client)

func (*WorkflowStepExecutionQueryInput) Validate added in v0.4.0

func (wseqi *WorkflowStepExecutionQueryInput) Validate() error

Validate checks the WorkflowStepExecutionQueryInput entity.

func (*WorkflowStepExecutionQueryInput) ValidateWith added in v0.4.0

func (wseqi *WorkflowStepExecutionQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionQueryInput entity with the given context and client set.

type WorkflowStepExecutionQueryInputs added in v0.4.0

type WorkflowStepExecutionQueryInputs struct {

	// Project indicates to query WorkflowStepExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// StageExecution indicates to query WorkflowStepExecution entity MUST under the StageExecution route.
	StageExecution *WorkflowStageExecutionQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

WorkflowStepExecutionQueryInputs holds the query input of the WorkflowStepExecution entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*WorkflowStepExecutionQueryInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStepExecutionQueryInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStepExecutionQueryInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStepExecutionQueryInputs) SetModelClient(cli *Client)

func (*WorkflowStepExecutionQueryInputs) Validate added in v0.4.0

func (wseqi *WorkflowStepExecutionQueryInputs) Validate() error

Validate checks the WorkflowStepExecutionQueryInputs entity.

func (*WorkflowStepExecutionQueryInputs) ValidateWith added in v0.4.0

func (wseqi *WorkflowStepExecutionQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionQueryInputs entity with the given context and client set.

type WorkflowStepExecutionSelect added in v0.4.0

type WorkflowStepExecutionSelect struct {
	*WorkflowStepExecutionQuery
	// contains filtered or unexported fields
}

WorkflowStepExecutionSelect is the builder for selecting fields of WorkflowStepExecution entities.

func (*WorkflowStepExecutionSelect) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowStepExecutionSelect) Bool added in v0.4.0

func (s *WorkflowStepExecutionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionSelect) BoolX added in v0.4.0

func (s *WorkflowStepExecutionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowStepExecutionSelect) Bools added in v0.4.0

func (s *WorkflowStepExecutionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionSelect) BoolsX added in v0.4.0

func (s *WorkflowStepExecutionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (WorkflowStepExecutionSelect) ExecContext added in v0.4.0

func (c WorkflowStepExecutionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecutionSelect) Float64 added in v0.4.0

func (s *WorkflowStepExecutionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionSelect) Float64X added in v0.4.0

func (s *WorkflowStepExecutionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowStepExecutionSelect) Float64s added in v0.4.0

func (s *WorkflowStepExecutionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionSelect) Float64sX added in v0.4.0

func (s *WorkflowStepExecutionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowStepExecutionSelect) Int added in v0.4.0

func (s *WorkflowStepExecutionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionSelect) IntX added in v0.4.0

func (s *WorkflowStepExecutionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowStepExecutionSelect) Ints added in v0.4.0

func (s *WorkflowStepExecutionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionSelect) IntsX added in v0.4.0

func (s *WorkflowStepExecutionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowStepExecutionSelect) Modify added in v0.4.0

func (wses *WorkflowStepExecutionSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowStepExecutionSelect

Modify adds a query modifier for attaching custom logic to queries.

func (WorkflowStepExecutionSelect) QueryContext added in v0.4.0

func (c WorkflowStepExecutionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecutionSelect) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*WorkflowStepExecutionSelect) ScanX added in v0.4.0

func (s *WorkflowStepExecutionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowStepExecutionSelect) String added in v0.4.0

func (s *WorkflowStepExecutionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionSelect) StringX added in v0.4.0

func (s *WorkflowStepExecutionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowStepExecutionSelect) Strings added in v0.4.0

func (s *WorkflowStepExecutionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowStepExecutionSelect) StringsX added in v0.4.0

func (s *WorkflowStepExecutionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowStepExecutionUpdate added in v0.4.0

type WorkflowStepExecutionUpdate struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionUpdate is the builder for updating WorkflowStepExecution entities.

func (*WorkflowStepExecutionUpdate) AddDuration added in v0.4.0

AddDuration adds i to the "duration" field.

func (*WorkflowStepExecutionUpdate) AddOrder added in v0.4.0

AddOrder adds i to the "order" field.

func (*WorkflowStepExecutionUpdate) AddTimeout added in v0.4.0

AddTimeout adds i to the "timeout" field.

func (*WorkflowStepExecutionUpdate) AddTimes added in v0.4.0

AddTimes adds i to the "times" field.

func (*WorkflowStepExecutionUpdate) ClearAnnotations added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) ClearAnnotations() *WorkflowStepExecutionUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepExecutionUpdate) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepExecutionUpdate) ClearDescription added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) ClearDescription() *WorkflowStepExecutionUpdate

ClearDescription clears the value of the "description" field.

func (*WorkflowStepExecutionUpdate) ClearExecuteTime added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) ClearExecuteTime() *WorkflowStepExecutionUpdate

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStepExecutionUpdate) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepExecutionUpdate) ClearRetryStrategy added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) ClearRetryStrategy() *WorkflowStepExecutionUpdate

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepExecutionUpdate) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStepExecutionUpdate) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStepExecutionUpdate) ExecContext added in v0.4.0

func (c *WorkflowStepExecutionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecutionUpdate) ExecX added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepExecutionUpdate) Modify added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowStepExecutionUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowStepExecutionUpdate) Mutation added in v0.4.0

Mutation returns the WorkflowStepExecutionMutation object of the builder.

func (*WorkflowStepExecutionUpdate) QueryContext added in v0.4.0

func (c *WorkflowStepExecutionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecutionUpdate) Save added in v0.4.0

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorkflowStepExecutionUpdate) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStepExecutionUpdate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStepExecutionUpdate) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStepExecutionUpdate) SetAttributes added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) SetAttributes(m map[string]interface{}) *WorkflowStepExecutionUpdate

SetAttributes sets the "attributes" field.

func (*WorkflowStepExecutionUpdate) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStepExecutionUpdate) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStepExecutionUpdate) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStepExecutionUpdate) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStepExecutionUpdate) SetNillableDescription added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) SetNillableDescription(s *string) *WorkflowStepExecutionUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStepExecutionUpdate) SetNillableDuration added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) SetNillableDuration(i *int) *WorkflowStepExecutionUpdate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*WorkflowStepExecutionUpdate) SetNillableExecuteTime added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) SetNillableExecuteTime(t *time.Time) *WorkflowStepExecutionUpdate

SetNillableExecuteTime sets the "execute_time" field if the given value is not nil.

func (*WorkflowStepExecutionUpdate) SetNillableOrder added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) SetNillableOrder(i *int) *WorkflowStepExecutionUpdate

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStepExecutionUpdate) SetNillableRecord added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) SetNillableRecord(s *string) *WorkflowStepExecutionUpdate

SetNillableRecord sets the "record" field if the given value is not nil.

func (*WorkflowStepExecutionUpdate) SetNillableStatus added in v0.4.0

SetNillableStatus sets the "status" field if the given value is not nil.

func (*WorkflowStepExecutionUpdate) SetNillableTimeout added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) SetNillableTimeout(i *int) *WorkflowStepExecutionUpdate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowStepExecutionUpdate) SetNillableTimes added in v0.4.0

func (wseu *WorkflowStepExecutionUpdate) SetNillableTimes(i *int) *WorkflowStepExecutionUpdate

SetNillableTimes sets the "times" field if the given value is not nil.

func (*WorkflowStepExecutionUpdate) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStepExecutionUpdate) SetRecord added in v0.4.0

SetRecord sets the "record" field.

func (*WorkflowStepExecutionUpdate) SetRetryStrategy added in v0.4.0

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepExecutionUpdate) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStepExecutionUpdate) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowStepExecutionUpdate) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowStepExecutionUpdate) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepExecutionUpdate) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepExecutionUpdate builder.

type WorkflowStepExecutionUpdateInput added in v0.4.0

type WorkflowStepExecutionUpdateInput struct {
	WorkflowStepExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Attributes of the workflow step execution.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout of the workflow step execution.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// Log record of the workflow step execution.
	Record string `path:"-" query:"-" json:"record,omitempty"`
}

WorkflowStepExecutionUpdateInput holds the modification input of the WorkflowStepExecution entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepExecutionUpdateInput) Model added in v0.4.0

Model returns the WorkflowStepExecution entity for modifying, after validating.

func (*WorkflowStepExecutionUpdateInput) SetGinContext added in v0.4.0

func (ic *WorkflowStepExecutionUpdateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepExecutionUpdateInput) SetModelClient added in v0.4.0

func (ic *WorkflowStepExecutionUpdateInput) SetModelClient(cli *Client)

func (*WorkflowStepExecutionUpdateInput) Validate added in v0.4.0

func (wseui *WorkflowStepExecutionUpdateInput) Validate() error

Validate checks the WorkflowStepExecutionUpdateInput entity.

func (*WorkflowStepExecutionUpdateInput) ValidateWith added in v0.4.0

func (wseui *WorkflowStepExecutionUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionUpdateInput entity with the given context and client set.

type WorkflowStepExecutionUpdateInputs added in v0.4.0

type WorkflowStepExecutionUpdateInputs struct {

	// Project indicates to update WorkflowStepExecution entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// StageExecution indicates to update WorkflowStepExecution entity MUST under the StageExecution route.
	StageExecution *WorkflowStageExecutionQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStepExecutionUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStepExecutionUpdateInputs holds the modification input of the WorkflowStepExecution entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepExecutionUpdateInputs) IDs added in v0.4.0

IDs returns the ID list of the WorkflowStepExecution entities for modifying, after validating.

func (*WorkflowStepExecutionUpdateInputs) Model added in v0.4.0

Model returns the WorkflowStepExecution entities for modifying, after validating.

func (*WorkflowStepExecutionUpdateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStepExecutionUpdateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStepExecutionUpdateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStepExecutionUpdateInputs) SetModelClient(cli *Client)

func (*WorkflowStepExecutionUpdateInputs) Validate added in v0.4.0

func (wseui *WorkflowStepExecutionUpdateInputs) Validate() error

Validate checks the WorkflowStepExecutionUpdateInputs entity.

func (*WorkflowStepExecutionUpdateInputs) ValidateWith added in v0.4.0

func (wseui *WorkflowStepExecutionUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionUpdateInputs entity with the given context and client set.

type WorkflowStepExecutionUpdateInputsItem added in v0.4.0

type WorkflowStepExecutionUpdateInputsItem struct {
	// ID of the WorkflowStepExecution entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Attributes of the workflow step execution.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout of the workflow step execution.
	Timeout int `path:"-" query:"-" json:"timeout"`
	// Log record of the workflow step execution.
	Record string `path:"-" query:"-" json:"record"`
}

WorkflowStepExecutionUpdateInputs holds the modification input item of the WorkflowStepExecution entities.

func (*WorkflowStepExecutionUpdateInputsItem) ValidateWith added in v0.4.0

func (wseui *WorkflowStepExecutionUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepExecutionUpdateInputsItem entity with the given context and client set.

type WorkflowStepExecutionUpdateOne added in v0.4.0

type WorkflowStepExecutionUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionUpdateOne is the builder for updating a single WorkflowStepExecution entity.

func (*WorkflowStepExecutionUpdateOne) AddDuration added in v0.4.0

AddDuration adds i to the "duration" field.

func (*WorkflowStepExecutionUpdateOne) AddOrder added in v0.4.0

AddOrder adds i to the "order" field.

func (*WorkflowStepExecutionUpdateOne) AddTimeout added in v0.4.0

AddTimeout adds i to the "timeout" field.

func (*WorkflowStepExecutionUpdateOne) AddTimes added in v0.4.0

AddTimes adds i to the "times" field.

func (*WorkflowStepExecutionUpdateOne) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepExecutionUpdateOne) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepExecutionUpdateOne) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowStepExecutionUpdateOne) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStepExecutionUpdateOne) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepExecutionUpdateOne) ClearRetryStrategy added in v0.4.0

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepExecutionUpdateOne) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStepExecutionUpdateOne) Exec added in v0.4.0

Exec executes the query on the entity.

func (*WorkflowStepExecutionUpdateOne) ExecContext added in v0.4.0

func (c *WorkflowStepExecutionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepExecutionUpdateOne) ExecE added in v0.4.0

func (wseuo *WorkflowStepExecutionUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStepExecution) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*WorkflowStepExecutionUpdateOne) ExecEX added in v0.4.0

func (wseuo *WorkflowStepExecutionUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStepExecution) error)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepExecutionUpdateOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepExecutionUpdateOne) Modify added in v0.4.0

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowStepExecutionUpdateOne) Mutation added in v0.4.0

Mutation returns the WorkflowStepExecutionMutation object of the builder.

func (*WorkflowStepExecutionUpdateOne) QueryContext added in v0.4.0

func (c *WorkflowStepExecutionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepExecutionUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated WorkflowStepExecution entity.

func (*WorkflowStepExecutionUpdateOne) SaveE added in v0.4.0

SaveE calls the given function after updated the WorkflowStepExecution entity, which is always good for cascading update operations.

func (*WorkflowStepExecutionUpdateOne) SaveEX added in v0.4.0

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStepExecutionUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStepExecutionUpdateOne) Select added in v0.4.0

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WorkflowStepExecutionUpdateOne) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStepExecutionUpdateOne) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStepExecutionUpdateOne) SetAttributes added in v0.4.0

func (wseuo *WorkflowStepExecutionUpdateOne) SetAttributes(m map[string]interface{}) *WorkflowStepExecutionUpdateOne

SetAttributes sets the "attributes" field.

func (*WorkflowStepExecutionUpdateOne) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStepExecutionUpdateOne) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStepExecutionUpdateOne) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStepExecutionUpdateOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStepExecutionUpdateOne) SetNillableDescription added in v0.4.0

func (wseuo *WorkflowStepExecutionUpdateOne) SetNillableDescription(s *string) *WorkflowStepExecutionUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStepExecutionUpdateOne) SetNillableDuration added in v0.4.0

func (wseuo *WorkflowStepExecutionUpdateOne) SetNillableDuration(i *int) *WorkflowStepExecutionUpdateOne

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*WorkflowStepExecutionUpdateOne) SetNillableExecuteTime added in v0.4.0

func (wseuo *WorkflowStepExecutionUpdateOne) SetNillableExecuteTime(t *time.Time) *WorkflowStepExecutionUpdateOne

SetNillableExecuteTime sets the "execute_time" field if the given value is not nil.

func (*WorkflowStepExecutionUpdateOne) SetNillableOrder added in v0.4.0

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStepExecutionUpdateOne) SetNillableRecord added in v0.4.0

SetNillableRecord sets the "record" field if the given value is not nil.

func (*WorkflowStepExecutionUpdateOne) SetNillableStatus added in v0.4.0

SetNillableStatus sets the "status" field if the given value is not nil.

func (*WorkflowStepExecutionUpdateOne) SetNillableTimeout added in v0.4.0

func (wseuo *WorkflowStepExecutionUpdateOne) SetNillableTimeout(i *int) *WorkflowStepExecutionUpdateOne

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowStepExecutionUpdateOne) SetNillableTimes added in v0.4.0

SetNillableTimes sets the "times" field if the given value is not nil.

func (*WorkflowStepExecutionUpdateOne) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStepExecutionUpdateOne) SetRecord added in v0.4.0

SetRecord sets the "record" field.

func (*WorkflowStepExecutionUpdateOne) SetRetryStrategy added in v0.4.0

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepExecutionUpdateOne) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStepExecutionUpdateOne) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowStepExecutionUpdateOne) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowStepExecutionUpdateOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepExecutionUpdateOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepExecutionUpdate builder.

type WorkflowStepExecutionUpsert added in v0.4.0

type WorkflowStepExecutionUpsert struct {
	*sql.UpdateSet
}

WorkflowStepExecutionUpsert is the "OnConflict" setter.

func (*WorkflowStepExecutionUpsert) AddDuration added in v0.4.0

AddDuration adds v to the "duration" field.

func (*WorkflowStepExecutionUpsert) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStepExecutionUpsert) AddTimeout added in v0.4.0

AddTimeout adds v to the "timeout" field.

func (*WorkflowStepExecutionUpsert) AddTimes added in v0.4.0

AddTimes adds v to the "times" field.

func (*WorkflowStepExecutionUpsert) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepExecutionUpsert) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepExecutionUpsert) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowStepExecutionUpsert) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStepExecutionUpsert) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepExecutionUpsert) ClearRetryStrategy added in v0.4.0

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepExecutionUpsert) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStepExecutionUpsert) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStepExecutionUpsert) SetAttributes added in v0.4.0

func (u *WorkflowStepExecutionUpsert) SetAttributes(v map[string]interface{}) *WorkflowStepExecutionUpsert

SetAttributes sets the "attributes" field.

func (*WorkflowStepExecutionUpsert) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStepExecutionUpsert) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStepExecutionUpsert) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStepExecutionUpsert) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStepExecutionUpsert) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStepExecutionUpsert) SetRecord added in v0.4.0

SetRecord sets the "record" field.

func (*WorkflowStepExecutionUpsert) SetRetryStrategy added in v0.4.0

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepExecutionUpsert) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStepExecutionUpsert) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowStepExecutionUpsert) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowStepExecutionUpsert) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepExecutionUpsert) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateAttributes added in v0.4.0

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateDuration added in v0.4.0

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateExecuteTime added in v0.4.0

UpdateExecuteTime sets the "execute_time" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateRecord added in v0.4.0

UpdateRecord sets the "record" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateRetryStrategy added in v0.4.0

func (u *WorkflowStepExecutionUpsert) UpdateRetryStrategy() *WorkflowStepExecutionUpsert

UpdateRetryStrategy sets the "retryStrategy" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateTimeout added in v0.4.0

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateTimes added in v0.4.0

UpdateTimes sets the "times" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsert) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStepExecutionUpsertBulk added in v0.4.0

type WorkflowStepExecutionUpsertBulk struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionUpsertBulk is the builder for "upsert"-ing a bulk of WorkflowStepExecution nodes.

func (*WorkflowStepExecutionUpsertBulk) AddDuration added in v0.4.0

AddDuration adds v to the "duration" field.

func (*WorkflowStepExecutionUpsertBulk) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStepExecutionUpsertBulk) AddTimeout added in v0.4.0

AddTimeout adds v to the "timeout" field.

func (*WorkflowStepExecutionUpsertBulk) AddTimes added in v0.4.0

AddTimes adds v to the "times" field.

func (*WorkflowStepExecutionUpsertBulk) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepExecutionUpsertBulk) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepExecutionUpsertBulk) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowStepExecutionUpsertBulk) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStepExecutionUpsertBulk) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepExecutionUpsertBulk) ClearRetryStrategy added in v0.4.0

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepExecutionUpsertBulk) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStepExecutionUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowStepExecutionUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStepExecutionUpsertBulk) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStepExecutionUpsertBulk) ExecEX added in v0.4.0

func (u *WorkflowStepExecutionUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStepExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStepExecutionUpsertBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepExecutionUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowStepExecution.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*WorkflowStepExecutionUpsertBulk) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStepExecutionUpsertBulk) SetAttributes added in v0.4.0

func (u *WorkflowStepExecutionUpsertBulk) SetAttributes(v map[string]interface{}) *WorkflowStepExecutionUpsertBulk

SetAttributes sets the "attributes" field.

func (*WorkflowStepExecutionUpsertBulk) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStepExecutionUpsertBulk) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStepExecutionUpsertBulk) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStepExecutionUpsertBulk) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStepExecutionUpsertBulk) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStepExecutionUpsertBulk) SetRecord added in v0.4.0

SetRecord sets the "record" field.

func (*WorkflowStepExecutionUpsertBulk) SetRetryStrategy added in v0.4.0

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepExecutionUpsertBulk) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStepExecutionUpsertBulk) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowStepExecutionUpsertBulk) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowStepExecutionUpsertBulk) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepExecutionUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowStepExecutionCreateBulk.OnConflict documentation for more info.

func (*WorkflowStepExecutionUpsertBulk) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateAttributes added in v0.4.0

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateDuration added in v0.4.0

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateExecuteTime added in v0.4.0

UpdateExecuteTime sets the "execute_time" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.WorkflowStepExecution.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowstepexecution.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowStepExecutionUpsertBulk) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateRecord added in v0.4.0

UpdateRecord sets the "record" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateRetryStrategy added in v0.4.0

UpdateRetryStrategy sets the "retryStrategy" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateTimeout added in v0.4.0

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateTimes added in v0.4.0

UpdateTimes sets the "times" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertBulk) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStepExecutionUpsertOne added in v0.4.0

type WorkflowStepExecutionUpsertOne struct {
	// contains filtered or unexported fields
}

WorkflowStepExecutionUpsertOne is the builder for "upsert"-ing

one WorkflowStepExecution node.

func (*WorkflowStepExecutionUpsertOne) AddDuration added in v0.4.0

AddDuration adds v to the "duration" field.

func (*WorkflowStepExecutionUpsertOne) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStepExecutionUpsertOne) AddTimeout added in v0.4.0

AddTimeout adds v to the "timeout" field.

func (*WorkflowStepExecutionUpsertOne) AddTimes added in v0.4.0

AddTimes adds v to the "times" field.

func (*WorkflowStepExecutionUpsertOne) ClearAnnotations added in v0.4.0

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepExecutionUpsertOne) ClearAttributes added in v0.4.0

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepExecutionUpsertOne) ClearDescription added in v0.4.0

ClearDescription clears the value of the "description" field.

func (*WorkflowStepExecutionUpsertOne) ClearExecuteTime added in v0.4.0

ClearExecuteTime clears the value of the "execute_time" field.

func (*WorkflowStepExecutionUpsertOne) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepExecutionUpsertOne) ClearRetryStrategy added in v0.4.0

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepExecutionUpsertOne) ClearStatus added in v0.4.0

ClearStatus clears the value of the "status" field.

func (*WorkflowStepExecutionUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowStepExecutionUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStepExecutionUpsertOne) ExecE added in v0.4.0

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStepExecutionUpsertOne) ExecEX added in v0.4.0

func (u *WorkflowStepExecutionUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStepExecution) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStepExecutionUpsertOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepExecutionUpsertOne) ID added in v0.4.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*WorkflowStepExecutionUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*WorkflowStepExecutionUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowStepExecution.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*WorkflowStepExecutionUpsertOne) SetAnnotations added in v0.4.0

SetAnnotations sets the "annotations" field.

func (*WorkflowStepExecutionUpsertOne) SetAttributes added in v0.4.0

func (u *WorkflowStepExecutionUpsertOne) SetAttributes(v map[string]interface{}) *WorkflowStepExecutionUpsertOne

SetAttributes sets the "attributes" field.

func (*WorkflowStepExecutionUpsertOne) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStepExecutionUpsertOne) SetDuration added in v0.4.0

SetDuration sets the "duration" field.

func (*WorkflowStepExecutionUpsertOne) SetExecuteTime added in v0.4.0

SetExecuteTime sets the "execute_time" field.

func (*WorkflowStepExecutionUpsertOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStepExecutionUpsertOne) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStepExecutionUpsertOne) SetRecord added in v0.4.0

SetRecord sets the "record" field.

func (*WorkflowStepExecutionUpsertOne) SetRetryStrategy added in v0.4.0

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepExecutionUpsertOne) SetStatus added in v0.4.0

SetStatus sets the "status" field.

func (*WorkflowStepExecutionUpsertOne) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowStepExecutionUpsertOne) SetTimes added in v0.4.0

SetTimes sets the "times" field.

func (*WorkflowStepExecutionUpsertOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepExecutionUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowStepExecutionCreate.OnConflict documentation for more info.

func (*WorkflowStepExecutionUpsertOne) UpdateAnnotations added in v0.4.0

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateAttributes added in v0.4.0

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateDescription added in v0.4.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateDuration added in v0.4.0

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateExecuteTime added in v0.4.0

UpdateExecuteTime sets the "execute_time" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.WorkflowStepExecution.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowstepexecution.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowStepExecutionUpsertOne) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateRecord added in v0.4.0

UpdateRecord sets the "record" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateRetryStrategy added in v0.4.0

UpdateRetryStrategy sets the "retryStrategy" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateStatus added in v0.4.0

UpdateStatus sets the "status" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateTimeout added in v0.4.0

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateTimes added in v0.4.0

UpdateTimes sets the "times" field to the value that was provided on create.

func (*WorkflowStepExecutionUpsertOne) UpdateUpdateTime added in v0.4.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStepExecutions added in v0.4.0

type WorkflowStepExecutions []*WorkflowStepExecution

WorkflowStepExecutions is a parsable slice of WorkflowStepExecution.

func (WorkflowStepExecutions) View added in v0.4.0

View returns the output of WorkflowStepExecution entities.

type WorkflowStepGroupBy added in v0.4.0

type WorkflowStepGroupBy struct {
	// contains filtered or unexported fields
}

WorkflowStepGroupBy is the group-by builder for WorkflowStep entities.

func (*WorkflowStepGroupBy) Aggregate added in v0.4.0

func (wsgb *WorkflowStepGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowStepGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WorkflowStepGroupBy) Bool added in v0.4.0

func (s *WorkflowStepGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowStepGroupBy) BoolX added in v0.4.0

func (s *WorkflowStepGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowStepGroupBy) Bools added in v0.4.0

func (s *WorkflowStepGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowStepGroupBy) BoolsX added in v0.4.0

func (s *WorkflowStepGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorkflowStepGroupBy) Float64 added in v0.4.0

func (s *WorkflowStepGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowStepGroupBy) Float64X added in v0.4.0

func (s *WorkflowStepGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowStepGroupBy) Float64s added in v0.4.0

func (s *WorkflowStepGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowStepGroupBy) Float64sX added in v0.4.0

func (s *WorkflowStepGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowStepGroupBy) Int added in v0.4.0

func (s *WorkflowStepGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowStepGroupBy) IntX added in v0.4.0

func (s *WorkflowStepGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowStepGroupBy) Ints added in v0.4.0

func (s *WorkflowStepGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowStepGroupBy) IntsX added in v0.4.0

func (s *WorkflowStepGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowStepGroupBy) Scan added in v0.4.0

func (wsgb *WorkflowStepGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowStepGroupBy) ScanX added in v0.4.0

func (s *WorkflowStepGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowStepGroupBy) String added in v0.4.0

func (s *WorkflowStepGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowStepGroupBy) StringX added in v0.4.0

func (s *WorkflowStepGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowStepGroupBy) Strings added in v0.4.0

func (s *WorkflowStepGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowStepGroupBy) StringsX added in v0.4.0

func (s *WorkflowStepGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowStepMutation added in v0.4.0

type WorkflowStepMutation struct {
	// contains filtered or unexported fields
}

WorkflowStepMutation represents an operation that mutates the WorkflowStep nodes in the graph.

func (*WorkflowStepMutation) AddField added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) AddOrder added in v0.4.0

func (m *WorkflowStepMutation) AddOrder(i int)

AddOrder adds i to the "order" field.

func (*WorkflowStepMutation) AddTimeout added in v0.4.0

func (m *WorkflowStepMutation) AddTimeout(i int)

AddTimeout adds i to the "timeout" field.

func (*WorkflowStepMutation) AddedEdges added in v0.4.0

func (m *WorkflowStepMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorkflowStepMutation) AddedField added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) AddedFields added in v0.4.0

func (m *WorkflowStepMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorkflowStepMutation) AddedIDs added in v0.4.0

func (m *WorkflowStepMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorkflowStepMutation) AddedOrder added in v0.4.0

func (m *WorkflowStepMutation) AddedOrder() (r int, exists bool)

AddedOrder returns the value that was added to the "order" field in this mutation.

func (*WorkflowStepMutation) AddedTimeout added in v0.4.0

func (m *WorkflowStepMutation) AddedTimeout() (r int, exists bool)

AddedTimeout returns the value that was added to the "timeout" field in this mutation.

func (*WorkflowStepMutation) Annotations added in v0.4.0

func (m *WorkflowStepMutation) Annotations() (r map[string]string, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*WorkflowStepMutation) AnnotationsCleared added in v0.4.0

func (m *WorkflowStepMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*WorkflowStepMutation) AppendDependencies added in v0.4.0

func (m *WorkflowStepMutation) AppendDependencies(o []object.ID)

AppendDependencies adds o to the "dependencies" field.

func (*WorkflowStepMutation) AppendedDependencies added in v0.4.0

func (m *WorkflowStepMutation) AppendedDependencies() ([]object.ID, bool)

AppendedDependencies returns the list of values that were appended to the "dependencies" field in this mutation.

func (*WorkflowStepMutation) Attributes added in v0.4.0

func (m *WorkflowStepMutation) Attributes() (r map[string]interface{}, exists bool)

Attributes returns the value of the "attributes" field in the mutation.

func (*WorkflowStepMutation) AttributesCleared added in v0.4.0

func (m *WorkflowStepMutation) AttributesCleared() bool

AttributesCleared returns if the "attributes" field was cleared in this mutation.

func (*WorkflowStepMutation) ClearAnnotations added in v0.4.0

func (m *WorkflowStepMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepMutation) ClearAttributes added in v0.4.0

func (m *WorkflowStepMutation) ClearAttributes()

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepMutation) ClearDescription added in v0.4.0

func (m *WorkflowStepMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*WorkflowStepMutation) ClearEdge added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) ClearField added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) ClearInputs added in v0.4.0

func (m *WorkflowStepMutation) ClearInputs()

ClearInputs clears the value of the "inputs" field.

func (*WorkflowStepMutation) ClearLabels added in v0.4.0

func (m *WorkflowStepMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepMutation) ClearOutputs added in v0.4.0

func (m *WorkflowStepMutation) ClearOutputs()

ClearOutputs clears the value of the "outputs" field.

func (*WorkflowStepMutation) ClearProject added in v0.4.0

func (m *WorkflowStepMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*WorkflowStepMutation) ClearRetryStrategy added in v0.4.0

func (m *WorkflowStepMutation) ClearRetryStrategy()

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepMutation) ClearStage added in v0.4.0

func (m *WorkflowStepMutation) ClearStage()

ClearStage clears the "stage" edge to the WorkflowStage entity.

func (*WorkflowStepMutation) ClearedEdges added in v0.4.0

func (m *WorkflowStepMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorkflowStepMutation) ClearedFields added in v0.4.0

func (m *WorkflowStepMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorkflowStepMutation) Client added in v0.4.0

func (m WorkflowStepMutation) 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 (*WorkflowStepMutation) CreateTime added in v0.4.0

func (m *WorkflowStepMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*WorkflowStepMutation) Dependencies added in v0.4.0

func (m *WorkflowStepMutation) Dependencies() (r []object.ID, exists bool)

Dependencies returns the value of the "dependencies" field in the mutation.

func (*WorkflowStepMutation) Description added in v0.4.0

func (m *WorkflowStepMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*WorkflowStepMutation) DescriptionCleared added in v0.4.0

func (m *WorkflowStepMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*WorkflowStepMutation) EdgeCleared added in v0.4.0

func (m *WorkflowStepMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorkflowStepMutation) ExecContext added in v0.4.0

func (c *WorkflowStepMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepMutation) Field added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) FieldCleared added in v0.4.0

func (m *WorkflowStepMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorkflowStepMutation) Fields added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) GetType added in v0.4.0

func (m *WorkflowStepMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*WorkflowStepMutation) ID added in v0.4.0

func (m *WorkflowStepMutation) ID() (id object.ID, 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 (*WorkflowStepMutation) IDs added in v0.4.0

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 (*WorkflowStepMutation) Inputs added in v0.4.0

func (m *WorkflowStepMutation) Inputs() (r map[string]interface{}, exists bool)

Inputs returns the value of the "inputs" field in the mutation.

func (*WorkflowStepMutation) InputsCleared added in v0.4.0

func (m *WorkflowStepMutation) InputsCleared() bool

InputsCleared returns if the "inputs" field was cleared in this mutation.

func (*WorkflowStepMutation) Labels added in v0.4.0

func (m *WorkflowStepMutation) Labels() (r map[string]string, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*WorkflowStepMutation) LabelsCleared added in v0.4.0

func (m *WorkflowStepMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*WorkflowStepMutation) Name added in v0.4.0

func (m *WorkflowStepMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WorkflowStepMutation) OldAnnotations added in v0.4.0

func (m *WorkflowStepMutation) OldAnnotations(ctx context.Context) (v map[string]string, err error)

OldAnnotations returns the old "annotations" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldAttributes added in v0.4.0

func (m *WorkflowStepMutation) OldAttributes(ctx context.Context) (v map[string]interface{}, err error)

OldAttributes returns the old "attributes" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldCreateTime added in v0.4.0

func (m *WorkflowStepMutation) OldCreateTime(ctx context.Context) (v *time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldDependencies added in v0.4.0

func (m *WorkflowStepMutation) OldDependencies(ctx context.Context) (v []object.ID, err error)

OldDependencies returns the old "dependencies" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldDescription added in v0.4.0

func (m *WorkflowStepMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldField added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) OldInputs added in v0.4.0

func (m *WorkflowStepMutation) OldInputs(ctx context.Context) (v map[string]interface{}, err error)

OldInputs returns the old "inputs" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldLabels added in v0.4.0

func (m *WorkflowStepMutation) OldLabels(ctx context.Context) (v map[string]string, err error)

OldLabels returns the old "labels" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldName added in v0.4.0

func (m *WorkflowStepMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldOrder added in v0.4.0

func (m *WorkflowStepMutation) OldOrder(ctx context.Context) (v int, err error)

OldOrder returns the old "order" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldOutputs added in v0.4.0

func (m *WorkflowStepMutation) OldOutputs(ctx context.Context) (v map[string]interface{}, err error)

OldOutputs returns the old "outputs" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldProjectID added in v0.4.0

func (m *WorkflowStepMutation) OldProjectID(ctx context.Context) (v object.ID, err error)

OldProjectID returns the old "project_id" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldRetryStrategy added in v0.4.0

func (m *WorkflowStepMutation) OldRetryStrategy(ctx context.Context) (v *types.RetryStrategy, err error)

OldRetryStrategy returns the old "retryStrategy" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldTimeout added in v0.4.0

func (m *WorkflowStepMutation) OldTimeout(ctx context.Context) (v int, err error)

OldTimeout returns the old "timeout" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldType added in v0.4.0

func (m *WorkflowStepMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldUpdateTime added in v0.4.0

func (m *WorkflowStepMutation) OldUpdateTime(ctx context.Context) (v *time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldWorkflowID added in v0.4.0

func (m *WorkflowStepMutation) OldWorkflowID(ctx context.Context) (v object.ID, err error)

OldWorkflowID returns the old "workflow_id" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) OldWorkflowStageID added in v0.4.0

func (m *WorkflowStepMutation) OldWorkflowStageID(ctx context.Context) (v object.ID, err error)

OldWorkflowStageID returns the old "workflow_stage_id" field's value of the WorkflowStep entity. If the WorkflowStep 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 (*WorkflowStepMutation) Op added in v0.4.0

func (m *WorkflowStepMutation) Op() Op

Op returns the operation name.

func (*WorkflowStepMutation) Order added in v0.4.0

func (m *WorkflowStepMutation) Order() (r int, exists bool)

Order returns the value of the "order" field in the mutation.

func (*WorkflowStepMutation) Outputs added in v0.4.0

func (m *WorkflowStepMutation) Outputs() (r map[string]interface{}, exists bool)

Outputs returns the value of the "outputs" field in the mutation.

func (*WorkflowStepMutation) OutputsCleared added in v0.4.0

func (m *WorkflowStepMutation) OutputsCleared() bool

OutputsCleared returns if the "outputs" field was cleared in this mutation.

func (*WorkflowStepMutation) ProjectCleared added in v0.4.0

func (m *WorkflowStepMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*WorkflowStepMutation) ProjectID added in v0.4.0

func (m *WorkflowStepMutation) ProjectID() (r object.ID, exists bool)

ProjectID returns the value of the "project_id" field in the mutation.

func (*WorkflowStepMutation) ProjectIDs added in v0.4.0

func (m *WorkflowStepMutation) ProjectIDs() (ids []object.ID)

ProjectIDs returns the "project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*WorkflowStepMutation) QueryContext added in v0.4.0

func (c *WorkflowStepMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepMutation) RemovedEdges added in v0.4.0

func (m *WorkflowStepMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorkflowStepMutation) RemovedIDs added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) ResetAnnotations added in v0.4.0

func (m *WorkflowStepMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*WorkflowStepMutation) ResetAttributes added in v0.4.0

func (m *WorkflowStepMutation) ResetAttributes()

ResetAttributes resets all changes to the "attributes" field.

func (*WorkflowStepMutation) ResetCreateTime added in v0.4.0

func (m *WorkflowStepMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*WorkflowStepMutation) ResetDependencies added in v0.4.0

func (m *WorkflowStepMutation) ResetDependencies()

ResetDependencies resets all changes to the "dependencies" field.

func (*WorkflowStepMutation) ResetDescription added in v0.4.0

func (m *WorkflowStepMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*WorkflowStepMutation) ResetEdge added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) ResetField added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) ResetInputs added in v0.4.0

func (m *WorkflowStepMutation) ResetInputs()

ResetInputs resets all changes to the "inputs" field.

func (*WorkflowStepMutation) ResetLabels added in v0.4.0

func (m *WorkflowStepMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*WorkflowStepMutation) ResetName added in v0.4.0

func (m *WorkflowStepMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WorkflowStepMutation) ResetOrder added in v0.4.0

func (m *WorkflowStepMutation) ResetOrder()

ResetOrder resets all changes to the "order" field.

func (*WorkflowStepMutation) ResetOutputs added in v0.4.0

func (m *WorkflowStepMutation) ResetOutputs()

ResetOutputs resets all changes to the "outputs" field.

func (*WorkflowStepMutation) ResetProject added in v0.4.0

func (m *WorkflowStepMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*WorkflowStepMutation) ResetProjectID added in v0.4.0

func (m *WorkflowStepMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*WorkflowStepMutation) ResetRetryStrategy added in v0.4.0

func (m *WorkflowStepMutation) ResetRetryStrategy()

ResetRetryStrategy resets all changes to the "retryStrategy" field.

func (*WorkflowStepMutation) ResetStage added in v0.4.0

func (m *WorkflowStepMutation) ResetStage()

ResetStage resets all changes to the "stage" edge.

func (*WorkflowStepMutation) ResetTimeout added in v0.4.0

func (m *WorkflowStepMutation) ResetTimeout()

ResetTimeout resets all changes to the "timeout" field.

func (*WorkflowStepMutation) ResetType added in v0.4.0

func (m *WorkflowStepMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*WorkflowStepMutation) ResetUpdateTime added in v0.4.0

func (m *WorkflowStepMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*WorkflowStepMutation) ResetWorkflowID added in v0.4.0

func (m *WorkflowStepMutation) ResetWorkflowID()

ResetWorkflowID resets all changes to the "workflow_id" field.

func (*WorkflowStepMutation) ResetWorkflowStageID added in v0.4.0

func (m *WorkflowStepMutation) ResetWorkflowStageID()

ResetWorkflowStageID resets all changes to the "workflow_stage_id" field.

func (*WorkflowStepMutation) RetryStrategy added in v0.4.0

func (m *WorkflowStepMutation) RetryStrategy() (r *types.RetryStrategy, exists bool)

RetryStrategy returns the value of the "retryStrategy" field in the mutation.

func (*WorkflowStepMutation) RetryStrategyCleared added in v0.4.0

func (m *WorkflowStepMutation) RetryStrategyCleared() bool

RetryStrategyCleared returns if the "retryStrategy" field was cleared in this mutation.

func (*WorkflowStepMutation) SetAnnotations added in v0.4.0

func (m *WorkflowStepMutation) SetAnnotations(value map[string]string)

SetAnnotations sets the "annotations" field.

func (*WorkflowStepMutation) SetAttributes added in v0.4.0

func (m *WorkflowStepMutation) SetAttributes(value map[string]interface{})

SetAttributes sets the "attributes" field.

func (*WorkflowStepMutation) SetCreateTime added in v0.4.0

func (m *WorkflowStepMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*WorkflowStepMutation) SetDependencies added in v0.4.0

func (m *WorkflowStepMutation) SetDependencies(o []object.ID)

SetDependencies sets the "dependencies" field.

func (*WorkflowStepMutation) SetDescription added in v0.4.0

func (m *WorkflowStepMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*WorkflowStepMutation) SetField added in v0.4.0

func (m *WorkflowStepMutation) 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 (*WorkflowStepMutation) SetID added in v0.4.0

func (m *WorkflowStepMutation) SetID(id object.ID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowStep entities.

func (*WorkflowStepMutation) SetInputs added in v0.4.0

func (m *WorkflowStepMutation) SetInputs(value map[string]interface{})

SetInputs sets the "inputs" field.

func (*WorkflowStepMutation) SetLabels added in v0.4.0

func (m *WorkflowStepMutation) SetLabels(value map[string]string)

SetLabels sets the "labels" field.

func (*WorkflowStepMutation) SetName added in v0.4.0

func (m *WorkflowStepMutation) SetName(s string)

SetName sets the "name" field.

func (*WorkflowStepMutation) SetOp added in v0.4.0

func (m *WorkflowStepMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorkflowStepMutation) SetOrder added in v0.4.0

func (m *WorkflowStepMutation) SetOrder(i int)

SetOrder sets the "order" field.

func (*WorkflowStepMutation) SetOutputs added in v0.4.0

func (m *WorkflowStepMutation) SetOutputs(value map[string]interface{})

SetOutputs sets the "outputs" field.

func (*WorkflowStepMutation) SetProjectID added in v0.4.0

func (m *WorkflowStepMutation) SetProjectID(o object.ID)

SetProjectID sets the "project_id" field.

func (*WorkflowStepMutation) SetRetryStrategy added in v0.4.0

func (m *WorkflowStepMutation) SetRetryStrategy(ts *types.RetryStrategy)

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepMutation) SetStageID added in v0.4.0

func (m *WorkflowStepMutation) SetStageID(id object.ID)

SetStageID sets the "stage" edge to the WorkflowStage entity by id.

func (*WorkflowStepMutation) SetTimeout added in v0.4.0

func (m *WorkflowStepMutation) SetTimeout(i int)

SetTimeout sets the "timeout" field.

func (*WorkflowStepMutation) SetType added in v0.4.0

func (m *WorkflowStepMutation) SetType(s string)

SetType sets the "type" field.

func (*WorkflowStepMutation) SetUpdateTime added in v0.4.0

func (m *WorkflowStepMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepMutation) SetWorkflowID added in v0.4.0

func (m *WorkflowStepMutation) SetWorkflowID(o object.ID)

SetWorkflowID sets the "workflow_id" field.

func (*WorkflowStepMutation) SetWorkflowStageID added in v0.4.0

func (m *WorkflowStepMutation) SetWorkflowStageID(o object.ID)

SetWorkflowStageID sets the "workflow_stage_id" field.

func (*WorkflowStepMutation) StageCleared added in v0.4.0

func (m *WorkflowStepMutation) StageCleared() bool

StageCleared reports if the "stage" edge to the WorkflowStage entity was cleared.

func (*WorkflowStepMutation) StageID added in v0.4.0

func (m *WorkflowStepMutation) StageID() (id object.ID, exists bool)

StageID returns the "stage" edge ID in the mutation.

func (*WorkflowStepMutation) StageIDs added in v0.4.0

func (m *WorkflowStepMutation) StageIDs() (ids []object.ID)

StageIDs returns the "stage" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StageID instead. It exists only for internal usage by the builders.

func (*WorkflowStepMutation) Timeout added in v0.4.0

func (m *WorkflowStepMutation) Timeout() (r int, exists bool)

Timeout returns the value of the "timeout" field in the mutation.

func (WorkflowStepMutation) Tx added in v0.4.0

func (m WorkflowStepMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorkflowStepMutation) Type added in v0.4.0

func (m *WorkflowStepMutation) Type() string

Type returns the node type of this mutation (WorkflowStep).

func (*WorkflowStepMutation) UpdateTime added in v0.4.0

func (m *WorkflowStepMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*WorkflowStepMutation) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepMutation builder.

func (*WorkflowStepMutation) WhereP added in v0.4.0

func (m *WorkflowStepMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowStepMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowStepMutation) WorkflowID added in v0.4.0

func (m *WorkflowStepMutation) WorkflowID() (r object.ID, exists bool)

WorkflowID returns the value of the "workflow_id" field in the mutation.

func (*WorkflowStepMutation) WorkflowStageID added in v0.4.0

func (m *WorkflowStepMutation) WorkflowStageID() (r object.ID, exists bool)

WorkflowStageID returns the value of the "workflow_stage_id" field in the mutation.

type WorkflowStepOutput added in v0.4.0

type WorkflowStepOutput struct {
	ID            object.ID              `json:"id,omitempty"`
	Name          string                 `json:"name,omitempty"`
	Description   string                 `json:"description,omitempty"`
	Labels        map[string]string      `json:"labels,omitempty"`
	CreateTime    *time.Time             `json:"createTime,omitempty"`
	UpdateTime    *time.Time             `json:"updateTime,omitempty"`
	Type          string                 `json:"type,omitempty"`
	WorkflowID    object.ID              `json:"workflowID,omitempty"`
	Attributes    map[string]interface{} `json:"attributes,omitempty"`
	Inputs        map[string]interface{} `json:"inputs,omitempty"`
	Outputs       map[string]interface{} `json:"outputs,omitempty"`
	Dependencies  []object.ID            `json:"dependencies,omitempty"`
	RetryStrategy *types.RetryStrategy   `json:"retryStrategy,omitempty"`
	Timeout       int                    `json:"timeout,omitempty"`

	Project *ProjectOutput       `json:"project,omitempty"`
	Stage   *WorkflowStageOutput `json:"stage,omitempty"`
}

WorkflowStepOutput holds the output of the WorkflowStep entity.

func ExposeWorkflowStep added in v0.4.0

func ExposeWorkflowStep(_ws *WorkflowStep) *WorkflowStepOutput

ExposeWorkflowStep converts the WorkflowStep to WorkflowStepOutput.

func ExposeWorkflowSteps added in v0.4.0

func ExposeWorkflowSteps(_wss []*WorkflowStep) []*WorkflowStepOutput

ExposeWorkflowSteps converts the WorkflowStep slice to WorkflowStepOutput pointer slice.

type WorkflowStepPatchInput added in v0.5.0

type WorkflowStepPatchInput struct {
	WorkflowStepQueryInput `path:",inline" query:"-" json:"-"`

	// Name holds the value of the "name" field.
	Name string `path:"-" query:"-" json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Annotations holds the value of the "annotations" field.
	Annotations map[string]string `path:"-" query:"-" json:"annotations,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime *time.Time `path:"-" query:"-" json:"createTime,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime *time.Time `path:"-" query:"-" json:"updateTime,omitempty"`
	// Type of the workflow step.
	Type string `path:"-" query:"-" json:"type,omitempty"`
	// ID of the workflow that this workflow step belongs to.
	WorkflowID object.ID `path:"-" query:"-" json:"workflowID,omitempty"`
	// Attributes of the workflow step.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Inputs of the workflow step.
	Inputs map[string]interface{} `path:"-" query:"-" json:"inputs,omitempty"`
	// Outputs of the workflow step.
	Outputs map[string]interface{} `path:"-" query:"-" json:"outputs,omitempty"`
	// Order of the workflow step.
	Order int `path:"-" query:"-" json:"order,omitempty"`
	// ID list of the workflow steps that this workflow step depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout seconds of the workflow step, 0 means no timeout.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

WorkflowStepPatchInput holds the patch input of the WorkflowStep entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepPatchInput) Model added in v0.5.0

func (wspi *WorkflowStepPatchInput) Model() *WorkflowStep

Model returns the WorkflowStep patched entity, after validating.

func (*WorkflowStepPatchInput) PatchModel added in v0.5.0

func (wspi *WorkflowStepPatchInput) PatchModel() *WorkflowStep

PatchModel returns the WorkflowStep partition entity for patching.

func (*WorkflowStepPatchInput) SetGinContext added in v0.5.0

func (ic *WorkflowStepPatchInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepPatchInput) SetModelClient added in v0.5.0

func (ic *WorkflowStepPatchInput) SetModelClient(cli *Client)

func (*WorkflowStepPatchInput) Validate added in v0.5.0

func (wspi *WorkflowStepPatchInput) Validate() error

Validate checks the WorkflowStepPatchInput entity.

func (*WorkflowStepPatchInput) ValidateWith added in v0.5.0

func (wspi *WorkflowStepPatchInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepPatchInput entity with the given context and client set.

type WorkflowStepQuery added in v0.4.0

type WorkflowStepQuery struct {
	// contains filtered or unexported fields
}

WorkflowStepQuery is the builder for querying WorkflowStep entities.

func (*WorkflowStepQuery) Aggregate added in v0.4.0

func (wsq *WorkflowStepQuery) Aggregate(fns ...AggregateFunc) *WorkflowStepSelect

Aggregate returns a WorkflowStepSelect configured with the given aggregations.

func (*WorkflowStepQuery) All added in v0.4.0

func (wsq *WorkflowStepQuery) All(ctx context.Context) ([]*WorkflowStep, error)

All executes the query and returns a list of WorkflowSteps.

func (*WorkflowStepQuery) AllX added in v0.4.0

func (wsq *WorkflowStepQuery) AllX(ctx context.Context) []*WorkflowStep

AllX is like All, but panics if an error occurs.

func (*WorkflowStepQuery) Clone added in v0.4.0

func (wsq *WorkflowStepQuery) Clone() *WorkflowStepQuery

Clone returns a duplicate of the WorkflowStepQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorkflowStepQuery) Count added in v0.4.0

func (wsq *WorkflowStepQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorkflowStepQuery) CountX added in v0.4.0

func (wsq *WorkflowStepQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorkflowStepQuery) ExecContext added in v0.4.0

func (c *WorkflowStepQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepQuery) Exist added in v0.4.0

func (wsq *WorkflowStepQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WorkflowStepQuery) ExistX added in v0.4.0

func (wsq *WorkflowStepQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorkflowStepQuery) First added in v0.4.0

func (wsq *WorkflowStepQuery) First(ctx context.Context) (*WorkflowStep, error)

First returns the first WorkflowStep entity from the query. Returns a *NotFoundError when no WorkflowStep was found.

func (*WorkflowStepQuery) FirstID added in v0.4.0

func (wsq *WorkflowStepQuery) FirstID(ctx context.Context) (id object.ID, err error)

FirstID returns the first WorkflowStep ID from the query. Returns a *NotFoundError when no WorkflowStep ID was found.

func (*WorkflowStepQuery) FirstIDX added in v0.4.0

func (wsq *WorkflowStepQuery) FirstIDX(ctx context.Context) object.ID

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorkflowStepQuery) FirstX added in v0.4.0

func (wsq *WorkflowStepQuery) FirstX(ctx context.Context) *WorkflowStep

FirstX is like First, but panics if an error occurs.

func (*WorkflowStepQuery) ForShare added in v0.4.0

func (wsq *WorkflowStepQuery) ForShare(opts ...sql.LockOption) *WorkflowStepQuery

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 (*WorkflowStepQuery) ForUpdate added in v0.4.0

func (wsq *WorkflowStepQuery) ForUpdate(opts ...sql.LockOption) *WorkflowStepQuery

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 (*WorkflowStepQuery) GroupBy added in v0.4.0

func (wsq *WorkflowStepQuery) GroupBy(field string, fields ...string) *WorkflowStepGroupBy

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.WorkflowStep.Query().
	GroupBy(workflowstep.FieldName).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*WorkflowStepQuery) IDs added in v0.4.0

func (wsq *WorkflowStepQuery) IDs(ctx context.Context) (ids []object.ID, err error)

IDs executes the query and returns a list of WorkflowStep IDs.

func (*WorkflowStepQuery) IDsX added in v0.4.0

func (wsq *WorkflowStepQuery) IDsX(ctx context.Context) []object.ID

IDsX is like IDs, but panics if an error occurs.

func (*WorkflowStepQuery) Limit added in v0.4.0

func (wsq *WorkflowStepQuery) Limit(limit int) *WorkflowStepQuery

Limit the number of records to be returned by this query.

func (*WorkflowStepQuery) Modify added in v0.4.0

func (wsq *WorkflowStepQuery) Modify(modifiers ...func(s *sql.Selector)) *WorkflowStepSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*WorkflowStepQuery) Offset added in v0.4.0

func (wsq *WorkflowStepQuery) Offset(offset int) *WorkflowStepQuery

Offset to start from.

func (*WorkflowStepQuery) Only added in v0.4.0

func (wsq *WorkflowStepQuery) Only(ctx context.Context) (*WorkflowStep, error)

Only returns a single WorkflowStep entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowStep entity is found. Returns a *NotFoundError when no WorkflowStep entities are found.

func (*WorkflowStepQuery) OnlyID added in v0.4.0

func (wsq *WorkflowStepQuery) OnlyID(ctx context.Context) (id object.ID, err error)

OnlyID is like Only, but returns the only WorkflowStep ID in the query. Returns a *NotSingularError when more than one WorkflowStep ID is found. Returns a *NotFoundError when no entities are found.

func (*WorkflowStepQuery) OnlyIDX added in v0.4.0

func (wsq *WorkflowStepQuery) OnlyIDX(ctx context.Context) object.ID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorkflowStepQuery) OnlyX added in v0.4.0

func (wsq *WorkflowStepQuery) OnlyX(ctx context.Context) *WorkflowStep

OnlyX is like Only, but panics if an error occurs.

func (*WorkflowStepQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*WorkflowStepQuery) QueryContext added in v0.4.0

func (c *WorkflowStepQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepQuery) QueryProject added in v0.4.0

func (wsq *WorkflowStepQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*WorkflowStepQuery) QueryStage added in v0.4.0

func (wsq *WorkflowStepQuery) QueryStage() *WorkflowStageQuery

QueryStage chains the current query on the "stage" edge.

func (*WorkflowStepQuery) Select added in v0.4.0

func (wsq *WorkflowStepQuery) Select(fields ...string) *WorkflowStepSelect

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.WorkflowStep.Query().
	Select(workflowstep.FieldName).
	Scan(ctx, &v)

func (*WorkflowStepQuery) Unique added in v0.4.0

func (wsq *WorkflowStepQuery) Unique(unique bool) *WorkflowStepQuery

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 (*WorkflowStepQuery) Where added in v0.4.0

Where adds a new predicate for the WorkflowStepQuery builder.

func (*WorkflowStepQuery) WhereP added in v0.4.0

func (wsq *WorkflowStepQuery) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorkflowStepQuery builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorkflowStepQuery) WithProject added in v0.4.0

func (wsq *WorkflowStepQuery) WithProject(opts ...func(*ProjectQuery)) *WorkflowStepQuery

WithProject tells the query-builder to eager-load the nodes that are connected to the "project" edge. The optional arguments are used to configure the query builder of the edge.

func (*WorkflowStepQuery) WithStage added in v0.4.0

func (wsq *WorkflowStepQuery) WithStage(opts ...func(*WorkflowStageQuery)) *WorkflowStepQuery

WithStage tells the query-builder to eager-load the nodes that are connected to the "stage" edge. The optional arguments are used to configure the query builder of the edge.

type WorkflowStepQueryInput added in v0.4.0

type WorkflowStepQueryInput struct {

	// Project indicates to query WorkflowStep entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"project"`
	// Stage indicates to query WorkflowStep entity MUST under the Stage route.
	Stage *WorkflowStageQueryInput `path:",inline" query:"-" json:"stage"`

	// Refer holds the route path reference of the WorkflowStep entity.
	Refer *object.Refer `path:"workflowstep,default=" query:"-" json:"-"`
	// ID of the WorkflowStep entity.
	ID object.ID `path:"-" query:"-" json:"id"`
	// contains filtered or unexported fields
}

WorkflowStepQueryInput holds the query input of the WorkflowStep entity, please tags with `path:",inline"` if embedding.

func (*WorkflowStepQueryInput) Model added in v0.4.0

func (wsqi *WorkflowStepQueryInput) Model() *WorkflowStep

Model returns the WorkflowStep entity for querying, after validating.

func (*WorkflowStepQueryInput) SetGinContext added in v0.4.0

func (ic *WorkflowStepQueryInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepQueryInput) SetModelClient added in v0.4.0

func (ic *WorkflowStepQueryInput) SetModelClient(cli *Client)

func (*WorkflowStepQueryInput) Validate added in v0.4.0

func (wsqi *WorkflowStepQueryInput) Validate() error

Validate checks the WorkflowStepQueryInput entity.

func (*WorkflowStepQueryInput) ValidateWith added in v0.4.0

func (wsqi *WorkflowStepQueryInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepQueryInput entity with the given context and client set.

type WorkflowStepQueryInputs added in v0.4.0

type WorkflowStepQueryInputs struct {

	// Project indicates to query WorkflowStep entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Stage indicates to query WorkflowStep entity MUST under the Stage route.
	Stage *WorkflowStageQueryInput `path:",inline" query:"-" json:"-"`
	// contains filtered or unexported fields
}

WorkflowStepQueryInputs holds the query input of the WorkflowStep entities, please tags with `path:",inline" query:",inline"` if embedding.

func (*WorkflowStepQueryInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStepQueryInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStepQueryInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStepQueryInputs) SetModelClient(cli *Client)

func (*WorkflowStepQueryInputs) Validate added in v0.4.0

func (wsqi *WorkflowStepQueryInputs) Validate() error

Validate checks the WorkflowStepQueryInputs entity.

func (*WorkflowStepQueryInputs) ValidateWith added in v0.4.0

func (wsqi *WorkflowStepQueryInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepQueryInputs entity with the given context and client set.

type WorkflowStepSelect added in v0.4.0

type WorkflowStepSelect struct {
	*WorkflowStepQuery
	// contains filtered or unexported fields
}

WorkflowStepSelect is the builder for selecting fields of WorkflowStep entities.

func (*WorkflowStepSelect) Aggregate added in v0.4.0

func (wss *WorkflowStepSelect) Aggregate(fns ...AggregateFunc) *WorkflowStepSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WorkflowStepSelect) Bool added in v0.4.0

func (s *WorkflowStepSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorkflowStepSelect) BoolX added in v0.4.0

func (s *WorkflowStepSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorkflowStepSelect) Bools added in v0.4.0

func (s *WorkflowStepSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorkflowStepSelect) BoolsX added in v0.4.0

func (s *WorkflowStepSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (WorkflowStepSelect) ExecContext added in v0.4.0

func (c WorkflowStepSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepSelect) Float64 added in v0.4.0

func (s *WorkflowStepSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorkflowStepSelect) Float64X added in v0.4.0

func (s *WorkflowStepSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorkflowStepSelect) Float64s added in v0.4.0

func (s *WorkflowStepSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorkflowStepSelect) Float64sX added in v0.4.0

func (s *WorkflowStepSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorkflowStepSelect) Int added in v0.4.0

func (s *WorkflowStepSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorkflowStepSelect) IntX added in v0.4.0

func (s *WorkflowStepSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorkflowStepSelect) Ints added in v0.4.0

func (s *WorkflowStepSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorkflowStepSelect) IntsX added in v0.4.0

func (s *WorkflowStepSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorkflowStepSelect) Modify added in v0.4.0

func (wss *WorkflowStepSelect) Modify(modifiers ...func(s *sql.Selector)) *WorkflowStepSelect

Modify adds a query modifier for attaching custom logic to queries.

func (WorkflowStepSelect) QueryContext added in v0.4.0

func (c WorkflowStepSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepSelect) Scan added in v0.4.0

func (wss *WorkflowStepSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorkflowStepSelect) ScanX added in v0.4.0

func (s *WorkflowStepSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorkflowStepSelect) String added in v0.4.0

func (s *WorkflowStepSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorkflowStepSelect) StringX added in v0.4.0

func (s *WorkflowStepSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorkflowStepSelect) Strings added in v0.4.0

func (s *WorkflowStepSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorkflowStepSelect) StringsX added in v0.4.0

func (s *WorkflowStepSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorkflowStepUpdate added in v0.4.0

type WorkflowStepUpdate struct {
	// contains filtered or unexported fields
}

WorkflowStepUpdate is the builder for updating WorkflowStep entities.

func (*WorkflowStepUpdate) AddOrder added in v0.4.0

func (wsu *WorkflowStepUpdate) AddOrder(i int) *WorkflowStepUpdate

AddOrder adds i to the "order" field.

func (*WorkflowStepUpdate) AddTimeout added in v0.4.0

func (wsu *WorkflowStepUpdate) AddTimeout(i int) *WorkflowStepUpdate

AddTimeout adds i to the "timeout" field.

func (*WorkflowStepUpdate) AppendDependencies added in v0.4.0

func (wsu *WorkflowStepUpdate) AppendDependencies(o []object.ID) *WorkflowStepUpdate

AppendDependencies appends o to the "dependencies" field.

func (*WorkflowStepUpdate) ClearAnnotations added in v0.4.0

func (wsu *WorkflowStepUpdate) ClearAnnotations() *WorkflowStepUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepUpdate) ClearAttributes added in v0.4.0

func (wsu *WorkflowStepUpdate) ClearAttributes() *WorkflowStepUpdate

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepUpdate) ClearDescription added in v0.4.0

func (wsu *WorkflowStepUpdate) ClearDescription() *WorkflowStepUpdate

ClearDescription clears the value of the "description" field.

func (*WorkflowStepUpdate) ClearInputs added in v0.4.0

func (wsu *WorkflowStepUpdate) ClearInputs() *WorkflowStepUpdate

ClearInputs clears the value of the "inputs" field.

func (*WorkflowStepUpdate) ClearLabels added in v0.4.0

func (wsu *WorkflowStepUpdate) ClearLabels() *WorkflowStepUpdate

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepUpdate) ClearOutputs added in v0.4.0

func (wsu *WorkflowStepUpdate) ClearOutputs() *WorkflowStepUpdate

ClearOutputs clears the value of the "outputs" field.

func (*WorkflowStepUpdate) ClearRetryStrategy added in v0.4.0

func (wsu *WorkflowStepUpdate) ClearRetryStrategy() *WorkflowStepUpdate

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepUpdate) Exec added in v0.4.0

func (wsu *WorkflowStepUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowStepUpdate) ExecContext added in v0.4.0

func (c *WorkflowStepUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepUpdate) ExecX added in v0.4.0

func (wsu *WorkflowStepUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepUpdate) Modify added in v0.4.0

func (wsu *WorkflowStepUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowStepUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowStepUpdate) Mutation added in v0.4.0

func (wsu *WorkflowStepUpdate) Mutation() *WorkflowStepMutation

Mutation returns the WorkflowStepMutation object of the builder.

func (*WorkflowStepUpdate) QueryContext added in v0.4.0

func (c *WorkflowStepUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepUpdate) Save added in v0.4.0

func (wsu *WorkflowStepUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorkflowStepUpdate) SaveX added in v0.4.0

func (wsu *WorkflowStepUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStepUpdate) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStepUpdate) SetAnnotations added in v0.4.0

func (wsu *WorkflowStepUpdate) SetAnnotations(m map[string]string) *WorkflowStepUpdate

SetAnnotations sets the "annotations" field.

func (*WorkflowStepUpdate) SetAttributes added in v0.4.0

func (wsu *WorkflowStepUpdate) SetAttributes(m map[string]interface{}) *WorkflowStepUpdate

SetAttributes sets the "attributes" field.

func (*WorkflowStepUpdate) SetDependencies added in v0.4.0

func (wsu *WorkflowStepUpdate) SetDependencies(o []object.ID) *WorkflowStepUpdate

SetDependencies sets the "dependencies" field.

func (*WorkflowStepUpdate) SetDescription added in v0.4.0

func (wsu *WorkflowStepUpdate) SetDescription(s string) *WorkflowStepUpdate

SetDescription sets the "description" field.

func (*WorkflowStepUpdate) SetInputs added in v0.4.0

func (wsu *WorkflowStepUpdate) SetInputs(m map[string]interface{}) *WorkflowStepUpdate

SetInputs sets the "inputs" field.

func (*WorkflowStepUpdate) SetLabels added in v0.4.0

func (wsu *WorkflowStepUpdate) SetLabels(m map[string]string) *WorkflowStepUpdate

SetLabels sets the "labels" field.

func (*WorkflowStepUpdate) SetNillableDescription added in v0.4.0

func (wsu *WorkflowStepUpdate) SetNillableDescription(s *string) *WorkflowStepUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStepUpdate) SetNillableOrder added in v0.4.0

func (wsu *WorkflowStepUpdate) SetNillableOrder(i *int) *WorkflowStepUpdate

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStepUpdate) SetNillableTimeout added in v0.4.0

func (wsu *WorkflowStepUpdate) SetNillableTimeout(i *int) *WorkflowStepUpdate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowStepUpdate) SetOrder added in v0.4.0

func (wsu *WorkflowStepUpdate) SetOrder(i int) *WorkflowStepUpdate

SetOrder sets the "order" field.

func (*WorkflowStepUpdate) SetOutputs added in v0.4.0

func (wsu *WorkflowStepUpdate) SetOutputs(m map[string]interface{}) *WorkflowStepUpdate

SetOutputs sets the "outputs" field.

func (*WorkflowStepUpdate) SetRetryStrategy added in v0.4.0

func (wsu *WorkflowStepUpdate) SetRetryStrategy(ts *types.RetryStrategy) *WorkflowStepUpdate

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepUpdate) SetTimeout added in v0.4.0

func (wsu *WorkflowStepUpdate) SetTimeout(i int) *WorkflowStepUpdate

SetTimeout sets the "timeout" field.

func (*WorkflowStepUpdate) SetUpdateTime added in v0.4.0

func (wsu *WorkflowStepUpdate) SetUpdateTime(t time.Time) *WorkflowStepUpdate

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepUpdate) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepUpdate builder.

type WorkflowStepUpdateInput added in v0.4.0

type WorkflowStepUpdateInput struct {
	WorkflowStepQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Attributes of the workflow step.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Inputs of the workflow step.
	Inputs map[string]interface{} `path:"-" query:"-" json:"inputs,omitempty"`
	// Outputs of the workflow step.
	Outputs map[string]interface{} `path:"-" query:"-" json:"outputs,omitempty"`
	// ID list of the workflow steps that this workflow step depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies,omitempty"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout seconds of the workflow step, 0 means no timeout.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
}

WorkflowStepUpdateInput holds the modification input of the WorkflowStep entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepUpdateInput) Model added in v0.4.0

func (wsui *WorkflowStepUpdateInput) Model() *WorkflowStep

Model returns the WorkflowStep entity for modifying, after validating.

func (*WorkflowStepUpdateInput) SetGinContext added in v0.4.0

func (ic *WorkflowStepUpdateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowStepUpdateInput) SetModelClient added in v0.4.0

func (ic *WorkflowStepUpdateInput) SetModelClient(cli *Client)

func (*WorkflowStepUpdateInput) Validate added in v0.4.0

func (wsui *WorkflowStepUpdateInput) Validate() error

Validate checks the WorkflowStepUpdateInput entity.

func (*WorkflowStepUpdateInput) ValidateWith added in v0.4.0

func (wsui *WorkflowStepUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepUpdateInput entity with the given context and client set.

type WorkflowStepUpdateInputs added in v0.4.0

type WorkflowStepUpdateInputs struct {

	// Project indicates to update WorkflowStep entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`
	// Stage indicates to update WorkflowStep entity MUST under the Stage route.
	Stage *WorkflowStageQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowStepUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowStepUpdateInputs holds the modification input of the WorkflowStep entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowStepUpdateInputs) IDs added in v0.4.0

func (wsui *WorkflowStepUpdateInputs) IDs() []object.ID

IDs returns the ID list of the WorkflowStep entities for modifying, after validating.

func (*WorkflowStepUpdateInputs) Model added in v0.4.0

func (wsui *WorkflowStepUpdateInputs) Model() []*WorkflowStep

Model returns the WorkflowStep entities for modifying, after validating.

func (*WorkflowStepUpdateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowStepUpdateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowStepUpdateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowStepUpdateInputs) SetModelClient(cli *Client)

func (*WorkflowStepUpdateInputs) Validate added in v0.4.0

func (wsui *WorkflowStepUpdateInputs) Validate() error

Validate checks the WorkflowStepUpdateInputs entity.

func (*WorkflowStepUpdateInputs) ValidateWith added in v0.4.0

func (wsui *WorkflowStepUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepUpdateInputs entity with the given context and client set.

type WorkflowStepUpdateInputsItem added in v0.4.0

type WorkflowStepUpdateInputsItem struct {
	// ID of the WorkflowStep entity.
	ID object.ID `path:"-" query:"-" json:"id"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Attributes of the workflow step.
	Attributes map[string]interface{} `path:"-" query:"-" json:"attributes,omitempty"`
	// Inputs of the workflow step.
	Inputs map[string]interface{} `path:"-" query:"-" json:"inputs,omitempty"`
	// Outputs of the workflow step.
	Outputs map[string]interface{} `path:"-" query:"-" json:"outputs,omitempty"`
	// ID list of the workflow steps that this workflow step depends on.
	Dependencies []object.ID `path:"-" query:"-" json:"dependencies"`
	// Retry policy of the workflow step.
	RetryStrategy *types.RetryStrategy `path:"-" query:"-" json:"retryStrategy,omitempty"`
	// Timeout seconds of the workflow step, 0 means no timeout.
	Timeout int `path:"-" query:"-" json:"timeout"`
}

WorkflowStepUpdateInputs holds the modification input item of the WorkflowStep entities.

func (*WorkflowStepUpdateInputsItem) ValidateWith added in v0.4.0

func (wsui *WorkflowStepUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowStepUpdateInputsItem entity with the given context and client set.

type WorkflowStepUpdateOne added in v0.4.0

type WorkflowStepUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowStepUpdateOne is the builder for updating a single WorkflowStep entity.

func (*WorkflowStepUpdateOne) AddOrder added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) AddOrder(i int) *WorkflowStepUpdateOne

AddOrder adds i to the "order" field.

func (*WorkflowStepUpdateOne) AddTimeout added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) AddTimeout(i int) *WorkflowStepUpdateOne

AddTimeout adds i to the "timeout" field.

func (*WorkflowStepUpdateOne) AppendDependencies added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) AppendDependencies(o []object.ID) *WorkflowStepUpdateOne

AppendDependencies appends o to the "dependencies" field.

func (*WorkflowStepUpdateOne) ClearAnnotations added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ClearAnnotations() *WorkflowStepUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepUpdateOne) ClearAttributes added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ClearAttributes() *WorkflowStepUpdateOne

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepUpdateOne) ClearDescription added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ClearDescription() *WorkflowStepUpdateOne

ClearDescription clears the value of the "description" field.

func (*WorkflowStepUpdateOne) ClearInputs added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ClearInputs() *WorkflowStepUpdateOne

ClearInputs clears the value of the "inputs" field.

func (*WorkflowStepUpdateOne) ClearLabels added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ClearLabels() *WorkflowStepUpdateOne

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepUpdateOne) ClearOutputs added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ClearOutputs() *WorkflowStepUpdateOne

ClearOutputs clears the value of the "outputs" field.

func (*WorkflowStepUpdateOne) ClearRetryStrategy added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ClearRetryStrategy() *WorkflowStepUpdateOne

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepUpdateOne) Exec added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WorkflowStepUpdateOne) ExecContext added in v0.4.0

func (c *WorkflowStepUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowStepUpdateOne) ExecE added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStep) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*WorkflowStepUpdateOne) ExecEX added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStep) error)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepUpdateOne) ExecX added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepUpdateOne) Modify added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkflowStepUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*WorkflowStepUpdateOne) Mutation added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) Mutation() *WorkflowStepMutation

Mutation returns the WorkflowStepMutation object of the builder.

func (*WorkflowStepUpdateOne) QueryContext added in v0.4.0

func (c *WorkflowStepUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowStepUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated WorkflowStep entity.

func (*WorkflowStepUpdateOne) SaveE added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStep) error) (*WorkflowStep, error)

SaveE calls the given function after updated the WorkflowStep entity, which is always good for cascading update operations.

func (*WorkflowStepUpdateOne) SaveEX added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStep) error) *WorkflowStep

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowStepUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*WorkflowStepUpdateOne) Select added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) Select(field string, fields ...string) *WorkflowStepUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WorkflowStepUpdateOne) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowStepUpdateOne) SetAnnotations added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetAnnotations(m map[string]string) *WorkflowStepUpdateOne

SetAnnotations sets the "annotations" field.

func (*WorkflowStepUpdateOne) SetAttributes added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetAttributes(m map[string]interface{}) *WorkflowStepUpdateOne

SetAttributes sets the "attributes" field.

func (*WorkflowStepUpdateOne) SetDependencies added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetDependencies(o []object.ID) *WorkflowStepUpdateOne

SetDependencies sets the "dependencies" field.

func (*WorkflowStepUpdateOne) SetDescription added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetDescription(s string) *WorkflowStepUpdateOne

SetDescription sets the "description" field.

func (*WorkflowStepUpdateOne) SetInputs added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetInputs(m map[string]interface{}) *WorkflowStepUpdateOne

SetInputs sets the "inputs" field.

func (*WorkflowStepUpdateOne) SetLabels added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetLabels(m map[string]string) *WorkflowStepUpdateOne

SetLabels sets the "labels" field.

func (*WorkflowStepUpdateOne) SetNillableDescription added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetNillableDescription(s *string) *WorkflowStepUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowStepUpdateOne) SetNillableOrder added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetNillableOrder(i *int) *WorkflowStepUpdateOne

SetNillableOrder sets the "order" field if the given value is not nil.

func (*WorkflowStepUpdateOne) SetNillableTimeout added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetNillableTimeout(i *int) *WorkflowStepUpdateOne

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowStepUpdateOne) SetOrder added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetOrder(i int) *WorkflowStepUpdateOne

SetOrder sets the "order" field.

func (*WorkflowStepUpdateOne) SetOutputs added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetOutputs(m map[string]interface{}) *WorkflowStepUpdateOne

SetOutputs sets the "outputs" field.

func (*WorkflowStepUpdateOne) SetRetryStrategy added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetRetryStrategy(ts *types.RetryStrategy) *WorkflowStepUpdateOne

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepUpdateOne) SetTimeout added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetTimeout(i int) *WorkflowStepUpdateOne

SetTimeout sets the "timeout" field.

func (*WorkflowStepUpdateOne) SetUpdateTime added in v0.4.0

func (wsuo *WorkflowStepUpdateOne) SetUpdateTime(t time.Time) *WorkflowStepUpdateOne

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepUpdateOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowStepUpdate builder.

type WorkflowStepUpsert added in v0.4.0

type WorkflowStepUpsert struct {
	*sql.UpdateSet
}

WorkflowStepUpsert is the "OnConflict" setter.

func (*WorkflowStepUpsert) AddOrder added in v0.4.0

func (u *WorkflowStepUpsert) AddOrder(v int) *WorkflowStepUpsert

AddOrder adds v to the "order" field.

func (*WorkflowStepUpsert) AddTimeout added in v0.4.0

func (u *WorkflowStepUpsert) AddTimeout(v int) *WorkflowStepUpsert

AddTimeout adds v to the "timeout" field.

func (*WorkflowStepUpsert) ClearAnnotations added in v0.4.0

func (u *WorkflowStepUpsert) ClearAnnotations() *WorkflowStepUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepUpsert) ClearAttributes added in v0.4.0

func (u *WorkflowStepUpsert) ClearAttributes() *WorkflowStepUpsert

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepUpsert) ClearDescription added in v0.4.0

func (u *WorkflowStepUpsert) ClearDescription() *WorkflowStepUpsert

ClearDescription clears the value of the "description" field.

func (*WorkflowStepUpsert) ClearInputs added in v0.4.0

func (u *WorkflowStepUpsert) ClearInputs() *WorkflowStepUpsert

ClearInputs clears the value of the "inputs" field.

func (*WorkflowStepUpsert) ClearLabels added in v0.4.0

func (u *WorkflowStepUpsert) ClearLabels() *WorkflowStepUpsert

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepUpsert) ClearOutputs added in v0.4.0

func (u *WorkflowStepUpsert) ClearOutputs() *WorkflowStepUpsert

ClearOutputs clears the value of the "outputs" field.

func (*WorkflowStepUpsert) ClearRetryStrategy added in v0.4.0

func (u *WorkflowStepUpsert) ClearRetryStrategy() *WorkflowStepUpsert

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepUpsert) SetAnnotations added in v0.4.0

func (u *WorkflowStepUpsert) SetAnnotations(v map[string]string) *WorkflowStepUpsert

SetAnnotations sets the "annotations" field.

func (*WorkflowStepUpsert) SetAttributes added in v0.4.0

func (u *WorkflowStepUpsert) SetAttributes(v map[string]interface{}) *WorkflowStepUpsert

SetAttributes sets the "attributes" field.

func (*WorkflowStepUpsert) SetDependencies added in v0.4.0

func (u *WorkflowStepUpsert) SetDependencies(v []object.ID) *WorkflowStepUpsert

SetDependencies sets the "dependencies" field.

func (*WorkflowStepUpsert) SetDescription added in v0.4.0

func (u *WorkflowStepUpsert) SetDescription(v string) *WorkflowStepUpsert

SetDescription sets the "description" field.

func (*WorkflowStepUpsert) SetInputs added in v0.4.0

func (u *WorkflowStepUpsert) SetInputs(v map[string]interface{}) *WorkflowStepUpsert

SetInputs sets the "inputs" field.

func (*WorkflowStepUpsert) SetLabels added in v0.4.0

func (u *WorkflowStepUpsert) SetLabels(v map[string]string) *WorkflowStepUpsert

SetLabels sets the "labels" field.

func (*WorkflowStepUpsert) SetOrder added in v0.4.0

func (u *WorkflowStepUpsert) SetOrder(v int) *WorkflowStepUpsert

SetOrder sets the "order" field.

func (*WorkflowStepUpsert) SetOutputs added in v0.4.0

func (u *WorkflowStepUpsert) SetOutputs(v map[string]interface{}) *WorkflowStepUpsert

SetOutputs sets the "outputs" field.

func (*WorkflowStepUpsert) SetRetryStrategy added in v0.4.0

func (u *WorkflowStepUpsert) SetRetryStrategy(v *types.RetryStrategy) *WorkflowStepUpsert

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepUpsert) SetTimeout added in v0.4.0

func (u *WorkflowStepUpsert) SetTimeout(v int) *WorkflowStepUpsert

SetTimeout sets the "timeout" field.

func (*WorkflowStepUpsert) SetUpdateTime added in v0.4.0

func (u *WorkflowStepUpsert) SetUpdateTime(v time.Time) *WorkflowStepUpsert

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepUpsert) UpdateAnnotations added in v0.4.0

func (u *WorkflowStepUpsert) UpdateAnnotations() *WorkflowStepUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateAttributes added in v0.4.0

func (u *WorkflowStepUpsert) UpdateAttributes() *WorkflowStepUpsert

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateDependencies added in v0.4.0

func (u *WorkflowStepUpsert) UpdateDependencies() *WorkflowStepUpsert

UpdateDependencies sets the "dependencies" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateDescription added in v0.4.0

func (u *WorkflowStepUpsert) UpdateDescription() *WorkflowStepUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateInputs added in v0.4.0

func (u *WorkflowStepUpsert) UpdateInputs() *WorkflowStepUpsert

UpdateInputs sets the "inputs" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateLabels added in v0.4.0

func (u *WorkflowStepUpsert) UpdateLabels() *WorkflowStepUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateOrder added in v0.4.0

func (u *WorkflowStepUpsert) UpdateOrder() *WorkflowStepUpsert

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateOutputs added in v0.4.0

func (u *WorkflowStepUpsert) UpdateOutputs() *WorkflowStepUpsert

UpdateOutputs sets the "outputs" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateRetryStrategy added in v0.4.0

func (u *WorkflowStepUpsert) UpdateRetryStrategy() *WorkflowStepUpsert

UpdateRetryStrategy sets the "retryStrategy" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateTimeout added in v0.4.0

func (u *WorkflowStepUpsert) UpdateTimeout() *WorkflowStepUpsert

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowStepUpsert) UpdateUpdateTime added in v0.4.0

func (u *WorkflowStepUpsert) UpdateUpdateTime() *WorkflowStepUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStepUpsertBulk added in v0.4.0

type WorkflowStepUpsertBulk struct {
	// contains filtered or unexported fields
}

WorkflowStepUpsertBulk is the builder for "upsert"-ing a bulk of WorkflowStep nodes.

func (*WorkflowStepUpsertBulk) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStepUpsertBulk) AddTimeout added in v0.4.0

AddTimeout adds v to the "timeout" field.

func (*WorkflowStepUpsertBulk) ClearAnnotations added in v0.4.0

func (u *WorkflowStepUpsertBulk) ClearAnnotations() *WorkflowStepUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepUpsertBulk) ClearAttributes added in v0.4.0

func (u *WorkflowStepUpsertBulk) ClearAttributes() *WorkflowStepUpsertBulk

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepUpsertBulk) ClearDescription added in v0.4.0

func (u *WorkflowStepUpsertBulk) ClearDescription() *WorkflowStepUpsertBulk

ClearDescription clears the value of the "description" field.

func (*WorkflowStepUpsertBulk) ClearInputs added in v0.4.0

ClearInputs clears the value of the "inputs" field.

func (*WorkflowStepUpsertBulk) ClearLabels added in v0.4.0

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepUpsertBulk) ClearOutputs added in v0.4.0

ClearOutputs clears the value of the "outputs" field.

func (*WorkflowStepUpsertBulk) ClearRetryStrategy added in v0.4.0

func (u *WorkflowStepUpsertBulk) ClearRetryStrategy() *WorkflowStepUpsertBulk

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowStepUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStepUpsertBulk) ExecE added in v0.4.0

func (u *WorkflowStepUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStep) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStepUpsertBulk) ExecEX added in v0.4.0

func (u *WorkflowStepUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStep) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStepUpsertBulk) ExecX added in v0.4.0

func (u *WorkflowStepUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowStep.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*WorkflowStepUpsertBulk) SetAnnotations added in v0.4.0

func (u *WorkflowStepUpsertBulk) SetAnnotations(v map[string]string) *WorkflowStepUpsertBulk

SetAnnotations sets the "annotations" field.

func (*WorkflowStepUpsertBulk) SetAttributes added in v0.4.0

func (u *WorkflowStepUpsertBulk) SetAttributes(v map[string]interface{}) *WorkflowStepUpsertBulk

SetAttributes sets the "attributes" field.

func (*WorkflowStepUpsertBulk) SetDependencies added in v0.4.0

func (u *WorkflowStepUpsertBulk) SetDependencies(v []object.ID) *WorkflowStepUpsertBulk

SetDependencies sets the "dependencies" field.

func (*WorkflowStepUpsertBulk) SetDescription added in v0.4.0

SetDescription sets the "description" field.

func (*WorkflowStepUpsertBulk) SetInputs added in v0.4.0

func (u *WorkflowStepUpsertBulk) SetInputs(v map[string]interface{}) *WorkflowStepUpsertBulk

SetInputs sets the "inputs" field.

func (*WorkflowStepUpsertBulk) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStepUpsertBulk) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStepUpsertBulk) SetOutputs added in v0.4.0

func (u *WorkflowStepUpsertBulk) SetOutputs(v map[string]interface{}) *WorkflowStepUpsertBulk

SetOutputs sets the "outputs" field.

func (*WorkflowStepUpsertBulk) SetRetryStrategy added in v0.4.0

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepUpsertBulk) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowStepUpsertBulk) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowStepCreateBulk.OnConflict documentation for more info.

func (*WorkflowStepUpsertBulk) UpdateAnnotations added in v0.4.0

func (u *WorkflowStepUpsertBulk) UpdateAnnotations() *WorkflowStepUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateAttributes added in v0.4.0

func (u *WorkflowStepUpsertBulk) UpdateAttributes() *WorkflowStepUpsertBulk

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateDependencies added in v0.4.0

func (u *WorkflowStepUpsertBulk) UpdateDependencies() *WorkflowStepUpsertBulk

UpdateDependencies sets the "dependencies" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateDescription added in v0.4.0

func (u *WorkflowStepUpsertBulk) UpdateDescription() *WorkflowStepUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateInputs added in v0.4.0

UpdateInputs sets the "inputs" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateLabels added in v0.4.0

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateNewValues added in v0.4.0

func (u *WorkflowStepUpsertBulk) UpdateNewValues() *WorkflowStepUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.WorkflowStep.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowstep.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowStepUpsertBulk) UpdateOrder added in v0.4.0

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateOutputs added in v0.4.0

func (u *WorkflowStepUpsertBulk) UpdateOutputs() *WorkflowStepUpsertBulk

UpdateOutputs sets the "outputs" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateRetryStrategy added in v0.4.0

func (u *WorkflowStepUpsertBulk) UpdateRetryStrategy() *WorkflowStepUpsertBulk

UpdateRetryStrategy sets the "retryStrategy" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateTimeout added in v0.4.0

func (u *WorkflowStepUpsertBulk) UpdateTimeout() *WorkflowStepUpsertBulk

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowStepUpsertBulk) UpdateUpdateTime added in v0.4.0

func (u *WorkflowStepUpsertBulk) UpdateUpdateTime() *WorkflowStepUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowStepUpsertOne added in v0.4.0

type WorkflowStepUpsertOne struct {
	// contains filtered or unexported fields
}

WorkflowStepUpsertOne is the builder for "upsert"-ing

one WorkflowStep node.

func (*WorkflowStepUpsertOne) AddOrder added in v0.4.0

AddOrder adds v to the "order" field.

func (*WorkflowStepUpsertOne) AddTimeout added in v0.4.0

AddTimeout adds v to the "timeout" field.

func (*WorkflowStepUpsertOne) ClearAnnotations added in v0.4.0

func (u *WorkflowStepUpsertOne) ClearAnnotations() *WorkflowStepUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowStepUpsertOne) ClearAttributes added in v0.4.0

func (u *WorkflowStepUpsertOne) ClearAttributes() *WorkflowStepUpsertOne

ClearAttributes clears the value of the "attributes" field.

func (*WorkflowStepUpsertOne) ClearDescription added in v0.4.0

func (u *WorkflowStepUpsertOne) ClearDescription() *WorkflowStepUpsertOne

ClearDescription clears the value of the "description" field.

func (*WorkflowStepUpsertOne) ClearInputs added in v0.4.0

func (u *WorkflowStepUpsertOne) ClearInputs() *WorkflowStepUpsertOne

ClearInputs clears the value of the "inputs" field.

func (*WorkflowStepUpsertOne) ClearLabels added in v0.4.0

func (u *WorkflowStepUpsertOne) ClearLabels() *WorkflowStepUpsertOne

ClearLabels clears the value of the "labels" field.

func (*WorkflowStepUpsertOne) ClearOutputs added in v0.4.0

func (u *WorkflowStepUpsertOne) ClearOutputs() *WorkflowStepUpsertOne

ClearOutputs clears the value of the "outputs" field.

func (*WorkflowStepUpsertOne) ClearRetryStrategy added in v0.4.0

func (u *WorkflowStepUpsertOne) ClearRetryStrategy() *WorkflowStepUpsertOne

ClearRetryStrategy clears the value of the "retryStrategy" field.

func (*WorkflowStepUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowStepUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*WorkflowStepUpsertOne) ExecE added in v0.4.0

func (u *WorkflowStepUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStep) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowStepUpsertOne) ExecEX added in v0.4.0

func (u *WorkflowStepUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *WorkflowStep) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowStepUpsertOne) ExecX added in v0.4.0

func (u *WorkflowStepUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowStepUpsertOne) ID added in v0.4.0

func (u *WorkflowStepUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*WorkflowStepUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*WorkflowStepUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.WorkflowStep.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*WorkflowStepUpsertOne) SetAnnotations added in v0.4.0

func (u *WorkflowStepUpsertOne) SetAnnotations(v map[string]string) *WorkflowStepUpsertOne

SetAnnotations sets the "annotations" field.

func (*WorkflowStepUpsertOne) SetAttributes added in v0.4.0

func (u *WorkflowStepUpsertOne) SetAttributes(v map[string]interface{}) *WorkflowStepUpsertOne

SetAttributes sets the "attributes" field.

func (*WorkflowStepUpsertOne) SetDependencies added in v0.4.0

func (u *WorkflowStepUpsertOne) SetDependencies(v []object.ID) *WorkflowStepUpsertOne

SetDependencies sets the "dependencies" field.

func (*WorkflowStepUpsertOne) SetDescription added in v0.4.0

func (u *WorkflowStepUpsertOne) SetDescription(v string) *WorkflowStepUpsertOne

SetDescription sets the "description" field.

func (*WorkflowStepUpsertOne) SetInputs added in v0.4.0

func (u *WorkflowStepUpsertOne) SetInputs(v map[string]interface{}) *WorkflowStepUpsertOne

SetInputs sets the "inputs" field.

func (*WorkflowStepUpsertOne) SetLabels added in v0.4.0

SetLabels sets the "labels" field.

func (*WorkflowStepUpsertOne) SetOrder added in v0.4.0

SetOrder sets the "order" field.

func (*WorkflowStepUpsertOne) SetOutputs added in v0.4.0

func (u *WorkflowStepUpsertOne) SetOutputs(v map[string]interface{}) *WorkflowStepUpsertOne

SetOutputs sets the "outputs" field.

func (*WorkflowStepUpsertOne) SetRetryStrategy added in v0.4.0

SetRetryStrategy sets the "retryStrategy" field.

func (*WorkflowStepUpsertOne) SetTimeout added in v0.4.0

SetTimeout sets the "timeout" field.

func (*WorkflowStepUpsertOne) SetUpdateTime added in v0.4.0

SetUpdateTime sets the "update_time" field.

func (*WorkflowStepUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the WorkflowStepCreate.OnConflict documentation for more info.

func (*WorkflowStepUpsertOne) UpdateAnnotations added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateAnnotations() *WorkflowStepUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateAttributes added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateAttributes() *WorkflowStepUpsertOne

UpdateAttributes sets the "attributes" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateDependencies added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateDependencies() *WorkflowStepUpsertOne

UpdateDependencies sets the "dependencies" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateDescription added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateDescription() *WorkflowStepUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateInputs added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateInputs() *WorkflowStepUpsertOne

UpdateInputs sets the "inputs" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateLabels added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateLabels() *WorkflowStepUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateNewValues added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateNewValues() *WorkflowStepUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.WorkflowStep.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflowstep.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowStepUpsertOne) UpdateOrder added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateOrder() *WorkflowStepUpsertOne

UpdateOrder sets the "order" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateOutputs added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateOutputs() *WorkflowStepUpsertOne

UpdateOutputs sets the "outputs" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateRetryStrategy added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateRetryStrategy() *WorkflowStepUpsertOne

UpdateRetryStrategy sets the "retryStrategy" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateTimeout added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateTimeout() *WorkflowStepUpsertOne

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowStepUpsertOne) UpdateUpdateTime added in v0.4.0

func (u *WorkflowStepUpsertOne) UpdateUpdateTime() *WorkflowStepUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type WorkflowSteps added in v0.4.0

type WorkflowSteps []*WorkflowStep

WorkflowSteps is a parsable slice of WorkflowStep.

func (WorkflowSteps) View added in v0.4.0

func (_wss WorkflowSteps) View() []*WorkflowStepOutput

View returns the output of WorkflowStep entities.

type WorkflowUpdate added in v0.4.0

type WorkflowUpdate struct {
	// contains filtered or unexported fields
}

WorkflowUpdate is the builder for updating Workflow entities.

func (*WorkflowUpdate) AddExecutionIDs added in v0.4.0

func (wu *WorkflowUpdate) AddExecutionIDs(ids ...object.ID) *WorkflowUpdate

AddExecutionIDs adds the "executions" edge to the WorkflowExecution entity by IDs.

func (*WorkflowUpdate) AddExecutions added in v0.4.0

func (wu *WorkflowUpdate) AddExecutions(w ...*WorkflowExecution) *WorkflowUpdate

AddExecutions adds the "executions" edges to the WorkflowExecution entity.

func (*WorkflowUpdate) AddParallelism added in v0.4.0

func (wu *WorkflowUpdate) AddParallelism(i int) *WorkflowUpdate

AddParallelism adds i to the "parallelism" field.

func (*WorkflowUpdate) AddStageIDs added in v0.4.0

func (wu *WorkflowUpdate) AddStageIDs(ids ...object.ID) *WorkflowUpdate

AddStageIDs adds the "stages" edge to the WorkflowStage entity by IDs.

func (*WorkflowUpdate) AddStages added in v0.4.0

func (wu *WorkflowUpdate) AddStages(w ...*WorkflowStage) *WorkflowUpdate

AddStages adds the "stages" edges to the WorkflowStage entity.

func (*WorkflowUpdate) AddTimeout added in v0.4.0

func (wu *WorkflowUpdate) AddTimeout(i int) *WorkflowUpdate

AddTimeout adds i to the "timeout" field.

func (*WorkflowUpdate) AddVersion added in v0.4.0

func (wu *WorkflowUpdate) AddVersion(i int) *WorkflowUpdate

AddVersion adds i to the "version" field.

func (*WorkflowUpdate) AppendVariables added in v0.4.0

func (wu *WorkflowUpdate) AppendVariables(tv types.WorkflowVariables) *WorkflowUpdate

AppendVariables appends tv to the "variables" field.

func (*WorkflowUpdate) ClearAnnotations added in v0.4.0

func (wu *WorkflowUpdate) ClearAnnotations() *WorkflowUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowUpdate) ClearDescription added in v0.4.0

func (wu *WorkflowUpdate) ClearDescription() *WorkflowUpdate

ClearDescription clears the value of the "description" field.

func (*WorkflowUpdate) ClearExecutions added in v0.4.0

func (wu *WorkflowUpdate) ClearExecutions() *WorkflowUpdate

ClearExecutions clears all "executions" edges to the WorkflowExecution entity.

func (*WorkflowUpdate) ClearLabels added in v0.4.0

func (wu *WorkflowUpdate) ClearLabels() *WorkflowUpdate

ClearLabels clears the value of the "labels" field.

func (*WorkflowUpdate) ClearStages added in v0.4.0

func (wu *WorkflowUpdate) ClearStages() *WorkflowUpdate

ClearStages clears all "stages" edges to the WorkflowStage entity.

func (*WorkflowUpdate) ClearVariables added in v0.4.0

func (wu *WorkflowUpdate) ClearVariables() *WorkflowUpdate

ClearVariables clears the value of the "variables" field.

func (*WorkflowUpdate) Exec added in v0.4.0

func (wu *WorkflowUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowUpdate) ExecContext added in v0.4.0

func (c *WorkflowUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowUpdate) ExecX added in v0.4.0

func (wu *WorkflowUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowUpdate) Modify added in v0.4.0

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 added in v0.4.0

func (wu *WorkflowUpdate) Mutation() *WorkflowMutation

Mutation returns the WorkflowMutation object of the builder.

func (*WorkflowUpdate) QueryContext added in v0.4.0

func (c *WorkflowUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowUpdate) RemoveExecutionIDs added in v0.4.0

func (wu *WorkflowUpdate) RemoveExecutionIDs(ids ...object.ID) *WorkflowUpdate

RemoveExecutionIDs removes the "executions" edge to WorkflowExecution entities by IDs.

func (*WorkflowUpdate) RemoveExecutions added in v0.4.0

func (wu *WorkflowUpdate) RemoveExecutions(w ...*WorkflowExecution) *WorkflowUpdate

RemoveExecutions removes "executions" edges to WorkflowExecution entities.

func (*WorkflowUpdate) RemoveStageIDs added in v0.4.0

func (wu *WorkflowUpdate) RemoveStageIDs(ids ...object.ID) *WorkflowUpdate

RemoveStageIDs removes the "stages" edge to WorkflowStage entities by IDs.

func (*WorkflowUpdate) RemoveStages added in v0.4.0

func (wu *WorkflowUpdate) RemoveStages(w ...*WorkflowStage) *WorkflowUpdate

RemoveStages removes "stages" edges to WorkflowStage entities.

func (*WorkflowUpdate) Save added in v0.4.0

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 added in v0.4.0

func (wu *WorkflowUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WorkflowUpdate) Set added in v0.4.0

func (wu *WorkflowUpdate) Set(obj *Workflow) *WorkflowUpdate

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value is not zero.

For no default but required fields, Set calls directly.

For no default but optional fields, Set calls if the value is not zero, or clears if the value is zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowUpdate) SetAnnotations added in v0.4.0

func (wu *WorkflowUpdate) SetAnnotations(m map[string]string) *WorkflowUpdate

SetAnnotations sets the "annotations" field.

func (*WorkflowUpdate) SetDescription added in v0.4.0

func (wu *WorkflowUpdate) SetDescription(s string) *WorkflowUpdate

SetDescription sets the "description" field.

func (*WorkflowUpdate) SetLabels added in v0.4.0

func (wu *WorkflowUpdate) SetLabels(m map[string]string) *WorkflowUpdate

SetLabels sets the "labels" field.

func (*WorkflowUpdate) SetNillableDescription added in v0.4.0

func (wu *WorkflowUpdate) SetNillableDescription(s *string) *WorkflowUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowUpdate) SetNillableParallelism added in v0.4.0

func (wu *WorkflowUpdate) SetNillableParallelism(i *int) *WorkflowUpdate

SetNillableParallelism sets the "parallelism" field if the given value is not nil.

func (*WorkflowUpdate) SetNillableTimeout added in v0.4.0

func (wu *WorkflowUpdate) SetNillableTimeout(i *int) *WorkflowUpdate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowUpdate) SetNillableVersion added in v0.4.0

func (wu *WorkflowUpdate) SetNillableVersion(i *int) *WorkflowUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*WorkflowUpdate) SetParallelism added in v0.4.0

func (wu *WorkflowUpdate) SetParallelism(i int) *WorkflowUpdate

SetParallelism sets the "parallelism" field.

func (*WorkflowUpdate) SetTimeout added in v0.4.0

func (wu *WorkflowUpdate) SetTimeout(i int) *WorkflowUpdate

SetTimeout sets the "timeout" field.

func (*WorkflowUpdate) SetUpdateTime added in v0.4.0

func (wu *WorkflowUpdate) SetUpdateTime(t time.Time) *WorkflowUpdate

SetUpdateTime sets the "update_time" field.

func (*WorkflowUpdate) SetVariables added in v0.4.0

func (wu *WorkflowUpdate) SetVariables(tv types.WorkflowVariables) *WorkflowUpdate

SetVariables sets the "variables" field.

func (*WorkflowUpdate) SetVersion added in v0.4.0

func (wu *WorkflowUpdate) SetVersion(i int) *WorkflowUpdate

SetVersion sets the "version" field.

func (*WorkflowUpdate) Where added in v0.4.0

func (wu *WorkflowUpdate) Where(ps ...predicate.Workflow) *WorkflowUpdate

Where appends a list predicates to the WorkflowUpdate builder.

type WorkflowUpdateInput added in v0.4.0

type WorkflowUpdateInput struct {
	WorkflowQueryInput `path:",inline" query:"-" json:"-"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism,omitempty"`
	// Timeout seconds of the workflow.
	Timeout int `path:"-" query:"-" json:"timeout,omitempty"`
	// Configs of workflow variables.
	Variables types.WorkflowVariables `path:"-" query:"-" json:"variables,omitempty"`

	// Stages indicates replacing the stale WorkflowStage entities.
	Stages []*WorkflowStageCreateInput `uri:"-" query:"-" json:"stages,omitempty"`
}

WorkflowUpdateInput holds the modification input of the Workflow entity, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowUpdateInput) Model added in v0.4.0

func (wui *WorkflowUpdateInput) Model() *Workflow

Model returns the Workflow entity for modifying, after validating.

func (*WorkflowUpdateInput) SetGinContext added in v0.4.0

func (ic *WorkflowUpdateInput) SetGinContext(ctx *gin.Context)

func (*WorkflowUpdateInput) SetModelClient added in v0.4.0

func (ic *WorkflowUpdateInput) SetModelClient(cli *Client)

func (*WorkflowUpdateInput) Validate added in v0.4.0

func (wui *WorkflowUpdateInput) Validate() error

Validate checks the WorkflowUpdateInput entity.

func (*WorkflowUpdateInput) ValidateWith added in v0.4.0

func (wui *WorkflowUpdateInput) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowUpdateInput entity with the given context and client set.

type WorkflowUpdateInputs added in v0.4.0

type WorkflowUpdateInputs struct {

	// Project indicates to update Workflow entity MUST under the Project route.
	Project *ProjectQueryInput `path:",inline" query:"-" json:"-"`

	// Items holds the entities to create, which MUST not be empty.
	Items []*WorkflowUpdateInputsItem `path:"-" query:"-" json:"items"`
	// contains filtered or unexported fields
}

WorkflowUpdateInputs holds the modification input of the Workflow entities, please tags with `path:",inline" json:",inline"` if embedding.

func (*WorkflowUpdateInputs) IDs added in v0.4.0

func (wui *WorkflowUpdateInputs) IDs() []object.ID

IDs returns the ID list of the Workflow entities for modifying, after validating.

func (*WorkflowUpdateInputs) Model added in v0.4.0

func (wui *WorkflowUpdateInputs) Model() []*Workflow

Model returns the Workflow entities for modifying, after validating.

func (*WorkflowUpdateInputs) SetGinContext added in v0.4.0

func (ic *WorkflowUpdateInputs) SetGinContext(ctx *gin.Context)

func (*WorkflowUpdateInputs) SetModelClient added in v0.4.0

func (ic *WorkflowUpdateInputs) SetModelClient(cli *Client)

func (*WorkflowUpdateInputs) Validate added in v0.4.0

func (wui *WorkflowUpdateInputs) Validate() error

Validate checks the WorkflowUpdateInputs entity.

func (*WorkflowUpdateInputs) ValidateWith added in v0.4.0

func (wui *WorkflowUpdateInputs) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowUpdateInputs entity with the given context and client set.

type WorkflowUpdateInputsItem added in v0.4.0

type WorkflowUpdateInputsItem struct {
	// ID of the Workflow entity, tries to retrieve the entity with the following unique index parts if no ID provided.
	ID object.ID `path:"-" query:"-" json:"id,omitempty"`
	// Name of the Workflow entity, a part of the unique index.
	Name string `path:"-" query:"-" json:"name,omitempty"`

	// Description holds the value of the "description" field.
	Description string `path:"-" query:"-" json:"description,omitempty"`
	// Labels holds the value of the "labels" field.
	Labels map[string]string `path:"-" query:"-" json:"labels,omitempty"`
	// Number of task pods that can be executed in parallel of workflow.
	Parallelism int `path:"-" query:"-" json:"parallelism"`
	// Timeout seconds of the workflow.
	Timeout int `path:"-" query:"-" json:"timeout"`
	// Configs of workflow variables.
	Variables types.WorkflowVariables `path:"-" query:"-" json:"variables,omitempty"`

	// Stages indicates replacing the stale WorkflowStage entities.
	Stages []*WorkflowStageCreateInput `uri:"-" query:"-" json:"stages,omitempty"`
}

WorkflowUpdateInputs holds the modification input item of the Workflow entities.

func (*WorkflowUpdateInputsItem) ValidateWith added in v0.4.0

func (wui *WorkflowUpdateInputsItem) ValidateWith(ctx context.Context, cs ClientSet, cache map[string]any) error

ValidateWith checks the WorkflowUpdateInputsItem entity with the given context and client set.

type WorkflowUpdateOne added in v0.4.0

type WorkflowUpdateOne struct {
	// contains filtered or unexported fields
}

WorkflowUpdateOne is the builder for updating a single Workflow entity.

func (*WorkflowUpdateOne) AddExecutionIDs added in v0.4.0

func (wuo *WorkflowUpdateOne) AddExecutionIDs(ids ...object.ID) *WorkflowUpdateOne

AddExecutionIDs adds the "executions" edge to the WorkflowExecution entity by IDs.

func (*WorkflowUpdateOne) AddExecutions added in v0.4.0

func (wuo *WorkflowUpdateOne) AddExecutions(w ...*WorkflowExecution) *WorkflowUpdateOne

AddExecutions adds the "executions" edges to the WorkflowExecution entity.

func (*WorkflowUpdateOne) AddParallelism added in v0.4.0

func (wuo *WorkflowUpdateOne) AddParallelism(i int) *WorkflowUpdateOne

AddParallelism adds i to the "parallelism" field.

func (*WorkflowUpdateOne) AddStageIDs added in v0.4.0

func (wuo *WorkflowUpdateOne) AddStageIDs(ids ...object.ID) *WorkflowUpdateOne

AddStageIDs adds the "stages" edge to the WorkflowStage entity by IDs.

func (*WorkflowUpdateOne) AddStages added in v0.4.0

func (wuo *WorkflowUpdateOne) AddStages(w ...*WorkflowStage) *WorkflowUpdateOne

AddStages adds the "stages" edges to the WorkflowStage entity.

func (*WorkflowUpdateOne) AddTimeout added in v0.4.0

func (wuo *WorkflowUpdateOne) AddTimeout(i int) *WorkflowUpdateOne

AddTimeout adds i to the "timeout" field.

func (*WorkflowUpdateOne) AddVersion added in v0.4.0

func (wuo *WorkflowUpdateOne) AddVersion(i int) *WorkflowUpdateOne

AddVersion adds i to the "version" field.

func (*WorkflowUpdateOne) AppendVariables added in v0.4.0

func (wuo *WorkflowUpdateOne) AppendVariables(tv types.WorkflowVariables) *WorkflowUpdateOne

AppendVariables appends tv to the "variables" field.

func (*WorkflowUpdateOne) ClearAnnotations added in v0.4.0

func (wuo *WorkflowUpdateOne) ClearAnnotations() *WorkflowUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowUpdateOne) ClearDescription added in v0.4.0

func (wuo *WorkflowUpdateOne) ClearDescription() *WorkflowUpdateOne

ClearDescription clears the value of the "description" field.

func (*WorkflowUpdateOne) ClearExecutions added in v0.4.0

func (wuo *WorkflowUpdateOne) ClearExecutions() *WorkflowUpdateOne

ClearExecutions clears all "executions" edges to the WorkflowExecution entity.

func (*WorkflowUpdateOne) ClearLabels added in v0.4.0

func (wuo *WorkflowUpdateOne) ClearLabels() *WorkflowUpdateOne

ClearLabels clears the value of the "labels" field.

func (*WorkflowUpdateOne) ClearStages added in v0.4.0

func (wuo *WorkflowUpdateOne) ClearStages() *WorkflowUpdateOne

ClearStages clears all "stages" edges to the WorkflowStage entity.

func (*WorkflowUpdateOne) ClearVariables added in v0.4.0

func (wuo *WorkflowUpdateOne) ClearVariables() *WorkflowUpdateOne

ClearVariables clears the value of the "variables" field.

func (*WorkflowUpdateOne) Exec added in v0.4.0

func (wuo *WorkflowUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WorkflowUpdateOne) ExecContext added in v0.4.0

func (c *WorkflowUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*WorkflowUpdateOne) ExecE added in v0.4.0

func (wuo *WorkflowUpdateOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Workflow) error) error

ExecE calls the given function after executed the query, which is always good for cascading update operations.

func (*WorkflowUpdateOne) ExecEX added in v0.4.0

func (wuo *WorkflowUpdateOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Workflow) error)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowUpdateOne) ExecX added in v0.4.0

func (wuo *WorkflowUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowUpdateOne) Modify added in v0.4.0

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 added in v0.4.0

func (wuo *WorkflowUpdateOne) Mutation() *WorkflowMutation

Mutation returns the WorkflowMutation object of the builder.

func (*WorkflowUpdateOne) QueryContext added in v0.4.0

func (c *WorkflowUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*WorkflowUpdateOne) RemoveExecutionIDs added in v0.4.0

func (wuo *WorkflowUpdateOne) RemoveExecutionIDs(ids ...object.ID) *WorkflowUpdateOne

RemoveExecutionIDs removes the "executions" edge to WorkflowExecution entities by IDs.

func (*WorkflowUpdateOne) RemoveExecutions added in v0.4.0

func (wuo *WorkflowUpdateOne) RemoveExecutions(w ...*WorkflowExecution) *WorkflowUpdateOne

RemoveExecutions removes "executions" edges to WorkflowExecution entities.

func (*WorkflowUpdateOne) RemoveStageIDs added in v0.4.0

func (wuo *WorkflowUpdateOne) RemoveStageIDs(ids ...object.ID) *WorkflowUpdateOne

RemoveStageIDs removes the "stages" edge to WorkflowStage entities by IDs.

func (*WorkflowUpdateOne) RemoveStages added in v0.4.0

func (wuo *WorkflowUpdateOne) RemoveStages(w ...*WorkflowStage) *WorkflowUpdateOne

RemoveStages removes "stages" edges to WorkflowStage entities.

func (*WorkflowUpdateOne) Save added in v0.4.0

func (wuo *WorkflowUpdateOne) Save(ctx context.Context) (*Workflow, error)

Save executes the query and returns the updated Workflow entity.

func (*WorkflowUpdateOne) SaveE added in v0.4.0

func (wuo *WorkflowUpdateOne) SaveE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Workflow) error) (*Workflow, error)

SaveE calls the given function after updated the Workflow entity, which is always good for cascading update operations.

func (*WorkflowUpdateOne) SaveEX added in v0.4.0

func (wuo *WorkflowUpdateOne) SaveEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Workflow) error) *Workflow

SaveEX is like SaveE, but panics if an error occurs.

func (*WorkflowUpdateOne) SaveX added in v0.4.0

func (wuo *WorkflowUpdateOne) SaveX(ctx context.Context) *Workflow

SaveX is like Save, but panics if an error occurs.

func (*WorkflowUpdateOne) Select added in v0.4.0

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) Set added in v0.4.0

Set is different from other Set* methods, it sets the value by judging the definition of each field within the entire object.

For default fields, Set calls if the value changes from the original.

For no default but required fields, Set calls if the value changes from the original.

For no default but optional fields, Set calls if the value changes from the original, or clears if changes to zero.

For example:

## Without Default

### Required

db.SetX(obj.X)

### Optional or Default

if _is_zero_value_(obj.X) {
   if _is_not_equal_(db.X, obj.X) {
      db.SetX(obj.X)
   }
} else {
   db.ClearX()
}

## With Default

if _is_zero_value_(obj.X) && _is_not_equal_(db.X, obj.X) {
   db.SetX(obj.X)
}

func (*WorkflowUpdateOne) SetAnnotations added in v0.4.0

func (wuo *WorkflowUpdateOne) SetAnnotations(m map[string]string) *WorkflowUpdateOne

SetAnnotations sets the "annotations" field.

func (*WorkflowUpdateOne) SetDescription added in v0.4.0

func (wuo *WorkflowUpdateOne) SetDescription(s string) *WorkflowUpdateOne

SetDescription sets the "description" field.

func (*WorkflowUpdateOne) SetLabels added in v0.4.0

func (wuo *WorkflowUpdateOne) SetLabels(m map[string]string) *WorkflowUpdateOne

SetLabels sets the "labels" field.

func (*WorkflowUpdateOne) SetNillableDescription added in v0.4.0

func (wuo *WorkflowUpdateOne) SetNillableDescription(s *string) *WorkflowUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*WorkflowUpdateOne) SetNillableParallelism added in v0.4.0

func (wuo *WorkflowUpdateOne) SetNillableParallelism(i *int) *WorkflowUpdateOne

SetNillableParallelism sets the "parallelism" field if the given value is not nil.

func (*WorkflowUpdateOne) SetNillableTimeout added in v0.4.0

func (wuo *WorkflowUpdateOne) SetNillableTimeout(i *int) *WorkflowUpdateOne

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*WorkflowUpdateOne) SetNillableVersion added in v0.4.0

func (wuo *WorkflowUpdateOne) SetNillableVersion(i *int) *WorkflowUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*WorkflowUpdateOne) SetParallelism added in v0.4.0

func (wuo *WorkflowUpdateOne) SetParallelism(i int) *WorkflowUpdateOne

SetParallelism sets the "parallelism" field.

func (*WorkflowUpdateOne) SetTimeout added in v0.4.0

func (wuo *WorkflowUpdateOne) SetTimeout(i int) *WorkflowUpdateOne

SetTimeout sets the "timeout" field.

func (*WorkflowUpdateOne) SetUpdateTime added in v0.4.0

func (wuo *WorkflowUpdateOne) SetUpdateTime(t time.Time) *WorkflowUpdateOne

SetUpdateTime sets the "update_time" field.

func (*WorkflowUpdateOne) SetVariables added in v0.4.0

SetVariables sets the "variables" field.

func (*WorkflowUpdateOne) SetVersion added in v0.4.0

func (wuo *WorkflowUpdateOne) SetVersion(i int) *WorkflowUpdateOne

SetVersion sets the "version" field.

func (*WorkflowUpdateOne) Where added in v0.4.0

Where appends a list predicates to the WorkflowUpdate builder.

type WorkflowUpsert added in v0.4.0

type WorkflowUpsert struct {
	*sql.UpdateSet
}

WorkflowUpsert is the "OnConflict" setter.

func (*WorkflowUpsert) AddParallelism added in v0.4.0

func (u *WorkflowUpsert) AddParallelism(v int) *WorkflowUpsert

AddParallelism adds v to the "parallelism" field.

func (*WorkflowUpsert) AddTimeout added in v0.4.0

func (u *WorkflowUpsert) AddTimeout(v int) *WorkflowUpsert

AddTimeout adds v to the "timeout" field.

func (*WorkflowUpsert) AddVersion added in v0.4.0

func (u *WorkflowUpsert) AddVersion(v int) *WorkflowUpsert

AddVersion adds v to the "version" field.

func (*WorkflowUpsert) ClearAnnotations added in v0.4.0

func (u *WorkflowUpsert) ClearAnnotations() *WorkflowUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowUpsert) ClearDescription added in v0.4.0

func (u *WorkflowUpsert) ClearDescription() *WorkflowUpsert

ClearDescription clears the value of the "description" field.

func (*WorkflowUpsert) ClearLabels added in v0.4.0

func (u *WorkflowUpsert) ClearLabels() *WorkflowUpsert

ClearLabels clears the value of the "labels" field.

func (*WorkflowUpsert) ClearVariables added in v0.4.0

func (u *WorkflowUpsert) ClearVariables() *WorkflowUpsert

ClearVariables clears the value of the "variables" field.

func (*WorkflowUpsert) SetAnnotations added in v0.4.0

func (u *WorkflowUpsert) SetAnnotations(v map[string]string) *WorkflowUpsert

SetAnnotations sets the "annotations" field.

func (*WorkflowUpsert) SetDescription added in v0.4.0

func (u *WorkflowUpsert) SetDescription(v string) *WorkflowUpsert

SetDescription sets the "description" field.

func (*WorkflowUpsert) SetLabels added in v0.4.0

func (u *WorkflowUpsert) SetLabels(v map[string]string) *WorkflowUpsert

SetLabels sets the "labels" field.

func (*WorkflowUpsert) SetParallelism added in v0.4.0

func (u *WorkflowUpsert) SetParallelism(v int) *WorkflowUpsert

SetParallelism sets the "parallelism" field.

func (*WorkflowUpsert) SetTimeout added in v0.4.0

func (u *WorkflowUpsert) SetTimeout(v int) *WorkflowUpsert

SetTimeout sets the "timeout" field.

func (*WorkflowUpsert) SetUpdateTime added in v0.4.0

func (u *WorkflowUpsert) SetUpdateTime(v time.Time) *WorkflowUpsert

SetUpdateTime sets the "update_time" field.

func (*WorkflowUpsert) SetVariables added in v0.4.0

SetVariables sets the "variables" field.

func (*WorkflowUpsert) SetVersion added in v0.4.0

func (u *WorkflowUpsert) SetVersion(v int) *WorkflowUpsert

SetVersion sets the "version" field.

func (*WorkflowUpsert) UpdateAnnotations added in v0.4.0

func (u *WorkflowUpsert) UpdateAnnotations() *WorkflowUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowUpsert) UpdateDescription added in v0.4.0

func (u *WorkflowUpsert) UpdateDescription() *WorkflowUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowUpsert) UpdateLabels added in v0.4.0

func (u *WorkflowUpsert) UpdateLabels() *WorkflowUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowUpsert) UpdateParallelism added in v0.4.0

func (u *WorkflowUpsert) UpdateParallelism() *WorkflowUpsert

UpdateParallelism sets the "parallelism" field to the value that was provided on create.

func (*WorkflowUpsert) UpdateTimeout added in v0.4.0

func (u *WorkflowUpsert) UpdateTimeout() *WorkflowUpsert

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowUpsert) UpdateUpdateTime added in v0.4.0

func (u *WorkflowUpsert) UpdateUpdateTime() *WorkflowUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*WorkflowUpsert) UpdateVariables added in v0.4.0

func (u *WorkflowUpsert) UpdateVariables() *WorkflowUpsert

UpdateVariables sets the "variables" field to the value that was provided on create.

func (*WorkflowUpsert) UpdateVersion added in v0.4.0

func (u *WorkflowUpsert) UpdateVersion() *WorkflowUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

type WorkflowUpsertBulk added in v0.4.0

type WorkflowUpsertBulk struct {
	// contains filtered or unexported fields
}

WorkflowUpsertBulk is the builder for "upsert"-ing a bulk of Workflow nodes.

func (*WorkflowUpsertBulk) AddParallelism added in v0.4.0

func (u *WorkflowUpsertBulk) AddParallelism(v int) *WorkflowUpsertBulk

AddParallelism adds v to the "parallelism" field.

func (*WorkflowUpsertBulk) AddTimeout added in v0.4.0

func (u *WorkflowUpsertBulk) AddTimeout(v int) *WorkflowUpsertBulk

AddTimeout adds v to the "timeout" field.

func (*WorkflowUpsertBulk) AddVersion added in v0.4.0

func (u *WorkflowUpsertBulk) AddVersion(v int) *WorkflowUpsertBulk

AddVersion adds v to the "version" field.

func (*WorkflowUpsertBulk) ClearAnnotations added in v0.4.0

func (u *WorkflowUpsertBulk) ClearAnnotations() *WorkflowUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowUpsertBulk) ClearDescription added in v0.4.0

func (u *WorkflowUpsertBulk) ClearDescription() *WorkflowUpsertBulk

ClearDescription clears the value of the "description" field.

func (*WorkflowUpsertBulk) ClearLabels added in v0.4.0

func (u *WorkflowUpsertBulk) ClearLabels() *WorkflowUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*WorkflowUpsertBulk) ClearVariables added in v0.4.0

func (u *WorkflowUpsertBulk) ClearVariables() *WorkflowUpsertBulk

ClearVariables clears the value of the "variables" field.

func (*WorkflowUpsertBulk) DoNothing added in v0.4.0

func (u *WorkflowUpsertBulk) DoNothing() *WorkflowUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowUpsertBulk) Exec added in v0.4.0

func (u *WorkflowUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowUpsertBulk) ExecE added in v0.4.0

func (u *WorkflowUpsertBulk) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Workflow) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowUpsertBulk) ExecEX added in v0.4.0

func (u *WorkflowUpsertBulk) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Workflow) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowUpsertBulk) ExecX added in v0.4.0

func (u *WorkflowUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Workflow.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*WorkflowUpsertBulk) SetAnnotations added in v0.4.0

func (u *WorkflowUpsertBulk) SetAnnotations(v map[string]string) *WorkflowUpsertBulk

SetAnnotations sets the "annotations" field.

func (*WorkflowUpsertBulk) SetDescription added in v0.4.0

func (u *WorkflowUpsertBulk) SetDescription(v string) *WorkflowUpsertBulk

SetDescription sets the "description" field.

func (*WorkflowUpsertBulk) SetLabels added in v0.4.0

func (u *WorkflowUpsertBulk) SetLabels(v map[string]string) *WorkflowUpsertBulk

SetLabels sets the "labels" field.

func (*WorkflowUpsertBulk) SetParallelism added in v0.4.0

func (u *WorkflowUpsertBulk) SetParallelism(v int) *WorkflowUpsertBulk

SetParallelism sets the "parallelism" field.

func (*WorkflowUpsertBulk) SetTimeout added in v0.4.0

func (u *WorkflowUpsertBulk) SetTimeout(v int) *WorkflowUpsertBulk

SetTimeout sets the "timeout" field.

func (*WorkflowUpsertBulk) SetUpdateTime added in v0.4.0

func (u *WorkflowUpsertBulk) SetUpdateTime(v time.Time) *WorkflowUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*WorkflowUpsertBulk) SetVariables added in v0.4.0

SetVariables sets the "variables" field.

func (*WorkflowUpsertBulk) SetVersion added in v0.4.0

func (u *WorkflowUpsertBulk) SetVersion(v int) *WorkflowUpsertBulk

SetVersion sets the "version" field.

func (*WorkflowUpsertBulk) Update added in v0.4.0

func (u *WorkflowUpsertBulk) Update(set func(*WorkflowUpsert)) *WorkflowUpsertBulk

Update allows overriding fields `UPDATE` values. See the WorkflowCreateBulk.OnConflict documentation for more info.

func (*WorkflowUpsertBulk) UpdateAnnotations added in v0.4.0

func (u *WorkflowUpsertBulk) UpdateAnnotations() *WorkflowUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowUpsertBulk) UpdateDescription added in v0.4.0

func (u *WorkflowUpsertBulk) UpdateDescription() *WorkflowUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowUpsertBulk) UpdateLabels added in v0.4.0

func (u *WorkflowUpsertBulk) UpdateLabels() *WorkflowUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowUpsertBulk) UpdateNewValues added in v0.4.0

func (u *WorkflowUpsertBulk) UpdateNewValues() *WorkflowUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Workflow.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflow.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowUpsertBulk) UpdateParallelism added in v0.4.0

func (u *WorkflowUpsertBulk) UpdateParallelism() *WorkflowUpsertBulk

UpdateParallelism sets the "parallelism" field to the value that was provided on create.

func (*WorkflowUpsertBulk) UpdateTimeout added in v0.4.0

func (u *WorkflowUpsertBulk) UpdateTimeout() *WorkflowUpsertBulk

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowUpsertBulk) UpdateUpdateTime added in v0.4.0

func (u *WorkflowUpsertBulk) UpdateUpdateTime() *WorkflowUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*WorkflowUpsertBulk) UpdateVariables added in v0.4.0

func (u *WorkflowUpsertBulk) UpdateVariables() *WorkflowUpsertBulk

UpdateVariables sets the "variables" field to the value that was provided on create.

func (*WorkflowUpsertBulk) UpdateVersion added in v0.4.0

func (u *WorkflowUpsertBulk) UpdateVersion() *WorkflowUpsertBulk

UpdateVersion sets the "version" field to the value that was provided on create.

type WorkflowUpsertOne added in v0.4.0

type WorkflowUpsertOne struct {
	// contains filtered or unexported fields
}

WorkflowUpsertOne is the builder for "upsert"-ing

one Workflow node.

func (*WorkflowUpsertOne) AddParallelism added in v0.4.0

func (u *WorkflowUpsertOne) AddParallelism(v int) *WorkflowUpsertOne

AddParallelism adds v to the "parallelism" field.

func (*WorkflowUpsertOne) AddTimeout added in v0.4.0

func (u *WorkflowUpsertOne) AddTimeout(v int) *WorkflowUpsertOne

AddTimeout adds v to the "timeout" field.

func (*WorkflowUpsertOne) AddVersion added in v0.4.0

func (u *WorkflowUpsertOne) AddVersion(v int) *WorkflowUpsertOne

AddVersion adds v to the "version" field.

func (*WorkflowUpsertOne) ClearAnnotations added in v0.4.0

func (u *WorkflowUpsertOne) ClearAnnotations() *WorkflowUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*WorkflowUpsertOne) ClearDescription added in v0.4.0

func (u *WorkflowUpsertOne) ClearDescription() *WorkflowUpsertOne

ClearDescription clears the value of the "description" field.

func (*WorkflowUpsertOne) ClearLabels added in v0.4.0

func (u *WorkflowUpsertOne) ClearLabels() *WorkflowUpsertOne

ClearLabels clears the value of the "labels" field.

func (*WorkflowUpsertOne) ClearVariables added in v0.4.0

func (u *WorkflowUpsertOne) ClearVariables() *WorkflowUpsertOne

ClearVariables clears the value of the "variables" field.

func (*WorkflowUpsertOne) DoNothing added in v0.4.0

func (u *WorkflowUpsertOne) DoNothing() *WorkflowUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorkflowUpsertOne) Exec added in v0.4.0

func (u *WorkflowUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*WorkflowUpsertOne) ExecE added in v0.4.0

func (u *WorkflowUpsertOne) ExecE(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Workflow) error) error

ExecE calls the given function after executed the query, which is always good for cascading create operations.

func (*WorkflowUpsertOne) ExecEX added in v0.4.0

func (u *WorkflowUpsertOne) ExecEX(ctx context.Context, cbs ...func(ctx context.Context, mc ClientSet, updated *Workflow) error)

ExecEX is like ExecE, but panics if an error occurs.

func (*WorkflowUpsertOne) ExecX added in v0.4.0

func (u *WorkflowUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorkflowUpsertOne) ID added in v0.4.0

func (u *WorkflowUpsertOne) ID(ctx context.Context) (id object.ID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*WorkflowUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*WorkflowUpsertOne) Ignore added in v0.4.0

func (u *WorkflowUpsertOne) Ignore() *WorkflowUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Workflow.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*WorkflowUpsertOne) SetAnnotations added in v0.4.0

func (u *WorkflowUpsertOne) SetAnnotations(v map[string]string) *WorkflowUpsertOne

SetAnnotations sets the "annotations" field.

func (*WorkflowUpsertOne) SetDescription added in v0.4.0

func (u *WorkflowUpsertOne) SetDescription(v string) *WorkflowUpsertOne

SetDescription sets the "description" field.

func (*WorkflowUpsertOne) SetLabels added in v0.4.0

func (u *WorkflowUpsertOne) SetLabels(v map[string]string) *WorkflowUpsertOne

SetLabels sets the "labels" field.

func (*WorkflowUpsertOne) SetParallelism added in v0.4.0

func (u *WorkflowUpsertOne) SetParallelism(v int) *WorkflowUpsertOne

SetParallelism sets the "parallelism" field.

func (*WorkflowUpsertOne) SetTimeout added in v0.4.0

func (u *WorkflowUpsertOne) SetTimeout(v int) *WorkflowUpsertOne

SetTimeout sets the "timeout" field.

func (*WorkflowUpsertOne) SetUpdateTime added in v0.4.0

func (u *WorkflowUpsertOne) SetUpdateTime(v time.Time) *WorkflowUpsertOne

SetUpdateTime sets the "update_time" field.

func (*WorkflowUpsertOne) SetVariables added in v0.4.0

SetVariables sets the "variables" field.

func (*WorkflowUpsertOne) SetVersion added in v0.4.0

func (u *WorkflowUpsertOne) SetVersion(v int) *WorkflowUpsertOne

SetVersion sets the "version" field.

func (*WorkflowUpsertOne) Update added in v0.4.0

func (u *WorkflowUpsertOne) Update(set func(*WorkflowUpsert)) *WorkflowUpsertOne

Update allows overriding fields `UPDATE` values. See the WorkflowCreate.OnConflict documentation for more info.

func (*WorkflowUpsertOne) UpdateAnnotations added in v0.4.0

func (u *WorkflowUpsertOne) UpdateAnnotations() *WorkflowUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*WorkflowUpsertOne) UpdateDescription added in v0.4.0

func (u *WorkflowUpsertOne) UpdateDescription() *WorkflowUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*WorkflowUpsertOne) UpdateLabels added in v0.4.0

func (u *WorkflowUpsertOne) UpdateLabels() *WorkflowUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*WorkflowUpsertOne) UpdateNewValues added in v0.4.0

func (u *WorkflowUpsertOne) UpdateNewValues() *WorkflowUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Workflow.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(workflow.FieldID)
		}),
	).
	Exec(ctx)

func (*WorkflowUpsertOne) UpdateParallelism added in v0.4.0

func (u *WorkflowUpsertOne) UpdateParallelism() *WorkflowUpsertOne

UpdateParallelism sets the "parallelism" field to the value that was provided on create.

func (*WorkflowUpsertOne) UpdateTimeout added in v0.4.0

func (u *WorkflowUpsertOne) UpdateTimeout() *WorkflowUpsertOne

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*WorkflowUpsertOne) UpdateUpdateTime added in v0.4.0

func (u *WorkflowUpsertOne) UpdateUpdateTime() *WorkflowUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*WorkflowUpsertOne) UpdateVariables added in v0.4.0

func (u *WorkflowUpsertOne) UpdateVariables() *WorkflowUpsertOne

UpdateVariables sets the "variables" field to the value that was provided on create.

func (*WorkflowUpsertOne) UpdateVersion added in v0.4.0

func (u *WorkflowUpsertOne) UpdateVersion() *WorkflowUpsertOne

UpdateVersion sets the "version" field to the value that was provided on create.

type Workflows added in v0.4.0

type Workflows []*Workflow

Workflows is a parsable slice of Workflow.

func (Workflows) View added in v0.4.0

func (_ws Workflows) View() []*WorkflowOutput

View returns the output of Workflow entities.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL