ent

package
v0.0.0-...-63c78a4 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 26 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.
	TypeAlertEvent     = "AlertEvent"
	TypeAlertLease     = "AlertLease"
	TypeDevBuild       = "DevBuild"
	TypeImageSyncTask  = "ImageSyncTask"
	TypePublishDesired = "PublishDesired"
	TypePublishLane    = "PublishLane"
	TypePublishStep    = "PublishStep"
	TypePublishUnit    = "PublishUnit"
)

Variables

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

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

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type AlertEvent

type AlertEvent struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Event kind, for example lease-reclaim
	Name string `json:"name,omitempty"`
	// Time when the condition last happened
	LastAt time.Time `json:"lastAt,omitempty"`
	// Total occurrences recorded for this event
	Count int `json:"count,omitempty"`
	// Time when the row was last updated
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

AlertEvent is the model entity for the AlertEvent schema.

func (*AlertEvent) String

func (_m *AlertEvent) String() string

String implements the fmt.Stringer.

func (*AlertEvent) Unwrap

func (_m *AlertEvent) Unwrap() *AlertEvent

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

func (_m *AlertEvent) Update() *AlertEventUpdateOne

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

func (*AlertEvent) Value

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

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

type AlertEventClient

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

AlertEventClient is a client for the AlertEvent schema.

func NewAlertEventClient

func NewAlertEventClient(c config) *AlertEventClient

NewAlertEventClient returns a client for the AlertEvent from the given config.

func (*AlertEventClient) Create

func (c *AlertEventClient) Create() *AlertEventCreate

Create returns a builder for creating a AlertEvent entity.

func (*AlertEventClient) CreateBulk

func (c *AlertEventClient) CreateBulk(builders ...*AlertEventCreate) *AlertEventCreateBulk

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

func (*AlertEventClient) Delete

func (c *AlertEventClient) Delete() *AlertEventDelete

Delete returns a delete builder for AlertEvent.

func (*AlertEventClient) DeleteOne

func (c *AlertEventClient) DeleteOne(_m *AlertEvent) *AlertEventDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AlertEventClient) DeleteOneID

func (c *AlertEventClient) DeleteOneID(id int) *AlertEventDeleteOne

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

func (*AlertEventClient) Get

func (c *AlertEventClient) Get(ctx context.Context, id int) (*AlertEvent, error)

Get returns a AlertEvent entity by its id.

func (*AlertEventClient) GetX

func (c *AlertEventClient) GetX(ctx context.Context, id int) *AlertEvent

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

func (*AlertEventClient) Hooks

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

Hooks returns the client hooks.

func (*AlertEventClient) Intercept

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

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

func (*AlertEventClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AlertEventClient) MapCreateBulk

func (c *AlertEventClient) MapCreateBulk(slice any, setFunc func(*AlertEventCreate, int)) *AlertEventCreateBulk

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

func (c *AlertEventClient) Query() *AlertEventQuery

Query returns a query builder for AlertEvent.

func (*AlertEventClient) Update

func (c *AlertEventClient) Update() *AlertEventUpdate

Update returns an update builder for AlertEvent.

func (*AlertEventClient) UpdateOne

func (c *AlertEventClient) UpdateOne(_m *AlertEvent) *AlertEventUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AlertEventClient) UpdateOneID

func (c *AlertEventClient) UpdateOneID(id int) *AlertEventUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AlertEventClient) Use

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

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

type AlertEventCreate

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

AlertEventCreate is the builder for creating a AlertEvent entity.

func (*AlertEventCreate) Exec

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

Exec executes the query.

func (*AlertEventCreate) ExecX

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

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

func (*AlertEventCreate) Mutation

func (_c *AlertEventCreate) Mutation() *AlertEventMutation

Mutation returns the AlertEventMutation object of the builder.

func (*AlertEventCreate) Save

func (_c *AlertEventCreate) Save(ctx context.Context) (*AlertEvent, error)

Save creates the AlertEvent in the database.

func (*AlertEventCreate) SaveX

func (_c *AlertEventCreate) SaveX(ctx context.Context) *AlertEvent

SaveX calls Save and panics if Save returns an error.

func (*AlertEventCreate) SetCount

func (_c *AlertEventCreate) SetCount(v int) *AlertEventCreate

SetCount sets the "count" field.

func (*AlertEventCreate) SetLastAt

func (_c *AlertEventCreate) SetLastAt(v time.Time) *AlertEventCreate

SetLastAt sets the "lastAt" field.

func (*AlertEventCreate) SetName

func (_c *AlertEventCreate) SetName(v string) *AlertEventCreate

SetName sets the "name" field.

func (*AlertEventCreate) SetNillableCount

func (_c *AlertEventCreate) SetNillableCount(v *int) *AlertEventCreate

SetNillableCount sets the "count" field if the given value is not nil.

func (*AlertEventCreate) SetNillableUpdatedAt

func (_c *AlertEventCreate) SetNillableUpdatedAt(v *time.Time) *AlertEventCreate

SetNillableUpdatedAt sets the "updatedAt" field if the given value is not nil.

func (*AlertEventCreate) SetUpdatedAt

func (_c *AlertEventCreate) SetUpdatedAt(v time.Time) *AlertEventCreate

SetUpdatedAt sets the "updatedAt" field.

type AlertEventCreateBulk

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

AlertEventCreateBulk is the builder for creating many AlertEvent entities in bulk.

func (*AlertEventCreateBulk) Exec

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

Exec executes the query.

func (*AlertEventCreateBulk) ExecX

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

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

func (*AlertEventCreateBulk) Save

func (_c *AlertEventCreateBulk) Save(ctx context.Context) ([]*AlertEvent, error)

Save creates the AlertEvent entities in the database.

func (*AlertEventCreateBulk) SaveX

func (_c *AlertEventCreateBulk) SaveX(ctx context.Context) []*AlertEvent

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

type AlertEventDelete

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

AlertEventDelete is the builder for deleting a AlertEvent entity.

func (*AlertEventDelete) Exec

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

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

func (*AlertEventDelete) ExecX

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

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

func (*AlertEventDelete) Where

Where appends a list predicates to the AlertEventDelete builder.

type AlertEventDeleteOne

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

AlertEventDeleteOne is the builder for deleting a single AlertEvent entity.

func (*AlertEventDeleteOne) Exec

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

Exec executes the deletion query.

func (*AlertEventDeleteOne) ExecX

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

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

func (*AlertEventDeleteOne) Where

Where appends a list predicates to the AlertEventDelete builder.

type AlertEventGroupBy

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

AlertEventGroupBy is the group-by builder for AlertEvent entities.

func (*AlertEventGroupBy) Aggregate

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

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

func (*AlertEventGroupBy) Bool

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

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

func (*AlertEventGroupBy) BoolX

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

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

func (*AlertEventGroupBy) Bools

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

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

func (*AlertEventGroupBy) BoolsX

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

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

func (*AlertEventGroupBy) Float64

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

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

func (*AlertEventGroupBy) Float64X

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

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

func (*AlertEventGroupBy) Float64s

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

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

func (*AlertEventGroupBy) Float64sX

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

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

func (*AlertEventGroupBy) Int

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

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

func (*AlertEventGroupBy) IntX

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

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

func (*AlertEventGroupBy) Ints

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

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

func (*AlertEventGroupBy) IntsX

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

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

func (*AlertEventGroupBy) Scan

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

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

func (*AlertEventGroupBy) ScanX

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

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

func (*AlertEventGroupBy) String

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

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

func (*AlertEventGroupBy) StringX

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

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

func (*AlertEventGroupBy) Strings

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

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

func (*AlertEventGroupBy) StringsX

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

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

type AlertEventMutation

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

AlertEventMutation represents an operation that mutates the AlertEvent nodes in the graph.

func (*AlertEventMutation) AddCount

func (m *AlertEventMutation) AddCount(i int)

AddCount adds i to the "count" field.

func (*AlertEventMutation) AddField

func (m *AlertEventMutation) 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 (*AlertEventMutation) AddedCount

func (m *AlertEventMutation) AddedCount() (r int, exists bool)

AddedCount returns the value that was added to the "count" field in this mutation.

func (*AlertEventMutation) AddedEdges

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

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

func (*AlertEventMutation) AddedField

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

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

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

func (*AlertEventMutation) AddedIDs

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

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

func (*AlertEventMutation) ClearEdge

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

func (m *AlertEventMutation) 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 (*AlertEventMutation) ClearedEdges

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

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

func (*AlertEventMutation) ClearedFields

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

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

func (AlertEventMutation) Client

func (m AlertEventMutation) 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 (*AlertEventMutation) Count

func (m *AlertEventMutation) Count() (r int, exists bool)

Count returns the value of the "count" field in the mutation.

func (*AlertEventMutation) EdgeCleared

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

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

func (*AlertEventMutation) Field

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

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

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

func (*AlertEventMutation) Fields

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

func (m *AlertEventMutation) 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 (*AlertEventMutation) IDs

func (m *AlertEventMutation) 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 (*AlertEventMutation) LastAt

func (m *AlertEventMutation) LastAt() (r time.Time, exists bool)

LastAt returns the value of the "lastAt" field in the mutation.

func (*AlertEventMutation) Name

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

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

func (*AlertEventMutation) OldCount

func (m *AlertEventMutation) OldCount(ctx context.Context) (v int, err error)

OldCount returns the old "count" field's value of the AlertEvent entity. If the AlertEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AlertEventMutation) OldField

func (m *AlertEventMutation) 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 (*AlertEventMutation) OldLastAt

func (m *AlertEventMutation) OldLastAt(ctx context.Context) (v time.Time, err error)

OldLastAt returns the old "lastAt" field's value of the AlertEvent entity. If the AlertEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AlertEventMutation) OldName

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

OldName returns the old "name" field's value of the AlertEvent entity. If the AlertEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AlertEventMutation) OldUpdatedAt

func (m *AlertEventMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updatedAt" field's value of the AlertEvent entity. If the AlertEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AlertEventMutation) Op

func (m *AlertEventMutation) Op() Op

Op returns the operation name.

func (*AlertEventMutation) RemovedEdges

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

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

func (*AlertEventMutation) RemovedIDs

func (m *AlertEventMutation) 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 (*AlertEventMutation) ResetCount

func (m *AlertEventMutation) ResetCount()

ResetCount resets all changes to the "count" field.

func (*AlertEventMutation) ResetEdge

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

func (m *AlertEventMutation) 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 (*AlertEventMutation) ResetLastAt

func (m *AlertEventMutation) ResetLastAt()

ResetLastAt resets all changes to the "lastAt" field.

func (*AlertEventMutation) ResetName

func (m *AlertEventMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AlertEventMutation) ResetUpdatedAt

func (m *AlertEventMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updatedAt" field.

func (*AlertEventMutation) SetCount

func (m *AlertEventMutation) SetCount(i int)

SetCount sets the "count" field.

func (*AlertEventMutation) SetField

func (m *AlertEventMutation) 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 (*AlertEventMutation) SetLastAt

func (m *AlertEventMutation) SetLastAt(t time.Time)

SetLastAt sets the "lastAt" field.

func (*AlertEventMutation) SetName

func (m *AlertEventMutation) SetName(s string)

SetName sets the "name" field.

func (*AlertEventMutation) SetOp

func (m *AlertEventMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AlertEventMutation) SetUpdatedAt

func (m *AlertEventMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updatedAt" field.

func (AlertEventMutation) Tx

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

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

func (*AlertEventMutation) Type

func (m *AlertEventMutation) Type() string

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

func (*AlertEventMutation) UpdatedAt

func (m *AlertEventMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updatedAt" field in the mutation.

func (*AlertEventMutation) Where

func (m *AlertEventMutation) Where(ps ...predicate.AlertEvent)

Where appends a list predicates to the AlertEventMutation builder.

func (*AlertEventMutation) WhereP

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

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

type AlertEventQuery

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

AlertEventQuery is the builder for querying AlertEvent entities.

func (*AlertEventQuery) Aggregate

func (_q *AlertEventQuery) Aggregate(fns ...AggregateFunc) *AlertEventSelect

Aggregate returns a AlertEventSelect configured with the given aggregations.

func (*AlertEventQuery) All

func (_q *AlertEventQuery) All(ctx context.Context) ([]*AlertEvent, error)

All executes the query and returns a list of AlertEvents.

func (*AlertEventQuery) AllX

func (_q *AlertEventQuery) AllX(ctx context.Context) []*AlertEvent

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

func (*AlertEventQuery) Clone

func (_q *AlertEventQuery) Clone() *AlertEventQuery

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

func (*AlertEventQuery) Count

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

Count returns the count of the given query.

func (*AlertEventQuery) CountX

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

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

func (*AlertEventQuery) Exist

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

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

func (*AlertEventQuery) ExistX

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

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

func (*AlertEventQuery) First

func (_q *AlertEventQuery) First(ctx context.Context) (*AlertEvent, error)

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

func (*AlertEventQuery) FirstID

func (_q *AlertEventQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*AlertEventQuery) FirstIDX

func (_q *AlertEventQuery) FirstIDX(ctx context.Context) int

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

func (*AlertEventQuery) FirstX

func (_q *AlertEventQuery) FirstX(ctx context.Context) *AlertEvent

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

func (*AlertEventQuery) GroupBy

func (_q *AlertEventQuery) GroupBy(field string, fields ...string) *AlertEventGroupBy

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.AlertEvent.Query().
	GroupBy(alertevent.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AlertEventQuery) IDs

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

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

func (*AlertEventQuery) IDsX

func (_q *AlertEventQuery) IDsX(ctx context.Context) []int

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

func (*AlertEventQuery) Limit

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

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

func (*AlertEventQuery) Offset

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

Offset to start from.

func (*AlertEventQuery) Only

func (_q *AlertEventQuery) Only(ctx context.Context) (*AlertEvent, error)

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

func (*AlertEventQuery) OnlyID

func (_q *AlertEventQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*AlertEventQuery) OnlyIDX

func (_q *AlertEventQuery) OnlyIDX(ctx context.Context) int

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

func (*AlertEventQuery) OnlyX

func (_q *AlertEventQuery) OnlyX(ctx context.Context) *AlertEvent

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

func (*AlertEventQuery) Order

Order specifies how the records should be ordered.

func (*AlertEventQuery) Select

func (_q *AlertEventQuery) Select(fields ...string) *AlertEventSelect

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

func (*AlertEventQuery) Unique

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

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

Where adds a new predicate for the AlertEventQuery builder.

type AlertEventSelect

type AlertEventSelect struct {
	*AlertEventQuery
	// contains filtered or unexported fields
}

AlertEventSelect is the builder for selecting fields of AlertEvent entities.

func (*AlertEventSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*AlertEventSelect) Bool

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

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

func (*AlertEventSelect) BoolX

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

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

func (*AlertEventSelect) Bools

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

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

func (*AlertEventSelect) BoolsX

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

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

func (*AlertEventSelect) Float64

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

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

func (*AlertEventSelect) Float64X

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

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

func (*AlertEventSelect) Float64s

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

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

func (*AlertEventSelect) Float64sX

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

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

func (*AlertEventSelect) Int

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

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

func (*AlertEventSelect) IntX

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

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

func (*AlertEventSelect) Ints

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

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

func (*AlertEventSelect) IntsX

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

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

func (*AlertEventSelect) Scan

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

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

func (*AlertEventSelect) ScanX

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

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

func (*AlertEventSelect) String

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

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

func (*AlertEventSelect) StringX

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

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

func (*AlertEventSelect) Strings

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

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

func (*AlertEventSelect) StringsX

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

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

type AlertEventUpdate

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

AlertEventUpdate is the builder for updating AlertEvent entities.

func (*AlertEventUpdate) AddCount

func (_u *AlertEventUpdate) AddCount(v int) *AlertEventUpdate

AddCount adds value to the "count" field.

func (*AlertEventUpdate) Exec

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

Exec executes the query.

func (*AlertEventUpdate) ExecX

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

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

func (*AlertEventUpdate) Mutation

func (_u *AlertEventUpdate) Mutation() *AlertEventMutation

Mutation returns the AlertEventMutation object of the builder.

func (*AlertEventUpdate) Save

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

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

func (*AlertEventUpdate) SaveX

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

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

func (*AlertEventUpdate) SetCount

func (_u *AlertEventUpdate) SetCount(v int) *AlertEventUpdate

SetCount sets the "count" field.

func (*AlertEventUpdate) SetLastAt

func (_u *AlertEventUpdate) SetLastAt(v time.Time) *AlertEventUpdate

SetLastAt sets the "lastAt" field.

func (*AlertEventUpdate) SetName

func (_u *AlertEventUpdate) SetName(v string) *AlertEventUpdate

SetName sets the "name" field.

func (*AlertEventUpdate) SetNillableCount

func (_u *AlertEventUpdate) SetNillableCount(v *int) *AlertEventUpdate

SetNillableCount sets the "count" field if the given value is not nil.

func (*AlertEventUpdate) SetNillableLastAt

func (_u *AlertEventUpdate) SetNillableLastAt(v *time.Time) *AlertEventUpdate

SetNillableLastAt sets the "lastAt" field if the given value is not nil.

func (*AlertEventUpdate) SetNillableName

func (_u *AlertEventUpdate) SetNillableName(v *string) *AlertEventUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*AlertEventUpdate) SetUpdatedAt

func (_u *AlertEventUpdate) SetUpdatedAt(v time.Time) *AlertEventUpdate

SetUpdatedAt sets the "updatedAt" field.

func (*AlertEventUpdate) Where

Where appends a list predicates to the AlertEventUpdate builder.

type AlertEventUpdateOne

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

AlertEventUpdateOne is the builder for updating a single AlertEvent entity.

func (*AlertEventUpdateOne) AddCount

func (_u *AlertEventUpdateOne) AddCount(v int) *AlertEventUpdateOne

AddCount adds value to the "count" field.

func (*AlertEventUpdateOne) Exec

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

Exec executes the query on the entity.

func (*AlertEventUpdateOne) ExecX

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

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

func (*AlertEventUpdateOne) Mutation

func (_u *AlertEventUpdateOne) Mutation() *AlertEventMutation

Mutation returns the AlertEventMutation object of the builder.

func (*AlertEventUpdateOne) Save

Save executes the query and returns the updated AlertEvent entity.

func (*AlertEventUpdateOne) SaveX

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

func (*AlertEventUpdateOne) Select

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

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

func (*AlertEventUpdateOne) SetCount

func (_u *AlertEventUpdateOne) SetCount(v int) *AlertEventUpdateOne

SetCount sets the "count" field.

func (*AlertEventUpdateOne) SetLastAt

SetLastAt sets the "lastAt" field.

func (*AlertEventUpdateOne) SetName

SetName sets the "name" field.

func (*AlertEventUpdateOne) SetNillableCount

func (_u *AlertEventUpdateOne) SetNillableCount(v *int) *AlertEventUpdateOne

SetNillableCount sets the "count" field if the given value is not nil.

func (*AlertEventUpdateOne) SetNillableLastAt

func (_u *AlertEventUpdateOne) SetNillableLastAt(v *time.Time) *AlertEventUpdateOne

SetNillableLastAt sets the "lastAt" field if the given value is not nil.

func (*AlertEventUpdateOne) SetNillableName

func (_u *AlertEventUpdateOne) SetNillableName(v *string) *AlertEventUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*AlertEventUpdateOne) SetUpdatedAt

func (_u *AlertEventUpdateOne) SetUpdatedAt(v time.Time) *AlertEventUpdateOne

SetUpdatedAt sets the "updatedAt" field.

func (*AlertEventUpdateOne) Where

Where appends a list predicates to the AlertEventUpdate builder.

type AlertEvents

type AlertEvents []*AlertEvent

AlertEvents is a parsable slice of AlertEvent.

type AlertLease

type AlertLease struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Lease name, for example publish-alerts
	Name string `json:"name,omitempty"`
	// Worker identity currently holding the lease
	Holder string `json:"holder,omitempty"`
	// Lease expiry; an expired lease may be taken over by another worker
	LeaseUntil time.Time `json:"leaseUntil,omitempty"`
	// Time when the lease was last refreshed
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

AlertLease is the model entity for the AlertLease schema.

func (*AlertLease) String

func (_m *AlertLease) String() string

String implements the fmt.Stringer.

func (*AlertLease) Unwrap

func (_m *AlertLease) Unwrap() *AlertLease

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

func (_m *AlertLease) Update() *AlertLeaseUpdateOne

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

func (*AlertLease) Value

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

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

type AlertLeaseClient

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

AlertLeaseClient is a client for the AlertLease schema.

func NewAlertLeaseClient

func NewAlertLeaseClient(c config) *AlertLeaseClient

NewAlertLeaseClient returns a client for the AlertLease from the given config.

func (*AlertLeaseClient) Create

func (c *AlertLeaseClient) Create() *AlertLeaseCreate

Create returns a builder for creating a AlertLease entity.

func (*AlertLeaseClient) CreateBulk

func (c *AlertLeaseClient) CreateBulk(builders ...*AlertLeaseCreate) *AlertLeaseCreateBulk

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

func (*AlertLeaseClient) Delete

func (c *AlertLeaseClient) Delete() *AlertLeaseDelete

Delete returns a delete builder for AlertLease.

func (*AlertLeaseClient) DeleteOne

func (c *AlertLeaseClient) DeleteOne(_m *AlertLease) *AlertLeaseDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AlertLeaseClient) DeleteOneID

func (c *AlertLeaseClient) DeleteOneID(id int) *AlertLeaseDeleteOne

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

func (*AlertLeaseClient) Get

func (c *AlertLeaseClient) Get(ctx context.Context, id int) (*AlertLease, error)

Get returns a AlertLease entity by its id.

func (*AlertLeaseClient) GetX

func (c *AlertLeaseClient) GetX(ctx context.Context, id int) *AlertLease

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

func (*AlertLeaseClient) Hooks

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

Hooks returns the client hooks.

func (*AlertLeaseClient) Intercept

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

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

func (*AlertLeaseClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AlertLeaseClient) MapCreateBulk

func (c *AlertLeaseClient) MapCreateBulk(slice any, setFunc func(*AlertLeaseCreate, int)) *AlertLeaseCreateBulk

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

func (c *AlertLeaseClient) Query() *AlertLeaseQuery

Query returns a query builder for AlertLease.

func (*AlertLeaseClient) Update

func (c *AlertLeaseClient) Update() *AlertLeaseUpdate

Update returns an update builder for AlertLease.

func (*AlertLeaseClient) UpdateOne

func (c *AlertLeaseClient) UpdateOne(_m *AlertLease) *AlertLeaseUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AlertLeaseClient) UpdateOneID

func (c *AlertLeaseClient) UpdateOneID(id int) *AlertLeaseUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AlertLeaseClient) Use

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

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

type AlertLeaseCreate

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

AlertLeaseCreate is the builder for creating a AlertLease entity.

func (*AlertLeaseCreate) Exec

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

Exec executes the query.

func (*AlertLeaseCreate) ExecX

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

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

func (*AlertLeaseCreate) Mutation

func (_c *AlertLeaseCreate) Mutation() *AlertLeaseMutation

Mutation returns the AlertLeaseMutation object of the builder.

func (*AlertLeaseCreate) Save

func (_c *AlertLeaseCreate) Save(ctx context.Context) (*AlertLease, error)

Save creates the AlertLease in the database.

func (*AlertLeaseCreate) SaveX

func (_c *AlertLeaseCreate) SaveX(ctx context.Context) *AlertLease

SaveX calls Save and panics if Save returns an error.

func (*AlertLeaseCreate) SetHolder

func (_c *AlertLeaseCreate) SetHolder(v string) *AlertLeaseCreate

SetHolder sets the "holder" field.

func (*AlertLeaseCreate) SetLeaseUntil

func (_c *AlertLeaseCreate) SetLeaseUntil(v time.Time) *AlertLeaseCreate

SetLeaseUntil sets the "leaseUntil" field.

func (*AlertLeaseCreate) SetName

func (_c *AlertLeaseCreate) SetName(v string) *AlertLeaseCreate

SetName sets the "name" field.

func (*AlertLeaseCreate) SetNillableUpdatedAt

func (_c *AlertLeaseCreate) SetNillableUpdatedAt(v *time.Time) *AlertLeaseCreate

SetNillableUpdatedAt sets the "updatedAt" field if the given value is not nil.

func (*AlertLeaseCreate) SetUpdatedAt

func (_c *AlertLeaseCreate) SetUpdatedAt(v time.Time) *AlertLeaseCreate

SetUpdatedAt sets the "updatedAt" field.

type AlertLeaseCreateBulk

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

AlertLeaseCreateBulk is the builder for creating many AlertLease entities in bulk.

func (*AlertLeaseCreateBulk) Exec

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

Exec executes the query.

func (*AlertLeaseCreateBulk) ExecX

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

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

func (*AlertLeaseCreateBulk) Save

func (_c *AlertLeaseCreateBulk) Save(ctx context.Context) ([]*AlertLease, error)

Save creates the AlertLease entities in the database.

func (*AlertLeaseCreateBulk) SaveX

func (_c *AlertLeaseCreateBulk) SaveX(ctx context.Context) []*AlertLease

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

type AlertLeaseDelete

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

AlertLeaseDelete is the builder for deleting a AlertLease entity.

func (*AlertLeaseDelete) Exec

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

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

func (*AlertLeaseDelete) ExecX

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

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

func (*AlertLeaseDelete) Where

Where appends a list predicates to the AlertLeaseDelete builder.

type AlertLeaseDeleteOne

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

AlertLeaseDeleteOne is the builder for deleting a single AlertLease entity.

func (*AlertLeaseDeleteOne) Exec

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

Exec executes the deletion query.

func (*AlertLeaseDeleteOne) ExecX

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

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

func (*AlertLeaseDeleteOne) Where

Where appends a list predicates to the AlertLeaseDelete builder.

type AlertLeaseGroupBy

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

AlertLeaseGroupBy is the group-by builder for AlertLease entities.

func (*AlertLeaseGroupBy) Aggregate

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

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

func (*AlertLeaseGroupBy) Bool

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

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

func (*AlertLeaseGroupBy) BoolX

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

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

func (*AlertLeaseGroupBy) Bools

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

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

func (*AlertLeaseGroupBy) BoolsX

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

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

func (*AlertLeaseGroupBy) Float64

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

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

func (*AlertLeaseGroupBy) Float64X

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

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

func (*AlertLeaseGroupBy) Float64s

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

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

func (*AlertLeaseGroupBy) Float64sX

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

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

func (*AlertLeaseGroupBy) Int

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

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

func (*AlertLeaseGroupBy) IntX

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

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

func (*AlertLeaseGroupBy) Ints

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

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

func (*AlertLeaseGroupBy) IntsX

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

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

func (*AlertLeaseGroupBy) Scan

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

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

func (*AlertLeaseGroupBy) ScanX

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

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

func (*AlertLeaseGroupBy) String

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

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

func (*AlertLeaseGroupBy) StringX

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

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

func (*AlertLeaseGroupBy) Strings

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

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

func (*AlertLeaseGroupBy) StringsX

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

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

type AlertLeaseMutation

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

AlertLeaseMutation represents an operation that mutates the AlertLease nodes in the graph.

func (*AlertLeaseMutation) AddField

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

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

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

func (*AlertLeaseMutation) AddedField

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

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

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

func (*AlertLeaseMutation) AddedIDs

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

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

func (*AlertLeaseMutation) ClearEdge

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

func (m *AlertLeaseMutation) 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 (*AlertLeaseMutation) ClearedEdges

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

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

func (*AlertLeaseMutation) ClearedFields

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

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

func (AlertLeaseMutation) Client

func (m AlertLeaseMutation) 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 (*AlertLeaseMutation) EdgeCleared

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

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

func (*AlertLeaseMutation) Field

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

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

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

func (*AlertLeaseMutation) Fields

func (m *AlertLeaseMutation) 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 (*AlertLeaseMutation) Holder

func (m *AlertLeaseMutation) Holder() (r string, exists bool)

Holder returns the value of the "holder" field in the mutation.

func (*AlertLeaseMutation) ID

func (m *AlertLeaseMutation) 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 (*AlertLeaseMutation) IDs

func (m *AlertLeaseMutation) 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 (*AlertLeaseMutation) LeaseUntil

func (m *AlertLeaseMutation) LeaseUntil() (r time.Time, exists bool)

LeaseUntil returns the value of the "leaseUntil" field in the mutation.

func (*AlertLeaseMutation) Name

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

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

func (*AlertLeaseMutation) OldField

func (m *AlertLeaseMutation) 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 (*AlertLeaseMutation) OldHolder

func (m *AlertLeaseMutation) OldHolder(ctx context.Context) (v string, err error)

OldHolder returns the old "holder" field's value of the AlertLease entity. If the AlertLease object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AlertLeaseMutation) OldLeaseUntil

func (m *AlertLeaseMutation) OldLeaseUntil(ctx context.Context) (v time.Time, err error)

OldLeaseUntil returns the old "leaseUntil" field's value of the AlertLease entity. If the AlertLease object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AlertLeaseMutation) OldName

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

OldName returns the old "name" field's value of the AlertLease entity. If the AlertLease object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AlertLeaseMutation) OldUpdatedAt

func (m *AlertLeaseMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updatedAt" field's value of the AlertLease entity. If the AlertLease object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AlertLeaseMutation) Op

func (m *AlertLeaseMutation) Op() Op

Op returns the operation name.

func (*AlertLeaseMutation) RemovedEdges

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

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

func (*AlertLeaseMutation) RemovedIDs

func (m *AlertLeaseMutation) 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 (*AlertLeaseMutation) ResetEdge

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

func (m *AlertLeaseMutation) 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 (*AlertLeaseMutation) ResetHolder

func (m *AlertLeaseMutation) ResetHolder()

ResetHolder resets all changes to the "holder" field.

func (*AlertLeaseMutation) ResetLeaseUntil

func (m *AlertLeaseMutation) ResetLeaseUntil()

ResetLeaseUntil resets all changes to the "leaseUntil" field.

func (*AlertLeaseMutation) ResetName

func (m *AlertLeaseMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AlertLeaseMutation) ResetUpdatedAt

func (m *AlertLeaseMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updatedAt" field.

func (*AlertLeaseMutation) SetField

func (m *AlertLeaseMutation) 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 (*AlertLeaseMutation) SetHolder

func (m *AlertLeaseMutation) SetHolder(s string)

SetHolder sets the "holder" field.

func (*AlertLeaseMutation) SetLeaseUntil

func (m *AlertLeaseMutation) SetLeaseUntil(t time.Time)

SetLeaseUntil sets the "leaseUntil" field.

func (*AlertLeaseMutation) SetName

func (m *AlertLeaseMutation) SetName(s string)

SetName sets the "name" field.

func (*AlertLeaseMutation) SetOp

func (m *AlertLeaseMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AlertLeaseMutation) SetUpdatedAt

func (m *AlertLeaseMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updatedAt" field.

func (AlertLeaseMutation) Tx

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

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

func (*AlertLeaseMutation) Type

func (m *AlertLeaseMutation) Type() string

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

func (*AlertLeaseMutation) UpdatedAt

func (m *AlertLeaseMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updatedAt" field in the mutation.

func (*AlertLeaseMutation) Where

func (m *AlertLeaseMutation) Where(ps ...predicate.AlertLease)

Where appends a list predicates to the AlertLeaseMutation builder.

func (*AlertLeaseMutation) WhereP

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

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

type AlertLeaseQuery

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

AlertLeaseQuery is the builder for querying AlertLease entities.

func (*AlertLeaseQuery) Aggregate

func (_q *AlertLeaseQuery) Aggregate(fns ...AggregateFunc) *AlertLeaseSelect

Aggregate returns a AlertLeaseSelect configured with the given aggregations.

func (*AlertLeaseQuery) All

func (_q *AlertLeaseQuery) All(ctx context.Context) ([]*AlertLease, error)

All executes the query and returns a list of AlertLeases.

func (*AlertLeaseQuery) AllX

func (_q *AlertLeaseQuery) AllX(ctx context.Context) []*AlertLease

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

func (*AlertLeaseQuery) Clone

func (_q *AlertLeaseQuery) Clone() *AlertLeaseQuery

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

func (*AlertLeaseQuery) Count

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

Count returns the count of the given query.

func (*AlertLeaseQuery) CountX

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

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

func (*AlertLeaseQuery) Exist

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

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

func (*AlertLeaseQuery) ExistX

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

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

func (*AlertLeaseQuery) First

func (_q *AlertLeaseQuery) First(ctx context.Context) (*AlertLease, error)

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

func (*AlertLeaseQuery) FirstID

func (_q *AlertLeaseQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*AlertLeaseQuery) FirstIDX

func (_q *AlertLeaseQuery) FirstIDX(ctx context.Context) int

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

func (*AlertLeaseQuery) FirstX

func (_q *AlertLeaseQuery) FirstX(ctx context.Context) *AlertLease

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

func (*AlertLeaseQuery) GroupBy

func (_q *AlertLeaseQuery) GroupBy(field string, fields ...string) *AlertLeaseGroupBy

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.AlertLease.Query().
	GroupBy(alertlease.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AlertLeaseQuery) IDs

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

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

func (*AlertLeaseQuery) IDsX

func (_q *AlertLeaseQuery) IDsX(ctx context.Context) []int

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

func (*AlertLeaseQuery) Limit

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

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

func (*AlertLeaseQuery) Offset

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

Offset to start from.

func (*AlertLeaseQuery) Only

func (_q *AlertLeaseQuery) Only(ctx context.Context) (*AlertLease, error)

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

func (*AlertLeaseQuery) OnlyID

func (_q *AlertLeaseQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*AlertLeaseQuery) OnlyIDX

func (_q *AlertLeaseQuery) OnlyIDX(ctx context.Context) int

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

func (*AlertLeaseQuery) OnlyX

func (_q *AlertLeaseQuery) OnlyX(ctx context.Context) *AlertLease

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

func (*AlertLeaseQuery) Order

Order specifies how the records should be ordered.

func (*AlertLeaseQuery) Select

func (_q *AlertLeaseQuery) Select(fields ...string) *AlertLeaseSelect

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

func (*AlertLeaseQuery) Unique

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

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

Where adds a new predicate for the AlertLeaseQuery builder.

type AlertLeaseSelect

type AlertLeaseSelect struct {
	*AlertLeaseQuery
	// contains filtered or unexported fields
}

AlertLeaseSelect is the builder for selecting fields of AlertLease entities.

func (*AlertLeaseSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*AlertLeaseSelect) Bool

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

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

func (*AlertLeaseSelect) BoolX

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

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

func (*AlertLeaseSelect) Bools

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

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

func (*AlertLeaseSelect) BoolsX

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

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

func (*AlertLeaseSelect) Float64

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

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

func (*AlertLeaseSelect) Float64X

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

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

func (*AlertLeaseSelect) Float64s

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

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

func (*AlertLeaseSelect) Float64sX

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

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

func (*AlertLeaseSelect) Int

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

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

func (*AlertLeaseSelect) IntX

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

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

func (*AlertLeaseSelect) Ints

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

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

func (*AlertLeaseSelect) IntsX

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

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

func (*AlertLeaseSelect) Scan

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

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

func (*AlertLeaseSelect) ScanX

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

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

func (*AlertLeaseSelect) String

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

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

func (*AlertLeaseSelect) StringX

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

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

func (*AlertLeaseSelect) Strings

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

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

func (*AlertLeaseSelect) StringsX

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

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

type AlertLeaseUpdate

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

AlertLeaseUpdate is the builder for updating AlertLease entities.

func (*AlertLeaseUpdate) Exec

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

Exec executes the query.

func (*AlertLeaseUpdate) ExecX

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

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

func (*AlertLeaseUpdate) Mutation

func (_u *AlertLeaseUpdate) Mutation() *AlertLeaseMutation

Mutation returns the AlertLeaseMutation object of the builder.

func (*AlertLeaseUpdate) Save

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

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

func (*AlertLeaseUpdate) SaveX

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

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

func (*AlertLeaseUpdate) SetHolder

func (_u *AlertLeaseUpdate) SetHolder(v string) *AlertLeaseUpdate

SetHolder sets the "holder" field.

func (*AlertLeaseUpdate) SetLeaseUntil

func (_u *AlertLeaseUpdate) SetLeaseUntil(v time.Time) *AlertLeaseUpdate

SetLeaseUntil sets the "leaseUntil" field.

func (*AlertLeaseUpdate) SetName

func (_u *AlertLeaseUpdate) SetName(v string) *AlertLeaseUpdate

SetName sets the "name" field.

func (*AlertLeaseUpdate) SetNillableHolder

func (_u *AlertLeaseUpdate) SetNillableHolder(v *string) *AlertLeaseUpdate

SetNillableHolder sets the "holder" field if the given value is not nil.

func (*AlertLeaseUpdate) SetNillableLeaseUntil

func (_u *AlertLeaseUpdate) SetNillableLeaseUntil(v *time.Time) *AlertLeaseUpdate

SetNillableLeaseUntil sets the "leaseUntil" field if the given value is not nil.

func (*AlertLeaseUpdate) SetNillableName

func (_u *AlertLeaseUpdate) SetNillableName(v *string) *AlertLeaseUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*AlertLeaseUpdate) SetUpdatedAt

func (_u *AlertLeaseUpdate) SetUpdatedAt(v time.Time) *AlertLeaseUpdate

SetUpdatedAt sets the "updatedAt" field.

func (*AlertLeaseUpdate) Where

Where appends a list predicates to the AlertLeaseUpdate builder.

type AlertLeaseUpdateOne

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

AlertLeaseUpdateOne is the builder for updating a single AlertLease entity.

func (*AlertLeaseUpdateOne) Exec

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

Exec executes the query on the entity.

func (*AlertLeaseUpdateOne) ExecX

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

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

func (*AlertLeaseUpdateOne) Mutation

func (_u *AlertLeaseUpdateOne) Mutation() *AlertLeaseMutation

Mutation returns the AlertLeaseMutation object of the builder.

func (*AlertLeaseUpdateOne) Save

Save executes the query and returns the updated AlertLease entity.

func (*AlertLeaseUpdateOne) SaveX

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

func (*AlertLeaseUpdateOne) Select

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

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

func (*AlertLeaseUpdateOne) SetHolder

SetHolder sets the "holder" field.

func (*AlertLeaseUpdateOne) SetLeaseUntil

func (_u *AlertLeaseUpdateOne) SetLeaseUntil(v time.Time) *AlertLeaseUpdateOne

SetLeaseUntil sets the "leaseUntil" field.

func (*AlertLeaseUpdateOne) SetName

SetName sets the "name" field.

func (*AlertLeaseUpdateOne) SetNillableHolder

func (_u *AlertLeaseUpdateOne) SetNillableHolder(v *string) *AlertLeaseUpdateOne

SetNillableHolder sets the "holder" field if the given value is not nil.

func (*AlertLeaseUpdateOne) SetNillableLeaseUntil

func (_u *AlertLeaseUpdateOne) SetNillableLeaseUntil(v *time.Time) *AlertLeaseUpdateOne

SetNillableLeaseUntil sets the "leaseUntil" field if the given value is not nil.

func (*AlertLeaseUpdateOne) SetNillableName

func (_u *AlertLeaseUpdateOne) SetNillableName(v *string) *AlertLeaseUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*AlertLeaseUpdateOne) SetUpdatedAt

func (_u *AlertLeaseUpdateOne) SetUpdatedAt(v time.Time) *AlertLeaseUpdateOne

SetUpdatedAt sets the "updatedAt" field.

func (*AlertLeaseUpdateOne) Where

Where appends a list predicates to the AlertLeaseUpdate builder.

type AlertLeases

type AlertLeases []*AlertLease

AlertLeases is a parsable slice of AlertLease.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// AlertEvent is the client for interacting with the AlertEvent builders.
	AlertEvent *AlertEventClient
	// AlertLease is the client for interacting with the AlertLease builders.
	AlertLease *AlertLeaseClient
	// DevBuild is the client for interacting with the DevBuild builders.
	DevBuild *DevBuildClient
	// ImageSyncTask is the client for interacting with the ImageSyncTask builders.
	ImageSyncTask *ImageSyncTaskClient
	// PublishDesired is the client for interacting with the PublishDesired builders.
	PublishDesired *PublishDesiredClient
	// PublishLane is the client for interacting with the PublishLane builders.
	PublishLane *PublishLaneClient
	// PublishStep is the client for interacting with the PublishStep builders.
	PublishStep *PublishStepClient
	// PublishUnit is the client for interacting with the PublishUnit builders.
	PublishUnit *PublishUnitClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

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

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

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

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

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

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

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

func (*Client) Debug

func (c *Client) Debug() *Client

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

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

func (*Client) Intercept

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

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

func (*Client) Mutate

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

Mutate implements the ent.Mutator interface.

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

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

Committer is the interface that wraps the Commit method.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type DevBuild

type DevBuild struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// User who created the build
	CreatedBy string `json:"createdBy,omitempty"`
	// Time when the build was created
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// Time when the build was last updated
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// Product being built
	Product string `json:"product,omitempty"`
	// Edition of the product
	Edition string `json:"edition,omitempty"`
	// Version of the build
	Version string `json:"version,omitempty"`
	// GitHub repository
	GithubRepo string `json:"githubRepo,omitempty"`
	// Git reference of the build
	GitRef string `json:"gitRef,omitempty"`
	// Git commit hash
	GitHash string `json:"gitHash,omitempty"`
	// Git reference of the plugin
	PluginGitRef string `json:"pluginGitRef,omitempty"`
	// Whether the build is a hotfix
	IsHotfix bool `json:"isHotfix,omitempty"`
	// Whether to push to GCR
	IsPushGCR bool `json:"isPushGCR,omitempty"`
	// Target image name
	TargetImg string `json:"targetImg,omitempty"`
	// Pipeline engine used
	PipelineEngine string `json:"pipelineEngine,omitempty"`
	// Build for target platforms
	Platform string `json:"platform,omitempty"`
	// Builder image used
	BuilderImg string `json:"builderImg,omitempty"`
	// Build environment
	BuildEnv string `json:"buildEnv,omitempty"`
	// Features included in the build
	Features string `json:"features,omitempty"`
	// Base image for the product
	ProductBaseImg string `json:"productBaseImg,omitempty"`
	// Path to artifact image building dockerfile
	ProductDockerfile string `json:"productDockerfile,omitempty"`
	// Build status
	Status string `json:"status,omitempty"`
	// Build status message
	ErrMsg string `json:"errMsg,omitempty"`
	// Notification delivery state for each channel (Lark DM, group chat, etc.)
	NotificationState schema.NotificationState `json:"notificationState,omitempty"`
	// ID of the pipeline build
	PipelineBuildID int `json:"pipelineBuildID,omitempty"`
	// Build pipeline started time
	PipelineStartAt time.Time `json:"pipelineStartAt,omitempty"`
	// Build pipeline completed time
	PipelineEndAt time.Time `json:"pipelineEndAt,omitempty"`
	// JSON report of the build
	BuildReport schema.BuildReport `json:"buildReport,omitempty"`
	// Tekton status
	TektonStatus schema.TektonStatus `json:"tektonStatus,omitempty"`
	// contains filtered or unexported fields
}

DevBuild is the model entity for the DevBuild schema.

func (*DevBuild) String

func (_m *DevBuild) String() string

String implements the fmt.Stringer.

func (*DevBuild) Unwrap

func (_m *DevBuild) Unwrap() *DevBuild

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

func (_m *DevBuild) Update() *DevBuildUpdateOne

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

func (*DevBuild) Value

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

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

type DevBuildClient

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

DevBuildClient is a client for the DevBuild schema.

func NewDevBuildClient

func NewDevBuildClient(c config) *DevBuildClient

NewDevBuildClient returns a client for the DevBuild from the given config.

func (*DevBuildClient) Create

func (c *DevBuildClient) Create() *DevBuildCreate

Create returns a builder for creating a DevBuild entity.

func (*DevBuildClient) CreateBulk

func (c *DevBuildClient) CreateBulk(builders ...*DevBuildCreate) *DevBuildCreateBulk

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

func (*DevBuildClient) Delete

func (c *DevBuildClient) Delete() *DevBuildDelete

Delete returns a delete builder for DevBuild.

func (*DevBuildClient) DeleteOne

func (c *DevBuildClient) DeleteOne(_m *DevBuild) *DevBuildDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DevBuildClient) DeleteOneID

func (c *DevBuildClient) DeleteOneID(id int) *DevBuildDeleteOne

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

func (*DevBuildClient) Get

func (c *DevBuildClient) Get(ctx context.Context, id int) (*DevBuild, error)

Get returns a DevBuild entity by its id.

func (*DevBuildClient) GetX

func (c *DevBuildClient) GetX(ctx context.Context, id int) *DevBuild

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

func (*DevBuildClient) Hooks

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

Hooks returns the client hooks.

func (*DevBuildClient) Intercept

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

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

func (*DevBuildClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DevBuildClient) MapCreateBulk

func (c *DevBuildClient) MapCreateBulk(slice any, setFunc func(*DevBuildCreate, int)) *DevBuildCreateBulk

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

func (c *DevBuildClient) Query() *DevBuildQuery

Query returns a query builder for DevBuild.

func (*DevBuildClient) Update

func (c *DevBuildClient) Update() *DevBuildUpdate

Update returns an update builder for DevBuild.

func (*DevBuildClient) UpdateOne

func (c *DevBuildClient) UpdateOne(_m *DevBuild) *DevBuildUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DevBuildClient) UpdateOneID

func (c *DevBuildClient) UpdateOneID(id int) *DevBuildUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DevBuildClient) Use

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

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

type DevBuildCreate

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

DevBuildCreate is the builder for creating a DevBuild entity.

func (*DevBuildCreate) Exec

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

Exec executes the query.

func (*DevBuildCreate) ExecX

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

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

func (*DevBuildCreate) Mutation

func (_c *DevBuildCreate) Mutation() *DevBuildMutation

Mutation returns the DevBuildMutation object of the builder.

func (*DevBuildCreate) Save

func (_c *DevBuildCreate) Save(ctx context.Context) (*DevBuild, error)

Save creates the DevBuild in the database.

func (*DevBuildCreate) SaveX

func (_c *DevBuildCreate) SaveX(ctx context.Context) *DevBuild

SaveX calls Save and panics if Save returns an error.

func (*DevBuildCreate) SetBuildEnv

func (_c *DevBuildCreate) SetBuildEnv(v string) *DevBuildCreate

SetBuildEnv sets the "buildEnv" field.

func (*DevBuildCreate) SetBuildReport

func (_c *DevBuildCreate) SetBuildReport(v schema.BuildReport) *DevBuildCreate

SetBuildReport sets the "buildReport" field.

func (*DevBuildCreate) SetBuilderImg

func (_c *DevBuildCreate) SetBuilderImg(v string) *DevBuildCreate

SetBuilderImg sets the "builderImg" field.

func (*DevBuildCreate) SetCreatedAt

func (_c *DevBuildCreate) SetCreatedAt(v time.Time) *DevBuildCreate

SetCreatedAt sets the "createdAt" field.

func (*DevBuildCreate) SetCreatedBy

func (_c *DevBuildCreate) SetCreatedBy(v string) *DevBuildCreate

SetCreatedBy sets the "createdBy" field.

func (*DevBuildCreate) SetEdition

func (_c *DevBuildCreate) SetEdition(v string) *DevBuildCreate

SetEdition sets the "edition" field.

func (*DevBuildCreate) SetErrMsg

func (_c *DevBuildCreate) SetErrMsg(v string) *DevBuildCreate

SetErrMsg sets the "errMsg" field.

func (*DevBuildCreate) SetFeatures

func (_c *DevBuildCreate) SetFeatures(v string) *DevBuildCreate

SetFeatures sets the "features" field.

func (*DevBuildCreate) SetGitHash

func (_c *DevBuildCreate) SetGitHash(v string) *DevBuildCreate

SetGitHash sets the "gitHash" field.

func (*DevBuildCreate) SetGitRef

func (_c *DevBuildCreate) SetGitRef(v string) *DevBuildCreate

SetGitRef sets the "gitRef" field.

func (*DevBuildCreate) SetGithubRepo

func (_c *DevBuildCreate) SetGithubRepo(v string) *DevBuildCreate

SetGithubRepo sets the "githubRepo" field.

func (*DevBuildCreate) SetIsHotfix

func (_c *DevBuildCreate) SetIsHotfix(v bool) *DevBuildCreate

SetIsHotfix sets the "isHotfix" field.

func (*DevBuildCreate) SetIsPushGCR

func (_c *DevBuildCreate) SetIsPushGCR(v bool) *DevBuildCreate

SetIsPushGCR sets the "isPushGCR" field.

func (*DevBuildCreate) SetNillableBuildEnv

func (_c *DevBuildCreate) SetNillableBuildEnv(v *string) *DevBuildCreate

SetNillableBuildEnv sets the "buildEnv" field if the given value is not nil.

func (*DevBuildCreate) SetNillableBuildReport

func (_c *DevBuildCreate) SetNillableBuildReport(v *schema.BuildReport) *DevBuildCreate

SetNillableBuildReport sets the "buildReport" field if the given value is not nil.

func (*DevBuildCreate) SetNillableBuilderImg

func (_c *DevBuildCreate) SetNillableBuilderImg(v *string) *DevBuildCreate

SetNillableBuilderImg sets the "builderImg" field if the given value is not nil.

func (*DevBuildCreate) SetNillableCreatedAt

func (_c *DevBuildCreate) SetNillableCreatedAt(v *time.Time) *DevBuildCreate

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

func (*DevBuildCreate) SetNillableCreatedBy

func (_c *DevBuildCreate) SetNillableCreatedBy(v *string) *DevBuildCreate

SetNillableCreatedBy sets the "createdBy" field if the given value is not nil.

func (*DevBuildCreate) SetNillableEdition

func (_c *DevBuildCreate) SetNillableEdition(v *string) *DevBuildCreate

SetNillableEdition sets the "edition" field if the given value is not nil.

func (*DevBuildCreate) SetNillableErrMsg

func (_c *DevBuildCreate) SetNillableErrMsg(v *string) *DevBuildCreate

SetNillableErrMsg sets the "errMsg" field if the given value is not nil.

func (*DevBuildCreate) SetNillableFeatures

func (_c *DevBuildCreate) SetNillableFeatures(v *string) *DevBuildCreate

SetNillableFeatures sets the "features" field if the given value is not nil.

func (*DevBuildCreate) SetNillableGitHash

func (_c *DevBuildCreate) SetNillableGitHash(v *string) *DevBuildCreate

SetNillableGitHash sets the "gitHash" field if the given value is not nil.

func (*DevBuildCreate) SetNillableGitRef

func (_c *DevBuildCreate) SetNillableGitRef(v *string) *DevBuildCreate

SetNillableGitRef sets the "gitRef" field if the given value is not nil.

func (*DevBuildCreate) SetNillableGithubRepo

func (_c *DevBuildCreate) SetNillableGithubRepo(v *string) *DevBuildCreate

SetNillableGithubRepo sets the "githubRepo" field if the given value is not nil.

func (*DevBuildCreate) SetNillableIsHotfix

func (_c *DevBuildCreate) SetNillableIsHotfix(v *bool) *DevBuildCreate

SetNillableIsHotfix sets the "isHotfix" field if the given value is not nil.

func (*DevBuildCreate) SetNillableIsPushGCR

func (_c *DevBuildCreate) SetNillableIsPushGCR(v *bool) *DevBuildCreate

SetNillableIsPushGCR sets the "isPushGCR" field if the given value is not nil.

func (*DevBuildCreate) SetNillableNotificationState

func (_c *DevBuildCreate) SetNillableNotificationState(v *schema.NotificationState) *DevBuildCreate

SetNillableNotificationState sets the "notificationState" field if the given value is not nil.

func (*DevBuildCreate) SetNillablePipelineBuildID

func (_c *DevBuildCreate) SetNillablePipelineBuildID(v *int) *DevBuildCreate

SetNillablePipelineBuildID sets the "pipelineBuildID" field if the given value is not nil.

func (*DevBuildCreate) SetNillablePipelineEndAt

func (_c *DevBuildCreate) SetNillablePipelineEndAt(v *time.Time) *DevBuildCreate

SetNillablePipelineEndAt sets the "pipelineEndAt" field if the given value is not nil.

func (*DevBuildCreate) SetNillablePipelineEngine

func (_c *DevBuildCreate) SetNillablePipelineEngine(v *string) *DevBuildCreate

SetNillablePipelineEngine sets the "pipelineEngine" field if the given value is not nil.

func (*DevBuildCreate) SetNillablePipelineStartAt

func (_c *DevBuildCreate) SetNillablePipelineStartAt(v *time.Time) *DevBuildCreate

SetNillablePipelineStartAt sets the "pipelineStartAt" field if the given value is not nil.

func (*DevBuildCreate) SetNillablePlatform

func (_c *DevBuildCreate) SetNillablePlatform(v *string) *DevBuildCreate

SetNillablePlatform sets the "platform" field if the given value is not nil.

func (*DevBuildCreate) SetNillablePluginGitRef

func (_c *DevBuildCreate) SetNillablePluginGitRef(v *string) *DevBuildCreate

SetNillablePluginGitRef sets the "pluginGitRef" field if the given value is not nil.

func (*DevBuildCreate) SetNillableProduct

func (_c *DevBuildCreate) SetNillableProduct(v *string) *DevBuildCreate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*DevBuildCreate) SetNillableProductBaseImg

func (_c *DevBuildCreate) SetNillableProductBaseImg(v *string) *DevBuildCreate

SetNillableProductBaseImg sets the "productBaseImg" field if the given value is not nil.

func (*DevBuildCreate) SetNillableProductDockerfile

func (_c *DevBuildCreate) SetNillableProductDockerfile(v *string) *DevBuildCreate

SetNillableProductDockerfile sets the "productDockerfile" field if the given value is not nil.

func (*DevBuildCreate) SetNillableStatus

func (_c *DevBuildCreate) SetNillableStatus(v *string) *DevBuildCreate

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

func (*DevBuildCreate) SetNillableTargetImg

func (_c *DevBuildCreate) SetNillableTargetImg(v *string) *DevBuildCreate

SetNillableTargetImg sets the "targetImg" field if the given value is not nil.

func (*DevBuildCreate) SetNillableTektonStatus

func (_c *DevBuildCreate) SetNillableTektonStatus(v *schema.TektonStatus) *DevBuildCreate

SetNillableTektonStatus sets the "tektonStatus" field if the given value is not nil.

func (*DevBuildCreate) SetNillableUpdatedAt

func (_c *DevBuildCreate) SetNillableUpdatedAt(v *time.Time) *DevBuildCreate

SetNillableUpdatedAt sets the "updatedAt" field if the given value is not nil.

func (*DevBuildCreate) SetNillableVersion

func (_c *DevBuildCreate) SetNillableVersion(v *string) *DevBuildCreate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*DevBuildCreate) SetNotificationState

func (_c *DevBuildCreate) SetNotificationState(v schema.NotificationState) *DevBuildCreate

SetNotificationState sets the "notificationState" field.

func (*DevBuildCreate) SetPipelineBuildID

func (_c *DevBuildCreate) SetPipelineBuildID(v int) *DevBuildCreate

SetPipelineBuildID sets the "pipelineBuildID" field.

func (*DevBuildCreate) SetPipelineEndAt

func (_c *DevBuildCreate) SetPipelineEndAt(v time.Time) *DevBuildCreate

SetPipelineEndAt sets the "pipelineEndAt" field.

func (*DevBuildCreate) SetPipelineEngine

func (_c *DevBuildCreate) SetPipelineEngine(v string) *DevBuildCreate

SetPipelineEngine sets the "pipelineEngine" field.

func (*DevBuildCreate) SetPipelineStartAt

func (_c *DevBuildCreate) SetPipelineStartAt(v time.Time) *DevBuildCreate

SetPipelineStartAt sets the "pipelineStartAt" field.

func (*DevBuildCreate) SetPlatform

func (_c *DevBuildCreate) SetPlatform(v string) *DevBuildCreate

SetPlatform sets the "platform" field.

func (*DevBuildCreate) SetPluginGitRef

func (_c *DevBuildCreate) SetPluginGitRef(v string) *DevBuildCreate

SetPluginGitRef sets the "pluginGitRef" field.

func (*DevBuildCreate) SetProduct

func (_c *DevBuildCreate) SetProduct(v string) *DevBuildCreate

SetProduct sets the "product" field.

func (*DevBuildCreate) SetProductBaseImg

func (_c *DevBuildCreate) SetProductBaseImg(v string) *DevBuildCreate

SetProductBaseImg sets the "productBaseImg" field.

func (*DevBuildCreate) SetProductDockerfile

func (_c *DevBuildCreate) SetProductDockerfile(v string) *DevBuildCreate

SetProductDockerfile sets the "productDockerfile" field.

func (*DevBuildCreate) SetStatus

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

SetStatus sets the "status" field.

func (*DevBuildCreate) SetTargetImg

func (_c *DevBuildCreate) SetTargetImg(v string) *DevBuildCreate

SetTargetImg sets the "targetImg" field.

func (*DevBuildCreate) SetTektonStatus

func (_c *DevBuildCreate) SetTektonStatus(v schema.TektonStatus) *DevBuildCreate

SetTektonStatus sets the "tektonStatus" field.

func (*DevBuildCreate) SetUpdatedAt

func (_c *DevBuildCreate) SetUpdatedAt(v time.Time) *DevBuildCreate

SetUpdatedAt sets the "updatedAt" field.

func (*DevBuildCreate) SetVersion

func (_c *DevBuildCreate) SetVersion(v string) *DevBuildCreate

SetVersion sets the "version" field.

type DevBuildCreateBulk

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

DevBuildCreateBulk is the builder for creating many DevBuild entities in bulk.

func (*DevBuildCreateBulk) Exec

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

Exec executes the query.

func (*DevBuildCreateBulk) ExecX

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

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

func (*DevBuildCreateBulk) Save

func (_c *DevBuildCreateBulk) Save(ctx context.Context) ([]*DevBuild, error)

Save creates the DevBuild entities in the database.

func (*DevBuildCreateBulk) SaveX

func (_c *DevBuildCreateBulk) SaveX(ctx context.Context) []*DevBuild

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

type DevBuildDelete

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

DevBuildDelete is the builder for deleting a DevBuild entity.

func (*DevBuildDelete) Exec

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

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

func (*DevBuildDelete) ExecX

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

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

func (*DevBuildDelete) Where

func (_d *DevBuildDelete) Where(ps ...predicate.DevBuild) *DevBuildDelete

Where appends a list predicates to the DevBuildDelete builder.

type DevBuildDeleteOne

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

DevBuildDeleteOne is the builder for deleting a single DevBuild entity.

func (*DevBuildDeleteOne) Exec

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

Exec executes the deletion query.

func (*DevBuildDeleteOne) ExecX

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

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

func (*DevBuildDeleteOne) Where

Where appends a list predicates to the DevBuildDelete builder.

type DevBuildGroupBy

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

DevBuildGroupBy is the group-by builder for DevBuild entities.

func (*DevBuildGroupBy) Aggregate

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

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

func (*DevBuildGroupBy) Bool

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

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

func (*DevBuildGroupBy) BoolX

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

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

func (*DevBuildGroupBy) Bools

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

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

func (*DevBuildGroupBy) BoolsX

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

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

func (*DevBuildGroupBy) Float64

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

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

func (*DevBuildGroupBy) Float64X

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

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

func (*DevBuildGroupBy) Float64s

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

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

func (*DevBuildGroupBy) Float64sX

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

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

func (*DevBuildGroupBy) Int

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

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

func (*DevBuildGroupBy) IntX

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

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

func (*DevBuildGroupBy) Ints

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

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

func (*DevBuildGroupBy) IntsX

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

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

func (*DevBuildGroupBy) Scan

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

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

func (*DevBuildGroupBy) ScanX

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

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

func (*DevBuildGroupBy) String

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

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

func (*DevBuildGroupBy) StringX

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

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

func (*DevBuildGroupBy) Strings

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

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

func (*DevBuildGroupBy) StringsX

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

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

type DevBuildMutation

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

DevBuildMutation represents an operation that mutates the DevBuild nodes in the graph.

func (*DevBuildMutation) AddField

func (m *DevBuildMutation) 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 (*DevBuildMutation) AddPipelineBuildID

func (m *DevBuildMutation) AddPipelineBuildID(i int)

AddPipelineBuildID adds i to the "pipelineBuildID" field.

func (*DevBuildMutation) AddedEdges

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

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

func (*DevBuildMutation) AddedField

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

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

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

func (*DevBuildMutation) AddedIDs

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

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

func (*DevBuildMutation) AddedPipelineBuildID

func (m *DevBuildMutation) AddedPipelineBuildID() (r int, exists bool)

AddedPipelineBuildID returns the value that was added to the "pipelineBuildID" field in this mutation.

func (*DevBuildMutation) BuildEnv

func (m *DevBuildMutation) BuildEnv() (r string, exists bool)

BuildEnv returns the value of the "buildEnv" field in the mutation.

func (*DevBuildMutation) BuildEnvCleared

func (m *DevBuildMutation) BuildEnvCleared() bool

BuildEnvCleared returns if the "buildEnv" field was cleared in this mutation.

func (*DevBuildMutation) BuildReport

func (m *DevBuildMutation) BuildReport() (r schema.BuildReport, exists bool)

BuildReport returns the value of the "buildReport" field in the mutation.

func (*DevBuildMutation) BuildReportCleared

func (m *DevBuildMutation) BuildReportCleared() bool

BuildReportCleared returns if the "buildReport" field was cleared in this mutation.

func (*DevBuildMutation) BuilderImg

func (m *DevBuildMutation) BuilderImg() (r string, exists bool)

BuilderImg returns the value of the "builderImg" field in the mutation.

func (*DevBuildMutation) BuilderImgCleared

func (m *DevBuildMutation) BuilderImgCleared() bool

BuilderImgCleared returns if the "builderImg" field was cleared in this mutation.

func (*DevBuildMutation) ClearBuildEnv

func (m *DevBuildMutation) ClearBuildEnv()

ClearBuildEnv clears the value of the "buildEnv" field.

func (*DevBuildMutation) ClearBuildReport

func (m *DevBuildMutation) ClearBuildReport()

ClearBuildReport clears the value of the "buildReport" field.

func (*DevBuildMutation) ClearBuilderImg

func (m *DevBuildMutation) ClearBuilderImg()

ClearBuilderImg clears the value of the "builderImg" field.

func (*DevBuildMutation) ClearCreatedBy

func (m *DevBuildMutation) ClearCreatedBy()

ClearCreatedBy clears the value of the "createdBy" field.

func (*DevBuildMutation) ClearEdge

func (m *DevBuildMutation) 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 (*DevBuildMutation) ClearEdition

func (m *DevBuildMutation) ClearEdition()

ClearEdition clears the value of the "edition" field.

func (*DevBuildMutation) ClearErrMsg

func (m *DevBuildMutation) ClearErrMsg()

ClearErrMsg clears the value of the "errMsg" field.

func (*DevBuildMutation) ClearFeatures

func (m *DevBuildMutation) ClearFeatures()

ClearFeatures clears the value of the "features" field.

func (*DevBuildMutation) ClearField

func (m *DevBuildMutation) 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 (*DevBuildMutation) ClearGitHash

func (m *DevBuildMutation) ClearGitHash()

ClearGitHash clears the value of the "gitHash" field.

func (*DevBuildMutation) ClearGitRef

func (m *DevBuildMutation) ClearGitRef()

ClearGitRef clears the value of the "gitRef" field.

func (*DevBuildMutation) ClearGithubRepo

func (m *DevBuildMutation) ClearGithubRepo()

ClearGithubRepo clears the value of the "githubRepo" field.

func (*DevBuildMutation) ClearIsPushGCR

func (m *DevBuildMutation) ClearIsPushGCR()

ClearIsPushGCR clears the value of the "isPushGCR" field.

func (*DevBuildMutation) ClearNotificationState

func (m *DevBuildMutation) ClearNotificationState()

ClearNotificationState clears the value of the "notificationState" field.

func (*DevBuildMutation) ClearPipelineBuildID

func (m *DevBuildMutation) ClearPipelineBuildID()

ClearPipelineBuildID clears the value of the "pipelineBuildID" field.

func (*DevBuildMutation) ClearPipelineEndAt

func (m *DevBuildMutation) ClearPipelineEndAt()

ClearPipelineEndAt clears the value of the "pipelineEndAt" field.

func (*DevBuildMutation) ClearPipelineEngine

func (m *DevBuildMutation) ClearPipelineEngine()

ClearPipelineEngine clears the value of the "pipelineEngine" field.

func (*DevBuildMutation) ClearPipelineStartAt

func (m *DevBuildMutation) ClearPipelineStartAt()

ClearPipelineStartAt clears the value of the "pipelineStartAt" field.

func (*DevBuildMutation) ClearPlatform

func (m *DevBuildMutation) ClearPlatform()

ClearPlatform clears the value of the "platform" field.

func (*DevBuildMutation) ClearPluginGitRef

func (m *DevBuildMutation) ClearPluginGitRef()

ClearPluginGitRef clears the value of the "pluginGitRef" field.

func (*DevBuildMutation) ClearProduct

func (m *DevBuildMutation) ClearProduct()

ClearProduct clears the value of the "product" field.

func (*DevBuildMutation) ClearProductBaseImg

func (m *DevBuildMutation) ClearProductBaseImg()

ClearProductBaseImg clears the value of the "productBaseImg" field.

func (*DevBuildMutation) ClearProductDockerfile

func (m *DevBuildMutation) ClearProductDockerfile()

ClearProductDockerfile clears the value of the "productDockerfile" field.

func (*DevBuildMutation) ClearStatus

func (m *DevBuildMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DevBuildMutation) ClearTargetImg

func (m *DevBuildMutation) ClearTargetImg()

ClearTargetImg clears the value of the "targetImg" field.

func (*DevBuildMutation) ClearTektonStatus

func (m *DevBuildMutation) ClearTektonStatus()

ClearTektonStatus clears the value of the "tektonStatus" field.

func (*DevBuildMutation) ClearVersion

func (m *DevBuildMutation) ClearVersion()

ClearVersion clears the value of the "version" field.

func (*DevBuildMutation) ClearedEdges

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

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

func (*DevBuildMutation) ClearedFields

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

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

func (DevBuildMutation) Client

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

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

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

func (*DevBuildMutation) CreatedBy

func (m *DevBuildMutation) CreatedBy() (r string, exists bool)

CreatedBy returns the value of the "createdBy" field in the mutation.

func (*DevBuildMutation) CreatedByCleared

func (m *DevBuildMutation) CreatedByCleared() bool

CreatedByCleared returns if the "createdBy" field was cleared in this mutation.

func (*DevBuildMutation) EdgeCleared

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

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

func (*DevBuildMutation) Edition

func (m *DevBuildMutation) Edition() (r string, exists bool)

Edition returns the value of the "edition" field in the mutation.

func (*DevBuildMutation) EditionCleared

func (m *DevBuildMutation) EditionCleared() bool

EditionCleared returns if the "edition" field was cleared in this mutation.

func (*DevBuildMutation) ErrMsg

func (m *DevBuildMutation) ErrMsg() (r string, exists bool)

ErrMsg returns the value of the "errMsg" field in the mutation.

func (*DevBuildMutation) ErrMsgCleared

func (m *DevBuildMutation) ErrMsgCleared() bool

ErrMsgCleared returns if the "errMsg" field was cleared in this mutation.

func (*DevBuildMutation) Features

func (m *DevBuildMutation) Features() (r string, exists bool)

Features returns the value of the "features" field in the mutation.

func (*DevBuildMutation) FeaturesCleared

func (m *DevBuildMutation) FeaturesCleared() bool

FeaturesCleared returns if the "features" field was cleared in this mutation.

func (*DevBuildMutation) Field

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

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

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

func (*DevBuildMutation) Fields

func (m *DevBuildMutation) 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 (*DevBuildMutation) GitHash

func (m *DevBuildMutation) GitHash() (r string, exists bool)

GitHash returns the value of the "gitHash" field in the mutation.

func (*DevBuildMutation) GitHashCleared

func (m *DevBuildMutation) GitHashCleared() bool

GitHashCleared returns if the "gitHash" field was cleared in this mutation.

func (*DevBuildMutation) GitRef

func (m *DevBuildMutation) GitRef() (r string, exists bool)

GitRef returns the value of the "gitRef" field in the mutation.

func (*DevBuildMutation) GitRefCleared

func (m *DevBuildMutation) GitRefCleared() bool

GitRefCleared returns if the "gitRef" field was cleared in this mutation.

func (*DevBuildMutation) GithubRepo

func (m *DevBuildMutation) GithubRepo() (r string, exists bool)

GithubRepo returns the value of the "githubRepo" field in the mutation.

func (*DevBuildMutation) GithubRepoCleared

func (m *DevBuildMutation) GithubRepoCleared() bool

GithubRepoCleared returns if the "githubRepo" field was cleared in this mutation.

func (*DevBuildMutation) ID

func (m *DevBuildMutation) 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 (*DevBuildMutation) IDs

func (m *DevBuildMutation) 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 (*DevBuildMutation) IsHotfix

func (m *DevBuildMutation) IsHotfix() (r bool, exists bool)

IsHotfix returns the value of the "isHotfix" field in the mutation.

func (*DevBuildMutation) IsPushGCR

func (m *DevBuildMutation) IsPushGCR() (r bool, exists bool)

IsPushGCR returns the value of the "isPushGCR" field in the mutation.

func (*DevBuildMutation) IsPushGCRCleared

func (m *DevBuildMutation) IsPushGCRCleared() bool

IsPushGCRCleared returns if the "isPushGCR" field was cleared in this mutation.

func (*DevBuildMutation) NotificationState

func (m *DevBuildMutation) NotificationState() (r schema.NotificationState, exists bool)

NotificationState returns the value of the "notificationState" field in the mutation.

func (*DevBuildMutation) NotificationStateCleared

func (m *DevBuildMutation) NotificationStateCleared() bool

NotificationStateCleared returns if the "notificationState" field was cleared in this mutation.

func (*DevBuildMutation) OldBuildEnv

func (m *DevBuildMutation) OldBuildEnv(ctx context.Context) (v string, err error)

OldBuildEnv returns the old "buildEnv" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldBuildReport

func (m *DevBuildMutation) OldBuildReport(ctx context.Context) (v schema.BuildReport, err error)

OldBuildReport returns the old "buildReport" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldBuilderImg

func (m *DevBuildMutation) OldBuilderImg(ctx context.Context) (v string, err error)

OldBuilderImg returns the old "builderImg" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldCreatedAt

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

OldCreatedAt returns the old "createdAt" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldCreatedBy

func (m *DevBuildMutation) OldCreatedBy(ctx context.Context) (v string, err error)

OldCreatedBy returns the old "createdBy" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldEdition

func (m *DevBuildMutation) OldEdition(ctx context.Context) (v string, err error)

OldEdition returns the old "edition" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldErrMsg

func (m *DevBuildMutation) OldErrMsg(ctx context.Context) (v string, err error)

OldErrMsg returns the old "errMsg" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldFeatures

func (m *DevBuildMutation) OldFeatures(ctx context.Context) (v string, err error)

OldFeatures returns the old "features" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldField

func (m *DevBuildMutation) 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 (*DevBuildMutation) OldGitHash

func (m *DevBuildMutation) OldGitHash(ctx context.Context) (v string, err error)

OldGitHash returns the old "gitHash" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldGitRef

func (m *DevBuildMutation) OldGitRef(ctx context.Context) (v string, err error)

OldGitRef returns the old "gitRef" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldGithubRepo

func (m *DevBuildMutation) OldGithubRepo(ctx context.Context) (v string, err error)

OldGithubRepo returns the old "githubRepo" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldIsHotfix

func (m *DevBuildMutation) OldIsHotfix(ctx context.Context) (v bool, err error)

OldIsHotfix returns the old "isHotfix" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldIsPushGCR

func (m *DevBuildMutation) OldIsPushGCR(ctx context.Context) (v bool, err error)

OldIsPushGCR returns the old "isPushGCR" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldNotificationState

func (m *DevBuildMutation) OldNotificationState(ctx context.Context) (v schema.NotificationState, err error)

OldNotificationState returns the old "notificationState" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldPipelineBuildID

func (m *DevBuildMutation) OldPipelineBuildID(ctx context.Context) (v int, err error)

OldPipelineBuildID returns the old "pipelineBuildID" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldPipelineEndAt

func (m *DevBuildMutation) OldPipelineEndAt(ctx context.Context) (v time.Time, err error)

OldPipelineEndAt returns the old "pipelineEndAt" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldPipelineEngine

func (m *DevBuildMutation) OldPipelineEngine(ctx context.Context) (v string, err error)

OldPipelineEngine returns the old "pipelineEngine" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldPipelineStartAt

func (m *DevBuildMutation) OldPipelineStartAt(ctx context.Context) (v time.Time, err error)

OldPipelineStartAt returns the old "pipelineStartAt" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldPlatform

func (m *DevBuildMutation) OldPlatform(ctx context.Context) (v string, err error)

OldPlatform returns the old "platform" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldPluginGitRef

func (m *DevBuildMutation) OldPluginGitRef(ctx context.Context) (v string, err error)

OldPluginGitRef returns the old "pluginGitRef" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldProduct

func (m *DevBuildMutation) OldProduct(ctx context.Context) (v string, err error)

OldProduct returns the old "product" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldProductBaseImg

func (m *DevBuildMutation) OldProductBaseImg(ctx context.Context) (v string, err error)

OldProductBaseImg returns the old "productBaseImg" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldProductDockerfile

func (m *DevBuildMutation) OldProductDockerfile(ctx context.Context) (v string, err error)

OldProductDockerfile returns the old "productDockerfile" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldStatus

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

OldStatus returns the old "status" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldTargetImg

func (m *DevBuildMutation) OldTargetImg(ctx context.Context) (v string, err error)

OldTargetImg returns the old "targetImg" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldTektonStatus

func (m *DevBuildMutation) OldTektonStatus(ctx context.Context) (v schema.TektonStatus, err error)

OldTektonStatus returns the old "tektonStatus" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldUpdatedAt

func (m *DevBuildMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updatedAt" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) OldVersion

func (m *DevBuildMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" field's value of the DevBuild entity. If the DevBuild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DevBuildMutation) Op

func (m *DevBuildMutation) Op() Op

Op returns the operation name.

func (*DevBuildMutation) PipelineBuildID

func (m *DevBuildMutation) PipelineBuildID() (r int, exists bool)

PipelineBuildID returns the value of the "pipelineBuildID" field in the mutation.

func (*DevBuildMutation) PipelineBuildIDCleared

func (m *DevBuildMutation) PipelineBuildIDCleared() bool

PipelineBuildIDCleared returns if the "pipelineBuildID" field was cleared in this mutation.

func (*DevBuildMutation) PipelineEndAt

func (m *DevBuildMutation) PipelineEndAt() (r time.Time, exists bool)

PipelineEndAt returns the value of the "pipelineEndAt" field in the mutation.

func (*DevBuildMutation) PipelineEndAtCleared

func (m *DevBuildMutation) PipelineEndAtCleared() bool

PipelineEndAtCleared returns if the "pipelineEndAt" field was cleared in this mutation.

func (*DevBuildMutation) PipelineEngine

func (m *DevBuildMutation) PipelineEngine() (r string, exists bool)

PipelineEngine returns the value of the "pipelineEngine" field in the mutation.

func (*DevBuildMutation) PipelineEngineCleared

func (m *DevBuildMutation) PipelineEngineCleared() bool

PipelineEngineCleared returns if the "pipelineEngine" field was cleared in this mutation.

func (*DevBuildMutation) PipelineStartAt

func (m *DevBuildMutation) PipelineStartAt() (r time.Time, exists bool)

PipelineStartAt returns the value of the "pipelineStartAt" field in the mutation.

func (*DevBuildMutation) PipelineStartAtCleared

func (m *DevBuildMutation) PipelineStartAtCleared() bool

PipelineStartAtCleared returns if the "pipelineStartAt" field was cleared in this mutation.

func (*DevBuildMutation) Platform

func (m *DevBuildMutation) Platform() (r string, exists bool)

Platform returns the value of the "platform" field in the mutation.

func (*DevBuildMutation) PlatformCleared

func (m *DevBuildMutation) PlatformCleared() bool

PlatformCleared returns if the "platform" field was cleared in this mutation.

func (*DevBuildMutation) PluginGitRef

func (m *DevBuildMutation) PluginGitRef() (r string, exists bool)

PluginGitRef returns the value of the "pluginGitRef" field in the mutation.

func (*DevBuildMutation) PluginGitRefCleared

func (m *DevBuildMutation) PluginGitRefCleared() bool

PluginGitRefCleared returns if the "pluginGitRef" field was cleared in this mutation.

func (*DevBuildMutation) Product

func (m *DevBuildMutation) Product() (r string, exists bool)

Product returns the value of the "product" field in the mutation.

func (*DevBuildMutation) ProductBaseImg

func (m *DevBuildMutation) ProductBaseImg() (r string, exists bool)

ProductBaseImg returns the value of the "productBaseImg" field in the mutation.

func (*DevBuildMutation) ProductBaseImgCleared

func (m *DevBuildMutation) ProductBaseImgCleared() bool

ProductBaseImgCleared returns if the "productBaseImg" field was cleared in this mutation.

func (*DevBuildMutation) ProductCleared

func (m *DevBuildMutation) ProductCleared() bool

ProductCleared returns if the "product" field was cleared in this mutation.

func (*DevBuildMutation) ProductDockerfile

func (m *DevBuildMutation) ProductDockerfile() (r string, exists bool)

ProductDockerfile returns the value of the "productDockerfile" field in the mutation.

func (*DevBuildMutation) ProductDockerfileCleared

func (m *DevBuildMutation) ProductDockerfileCleared() bool

ProductDockerfileCleared returns if the "productDockerfile" field was cleared in this mutation.

func (*DevBuildMutation) RemovedEdges

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

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

func (*DevBuildMutation) RemovedIDs

func (m *DevBuildMutation) 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 (*DevBuildMutation) ResetBuildEnv

func (m *DevBuildMutation) ResetBuildEnv()

ResetBuildEnv resets all changes to the "buildEnv" field.

func (*DevBuildMutation) ResetBuildReport

func (m *DevBuildMutation) ResetBuildReport()

ResetBuildReport resets all changes to the "buildReport" field.

func (*DevBuildMutation) ResetBuilderImg

func (m *DevBuildMutation) ResetBuilderImg()

ResetBuilderImg resets all changes to the "builderImg" field.

func (*DevBuildMutation) ResetCreatedAt

func (m *DevBuildMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "createdAt" field.

func (*DevBuildMutation) ResetCreatedBy

func (m *DevBuildMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "createdBy" field.

func (*DevBuildMutation) ResetEdge

func (m *DevBuildMutation) 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 (*DevBuildMutation) ResetEdition

func (m *DevBuildMutation) ResetEdition()

ResetEdition resets all changes to the "edition" field.

func (*DevBuildMutation) ResetErrMsg

func (m *DevBuildMutation) ResetErrMsg()

ResetErrMsg resets all changes to the "errMsg" field.

func (*DevBuildMutation) ResetFeatures

func (m *DevBuildMutation) ResetFeatures()

ResetFeatures resets all changes to the "features" field.

func (*DevBuildMutation) ResetField

func (m *DevBuildMutation) 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 (*DevBuildMutation) ResetGitHash

func (m *DevBuildMutation) ResetGitHash()

ResetGitHash resets all changes to the "gitHash" field.

func (*DevBuildMutation) ResetGitRef

func (m *DevBuildMutation) ResetGitRef()

ResetGitRef resets all changes to the "gitRef" field.

func (*DevBuildMutation) ResetGithubRepo

func (m *DevBuildMutation) ResetGithubRepo()

ResetGithubRepo resets all changes to the "githubRepo" field.

func (*DevBuildMutation) ResetIsHotfix

func (m *DevBuildMutation) ResetIsHotfix()

ResetIsHotfix resets all changes to the "isHotfix" field.

func (*DevBuildMutation) ResetIsPushGCR

func (m *DevBuildMutation) ResetIsPushGCR()

ResetIsPushGCR resets all changes to the "isPushGCR" field.

func (*DevBuildMutation) ResetNotificationState

func (m *DevBuildMutation) ResetNotificationState()

ResetNotificationState resets all changes to the "notificationState" field.

func (*DevBuildMutation) ResetPipelineBuildID

func (m *DevBuildMutation) ResetPipelineBuildID()

ResetPipelineBuildID resets all changes to the "pipelineBuildID" field.

func (*DevBuildMutation) ResetPipelineEndAt

func (m *DevBuildMutation) ResetPipelineEndAt()

ResetPipelineEndAt resets all changes to the "pipelineEndAt" field.

func (*DevBuildMutation) ResetPipelineEngine

func (m *DevBuildMutation) ResetPipelineEngine()

ResetPipelineEngine resets all changes to the "pipelineEngine" field.

func (*DevBuildMutation) ResetPipelineStartAt

func (m *DevBuildMutation) ResetPipelineStartAt()

ResetPipelineStartAt resets all changes to the "pipelineStartAt" field.

func (*DevBuildMutation) ResetPlatform

func (m *DevBuildMutation) ResetPlatform()

ResetPlatform resets all changes to the "platform" field.

func (*DevBuildMutation) ResetPluginGitRef

func (m *DevBuildMutation) ResetPluginGitRef()

ResetPluginGitRef resets all changes to the "pluginGitRef" field.

func (*DevBuildMutation) ResetProduct

func (m *DevBuildMutation) ResetProduct()

ResetProduct resets all changes to the "product" field.

func (*DevBuildMutation) ResetProductBaseImg

func (m *DevBuildMutation) ResetProductBaseImg()

ResetProductBaseImg resets all changes to the "productBaseImg" field.

func (*DevBuildMutation) ResetProductDockerfile

func (m *DevBuildMutation) ResetProductDockerfile()

ResetProductDockerfile resets all changes to the "productDockerfile" field.

func (*DevBuildMutation) ResetStatus

func (m *DevBuildMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DevBuildMutation) ResetTargetImg

func (m *DevBuildMutation) ResetTargetImg()

ResetTargetImg resets all changes to the "targetImg" field.

func (*DevBuildMutation) ResetTektonStatus

func (m *DevBuildMutation) ResetTektonStatus()

ResetTektonStatus resets all changes to the "tektonStatus" field.

func (*DevBuildMutation) ResetUpdatedAt

func (m *DevBuildMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updatedAt" field.

func (*DevBuildMutation) ResetVersion

func (m *DevBuildMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*DevBuildMutation) SetBuildEnv

func (m *DevBuildMutation) SetBuildEnv(s string)

SetBuildEnv sets the "buildEnv" field.

func (*DevBuildMutation) SetBuildReport

func (m *DevBuildMutation) SetBuildReport(sr schema.BuildReport)

SetBuildReport sets the "buildReport" field.

func (*DevBuildMutation) SetBuilderImg

func (m *DevBuildMutation) SetBuilderImg(s string)

SetBuilderImg sets the "builderImg" field.

func (*DevBuildMutation) SetCreatedAt

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

SetCreatedAt sets the "createdAt" field.

func (*DevBuildMutation) SetCreatedBy

func (m *DevBuildMutation) SetCreatedBy(s string)

SetCreatedBy sets the "createdBy" field.

func (*DevBuildMutation) SetEdition

func (m *DevBuildMutation) SetEdition(s string)

SetEdition sets the "edition" field.

func (*DevBuildMutation) SetErrMsg

func (m *DevBuildMutation) SetErrMsg(s string)

SetErrMsg sets the "errMsg" field.

func (*DevBuildMutation) SetFeatures

func (m *DevBuildMutation) SetFeatures(s string)

SetFeatures sets the "features" field.

func (*DevBuildMutation) SetField

func (m *DevBuildMutation) 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 (*DevBuildMutation) SetGitHash

func (m *DevBuildMutation) SetGitHash(s string)

SetGitHash sets the "gitHash" field.

func (*DevBuildMutation) SetGitRef

func (m *DevBuildMutation) SetGitRef(s string)

SetGitRef sets the "gitRef" field.

func (*DevBuildMutation) SetGithubRepo

func (m *DevBuildMutation) SetGithubRepo(s string)

SetGithubRepo sets the "githubRepo" field.

func (*DevBuildMutation) SetIsHotfix

func (m *DevBuildMutation) SetIsHotfix(b bool)

SetIsHotfix sets the "isHotfix" field.

func (*DevBuildMutation) SetIsPushGCR

func (m *DevBuildMutation) SetIsPushGCR(b bool)

SetIsPushGCR sets the "isPushGCR" field.

func (*DevBuildMutation) SetNotificationState

func (m *DevBuildMutation) SetNotificationState(ss schema.NotificationState)

SetNotificationState sets the "notificationState" field.

func (*DevBuildMutation) SetOp

func (m *DevBuildMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DevBuildMutation) SetPipelineBuildID

func (m *DevBuildMutation) SetPipelineBuildID(i int)

SetPipelineBuildID sets the "pipelineBuildID" field.

func (*DevBuildMutation) SetPipelineEndAt

func (m *DevBuildMutation) SetPipelineEndAt(t time.Time)

SetPipelineEndAt sets the "pipelineEndAt" field.

func (*DevBuildMutation) SetPipelineEngine

func (m *DevBuildMutation) SetPipelineEngine(s string)

SetPipelineEngine sets the "pipelineEngine" field.

func (*DevBuildMutation) SetPipelineStartAt

func (m *DevBuildMutation) SetPipelineStartAt(t time.Time)

SetPipelineStartAt sets the "pipelineStartAt" field.

func (*DevBuildMutation) SetPlatform

func (m *DevBuildMutation) SetPlatform(s string)

SetPlatform sets the "platform" field.

func (*DevBuildMutation) SetPluginGitRef

func (m *DevBuildMutation) SetPluginGitRef(s string)

SetPluginGitRef sets the "pluginGitRef" field.

func (*DevBuildMutation) SetProduct

func (m *DevBuildMutation) SetProduct(s string)

SetProduct sets the "product" field.

func (*DevBuildMutation) SetProductBaseImg

func (m *DevBuildMutation) SetProductBaseImg(s string)

SetProductBaseImg sets the "productBaseImg" field.

func (*DevBuildMutation) SetProductDockerfile

func (m *DevBuildMutation) SetProductDockerfile(s string)

SetProductDockerfile sets the "productDockerfile" field.

func (*DevBuildMutation) SetStatus

func (m *DevBuildMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*DevBuildMutation) SetTargetImg

func (m *DevBuildMutation) SetTargetImg(s string)

SetTargetImg sets the "targetImg" field.

func (*DevBuildMutation) SetTektonStatus

func (m *DevBuildMutation) SetTektonStatus(ss schema.TektonStatus)

SetTektonStatus sets the "tektonStatus" field.

func (*DevBuildMutation) SetUpdatedAt

func (m *DevBuildMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updatedAt" field.

func (*DevBuildMutation) SetVersion

func (m *DevBuildMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*DevBuildMutation) Status

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

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

func (*DevBuildMutation) StatusCleared

func (m *DevBuildMutation) StatusCleared() bool

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

func (*DevBuildMutation) TargetImg

func (m *DevBuildMutation) TargetImg() (r string, exists bool)

TargetImg returns the value of the "targetImg" field in the mutation.

func (*DevBuildMutation) TargetImgCleared

func (m *DevBuildMutation) TargetImgCleared() bool

TargetImgCleared returns if the "targetImg" field was cleared in this mutation.

func (*DevBuildMutation) TektonStatus

func (m *DevBuildMutation) TektonStatus() (r schema.TektonStatus, exists bool)

TektonStatus returns the value of the "tektonStatus" field in the mutation.

func (*DevBuildMutation) TektonStatusCleared

func (m *DevBuildMutation) TektonStatusCleared() bool

TektonStatusCleared returns if the "tektonStatus" field was cleared in this mutation.

func (DevBuildMutation) Tx

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

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

func (*DevBuildMutation) Type

func (m *DevBuildMutation) Type() string

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

func (*DevBuildMutation) UpdatedAt

func (m *DevBuildMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updatedAt" field in the mutation.

func (*DevBuildMutation) Version

func (m *DevBuildMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*DevBuildMutation) VersionCleared

func (m *DevBuildMutation) VersionCleared() bool

VersionCleared returns if the "version" field was cleared in this mutation.

func (*DevBuildMutation) Where

func (m *DevBuildMutation) Where(ps ...predicate.DevBuild)

Where appends a list predicates to the DevBuildMutation builder.

func (*DevBuildMutation) WhereP

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

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

type DevBuildQuery

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

DevBuildQuery is the builder for querying DevBuild entities.

func (*DevBuildQuery) Aggregate

func (_q *DevBuildQuery) Aggregate(fns ...AggregateFunc) *DevBuildSelect

Aggregate returns a DevBuildSelect configured with the given aggregations.

func (*DevBuildQuery) All

func (_q *DevBuildQuery) All(ctx context.Context) ([]*DevBuild, error)

All executes the query and returns a list of DevBuilds.

func (*DevBuildQuery) AllX

func (_q *DevBuildQuery) AllX(ctx context.Context) []*DevBuild

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

func (*DevBuildQuery) Clone

func (_q *DevBuildQuery) Clone() *DevBuildQuery

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

func (*DevBuildQuery) Count

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

Count returns the count of the given query.

func (*DevBuildQuery) CountX

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

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

func (*DevBuildQuery) Exist

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

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

func (*DevBuildQuery) ExistX

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

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

func (*DevBuildQuery) First

func (_q *DevBuildQuery) First(ctx context.Context) (*DevBuild, error)

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

func (*DevBuildQuery) FirstID

func (_q *DevBuildQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*DevBuildQuery) FirstIDX

func (_q *DevBuildQuery) FirstIDX(ctx context.Context) int

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

func (*DevBuildQuery) FirstX

func (_q *DevBuildQuery) FirstX(ctx context.Context) *DevBuild

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

func (*DevBuildQuery) GroupBy

func (_q *DevBuildQuery) GroupBy(field string, fields ...string) *DevBuildGroupBy

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

client.DevBuild.Query().
	GroupBy(devbuild.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DevBuildQuery) IDs

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

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

func (*DevBuildQuery) IDsX

func (_q *DevBuildQuery) IDsX(ctx context.Context) []int

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

func (*DevBuildQuery) Limit

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

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

func (*DevBuildQuery) Offset

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

Offset to start from.

func (*DevBuildQuery) Only

func (_q *DevBuildQuery) Only(ctx context.Context) (*DevBuild, error)

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

func (*DevBuildQuery) OnlyID

func (_q *DevBuildQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*DevBuildQuery) OnlyIDX

func (_q *DevBuildQuery) OnlyIDX(ctx context.Context) int

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

func (*DevBuildQuery) OnlyX

func (_q *DevBuildQuery) OnlyX(ctx context.Context) *DevBuild

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

func (*DevBuildQuery) Order

Order specifies how the records should be ordered.

func (*DevBuildQuery) Select

func (_q *DevBuildQuery) Select(fields ...string) *DevBuildSelect

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

client.DevBuild.Query().
	Select(devbuild.FieldCreatedBy).
	Scan(ctx, &v)

func (*DevBuildQuery) Unique

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

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

func (_q *DevBuildQuery) Where(ps ...predicate.DevBuild) *DevBuildQuery

Where adds a new predicate for the DevBuildQuery builder.

type DevBuildSelect

type DevBuildSelect struct {
	*DevBuildQuery
	// contains filtered or unexported fields
}

DevBuildSelect is the builder for selecting fields of DevBuild entities.

func (*DevBuildSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*DevBuildSelect) Bool

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

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

func (*DevBuildSelect) BoolX

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

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

func (*DevBuildSelect) Bools

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

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

func (*DevBuildSelect) BoolsX

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

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

func (*DevBuildSelect) Float64

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

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

func (*DevBuildSelect) Float64X

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

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

func (*DevBuildSelect) Float64s

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

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

func (*DevBuildSelect) Float64sX

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

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

func (*DevBuildSelect) Int

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

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

func (*DevBuildSelect) IntX

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

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

func (*DevBuildSelect) Ints

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

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

func (*DevBuildSelect) IntsX

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

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

func (*DevBuildSelect) Scan

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

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

func (*DevBuildSelect) ScanX

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

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

func (*DevBuildSelect) String

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

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

func (*DevBuildSelect) StringX

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

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

func (*DevBuildSelect) Strings

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

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

func (*DevBuildSelect) StringsX

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

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

type DevBuildUpdate

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

DevBuildUpdate is the builder for updating DevBuild entities.

func (*DevBuildUpdate) AddPipelineBuildID

func (_u *DevBuildUpdate) AddPipelineBuildID(v int) *DevBuildUpdate

AddPipelineBuildID adds value to the "pipelineBuildID" field.

func (*DevBuildUpdate) ClearBuildEnv

func (_u *DevBuildUpdate) ClearBuildEnv() *DevBuildUpdate

ClearBuildEnv clears the value of the "buildEnv" field.

func (*DevBuildUpdate) ClearBuildReport

func (_u *DevBuildUpdate) ClearBuildReport() *DevBuildUpdate

ClearBuildReport clears the value of the "buildReport" field.

func (*DevBuildUpdate) ClearBuilderImg

func (_u *DevBuildUpdate) ClearBuilderImg() *DevBuildUpdate

ClearBuilderImg clears the value of the "builderImg" field.

func (*DevBuildUpdate) ClearCreatedBy

func (_u *DevBuildUpdate) ClearCreatedBy() *DevBuildUpdate

ClearCreatedBy clears the value of the "createdBy" field.

func (*DevBuildUpdate) ClearEdition

func (_u *DevBuildUpdate) ClearEdition() *DevBuildUpdate

ClearEdition clears the value of the "edition" field.

func (*DevBuildUpdate) ClearErrMsg

func (_u *DevBuildUpdate) ClearErrMsg() *DevBuildUpdate

ClearErrMsg clears the value of the "errMsg" field.

func (*DevBuildUpdate) ClearFeatures

func (_u *DevBuildUpdate) ClearFeatures() *DevBuildUpdate

ClearFeatures clears the value of the "features" field.

func (*DevBuildUpdate) ClearGitHash

func (_u *DevBuildUpdate) ClearGitHash() *DevBuildUpdate

ClearGitHash clears the value of the "gitHash" field.

func (*DevBuildUpdate) ClearGitRef

func (_u *DevBuildUpdate) ClearGitRef() *DevBuildUpdate

ClearGitRef clears the value of the "gitRef" field.

func (*DevBuildUpdate) ClearGithubRepo

func (_u *DevBuildUpdate) ClearGithubRepo() *DevBuildUpdate

ClearGithubRepo clears the value of the "githubRepo" field.

func (*DevBuildUpdate) ClearIsPushGCR

func (_u *DevBuildUpdate) ClearIsPushGCR() *DevBuildUpdate

ClearIsPushGCR clears the value of the "isPushGCR" field.

func (*DevBuildUpdate) ClearNotificationState

func (_u *DevBuildUpdate) ClearNotificationState() *DevBuildUpdate

ClearNotificationState clears the value of the "notificationState" field.

func (*DevBuildUpdate) ClearPipelineBuildID

func (_u *DevBuildUpdate) ClearPipelineBuildID() *DevBuildUpdate

ClearPipelineBuildID clears the value of the "pipelineBuildID" field.

func (*DevBuildUpdate) ClearPipelineEndAt

func (_u *DevBuildUpdate) ClearPipelineEndAt() *DevBuildUpdate

ClearPipelineEndAt clears the value of the "pipelineEndAt" field.

func (*DevBuildUpdate) ClearPipelineEngine

func (_u *DevBuildUpdate) ClearPipelineEngine() *DevBuildUpdate

ClearPipelineEngine clears the value of the "pipelineEngine" field.

func (*DevBuildUpdate) ClearPipelineStartAt

func (_u *DevBuildUpdate) ClearPipelineStartAt() *DevBuildUpdate

ClearPipelineStartAt clears the value of the "pipelineStartAt" field.

func (*DevBuildUpdate) ClearPlatform

func (_u *DevBuildUpdate) ClearPlatform() *DevBuildUpdate

ClearPlatform clears the value of the "platform" field.

func (*DevBuildUpdate) ClearPluginGitRef

func (_u *DevBuildUpdate) ClearPluginGitRef() *DevBuildUpdate

ClearPluginGitRef clears the value of the "pluginGitRef" field.

func (*DevBuildUpdate) ClearProduct

func (_u *DevBuildUpdate) ClearProduct() *DevBuildUpdate

ClearProduct clears the value of the "product" field.

func (*DevBuildUpdate) ClearProductBaseImg

func (_u *DevBuildUpdate) ClearProductBaseImg() *DevBuildUpdate

ClearProductBaseImg clears the value of the "productBaseImg" field.

func (*DevBuildUpdate) ClearProductDockerfile

func (_u *DevBuildUpdate) ClearProductDockerfile() *DevBuildUpdate

ClearProductDockerfile clears the value of the "productDockerfile" field.

func (*DevBuildUpdate) ClearStatus

func (_u *DevBuildUpdate) ClearStatus() *DevBuildUpdate

ClearStatus clears the value of the "status" field.

func (*DevBuildUpdate) ClearTargetImg

func (_u *DevBuildUpdate) ClearTargetImg() *DevBuildUpdate

ClearTargetImg clears the value of the "targetImg" field.

func (*DevBuildUpdate) ClearTektonStatus

func (_u *DevBuildUpdate) ClearTektonStatus() *DevBuildUpdate

ClearTektonStatus clears the value of the "tektonStatus" field.

func (*DevBuildUpdate) ClearVersion

func (_u *DevBuildUpdate) ClearVersion() *DevBuildUpdate

ClearVersion clears the value of the "version" field.

func (*DevBuildUpdate) Exec

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

Exec executes the query.

func (*DevBuildUpdate) ExecX

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

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

func (*DevBuildUpdate) Mutation

func (_u *DevBuildUpdate) Mutation() *DevBuildMutation

Mutation returns the DevBuildMutation object of the builder.

func (*DevBuildUpdate) Save

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

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

func (*DevBuildUpdate) SaveX

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

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

func (*DevBuildUpdate) SetBuildEnv

func (_u *DevBuildUpdate) SetBuildEnv(v string) *DevBuildUpdate

SetBuildEnv sets the "buildEnv" field.

func (*DevBuildUpdate) SetBuildReport

func (_u *DevBuildUpdate) SetBuildReport(v schema.BuildReport) *DevBuildUpdate

SetBuildReport sets the "buildReport" field.

func (*DevBuildUpdate) SetBuilderImg

func (_u *DevBuildUpdate) SetBuilderImg(v string) *DevBuildUpdate

SetBuilderImg sets the "builderImg" field.

func (*DevBuildUpdate) SetCreatedAt

func (_u *DevBuildUpdate) SetCreatedAt(v time.Time) *DevBuildUpdate

SetCreatedAt sets the "createdAt" field.

func (*DevBuildUpdate) SetCreatedBy

func (_u *DevBuildUpdate) SetCreatedBy(v string) *DevBuildUpdate

SetCreatedBy sets the "createdBy" field.

func (*DevBuildUpdate) SetEdition

func (_u *DevBuildUpdate) SetEdition(v string) *DevBuildUpdate

SetEdition sets the "edition" field.

func (*DevBuildUpdate) SetErrMsg

func (_u *DevBuildUpdate) SetErrMsg(v string) *DevBuildUpdate

SetErrMsg sets the "errMsg" field.

func (*DevBuildUpdate) SetFeatures

func (_u *DevBuildUpdate) SetFeatures(v string) *DevBuildUpdate

SetFeatures sets the "features" field.

func (*DevBuildUpdate) SetGitHash

func (_u *DevBuildUpdate) SetGitHash(v string) *DevBuildUpdate

SetGitHash sets the "gitHash" field.

func (*DevBuildUpdate) SetGitRef

func (_u *DevBuildUpdate) SetGitRef(v string) *DevBuildUpdate

SetGitRef sets the "gitRef" field.

func (*DevBuildUpdate) SetGithubRepo

func (_u *DevBuildUpdate) SetGithubRepo(v string) *DevBuildUpdate

SetGithubRepo sets the "githubRepo" field.

func (*DevBuildUpdate) SetIsHotfix

func (_u *DevBuildUpdate) SetIsHotfix(v bool) *DevBuildUpdate

SetIsHotfix sets the "isHotfix" field.

func (*DevBuildUpdate) SetIsPushGCR

func (_u *DevBuildUpdate) SetIsPushGCR(v bool) *DevBuildUpdate

SetIsPushGCR sets the "isPushGCR" field.

func (*DevBuildUpdate) SetNillableBuildEnv

func (_u *DevBuildUpdate) SetNillableBuildEnv(v *string) *DevBuildUpdate

SetNillableBuildEnv sets the "buildEnv" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableBuildReport

func (_u *DevBuildUpdate) SetNillableBuildReport(v *schema.BuildReport) *DevBuildUpdate

SetNillableBuildReport sets the "buildReport" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableBuilderImg

func (_u *DevBuildUpdate) SetNillableBuilderImg(v *string) *DevBuildUpdate

SetNillableBuilderImg sets the "builderImg" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableCreatedAt

func (_u *DevBuildUpdate) SetNillableCreatedAt(v *time.Time) *DevBuildUpdate

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

func (*DevBuildUpdate) SetNillableCreatedBy

func (_u *DevBuildUpdate) SetNillableCreatedBy(v *string) *DevBuildUpdate

SetNillableCreatedBy sets the "createdBy" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableEdition

func (_u *DevBuildUpdate) SetNillableEdition(v *string) *DevBuildUpdate

SetNillableEdition sets the "edition" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableErrMsg

func (_u *DevBuildUpdate) SetNillableErrMsg(v *string) *DevBuildUpdate

SetNillableErrMsg sets the "errMsg" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableFeatures

func (_u *DevBuildUpdate) SetNillableFeatures(v *string) *DevBuildUpdate

SetNillableFeatures sets the "features" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableGitHash

func (_u *DevBuildUpdate) SetNillableGitHash(v *string) *DevBuildUpdate

SetNillableGitHash sets the "gitHash" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableGitRef

func (_u *DevBuildUpdate) SetNillableGitRef(v *string) *DevBuildUpdate

SetNillableGitRef sets the "gitRef" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableGithubRepo

func (_u *DevBuildUpdate) SetNillableGithubRepo(v *string) *DevBuildUpdate

SetNillableGithubRepo sets the "githubRepo" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableIsHotfix

func (_u *DevBuildUpdate) SetNillableIsHotfix(v *bool) *DevBuildUpdate

SetNillableIsHotfix sets the "isHotfix" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableIsPushGCR

func (_u *DevBuildUpdate) SetNillableIsPushGCR(v *bool) *DevBuildUpdate

SetNillableIsPushGCR sets the "isPushGCR" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableNotificationState

func (_u *DevBuildUpdate) SetNillableNotificationState(v *schema.NotificationState) *DevBuildUpdate

SetNillableNotificationState sets the "notificationState" field if the given value is not nil.

func (*DevBuildUpdate) SetNillablePipelineBuildID

func (_u *DevBuildUpdate) SetNillablePipelineBuildID(v *int) *DevBuildUpdate

SetNillablePipelineBuildID sets the "pipelineBuildID" field if the given value is not nil.

func (*DevBuildUpdate) SetNillablePipelineEndAt

func (_u *DevBuildUpdate) SetNillablePipelineEndAt(v *time.Time) *DevBuildUpdate

SetNillablePipelineEndAt sets the "pipelineEndAt" field if the given value is not nil.

func (*DevBuildUpdate) SetNillablePipelineEngine

func (_u *DevBuildUpdate) SetNillablePipelineEngine(v *string) *DevBuildUpdate

SetNillablePipelineEngine sets the "pipelineEngine" field if the given value is not nil.

func (*DevBuildUpdate) SetNillablePipelineStartAt

func (_u *DevBuildUpdate) SetNillablePipelineStartAt(v *time.Time) *DevBuildUpdate

SetNillablePipelineStartAt sets the "pipelineStartAt" field if the given value is not nil.

func (*DevBuildUpdate) SetNillablePlatform

func (_u *DevBuildUpdate) SetNillablePlatform(v *string) *DevBuildUpdate

SetNillablePlatform sets the "platform" field if the given value is not nil.

func (*DevBuildUpdate) SetNillablePluginGitRef

func (_u *DevBuildUpdate) SetNillablePluginGitRef(v *string) *DevBuildUpdate

SetNillablePluginGitRef sets the "pluginGitRef" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableProduct

func (_u *DevBuildUpdate) SetNillableProduct(v *string) *DevBuildUpdate

SetNillableProduct sets the "product" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableProductBaseImg

func (_u *DevBuildUpdate) SetNillableProductBaseImg(v *string) *DevBuildUpdate

SetNillableProductBaseImg sets the "productBaseImg" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableProductDockerfile

func (_u *DevBuildUpdate) SetNillableProductDockerfile(v *string) *DevBuildUpdate

SetNillableProductDockerfile sets the "productDockerfile" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableStatus

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

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

func (*DevBuildUpdate) SetNillableTargetImg

func (_u *DevBuildUpdate) SetNillableTargetImg(v *string) *DevBuildUpdate

SetNillableTargetImg sets the "targetImg" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableTektonStatus

func (_u *DevBuildUpdate) SetNillableTektonStatus(v *schema.TektonStatus) *DevBuildUpdate

SetNillableTektonStatus sets the "tektonStatus" field if the given value is not nil.

func (*DevBuildUpdate) SetNillableVersion

func (_u *DevBuildUpdate) SetNillableVersion(v *string) *DevBuildUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*DevBuildUpdate) SetNotificationState

func (_u *DevBuildUpdate) SetNotificationState(v schema.NotificationState) *DevBuildUpdate

SetNotificationState sets the "notificationState" field.

func (*DevBuildUpdate) SetPipelineBuildID

func (_u *DevBuildUpdate) SetPipelineBuildID(v int) *DevBuildUpdate

SetPipelineBuildID sets the "pipelineBuildID" field.

func (*DevBuildUpdate) SetPipelineEndAt

func (_u *DevBuildUpdate) SetPipelineEndAt(v time.Time) *DevBuildUpdate

SetPipelineEndAt sets the "pipelineEndAt" field.

func (*DevBuildUpdate) SetPipelineEngine

func (_u *DevBuildUpdate) SetPipelineEngine(v string) *DevBuildUpdate

SetPipelineEngine sets the "pipelineEngine" field.

func (*DevBuildUpdate) SetPipelineStartAt

func (_u *DevBuildUpdate) SetPipelineStartAt(v time.Time) *DevBuildUpdate

SetPipelineStartAt sets the "pipelineStartAt" field.

func (*DevBuildUpdate) SetPlatform

func (_u *DevBuildUpdate) SetPlatform(v string) *DevBuildUpdate

SetPlatform sets the "platform" field.

func (*DevBuildUpdate) SetPluginGitRef

func (_u *DevBuildUpdate) SetPluginGitRef(v string) *DevBuildUpdate

SetPluginGitRef sets the "pluginGitRef" field.

func (*DevBuildUpdate) SetProduct

func (_u *DevBuildUpdate) SetProduct(v string) *DevBuildUpdate

SetProduct sets the "product" field.

func (*DevBuildUpdate) SetProductBaseImg

func (_u *DevBuildUpdate) SetProductBaseImg(v string) *DevBuildUpdate

SetProductBaseImg sets the "productBaseImg" field.

func (*DevBuildUpdate) SetProductDockerfile

func (_u *DevBuildUpdate) SetProductDockerfile(v string) *DevBuildUpdate

SetProductDockerfile sets the "productDockerfile" field.

func (*DevBuildUpdate) SetStatus

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

SetStatus sets the "status" field.

func (*DevBuildUpdate) SetTargetImg

func (_u *DevBuildUpdate) SetTargetImg(v string) *DevBuildUpdate

SetTargetImg sets the "targetImg" field.

func (*DevBuildUpdate) SetTektonStatus

func (_u *DevBuildUpdate) SetTektonStatus(v schema.TektonStatus) *DevBuildUpdate

SetTektonStatus sets the "tektonStatus" field.

func (*DevBuildUpdate) SetUpdatedAt

func (_u *DevBuildUpdate) SetUpdatedAt(v time.Time) *DevBuildUpdate

SetUpdatedAt sets the "updatedAt" field.

func (*DevBuildUpdate) SetVersion

func (_u *DevBuildUpdate) SetVersion(v string) *DevBuildUpdate

SetVersion sets the "version" field.

func (*DevBuildUpdate) Where

func (_u *DevBuildUpdate) Where(ps ...predicate.DevBuild) *DevBuildUpdate

Where appends a list predicates to the DevBuildUpdate builder.

type DevBuildUpdateOne

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

DevBuildUpdateOne is the builder for updating a single DevBuild entity.

func (*DevBuildUpdateOne) AddPipelineBuildID

func (_u *DevBuildUpdateOne) AddPipelineBuildID(v int) *DevBuildUpdateOne

AddPipelineBuildID adds value to the "pipelineBuildID" field.

func (*DevBuildUpdateOne) ClearBuildEnv

func (_u *DevBuildUpdateOne) ClearBuildEnv() *DevBuildUpdateOne

ClearBuildEnv clears the value of the "buildEnv" field.

func (*DevBuildUpdateOne) ClearBuildReport

func (_u *DevBuildUpdateOne) ClearBuildReport() *DevBuildUpdateOne

ClearBuildReport clears the value of the "buildReport" field.

func (*DevBuildUpdateOne) ClearBuilderImg

func (_u *DevBuildUpdateOne) ClearBuilderImg() *DevBuildUpdateOne

ClearBuilderImg clears the value of the "builderImg" field.

func (*DevBuildUpdateOne) ClearCreatedBy

func (_u *DevBuildUpdateOne) ClearCreatedBy() *DevBuildUpdateOne

ClearCreatedBy clears the value of the "createdBy" field.

func (*DevBuildUpdateOne) ClearEdition

func (_u *DevBuildUpdateOne) ClearEdition() *DevBuildUpdateOne

ClearEdition clears the value of the "edition" field.

func (*DevBuildUpdateOne) ClearErrMsg

func (_u *DevBuildUpdateOne) ClearErrMsg() *DevBuildUpdateOne

ClearErrMsg clears the value of the "errMsg" field.

func (*DevBuildUpdateOne) ClearFeatures

func (_u *DevBuildUpdateOne) ClearFeatures() *DevBuildUpdateOne

ClearFeatures clears the value of the "features" field.

func (*DevBuildUpdateOne) ClearGitHash

func (_u *DevBuildUpdateOne) ClearGitHash() *DevBuildUpdateOne

ClearGitHash clears the value of the "gitHash" field.

func (*DevBuildUpdateOne) ClearGitRef

func (_u *DevBuildUpdateOne) ClearGitRef() *DevBuildUpdateOne

ClearGitRef clears the value of the "gitRef" field.

func (*DevBuildUpdateOne) ClearGithubRepo

func (_u *DevBuildUpdateOne) ClearGithubRepo() *DevBuildUpdateOne

ClearGithubRepo clears the value of the "githubRepo" field.

func (*DevBuildUpdateOne) ClearIsPushGCR

func (_u *DevBuildUpdateOne) ClearIsPushGCR() *DevBuildUpdateOne

ClearIsPushGCR clears the value of the "isPushGCR" field.

func (*DevBuildUpdateOne) ClearNotificationState

func (_u *DevBuildUpdateOne) ClearNotificationState() *DevBuildUpdateOne

ClearNotificationState clears the value of the "notificationState" field.

func (*DevBuildUpdateOne) ClearPipelineBuildID

func (_u *DevBuildUpdateOne) ClearPipelineBuildID() *DevBuildUpdateOne

ClearPipelineBuildID clears the value of the "pipelineBuildID" field.

func (*DevBuildUpdateOne) ClearPipelineEndAt

func (_u *DevBuildUpdateOne) ClearPipelineEndAt() *DevBuildUpdateOne

ClearPipelineEndAt clears the value of the "pipelineEndAt" field.

func (*DevBuildUpdateOne) ClearPipelineEngine

func (_u *DevBuildUpdateOne) ClearPipelineEngine() *DevBuildUpdateOne

ClearPipelineEngine clears the value of the "pipelineEngine" field.

func (*DevBuildUpdateOne) ClearPipelineStartAt

func (_u *DevBuildUpdateOne) ClearPipelineStartAt() *DevBuildUpdateOne

ClearPipelineStartAt clears the value of the "pipelineStartAt" field.

func (*DevBuildUpdateOne) ClearPlatform

func (_u *DevBuildUpdateOne) ClearPlatform() *DevBuildUpdateOne

ClearPlatform clears the value of the "platform" field.

func (*DevBuildUpdateOne) ClearPluginGitRef

func (_u *DevBuildUpdateOne) ClearPluginGitRef() *DevBuildUpdateOne

ClearPluginGitRef clears the value of the "pluginGitRef" field.

func (*DevBuildUpdateOne) ClearProduct

func (_u *DevBuildUpdateOne) ClearProduct() *DevBuildUpdateOne

ClearProduct clears the value of the "product" field.

func (*DevBuildUpdateOne) ClearProductBaseImg

func (_u *DevBuildUpdateOne) ClearProductBaseImg() *DevBuildUpdateOne

ClearProductBaseImg clears the value of the "productBaseImg" field.

func (*DevBuildUpdateOne) ClearProductDockerfile

func (_u *DevBuildUpdateOne) ClearProductDockerfile() *DevBuildUpdateOne

ClearProductDockerfile clears the value of the "productDockerfile" field.

func (*DevBuildUpdateOne) ClearStatus

func (_u *DevBuildUpdateOne) ClearStatus() *DevBuildUpdateOne

ClearStatus clears the value of the "status" field.

func (*DevBuildUpdateOne) ClearTargetImg

func (_u *DevBuildUpdateOne) ClearTargetImg() *DevBuildUpdateOne

ClearTargetImg clears the value of the "targetImg" field.

func (*DevBuildUpdateOne) ClearTektonStatus

func (_u *DevBuildUpdateOne) ClearTektonStatus() *DevBuildUpdateOne

ClearTektonStatus clears the value of the "tektonStatus" field.

func (*DevBuildUpdateOne) ClearVersion

func (_u *DevBuildUpdateOne) ClearVersion() *DevBuildUpdateOne

ClearVersion clears the value of the "version" field.

func (*DevBuildUpdateOne) Exec

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

Exec executes the query on the entity.

func (*DevBuildUpdateOne) ExecX

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

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

func (*DevBuildUpdateOne) Mutation

func (_u *DevBuildUpdateOne) Mutation() *DevBuildMutation

Mutation returns the DevBuildMutation object of the builder.

func (*DevBuildUpdateOne) Save

func (_u *DevBuildUpdateOne) Save(ctx context.Context) (*DevBuild, error)

Save executes the query and returns the updated DevBuild entity.

func (*DevBuildUpdateOne) SaveX

func (_u *DevBuildUpdateOne) SaveX(ctx context.Context) *DevBuild

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

func (*DevBuildUpdateOne) Select

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

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

func (*DevBuildUpdateOne) SetBuildEnv

func (_u *DevBuildUpdateOne) SetBuildEnv(v string) *DevBuildUpdateOne

SetBuildEnv sets the "buildEnv" field.

func (*DevBuildUpdateOne) SetBuildReport

func (_u *DevBuildUpdateOne) SetBuildReport(v schema.BuildReport) *DevBuildUpdateOne

SetBuildReport sets the "buildReport" field.

func (*DevBuildUpdateOne) SetBuilderImg

func (_u *DevBuildUpdateOne) SetBuilderImg(v string) *DevBuildUpdateOne

SetBuilderImg sets the "builderImg" field.

func (*DevBuildUpdateOne) SetCreatedAt

func (_u *DevBuildUpdateOne) SetCreatedAt(v time.Time) *DevBuildUpdateOne

SetCreatedAt sets the "createdAt" field.

func (*DevBuildUpdateOne) SetCreatedBy

func (_u *DevBuildUpdateOne) SetCreatedBy(v string) *DevBuildUpdateOne

SetCreatedBy sets the "createdBy" field.

func (*DevBuildUpdateOne) SetEdition

func (_u *DevBuildUpdateOne) SetEdition(v string) *DevBuildUpdateOne

SetEdition sets the "edition" field.

func (*DevBuildUpdateOne) SetErrMsg

func (_u *DevBuildUpdateOne) SetErrMsg(v string) *DevBuildUpdateOne

SetErrMsg sets the "errMsg" field.

func (*DevBuildUpdateOne) SetFeatures

func (_u *DevBuildUpdateOne) SetFeatures(v string) *DevBuildUpdateOne

SetFeatures sets the "features" field.

func (*DevBuildUpdateOne) SetGitHash

func (_u *DevBuildUpdateOne) SetGitHash(v string) *DevBuildUpdateOne

SetGitHash sets the "gitHash" field.

func (*DevBuildUpdateOne) SetGitRef

func (_u *DevBuildUpdateOne) SetGitRef(v string) *DevBuildUpdateOne

SetGitRef sets the "gitRef" field.

func (*DevBuildUpdateOne) SetGithubRepo

func (_u *DevBuildUpdateOne) SetGithubRepo(v string) *DevBuildUpdateOne

SetGithubRepo sets the "githubRepo" field.

func (*DevBuildUpdateOne) SetIsHotfix

func (_u *DevBuildUpdateOne) SetIsHotfix(v bool) *DevBuildUpdateOne

SetIsHotfix sets the "isHotfix" field.

func (*DevBuildUpdateOne) SetIsPushGCR

func (_u *DevBuildUpdateOne) SetIsPushGCR(v bool) *DevBuildUpdateOne

SetIsPushGCR sets the "isPushGCR" field.

func (*DevBuildUpdateOne) SetNillableBuildEnv

func (_u *DevBuildUpdateOne) SetNillableBuildEnv(v *string) *DevBuildUpdateOne

SetNillableBuildEnv sets the "buildEnv" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableBuildReport

func (_u *DevBuildUpdateOne) SetNillableBuildReport(v *schema.BuildReport) *DevBuildUpdateOne

SetNillableBuildReport sets the "buildReport" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableBuilderImg

func (_u *DevBuildUpdateOne) SetNillableBuilderImg(v *string) *DevBuildUpdateOne

SetNillableBuilderImg sets the "builderImg" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableCreatedAt

func (_u *DevBuildUpdateOne) SetNillableCreatedAt(v *time.Time) *DevBuildUpdateOne

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

func (*DevBuildUpdateOne) SetNillableCreatedBy

func (_u *DevBuildUpdateOne) SetNillableCreatedBy(v *string) *DevBuildUpdateOne

SetNillableCreatedBy sets the "createdBy" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableEdition

func (_u *DevBuildUpdateOne) SetNillableEdition(v *string) *DevBuildUpdateOne

SetNillableEdition sets the "edition" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableErrMsg

func (_u *DevBuildUpdateOne) SetNillableErrMsg(v *string) *DevBuildUpdateOne

SetNillableErrMsg sets the "errMsg" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableFeatures

func (_u *DevBuildUpdateOne) SetNillableFeatures(v *string) *DevBuildUpdateOne

SetNillableFeatures sets the "features" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableGitHash

func (_u *DevBuildUpdateOne) SetNillableGitHash(v *string) *DevBuildUpdateOne

SetNillableGitHash sets the "gitHash" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableGitRef

func (_u *DevBuildUpdateOne) SetNillableGitRef(v *string) *DevBuildUpdateOne

SetNillableGitRef sets the "gitRef" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableGithubRepo

func (_u *DevBuildUpdateOne) SetNillableGithubRepo(v *string) *DevBuildUpdateOne

SetNillableGithubRepo sets the "githubRepo" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableIsHotfix

func (_u *DevBuildUpdateOne) SetNillableIsHotfix(v *bool) *DevBuildUpdateOne

SetNillableIsHotfix sets the "isHotfix" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableIsPushGCR

func (_u *DevBuildUpdateOne) SetNillableIsPushGCR(v *bool) *DevBuildUpdateOne

SetNillableIsPushGCR sets the "isPushGCR" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableNotificationState

func (_u *DevBuildUpdateOne) SetNillableNotificationState(v *schema.NotificationState) *DevBuildUpdateOne

SetNillableNotificationState sets the "notificationState" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillablePipelineBuildID

func (_u *DevBuildUpdateOne) SetNillablePipelineBuildID(v *int) *DevBuildUpdateOne

SetNillablePipelineBuildID sets the "pipelineBuildID" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillablePipelineEndAt

func (_u *DevBuildUpdateOne) SetNillablePipelineEndAt(v *time.Time) *DevBuildUpdateOne

SetNillablePipelineEndAt sets the "pipelineEndAt" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillablePipelineEngine

func (_u *DevBuildUpdateOne) SetNillablePipelineEngine(v *string) *DevBuildUpdateOne

SetNillablePipelineEngine sets the "pipelineEngine" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillablePipelineStartAt

func (_u *DevBuildUpdateOne) SetNillablePipelineStartAt(v *time.Time) *DevBuildUpdateOne

SetNillablePipelineStartAt sets the "pipelineStartAt" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillablePlatform

func (_u *DevBuildUpdateOne) SetNillablePlatform(v *string) *DevBuildUpdateOne

SetNillablePlatform sets the "platform" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillablePluginGitRef

func (_u *DevBuildUpdateOne) SetNillablePluginGitRef(v *string) *DevBuildUpdateOne

SetNillablePluginGitRef sets the "pluginGitRef" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableProduct

func (_u *DevBuildUpdateOne) SetNillableProduct(v *string) *DevBuildUpdateOne

SetNillableProduct sets the "product" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableProductBaseImg

func (_u *DevBuildUpdateOne) SetNillableProductBaseImg(v *string) *DevBuildUpdateOne

SetNillableProductBaseImg sets the "productBaseImg" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableProductDockerfile

func (_u *DevBuildUpdateOne) SetNillableProductDockerfile(v *string) *DevBuildUpdateOne

SetNillableProductDockerfile sets the "productDockerfile" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableStatus

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

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

func (*DevBuildUpdateOne) SetNillableTargetImg

func (_u *DevBuildUpdateOne) SetNillableTargetImg(v *string) *DevBuildUpdateOne

SetNillableTargetImg sets the "targetImg" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableTektonStatus

func (_u *DevBuildUpdateOne) SetNillableTektonStatus(v *schema.TektonStatus) *DevBuildUpdateOne

SetNillableTektonStatus sets the "tektonStatus" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNillableVersion

func (_u *DevBuildUpdateOne) SetNillableVersion(v *string) *DevBuildUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*DevBuildUpdateOne) SetNotificationState

func (_u *DevBuildUpdateOne) SetNotificationState(v schema.NotificationState) *DevBuildUpdateOne

SetNotificationState sets the "notificationState" field.

func (*DevBuildUpdateOne) SetPipelineBuildID

func (_u *DevBuildUpdateOne) SetPipelineBuildID(v int) *DevBuildUpdateOne

SetPipelineBuildID sets the "pipelineBuildID" field.

func (*DevBuildUpdateOne) SetPipelineEndAt

func (_u *DevBuildUpdateOne) SetPipelineEndAt(v time.Time) *DevBuildUpdateOne

SetPipelineEndAt sets the "pipelineEndAt" field.

func (*DevBuildUpdateOne) SetPipelineEngine

func (_u *DevBuildUpdateOne) SetPipelineEngine(v string) *DevBuildUpdateOne

SetPipelineEngine sets the "pipelineEngine" field.

func (*DevBuildUpdateOne) SetPipelineStartAt

func (_u *DevBuildUpdateOne) SetPipelineStartAt(v time.Time) *DevBuildUpdateOne

SetPipelineStartAt sets the "pipelineStartAt" field.

func (*DevBuildUpdateOne) SetPlatform

func (_u *DevBuildUpdateOne) SetPlatform(v string) *DevBuildUpdateOne

SetPlatform sets the "platform" field.

func (*DevBuildUpdateOne) SetPluginGitRef

func (_u *DevBuildUpdateOne) SetPluginGitRef(v string) *DevBuildUpdateOne

SetPluginGitRef sets the "pluginGitRef" field.

func (*DevBuildUpdateOne) SetProduct

func (_u *DevBuildUpdateOne) SetProduct(v string) *DevBuildUpdateOne

SetProduct sets the "product" field.

func (*DevBuildUpdateOne) SetProductBaseImg

func (_u *DevBuildUpdateOne) SetProductBaseImg(v string) *DevBuildUpdateOne

SetProductBaseImg sets the "productBaseImg" field.

func (*DevBuildUpdateOne) SetProductDockerfile

func (_u *DevBuildUpdateOne) SetProductDockerfile(v string) *DevBuildUpdateOne

SetProductDockerfile sets the "productDockerfile" field.

func (*DevBuildUpdateOne) SetStatus

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

SetStatus sets the "status" field.

func (*DevBuildUpdateOne) SetTargetImg

func (_u *DevBuildUpdateOne) SetTargetImg(v string) *DevBuildUpdateOne

SetTargetImg sets the "targetImg" field.

func (*DevBuildUpdateOne) SetTektonStatus

func (_u *DevBuildUpdateOne) SetTektonStatus(v schema.TektonStatus) *DevBuildUpdateOne

SetTektonStatus sets the "tektonStatus" field.

func (*DevBuildUpdateOne) SetUpdatedAt

func (_u *DevBuildUpdateOne) SetUpdatedAt(v time.Time) *DevBuildUpdateOne

SetUpdatedAt sets the "updatedAt" field.

func (*DevBuildUpdateOne) SetVersion

func (_u *DevBuildUpdateOne) SetVersion(v string) *DevBuildUpdateOne

SetVersion sets the "version" field.

func (*DevBuildUpdateOne) Where

Where appends a list predicates to the DevBuildUpdate builder.

type DevBuilds

type DevBuilds []*DevBuild

DevBuilds is a parsable slice of DevBuild.

type Hook

type Hook = ent.Hook

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

type ImageSyncTask

type ImageSyncTask struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Source image reference
	Source string `json:"source,omitempty"`
	// Target image reference
	Target string `json:"target,omitempty"`
	// Task status: PENDING, PROCESSING, SUCCEEDED, FAILED
	Status string `json:"status,omitempty"`
	// Error message when the task failed
	ErrMsg string `json:"errMsg,omitempty"`
	// Number of times the task has been retried
	RetryCount int `json:"retryCount,omitempty"`
	// Target key (registry host) used for worker sharding
	TargetKey string `json:"targetKey,omitempty"`
	// Worker identity currently holding the lease
	ClaimedBy string `json:"claimedBy,omitempty"`
	// Lease expiry; expired PROCESSING rows are reclaimed by the reaper
	LeaseUntil time.Time `json:"leaseUntil,omitempty"`
	// Earliest time the task may be claimed again after a failure
	AvailableAt time.Time `json:"availableAt,omitempty"`
	// Claim attempts, incremented atomically on claim
	Attempts int `json:"attempts,omitempty"`
	// Time when the task was created
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// Time when the task was last updated
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

ImageSyncTask is the model entity for the ImageSyncTask schema.

func (*ImageSyncTask) String

func (_m *ImageSyncTask) String() string

String implements the fmt.Stringer.

func (*ImageSyncTask) Unwrap

func (_m *ImageSyncTask) Unwrap() *ImageSyncTask

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

func (_m *ImageSyncTask) Update() *ImageSyncTaskUpdateOne

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

func (*ImageSyncTask) Value

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

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

type ImageSyncTaskClient

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

ImageSyncTaskClient is a client for the ImageSyncTask schema.

func NewImageSyncTaskClient

func NewImageSyncTaskClient(c config) *ImageSyncTaskClient

NewImageSyncTaskClient returns a client for the ImageSyncTask from the given config.

func (*ImageSyncTaskClient) Create

Create returns a builder for creating a ImageSyncTask entity.

func (*ImageSyncTaskClient) CreateBulk

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

func (*ImageSyncTaskClient) Delete

Delete returns a delete builder for ImageSyncTask.

func (*ImageSyncTaskClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ImageSyncTaskClient) DeleteOneID

func (c *ImageSyncTaskClient) DeleteOneID(id int) *ImageSyncTaskDeleteOne

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

func (*ImageSyncTaskClient) Get

Get returns a ImageSyncTask entity by its id.

func (*ImageSyncTaskClient) GetX

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

func (*ImageSyncTaskClient) Hooks

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

Hooks returns the client hooks.

func (*ImageSyncTaskClient) Intercept

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

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

func (*ImageSyncTaskClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ImageSyncTaskClient) MapCreateBulk

func (c *ImageSyncTaskClient) MapCreateBulk(slice any, setFunc func(*ImageSyncTaskCreate, int)) *ImageSyncTaskCreateBulk

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

Query returns a query builder for ImageSyncTask.

func (*ImageSyncTaskClient) Update

Update returns an update builder for ImageSyncTask.

func (*ImageSyncTaskClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ImageSyncTaskClient) UpdateOneID

func (c *ImageSyncTaskClient) UpdateOneID(id int) *ImageSyncTaskUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ImageSyncTaskClient) Use

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

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

type ImageSyncTaskCreate

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

ImageSyncTaskCreate is the builder for creating a ImageSyncTask entity.

func (*ImageSyncTaskCreate) Exec

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

Exec executes the query.

func (*ImageSyncTaskCreate) ExecX

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

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

func (*ImageSyncTaskCreate) Mutation

Mutation returns the ImageSyncTaskMutation object of the builder.

func (*ImageSyncTaskCreate) Save

Save creates the ImageSyncTask in the database.

func (*ImageSyncTaskCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ImageSyncTaskCreate) SetAttempts

func (_c *ImageSyncTaskCreate) SetAttempts(v int) *ImageSyncTaskCreate

SetAttempts sets the "attempts" field.

func (*ImageSyncTaskCreate) SetAvailableAt

func (_c *ImageSyncTaskCreate) SetAvailableAt(v time.Time) *ImageSyncTaskCreate

SetAvailableAt sets the "availableAt" field.

func (*ImageSyncTaskCreate) SetClaimedBy

func (_c *ImageSyncTaskCreate) SetClaimedBy(v string) *ImageSyncTaskCreate

SetClaimedBy sets the "claimedBy" field.

func (*ImageSyncTaskCreate) SetCreatedAt

func (_c *ImageSyncTaskCreate) SetCreatedAt(v time.Time) *ImageSyncTaskCreate

SetCreatedAt sets the "createdAt" field.

func (*ImageSyncTaskCreate) SetErrMsg

SetErrMsg sets the "errMsg" field.

func (*ImageSyncTaskCreate) SetLeaseUntil

func (_c *ImageSyncTaskCreate) SetLeaseUntil(v time.Time) *ImageSyncTaskCreate

SetLeaseUntil sets the "leaseUntil" field.

func (*ImageSyncTaskCreate) SetNillableAttempts

func (_c *ImageSyncTaskCreate) SetNillableAttempts(v *int) *ImageSyncTaskCreate

SetNillableAttempts sets the "attempts" field if the given value is not nil.

func (*ImageSyncTaskCreate) SetNillableAvailableAt

func (_c *ImageSyncTaskCreate) SetNillableAvailableAt(v *time.Time) *ImageSyncTaskCreate

SetNillableAvailableAt sets the "availableAt" field if the given value is not nil.

func (*ImageSyncTaskCreate) SetNillableClaimedBy

func (_c *ImageSyncTaskCreate) SetNillableClaimedBy(v *string) *ImageSyncTaskCreate

SetNillableClaimedBy sets the "claimedBy" field if the given value is not nil.

func (*ImageSyncTaskCreate) SetNillableCreatedAt

func (_c *ImageSyncTaskCreate) SetNillableCreatedAt(v *time.Time) *ImageSyncTaskCreate

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

func (*ImageSyncTaskCreate) SetNillableErrMsg

func (_c *ImageSyncTaskCreate) SetNillableErrMsg(v *string) *ImageSyncTaskCreate

SetNillableErrMsg sets the "errMsg" field if the given value is not nil.

func (*ImageSyncTaskCreate) SetNillableLeaseUntil

func (_c *ImageSyncTaskCreate) SetNillableLeaseUntil(v *time.Time) *ImageSyncTaskCreate

SetNillableLeaseUntil sets the "leaseUntil" field if the given value is not nil.

func (*ImageSyncTaskCreate) SetNillableRetryCount

func (_c *ImageSyncTaskCreate) SetNillableRetryCount(v *int) *ImageSyncTaskCreate

SetNillableRetryCount sets the "retryCount" field if the given value is not nil.

func (*ImageSyncTaskCreate) SetNillableStatus

func (_c *ImageSyncTaskCreate) SetNillableStatus(v *string) *ImageSyncTaskCreate

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

func (*ImageSyncTaskCreate) SetNillableTargetKey

func (_c *ImageSyncTaskCreate) SetNillableTargetKey(v *string) *ImageSyncTaskCreate

SetNillableTargetKey sets the "targetKey" field if the given value is not nil.

func (*ImageSyncTaskCreate) SetNillableUpdatedAt

func (_c *ImageSyncTaskCreate) SetNillableUpdatedAt(v *time.Time) *ImageSyncTaskCreate

SetNillableUpdatedAt sets the "updatedAt" field if the given value is not nil.

func (*ImageSyncTaskCreate) SetRetryCount

func (_c *ImageSyncTaskCreate) SetRetryCount(v int) *ImageSyncTaskCreate

SetRetryCount sets the "retryCount" field.

func (*ImageSyncTaskCreate) SetSource

SetSource sets the "source" field.

func (*ImageSyncTaskCreate) SetStatus

SetStatus sets the "status" field.

func (*ImageSyncTaskCreate) SetTarget

SetTarget sets the "target" field.

func (*ImageSyncTaskCreate) SetTargetKey

func (_c *ImageSyncTaskCreate) SetTargetKey(v string) *ImageSyncTaskCreate

SetTargetKey sets the "targetKey" field.

func (*ImageSyncTaskCreate) SetUpdatedAt

func (_c *ImageSyncTaskCreate) SetUpdatedAt(v time.Time) *ImageSyncTaskCreate

SetUpdatedAt sets the "updatedAt" field.

type ImageSyncTaskCreateBulk

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

ImageSyncTaskCreateBulk is the builder for creating many ImageSyncTask entities in bulk.

func (*ImageSyncTaskCreateBulk) Exec

Exec executes the query.

func (*ImageSyncTaskCreateBulk) ExecX

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

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

func (*ImageSyncTaskCreateBulk) Save

Save creates the ImageSyncTask entities in the database.

func (*ImageSyncTaskCreateBulk) SaveX

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

type ImageSyncTaskDelete

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

ImageSyncTaskDelete is the builder for deleting a ImageSyncTask entity.

func (*ImageSyncTaskDelete) Exec

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

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

func (*ImageSyncTaskDelete) ExecX

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

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

func (*ImageSyncTaskDelete) Where

Where appends a list predicates to the ImageSyncTaskDelete builder.

type ImageSyncTaskDeleteOne

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

ImageSyncTaskDeleteOne is the builder for deleting a single ImageSyncTask entity.

func (*ImageSyncTaskDeleteOne) Exec

Exec executes the deletion query.

func (*ImageSyncTaskDeleteOne) ExecX

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

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

func (*ImageSyncTaskDeleteOne) Where

Where appends a list predicates to the ImageSyncTaskDelete builder.

type ImageSyncTaskGroupBy

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

ImageSyncTaskGroupBy is the group-by builder for ImageSyncTask entities.

func (*ImageSyncTaskGroupBy) Aggregate

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

func (*ImageSyncTaskGroupBy) Bool

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

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

func (*ImageSyncTaskGroupBy) BoolX

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

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

func (*ImageSyncTaskGroupBy) Bools

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

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

func (*ImageSyncTaskGroupBy) BoolsX

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

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

func (*ImageSyncTaskGroupBy) Float64

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

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

func (*ImageSyncTaskGroupBy) Float64X

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

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

func (*ImageSyncTaskGroupBy) Float64s

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

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

func (*ImageSyncTaskGroupBy) Float64sX

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

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

func (*ImageSyncTaskGroupBy) Int

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

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

func (*ImageSyncTaskGroupBy) IntX

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

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

func (*ImageSyncTaskGroupBy) Ints

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

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

func (*ImageSyncTaskGroupBy) IntsX

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

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

func (*ImageSyncTaskGroupBy) Scan

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

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

func (*ImageSyncTaskGroupBy) ScanX

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

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

func (*ImageSyncTaskGroupBy) String

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

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

func (*ImageSyncTaskGroupBy) StringX

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

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

func (*ImageSyncTaskGroupBy) Strings

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

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

func (*ImageSyncTaskGroupBy) StringsX

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

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

type ImageSyncTaskMutation

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

ImageSyncTaskMutation represents an operation that mutates the ImageSyncTask nodes in the graph.

func (*ImageSyncTaskMutation) AddAttempts

func (m *ImageSyncTaskMutation) AddAttempts(i int)

AddAttempts adds i to the "attempts" field.

func (*ImageSyncTaskMutation) AddField

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) AddRetryCount

func (m *ImageSyncTaskMutation) AddRetryCount(i int)

AddRetryCount adds i to the "retryCount" field.

func (*ImageSyncTaskMutation) AddedAttempts

func (m *ImageSyncTaskMutation) AddedAttempts() (r int, exists bool)

AddedAttempts returns the value that was added to the "attempts" field in this mutation.

func (*ImageSyncTaskMutation) AddedEdges

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

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

func (*ImageSyncTaskMutation) AddedField

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

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

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

func (*ImageSyncTaskMutation) AddedIDs

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

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

func (*ImageSyncTaskMutation) AddedRetryCount

func (m *ImageSyncTaskMutation) AddedRetryCount() (r int, exists bool)

AddedRetryCount returns the value that was added to the "retryCount" field in this mutation.

func (*ImageSyncTaskMutation) Attempts

func (m *ImageSyncTaskMutation) Attempts() (r int, exists bool)

Attempts returns the value of the "attempts" field in the mutation.

func (*ImageSyncTaskMutation) AvailableAt

func (m *ImageSyncTaskMutation) AvailableAt() (r time.Time, exists bool)

AvailableAt returns the value of the "availableAt" field in the mutation.

func (*ImageSyncTaskMutation) AvailableAtCleared

func (m *ImageSyncTaskMutation) AvailableAtCleared() bool

AvailableAtCleared returns if the "availableAt" field was cleared in this mutation.

func (*ImageSyncTaskMutation) ClaimedBy

func (m *ImageSyncTaskMutation) ClaimedBy() (r string, exists bool)

ClaimedBy returns the value of the "claimedBy" field in the mutation.

func (*ImageSyncTaskMutation) ClaimedByCleared

func (m *ImageSyncTaskMutation) ClaimedByCleared() bool

ClaimedByCleared returns if the "claimedBy" field was cleared in this mutation.

func (*ImageSyncTaskMutation) ClearAvailableAt

func (m *ImageSyncTaskMutation) ClearAvailableAt()

ClearAvailableAt clears the value of the "availableAt" field.

func (*ImageSyncTaskMutation) ClearClaimedBy

func (m *ImageSyncTaskMutation) ClearClaimedBy()

ClearClaimedBy clears the value of the "claimedBy" field.

func (*ImageSyncTaskMutation) ClearEdge

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) ClearErrMsg

func (m *ImageSyncTaskMutation) ClearErrMsg()

ClearErrMsg clears the value of the "errMsg" field.

func (*ImageSyncTaskMutation) ClearField

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) ClearLeaseUntil

func (m *ImageSyncTaskMutation) ClearLeaseUntil()

ClearLeaseUntil clears the value of the "leaseUntil" field.

func (*ImageSyncTaskMutation) ClearTargetKey

func (m *ImageSyncTaskMutation) ClearTargetKey()

ClearTargetKey clears the value of the "targetKey" field.

func (*ImageSyncTaskMutation) ClearedEdges

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

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

func (*ImageSyncTaskMutation) ClearedFields

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

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

func (ImageSyncTaskMutation) Client

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

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

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

func (*ImageSyncTaskMutation) EdgeCleared

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

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

func (*ImageSyncTaskMutation) ErrMsg

func (m *ImageSyncTaskMutation) ErrMsg() (r string, exists bool)

ErrMsg returns the value of the "errMsg" field in the mutation.

func (*ImageSyncTaskMutation) ErrMsgCleared

func (m *ImageSyncTaskMutation) ErrMsgCleared() bool

ErrMsgCleared returns if the "errMsg" field was cleared in this mutation.

func (*ImageSyncTaskMutation) Field

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

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

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

func (*ImageSyncTaskMutation) Fields

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

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) IDs

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) LeaseUntil

func (m *ImageSyncTaskMutation) LeaseUntil() (r time.Time, exists bool)

LeaseUntil returns the value of the "leaseUntil" field in the mutation.

func (*ImageSyncTaskMutation) LeaseUntilCleared

func (m *ImageSyncTaskMutation) LeaseUntilCleared() bool

LeaseUntilCleared returns if the "leaseUntil" field was cleared in this mutation.

func (*ImageSyncTaskMutation) OldAttempts

func (m *ImageSyncTaskMutation) OldAttempts(ctx context.Context) (v int, err error)

OldAttempts returns the old "attempts" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldAvailableAt

func (m *ImageSyncTaskMutation) OldAvailableAt(ctx context.Context) (v time.Time, err error)

OldAvailableAt returns the old "availableAt" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldClaimedBy

func (m *ImageSyncTaskMutation) OldClaimedBy(ctx context.Context) (v string, err error)

OldClaimedBy returns the old "claimedBy" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldCreatedAt

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

OldCreatedAt returns the old "createdAt" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldErrMsg

func (m *ImageSyncTaskMutation) OldErrMsg(ctx context.Context) (v string, err error)

OldErrMsg returns the old "errMsg" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldField

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) OldLeaseUntil

func (m *ImageSyncTaskMutation) OldLeaseUntil(ctx context.Context) (v time.Time, err error)

OldLeaseUntil returns the old "leaseUntil" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldRetryCount

func (m *ImageSyncTaskMutation) OldRetryCount(ctx context.Context) (v int, err error)

OldRetryCount returns the old "retryCount" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldSource

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

OldSource returns the old "source" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldStatus

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

OldStatus returns the old "status" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldTarget

func (m *ImageSyncTaskMutation) OldTarget(ctx context.Context) (v string, err error)

OldTarget returns the old "target" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldTargetKey

func (m *ImageSyncTaskMutation) OldTargetKey(ctx context.Context) (v string, err error)

OldTargetKey returns the old "targetKey" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) OldUpdatedAt

func (m *ImageSyncTaskMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updatedAt" field's value of the ImageSyncTask entity. If the ImageSyncTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImageSyncTaskMutation) Op

func (m *ImageSyncTaskMutation) Op() Op

Op returns the operation name.

func (*ImageSyncTaskMutation) RemovedEdges

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

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

func (*ImageSyncTaskMutation) RemovedIDs

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) ResetAttempts

func (m *ImageSyncTaskMutation) ResetAttempts()

ResetAttempts resets all changes to the "attempts" field.

func (*ImageSyncTaskMutation) ResetAvailableAt

func (m *ImageSyncTaskMutation) ResetAvailableAt()

ResetAvailableAt resets all changes to the "availableAt" field.

func (*ImageSyncTaskMutation) ResetClaimedBy

func (m *ImageSyncTaskMutation) ResetClaimedBy()

ResetClaimedBy resets all changes to the "claimedBy" field.

func (*ImageSyncTaskMutation) ResetCreatedAt

func (m *ImageSyncTaskMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "createdAt" field.

func (*ImageSyncTaskMutation) ResetEdge

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) ResetErrMsg

func (m *ImageSyncTaskMutation) ResetErrMsg()

ResetErrMsg resets all changes to the "errMsg" field.

func (*ImageSyncTaskMutation) ResetField

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) ResetLeaseUntil

func (m *ImageSyncTaskMutation) ResetLeaseUntil()

ResetLeaseUntil resets all changes to the "leaseUntil" field.

func (*ImageSyncTaskMutation) ResetRetryCount

func (m *ImageSyncTaskMutation) ResetRetryCount()

ResetRetryCount resets all changes to the "retryCount" field.

func (*ImageSyncTaskMutation) ResetSource

func (m *ImageSyncTaskMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*ImageSyncTaskMutation) ResetStatus

func (m *ImageSyncTaskMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ImageSyncTaskMutation) ResetTarget

func (m *ImageSyncTaskMutation) ResetTarget()

ResetTarget resets all changes to the "target" field.

func (*ImageSyncTaskMutation) ResetTargetKey

func (m *ImageSyncTaskMutation) ResetTargetKey()

ResetTargetKey resets all changes to the "targetKey" field.

func (*ImageSyncTaskMutation) ResetUpdatedAt

func (m *ImageSyncTaskMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updatedAt" field.

func (*ImageSyncTaskMutation) RetryCount

func (m *ImageSyncTaskMutation) RetryCount() (r int, exists bool)

RetryCount returns the value of the "retryCount" field in the mutation.

func (*ImageSyncTaskMutation) SetAttempts

func (m *ImageSyncTaskMutation) SetAttempts(i int)

SetAttempts sets the "attempts" field.

func (*ImageSyncTaskMutation) SetAvailableAt

func (m *ImageSyncTaskMutation) SetAvailableAt(t time.Time)

SetAvailableAt sets the "availableAt" field.

func (*ImageSyncTaskMutation) SetClaimedBy

func (m *ImageSyncTaskMutation) SetClaimedBy(s string)

SetClaimedBy sets the "claimedBy" field.

func (*ImageSyncTaskMutation) SetCreatedAt

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

SetCreatedAt sets the "createdAt" field.

func (*ImageSyncTaskMutation) SetErrMsg

func (m *ImageSyncTaskMutation) SetErrMsg(s string)

SetErrMsg sets the "errMsg" field.

func (*ImageSyncTaskMutation) SetField

func (m *ImageSyncTaskMutation) 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 (*ImageSyncTaskMutation) SetLeaseUntil

func (m *ImageSyncTaskMutation) SetLeaseUntil(t time.Time)

SetLeaseUntil sets the "leaseUntil" field.

func (*ImageSyncTaskMutation) SetOp

func (m *ImageSyncTaskMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ImageSyncTaskMutation) SetRetryCount

func (m *ImageSyncTaskMutation) SetRetryCount(i int)

SetRetryCount sets the "retryCount" field.

func (*ImageSyncTaskMutation) SetSource

func (m *ImageSyncTaskMutation) SetSource(s string)

SetSource sets the "source" field.

func (*ImageSyncTaskMutation) SetStatus

func (m *ImageSyncTaskMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*ImageSyncTaskMutation) SetTarget

func (m *ImageSyncTaskMutation) SetTarget(s string)

SetTarget sets the "target" field.

func (*ImageSyncTaskMutation) SetTargetKey

func (m *ImageSyncTaskMutation) SetTargetKey(s string)

SetTargetKey sets the "targetKey" field.

func (*ImageSyncTaskMutation) SetUpdatedAt

func (m *ImageSyncTaskMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updatedAt" field.

func (*ImageSyncTaskMutation) Source

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

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

func (*ImageSyncTaskMutation) Status

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

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

func (*ImageSyncTaskMutation) Target

func (m *ImageSyncTaskMutation) Target() (r string, exists bool)

Target returns the value of the "target" field in the mutation.

func (*ImageSyncTaskMutation) TargetKey

func (m *ImageSyncTaskMutation) TargetKey() (r string, exists bool)

TargetKey returns the value of the "targetKey" field in the mutation.

func (*ImageSyncTaskMutation) TargetKeyCleared

func (m *ImageSyncTaskMutation) TargetKeyCleared() bool

TargetKeyCleared returns if the "targetKey" field was cleared in this mutation.

func (ImageSyncTaskMutation) Tx

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

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

func (*ImageSyncTaskMutation) Type

func (m *ImageSyncTaskMutation) Type() string

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

func (*ImageSyncTaskMutation) UpdatedAt

func (m *ImageSyncTaskMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updatedAt" field in the mutation.

func (*ImageSyncTaskMutation) Where

Where appends a list predicates to the ImageSyncTaskMutation builder.

func (*ImageSyncTaskMutation) WhereP

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

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

type ImageSyncTaskQuery

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

ImageSyncTaskQuery is the builder for querying ImageSyncTask entities.

func (*ImageSyncTaskQuery) Aggregate

func (_q *ImageSyncTaskQuery) Aggregate(fns ...AggregateFunc) *ImageSyncTaskSelect

Aggregate returns a ImageSyncTaskSelect configured with the given aggregations.

func (*ImageSyncTaskQuery) All

All executes the query and returns a list of ImageSyncTasks.

func (*ImageSyncTaskQuery) AllX

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

func (*ImageSyncTaskQuery) Clone

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

func (*ImageSyncTaskQuery) Count

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

Count returns the count of the given query.

func (*ImageSyncTaskQuery) CountX

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

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

func (*ImageSyncTaskQuery) Exist

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

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

func (*ImageSyncTaskQuery) ExistX

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

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

func (*ImageSyncTaskQuery) First

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

func (*ImageSyncTaskQuery) FirstID

func (_q *ImageSyncTaskQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ImageSyncTaskQuery) FirstIDX

func (_q *ImageSyncTaskQuery) FirstIDX(ctx context.Context) int

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

func (*ImageSyncTaskQuery) FirstX

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

func (*ImageSyncTaskQuery) GroupBy

func (_q *ImageSyncTaskQuery) GroupBy(field string, fields ...string) *ImageSyncTaskGroupBy

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

client.ImageSyncTask.Query().
	GroupBy(imagesynctask.FieldSource).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ImageSyncTaskQuery) IDs

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

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

func (*ImageSyncTaskQuery) IDsX

func (_q *ImageSyncTaskQuery) IDsX(ctx context.Context) []int

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

func (*ImageSyncTaskQuery) Limit

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

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

func (*ImageSyncTaskQuery) Offset

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

Offset to start from.

func (*ImageSyncTaskQuery) Only

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

func (*ImageSyncTaskQuery) OnlyID

func (_q *ImageSyncTaskQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ImageSyncTaskQuery) OnlyIDX

func (_q *ImageSyncTaskQuery) OnlyIDX(ctx context.Context) int

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

func (*ImageSyncTaskQuery) OnlyX

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

func (*ImageSyncTaskQuery) Order

Order specifies how the records should be ordered.

func (*ImageSyncTaskQuery) Select

func (_q *ImageSyncTaskQuery) Select(fields ...string) *ImageSyncTaskSelect

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

client.ImageSyncTask.Query().
	Select(imagesynctask.FieldSource).
	Scan(ctx, &v)

func (*ImageSyncTaskQuery) Unique

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

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

Where adds a new predicate for the ImageSyncTaskQuery builder.

type ImageSyncTaskSelect

type ImageSyncTaskSelect struct {
	*ImageSyncTaskQuery
	// contains filtered or unexported fields
}

ImageSyncTaskSelect is the builder for selecting fields of ImageSyncTask entities.

func (*ImageSyncTaskSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*ImageSyncTaskSelect) Bool

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

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

func (*ImageSyncTaskSelect) BoolX

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

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

func (*ImageSyncTaskSelect) Bools

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

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

func (*ImageSyncTaskSelect) BoolsX

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

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

func (*ImageSyncTaskSelect) Float64

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

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

func (*ImageSyncTaskSelect) Float64X

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

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

func (*ImageSyncTaskSelect) Float64s

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

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

func (*ImageSyncTaskSelect) Float64sX

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

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

func (*ImageSyncTaskSelect) Int

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

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

func (*ImageSyncTaskSelect) IntX

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

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

func (*ImageSyncTaskSelect) Ints

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

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

func (*ImageSyncTaskSelect) IntsX

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

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

func (*ImageSyncTaskSelect) Scan

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

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

func (*ImageSyncTaskSelect) ScanX

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

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

func (*ImageSyncTaskSelect) String

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

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

func (*ImageSyncTaskSelect) StringX

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

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

func (*ImageSyncTaskSelect) Strings

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

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

func (*ImageSyncTaskSelect) StringsX

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

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

type ImageSyncTaskUpdate

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

ImageSyncTaskUpdate is the builder for updating ImageSyncTask entities.

func (*ImageSyncTaskUpdate) AddAttempts

func (_u *ImageSyncTaskUpdate) AddAttempts(v int) *ImageSyncTaskUpdate

AddAttempts adds value to the "attempts" field.

func (*ImageSyncTaskUpdate) AddRetryCount

func (_u *ImageSyncTaskUpdate) AddRetryCount(v int) *ImageSyncTaskUpdate

AddRetryCount adds value to the "retryCount" field.

func (*ImageSyncTaskUpdate) ClearAvailableAt

func (_u *ImageSyncTaskUpdate) ClearAvailableAt() *ImageSyncTaskUpdate

ClearAvailableAt clears the value of the "availableAt" field.

func (*ImageSyncTaskUpdate) ClearClaimedBy

func (_u *ImageSyncTaskUpdate) ClearClaimedBy() *ImageSyncTaskUpdate

ClearClaimedBy clears the value of the "claimedBy" field.

func (*ImageSyncTaskUpdate) ClearErrMsg

func (_u *ImageSyncTaskUpdate) ClearErrMsg() *ImageSyncTaskUpdate

ClearErrMsg clears the value of the "errMsg" field.

func (*ImageSyncTaskUpdate) ClearLeaseUntil

func (_u *ImageSyncTaskUpdate) ClearLeaseUntil() *ImageSyncTaskUpdate

ClearLeaseUntil clears the value of the "leaseUntil" field.

func (*ImageSyncTaskUpdate) ClearTargetKey

func (_u *ImageSyncTaskUpdate) ClearTargetKey() *ImageSyncTaskUpdate

ClearTargetKey clears the value of the "targetKey" field.

func (*ImageSyncTaskUpdate) Exec

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

Exec executes the query.

func (*ImageSyncTaskUpdate) ExecX

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

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

func (*ImageSyncTaskUpdate) Mutation

Mutation returns the ImageSyncTaskMutation object of the builder.

func (*ImageSyncTaskUpdate) Save

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

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

func (*ImageSyncTaskUpdate) SaveX

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

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

func (*ImageSyncTaskUpdate) SetAttempts

func (_u *ImageSyncTaskUpdate) SetAttempts(v int) *ImageSyncTaskUpdate

SetAttempts sets the "attempts" field.

func (*ImageSyncTaskUpdate) SetAvailableAt

func (_u *ImageSyncTaskUpdate) SetAvailableAt(v time.Time) *ImageSyncTaskUpdate

SetAvailableAt sets the "availableAt" field.

func (*ImageSyncTaskUpdate) SetClaimedBy

func (_u *ImageSyncTaskUpdate) SetClaimedBy(v string) *ImageSyncTaskUpdate

SetClaimedBy sets the "claimedBy" field.

func (*ImageSyncTaskUpdate) SetCreatedAt

func (_u *ImageSyncTaskUpdate) SetCreatedAt(v time.Time) *ImageSyncTaskUpdate

SetCreatedAt sets the "createdAt" field.

func (*ImageSyncTaskUpdate) SetErrMsg

SetErrMsg sets the "errMsg" field.

func (*ImageSyncTaskUpdate) SetLeaseUntil

func (_u *ImageSyncTaskUpdate) SetLeaseUntil(v time.Time) *ImageSyncTaskUpdate

SetLeaseUntil sets the "leaseUntil" field.

func (*ImageSyncTaskUpdate) SetNillableAttempts

func (_u *ImageSyncTaskUpdate) SetNillableAttempts(v *int) *ImageSyncTaskUpdate

SetNillableAttempts sets the "attempts" field if the given value is not nil.

func (*ImageSyncTaskUpdate) SetNillableAvailableAt

func (_u *ImageSyncTaskUpdate) SetNillableAvailableAt(v *time.Time) *ImageSyncTaskUpdate

SetNillableAvailableAt sets the "availableAt" field if the given value is not nil.

func (*ImageSyncTaskUpdate) SetNillableClaimedBy

func (_u *ImageSyncTaskUpdate) SetNillableClaimedBy(v *string) *ImageSyncTaskUpdate

SetNillableClaimedBy sets the "claimedBy" field if the given value is not nil.

func (*ImageSyncTaskUpdate) SetNillableCreatedAt

func (_u *ImageSyncTaskUpdate) SetNillableCreatedAt(v *time.Time) *ImageSyncTaskUpdate

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

func (*ImageSyncTaskUpdate) SetNillableErrMsg

func (_u *ImageSyncTaskUpdate) SetNillableErrMsg(v *string) *ImageSyncTaskUpdate

SetNillableErrMsg sets the "errMsg" field if the given value is not nil.

func (*ImageSyncTaskUpdate) SetNillableLeaseUntil

func (_u *ImageSyncTaskUpdate) SetNillableLeaseUntil(v *time.Time) *ImageSyncTaskUpdate

SetNillableLeaseUntil sets the "leaseUntil" field if the given value is not nil.

func (*ImageSyncTaskUpdate) SetNillableRetryCount

func (_u *ImageSyncTaskUpdate) SetNillableRetryCount(v *int) *ImageSyncTaskUpdate

SetNillableRetryCount sets the "retryCount" field if the given value is not nil.

func (*ImageSyncTaskUpdate) SetNillableSource

func (_u *ImageSyncTaskUpdate) SetNillableSource(v *string) *ImageSyncTaskUpdate

SetNillableSource sets the "source" field if the given value is not nil.

func (*ImageSyncTaskUpdate) SetNillableStatus

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

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

func (*ImageSyncTaskUpdate) SetNillableTarget

func (_u *ImageSyncTaskUpdate) SetNillableTarget(v *string) *ImageSyncTaskUpdate

SetNillableTarget sets the "target" field if the given value is not nil.

func (*ImageSyncTaskUpdate) SetNillableTargetKey

func (_u *ImageSyncTaskUpdate) SetNillableTargetKey(v *string) *ImageSyncTaskUpdate

SetNillableTargetKey sets the "targetKey" field if the given value is not nil.

func (*ImageSyncTaskUpdate) SetRetryCount

func (_u *ImageSyncTaskUpdate) SetRetryCount(v int) *ImageSyncTaskUpdate

SetRetryCount sets the "retryCount" field.

func (*ImageSyncTaskUpdate) SetSource

SetSource sets the "source" field.

func (*ImageSyncTaskUpdate) SetStatus

SetStatus sets the "status" field.

func (*ImageSyncTaskUpdate) SetTarget

SetTarget sets the "target" field.

func (*ImageSyncTaskUpdate) SetTargetKey

func (_u *ImageSyncTaskUpdate) SetTargetKey(v string) *ImageSyncTaskUpdate

SetTargetKey sets the "targetKey" field.

func (*ImageSyncTaskUpdate) SetUpdatedAt

func (_u *ImageSyncTaskUpdate) SetUpdatedAt(v time.Time) *ImageSyncTaskUpdate

SetUpdatedAt sets the "updatedAt" field.

func (*ImageSyncTaskUpdate) Where

Where appends a list predicates to the ImageSyncTaskUpdate builder.

type ImageSyncTaskUpdateOne

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

ImageSyncTaskUpdateOne is the builder for updating a single ImageSyncTask entity.

func (*ImageSyncTaskUpdateOne) AddAttempts

AddAttempts adds value to the "attempts" field.

func (*ImageSyncTaskUpdateOne) AddRetryCount

func (_u *ImageSyncTaskUpdateOne) AddRetryCount(v int) *ImageSyncTaskUpdateOne

AddRetryCount adds value to the "retryCount" field.

func (*ImageSyncTaskUpdateOne) ClearAvailableAt

func (_u *ImageSyncTaskUpdateOne) ClearAvailableAt() *ImageSyncTaskUpdateOne

ClearAvailableAt clears the value of the "availableAt" field.

func (*ImageSyncTaskUpdateOne) ClearClaimedBy

func (_u *ImageSyncTaskUpdateOne) ClearClaimedBy() *ImageSyncTaskUpdateOne

ClearClaimedBy clears the value of the "claimedBy" field.

func (*ImageSyncTaskUpdateOne) ClearErrMsg

ClearErrMsg clears the value of the "errMsg" field.

func (*ImageSyncTaskUpdateOne) ClearLeaseUntil

func (_u *ImageSyncTaskUpdateOne) ClearLeaseUntil() *ImageSyncTaskUpdateOne

ClearLeaseUntil clears the value of the "leaseUntil" field.

func (*ImageSyncTaskUpdateOne) ClearTargetKey

func (_u *ImageSyncTaskUpdateOne) ClearTargetKey() *ImageSyncTaskUpdateOne

ClearTargetKey clears the value of the "targetKey" field.

func (*ImageSyncTaskUpdateOne) Exec

Exec executes the query on the entity.

func (*ImageSyncTaskUpdateOne) ExecX

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

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

func (*ImageSyncTaskUpdateOne) Mutation

Mutation returns the ImageSyncTaskMutation object of the builder.

func (*ImageSyncTaskUpdateOne) Save

Save executes the query and returns the updated ImageSyncTask entity.

func (*ImageSyncTaskUpdateOne) SaveX

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

func (*ImageSyncTaskUpdateOne) Select

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

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

func (*ImageSyncTaskUpdateOne) SetAttempts

SetAttempts sets the "attempts" field.

func (*ImageSyncTaskUpdateOne) SetAvailableAt

func (_u *ImageSyncTaskUpdateOne) SetAvailableAt(v time.Time) *ImageSyncTaskUpdateOne

SetAvailableAt sets the "availableAt" field.

func (*ImageSyncTaskUpdateOne) SetClaimedBy

SetClaimedBy sets the "claimedBy" field.

func (*ImageSyncTaskUpdateOne) SetCreatedAt

SetCreatedAt sets the "createdAt" field.

func (*ImageSyncTaskUpdateOne) SetErrMsg

SetErrMsg sets the "errMsg" field.

func (*ImageSyncTaskUpdateOne) SetLeaseUntil

SetLeaseUntil sets the "leaseUntil" field.

func (*ImageSyncTaskUpdateOne) SetNillableAttempts

func (_u *ImageSyncTaskUpdateOne) SetNillableAttempts(v *int) *ImageSyncTaskUpdateOne

SetNillableAttempts sets the "attempts" field if the given value is not nil.

func (*ImageSyncTaskUpdateOne) SetNillableAvailableAt

func (_u *ImageSyncTaskUpdateOne) SetNillableAvailableAt(v *time.Time) *ImageSyncTaskUpdateOne

SetNillableAvailableAt sets the "availableAt" field if the given value is not nil.

func (*ImageSyncTaskUpdateOne) SetNillableClaimedBy

func (_u *ImageSyncTaskUpdateOne) SetNillableClaimedBy(v *string) *ImageSyncTaskUpdateOne

SetNillableClaimedBy sets the "claimedBy" field if the given value is not nil.

func (*ImageSyncTaskUpdateOne) SetNillableCreatedAt

func (_u *ImageSyncTaskUpdateOne) SetNillableCreatedAt(v *time.Time) *ImageSyncTaskUpdateOne

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

func (*ImageSyncTaskUpdateOne) SetNillableErrMsg

func (_u *ImageSyncTaskUpdateOne) SetNillableErrMsg(v *string) *ImageSyncTaskUpdateOne

SetNillableErrMsg sets the "errMsg" field if the given value is not nil.

func (*ImageSyncTaskUpdateOne) SetNillableLeaseUntil

func (_u *ImageSyncTaskUpdateOne) SetNillableLeaseUntil(v *time.Time) *ImageSyncTaskUpdateOne

SetNillableLeaseUntil sets the "leaseUntil" field if the given value is not nil.

func (*ImageSyncTaskUpdateOne) SetNillableRetryCount

func (_u *ImageSyncTaskUpdateOne) SetNillableRetryCount(v *int) *ImageSyncTaskUpdateOne

SetNillableRetryCount sets the "retryCount" field if the given value is not nil.

func (*ImageSyncTaskUpdateOne) SetNillableSource

func (_u *ImageSyncTaskUpdateOne) SetNillableSource(v *string) *ImageSyncTaskUpdateOne

SetNillableSource sets the "source" field if the given value is not nil.

func (*ImageSyncTaskUpdateOne) SetNillableStatus

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

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

func (*ImageSyncTaskUpdateOne) SetNillableTarget

func (_u *ImageSyncTaskUpdateOne) SetNillableTarget(v *string) *ImageSyncTaskUpdateOne

SetNillableTarget sets the "target" field if the given value is not nil.

func (*ImageSyncTaskUpdateOne) SetNillableTargetKey

func (_u *ImageSyncTaskUpdateOne) SetNillableTargetKey(v *string) *ImageSyncTaskUpdateOne

SetNillableTargetKey sets the "targetKey" field if the given value is not nil.

func (*ImageSyncTaskUpdateOne) SetRetryCount

func (_u *ImageSyncTaskUpdateOne) SetRetryCount(v int) *ImageSyncTaskUpdateOne

SetRetryCount sets the "retryCount" field.

func (*ImageSyncTaskUpdateOne) SetSource

SetSource sets the "source" field.

func (*ImageSyncTaskUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*ImageSyncTaskUpdateOne) SetTarget

SetTarget sets the "target" field.

func (*ImageSyncTaskUpdateOne) SetTargetKey

SetTargetKey sets the "targetKey" field.

func (*ImageSyncTaskUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updatedAt" field.

func (*ImageSyncTaskUpdateOne) Where

Where appends a list predicates to the ImageSyncTaskUpdate builder.

type ImageSyncTasks

type ImageSyncTasks []*ImageSyncTask

ImageSyncTasks is a parsable slice of ImageSyncTask.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

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

type Interceptor

type Interceptor = ent.Interceptor

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

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

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

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

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

type Policy

type Policy = ent.Policy

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

type PublishDesired

type PublishDesired struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Publish target: tiup-staging or tiup-prod
	Target string `json:"target,omitempty"`
	// TiUP package name, for example tidb or pd
	Pkg string `json:"pkg,omitempty"`
	// Package operating system: linux or darwin
	Os string `json:"os,omitempty"`
	// Package architecture: amd64 or arm64
	Arch string `json:"arch,omitempty"`
	// Version of the newest artifact pushed in the window
	DesiredVersion string `json:"desired_version,omitempty"`
	// Full execution parameters of the newest artifact
	DesiredPayload map[string]interface{} `json:"desired_payload,omitempty"`
	// When the newest artifact was pushed
	DesiredAt time.Time `json:"desired_at,omitempty"`
	// Earliest time the row may be published; aligned to the window anchor
	NextRunAt time.Time `json:"next_run_at,omitempty"`
	// Unit currently publishing this row; empty when idle
	RunningUnitID string `json:"running_unit_id,omitempty"`
	// Version of the last successful publication
	LastSucceededVersion string `json:"last_succeeded_version,omitempty"`
	// Version of the last failed publication
	LastFailedVersion string `json:"last_failed_version,omitempty"`
	// Last failure message
	LastError string `json:"last_error,omitempty"`
	// Time when the row was first created
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Time of the last upsert, claim or completion
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

PublishDesired is the model entity for the PublishDesired schema.

func (*PublishDesired) String

func (_m *PublishDesired) String() string

String implements the fmt.Stringer.

func (*PublishDesired) Unwrap

func (_m *PublishDesired) Unwrap() *PublishDesired

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

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

func (*PublishDesired) Value

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

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

type PublishDesiredClient

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

PublishDesiredClient is a client for the PublishDesired schema.

func NewPublishDesiredClient

func NewPublishDesiredClient(c config) *PublishDesiredClient

NewPublishDesiredClient returns a client for the PublishDesired from the given config.

func (*PublishDesiredClient) Create

Create returns a builder for creating a PublishDesired entity.

func (*PublishDesiredClient) CreateBulk

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

func (*PublishDesiredClient) Delete

Delete returns a delete builder for PublishDesired.

func (*PublishDesiredClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PublishDesiredClient) DeleteOneID

func (c *PublishDesiredClient) DeleteOneID(id int) *PublishDesiredDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PublishDesiredClient) Get

Get returns a PublishDesired entity by its id.

func (*PublishDesiredClient) GetX

GetX is like Get, but panics if an error occurs.

func (*PublishDesiredClient) Hooks

func (c *PublishDesiredClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PublishDesiredClient) Intercept

func (c *PublishDesiredClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `publishdesired.Intercept(f(g(h())))`.

func (*PublishDesiredClient) Interceptors

func (c *PublishDesiredClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PublishDesiredClient) MapCreateBulk

func (c *PublishDesiredClient) MapCreateBulk(slice any, setFunc func(*PublishDesiredCreate, int)) *PublishDesiredCreateBulk

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 (*PublishDesiredClient) Query

Query returns a query builder for PublishDesired.

func (*PublishDesiredClient) Update

Update returns an update builder for PublishDesired.

func (*PublishDesiredClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PublishDesiredClient) UpdateOneID

func (c *PublishDesiredClient) UpdateOneID(id int) *PublishDesiredUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PublishDesiredClient) Use

func (c *PublishDesiredClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `publishdesired.Hooks(f(g(h())))`.

type PublishDesiredCreate

type PublishDesiredCreate struct {
	// contains filtered or unexported fields
}

PublishDesiredCreate is the builder for creating a PublishDesired entity.

func (*PublishDesiredCreate) Exec

func (_c *PublishDesiredCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PublishDesiredCreate) ExecX

func (_c *PublishDesiredCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishDesiredCreate) Mutation

Mutation returns the PublishDesiredMutation object of the builder.

func (*PublishDesiredCreate) Save

Save creates the PublishDesired in the database.

func (*PublishDesiredCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*PublishDesiredCreate) SetArch

SetArch sets the "arch" field.

func (*PublishDesiredCreate) SetCreatedAt

func (_c *PublishDesiredCreate) SetCreatedAt(v time.Time) *PublishDesiredCreate

SetCreatedAt sets the "created_at" field.

func (*PublishDesiredCreate) SetDesiredAt

func (_c *PublishDesiredCreate) SetDesiredAt(v time.Time) *PublishDesiredCreate

SetDesiredAt sets the "desired_at" field.

func (*PublishDesiredCreate) SetDesiredPayload

func (_c *PublishDesiredCreate) SetDesiredPayload(v map[string]interface{}) *PublishDesiredCreate

SetDesiredPayload sets the "desired_payload" field.

func (*PublishDesiredCreate) SetDesiredVersion

func (_c *PublishDesiredCreate) SetDesiredVersion(v string) *PublishDesiredCreate

SetDesiredVersion sets the "desired_version" field.

func (*PublishDesiredCreate) SetLastError

func (_c *PublishDesiredCreate) SetLastError(v string) *PublishDesiredCreate

SetLastError sets the "last_error" field.

func (*PublishDesiredCreate) SetLastFailedVersion

func (_c *PublishDesiredCreate) SetLastFailedVersion(v string) *PublishDesiredCreate

SetLastFailedVersion sets the "last_failed_version" field.

func (*PublishDesiredCreate) SetLastSucceededVersion

func (_c *PublishDesiredCreate) SetLastSucceededVersion(v string) *PublishDesiredCreate

SetLastSucceededVersion sets the "last_succeeded_version" field.

func (*PublishDesiredCreate) SetNextRunAt

func (_c *PublishDesiredCreate) SetNextRunAt(v time.Time) *PublishDesiredCreate

SetNextRunAt sets the "next_run_at" field.

func (*PublishDesiredCreate) SetNillableCreatedAt

func (_c *PublishDesiredCreate) SetNillableCreatedAt(v *time.Time) *PublishDesiredCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishDesiredCreate) SetNillableLastError

func (_c *PublishDesiredCreate) SetNillableLastError(v *string) *PublishDesiredCreate

SetNillableLastError sets the "last_error" field if the given value is not nil.

func (*PublishDesiredCreate) SetNillableLastFailedVersion

func (_c *PublishDesiredCreate) SetNillableLastFailedVersion(v *string) *PublishDesiredCreate

SetNillableLastFailedVersion sets the "last_failed_version" field if the given value is not nil.

func (*PublishDesiredCreate) SetNillableLastSucceededVersion

func (_c *PublishDesiredCreate) SetNillableLastSucceededVersion(v *string) *PublishDesiredCreate

SetNillableLastSucceededVersion sets the "last_succeeded_version" field if the given value is not nil.

func (*PublishDesiredCreate) SetNillableRunningUnitID

func (_c *PublishDesiredCreate) SetNillableRunningUnitID(v *string) *PublishDesiredCreate

SetNillableRunningUnitID sets the "running_unit_id" field if the given value is not nil.

func (*PublishDesiredCreate) SetNillableUpdatedAt

func (_c *PublishDesiredCreate) SetNillableUpdatedAt(v *time.Time) *PublishDesiredCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PublishDesiredCreate) SetOs

SetOs sets the "os" field.

func (*PublishDesiredCreate) SetPkg

SetPkg sets the "pkg" field.

func (*PublishDesiredCreate) SetRunningUnitID

func (_c *PublishDesiredCreate) SetRunningUnitID(v string) *PublishDesiredCreate

SetRunningUnitID sets the "running_unit_id" field.

func (*PublishDesiredCreate) SetTarget

SetTarget sets the "target" field.

func (*PublishDesiredCreate) SetUpdatedAt

func (_c *PublishDesiredCreate) SetUpdatedAt(v time.Time) *PublishDesiredCreate

SetUpdatedAt sets the "updated_at" field.

type PublishDesiredCreateBulk

type PublishDesiredCreateBulk struct {
	// contains filtered or unexported fields
}

PublishDesiredCreateBulk is the builder for creating many PublishDesired entities in bulk.

func (*PublishDesiredCreateBulk) Exec

Exec executes the query.

func (*PublishDesiredCreateBulk) ExecX

func (_c *PublishDesiredCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishDesiredCreateBulk) Save

Save creates the PublishDesired entities in the database.

func (*PublishDesiredCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type PublishDesiredDelete

type PublishDesiredDelete struct {
	// contains filtered or unexported fields
}

PublishDesiredDelete is the builder for deleting a PublishDesired entity.

func (*PublishDesiredDelete) Exec

func (_d *PublishDesiredDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PublishDesiredDelete) ExecX

func (_d *PublishDesiredDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PublishDesiredDelete) Where

Where appends a list predicates to the PublishDesiredDelete builder.

type PublishDesiredDeleteOne

type PublishDesiredDeleteOne struct {
	// contains filtered or unexported fields
}

PublishDesiredDeleteOne is the builder for deleting a single PublishDesired entity.

func (*PublishDesiredDeleteOne) Exec

Exec executes the deletion query.

func (*PublishDesiredDeleteOne) ExecX

func (_d *PublishDesiredDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishDesiredDeleteOne) Where

Where appends a list predicates to the PublishDesiredDelete builder.

type PublishDesiredGroupBy

type PublishDesiredGroupBy struct {
	// contains filtered or unexported fields
}

PublishDesiredGroupBy is the group-by builder for PublishDesired entities.

func (*PublishDesiredGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*PublishDesiredGroupBy) Bool

func (s *PublishDesiredGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PublishDesiredGroupBy) BoolX

func (s *PublishDesiredGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PublishDesiredGroupBy) Bools

func (s *PublishDesiredGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PublishDesiredGroupBy) BoolsX

func (s *PublishDesiredGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PublishDesiredGroupBy) Float64

func (s *PublishDesiredGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PublishDesiredGroupBy) Float64X

func (s *PublishDesiredGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PublishDesiredGroupBy) Float64s

func (s *PublishDesiredGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PublishDesiredGroupBy) Float64sX

func (s *PublishDesiredGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PublishDesiredGroupBy) Int

func (s *PublishDesiredGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PublishDesiredGroupBy) IntX

func (s *PublishDesiredGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PublishDesiredGroupBy) Ints

func (s *PublishDesiredGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PublishDesiredGroupBy) IntsX

func (s *PublishDesiredGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PublishDesiredGroupBy) Scan

func (_g *PublishDesiredGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PublishDesiredGroupBy) ScanX

func (s *PublishDesiredGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PublishDesiredGroupBy) String

func (s *PublishDesiredGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PublishDesiredGroupBy) StringX

func (s *PublishDesiredGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PublishDesiredGroupBy) Strings

func (s *PublishDesiredGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PublishDesiredGroupBy) StringsX

func (s *PublishDesiredGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PublishDesiredMutation

type PublishDesiredMutation struct {
	// contains filtered or unexported fields
}

PublishDesiredMutation represents an operation that mutates the PublishDesired nodes in the graph.

func (*PublishDesiredMutation) AddField

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) AddedEdges

func (m *PublishDesiredMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PublishDesiredMutation) AddedField

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) AddedFields

func (m *PublishDesiredMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PublishDesiredMutation) AddedIDs

func (m *PublishDesiredMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PublishDesiredMutation) Arch

func (m *PublishDesiredMutation) Arch() (r string, exists bool)

Arch returns the value of the "arch" field in the mutation.

func (*PublishDesiredMutation) ClearEdge

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) ClearField

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) ClearLastError

func (m *PublishDesiredMutation) ClearLastError()

ClearLastError clears the value of the "last_error" field.

func (*PublishDesiredMutation) ClearLastFailedVersion

func (m *PublishDesiredMutation) ClearLastFailedVersion()

ClearLastFailedVersion clears the value of the "last_failed_version" field.

func (*PublishDesiredMutation) ClearLastSucceededVersion

func (m *PublishDesiredMutation) ClearLastSucceededVersion()

ClearLastSucceededVersion clears the value of the "last_succeeded_version" field.

func (*PublishDesiredMutation) ClearRunningUnitID

func (m *PublishDesiredMutation) ClearRunningUnitID()

ClearRunningUnitID clears the value of the "running_unit_id" field.

func (*PublishDesiredMutation) ClearedEdges

func (m *PublishDesiredMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PublishDesiredMutation) ClearedFields

func (m *PublishDesiredMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PublishDesiredMutation) Client

func (m PublishDesiredMutation) 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 (*PublishDesiredMutation) CreatedAt

func (m *PublishDesiredMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PublishDesiredMutation) DesiredAt

func (m *PublishDesiredMutation) DesiredAt() (r time.Time, exists bool)

DesiredAt returns the value of the "desired_at" field in the mutation.

func (*PublishDesiredMutation) DesiredPayload

func (m *PublishDesiredMutation) DesiredPayload() (r map[string]interface{}, exists bool)

DesiredPayload returns the value of the "desired_payload" field in the mutation.

func (*PublishDesiredMutation) DesiredVersion

func (m *PublishDesiredMutation) DesiredVersion() (r string, exists bool)

DesiredVersion returns the value of the "desired_version" field in the mutation.

func (*PublishDesiredMutation) EdgeCleared

func (m *PublishDesiredMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PublishDesiredMutation) Field

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) FieldCleared

func (m *PublishDesiredMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PublishDesiredMutation) Fields

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) ID

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) IDs

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) LastError

func (m *PublishDesiredMutation) LastError() (r string, exists bool)

LastError returns the value of the "last_error" field in the mutation.

func (*PublishDesiredMutation) LastErrorCleared

func (m *PublishDesiredMutation) LastErrorCleared() bool

LastErrorCleared returns if the "last_error" field was cleared in this mutation.

func (*PublishDesiredMutation) LastFailedVersion

func (m *PublishDesiredMutation) LastFailedVersion() (r string, exists bool)

LastFailedVersion returns the value of the "last_failed_version" field in the mutation.

func (*PublishDesiredMutation) LastFailedVersionCleared

func (m *PublishDesiredMutation) LastFailedVersionCleared() bool

LastFailedVersionCleared returns if the "last_failed_version" field was cleared in this mutation.

func (*PublishDesiredMutation) LastSucceededVersion

func (m *PublishDesiredMutation) LastSucceededVersion() (r string, exists bool)

LastSucceededVersion returns the value of the "last_succeeded_version" field in the mutation.

func (*PublishDesiredMutation) LastSucceededVersionCleared

func (m *PublishDesiredMutation) LastSucceededVersionCleared() bool

LastSucceededVersionCleared returns if the "last_succeeded_version" field was cleared in this mutation.

func (*PublishDesiredMutation) NextRunAt

func (m *PublishDesiredMutation) NextRunAt() (r time.Time, exists bool)

NextRunAt returns the value of the "next_run_at" field in the mutation.

func (*PublishDesiredMutation) OldArch

func (m *PublishDesiredMutation) OldArch(ctx context.Context) (v string, err error)

OldArch returns the old "arch" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldCreatedAt

func (m *PublishDesiredMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldDesiredAt

func (m *PublishDesiredMutation) OldDesiredAt(ctx context.Context) (v time.Time, err error)

OldDesiredAt returns the old "desired_at" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldDesiredPayload

func (m *PublishDesiredMutation) OldDesiredPayload(ctx context.Context) (v map[string]interface{}, err error)

OldDesiredPayload returns the old "desired_payload" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldDesiredVersion

func (m *PublishDesiredMutation) OldDesiredVersion(ctx context.Context) (v string, err error)

OldDesiredVersion returns the old "desired_version" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldField

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) OldLastError

func (m *PublishDesiredMutation) OldLastError(ctx context.Context) (v string, err error)

OldLastError returns the old "last_error" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldLastFailedVersion

func (m *PublishDesiredMutation) OldLastFailedVersion(ctx context.Context) (v string, err error)

OldLastFailedVersion returns the old "last_failed_version" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldLastSucceededVersion

func (m *PublishDesiredMutation) OldLastSucceededVersion(ctx context.Context) (v string, err error)

OldLastSucceededVersion returns the old "last_succeeded_version" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldNextRunAt

func (m *PublishDesiredMutation) OldNextRunAt(ctx context.Context) (v time.Time, err error)

OldNextRunAt returns the old "next_run_at" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldOs

func (m *PublishDesiredMutation) OldOs(ctx context.Context) (v string, err error)

OldOs returns the old "os" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldPkg

func (m *PublishDesiredMutation) OldPkg(ctx context.Context) (v string, err error)

OldPkg returns the old "pkg" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldRunningUnitID

func (m *PublishDesiredMutation) OldRunningUnitID(ctx context.Context) (v string, err error)

OldRunningUnitID returns the old "running_unit_id" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldTarget

func (m *PublishDesiredMutation) OldTarget(ctx context.Context) (v string, err error)

OldTarget returns the old "target" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) OldUpdatedAt

func (m *PublishDesiredMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the PublishDesired entity. If the PublishDesired object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishDesiredMutation) Op

func (m *PublishDesiredMutation) Op() Op

Op returns the operation name.

func (*PublishDesiredMutation) Os

func (m *PublishDesiredMutation) Os() (r string, exists bool)

Os returns the value of the "os" field in the mutation.

func (*PublishDesiredMutation) Pkg

func (m *PublishDesiredMutation) Pkg() (r string, exists bool)

Pkg returns the value of the "pkg" field in the mutation.

func (*PublishDesiredMutation) RemovedEdges

func (m *PublishDesiredMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PublishDesiredMutation) RemovedIDs

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) ResetArch

func (m *PublishDesiredMutation) ResetArch()

ResetArch resets all changes to the "arch" field.

func (*PublishDesiredMutation) ResetCreatedAt

func (m *PublishDesiredMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PublishDesiredMutation) ResetDesiredAt

func (m *PublishDesiredMutation) ResetDesiredAt()

ResetDesiredAt resets all changes to the "desired_at" field.

func (*PublishDesiredMutation) ResetDesiredPayload

func (m *PublishDesiredMutation) ResetDesiredPayload()

ResetDesiredPayload resets all changes to the "desired_payload" field.

func (*PublishDesiredMutation) ResetDesiredVersion

func (m *PublishDesiredMutation) ResetDesiredVersion()

ResetDesiredVersion resets all changes to the "desired_version" field.

func (*PublishDesiredMutation) ResetEdge

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) ResetField

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) ResetLastError

func (m *PublishDesiredMutation) ResetLastError()

ResetLastError resets all changes to the "last_error" field.

func (*PublishDesiredMutation) ResetLastFailedVersion

func (m *PublishDesiredMutation) ResetLastFailedVersion()

ResetLastFailedVersion resets all changes to the "last_failed_version" field.

func (*PublishDesiredMutation) ResetLastSucceededVersion

func (m *PublishDesiredMutation) ResetLastSucceededVersion()

ResetLastSucceededVersion resets all changes to the "last_succeeded_version" field.

func (*PublishDesiredMutation) ResetNextRunAt

func (m *PublishDesiredMutation) ResetNextRunAt()

ResetNextRunAt resets all changes to the "next_run_at" field.

func (*PublishDesiredMutation) ResetOs

func (m *PublishDesiredMutation) ResetOs()

ResetOs resets all changes to the "os" field.

func (*PublishDesiredMutation) ResetPkg

func (m *PublishDesiredMutation) ResetPkg()

ResetPkg resets all changes to the "pkg" field.

func (*PublishDesiredMutation) ResetRunningUnitID

func (m *PublishDesiredMutation) ResetRunningUnitID()

ResetRunningUnitID resets all changes to the "running_unit_id" field.

func (*PublishDesiredMutation) ResetTarget

func (m *PublishDesiredMutation) ResetTarget()

ResetTarget resets all changes to the "target" field.

func (*PublishDesiredMutation) ResetUpdatedAt

func (m *PublishDesiredMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PublishDesiredMutation) RunningUnitID

func (m *PublishDesiredMutation) RunningUnitID() (r string, exists bool)

RunningUnitID returns the value of the "running_unit_id" field in the mutation.

func (*PublishDesiredMutation) RunningUnitIDCleared

func (m *PublishDesiredMutation) RunningUnitIDCleared() bool

RunningUnitIDCleared returns if the "running_unit_id" field was cleared in this mutation.

func (*PublishDesiredMutation) SetArch

func (m *PublishDesiredMutation) SetArch(s string)

SetArch sets the "arch" field.

func (*PublishDesiredMutation) SetCreatedAt

func (m *PublishDesiredMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PublishDesiredMutation) SetDesiredAt

func (m *PublishDesiredMutation) SetDesiredAt(t time.Time)

SetDesiredAt sets the "desired_at" field.

func (*PublishDesiredMutation) SetDesiredPayload

func (m *PublishDesiredMutation) SetDesiredPayload(value map[string]interface{})

SetDesiredPayload sets the "desired_payload" field.

func (*PublishDesiredMutation) SetDesiredVersion

func (m *PublishDesiredMutation) SetDesiredVersion(s string)

SetDesiredVersion sets the "desired_version" field.

func (*PublishDesiredMutation) SetField

func (m *PublishDesiredMutation) 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 (*PublishDesiredMutation) SetLastError

func (m *PublishDesiredMutation) SetLastError(s string)

SetLastError sets the "last_error" field.

func (*PublishDesiredMutation) SetLastFailedVersion

func (m *PublishDesiredMutation) SetLastFailedVersion(s string)

SetLastFailedVersion sets the "last_failed_version" field.

func (*PublishDesiredMutation) SetLastSucceededVersion

func (m *PublishDesiredMutation) SetLastSucceededVersion(s string)

SetLastSucceededVersion sets the "last_succeeded_version" field.

func (*PublishDesiredMutation) SetNextRunAt

func (m *PublishDesiredMutation) SetNextRunAt(t time.Time)

SetNextRunAt sets the "next_run_at" field.

func (*PublishDesiredMutation) SetOp

func (m *PublishDesiredMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PublishDesiredMutation) SetOs

func (m *PublishDesiredMutation) SetOs(s string)

SetOs sets the "os" field.

func (*PublishDesiredMutation) SetPkg

func (m *PublishDesiredMutation) SetPkg(s string)

SetPkg sets the "pkg" field.

func (*PublishDesiredMutation) SetRunningUnitID

func (m *PublishDesiredMutation) SetRunningUnitID(s string)

SetRunningUnitID sets the "running_unit_id" field.

func (*PublishDesiredMutation) SetTarget

func (m *PublishDesiredMutation) SetTarget(s string)

SetTarget sets the "target" field.

func (*PublishDesiredMutation) SetUpdatedAt

func (m *PublishDesiredMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*PublishDesiredMutation) Target

func (m *PublishDesiredMutation) Target() (r string, exists bool)

Target returns the value of the "target" field in the mutation.

func (PublishDesiredMutation) Tx

func (m PublishDesiredMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PublishDesiredMutation) Type

func (m *PublishDesiredMutation) Type() string

Type returns the node type of this mutation (PublishDesired).

func (*PublishDesiredMutation) UpdatedAt

func (m *PublishDesiredMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PublishDesiredMutation) Where

Where appends a list predicates to the PublishDesiredMutation builder.

func (*PublishDesiredMutation) WhereP

func (m *PublishDesiredMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PublishDesiredMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PublishDesiredQuery

type PublishDesiredQuery struct {
	// contains filtered or unexported fields
}

PublishDesiredQuery is the builder for querying PublishDesired entities.

func (*PublishDesiredQuery) Aggregate

Aggregate returns a PublishDesiredSelect configured with the given aggregations.

func (*PublishDesiredQuery) All

All executes the query and returns a list of PublishDesireds.

func (*PublishDesiredQuery) AllX

AllX is like All, but panics if an error occurs.

func (*PublishDesiredQuery) Clone

Clone returns a duplicate of the PublishDesiredQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PublishDesiredQuery) Count

func (_q *PublishDesiredQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PublishDesiredQuery) CountX

func (_q *PublishDesiredQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PublishDesiredQuery) Exist

func (_q *PublishDesiredQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PublishDesiredQuery) ExistX

func (_q *PublishDesiredQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PublishDesiredQuery) First

First returns the first PublishDesired entity from the query. Returns a *NotFoundError when no PublishDesired was found.

func (*PublishDesiredQuery) FirstID

func (_q *PublishDesiredQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first PublishDesired ID from the query. Returns a *NotFoundError when no PublishDesired ID was found.

func (*PublishDesiredQuery) FirstIDX

func (_q *PublishDesiredQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*PublishDesiredQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*PublishDesiredQuery) GroupBy

func (_q *PublishDesiredQuery) GroupBy(field string, fields ...string) *PublishDesiredGroupBy

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 {
	Target string `json:"target,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PublishDesired.Query().
	GroupBy(publishdesired.FieldTarget).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PublishDesiredQuery) IDs

func (_q *PublishDesiredQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of PublishDesired IDs.

func (*PublishDesiredQuery) IDsX

func (_q *PublishDesiredQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*PublishDesiredQuery) Limit

func (_q *PublishDesiredQuery) Limit(limit int) *PublishDesiredQuery

Limit the number of records to be returned by this query.

func (*PublishDesiredQuery) Offset

func (_q *PublishDesiredQuery) Offset(offset int) *PublishDesiredQuery

Offset to start from.

func (*PublishDesiredQuery) Only

Only returns a single PublishDesired entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PublishDesired entity is found. Returns a *NotFoundError when no PublishDesired entities are found.

func (*PublishDesiredQuery) OnlyID

func (_q *PublishDesiredQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only PublishDesired ID in the query. Returns a *NotSingularError when more than one PublishDesired ID is found. Returns a *NotFoundError when no entities are found.

func (*PublishDesiredQuery) OnlyIDX

func (_q *PublishDesiredQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PublishDesiredQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*PublishDesiredQuery) Order

Order specifies how the records should be ordered.

func (*PublishDesiredQuery) Select

func (_q *PublishDesiredQuery) Select(fields ...string) *PublishDesiredSelect

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 {
	Target string `json:"target,omitempty"`
}

client.PublishDesired.Query().
	Select(publishdesired.FieldTarget).
	Scan(ctx, &v)

func (*PublishDesiredQuery) Unique

func (_q *PublishDesiredQuery) Unique(unique bool) *PublishDesiredQuery

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 (*PublishDesiredQuery) Where

Where adds a new predicate for the PublishDesiredQuery builder.

type PublishDesiredSelect

type PublishDesiredSelect struct {
	*PublishDesiredQuery
	// contains filtered or unexported fields
}

PublishDesiredSelect is the builder for selecting fields of PublishDesired entities.

func (*PublishDesiredSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*PublishDesiredSelect) Bool

func (s *PublishDesiredSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PublishDesiredSelect) BoolX

func (s *PublishDesiredSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PublishDesiredSelect) Bools

func (s *PublishDesiredSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PublishDesiredSelect) BoolsX

func (s *PublishDesiredSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PublishDesiredSelect) Float64

func (s *PublishDesiredSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PublishDesiredSelect) Float64X

func (s *PublishDesiredSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PublishDesiredSelect) Float64s

func (s *PublishDesiredSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PublishDesiredSelect) Float64sX

func (s *PublishDesiredSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PublishDesiredSelect) Int

func (s *PublishDesiredSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PublishDesiredSelect) IntX

func (s *PublishDesiredSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PublishDesiredSelect) Ints

func (s *PublishDesiredSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PublishDesiredSelect) IntsX

func (s *PublishDesiredSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PublishDesiredSelect) Scan

func (_s *PublishDesiredSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PublishDesiredSelect) ScanX

func (s *PublishDesiredSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PublishDesiredSelect) String

func (s *PublishDesiredSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PublishDesiredSelect) StringX

func (s *PublishDesiredSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PublishDesiredSelect) Strings

func (s *PublishDesiredSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PublishDesiredSelect) StringsX

func (s *PublishDesiredSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PublishDesiredUpdate

type PublishDesiredUpdate struct {
	// contains filtered or unexported fields
}

PublishDesiredUpdate is the builder for updating PublishDesired entities.

func (*PublishDesiredUpdate) ClearLastError

func (_u *PublishDesiredUpdate) ClearLastError() *PublishDesiredUpdate

ClearLastError clears the value of the "last_error" field.

func (*PublishDesiredUpdate) ClearLastFailedVersion

func (_u *PublishDesiredUpdate) ClearLastFailedVersion() *PublishDesiredUpdate

ClearLastFailedVersion clears the value of the "last_failed_version" field.

func (*PublishDesiredUpdate) ClearLastSucceededVersion

func (_u *PublishDesiredUpdate) ClearLastSucceededVersion() *PublishDesiredUpdate

ClearLastSucceededVersion clears the value of the "last_succeeded_version" field.

func (*PublishDesiredUpdate) ClearRunningUnitID

func (_u *PublishDesiredUpdate) ClearRunningUnitID() *PublishDesiredUpdate

ClearRunningUnitID clears the value of the "running_unit_id" field.

func (*PublishDesiredUpdate) Exec

func (_u *PublishDesiredUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PublishDesiredUpdate) ExecX

func (_u *PublishDesiredUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishDesiredUpdate) Mutation

Mutation returns the PublishDesiredMutation object of the builder.

func (*PublishDesiredUpdate) Save

func (_u *PublishDesiredUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PublishDesiredUpdate) SaveX

func (_u *PublishDesiredUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PublishDesiredUpdate) SetArch

SetArch sets the "arch" field.

func (*PublishDesiredUpdate) SetCreatedAt

func (_u *PublishDesiredUpdate) SetCreatedAt(v time.Time) *PublishDesiredUpdate

SetCreatedAt sets the "created_at" field.

func (*PublishDesiredUpdate) SetDesiredAt

func (_u *PublishDesiredUpdate) SetDesiredAt(v time.Time) *PublishDesiredUpdate

SetDesiredAt sets the "desired_at" field.

func (*PublishDesiredUpdate) SetDesiredPayload

func (_u *PublishDesiredUpdate) SetDesiredPayload(v map[string]interface{}) *PublishDesiredUpdate

SetDesiredPayload sets the "desired_payload" field.

func (*PublishDesiredUpdate) SetDesiredVersion

func (_u *PublishDesiredUpdate) SetDesiredVersion(v string) *PublishDesiredUpdate

SetDesiredVersion sets the "desired_version" field.

func (*PublishDesiredUpdate) SetLastError

func (_u *PublishDesiredUpdate) SetLastError(v string) *PublishDesiredUpdate

SetLastError sets the "last_error" field.

func (*PublishDesiredUpdate) SetLastFailedVersion

func (_u *PublishDesiredUpdate) SetLastFailedVersion(v string) *PublishDesiredUpdate

SetLastFailedVersion sets the "last_failed_version" field.

func (*PublishDesiredUpdate) SetLastSucceededVersion

func (_u *PublishDesiredUpdate) SetLastSucceededVersion(v string) *PublishDesiredUpdate

SetLastSucceededVersion sets the "last_succeeded_version" field.

func (*PublishDesiredUpdate) SetNextRunAt

func (_u *PublishDesiredUpdate) SetNextRunAt(v time.Time) *PublishDesiredUpdate

SetNextRunAt sets the "next_run_at" field.

func (*PublishDesiredUpdate) SetNillableArch

func (_u *PublishDesiredUpdate) SetNillableArch(v *string) *PublishDesiredUpdate

SetNillableArch sets the "arch" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableCreatedAt

func (_u *PublishDesiredUpdate) SetNillableCreatedAt(v *time.Time) *PublishDesiredUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableDesiredAt

func (_u *PublishDesiredUpdate) SetNillableDesiredAt(v *time.Time) *PublishDesiredUpdate

SetNillableDesiredAt sets the "desired_at" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableDesiredVersion

func (_u *PublishDesiredUpdate) SetNillableDesiredVersion(v *string) *PublishDesiredUpdate

SetNillableDesiredVersion sets the "desired_version" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableLastError

func (_u *PublishDesiredUpdate) SetNillableLastError(v *string) *PublishDesiredUpdate

SetNillableLastError sets the "last_error" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableLastFailedVersion

func (_u *PublishDesiredUpdate) SetNillableLastFailedVersion(v *string) *PublishDesiredUpdate

SetNillableLastFailedVersion sets the "last_failed_version" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableLastSucceededVersion

func (_u *PublishDesiredUpdate) SetNillableLastSucceededVersion(v *string) *PublishDesiredUpdate

SetNillableLastSucceededVersion sets the "last_succeeded_version" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableNextRunAt

func (_u *PublishDesiredUpdate) SetNillableNextRunAt(v *time.Time) *PublishDesiredUpdate

SetNillableNextRunAt sets the "next_run_at" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableOs

func (_u *PublishDesiredUpdate) SetNillableOs(v *string) *PublishDesiredUpdate

SetNillableOs sets the "os" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillablePkg

func (_u *PublishDesiredUpdate) SetNillablePkg(v *string) *PublishDesiredUpdate

SetNillablePkg sets the "pkg" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableRunningUnitID

func (_u *PublishDesiredUpdate) SetNillableRunningUnitID(v *string) *PublishDesiredUpdate

SetNillableRunningUnitID sets the "running_unit_id" field if the given value is not nil.

func (*PublishDesiredUpdate) SetNillableTarget

func (_u *PublishDesiredUpdate) SetNillableTarget(v *string) *PublishDesiredUpdate

SetNillableTarget sets the "target" field if the given value is not nil.

func (*PublishDesiredUpdate) SetOs

SetOs sets the "os" field.

func (*PublishDesiredUpdate) SetPkg

SetPkg sets the "pkg" field.

func (*PublishDesiredUpdate) SetRunningUnitID

func (_u *PublishDesiredUpdate) SetRunningUnitID(v string) *PublishDesiredUpdate

SetRunningUnitID sets the "running_unit_id" field.

func (*PublishDesiredUpdate) SetTarget

SetTarget sets the "target" field.

func (*PublishDesiredUpdate) SetUpdatedAt

func (_u *PublishDesiredUpdate) SetUpdatedAt(v time.Time) *PublishDesiredUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PublishDesiredUpdate) Where

Where appends a list predicates to the PublishDesiredUpdate builder.

type PublishDesiredUpdateOne

type PublishDesiredUpdateOne struct {
	// contains filtered or unexported fields
}

PublishDesiredUpdateOne is the builder for updating a single PublishDesired entity.

func (*PublishDesiredUpdateOne) ClearLastError

func (_u *PublishDesiredUpdateOne) ClearLastError() *PublishDesiredUpdateOne

ClearLastError clears the value of the "last_error" field.

func (*PublishDesiredUpdateOne) ClearLastFailedVersion

func (_u *PublishDesiredUpdateOne) ClearLastFailedVersion() *PublishDesiredUpdateOne

ClearLastFailedVersion clears the value of the "last_failed_version" field.

func (*PublishDesiredUpdateOne) ClearLastSucceededVersion

func (_u *PublishDesiredUpdateOne) ClearLastSucceededVersion() *PublishDesiredUpdateOne

ClearLastSucceededVersion clears the value of the "last_succeeded_version" field.

func (*PublishDesiredUpdateOne) ClearRunningUnitID

func (_u *PublishDesiredUpdateOne) ClearRunningUnitID() *PublishDesiredUpdateOne

ClearRunningUnitID clears the value of the "running_unit_id" field.

func (*PublishDesiredUpdateOne) Exec

Exec executes the query on the entity.

func (*PublishDesiredUpdateOne) ExecX

func (_u *PublishDesiredUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishDesiredUpdateOne) Mutation

Mutation returns the PublishDesiredMutation object of the builder.

func (*PublishDesiredUpdateOne) Save

Save executes the query and returns the updated PublishDesired entity.

func (*PublishDesiredUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PublishDesiredUpdateOne) Select

func (_u *PublishDesiredUpdateOne) Select(field string, fields ...string) *PublishDesiredUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PublishDesiredUpdateOne) SetArch

SetArch sets the "arch" field.

func (*PublishDesiredUpdateOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*PublishDesiredUpdateOne) SetDesiredAt

SetDesiredAt sets the "desired_at" field.

func (*PublishDesiredUpdateOne) SetDesiredPayload

func (_u *PublishDesiredUpdateOne) SetDesiredPayload(v map[string]interface{}) *PublishDesiredUpdateOne

SetDesiredPayload sets the "desired_payload" field.

func (*PublishDesiredUpdateOne) SetDesiredVersion

func (_u *PublishDesiredUpdateOne) SetDesiredVersion(v string) *PublishDesiredUpdateOne

SetDesiredVersion sets the "desired_version" field.

func (*PublishDesiredUpdateOne) SetLastError

SetLastError sets the "last_error" field.

func (*PublishDesiredUpdateOne) SetLastFailedVersion

func (_u *PublishDesiredUpdateOne) SetLastFailedVersion(v string) *PublishDesiredUpdateOne

SetLastFailedVersion sets the "last_failed_version" field.

func (*PublishDesiredUpdateOne) SetLastSucceededVersion

func (_u *PublishDesiredUpdateOne) SetLastSucceededVersion(v string) *PublishDesiredUpdateOne

SetLastSucceededVersion sets the "last_succeeded_version" field.

func (*PublishDesiredUpdateOne) SetNextRunAt

SetNextRunAt sets the "next_run_at" field.

func (*PublishDesiredUpdateOne) SetNillableArch

func (_u *PublishDesiredUpdateOne) SetNillableArch(v *string) *PublishDesiredUpdateOne

SetNillableArch sets the "arch" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableCreatedAt

func (_u *PublishDesiredUpdateOne) SetNillableCreatedAt(v *time.Time) *PublishDesiredUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableDesiredAt

func (_u *PublishDesiredUpdateOne) SetNillableDesiredAt(v *time.Time) *PublishDesiredUpdateOne

SetNillableDesiredAt sets the "desired_at" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableDesiredVersion

func (_u *PublishDesiredUpdateOne) SetNillableDesiredVersion(v *string) *PublishDesiredUpdateOne

SetNillableDesiredVersion sets the "desired_version" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableLastError

func (_u *PublishDesiredUpdateOne) SetNillableLastError(v *string) *PublishDesiredUpdateOne

SetNillableLastError sets the "last_error" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableLastFailedVersion

func (_u *PublishDesiredUpdateOne) SetNillableLastFailedVersion(v *string) *PublishDesiredUpdateOne

SetNillableLastFailedVersion sets the "last_failed_version" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableLastSucceededVersion

func (_u *PublishDesiredUpdateOne) SetNillableLastSucceededVersion(v *string) *PublishDesiredUpdateOne

SetNillableLastSucceededVersion sets the "last_succeeded_version" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableNextRunAt

func (_u *PublishDesiredUpdateOne) SetNillableNextRunAt(v *time.Time) *PublishDesiredUpdateOne

SetNillableNextRunAt sets the "next_run_at" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableOs

SetNillableOs sets the "os" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillablePkg

func (_u *PublishDesiredUpdateOne) SetNillablePkg(v *string) *PublishDesiredUpdateOne

SetNillablePkg sets the "pkg" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableRunningUnitID

func (_u *PublishDesiredUpdateOne) SetNillableRunningUnitID(v *string) *PublishDesiredUpdateOne

SetNillableRunningUnitID sets the "running_unit_id" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetNillableTarget

func (_u *PublishDesiredUpdateOne) SetNillableTarget(v *string) *PublishDesiredUpdateOne

SetNillableTarget sets the "target" field if the given value is not nil.

func (*PublishDesiredUpdateOne) SetOs

SetOs sets the "os" field.

func (*PublishDesiredUpdateOne) SetPkg

SetPkg sets the "pkg" field.

func (*PublishDesiredUpdateOne) SetRunningUnitID

func (_u *PublishDesiredUpdateOne) SetRunningUnitID(v string) *PublishDesiredUpdateOne

SetRunningUnitID sets the "running_unit_id" field.

func (*PublishDesiredUpdateOne) SetTarget

SetTarget sets the "target" field.

func (*PublishDesiredUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*PublishDesiredUpdateOne) Where

Where appends a list predicates to the PublishDesiredUpdate builder.

type PublishDesireds

type PublishDesireds []*PublishDesired

PublishDesireds is a parsable slice of PublishDesired.

type PublishLane

type PublishLane struct {

	// ID of the ent.
	// Fixed row id; a lane table holds exactly one row per lane
	ID int `json:"id,omitempty"`
	// Lane name; the TiUP publisher uses 'tiup'
	Lane string `json:"lane,omitempty"`
	// Unit currently holding the lane; empty when idle
	UnitID string `json:"unit_id,omitempty"`
	// Worker that last renewed the lease
	Holder string `json:"holder,omitempty"`
	// Lease expiry; an expired lane can be acquired by another unit
	LeaseUntil *time.Time `json:"lease_until,omitempty"`
	// Time when the lane row was created
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Time of the last acquire/renew/release
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

PublishLane is the model entity for the PublishLane schema.

func (*PublishLane) String

func (_m *PublishLane) String() string

String implements the fmt.Stringer.

func (*PublishLane) Unwrap

func (_m *PublishLane) Unwrap() *PublishLane

Unwrap unwraps the PublishLane 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 (*PublishLane) Update

func (_m *PublishLane) Update() *PublishLaneUpdateOne

Update returns a builder for updating this PublishLane. Note that you need to call PublishLane.Unwrap() before calling this method if this PublishLane was returned from a transaction, and the transaction was committed or rolled back.

func (*PublishLane) Value

func (_m *PublishLane) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PublishLane. This includes values selected through modifiers, order, etc.

type PublishLaneClient

type PublishLaneClient struct {
	// contains filtered or unexported fields
}

PublishLaneClient is a client for the PublishLane schema.

func NewPublishLaneClient

func NewPublishLaneClient(c config) *PublishLaneClient

NewPublishLaneClient returns a client for the PublishLane from the given config.

func (*PublishLaneClient) Create

func (c *PublishLaneClient) Create() *PublishLaneCreate

Create returns a builder for creating a PublishLane entity.

func (*PublishLaneClient) CreateBulk

func (c *PublishLaneClient) CreateBulk(builders ...*PublishLaneCreate) *PublishLaneCreateBulk

CreateBulk returns a builder for creating a bulk of PublishLane entities.

func (*PublishLaneClient) Delete

func (c *PublishLaneClient) Delete() *PublishLaneDelete

Delete returns a delete builder for PublishLane.

func (*PublishLaneClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PublishLaneClient) DeleteOneID

func (c *PublishLaneClient) DeleteOneID(id int) *PublishLaneDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PublishLaneClient) Get

func (c *PublishLaneClient) Get(ctx context.Context, id int) (*PublishLane, error)

Get returns a PublishLane entity by its id.

func (*PublishLaneClient) GetX

func (c *PublishLaneClient) GetX(ctx context.Context, id int) *PublishLane

GetX is like Get, but panics if an error occurs.

func (*PublishLaneClient) Hooks

func (c *PublishLaneClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PublishLaneClient) Intercept

func (c *PublishLaneClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `publishlane.Intercept(f(g(h())))`.

func (*PublishLaneClient) Interceptors

func (c *PublishLaneClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PublishLaneClient) MapCreateBulk

func (c *PublishLaneClient) MapCreateBulk(slice any, setFunc func(*PublishLaneCreate, int)) *PublishLaneCreateBulk

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 (*PublishLaneClient) Query

func (c *PublishLaneClient) Query() *PublishLaneQuery

Query returns a query builder for PublishLane.

func (*PublishLaneClient) Update

func (c *PublishLaneClient) Update() *PublishLaneUpdate

Update returns an update builder for PublishLane.

func (*PublishLaneClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PublishLaneClient) UpdateOneID

func (c *PublishLaneClient) UpdateOneID(id int) *PublishLaneUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PublishLaneClient) Use

func (c *PublishLaneClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `publishlane.Hooks(f(g(h())))`.

type PublishLaneCreate

type PublishLaneCreate struct {
	// contains filtered or unexported fields
}

PublishLaneCreate is the builder for creating a PublishLane entity.

func (*PublishLaneCreate) Exec

func (_c *PublishLaneCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PublishLaneCreate) ExecX

func (_c *PublishLaneCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishLaneCreate) Mutation

func (_c *PublishLaneCreate) Mutation() *PublishLaneMutation

Mutation returns the PublishLaneMutation object of the builder.

func (*PublishLaneCreate) Save

Save creates the PublishLane in the database.

func (*PublishLaneCreate) SaveX

func (_c *PublishLaneCreate) SaveX(ctx context.Context) *PublishLane

SaveX calls Save and panics if Save returns an error.

func (*PublishLaneCreate) SetCreatedAt

func (_c *PublishLaneCreate) SetCreatedAt(v time.Time) *PublishLaneCreate

SetCreatedAt sets the "created_at" field.

func (*PublishLaneCreate) SetHolder

func (_c *PublishLaneCreate) SetHolder(v string) *PublishLaneCreate

SetHolder sets the "holder" field.

func (*PublishLaneCreate) SetID

func (_c *PublishLaneCreate) SetID(v int) *PublishLaneCreate

SetID sets the "id" field.

func (*PublishLaneCreate) SetLane

func (_c *PublishLaneCreate) SetLane(v string) *PublishLaneCreate

SetLane sets the "lane" field.

func (*PublishLaneCreate) SetLeaseUntil

func (_c *PublishLaneCreate) SetLeaseUntil(v time.Time) *PublishLaneCreate

SetLeaseUntil sets the "lease_until" field.

func (*PublishLaneCreate) SetNillableCreatedAt

func (_c *PublishLaneCreate) SetNillableCreatedAt(v *time.Time) *PublishLaneCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishLaneCreate) SetNillableHolder

func (_c *PublishLaneCreate) SetNillableHolder(v *string) *PublishLaneCreate

SetNillableHolder sets the "holder" field if the given value is not nil.

func (*PublishLaneCreate) SetNillableLeaseUntil

func (_c *PublishLaneCreate) SetNillableLeaseUntil(v *time.Time) *PublishLaneCreate

SetNillableLeaseUntil sets the "lease_until" field if the given value is not nil.

func (*PublishLaneCreate) SetNillableUnitID

func (_c *PublishLaneCreate) SetNillableUnitID(v *string) *PublishLaneCreate

SetNillableUnitID sets the "unit_id" field if the given value is not nil.

func (*PublishLaneCreate) SetNillableUpdatedAt

func (_c *PublishLaneCreate) SetNillableUpdatedAt(v *time.Time) *PublishLaneCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PublishLaneCreate) SetUnitID

func (_c *PublishLaneCreate) SetUnitID(v string) *PublishLaneCreate

SetUnitID sets the "unit_id" field.

func (*PublishLaneCreate) SetUpdatedAt

func (_c *PublishLaneCreate) SetUpdatedAt(v time.Time) *PublishLaneCreate

SetUpdatedAt sets the "updated_at" field.

type PublishLaneCreateBulk

type PublishLaneCreateBulk struct {
	// contains filtered or unexported fields
}

PublishLaneCreateBulk is the builder for creating many PublishLane entities in bulk.

func (*PublishLaneCreateBulk) Exec

Exec executes the query.

func (*PublishLaneCreateBulk) ExecX

func (_c *PublishLaneCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishLaneCreateBulk) Save

Save creates the PublishLane entities in the database.

func (*PublishLaneCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type PublishLaneDelete

type PublishLaneDelete struct {
	// contains filtered or unexported fields
}

PublishLaneDelete is the builder for deleting a PublishLane entity.

func (*PublishLaneDelete) Exec

func (_d *PublishLaneDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PublishLaneDelete) ExecX

func (_d *PublishLaneDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PublishLaneDelete) Where

Where appends a list predicates to the PublishLaneDelete builder.

type PublishLaneDeleteOne

type PublishLaneDeleteOne struct {
	// contains filtered or unexported fields
}

PublishLaneDeleteOne is the builder for deleting a single PublishLane entity.

func (*PublishLaneDeleteOne) Exec

func (_d *PublishLaneDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PublishLaneDeleteOne) ExecX

func (_d *PublishLaneDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishLaneDeleteOne) Where

Where appends a list predicates to the PublishLaneDelete builder.

type PublishLaneGroupBy

type PublishLaneGroupBy struct {
	// contains filtered or unexported fields
}

PublishLaneGroupBy is the group-by builder for PublishLane entities.

func (*PublishLaneGroupBy) Aggregate

func (_g *PublishLaneGroupBy) Aggregate(fns ...AggregateFunc) *PublishLaneGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PublishLaneGroupBy) Bool

func (s *PublishLaneGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PublishLaneGroupBy) BoolX

func (s *PublishLaneGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PublishLaneGroupBy) Bools

func (s *PublishLaneGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PublishLaneGroupBy) BoolsX

func (s *PublishLaneGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PublishLaneGroupBy) Float64

func (s *PublishLaneGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PublishLaneGroupBy) Float64X

func (s *PublishLaneGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PublishLaneGroupBy) Float64s

func (s *PublishLaneGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PublishLaneGroupBy) Float64sX

func (s *PublishLaneGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PublishLaneGroupBy) Int

func (s *PublishLaneGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PublishLaneGroupBy) IntX

func (s *PublishLaneGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PublishLaneGroupBy) Ints

func (s *PublishLaneGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PublishLaneGroupBy) IntsX

func (s *PublishLaneGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PublishLaneGroupBy) Scan

func (_g *PublishLaneGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PublishLaneGroupBy) ScanX

func (s *PublishLaneGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PublishLaneGroupBy) String

func (s *PublishLaneGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PublishLaneGroupBy) StringX

func (s *PublishLaneGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PublishLaneGroupBy) Strings

func (s *PublishLaneGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PublishLaneGroupBy) StringsX

func (s *PublishLaneGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PublishLaneMutation

type PublishLaneMutation struct {
	// contains filtered or unexported fields
}

PublishLaneMutation represents an operation that mutates the PublishLane nodes in the graph.

func (*PublishLaneMutation) AddField

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) AddedEdges

func (m *PublishLaneMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PublishLaneMutation) AddedField

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) AddedFields

func (m *PublishLaneMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PublishLaneMutation) AddedIDs

func (m *PublishLaneMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PublishLaneMutation) ClearEdge

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) ClearField

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) ClearHolder

func (m *PublishLaneMutation) ClearHolder()

ClearHolder clears the value of the "holder" field.

func (*PublishLaneMutation) ClearLeaseUntil

func (m *PublishLaneMutation) ClearLeaseUntil()

ClearLeaseUntil clears the value of the "lease_until" field.

func (*PublishLaneMutation) ClearUnitID

func (m *PublishLaneMutation) ClearUnitID()

ClearUnitID clears the value of the "unit_id" field.

func (*PublishLaneMutation) ClearedEdges

func (m *PublishLaneMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PublishLaneMutation) ClearedFields

func (m *PublishLaneMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PublishLaneMutation) Client

func (m PublishLaneMutation) 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 (*PublishLaneMutation) CreatedAt

func (m *PublishLaneMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PublishLaneMutation) EdgeCleared

func (m *PublishLaneMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PublishLaneMutation) Field

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) FieldCleared

func (m *PublishLaneMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PublishLaneMutation) Fields

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) Holder

func (m *PublishLaneMutation) Holder() (r string, exists bool)

Holder returns the value of the "holder" field in the mutation.

func (*PublishLaneMutation) HolderCleared

func (m *PublishLaneMutation) HolderCleared() bool

HolderCleared returns if the "holder" field was cleared in this mutation.

func (*PublishLaneMutation) ID

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) IDs

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) Lane

func (m *PublishLaneMutation) Lane() (r string, exists bool)

Lane returns the value of the "lane" field in the mutation.

func (*PublishLaneMutation) LeaseUntil

func (m *PublishLaneMutation) LeaseUntil() (r time.Time, exists bool)

LeaseUntil returns the value of the "lease_until" field in the mutation.

func (*PublishLaneMutation) LeaseUntilCleared

func (m *PublishLaneMutation) LeaseUntilCleared() bool

LeaseUntilCleared returns if the "lease_until" field was cleared in this mutation.

func (*PublishLaneMutation) OldCreatedAt

func (m *PublishLaneMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the PublishLane entity. If the PublishLane object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishLaneMutation) OldField

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) OldHolder

func (m *PublishLaneMutation) OldHolder(ctx context.Context) (v string, err error)

OldHolder returns the old "holder" field's value of the PublishLane entity. If the PublishLane object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishLaneMutation) OldLane

func (m *PublishLaneMutation) OldLane(ctx context.Context) (v string, err error)

OldLane returns the old "lane" field's value of the PublishLane entity. If the PublishLane object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishLaneMutation) OldLeaseUntil

func (m *PublishLaneMutation) OldLeaseUntil(ctx context.Context) (v *time.Time, err error)

OldLeaseUntil returns the old "lease_until" field's value of the PublishLane entity. If the PublishLane object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishLaneMutation) OldUnitID

func (m *PublishLaneMutation) OldUnitID(ctx context.Context) (v string, err error)

OldUnitID returns the old "unit_id" field's value of the PublishLane entity. If the PublishLane object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishLaneMutation) OldUpdatedAt

func (m *PublishLaneMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the PublishLane entity. If the PublishLane object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishLaneMutation) Op

func (m *PublishLaneMutation) Op() Op

Op returns the operation name.

func (*PublishLaneMutation) RemovedEdges

func (m *PublishLaneMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PublishLaneMutation) RemovedIDs

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) ResetCreatedAt

func (m *PublishLaneMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PublishLaneMutation) ResetEdge

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) ResetField

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) ResetHolder

func (m *PublishLaneMutation) ResetHolder()

ResetHolder resets all changes to the "holder" field.

func (*PublishLaneMutation) ResetLane

func (m *PublishLaneMutation) ResetLane()

ResetLane resets all changes to the "lane" field.

func (*PublishLaneMutation) ResetLeaseUntil

func (m *PublishLaneMutation) ResetLeaseUntil()

ResetLeaseUntil resets all changes to the "lease_until" field.

func (*PublishLaneMutation) ResetUnitID

func (m *PublishLaneMutation) ResetUnitID()

ResetUnitID resets all changes to the "unit_id" field.

func (*PublishLaneMutation) ResetUpdatedAt

func (m *PublishLaneMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PublishLaneMutation) SetCreatedAt

func (m *PublishLaneMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PublishLaneMutation) SetField

func (m *PublishLaneMutation) 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 (*PublishLaneMutation) SetHolder

func (m *PublishLaneMutation) SetHolder(s string)

SetHolder sets the "holder" field.

func (*PublishLaneMutation) SetID

func (m *PublishLaneMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PublishLane entities.

func (*PublishLaneMutation) SetLane

func (m *PublishLaneMutation) SetLane(s string)

SetLane sets the "lane" field.

func (*PublishLaneMutation) SetLeaseUntil

func (m *PublishLaneMutation) SetLeaseUntil(t time.Time)

SetLeaseUntil sets the "lease_until" field.

func (*PublishLaneMutation) SetOp

func (m *PublishLaneMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PublishLaneMutation) SetUnitID

func (m *PublishLaneMutation) SetUnitID(s string)

SetUnitID sets the "unit_id" field.

func (*PublishLaneMutation) SetUpdatedAt

func (m *PublishLaneMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (PublishLaneMutation) Tx

func (m PublishLaneMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PublishLaneMutation) Type

func (m *PublishLaneMutation) Type() string

Type returns the node type of this mutation (PublishLane).

func (*PublishLaneMutation) UnitID

func (m *PublishLaneMutation) UnitID() (r string, exists bool)

UnitID returns the value of the "unit_id" field in the mutation.

func (*PublishLaneMutation) UnitIDCleared

func (m *PublishLaneMutation) UnitIDCleared() bool

UnitIDCleared returns if the "unit_id" field was cleared in this mutation.

func (*PublishLaneMutation) UpdatedAt

func (m *PublishLaneMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PublishLaneMutation) Where

func (m *PublishLaneMutation) Where(ps ...predicate.PublishLane)

Where appends a list predicates to the PublishLaneMutation builder.

func (*PublishLaneMutation) WhereP

func (m *PublishLaneMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PublishLaneMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PublishLaneQuery

type PublishLaneQuery struct {
	// contains filtered or unexported fields
}

PublishLaneQuery is the builder for querying PublishLane entities.

func (*PublishLaneQuery) Aggregate

func (_q *PublishLaneQuery) Aggregate(fns ...AggregateFunc) *PublishLaneSelect

Aggregate returns a PublishLaneSelect configured with the given aggregations.

func (*PublishLaneQuery) All

func (_q *PublishLaneQuery) All(ctx context.Context) ([]*PublishLane, error)

All executes the query and returns a list of PublishLanes.

func (*PublishLaneQuery) AllX

func (_q *PublishLaneQuery) AllX(ctx context.Context) []*PublishLane

AllX is like All, but panics if an error occurs.

func (*PublishLaneQuery) Clone

func (_q *PublishLaneQuery) Clone() *PublishLaneQuery

Clone returns a duplicate of the PublishLaneQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PublishLaneQuery) Count

func (_q *PublishLaneQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PublishLaneQuery) CountX

func (_q *PublishLaneQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PublishLaneQuery) Exist

func (_q *PublishLaneQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PublishLaneQuery) ExistX

func (_q *PublishLaneQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PublishLaneQuery) First

func (_q *PublishLaneQuery) First(ctx context.Context) (*PublishLane, error)

First returns the first PublishLane entity from the query. Returns a *NotFoundError when no PublishLane was found.

func (*PublishLaneQuery) FirstID

func (_q *PublishLaneQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first PublishLane ID from the query. Returns a *NotFoundError when no PublishLane ID was found.

func (*PublishLaneQuery) FirstIDX

func (_q *PublishLaneQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*PublishLaneQuery) FirstX

func (_q *PublishLaneQuery) FirstX(ctx context.Context) *PublishLane

FirstX is like First, but panics if an error occurs.

func (*PublishLaneQuery) GroupBy

func (_q *PublishLaneQuery) GroupBy(field string, fields ...string) *PublishLaneGroupBy

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 {
	Lane string `json:"lane,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PublishLane.Query().
	GroupBy(publishlane.FieldLane).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PublishLaneQuery) IDs

func (_q *PublishLaneQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of PublishLane IDs.

func (*PublishLaneQuery) IDsX

func (_q *PublishLaneQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*PublishLaneQuery) Limit

func (_q *PublishLaneQuery) Limit(limit int) *PublishLaneQuery

Limit the number of records to be returned by this query.

func (*PublishLaneQuery) Offset

func (_q *PublishLaneQuery) Offset(offset int) *PublishLaneQuery

Offset to start from.

func (*PublishLaneQuery) Only

func (_q *PublishLaneQuery) Only(ctx context.Context) (*PublishLane, error)

Only returns a single PublishLane entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PublishLane entity is found. Returns a *NotFoundError when no PublishLane entities are found.

func (*PublishLaneQuery) OnlyID

func (_q *PublishLaneQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only PublishLane ID in the query. Returns a *NotSingularError when more than one PublishLane ID is found. Returns a *NotFoundError when no entities are found.

func (*PublishLaneQuery) OnlyIDX

func (_q *PublishLaneQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PublishLaneQuery) OnlyX

func (_q *PublishLaneQuery) OnlyX(ctx context.Context) *PublishLane

OnlyX is like Only, but panics if an error occurs.

func (*PublishLaneQuery) Order

Order specifies how the records should be ordered.

func (*PublishLaneQuery) Select

func (_q *PublishLaneQuery) Select(fields ...string) *PublishLaneSelect

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 {
	Lane string `json:"lane,omitempty"`
}

client.PublishLane.Query().
	Select(publishlane.FieldLane).
	Scan(ctx, &v)

func (*PublishLaneQuery) Unique

func (_q *PublishLaneQuery) Unique(unique bool) *PublishLaneQuery

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 (*PublishLaneQuery) Where

Where adds a new predicate for the PublishLaneQuery builder.

type PublishLaneSelect

type PublishLaneSelect struct {
	*PublishLaneQuery
	// contains filtered or unexported fields
}

PublishLaneSelect is the builder for selecting fields of PublishLane entities.

func (*PublishLaneSelect) Aggregate

func (_s *PublishLaneSelect) Aggregate(fns ...AggregateFunc) *PublishLaneSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PublishLaneSelect) Bool

func (s *PublishLaneSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PublishLaneSelect) BoolX

func (s *PublishLaneSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PublishLaneSelect) Bools

func (s *PublishLaneSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PublishLaneSelect) BoolsX

func (s *PublishLaneSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PublishLaneSelect) Float64

func (s *PublishLaneSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PublishLaneSelect) Float64X

func (s *PublishLaneSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PublishLaneSelect) Float64s

func (s *PublishLaneSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PublishLaneSelect) Float64sX

func (s *PublishLaneSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PublishLaneSelect) Int

func (s *PublishLaneSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PublishLaneSelect) IntX

func (s *PublishLaneSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PublishLaneSelect) Ints

func (s *PublishLaneSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PublishLaneSelect) IntsX

func (s *PublishLaneSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PublishLaneSelect) Scan

func (_s *PublishLaneSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PublishLaneSelect) ScanX

func (s *PublishLaneSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PublishLaneSelect) String

func (s *PublishLaneSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PublishLaneSelect) StringX

func (s *PublishLaneSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PublishLaneSelect) Strings

func (s *PublishLaneSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PublishLaneSelect) StringsX

func (s *PublishLaneSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PublishLaneUpdate

type PublishLaneUpdate struct {
	// contains filtered or unexported fields
}

PublishLaneUpdate is the builder for updating PublishLane entities.

func (*PublishLaneUpdate) ClearHolder

func (_u *PublishLaneUpdate) ClearHolder() *PublishLaneUpdate

ClearHolder clears the value of the "holder" field.

func (*PublishLaneUpdate) ClearLeaseUntil

func (_u *PublishLaneUpdate) ClearLeaseUntil() *PublishLaneUpdate

ClearLeaseUntil clears the value of the "lease_until" field.

func (*PublishLaneUpdate) ClearUnitID

func (_u *PublishLaneUpdate) ClearUnitID() *PublishLaneUpdate

ClearUnitID clears the value of the "unit_id" field.

func (*PublishLaneUpdate) Exec

func (_u *PublishLaneUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PublishLaneUpdate) ExecX

func (_u *PublishLaneUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishLaneUpdate) Mutation

func (_u *PublishLaneUpdate) Mutation() *PublishLaneMutation

Mutation returns the PublishLaneMutation object of the builder.

func (*PublishLaneUpdate) Save

func (_u *PublishLaneUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PublishLaneUpdate) SaveX

func (_u *PublishLaneUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PublishLaneUpdate) SetCreatedAt

func (_u *PublishLaneUpdate) SetCreatedAt(v time.Time) *PublishLaneUpdate

SetCreatedAt sets the "created_at" field.

func (*PublishLaneUpdate) SetHolder

func (_u *PublishLaneUpdate) SetHolder(v string) *PublishLaneUpdate

SetHolder sets the "holder" field.

func (*PublishLaneUpdate) SetLeaseUntil

func (_u *PublishLaneUpdate) SetLeaseUntil(v time.Time) *PublishLaneUpdate

SetLeaseUntil sets the "lease_until" field.

func (*PublishLaneUpdate) SetNillableCreatedAt

func (_u *PublishLaneUpdate) SetNillableCreatedAt(v *time.Time) *PublishLaneUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishLaneUpdate) SetNillableHolder

func (_u *PublishLaneUpdate) SetNillableHolder(v *string) *PublishLaneUpdate

SetNillableHolder sets the "holder" field if the given value is not nil.

func (*PublishLaneUpdate) SetNillableLeaseUntil

func (_u *PublishLaneUpdate) SetNillableLeaseUntil(v *time.Time) *PublishLaneUpdate

SetNillableLeaseUntil sets the "lease_until" field if the given value is not nil.

func (*PublishLaneUpdate) SetNillableUnitID

func (_u *PublishLaneUpdate) SetNillableUnitID(v *string) *PublishLaneUpdate

SetNillableUnitID sets the "unit_id" field if the given value is not nil.

func (*PublishLaneUpdate) SetUnitID

func (_u *PublishLaneUpdate) SetUnitID(v string) *PublishLaneUpdate

SetUnitID sets the "unit_id" field.

func (*PublishLaneUpdate) SetUpdatedAt

func (_u *PublishLaneUpdate) SetUpdatedAt(v time.Time) *PublishLaneUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PublishLaneUpdate) Where

Where appends a list predicates to the PublishLaneUpdate builder.

type PublishLaneUpdateOne

type PublishLaneUpdateOne struct {
	// contains filtered or unexported fields
}

PublishLaneUpdateOne is the builder for updating a single PublishLane entity.

func (*PublishLaneUpdateOne) ClearHolder

func (_u *PublishLaneUpdateOne) ClearHolder() *PublishLaneUpdateOne

ClearHolder clears the value of the "holder" field.

func (*PublishLaneUpdateOne) ClearLeaseUntil

func (_u *PublishLaneUpdateOne) ClearLeaseUntil() *PublishLaneUpdateOne

ClearLeaseUntil clears the value of the "lease_until" field.

func (*PublishLaneUpdateOne) ClearUnitID

func (_u *PublishLaneUpdateOne) ClearUnitID() *PublishLaneUpdateOne

ClearUnitID clears the value of the "unit_id" field.

func (*PublishLaneUpdateOne) Exec

func (_u *PublishLaneUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PublishLaneUpdateOne) ExecX

func (_u *PublishLaneUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishLaneUpdateOne) Mutation

func (_u *PublishLaneUpdateOne) Mutation() *PublishLaneMutation

Mutation returns the PublishLaneMutation object of the builder.

func (*PublishLaneUpdateOne) Save

Save executes the query and returns the updated PublishLane entity.

func (*PublishLaneUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PublishLaneUpdateOne) Select

func (_u *PublishLaneUpdateOne) Select(field string, fields ...string) *PublishLaneUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PublishLaneUpdateOne) SetCreatedAt

func (_u *PublishLaneUpdateOne) SetCreatedAt(v time.Time) *PublishLaneUpdateOne

SetCreatedAt sets the "created_at" field.

func (*PublishLaneUpdateOne) SetHolder

SetHolder sets the "holder" field.

func (*PublishLaneUpdateOne) SetLeaseUntil

func (_u *PublishLaneUpdateOne) SetLeaseUntil(v time.Time) *PublishLaneUpdateOne

SetLeaseUntil sets the "lease_until" field.

func (*PublishLaneUpdateOne) SetNillableCreatedAt

func (_u *PublishLaneUpdateOne) SetNillableCreatedAt(v *time.Time) *PublishLaneUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishLaneUpdateOne) SetNillableHolder

func (_u *PublishLaneUpdateOne) SetNillableHolder(v *string) *PublishLaneUpdateOne

SetNillableHolder sets the "holder" field if the given value is not nil.

func (*PublishLaneUpdateOne) SetNillableLeaseUntil

func (_u *PublishLaneUpdateOne) SetNillableLeaseUntil(v *time.Time) *PublishLaneUpdateOne

SetNillableLeaseUntil sets the "lease_until" field if the given value is not nil.

func (*PublishLaneUpdateOne) SetNillableUnitID

func (_u *PublishLaneUpdateOne) SetNillableUnitID(v *string) *PublishLaneUpdateOne

SetNillableUnitID sets the "unit_id" field if the given value is not nil.

func (*PublishLaneUpdateOne) SetUnitID

SetUnitID sets the "unit_id" field.

func (*PublishLaneUpdateOne) SetUpdatedAt

func (_u *PublishLaneUpdateOne) SetUpdatedAt(v time.Time) *PublishLaneUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*PublishLaneUpdateOne) Where

Where appends a list predicates to the PublishLaneUpdate builder.

type PublishLanes

type PublishLanes []*PublishLane

PublishLanes is a parsable slice of PublishLane.

type PublishStep

type PublishStep struct {

	// ID of the ent.
	// UUID of the step
	ID string `json:"id,omitempty"`
	// Owning publish_unit id
	UnitID string `json:"unit_id,omitempty"`
	// Claim shard: registry host for image_copy, mirror name for tiup
	Target string `json:"target,omitempty"`
	// Destination repository inside the target
	Dest string `json:"dest,omitempty"`
	// Previous step of the same unit; image steps never depend on each other
	DependsOn string `json:"depends_on,omitempty"`
	// Step state: blocked, pending, claimed, succeeded, failed, skipped
	State string `json:"state,omitempty"`
	// Claim priority copied from the owning unit: release > api > nightly
	Priority int `json:"priority,omitempty"`
	// Full execution parameters, replayable by any worker
	Payload map[string]interface{} `json:"payload,omitempty"`
	// Execution outcome recorded by the worker
	Result map[string]interface{} `json:"result,omitempty"`
	// Claim attempts, incremented atomically on claim
	Attempts int `json:"attempts,omitempty"`
	// Worker identity currently holding the lease
	ClaimedBy string `json:"claimed_by,omitempty"`
	// Lease expiry; an expired claimed row is reclaimed by the reaper
	LeaseUntil *time.Time `json:"lease_until,omitempty"`
	// Earliest time the row may be claimed again after a failure
	AvailableAt *time.Time `json:"available_at,omitempty"`
	// Last failure message
	LastError string `json:"last_error,omitempty"`
	// Time when the step was created
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Time of the first claim
	StartedAt *time.Time `json:"started_at,omitempty"`
	// Time when the step reached a terminal state
	FinishedAt *time.Time `json:"finished_at,omitempty"`
	// contains filtered or unexported fields
}

PublishStep is the model entity for the PublishStep schema.

func (*PublishStep) String

func (_m *PublishStep) String() string

String implements the fmt.Stringer.

func (*PublishStep) Unwrap

func (_m *PublishStep) Unwrap() *PublishStep

Unwrap unwraps the PublishStep 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 (*PublishStep) Update

func (_m *PublishStep) Update() *PublishStepUpdateOne

Update returns a builder for updating this PublishStep. Note that you need to call PublishStep.Unwrap() before calling this method if this PublishStep was returned from a transaction, and the transaction was committed or rolled back.

func (*PublishStep) Value

func (_m *PublishStep) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PublishStep. This includes values selected through modifiers, order, etc.

type PublishStepClient

type PublishStepClient struct {
	// contains filtered or unexported fields
}

PublishStepClient is a client for the PublishStep schema.

func NewPublishStepClient

func NewPublishStepClient(c config) *PublishStepClient

NewPublishStepClient returns a client for the PublishStep from the given config.

func (*PublishStepClient) Create

func (c *PublishStepClient) Create() *PublishStepCreate

Create returns a builder for creating a PublishStep entity.

func (*PublishStepClient) CreateBulk

func (c *PublishStepClient) CreateBulk(builders ...*PublishStepCreate) *PublishStepCreateBulk

CreateBulk returns a builder for creating a bulk of PublishStep entities.

func (*PublishStepClient) Delete

func (c *PublishStepClient) Delete() *PublishStepDelete

Delete returns a delete builder for PublishStep.

func (*PublishStepClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PublishStepClient) DeleteOneID

func (c *PublishStepClient) DeleteOneID(id string) *PublishStepDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PublishStepClient) Get

Get returns a PublishStep entity by its id.

func (*PublishStepClient) GetX

GetX is like Get, but panics if an error occurs.

func (*PublishStepClient) Hooks

func (c *PublishStepClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PublishStepClient) Intercept

func (c *PublishStepClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `publishstep.Intercept(f(g(h())))`.

func (*PublishStepClient) Interceptors

func (c *PublishStepClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PublishStepClient) MapCreateBulk

func (c *PublishStepClient) MapCreateBulk(slice any, setFunc func(*PublishStepCreate, int)) *PublishStepCreateBulk

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 (*PublishStepClient) Query

func (c *PublishStepClient) Query() *PublishStepQuery

Query returns a query builder for PublishStep.

func (*PublishStepClient) Update

func (c *PublishStepClient) Update() *PublishStepUpdate

Update returns an update builder for PublishStep.

func (*PublishStepClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PublishStepClient) UpdateOneID

func (c *PublishStepClient) UpdateOneID(id string) *PublishStepUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PublishStepClient) Use

func (c *PublishStepClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `publishstep.Hooks(f(g(h())))`.

type PublishStepCreate

type PublishStepCreate struct {
	// contains filtered or unexported fields
}

PublishStepCreate is the builder for creating a PublishStep entity.

func (*PublishStepCreate) Exec

func (_c *PublishStepCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PublishStepCreate) ExecX

func (_c *PublishStepCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishStepCreate) Mutation

func (_c *PublishStepCreate) Mutation() *PublishStepMutation

Mutation returns the PublishStepMutation object of the builder.

func (*PublishStepCreate) Save

Save creates the PublishStep in the database.

func (*PublishStepCreate) SaveX

func (_c *PublishStepCreate) SaveX(ctx context.Context) *PublishStep

SaveX calls Save and panics if Save returns an error.

func (*PublishStepCreate) SetAttempts

func (_c *PublishStepCreate) SetAttempts(v int) *PublishStepCreate

SetAttempts sets the "attempts" field.

func (*PublishStepCreate) SetAvailableAt

func (_c *PublishStepCreate) SetAvailableAt(v time.Time) *PublishStepCreate

SetAvailableAt sets the "available_at" field.

func (*PublishStepCreate) SetClaimedBy

func (_c *PublishStepCreate) SetClaimedBy(v string) *PublishStepCreate

SetClaimedBy sets the "claimed_by" field.

func (*PublishStepCreate) SetCreatedAt

func (_c *PublishStepCreate) SetCreatedAt(v time.Time) *PublishStepCreate

SetCreatedAt sets the "created_at" field.

func (*PublishStepCreate) SetDependsOn

func (_c *PublishStepCreate) SetDependsOn(v string) *PublishStepCreate

SetDependsOn sets the "depends_on" field.

func (*PublishStepCreate) SetDest

func (_c *PublishStepCreate) SetDest(v string) *PublishStepCreate

SetDest sets the "dest" field.

func (*PublishStepCreate) SetFinishedAt

func (_c *PublishStepCreate) SetFinishedAt(v time.Time) *PublishStepCreate

SetFinishedAt sets the "finished_at" field.

func (*PublishStepCreate) SetID

SetID sets the "id" field.

func (*PublishStepCreate) SetLastError

func (_c *PublishStepCreate) SetLastError(v string) *PublishStepCreate

SetLastError sets the "last_error" field.

func (*PublishStepCreate) SetLeaseUntil

func (_c *PublishStepCreate) SetLeaseUntil(v time.Time) *PublishStepCreate

SetLeaseUntil sets the "lease_until" field.

func (*PublishStepCreate) SetNillableAttempts

func (_c *PublishStepCreate) SetNillableAttempts(v *int) *PublishStepCreate

SetNillableAttempts sets the "attempts" field if the given value is not nil.

func (*PublishStepCreate) SetNillableAvailableAt

func (_c *PublishStepCreate) SetNillableAvailableAt(v *time.Time) *PublishStepCreate

SetNillableAvailableAt sets the "available_at" field if the given value is not nil.

func (*PublishStepCreate) SetNillableClaimedBy

func (_c *PublishStepCreate) SetNillableClaimedBy(v *string) *PublishStepCreate

SetNillableClaimedBy sets the "claimed_by" field if the given value is not nil.

func (*PublishStepCreate) SetNillableCreatedAt

func (_c *PublishStepCreate) SetNillableCreatedAt(v *time.Time) *PublishStepCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishStepCreate) SetNillableDependsOn

func (_c *PublishStepCreate) SetNillableDependsOn(v *string) *PublishStepCreate

SetNillableDependsOn sets the "depends_on" field if the given value is not nil.

func (*PublishStepCreate) SetNillableDest

func (_c *PublishStepCreate) SetNillableDest(v *string) *PublishStepCreate

SetNillableDest sets the "dest" field if the given value is not nil.

func (*PublishStepCreate) SetNillableFinishedAt

func (_c *PublishStepCreate) SetNillableFinishedAt(v *time.Time) *PublishStepCreate

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*PublishStepCreate) SetNillableLastError

func (_c *PublishStepCreate) SetNillableLastError(v *string) *PublishStepCreate

SetNillableLastError sets the "last_error" field if the given value is not nil.

func (*PublishStepCreate) SetNillableLeaseUntil

func (_c *PublishStepCreate) SetNillableLeaseUntil(v *time.Time) *PublishStepCreate

SetNillableLeaseUntil sets the "lease_until" field if the given value is not nil.

func (*PublishStepCreate) SetNillablePriority

func (_c *PublishStepCreate) SetNillablePriority(v *int) *PublishStepCreate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*PublishStepCreate) SetNillableStartedAt

func (_c *PublishStepCreate) SetNillableStartedAt(v *time.Time) *PublishStepCreate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*PublishStepCreate) SetPayload

func (_c *PublishStepCreate) SetPayload(v map[string]interface{}) *PublishStepCreate

SetPayload sets the "payload" field.

func (*PublishStepCreate) SetPriority

func (_c *PublishStepCreate) SetPriority(v int) *PublishStepCreate

SetPriority sets the "priority" field.

func (*PublishStepCreate) SetResult

func (_c *PublishStepCreate) SetResult(v map[string]interface{}) *PublishStepCreate

SetResult sets the "result" field.

func (*PublishStepCreate) SetStartedAt

func (_c *PublishStepCreate) SetStartedAt(v time.Time) *PublishStepCreate

SetStartedAt sets the "started_at" field.

func (*PublishStepCreate) SetState

func (_c *PublishStepCreate) SetState(v string) *PublishStepCreate

SetState sets the "state" field.

func (*PublishStepCreate) SetTarget

func (_c *PublishStepCreate) SetTarget(v string) *PublishStepCreate

SetTarget sets the "target" field.

func (*PublishStepCreate) SetUnitID

func (_c *PublishStepCreate) SetUnitID(v string) *PublishStepCreate

SetUnitID sets the "unit_id" field.

type PublishStepCreateBulk

type PublishStepCreateBulk struct {
	// contains filtered or unexported fields
}

PublishStepCreateBulk is the builder for creating many PublishStep entities in bulk.

func (*PublishStepCreateBulk) Exec

Exec executes the query.

func (*PublishStepCreateBulk) ExecX

func (_c *PublishStepCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishStepCreateBulk) Save

Save creates the PublishStep entities in the database.

func (*PublishStepCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type PublishStepDelete

type PublishStepDelete struct {
	// contains filtered or unexported fields
}

PublishStepDelete is the builder for deleting a PublishStep entity.

func (*PublishStepDelete) Exec

func (_d *PublishStepDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PublishStepDelete) ExecX

func (_d *PublishStepDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PublishStepDelete) Where

Where appends a list predicates to the PublishStepDelete builder.

type PublishStepDeleteOne

type PublishStepDeleteOne struct {
	// contains filtered or unexported fields
}

PublishStepDeleteOne is the builder for deleting a single PublishStep entity.

func (*PublishStepDeleteOne) Exec

func (_d *PublishStepDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PublishStepDeleteOne) ExecX

func (_d *PublishStepDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishStepDeleteOne) Where

Where appends a list predicates to the PublishStepDelete builder.

type PublishStepGroupBy

type PublishStepGroupBy struct {
	// contains filtered or unexported fields
}

PublishStepGroupBy is the group-by builder for PublishStep entities.

func (*PublishStepGroupBy) Aggregate

func (_g *PublishStepGroupBy) Aggregate(fns ...AggregateFunc) *PublishStepGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PublishStepGroupBy) Bool

func (s *PublishStepGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PublishStepGroupBy) BoolX

func (s *PublishStepGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PublishStepGroupBy) Bools

func (s *PublishStepGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PublishStepGroupBy) BoolsX

func (s *PublishStepGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PublishStepGroupBy) Float64

func (s *PublishStepGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PublishStepGroupBy) Float64X

func (s *PublishStepGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PublishStepGroupBy) Float64s

func (s *PublishStepGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PublishStepGroupBy) Float64sX

func (s *PublishStepGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PublishStepGroupBy) Int

func (s *PublishStepGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PublishStepGroupBy) IntX

func (s *PublishStepGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PublishStepGroupBy) Ints

func (s *PublishStepGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PublishStepGroupBy) IntsX

func (s *PublishStepGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PublishStepGroupBy) Scan

func (_g *PublishStepGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PublishStepGroupBy) ScanX

func (s *PublishStepGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PublishStepGroupBy) String

func (s *PublishStepGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PublishStepGroupBy) StringX

func (s *PublishStepGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PublishStepGroupBy) Strings

func (s *PublishStepGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PublishStepGroupBy) StringsX

func (s *PublishStepGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PublishStepMutation

type PublishStepMutation struct {
	// contains filtered or unexported fields
}

PublishStepMutation represents an operation that mutates the PublishStep nodes in the graph.

func (*PublishStepMutation) AddAttempts

func (m *PublishStepMutation) AddAttempts(i int)

AddAttempts adds i to the "attempts" field.

func (*PublishStepMutation) AddField

func (m *PublishStepMutation) 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 (*PublishStepMutation) AddPriority

func (m *PublishStepMutation) AddPriority(i int)

AddPriority adds i to the "priority" field.

func (*PublishStepMutation) AddedAttempts

func (m *PublishStepMutation) AddedAttempts() (r int, exists bool)

AddedAttempts returns the value that was added to the "attempts" field in this mutation.

func (*PublishStepMutation) AddedEdges

func (m *PublishStepMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PublishStepMutation) AddedField

func (m *PublishStepMutation) 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 (*PublishStepMutation) AddedFields

func (m *PublishStepMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PublishStepMutation) AddedIDs

func (m *PublishStepMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PublishStepMutation) AddedPriority

func (m *PublishStepMutation) AddedPriority() (r int, exists bool)

AddedPriority returns the value that was added to the "priority" field in this mutation.

func (*PublishStepMutation) Attempts

func (m *PublishStepMutation) Attempts() (r int, exists bool)

Attempts returns the value of the "attempts" field in the mutation.

func (*PublishStepMutation) AvailableAt

func (m *PublishStepMutation) AvailableAt() (r time.Time, exists bool)

AvailableAt returns the value of the "available_at" field in the mutation.

func (*PublishStepMutation) AvailableAtCleared

func (m *PublishStepMutation) AvailableAtCleared() bool

AvailableAtCleared returns if the "available_at" field was cleared in this mutation.

func (*PublishStepMutation) ClaimedBy

func (m *PublishStepMutation) ClaimedBy() (r string, exists bool)

ClaimedBy returns the value of the "claimed_by" field in the mutation.

func (*PublishStepMutation) ClaimedByCleared

func (m *PublishStepMutation) ClaimedByCleared() bool

ClaimedByCleared returns if the "claimed_by" field was cleared in this mutation.

func (*PublishStepMutation) ClearAvailableAt

func (m *PublishStepMutation) ClearAvailableAt()

ClearAvailableAt clears the value of the "available_at" field.

func (*PublishStepMutation) ClearClaimedBy

func (m *PublishStepMutation) ClearClaimedBy()

ClearClaimedBy clears the value of the "claimed_by" field.

func (*PublishStepMutation) ClearDependsOn

func (m *PublishStepMutation) ClearDependsOn()

ClearDependsOn clears the value of the "depends_on" field.

func (*PublishStepMutation) ClearEdge

func (m *PublishStepMutation) 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 (*PublishStepMutation) ClearField

func (m *PublishStepMutation) 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 (*PublishStepMutation) ClearFinishedAt

func (m *PublishStepMutation) ClearFinishedAt()

ClearFinishedAt clears the value of the "finished_at" field.

func (*PublishStepMutation) ClearLastError

func (m *PublishStepMutation) ClearLastError()

ClearLastError clears the value of the "last_error" field.

func (*PublishStepMutation) ClearLeaseUntil

func (m *PublishStepMutation) ClearLeaseUntil()

ClearLeaseUntil clears the value of the "lease_until" field.

func (*PublishStepMutation) ClearResult

func (m *PublishStepMutation) ClearResult()

ClearResult clears the value of the "result" field.

func (*PublishStepMutation) ClearStartedAt

func (m *PublishStepMutation) ClearStartedAt()

ClearStartedAt clears the value of the "started_at" field.

func (*PublishStepMutation) ClearedEdges

func (m *PublishStepMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PublishStepMutation) ClearedFields

func (m *PublishStepMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PublishStepMutation) Client

func (m PublishStepMutation) 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 (*PublishStepMutation) CreatedAt

func (m *PublishStepMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PublishStepMutation) DependsOn

func (m *PublishStepMutation) DependsOn() (r string, exists bool)

DependsOn returns the value of the "depends_on" field in the mutation.

func (*PublishStepMutation) DependsOnCleared

func (m *PublishStepMutation) DependsOnCleared() bool

DependsOnCleared returns if the "depends_on" field was cleared in this mutation.

func (*PublishStepMutation) Dest

func (m *PublishStepMutation) Dest() (r string, exists bool)

Dest returns the value of the "dest" field in the mutation.

func (*PublishStepMutation) EdgeCleared

func (m *PublishStepMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PublishStepMutation) Field

func (m *PublishStepMutation) 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 (*PublishStepMutation) FieldCleared

func (m *PublishStepMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PublishStepMutation) Fields

func (m *PublishStepMutation) 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 (*PublishStepMutation) FinishedAt

func (m *PublishStepMutation) FinishedAt() (r time.Time, exists bool)

FinishedAt returns the value of the "finished_at" field in the mutation.

func (*PublishStepMutation) FinishedAtCleared

func (m *PublishStepMutation) FinishedAtCleared() bool

FinishedAtCleared returns if the "finished_at" field was cleared in this mutation.

func (*PublishStepMutation) ID

func (m *PublishStepMutation) 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 (*PublishStepMutation) IDs

func (m *PublishStepMutation) 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 (*PublishStepMutation) LastError

func (m *PublishStepMutation) LastError() (r string, exists bool)

LastError returns the value of the "last_error" field in the mutation.

func (*PublishStepMutation) LastErrorCleared

func (m *PublishStepMutation) LastErrorCleared() bool

LastErrorCleared returns if the "last_error" field was cleared in this mutation.

func (*PublishStepMutation) LeaseUntil

func (m *PublishStepMutation) LeaseUntil() (r time.Time, exists bool)

LeaseUntil returns the value of the "lease_until" field in the mutation.

func (*PublishStepMutation) LeaseUntilCleared

func (m *PublishStepMutation) LeaseUntilCleared() bool

LeaseUntilCleared returns if the "lease_until" field was cleared in this mutation.

func (*PublishStepMutation) OldAttempts

func (m *PublishStepMutation) OldAttempts(ctx context.Context) (v int, err error)

OldAttempts returns the old "attempts" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldAvailableAt

func (m *PublishStepMutation) OldAvailableAt(ctx context.Context) (v *time.Time, err error)

OldAvailableAt returns the old "available_at" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldClaimedBy

func (m *PublishStepMutation) OldClaimedBy(ctx context.Context) (v string, err error)

OldClaimedBy returns the old "claimed_by" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldCreatedAt

func (m *PublishStepMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldDependsOn

func (m *PublishStepMutation) OldDependsOn(ctx context.Context) (v string, err error)

OldDependsOn returns the old "depends_on" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldDest

func (m *PublishStepMutation) OldDest(ctx context.Context) (v string, err error)

OldDest returns the old "dest" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldField

func (m *PublishStepMutation) 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 (*PublishStepMutation) OldFinishedAt

func (m *PublishStepMutation) OldFinishedAt(ctx context.Context) (v *time.Time, err error)

OldFinishedAt returns the old "finished_at" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldLastError

func (m *PublishStepMutation) OldLastError(ctx context.Context) (v string, err error)

OldLastError returns the old "last_error" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldLeaseUntil

func (m *PublishStepMutation) OldLeaseUntil(ctx context.Context) (v *time.Time, err error)

OldLeaseUntil returns the old "lease_until" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldPayload

func (m *PublishStepMutation) OldPayload(ctx context.Context) (v map[string]interface{}, err error)

OldPayload returns the old "payload" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldPriority

func (m *PublishStepMutation) OldPriority(ctx context.Context) (v int, err error)

OldPriority returns the old "priority" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldResult

func (m *PublishStepMutation) OldResult(ctx context.Context) (v map[string]interface{}, err error)

OldResult returns the old "result" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldStartedAt

func (m *PublishStepMutation) OldStartedAt(ctx context.Context) (v *time.Time, err error)

OldStartedAt returns the old "started_at" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldState

func (m *PublishStepMutation) OldState(ctx context.Context) (v string, err error)

OldState returns the old "state" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldTarget

func (m *PublishStepMutation) OldTarget(ctx context.Context) (v string, err error)

OldTarget returns the old "target" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) OldUnitID

func (m *PublishStepMutation) OldUnitID(ctx context.Context) (v string, err error)

OldUnitID returns the old "unit_id" field's value of the PublishStep entity. If the PublishStep object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishStepMutation) Op

func (m *PublishStepMutation) Op() Op

Op returns the operation name.

func (*PublishStepMutation) Payload

func (m *PublishStepMutation) Payload() (r map[string]interface{}, exists bool)

Payload returns the value of the "payload" field in the mutation.

func (*PublishStepMutation) Priority

func (m *PublishStepMutation) Priority() (r int, exists bool)

Priority returns the value of the "priority" field in the mutation.

func (*PublishStepMutation) RemovedEdges

func (m *PublishStepMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PublishStepMutation) RemovedIDs

func (m *PublishStepMutation) 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 (*PublishStepMutation) ResetAttempts

func (m *PublishStepMutation) ResetAttempts()

ResetAttempts resets all changes to the "attempts" field.

func (*PublishStepMutation) ResetAvailableAt

func (m *PublishStepMutation) ResetAvailableAt()

ResetAvailableAt resets all changes to the "available_at" field.

func (*PublishStepMutation) ResetClaimedBy

func (m *PublishStepMutation) ResetClaimedBy()

ResetClaimedBy resets all changes to the "claimed_by" field.

func (*PublishStepMutation) ResetCreatedAt

func (m *PublishStepMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PublishStepMutation) ResetDependsOn

func (m *PublishStepMutation) ResetDependsOn()

ResetDependsOn resets all changes to the "depends_on" field.

func (*PublishStepMutation) ResetDest

func (m *PublishStepMutation) ResetDest()

ResetDest resets all changes to the "dest" field.

func (*PublishStepMutation) ResetEdge

func (m *PublishStepMutation) 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 (*PublishStepMutation) ResetField

func (m *PublishStepMutation) 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 (*PublishStepMutation) ResetFinishedAt

func (m *PublishStepMutation) ResetFinishedAt()

ResetFinishedAt resets all changes to the "finished_at" field.

func (*PublishStepMutation) ResetLastError

func (m *PublishStepMutation) ResetLastError()

ResetLastError resets all changes to the "last_error" field.

func (*PublishStepMutation) ResetLeaseUntil

func (m *PublishStepMutation) ResetLeaseUntil()

ResetLeaseUntil resets all changes to the "lease_until" field.

func (*PublishStepMutation) ResetPayload

func (m *PublishStepMutation) ResetPayload()

ResetPayload resets all changes to the "payload" field.

func (*PublishStepMutation) ResetPriority

func (m *PublishStepMutation) ResetPriority()

ResetPriority resets all changes to the "priority" field.

func (*PublishStepMutation) ResetResult

func (m *PublishStepMutation) ResetResult()

ResetResult resets all changes to the "result" field.

func (*PublishStepMutation) ResetStartedAt

func (m *PublishStepMutation) ResetStartedAt()

ResetStartedAt resets all changes to the "started_at" field.

func (*PublishStepMutation) ResetState

func (m *PublishStepMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*PublishStepMutation) ResetTarget

func (m *PublishStepMutation) ResetTarget()

ResetTarget resets all changes to the "target" field.

func (*PublishStepMutation) ResetUnitID

func (m *PublishStepMutation) ResetUnitID()

ResetUnitID resets all changes to the "unit_id" field.

func (*PublishStepMutation) Result

func (m *PublishStepMutation) Result() (r map[string]interface{}, exists bool)

Result returns the value of the "result" field in the mutation.

func (*PublishStepMutation) ResultCleared

func (m *PublishStepMutation) ResultCleared() bool

ResultCleared returns if the "result" field was cleared in this mutation.

func (*PublishStepMutation) SetAttempts

func (m *PublishStepMutation) SetAttempts(i int)

SetAttempts sets the "attempts" field.

func (*PublishStepMutation) SetAvailableAt

func (m *PublishStepMutation) SetAvailableAt(t time.Time)

SetAvailableAt sets the "available_at" field.

func (*PublishStepMutation) SetClaimedBy

func (m *PublishStepMutation) SetClaimedBy(s string)

SetClaimedBy sets the "claimed_by" field.

func (*PublishStepMutation) SetCreatedAt

func (m *PublishStepMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PublishStepMutation) SetDependsOn

func (m *PublishStepMutation) SetDependsOn(s string)

SetDependsOn sets the "depends_on" field.

func (*PublishStepMutation) SetDest

func (m *PublishStepMutation) SetDest(s string)

SetDest sets the "dest" field.

func (*PublishStepMutation) SetField

func (m *PublishStepMutation) 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 (*PublishStepMutation) SetFinishedAt

func (m *PublishStepMutation) SetFinishedAt(t time.Time)

SetFinishedAt sets the "finished_at" field.

func (*PublishStepMutation) SetID

func (m *PublishStepMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PublishStep entities.

func (*PublishStepMutation) SetLastError

func (m *PublishStepMutation) SetLastError(s string)

SetLastError sets the "last_error" field.

func (*PublishStepMutation) SetLeaseUntil

func (m *PublishStepMutation) SetLeaseUntil(t time.Time)

SetLeaseUntil sets the "lease_until" field.

func (*PublishStepMutation) SetOp

func (m *PublishStepMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PublishStepMutation) SetPayload

func (m *PublishStepMutation) SetPayload(value map[string]interface{})

SetPayload sets the "payload" field.

func (*PublishStepMutation) SetPriority

func (m *PublishStepMutation) SetPriority(i int)

SetPriority sets the "priority" field.

func (*PublishStepMutation) SetResult

func (m *PublishStepMutation) SetResult(value map[string]interface{})

SetResult sets the "result" field.

func (*PublishStepMutation) SetStartedAt

func (m *PublishStepMutation) SetStartedAt(t time.Time)

SetStartedAt sets the "started_at" field.

func (*PublishStepMutation) SetState

func (m *PublishStepMutation) SetState(s string)

SetState sets the "state" field.

func (*PublishStepMutation) SetTarget

func (m *PublishStepMutation) SetTarget(s string)

SetTarget sets the "target" field.

func (*PublishStepMutation) SetUnitID

func (m *PublishStepMutation) SetUnitID(s string)

SetUnitID sets the "unit_id" field.

func (*PublishStepMutation) StartedAt

func (m *PublishStepMutation) StartedAt() (r time.Time, exists bool)

StartedAt returns the value of the "started_at" field in the mutation.

func (*PublishStepMutation) StartedAtCleared

func (m *PublishStepMutation) StartedAtCleared() bool

StartedAtCleared returns if the "started_at" field was cleared in this mutation.

func (*PublishStepMutation) State

func (m *PublishStepMutation) State() (r string, exists bool)

State returns the value of the "state" field in the mutation.

func (*PublishStepMutation) Target

func (m *PublishStepMutation) Target() (r string, exists bool)

Target returns the value of the "target" field in the mutation.

func (PublishStepMutation) Tx

func (m PublishStepMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PublishStepMutation) Type

func (m *PublishStepMutation) Type() string

Type returns the node type of this mutation (PublishStep).

func (*PublishStepMutation) UnitID

func (m *PublishStepMutation) UnitID() (r string, exists bool)

UnitID returns the value of the "unit_id" field in the mutation.

func (*PublishStepMutation) Where

func (m *PublishStepMutation) Where(ps ...predicate.PublishStep)

Where appends a list predicates to the PublishStepMutation builder.

func (*PublishStepMutation) WhereP

func (m *PublishStepMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PublishStepMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PublishStepQuery

type PublishStepQuery struct {
	// contains filtered or unexported fields
}

PublishStepQuery is the builder for querying PublishStep entities.

func (*PublishStepQuery) Aggregate

func (_q *PublishStepQuery) Aggregate(fns ...AggregateFunc) *PublishStepSelect

Aggregate returns a PublishStepSelect configured with the given aggregations.

func (*PublishStepQuery) All

func (_q *PublishStepQuery) All(ctx context.Context) ([]*PublishStep, error)

All executes the query and returns a list of PublishSteps.

func (*PublishStepQuery) AllX

func (_q *PublishStepQuery) AllX(ctx context.Context) []*PublishStep

AllX is like All, but panics if an error occurs.

func (*PublishStepQuery) Clone

func (_q *PublishStepQuery) Clone() *PublishStepQuery

Clone returns a duplicate of the PublishStepQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PublishStepQuery) Count

func (_q *PublishStepQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PublishStepQuery) CountX

func (_q *PublishStepQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PublishStepQuery) Exist

func (_q *PublishStepQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PublishStepQuery) ExistX

func (_q *PublishStepQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PublishStepQuery) First

func (_q *PublishStepQuery) First(ctx context.Context) (*PublishStep, error)

First returns the first PublishStep entity from the query. Returns a *NotFoundError when no PublishStep was found.

func (*PublishStepQuery) FirstID

func (_q *PublishStepQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first PublishStep ID from the query. Returns a *NotFoundError when no PublishStep ID was found.

func (*PublishStepQuery) FirstIDX

func (_q *PublishStepQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*PublishStepQuery) FirstX

func (_q *PublishStepQuery) FirstX(ctx context.Context) *PublishStep

FirstX is like First, but panics if an error occurs.

func (*PublishStepQuery) GroupBy

func (_q *PublishStepQuery) GroupBy(field string, fields ...string) *PublishStepGroupBy

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 {
	UnitID string `json:"unit_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PublishStep.Query().
	GroupBy(publishstep.FieldUnitID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PublishStepQuery) IDs

func (_q *PublishStepQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of PublishStep IDs.

func (*PublishStepQuery) IDsX

func (_q *PublishStepQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*PublishStepQuery) Limit

func (_q *PublishStepQuery) Limit(limit int) *PublishStepQuery

Limit the number of records to be returned by this query.

func (*PublishStepQuery) Offset

func (_q *PublishStepQuery) Offset(offset int) *PublishStepQuery

Offset to start from.

func (*PublishStepQuery) Only

func (_q *PublishStepQuery) Only(ctx context.Context) (*PublishStep, error)

Only returns a single PublishStep entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PublishStep entity is found. Returns a *NotFoundError when no PublishStep entities are found.

func (*PublishStepQuery) OnlyID

func (_q *PublishStepQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only PublishStep ID in the query. Returns a *NotSingularError when more than one PublishStep ID is found. Returns a *NotFoundError when no entities are found.

func (*PublishStepQuery) OnlyIDX

func (_q *PublishStepQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PublishStepQuery) OnlyX

func (_q *PublishStepQuery) OnlyX(ctx context.Context) *PublishStep

OnlyX is like Only, but panics if an error occurs.

func (*PublishStepQuery) Order

Order specifies how the records should be ordered.

func (*PublishStepQuery) Select

func (_q *PublishStepQuery) Select(fields ...string) *PublishStepSelect

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 {
	UnitID string `json:"unit_id,omitempty"`
}

client.PublishStep.Query().
	Select(publishstep.FieldUnitID).
	Scan(ctx, &v)

func (*PublishStepQuery) Unique

func (_q *PublishStepQuery) Unique(unique bool) *PublishStepQuery

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 (*PublishStepQuery) Where

Where adds a new predicate for the PublishStepQuery builder.

type PublishStepSelect

type PublishStepSelect struct {
	*PublishStepQuery
	// contains filtered or unexported fields
}

PublishStepSelect is the builder for selecting fields of PublishStep entities.

func (*PublishStepSelect) Aggregate

func (_s *PublishStepSelect) Aggregate(fns ...AggregateFunc) *PublishStepSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PublishStepSelect) Bool

func (s *PublishStepSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PublishStepSelect) BoolX

func (s *PublishStepSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PublishStepSelect) Bools

func (s *PublishStepSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PublishStepSelect) BoolsX

func (s *PublishStepSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PublishStepSelect) Float64

func (s *PublishStepSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PublishStepSelect) Float64X

func (s *PublishStepSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PublishStepSelect) Float64s

func (s *PublishStepSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PublishStepSelect) Float64sX

func (s *PublishStepSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PublishStepSelect) Int

func (s *PublishStepSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PublishStepSelect) IntX

func (s *PublishStepSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PublishStepSelect) Ints

func (s *PublishStepSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PublishStepSelect) IntsX

func (s *PublishStepSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PublishStepSelect) Scan

func (_s *PublishStepSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PublishStepSelect) ScanX

func (s *PublishStepSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PublishStepSelect) String

func (s *PublishStepSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PublishStepSelect) StringX

func (s *PublishStepSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PublishStepSelect) Strings

func (s *PublishStepSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PublishStepSelect) StringsX

func (s *PublishStepSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PublishStepUpdate

type PublishStepUpdate struct {
	// contains filtered or unexported fields
}

PublishStepUpdate is the builder for updating PublishStep entities.

func (*PublishStepUpdate) AddAttempts

func (_u *PublishStepUpdate) AddAttempts(v int) *PublishStepUpdate

AddAttempts adds value to the "attempts" field.

func (*PublishStepUpdate) AddPriority

func (_u *PublishStepUpdate) AddPriority(v int) *PublishStepUpdate

AddPriority adds value to the "priority" field.

func (*PublishStepUpdate) ClearAvailableAt

func (_u *PublishStepUpdate) ClearAvailableAt() *PublishStepUpdate

ClearAvailableAt clears the value of the "available_at" field.

func (*PublishStepUpdate) ClearClaimedBy

func (_u *PublishStepUpdate) ClearClaimedBy() *PublishStepUpdate

ClearClaimedBy clears the value of the "claimed_by" field.

func (*PublishStepUpdate) ClearDependsOn

func (_u *PublishStepUpdate) ClearDependsOn() *PublishStepUpdate

ClearDependsOn clears the value of the "depends_on" field.

func (*PublishStepUpdate) ClearFinishedAt

func (_u *PublishStepUpdate) ClearFinishedAt() *PublishStepUpdate

ClearFinishedAt clears the value of the "finished_at" field.

func (*PublishStepUpdate) ClearLastError

func (_u *PublishStepUpdate) ClearLastError() *PublishStepUpdate

ClearLastError clears the value of the "last_error" field.

func (*PublishStepUpdate) ClearLeaseUntil

func (_u *PublishStepUpdate) ClearLeaseUntil() *PublishStepUpdate

ClearLeaseUntil clears the value of the "lease_until" field.

func (*PublishStepUpdate) ClearResult

func (_u *PublishStepUpdate) ClearResult() *PublishStepUpdate

ClearResult clears the value of the "result" field.

func (*PublishStepUpdate) ClearStartedAt

func (_u *PublishStepUpdate) ClearStartedAt() *PublishStepUpdate

ClearStartedAt clears the value of the "started_at" field.

func (*PublishStepUpdate) Exec

func (_u *PublishStepUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PublishStepUpdate) ExecX

func (_u *PublishStepUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishStepUpdate) Mutation

func (_u *PublishStepUpdate) Mutation() *PublishStepMutation

Mutation returns the PublishStepMutation object of the builder.

func (*PublishStepUpdate) Save

func (_u *PublishStepUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PublishStepUpdate) SaveX

func (_u *PublishStepUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PublishStepUpdate) SetAttempts

func (_u *PublishStepUpdate) SetAttempts(v int) *PublishStepUpdate

SetAttempts sets the "attempts" field.

func (*PublishStepUpdate) SetAvailableAt

func (_u *PublishStepUpdate) SetAvailableAt(v time.Time) *PublishStepUpdate

SetAvailableAt sets the "available_at" field.

func (*PublishStepUpdate) SetClaimedBy

func (_u *PublishStepUpdate) SetClaimedBy(v string) *PublishStepUpdate

SetClaimedBy sets the "claimed_by" field.

func (*PublishStepUpdate) SetCreatedAt

func (_u *PublishStepUpdate) SetCreatedAt(v time.Time) *PublishStepUpdate

SetCreatedAt sets the "created_at" field.

func (*PublishStepUpdate) SetDependsOn

func (_u *PublishStepUpdate) SetDependsOn(v string) *PublishStepUpdate

SetDependsOn sets the "depends_on" field.

func (*PublishStepUpdate) SetDest

func (_u *PublishStepUpdate) SetDest(v string) *PublishStepUpdate

SetDest sets the "dest" field.

func (*PublishStepUpdate) SetFinishedAt

func (_u *PublishStepUpdate) SetFinishedAt(v time.Time) *PublishStepUpdate

SetFinishedAt sets the "finished_at" field.

func (*PublishStepUpdate) SetLastError

func (_u *PublishStepUpdate) SetLastError(v string) *PublishStepUpdate

SetLastError sets the "last_error" field.

func (*PublishStepUpdate) SetLeaseUntil

func (_u *PublishStepUpdate) SetLeaseUntil(v time.Time) *PublishStepUpdate

SetLeaseUntil sets the "lease_until" field.

func (*PublishStepUpdate) SetNillableAttempts

func (_u *PublishStepUpdate) SetNillableAttempts(v *int) *PublishStepUpdate

SetNillableAttempts sets the "attempts" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableAvailableAt

func (_u *PublishStepUpdate) SetNillableAvailableAt(v *time.Time) *PublishStepUpdate

SetNillableAvailableAt sets the "available_at" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableClaimedBy

func (_u *PublishStepUpdate) SetNillableClaimedBy(v *string) *PublishStepUpdate

SetNillableClaimedBy sets the "claimed_by" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableCreatedAt

func (_u *PublishStepUpdate) SetNillableCreatedAt(v *time.Time) *PublishStepUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableDependsOn

func (_u *PublishStepUpdate) SetNillableDependsOn(v *string) *PublishStepUpdate

SetNillableDependsOn sets the "depends_on" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableDest

func (_u *PublishStepUpdate) SetNillableDest(v *string) *PublishStepUpdate

SetNillableDest sets the "dest" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableFinishedAt

func (_u *PublishStepUpdate) SetNillableFinishedAt(v *time.Time) *PublishStepUpdate

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableLastError

func (_u *PublishStepUpdate) SetNillableLastError(v *string) *PublishStepUpdate

SetNillableLastError sets the "last_error" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableLeaseUntil

func (_u *PublishStepUpdate) SetNillableLeaseUntil(v *time.Time) *PublishStepUpdate

SetNillableLeaseUntil sets the "lease_until" field if the given value is not nil.

func (*PublishStepUpdate) SetNillablePriority

func (_u *PublishStepUpdate) SetNillablePriority(v *int) *PublishStepUpdate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableStartedAt

func (_u *PublishStepUpdate) SetNillableStartedAt(v *time.Time) *PublishStepUpdate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableState

func (_u *PublishStepUpdate) SetNillableState(v *string) *PublishStepUpdate

SetNillableState sets the "state" field if the given value is not nil.

func (*PublishStepUpdate) SetNillableTarget

func (_u *PublishStepUpdate) SetNillableTarget(v *string) *PublishStepUpdate

SetNillableTarget sets the "target" field if the given value is not nil.

func (*PublishStepUpdate) SetPayload

func (_u *PublishStepUpdate) SetPayload(v map[string]interface{}) *PublishStepUpdate

SetPayload sets the "payload" field.

func (*PublishStepUpdate) SetPriority

func (_u *PublishStepUpdate) SetPriority(v int) *PublishStepUpdate

SetPriority sets the "priority" field.

func (*PublishStepUpdate) SetResult

func (_u *PublishStepUpdate) SetResult(v map[string]interface{}) *PublishStepUpdate

SetResult sets the "result" field.

func (*PublishStepUpdate) SetStartedAt

func (_u *PublishStepUpdate) SetStartedAt(v time.Time) *PublishStepUpdate

SetStartedAt sets the "started_at" field.

func (*PublishStepUpdate) SetState

func (_u *PublishStepUpdate) SetState(v string) *PublishStepUpdate

SetState sets the "state" field.

func (*PublishStepUpdate) SetTarget

func (_u *PublishStepUpdate) SetTarget(v string) *PublishStepUpdate

SetTarget sets the "target" field.

func (*PublishStepUpdate) Where

Where appends a list predicates to the PublishStepUpdate builder.

type PublishStepUpdateOne

type PublishStepUpdateOne struct {
	// contains filtered or unexported fields
}

PublishStepUpdateOne is the builder for updating a single PublishStep entity.

func (*PublishStepUpdateOne) AddAttempts

func (_u *PublishStepUpdateOne) AddAttempts(v int) *PublishStepUpdateOne

AddAttempts adds value to the "attempts" field.

func (*PublishStepUpdateOne) AddPriority

func (_u *PublishStepUpdateOne) AddPriority(v int) *PublishStepUpdateOne

AddPriority adds value to the "priority" field.

func (*PublishStepUpdateOne) ClearAvailableAt

func (_u *PublishStepUpdateOne) ClearAvailableAt() *PublishStepUpdateOne

ClearAvailableAt clears the value of the "available_at" field.

func (*PublishStepUpdateOne) ClearClaimedBy

func (_u *PublishStepUpdateOne) ClearClaimedBy() *PublishStepUpdateOne

ClearClaimedBy clears the value of the "claimed_by" field.

func (*PublishStepUpdateOne) ClearDependsOn

func (_u *PublishStepUpdateOne) ClearDependsOn() *PublishStepUpdateOne

ClearDependsOn clears the value of the "depends_on" field.

func (*PublishStepUpdateOne) ClearFinishedAt

func (_u *PublishStepUpdateOne) ClearFinishedAt() *PublishStepUpdateOne

ClearFinishedAt clears the value of the "finished_at" field.

func (*PublishStepUpdateOne) ClearLastError

func (_u *PublishStepUpdateOne) ClearLastError() *PublishStepUpdateOne

ClearLastError clears the value of the "last_error" field.

func (*PublishStepUpdateOne) ClearLeaseUntil

func (_u *PublishStepUpdateOne) ClearLeaseUntil() *PublishStepUpdateOne

ClearLeaseUntil clears the value of the "lease_until" field.

func (*PublishStepUpdateOne) ClearResult

func (_u *PublishStepUpdateOne) ClearResult() *PublishStepUpdateOne

ClearResult clears the value of the "result" field.

func (*PublishStepUpdateOne) ClearStartedAt

func (_u *PublishStepUpdateOne) ClearStartedAt() *PublishStepUpdateOne

ClearStartedAt clears the value of the "started_at" field.

func (*PublishStepUpdateOne) Exec

func (_u *PublishStepUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PublishStepUpdateOne) ExecX

func (_u *PublishStepUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishStepUpdateOne) Mutation

func (_u *PublishStepUpdateOne) Mutation() *PublishStepMutation

Mutation returns the PublishStepMutation object of the builder.

func (*PublishStepUpdateOne) Save

Save executes the query and returns the updated PublishStep entity.

func (*PublishStepUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PublishStepUpdateOne) Select

func (_u *PublishStepUpdateOne) Select(field string, fields ...string) *PublishStepUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PublishStepUpdateOne) SetAttempts

func (_u *PublishStepUpdateOne) SetAttempts(v int) *PublishStepUpdateOne

SetAttempts sets the "attempts" field.

func (*PublishStepUpdateOne) SetAvailableAt

func (_u *PublishStepUpdateOne) SetAvailableAt(v time.Time) *PublishStepUpdateOne

SetAvailableAt sets the "available_at" field.

func (*PublishStepUpdateOne) SetClaimedBy

func (_u *PublishStepUpdateOne) SetClaimedBy(v string) *PublishStepUpdateOne

SetClaimedBy sets the "claimed_by" field.

func (*PublishStepUpdateOne) SetCreatedAt

func (_u *PublishStepUpdateOne) SetCreatedAt(v time.Time) *PublishStepUpdateOne

SetCreatedAt sets the "created_at" field.

func (*PublishStepUpdateOne) SetDependsOn

func (_u *PublishStepUpdateOne) SetDependsOn(v string) *PublishStepUpdateOne

SetDependsOn sets the "depends_on" field.

func (*PublishStepUpdateOne) SetDest

SetDest sets the "dest" field.

func (*PublishStepUpdateOne) SetFinishedAt

func (_u *PublishStepUpdateOne) SetFinishedAt(v time.Time) *PublishStepUpdateOne

SetFinishedAt sets the "finished_at" field.

func (*PublishStepUpdateOne) SetLastError

func (_u *PublishStepUpdateOne) SetLastError(v string) *PublishStepUpdateOne

SetLastError sets the "last_error" field.

func (*PublishStepUpdateOne) SetLeaseUntil

func (_u *PublishStepUpdateOne) SetLeaseUntil(v time.Time) *PublishStepUpdateOne

SetLeaseUntil sets the "lease_until" field.

func (*PublishStepUpdateOne) SetNillableAttempts

func (_u *PublishStepUpdateOne) SetNillableAttempts(v *int) *PublishStepUpdateOne

SetNillableAttempts sets the "attempts" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableAvailableAt

func (_u *PublishStepUpdateOne) SetNillableAvailableAt(v *time.Time) *PublishStepUpdateOne

SetNillableAvailableAt sets the "available_at" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableClaimedBy

func (_u *PublishStepUpdateOne) SetNillableClaimedBy(v *string) *PublishStepUpdateOne

SetNillableClaimedBy sets the "claimed_by" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableCreatedAt

func (_u *PublishStepUpdateOne) SetNillableCreatedAt(v *time.Time) *PublishStepUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableDependsOn

func (_u *PublishStepUpdateOne) SetNillableDependsOn(v *string) *PublishStepUpdateOne

SetNillableDependsOn sets the "depends_on" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableDest

func (_u *PublishStepUpdateOne) SetNillableDest(v *string) *PublishStepUpdateOne

SetNillableDest sets the "dest" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableFinishedAt

func (_u *PublishStepUpdateOne) SetNillableFinishedAt(v *time.Time) *PublishStepUpdateOne

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableLastError

func (_u *PublishStepUpdateOne) SetNillableLastError(v *string) *PublishStepUpdateOne

SetNillableLastError sets the "last_error" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableLeaseUntil

func (_u *PublishStepUpdateOne) SetNillableLeaseUntil(v *time.Time) *PublishStepUpdateOne

SetNillableLeaseUntil sets the "lease_until" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillablePriority

func (_u *PublishStepUpdateOne) SetNillablePriority(v *int) *PublishStepUpdateOne

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableStartedAt

func (_u *PublishStepUpdateOne) SetNillableStartedAt(v *time.Time) *PublishStepUpdateOne

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableState

func (_u *PublishStepUpdateOne) SetNillableState(v *string) *PublishStepUpdateOne

SetNillableState sets the "state" field if the given value is not nil.

func (*PublishStepUpdateOne) SetNillableTarget

func (_u *PublishStepUpdateOne) SetNillableTarget(v *string) *PublishStepUpdateOne

SetNillableTarget sets the "target" field if the given value is not nil.

func (*PublishStepUpdateOne) SetPayload

func (_u *PublishStepUpdateOne) SetPayload(v map[string]interface{}) *PublishStepUpdateOne

SetPayload sets the "payload" field.

func (*PublishStepUpdateOne) SetPriority

func (_u *PublishStepUpdateOne) SetPriority(v int) *PublishStepUpdateOne

SetPriority sets the "priority" field.

func (*PublishStepUpdateOne) SetResult

func (_u *PublishStepUpdateOne) SetResult(v map[string]interface{}) *PublishStepUpdateOne

SetResult sets the "result" field.

func (*PublishStepUpdateOne) SetStartedAt

func (_u *PublishStepUpdateOne) SetStartedAt(v time.Time) *PublishStepUpdateOne

SetStartedAt sets the "started_at" field.

func (*PublishStepUpdateOne) SetState

SetState sets the "state" field.

func (*PublishStepUpdateOne) SetTarget

SetTarget sets the "target" field.

func (*PublishStepUpdateOne) Where

Where appends a list predicates to the PublishStepUpdate builder.

type PublishSteps

type PublishSteps []*PublishStep

PublishSteps is a parsable slice of PublishStep.

type PublishUnit

type PublishUnit struct {

	// ID of the ent.
	// UUID of the unit
	ID string `json:"id,omitempty"`
	// Publication kind: image_copy (tiup is added by the publish track)
	Kind string `json:"kind,omitempty"`
	// Source artifact reference as requested by the caller
	ArtifactURL string `json:"artifact_url,omitempty"`
	// Resolved source digest, pinned once at planning time
	Digest string `json:"digest,omitempty"`
	// Unit state: queued, running, succeeded, partial, failed, canceled
	State string `json:"state,omitempty"`
	// Caller identity, when known
	RequestedBy string `json:"requested_by,omitempty"`
	// Trigger source: api, nightly, or resume
	Source string `json:"source,omitempty"`
	// Lane priority: release > api > nightly
	Priority int `json:"priority,omitempty"`
	// Time when the unit was created
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Time when every step reached a terminal state
	FinishedAt *time.Time `json:"finished_at,omitempty"`
	// contains filtered or unexported fields
}

PublishUnit is the model entity for the PublishUnit schema.

func (*PublishUnit) String

func (_m *PublishUnit) String() string

String implements the fmt.Stringer.

func (*PublishUnit) Unwrap

func (_m *PublishUnit) Unwrap() *PublishUnit

Unwrap unwraps the PublishUnit 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 (*PublishUnit) Update

func (_m *PublishUnit) Update() *PublishUnitUpdateOne

Update returns a builder for updating this PublishUnit. Note that you need to call PublishUnit.Unwrap() before calling this method if this PublishUnit was returned from a transaction, and the transaction was committed or rolled back.

func (*PublishUnit) Value

func (_m *PublishUnit) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PublishUnit. This includes values selected through modifiers, order, etc.

type PublishUnitClient

type PublishUnitClient struct {
	// contains filtered or unexported fields
}

PublishUnitClient is a client for the PublishUnit schema.

func NewPublishUnitClient

func NewPublishUnitClient(c config) *PublishUnitClient

NewPublishUnitClient returns a client for the PublishUnit from the given config.

func (*PublishUnitClient) Create

func (c *PublishUnitClient) Create() *PublishUnitCreate

Create returns a builder for creating a PublishUnit entity.

func (*PublishUnitClient) CreateBulk

func (c *PublishUnitClient) CreateBulk(builders ...*PublishUnitCreate) *PublishUnitCreateBulk

CreateBulk returns a builder for creating a bulk of PublishUnit entities.

func (*PublishUnitClient) Delete

func (c *PublishUnitClient) Delete() *PublishUnitDelete

Delete returns a delete builder for PublishUnit.

func (*PublishUnitClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PublishUnitClient) DeleteOneID

func (c *PublishUnitClient) DeleteOneID(id string) *PublishUnitDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PublishUnitClient) Get

Get returns a PublishUnit entity by its id.

func (*PublishUnitClient) GetX

GetX is like Get, but panics if an error occurs.

func (*PublishUnitClient) Hooks

func (c *PublishUnitClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PublishUnitClient) Intercept

func (c *PublishUnitClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `publishunit.Intercept(f(g(h())))`.

func (*PublishUnitClient) Interceptors

func (c *PublishUnitClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PublishUnitClient) MapCreateBulk

func (c *PublishUnitClient) MapCreateBulk(slice any, setFunc func(*PublishUnitCreate, int)) *PublishUnitCreateBulk

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 (*PublishUnitClient) Query

func (c *PublishUnitClient) Query() *PublishUnitQuery

Query returns a query builder for PublishUnit.

func (*PublishUnitClient) Update

func (c *PublishUnitClient) Update() *PublishUnitUpdate

Update returns an update builder for PublishUnit.

func (*PublishUnitClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PublishUnitClient) UpdateOneID

func (c *PublishUnitClient) UpdateOneID(id string) *PublishUnitUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PublishUnitClient) Use

func (c *PublishUnitClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `publishunit.Hooks(f(g(h())))`.

type PublishUnitCreate

type PublishUnitCreate struct {
	// contains filtered or unexported fields
}

PublishUnitCreate is the builder for creating a PublishUnit entity.

func (*PublishUnitCreate) Exec

func (_c *PublishUnitCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PublishUnitCreate) ExecX

func (_c *PublishUnitCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishUnitCreate) Mutation

func (_c *PublishUnitCreate) Mutation() *PublishUnitMutation

Mutation returns the PublishUnitMutation object of the builder.

func (*PublishUnitCreate) Save

Save creates the PublishUnit in the database.

func (*PublishUnitCreate) SaveX

func (_c *PublishUnitCreate) SaveX(ctx context.Context) *PublishUnit

SaveX calls Save and panics if Save returns an error.

func (*PublishUnitCreate) SetArtifactURL

func (_c *PublishUnitCreate) SetArtifactURL(v string) *PublishUnitCreate

SetArtifactURL sets the "artifact_url" field.

func (*PublishUnitCreate) SetCreatedAt

func (_c *PublishUnitCreate) SetCreatedAt(v time.Time) *PublishUnitCreate

SetCreatedAt sets the "created_at" field.

func (*PublishUnitCreate) SetDigest

func (_c *PublishUnitCreate) SetDigest(v string) *PublishUnitCreate

SetDigest sets the "digest" field.

func (*PublishUnitCreate) SetFinishedAt

func (_c *PublishUnitCreate) SetFinishedAt(v time.Time) *PublishUnitCreate

SetFinishedAt sets the "finished_at" field.

func (*PublishUnitCreate) SetID

SetID sets the "id" field.

func (*PublishUnitCreate) SetKind

func (_c *PublishUnitCreate) SetKind(v string) *PublishUnitCreate

SetKind sets the "kind" field.

func (*PublishUnitCreate) SetNillableCreatedAt

func (_c *PublishUnitCreate) SetNillableCreatedAt(v *time.Time) *PublishUnitCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishUnitCreate) SetNillableDigest

func (_c *PublishUnitCreate) SetNillableDigest(v *string) *PublishUnitCreate

SetNillableDigest sets the "digest" field if the given value is not nil.

func (*PublishUnitCreate) SetNillableFinishedAt

func (_c *PublishUnitCreate) SetNillableFinishedAt(v *time.Time) *PublishUnitCreate

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*PublishUnitCreate) SetNillablePriority

func (_c *PublishUnitCreate) SetNillablePriority(v *int) *PublishUnitCreate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*PublishUnitCreate) SetNillableRequestedBy

func (_c *PublishUnitCreate) SetNillableRequestedBy(v *string) *PublishUnitCreate

SetNillableRequestedBy sets the "requested_by" field if the given value is not nil.

func (*PublishUnitCreate) SetNillableSource

func (_c *PublishUnitCreate) SetNillableSource(v *string) *PublishUnitCreate

SetNillableSource sets the "source" field if the given value is not nil.

func (*PublishUnitCreate) SetPriority

func (_c *PublishUnitCreate) SetPriority(v int) *PublishUnitCreate

SetPriority sets the "priority" field.

func (*PublishUnitCreate) SetRequestedBy

func (_c *PublishUnitCreate) SetRequestedBy(v string) *PublishUnitCreate

SetRequestedBy sets the "requested_by" field.

func (*PublishUnitCreate) SetSource

func (_c *PublishUnitCreate) SetSource(v string) *PublishUnitCreate

SetSource sets the "source" field.

func (*PublishUnitCreate) SetState

func (_c *PublishUnitCreate) SetState(v string) *PublishUnitCreate

SetState sets the "state" field.

type PublishUnitCreateBulk

type PublishUnitCreateBulk struct {
	// contains filtered or unexported fields
}

PublishUnitCreateBulk is the builder for creating many PublishUnit entities in bulk.

func (*PublishUnitCreateBulk) Exec

Exec executes the query.

func (*PublishUnitCreateBulk) ExecX

func (_c *PublishUnitCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishUnitCreateBulk) Save

Save creates the PublishUnit entities in the database.

func (*PublishUnitCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type PublishUnitDelete

type PublishUnitDelete struct {
	// contains filtered or unexported fields
}

PublishUnitDelete is the builder for deleting a PublishUnit entity.

func (*PublishUnitDelete) Exec

func (_d *PublishUnitDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PublishUnitDelete) ExecX

func (_d *PublishUnitDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PublishUnitDelete) Where

Where appends a list predicates to the PublishUnitDelete builder.

type PublishUnitDeleteOne

type PublishUnitDeleteOne struct {
	// contains filtered or unexported fields
}

PublishUnitDeleteOne is the builder for deleting a single PublishUnit entity.

func (*PublishUnitDeleteOne) Exec

func (_d *PublishUnitDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PublishUnitDeleteOne) ExecX

func (_d *PublishUnitDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishUnitDeleteOne) Where

Where appends a list predicates to the PublishUnitDelete builder.

type PublishUnitGroupBy

type PublishUnitGroupBy struct {
	// contains filtered or unexported fields
}

PublishUnitGroupBy is the group-by builder for PublishUnit entities.

func (*PublishUnitGroupBy) Aggregate

func (_g *PublishUnitGroupBy) Aggregate(fns ...AggregateFunc) *PublishUnitGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PublishUnitGroupBy) Bool

func (s *PublishUnitGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PublishUnitGroupBy) BoolX

func (s *PublishUnitGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PublishUnitGroupBy) Bools

func (s *PublishUnitGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PublishUnitGroupBy) BoolsX

func (s *PublishUnitGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PublishUnitGroupBy) Float64

func (s *PublishUnitGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PublishUnitGroupBy) Float64X

func (s *PublishUnitGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PublishUnitGroupBy) Float64s

func (s *PublishUnitGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PublishUnitGroupBy) Float64sX

func (s *PublishUnitGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PublishUnitGroupBy) Int

func (s *PublishUnitGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PublishUnitGroupBy) IntX

func (s *PublishUnitGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PublishUnitGroupBy) Ints

func (s *PublishUnitGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PublishUnitGroupBy) IntsX

func (s *PublishUnitGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PublishUnitGroupBy) Scan

func (_g *PublishUnitGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PublishUnitGroupBy) ScanX

func (s *PublishUnitGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PublishUnitGroupBy) String

func (s *PublishUnitGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PublishUnitGroupBy) StringX

func (s *PublishUnitGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PublishUnitGroupBy) Strings

func (s *PublishUnitGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PublishUnitGroupBy) StringsX

func (s *PublishUnitGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PublishUnitMutation

type PublishUnitMutation struct {
	// contains filtered or unexported fields
}

PublishUnitMutation represents an operation that mutates the PublishUnit nodes in the graph.

func (*PublishUnitMutation) AddField

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) AddPriority

func (m *PublishUnitMutation) AddPriority(i int)

AddPriority adds i to the "priority" field.

func (*PublishUnitMutation) AddedEdges

func (m *PublishUnitMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PublishUnitMutation) AddedField

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) AddedFields

func (m *PublishUnitMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PublishUnitMutation) AddedIDs

func (m *PublishUnitMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PublishUnitMutation) AddedPriority

func (m *PublishUnitMutation) AddedPriority() (r int, exists bool)

AddedPriority returns the value that was added to the "priority" field in this mutation.

func (*PublishUnitMutation) ArtifactURL

func (m *PublishUnitMutation) ArtifactURL() (r string, exists bool)

ArtifactURL returns the value of the "artifact_url" field in the mutation.

func (*PublishUnitMutation) ClearDigest

func (m *PublishUnitMutation) ClearDigest()

ClearDigest clears the value of the "digest" field.

func (*PublishUnitMutation) ClearEdge

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) ClearField

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) ClearFinishedAt

func (m *PublishUnitMutation) ClearFinishedAt()

ClearFinishedAt clears the value of the "finished_at" field.

func (*PublishUnitMutation) ClearRequestedBy

func (m *PublishUnitMutation) ClearRequestedBy()

ClearRequestedBy clears the value of the "requested_by" field.

func (*PublishUnitMutation) ClearedEdges

func (m *PublishUnitMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PublishUnitMutation) ClearedFields

func (m *PublishUnitMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PublishUnitMutation) Client

func (m PublishUnitMutation) 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 (*PublishUnitMutation) CreatedAt

func (m *PublishUnitMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PublishUnitMutation) Digest

func (m *PublishUnitMutation) Digest() (r string, exists bool)

Digest returns the value of the "digest" field in the mutation.

func (*PublishUnitMutation) DigestCleared

func (m *PublishUnitMutation) DigestCleared() bool

DigestCleared returns if the "digest" field was cleared in this mutation.

func (*PublishUnitMutation) EdgeCleared

func (m *PublishUnitMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PublishUnitMutation) Field

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) FieldCleared

func (m *PublishUnitMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PublishUnitMutation) Fields

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) FinishedAt

func (m *PublishUnitMutation) FinishedAt() (r time.Time, exists bool)

FinishedAt returns the value of the "finished_at" field in the mutation.

func (*PublishUnitMutation) FinishedAtCleared

func (m *PublishUnitMutation) FinishedAtCleared() bool

FinishedAtCleared returns if the "finished_at" field was cleared in this mutation.

func (*PublishUnitMutation) ID

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) IDs

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) Kind

func (m *PublishUnitMutation) Kind() (r string, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*PublishUnitMutation) OldArtifactURL

func (m *PublishUnitMutation) OldArtifactURL(ctx context.Context) (v string, err error)

OldArtifactURL returns the old "artifact_url" field's value of the PublishUnit entity. If the PublishUnit object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishUnitMutation) OldCreatedAt

func (m *PublishUnitMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the PublishUnit entity. If the PublishUnit object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishUnitMutation) OldDigest

func (m *PublishUnitMutation) OldDigest(ctx context.Context) (v string, err error)

OldDigest returns the old "digest" field's value of the PublishUnit entity. If the PublishUnit object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishUnitMutation) OldField

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) OldFinishedAt

func (m *PublishUnitMutation) OldFinishedAt(ctx context.Context) (v *time.Time, err error)

OldFinishedAt returns the old "finished_at" field's value of the PublishUnit entity. If the PublishUnit object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishUnitMutation) OldKind

func (m *PublishUnitMutation) OldKind(ctx context.Context) (v string, err error)

OldKind returns the old "kind" field's value of the PublishUnit entity. If the PublishUnit object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishUnitMutation) OldPriority

func (m *PublishUnitMutation) OldPriority(ctx context.Context) (v int, err error)

OldPriority returns the old "priority" field's value of the PublishUnit entity. If the PublishUnit object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishUnitMutation) OldRequestedBy

func (m *PublishUnitMutation) OldRequestedBy(ctx context.Context) (v string, err error)

OldRequestedBy returns the old "requested_by" field's value of the PublishUnit entity. If the PublishUnit object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishUnitMutation) OldSource

func (m *PublishUnitMutation) OldSource(ctx context.Context) (v string, err error)

OldSource returns the old "source" field's value of the PublishUnit entity. If the PublishUnit object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishUnitMutation) OldState

func (m *PublishUnitMutation) OldState(ctx context.Context) (v string, err error)

OldState returns the old "state" field's value of the PublishUnit entity. If the PublishUnit object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PublishUnitMutation) Op

func (m *PublishUnitMutation) Op() Op

Op returns the operation name.

func (*PublishUnitMutation) Priority

func (m *PublishUnitMutation) Priority() (r int, exists bool)

Priority returns the value of the "priority" field in the mutation.

func (*PublishUnitMutation) RemovedEdges

func (m *PublishUnitMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PublishUnitMutation) RemovedIDs

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) RequestedBy

func (m *PublishUnitMutation) RequestedBy() (r string, exists bool)

RequestedBy returns the value of the "requested_by" field in the mutation.

func (*PublishUnitMutation) RequestedByCleared

func (m *PublishUnitMutation) RequestedByCleared() bool

RequestedByCleared returns if the "requested_by" field was cleared in this mutation.

func (*PublishUnitMutation) ResetArtifactURL

func (m *PublishUnitMutation) ResetArtifactURL()

ResetArtifactURL resets all changes to the "artifact_url" field.

func (*PublishUnitMutation) ResetCreatedAt

func (m *PublishUnitMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PublishUnitMutation) ResetDigest

func (m *PublishUnitMutation) ResetDigest()

ResetDigest resets all changes to the "digest" field.

func (*PublishUnitMutation) ResetEdge

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) ResetField

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) ResetFinishedAt

func (m *PublishUnitMutation) ResetFinishedAt()

ResetFinishedAt resets all changes to the "finished_at" field.

func (*PublishUnitMutation) ResetKind

func (m *PublishUnitMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*PublishUnitMutation) ResetPriority

func (m *PublishUnitMutation) ResetPriority()

ResetPriority resets all changes to the "priority" field.

func (*PublishUnitMutation) ResetRequestedBy

func (m *PublishUnitMutation) ResetRequestedBy()

ResetRequestedBy resets all changes to the "requested_by" field.

func (*PublishUnitMutation) ResetSource

func (m *PublishUnitMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*PublishUnitMutation) ResetState

func (m *PublishUnitMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*PublishUnitMutation) SetArtifactURL

func (m *PublishUnitMutation) SetArtifactURL(s string)

SetArtifactURL sets the "artifact_url" field.

func (*PublishUnitMutation) SetCreatedAt

func (m *PublishUnitMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PublishUnitMutation) SetDigest

func (m *PublishUnitMutation) SetDigest(s string)

SetDigest sets the "digest" field.

func (*PublishUnitMutation) SetField

func (m *PublishUnitMutation) 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 (*PublishUnitMutation) SetFinishedAt

func (m *PublishUnitMutation) SetFinishedAt(t time.Time)

SetFinishedAt sets the "finished_at" field.

func (*PublishUnitMutation) SetID

func (m *PublishUnitMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PublishUnit entities.

func (*PublishUnitMutation) SetKind

func (m *PublishUnitMutation) SetKind(s string)

SetKind sets the "kind" field.

func (*PublishUnitMutation) SetOp

func (m *PublishUnitMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PublishUnitMutation) SetPriority

func (m *PublishUnitMutation) SetPriority(i int)

SetPriority sets the "priority" field.

func (*PublishUnitMutation) SetRequestedBy

func (m *PublishUnitMutation) SetRequestedBy(s string)

SetRequestedBy sets the "requested_by" field.

func (*PublishUnitMutation) SetSource

func (m *PublishUnitMutation) SetSource(s string)

SetSource sets the "source" field.

func (*PublishUnitMutation) SetState

func (m *PublishUnitMutation) SetState(s string)

SetState sets the "state" field.

func (*PublishUnitMutation) Source

func (m *PublishUnitMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (*PublishUnitMutation) State

func (m *PublishUnitMutation) State() (r string, exists bool)

State returns the value of the "state" field in the mutation.

func (PublishUnitMutation) Tx

func (m PublishUnitMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PublishUnitMutation) Type

func (m *PublishUnitMutation) Type() string

Type returns the node type of this mutation (PublishUnit).

func (*PublishUnitMutation) Where

func (m *PublishUnitMutation) Where(ps ...predicate.PublishUnit)

Where appends a list predicates to the PublishUnitMutation builder.

func (*PublishUnitMutation) WhereP

func (m *PublishUnitMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PublishUnitMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PublishUnitQuery

type PublishUnitQuery struct {
	// contains filtered or unexported fields
}

PublishUnitQuery is the builder for querying PublishUnit entities.

func (*PublishUnitQuery) Aggregate

func (_q *PublishUnitQuery) Aggregate(fns ...AggregateFunc) *PublishUnitSelect

Aggregate returns a PublishUnitSelect configured with the given aggregations.

func (*PublishUnitQuery) All

func (_q *PublishUnitQuery) All(ctx context.Context) ([]*PublishUnit, error)

All executes the query and returns a list of PublishUnits.

func (*PublishUnitQuery) AllX

func (_q *PublishUnitQuery) AllX(ctx context.Context) []*PublishUnit

AllX is like All, but panics if an error occurs.

func (*PublishUnitQuery) Clone

func (_q *PublishUnitQuery) Clone() *PublishUnitQuery

Clone returns a duplicate of the PublishUnitQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PublishUnitQuery) Count

func (_q *PublishUnitQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PublishUnitQuery) CountX

func (_q *PublishUnitQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PublishUnitQuery) Exist

func (_q *PublishUnitQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PublishUnitQuery) ExistX

func (_q *PublishUnitQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PublishUnitQuery) First

func (_q *PublishUnitQuery) First(ctx context.Context) (*PublishUnit, error)

First returns the first PublishUnit entity from the query. Returns a *NotFoundError when no PublishUnit was found.

func (*PublishUnitQuery) FirstID

func (_q *PublishUnitQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first PublishUnit ID from the query. Returns a *NotFoundError when no PublishUnit ID was found.

func (*PublishUnitQuery) FirstIDX

func (_q *PublishUnitQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*PublishUnitQuery) FirstX

func (_q *PublishUnitQuery) FirstX(ctx context.Context) *PublishUnit

FirstX is like First, but panics if an error occurs.

func (*PublishUnitQuery) GroupBy

func (_q *PublishUnitQuery) GroupBy(field string, fields ...string) *PublishUnitGroupBy

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 {
	Kind string `json:"kind,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PublishUnit.Query().
	GroupBy(publishunit.FieldKind).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PublishUnitQuery) IDs

func (_q *PublishUnitQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of PublishUnit IDs.

func (*PublishUnitQuery) IDsX

func (_q *PublishUnitQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*PublishUnitQuery) Limit

func (_q *PublishUnitQuery) Limit(limit int) *PublishUnitQuery

Limit the number of records to be returned by this query.

func (*PublishUnitQuery) Offset

func (_q *PublishUnitQuery) Offset(offset int) *PublishUnitQuery

Offset to start from.

func (*PublishUnitQuery) Only

func (_q *PublishUnitQuery) Only(ctx context.Context) (*PublishUnit, error)

Only returns a single PublishUnit entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PublishUnit entity is found. Returns a *NotFoundError when no PublishUnit entities are found.

func (*PublishUnitQuery) OnlyID

func (_q *PublishUnitQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only PublishUnit ID in the query. Returns a *NotSingularError when more than one PublishUnit ID is found. Returns a *NotFoundError when no entities are found.

func (*PublishUnitQuery) OnlyIDX

func (_q *PublishUnitQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PublishUnitQuery) OnlyX

func (_q *PublishUnitQuery) OnlyX(ctx context.Context) *PublishUnit

OnlyX is like Only, but panics if an error occurs.

func (*PublishUnitQuery) Order

Order specifies how the records should be ordered.

func (*PublishUnitQuery) Select

func (_q *PublishUnitQuery) Select(fields ...string) *PublishUnitSelect

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 {
	Kind string `json:"kind,omitempty"`
}

client.PublishUnit.Query().
	Select(publishunit.FieldKind).
	Scan(ctx, &v)

func (*PublishUnitQuery) Unique

func (_q *PublishUnitQuery) Unique(unique bool) *PublishUnitQuery

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 (*PublishUnitQuery) Where

Where adds a new predicate for the PublishUnitQuery builder.

type PublishUnitSelect

type PublishUnitSelect struct {
	*PublishUnitQuery
	// contains filtered or unexported fields
}

PublishUnitSelect is the builder for selecting fields of PublishUnit entities.

func (*PublishUnitSelect) Aggregate

func (_s *PublishUnitSelect) Aggregate(fns ...AggregateFunc) *PublishUnitSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PublishUnitSelect) Bool

func (s *PublishUnitSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PublishUnitSelect) BoolX

func (s *PublishUnitSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PublishUnitSelect) Bools

func (s *PublishUnitSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PublishUnitSelect) BoolsX

func (s *PublishUnitSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PublishUnitSelect) Float64

func (s *PublishUnitSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PublishUnitSelect) Float64X

func (s *PublishUnitSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PublishUnitSelect) Float64s

func (s *PublishUnitSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PublishUnitSelect) Float64sX

func (s *PublishUnitSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PublishUnitSelect) Int

func (s *PublishUnitSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PublishUnitSelect) IntX

func (s *PublishUnitSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PublishUnitSelect) Ints

func (s *PublishUnitSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PublishUnitSelect) IntsX

func (s *PublishUnitSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PublishUnitSelect) Scan

func (_s *PublishUnitSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PublishUnitSelect) ScanX

func (s *PublishUnitSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PublishUnitSelect) String

func (s *PublishUnitSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PublishUnitSelect) StringX

func (s *PublishUnitSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PublishUnitSelect) Strings

func (s *PublishUnitSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PublishUnitSelect) StringsX

func (s *PublishUnitSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PublishUnitUpdate

type PublishUnitUpdate struct {
	// contains filtered or unexported fields
}

PublishUnitUpdate is the builder for updating PublishUnit entities.

func (*PublishUnitUpdate) AddPriority

func (_u *PublishUnitUpdate) AddPriority(v int) *PublishUnitUpdate

AddPriority adds value to the "priority" field.

func (*PublishUnitUpdate) ClearDigest

func (_u *PublishUnitUpdate) ClearDigest() *PublishUnitUpdate

ClearDigest clears the value of the "digest" field.

func (*PublishUnitUpdate) ClearFinishedAt

func (_u *PublishUnitUpdate) ClearFinishedAt() *PublishUnitUpdate

ClearFinishedAt clears the value of the "finished_at" field.

func (*PublishUnitUpdate) ClearRequestedBy

func (_u *PublishUnitUpdate) ClearRequestedBy() *PublishUnitUpdate

ClearRequestedBy clears the value of the "requested_by" field.

func (*PublishUnitUpdate) Exec

func (_u *PublishUnitUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PublishUnitUpdate) ExecX

func (_u *PublishUnitUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishUnitUpdate) Mutation

func (_u *PublishUnitUpdate) Mutation() *PublishUnitMutation

Mutation returns the PublishUnitMutation object of the builder.

func (*PublishUnitUpdate) Save

func (_u *PublishUnitUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PublishUnitUpdate) SaveX

func (_u *PublishUnitUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PublishUnitUpdate) SetArtifactURL

func (_u *PublishUnitUpdate) SetArtifactURL(v string) *PublishUnitUpdate

SetArtifactURL sets the "artifact_url" field.

func (*PublishUnitUpdate) SetCreatedAt

func (_u *PublishUnitUpdate) SetCreatedAt(v time.Time) *PublishUnitUpdate

SetCreatedAt sets the "created_at" field.

func (*PublishUnitUpdate) SetDigest

func (_u *PublishUnitUpdate) SetDigest(v string) *PublishUnitUpdate

SetDigest sets the "digest" field.

func (*PublishUnitUpdate) SetFinishedAt

func (_u *PublishUnitUpdate) SetFinishedAt(v time.Time) *PublishUnitUpdate

SetFinishedAt sets the "finished_at" field.

func (*PublishUnitUpdate) SetKind

func (_u *PublishUnitUpdate) SetKind(v string) *PublishUnitUpdate

SetKind sets the "kind" field.

func (*PublishUnitUpdate) SetNillableArtifactURL

func (_u *PublishUnitUpdate) SetNillableArtifactURL(v *string) *PublishUnitUpdate

SetNillableArtifactURL sets the "artifact_url" field if the given value is not nil.

func (*PublishUnitUpdate) SetNillableCreatedAt

func (_u *PublishUnitUpdate) SetNillableCreatedAt(v *time.Time) *PublishUnitUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishUnitUpdate) SetNillableDigest

func (_u *PublishUnitUpdate) SetNillableDigest(v *string) *PublishUnitUpdate

SetNillableDigest sets the "digest" field if the given value is not nil.

func (*PublishUnitUpdate) SetNillableFinishedAt

func (_u *PublishUnitUpdate) SetNillableFinishedAt(v *time.Time) *PublishUnitUpdate

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*PublishUnitUpdate) SetNillableKind

func (_u *PublishUnitUpdate) SetNillableKind(v *string) *PublishUnitUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*PublishUnitUpdate) SetNillablePriority

func (_u *PublishUnitUpdate) SetNillablePriority(v *int) *PublishUnitUpdate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*PublishUnitUpdate) SetNillableRequestedBy

func (_u *PublishUnitUpdate) SetNillableRequestedBy(v *string) *PublishUnitUpdate

SetNillableRequestedBy sets the "requested_by" field if the given value is not nil.

func (*PublishUnitUpdate) SetNillableSource

func (_u *PublishUnitUpdate) SetNillableSource(v *string) *PublishUnitUpdate

SetNillableSource sets the "source" field if the given value is not nil.

func (*PublishUnitUpdate) SetNillableState

func (_u *PublishUnitUpdate) SetNillableState(v *string) *PublishUnitUpdate

SetNillableState sets the "state" field if the given value is not nil.

func (*PublishUnitUpdate) SetPriority

func (_u *PublishUnitUpdate) SetPriority(v int) *PublishUnitUpdate

SetPriority sets the "priority" field.

func (*PublishUnitUpdate) SetRequestedBy

func (_u *PublishUnitUpdate) SetRequestedBy(v string) *PublishUnitUpdate

SetRequestedBy sets the "requested_by" field.

func (*PublishUnitUpdate) SetSource

func (_u *PublishUnitUpdate) SetSource(v string) *PublishUnitUpdate

SetSource sets the "source" field.

func (*PublishUnitUpdate) SetState

func (_u *PublishUnitUpdate) SetState(v string) *PublishUnitUpdate

SetState sets the "state" field.

func (*PublishUnitUpdate) Where

Where appends a list predicates to the PublishUnitUpdate builder.

type PublishUnitUpdateOne

type PublishUnitUpdateOne struct {
	// contains filtered or unexported fields
}

PublishUnitUpdateOne is the builder for updating a single PublishUnit entity.

func (*PublishUnitUpdateOne) AddPriority

func (_u *PublishUnitUpdateOne) AddPriority(v int) *PublishUnitUpdateOne

AddPriority adds value to the "priority" field.

func (*PublishUnitUpdateOne) ClearDigest

func (_u *PublishUnitUpdateOne) ClearDigest() *PublishUnitUpdateOne

ClearDigest clears the value of the "digest" field.

func (*PublishUnitUpdateOne) ClearFinishedAt

func (_u *PublishUnitUpdateOne) ClearFinishedAt() *PublishUnitUpdateOne

ClearFinishedAt clears the value of the "finished_at" field.

func (*PublishUnitUpdateOne) ClearRequestedBy

func (_u *PublishUnitUpdateOne) ClearRequestedBy() *PublishUnitUpdateOne

ClearRequestedBy clears the value of the "requested_by" field.

func (*PublishUnitUpdateOne) Exec

func (_u *PublishUnitUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PublishUnitUpdateOne) ExecX

func (_u *PublishUnitUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PublishUnitUpdateOne) Mutation

func (_u *PublishUnitUpdateOne) Mutation() *PublishUnitMutation

Mutation returns the PublishUnitMutation object of the builder.

func (*PublishUnitUpdateOne) Save

Save executes the query and returns the updated PublishUnit entity.

func (*PublishUnitUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PublishUnitUpdateOne) Select

func (_u *PublishUnitUpdateOne) Select(field string, fields ...string) *PublishUnitUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PublishUnitUpdateOne) SetArtifactURL

func (_u *PublishUnitUpdateOne) SetArtifactURL(v string) *PublishUnitUpdateOne

SetArtifactURL sets the "artifact_url" field.

func (*PublishUnitUpdateOne) SetCreatedAt

func (_u *PublishUnitUpdateOne) SetCreatedAt(v time.Time) *PublishUnitUpdateOne

SetCreatedAt sets the "created_at" field.

func (*PublishUnitUpdateOne) SetDigest

SetDigest sets the "digest" field.

func (*PublishUnitUpdateOne) SetFinishedAt

func (_u *PublishUnitUpdateOne) SetFinishedAt(v time.Time) *PublishUnitUpdateOne

SetFinishedAt sets the "finished_at" field.

func (*PublishUnitUpdateOne) SetKind

SetKind sets the "kind" field.

func (*PublishUnitUpdateOne) SetNillableArtifactURL

func (_u *PublishUnitUpdateOne) SetNillableArtifactURL(v *string) *PublishUnitUpdateOne

SetNillableArtifactURL sets the "artifact_url" field if the given value is not nil.

func (*PublishUnitUpdateOne) SetNillableCreatedAt

func (_u *PublishUnitUpdateOne) SetNillableCreatedAt(v *time.Time) *PublishUnitUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PublishUnitUpdateOne) SetNillableDigest

func (_u *PublishUnitUpdateOne) SetNillableDigest(v *string) *PublishUnitUpdateOne

SetNillableDigest sets the "digest" field if the given value is not nil.

func (*PublishUnitUpdateOne) SetNillableFinishedAt

func (_u *PublishUnitUpdateOne) SetNillableFinishedAt(v *time.Time) *PublishUnitUpdateOne

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*PublishUnitUpdateOne) SetNillableKind

func (_u *PublishUnitUpdateOne) SetNillableKind(v *string) *PublishUnitUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (*PublishUnitUpdateOne) SetNillablePriority

func (_u *PublishUnitUpdateOne) SetNillablePriority(v *int) *PublishUnitUpdateOne

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*PublishUnitUpdateOne) SetNillableRequestedBy

func (_u *PublishUnitUpdateOne) SetNillableRequestedBy(v *string) *PublishUnitUpdateOne

SetNillableRequestedBy sets the "requested_by" field if the given value is not nil.

func (*PublishUnitUpdateOne) SetNillableSource

func (_u *PublishUnitUpdateOne) SetNillableSource(v *string) *PublishUnitUpdateOne

SetNillableSource sets the "source" field if the given value is not nil.

func (*PublishUnitUpdateOne) SetNillableState

func (_u *PublishUnitUpdateOne) SetNillableState(v *string) *PublishUnitUpdateOne

SetNillableState sets the "state" field if the given value is not nil.

func (*PublishUnitUpdateOne) SetPriority

func (_u *PublishUnitUpdateOne) SetPriority(v int) *PublishUnitUpdateOne

SetPriority sets the "priority" field.

func (*PublishUnitUpdateOne) SetRequestedBy

func (_u *PublishUnitUpdateOne) SetRequestedBy(v string) *PublishUnitUpdateOne

SetRequestedBy sets the "requested_by" field.

func (*PublishUnitUpdateOne) SetSource

SetSource sets the "source" field.

func (*PublishUnitUpdateOne) SetState

SetState sets the "state" field.

func (*PublishUnitUpdateOne) Where

Where appends a list predicates to the PublishUnitUpdate builder.

type PublishUnits

type PublishUnits []*PublishUnit

PublishUnits is a parsable slice of PublishUnit.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type 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 {

	// AlertEvent is the client for interacting with the AlertEvent builders.
	AlertEvent *AlertEventClient
	// AlertLease is the client for interacting with the AlertLease builders.
	AlertLease *AlertLeaseClient
	// DevBuild is the client for interacting with the DevBuild builders.
	DevBuild *DevBuildClient
	// ImageSyncTask is the client for interacting with the ImageSyncTask builders.
	ImageSyncTask *ImageSyncTaskClient
	// PublishDesired is the client for interacting with the PublishDesired builders.
	PublishDesired *PublishDesiredClient
	// PublishLane is the client for interacting with the PublishLane builders.
	PublishLane *PublishLaneClient
	// PublishStep is the client for interacting with the PublishStep builders.
	PublishStep *PublishStepClient
	// PublishUnit is the client for interacting with the PublishUnit builders.
	PublishUnit *PublishUnitClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL